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

@styxstack/sts-sdk

v2.3.0

Published

TypeScript SDK for the Styx Token Standard (STS) on Solana - Privacy-preserving event-sourced tokens with provable superiority over Token-22

Readme

@styxstack/sts-sdk

STS SDK npm TypeScript License

TypeScript SDK for the Styx Token Standard (STS) on Solana

Event-sourced tokens. Zero rent. Native privacy. Full Token-22 parity.

Installation

npm install @styxstack/sts-sdk
# or
pnpm add @styxstack/sts-sdk
# or
yarn add @styxstack/sts-sdk

Quick Start

import { STS, StyxPMP, STYX_PMP_PROGRAM_ID } from '@styxstack/sts-sdk';
import { Connection, Keypair, PublicKey } from '@solana/web3.js';

const connection = new Connection('https://api.mainnet-beta.solana.com');
const styx = new StyxPMP(connection);
const sts = new STS(styx);

// Send tokens to any address (Token-22 UX!)
const { signature } = await sts.sendTo(wallet, {
  to: new PublicKey('recipientAddress...'),
  amount: 1_000_000n,
  mint: tokenMint,
});

console.log('Sent!', signature);

Same UX as Token-22:

// Token-22 way:
await transfer(connection, payer, sourceATA, destATA, payer, 1_000_000);

// STS way (simpler - no ATAs needed!):
await sts.sendTo(wallet, { to: recipientAddress, amount: 1_000_000n, mint });

Why STS Over Token-22?

| Feature | Token-22 | STS | |---------|----------|-----| | Cost per CT transfer | ~0.15 SOL | ~0.001 SOL | | Rent per holder | ~0.002 SOL | 0 SOL | | Extensions | Mint-wide | Per-note | | Instruction count | ~30 | 207 | | Privacy | Optional CT | Native |

Core Features

Token Operations

// Mint new tokens
const mintIx = await sts.buildMintInstruction({
  authority: payer.publicKey,
  recipient: recipientPubkey,
  amount: 1_000_000n,
  decimals: 6
});

// Transfer with privacy
const transferIx = await sts.buildNoteTransferInstruction({
  noteCommitment: sourceNote,
  newOwnerHash: recipientHash, // Stealth address hash
  amount: 100_000n
});

// Merge multiple notes
const mergeIx = await sts.buildNoteMergeInstruction({
  noteCommitments: [note1, note2, note3],
  newOwnerHash: ownerHash
});

// Split note
const splitIx = await sts.buildNoteSplitInstruction({
  noteCommitment: sourceNote,
  amounts: [50_000n, 30_000n, 20_000n]
});

Per-Note Extensions

Unlike Token-22's mint-wide extensions, STS allows extensions per individual note:

// Transfer fee (per-note)
const noteWithFee = await sts.buildNoteWithExtensions({
  amount: 100_000n,
  extensions: [
    { type: 'transferFee', feeBps: 100, maxFee: 10_000n },
    { type: 'royalty', recipient: creatorPubkey, bps: 500 }
  ]
});

// Interest-bearing note
const interestNote = await sts.buildNoteWithExtensions({
  amount: 100_000n,
  extensions: [
    { type: 'interest', rateBps: 500, compoundSlots: 432_000 }
  ]
});

// Soulbound (non-transferable)
const soulboundNote = await sts.buildNoteWithExtensions({
  amount: 1n,
  extensions: [
    { type: 'soulbound', bindingProof: proofHash }
  ]
});

Stealth Addresses

// Generate stealth meta-address
const { viewKey, spendKey, metaAddress } = await sts.generateStealthMetaAddress();

// Send to stealth address
const stealthIx = await sts.buildStealthSendInstruction({
  noteCommitment: sourceNote,
  stealthMetaAddress: recipientMetaAddress,
  amount: 100_000n
});

// Scan for incoming payments
const payments = await sts.scanStealthPayments({
  viewKey: myViewKey,
  fromSlot: 250_000_000
});

AMM & DEX Integration

// Create liquidity pool
const createPoolIx = await sts.buildAMMPoolCreateInstruction({
  tokenA: mintA,
  tokenB: mintB,
  feeRateBps: 30 // 0.3%
});

// Swap
const swapIx = await sts.buildAMMSwapInstruction({
  pool: poolAddress,
  amountIn: 1_000_000n,
  minAmountOut: 990_000n, // 1% slippage
  direction: 'AtoB'
});

// Add liquidity
const addLiqIx = await sts.buildAMMAddLiquidityInstruction({
  pool: poolAddress,
  amountA: 1_000_000n,
  amountB: 1_000_000n,
  minLpTokens: 999_000n
});

