TypeScript & Kotlin SDKs for Styx Protocol
npm / pnpm / yarn
npm install @styx-stack/pmp-sdk @styx-stack/whisperdrop-sdkProgram ID: GhSTPRZFBnWXMjt6xFnpY2ZHFwijFoC44KkxXSEC94X9
Fee: 0.001 SOL per instruction
End-to-end encrypted message
Multi-hop onion routing
SOL with hidden amount
Forward-secret (Double Ratchet)
Auditor disclosure
DAO proposal inscription
Anonymous voting
Virtual token balance
Register referral
Claim rewards
Atomic swap
Execute swap
Smart contract lite
Rollup settlement
Open channel
Close channel
Time-locked message
ZK proof via PDA
Cross-program inscription
import { Connection, Keypair, PublicKey } from '@solana/web3.js';
import { StyxPMP, encryptMessage, generateKeyPair } from '@styx-stack/pmp-sdk';
const connection = new Connection('https://api.mainnet-beta.solana.com');
const pmp = new StyxPMP(connection);
// Generate encryption keys (X25519)
const senderKeys = generateKeyPair();
const recipientPubKey = new PublicKey('...');
// Encrypt and send message
const encrypted = encryptMessage(
'Hello, this is private!',
senderKeys.secretKey,
recipientPubKey
);
const sig = await pmp.sendPrivateMessage(
senderWallet,
recipientPubKey,
encrypted,
{ stealth: true }
);
console.log('Message sent:', sig);Program ID: GhstFNnEbixAGQgLnWg1nWetJQgGfSUMhnxdBA6hWu5e
Init Fee: 0.01 SOL |Claim Fee: 0.0005 SOL
Open claiming
Hold any SPL amount
Hold minimum SPL
Hold Token-2022
Min Token-2022 balance
Hold specific NFT
Hold collection NFT
Hold cNFT
Hold cNFT collection
import {
WhisperDrop,
buildMerkleTree,
generateCampaignId,
GateType
} from '@styx-stack/whisperdrop-sdk';
const connection = new Connection('https://api.mainnet-beta.solana.com');
const whisperdrop = new WhisperDrop(connection);
// Prepare recipients
const allocations = [
{ recipient: new PublicKey('...'), amount: 100_000_000n, nonce: generateNonce() },
{ recipient: new PublicKey('...'), amount: 200_000_000n, nonce: generateNonce() },
];
// Build Merkle tree
const campaignId = generateCampaignId();
const { root, proofs } = buildMerkleTree(campaignId, allocations);
// Create campaign (0.01 SOL fee)
const { campaignPDA, escrowPDA } = await whisperdrop.initCampaign(
authority,
tokenMint,
{
campaignId,
merkleRoot: root,
expiryUnix: BigInt(Date.now() / 1000 + 86400 * 30), // 30 days
gateType: GateType.NftCollection, // Optional: require NFT
gateMint: collectionMint,
}
);
console.log('Campaign created:', campaignPDA.toBase58());| Operation | Fee (SOL) | Fee (Lamports) |
|---|---|---|
| PMP Instructions (all 19 types) | 0.001 | 1,000,000 |
| WhisperDrop Init Campaign | 0.01 | 10,000,000 |
| WhisperDrop Claim | 0.0005 | 500,000 |
| WhisperDrop Reclaim | FREE | 0 |
Treasury: 13xnC9kDksJMBE9FYVW1S7dukLjRDgrh4Dzm6eq5moon