Back to docs

Styx Stack Solana SDK

Private token flows, Signal-style messaging, and IC/DAM domain tooling for Solana

Installation

# Full privacy SDK
npm install @styxstack/sdk

# Individual packages
npm install @styxstack/sps-sdk      # Privacy-native tokens & DeFi
npm install @styxstack/sts-sdk      # Event-sourced token standard
npm install @styxstack/app-kit      # React/React Native components
npm install @styxstack/whisperdrop-sdk  # Private airdrops

Quick Start

import { SpsClient, DOMAIN_STS, sts } from '@styxstack/sps-sdk';
import { Connection, Keypair } from '@solana/web3.js';

const connection = new Connection('https://mainnet.helius-rpc.com/?api-key=YOUR_KEY');
const wallet = Keypair.fromSecretKey(/* your key */);

const client = new SpsClient(connection, wallet, { network: 'mainnet' });

// Transfer private tokens
const { signature } = await client.transfer({
  mintId: 'TOKEN_MINT_ID',
  amount: 1000000n,
  recipient: recipientPubkey,
});

SDK Packages

@styxstack/sdk

Complete privacy SDK

@styxstack/sps-sdk

Privacy Standard SDK

@styxstack/sts-sdk

Token Standard SDK

@styxstack/app-kit

React/React Native components

@styxstack/whisperdrop-sdk

Private Airdrops

🔐 Private Tokens (STS Domain 0x01)

Inscription-backed private tokens with native privacy. Create fungible tokens, NFTs, or semi-fungibles.

// Create token (fungible, NFT, or semi-fungible)
await client.createMint({
  name: 'My Token',
  symbol: 'MTK',
  decimals: 9,
  mintType: 0,    // 0=Fungible, 1=NFT, 2=SemiFungible
  backingType: 0, // 0=Native, 1=SplBacked, 2=Hybrid
  privacyMode: 0, // 0=Private, 1=Transparent, 2=Optional
});

// Shielded transfer (hidden amounts)
await client.shieldedTransfer({
  mintId,
  amount: 1000000n,
  recipient,
  memo: 'Private payment',
});

// Shield SPL tokens → private SPS notes
await client.shield({
  splMint: tokenMintPubkey,
  amount: 1000000n,
  commitment: generateCommitment(viewingKey),
});

// Unshield → back to SPL tokens
await client.unshield({
  nullifier,
  amount: 1000000n,
  recipient: walletPubkey,
});

Three Token Models

Native STS

Domain 0x01 - Pure inscription, zero accounts

IC Compression

Domain 0x0F - Inscription Compression operations and Merkle paths

DAM Materialize

Domain 0x0E - Virtual ↔ Real bidirectional

Domains Reference

IDDomainDescription
0x01STSToken Standard (mint, shield, unshield, stealth, IAP)
0x02MESSAGINGSignal-style encrypted messaging
0x03ACCOUNTVirtual Token Accounts, delegation, guardians
0x04VSLVirtual Shielded Ledger (ZK transfers)
0x05RELAYGasless relay, SOL/token relay, fee tokens
0x07PRIVACYanoNFT, state channels, WhisperDrop, Custom ZK Circuit Registry
0x08DEFIHTLC atomic swaps, pool transfers
0x09NFTMint, collections, fair launch, airdrops
0x0EDAMDeferred Account Materialization
0x0FICInscription Compression

Kotlin (Android)

import com.styx.appkit.StyxAppKit
import com.styx.appkit.messaging.PrivateMessaging

class ChatViewModel : ViewModel() {
    private val styx = StyxAppKit.create(Network.MAINNET, rpcUrl)
    
    suspend fun sendMessage(to: String, content: String) {
        styx.messaging.send(to, content.toByteArray())
    }
    
    fun onMessageReceived(handler: (PrivateMessage) -> Unit) {
        styx.messaging.subscribe(handler)
    }
}

Program IDs

SPS — MainnetView
STYXygfX7on1MMnjjjxXtkzqbQ7heyh6gsC5Mihhs95
StyxZK Verifier — MainnetView
FERRYpEo4dPbJZYqUfpkWHEMQCCs33Vm3TwBLZpBovXM

🔐 Security

  • E2E Encryption: X25519 + XChaCha20-Poly1305
  • Forward Secrecy: Double Ratchet protocol
  • Zero-Knowledge: Nullifier-based double-spend protection
  • Groth16 ZK Proofs: On-chain verified proofs for private transfers via CPI to StyxZK Verifier

Ready to Build?

Get your API keys and start building private Solana apps today.