npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cherrydotfun/stem-sdk

v1.0.2

Published

SDK for the Stem protocol on Solana: account abstractions, peer-to-peer chat, protocol transactions.

Readme

stem-sdk

TypeScript/Node.js SDK for interacting with the Stem protocol on the Solana blockchain.
Provides abstractions for account management, peer-to-peer chat, group chats, and protocol-specific transactions.

Features

  • Solana Account Abstractions: Classes for managing Solana accounts, connections, and signatures
  • Peer-to-Peer Chat: Manage peer lists, invitations, and encrypted chat channels between wallets
  • Group Chats: Create and manage group chats with different group types
  • Protocol Transactions: Helpers for registration, inviting, accepting/rejecting peers, and sending messages
  • Borsh Serialization: Uses borsh schemas for efficient on-chain data encoding/decoding
  • Event-driven: Emits events for account and chat updates

Installation

npm install @cherrydotfun/stem-sdk

Usage

import { Connection, Account } from "@cherrydotfun/stem-sdk/dist/solana";
import { Stem } from "@cherrydotfun/stem-sdk/dist/stem";
import { PublicKey } from "@solana/web3.js";

// Connect to Solana
const conn = new Connection("https://api.mainnet-beta.solana.com");

// Your wallet public key
const myPubkey = new PublicKey("...");

// Create Stem instance
const stem = new Stem(myPubkey, conn, true);

// Register, invite, accept, send messages, etc.

API Overview

Solana Abstractions

  • Connection: Wraps Solana RPC/WebSocket, provides account management and airdrop
  • Account: Represents a Solana account, supports fetching and subscribing to changes
  • Signature: Handles transaction signature status and confirmation

Stem Protocol

  • Stem: Main class for protocol logic (registration, peer management, chat, groups)
    • init(): Loads and subscribes to descriptor and chat accounts
    • createRegisterTx(): Returns a transaction for registering
    • createInviteTx(pubkey, message): Returns a transaction to invite a peer
    • createAcceptTx(pubkey): Accepts an invite
    • createRejectTx(pubkey): Rejects an invite
    • createSendMessageTx(pubkey, message): Sends a message to a peer
    • createCreateGroupTx(type, title, description, image_url): Creates a group chat
    • createSendMessageToGroupTx(group, content): Sends a message to a group
    • createInviteToGroupTx(group, invitee): Invites to a group
    • createAcceptInviteToGroupTx(group): Accepts a group invite
    • createJoinGroupTx(group): Joins a public group
    • Event emitters: onChatsUpdated, onStatusUpdated, onChatUpdated, onGroupsUpdated

Helpers

  • helpers.getDescriptorPda(pubkey): Returns PDA for a wallet descriptor
  • helpers.getChatPda(pubkey, peer): Returns PDA for a private chat
  • helpers.getChatHash(pubkey, peer): Deterministic hash for chat
  • helpers.getNewGroupPda(pubkey, groups_count): Returns PDA for a new group
  • helpers.getdisc(name): Generates discriminator for global name

Types

  • PeerStatus: Invited, Requested, Accepted, Rejected
  • GroupPeerStatus: Invited, Joined, Rejected, Left, Kicked
  • Descriptor, Peer, Chat, Message, GroupDescriptor and their borsh-encoded variants

Constants

  • PROGRAM_ID: Stem protocol program ID on Solana
  • SEED_DESCRIPTOR, SEED_PRIVATE_CHAT, SEED_GROUP_DESCRIPTOR: Seeds for PDA derivation

Dependencies

  • @solana/web3.js ^1.98.2
  • borsh ^2.0.0
  • buffer ^6.0.3
  • crypto-js ^4.2.0

Development

  • TypeScript, CommonJS output
  • Node.js >= 16
  • No tests included by default
  • See src/ for implementation details

License

MIT