NFT Marketplace

// Mint NFT (unique note with supply=1)
const nftMintIx = await sts.buildNFTMintInstruction({
  authority: creator.publicKey,
  metadata: {
    name: 'My NFT',
    symbol: 'MNFT',
    uri: 'https://arweave.net/...',
    royaltyBps: 500
  }
});

// List for sale
const listIx = await sts.buildNFTListInstruction({
  noteCommitment: nftNote,
  price: 1_500_000_000n // 1.5 SOL
});

// Create auction
const auctionIx = await sts.buildAuctionCreateInstruction({
  noteCommitment: nftNote,
  auctionType: 'english',
  startPrice: 1_000_000_000n,
  durationSlots: 172_800 // ~2 days
});

Private Governance

// Create proposal
const proposalIx = await sts.buildProposalInstruction({
  proposer: proposer.publicKey,
  title: 'Increase treasury allocation',
  descriptionHash: keccak256(description),
  votingEndSlot: currentSlot + 432_000n,
  quorumBps: 1000 // 10%
});

// Cast private vote (nullifier-based)
const voteIx = await sts.buildPrivateVoteInstruction({
  proposalId,
  voterSecret: mySecret,
  vote: 1, // yes
  weight: myTokenBalance
});

Compliance & Auditing

// Selective disclosure to auditor
const disclosureIx = await sts.buildSelectiveDisclosureInstruction({
  noteCommitment,
  auditorPubkey,
  fieldsToReveal: ['amount', 'timestamp'], // Hide sender/recipient
  expirySlot: currentSlot + 86_400
});

// Prove balance meets threshold
const proof = await sts.proveBalance({
  noteCommitment,
  threshold: 1_000_000n,
  auditorPubkey
});

Mobile Integration

Full Solana Mobile Wallet Adapter (MWA) 2.0 support:

import { STS } from '@styxstack/sts-sdk';
import { transact } from '@solana-mobile/mobile-wallet-adapter-protocol';

await transact(async (wallet) => {
  const sts = new STS(connection);
  
  const tx = await sts.buildTransfer({
    amount: 100_000n,
    toHash: recipientHash
  });
  
  const signed = await wallet.signTransactions([tx]);
  await connection.sendRawTransaction(signed[0].serialize());
});

Trust Levels

STS provides three trust levels:

// Level 0: Trust indexer (free, default)
const balance = await sts.getBalance(ownerPubkey);

// Level 1: Nullifier PDAs (0.00089 SOL, trustless double-spend)
const transferIx = await sts.buildNoteTransferInstruction({
  noteCommitment,
  newOwnerHash,
  amount,
  createNullifierPDA: true // Explicit nullifier
});

// Level 2: Full Merkle proofs (trustless verification)
const verified = await sts.verifyNoteWithMerkleProof({
  noteCommitment,
  merkleProof,
  merkleRoot
});

Constants

import {
  STYX_PROGRAM_ID,           // Mainnet program ID
  STYX_DEVNET_PROGRAM_ID,    // Devnet program ID
  TAG_NOTE_MINT,             // Instruction tags
  TAG_NOTE_TRANSFER,
  TAG_NOTE_MERGE,
  // ... 207 total tags
} from '@styxstack/sts-sdk';

Error Handling

import { STSError, ErrorCode } from '@styxstack/sts-sdk';

try {
  await sts.transfer(...);
} catch (err) {
  if (err instanceof STSError) {
    switch (err.code) {
      case ErrorCode.InsufficientBalance:
        console.log('Not enough tokens');
        break;
      case ErrorCode.NullifierExists:
        console.log('Double-spend attempt detected');
        break;
      case ErrorCode.InvalidProof:
        console.log('Invalid cryptographic proof');
        break;
    }
  }
}

Related Packages

| Package | Description | |---------|-------------| | @styxstack/cli | Command-line interface | | @styx/crypto-core | Cryptographic primitives | | @styx/rn-kit | React Native components | | @styx/mobile-toolkit | Mobile utilities | | @styx/policy-kit | Compliance policies |

Development

# Clone
git clone https://github.com/QuarksBlueFoot/StyxStack.git
cd StyxStack/packages/sts-sdk

# Install
pnpm install

# Build
pnpm build

# Test
pnpm test

# Type check
pnpm typecheck

License

BSL 1.1 - Free for projects with <100k MAU. Converts to Apache-2.0 on 2030-01-26.

For commercial licensing: [email protected]


Part of the Styx Token Standard

Built by @moonmanquark (Bluefoot Labs)