Back to docs

Getting Started

Build privacy-first Solana apps in 5 minutes

What is Styx Stack?

Styx Stack is a comprehensive privacy SDK for Solana. Build private payments, encrypted messaging, and token airdrops in minutes.

⚡ Resolv

Send crypto via text/email. No wallet needed to claim!

🔐 SPS Tokens

200+ operations for private token management.

🎁 WhisperDrop

Private airdrops to 1M+ recipients.

1

Install the SDK

Install the unified Styx Stack SDK:

npm install @styx-stack/sdk @solana/web3.js

Or individual packages:

npm install @styx-stack/sps-sdk @styx-stack/whisperdrop-sdk
2

Choose Your Mode

Styx SDK works in two modes:

⚡ Standalone Mode

No custom programs needed! Works on any Solana cluster immediately.

  • • Resolv text/email payments
  • • Privacy utilities
  • • Stealth addresses

🔒 Full Styx Mode

Uses Styx mainnet programs for advanced features.

  • • SPS privacy tokens
  • • E2E encrypted messaging
  • • WhisperDrop airdrops
3

Quick Start: Send Payment via Text

No wallet needed! Recipient gets a link to claim funds.

import { Resolv, LAMPORTS_PER_SOL } from '@styx-stack/sdk';
import { Connection, Keypair } from '@solana/web3.js';

const connection = new Connection('https://api.mainnet-beta.solana.com');
const resolv = new Resolv(connection);

// Your wallet
const sender = Keypair.fromSecretKey(/* your secret key */);

// Create claimable payment (0.1 SOL)
const { payment, link } = await resolv.createPayment({
  sender,
  amount: BigInt(0.1 * LAMPORTS_PER_SOL),
});

// Generate SMS message
const sms = resolv.generateSmsMessage(link, 'Alice');
console.log('📱 Send this SMS:', sms.body);
// "Hey! Alice sent you 0.1 SOL! Click to claim: https://..."

// Recipient clicks link → stealth wallet created → funds received!
4

Full Mode: Private Messaging

Send E2E encrypted messages with the Styx Program:

import { StyxClient } from '@styx-stack/sdk';
import { Connection, Keypair, PublicKey } from '@solana/web3.js';

const connection = new Connection('https://api.mainnet-beta.solana.com');
const styx = new StyxClient({ connection });

const sender = Keypair.fromSecretKey(/* your secret key */);
const recipient = new PublicKey('RECIPIENT_ADDRESS');

// Derive shared secret (ECDH)
const sharedSecret = deriveSharedSecret(senderPrivKey, recipientPubKey);

// Send encrypted message
const signature = await styx.messaging.sendPrivateMessage(
  sender,
  recipient,
  'Hello, this message is encrypted!',
  sharedSecret
);

console.log('✅ Private message sent:', signature);
5

Create Private Airdrop

Launch a WhisperDrop campaign - recipient list stays private!

import { WhisperDropClient, buildMerkleTree } from '@styx-stack/sdk';

const whisperdrop = new WhisperDropClient(connection);

// Define recipients (kept completely private!)
const allocations = [
  { recipient: wallet1, amount: 100_000_000n, nonce: randomBytes(32) },
  { recipient: wallet2, amount: 200_000_000n, nonce: randomBytes(32) },
  // Supports 1M+ recipients!
];

// Build Merkle tree - only root goes on-chain
const campaignId = generateCampaignId();
const { root, proofs } = buildMerkleTree(campaignId, allocations);

// Create campaign
const { campaignPDA } = await whisperdrop.initCampaign({
  authority,
  tokenMint,
  campaignId,
  merkleRoot: root,
  expiryUnix: Date.now() / 1000 + 30 * 86400, // 30 days
});

// Share individual proofs privately with recipients
console.log('🎉 Airdrop created:', campaignPDA.toBase58());

Next Steps