The Shadow Monarch SDK - Universal Privacy Layer for Solana with ZK proofs, stealth addresses, and selective disclosure
npm install @alleyboss/ashborn-sdk
THE SHADOW RELAY โ Privacy Layer for Solana
"I shall protect my family, even if it means turning the entire world against me.
There is no need for words among shadows."
โ The Shadow Monarch
---
Ashborn is not just a relay. It is a complete privacy operating system for Solana.
secp256k1 (Vitalik's formula).---
> "One interface to rule them all."
typescript
import { PrivacyRelay } from '@alleyboss/ashborn-sdk';const monarch = new PrivacyRelay({
relayKeypair: process.env.RELAY_KEYPAIR, // Server-side sovereign identity
rpcUrl: 'https://api.mainnet-beta.solana.com'
});
`$3
AI Buyer pays an AI Seller anonymously.
`typescript
// 1. Buyer shields funds (Network sees "Ashborn Relay")
const { note } = await monarch.shield({
amount: 10_000_000_000n, // 10 SOL
mint: SOL_MINT
});// 2. Buyer pays Seller (Unlinkable transfer)
await monarch.transfer({
recipient: sellerStealthAddress,
amount: 5 // 5 SOL
});
`$3
Generate infinite unlinkable deposit addresses.
`typescript
import { ShadowWire } from '@alleyboss/ashborn-sdk/stealth';// Sender generates a unique address for Recipient
// Only Recipient can derive the private key
const stealthAddress = await ShadowWire.deriveStealthAddress({
rootKey: recipientPublicKey,
ephemeralSecret: oneTimeSecret
});
`$3
Prove solvency without doxxing. Real Groth16 proofs via snarkjs โ not simulated.
`typescript
// Generate real ZK range proof
// Returns { isReal: true, proofTime: 1234, proof: "..." }
const proofResult = await monarch.prove({
balance: 0.5, // Your actual balance (SOL)
min: 0.1, // Prove balance >= 0.1 SOL
max: 1.0 // Prove balance <= 1.0 SOL
});// proofResult.isReal === true โ Real Groth16 via snarkjs
// proofResult.proofTime โ Generation time in ms
`$3
Call SDK from your API routes โ all ZK logic stays in SDK.
`typescript
// In your Next.js API route (app/api/prove/route.ts)
import { PrivacyRelay } from '@alleyboss/ashborn-sdk';export async function POST(req: Request) {
const { balance, min, max } = await req.json();
const relay = new PrivacyRelay({
relayKeypair: process.env.RELAY_KEYPAIR,
rpcUrl: 'https://api.devnet.solana.com'
});
// SDK handles everything โ real snarkjs proof generation
const proofResult = await relay.prove({ balance, min, max });
return Response.json(proofResult);
}
`$3
Withdraw to a clean public wallet.
`typescript
// Relay handles the withdrawal. PrivacyCash sees "Ashborn Relay".
// Your destination wallet remains unconnected to the source.
await monarch.unshield({
amount: 2.5, // 2.5 SOL
recipient: "PublicWalletAddress123..."
});
`---
๐ฅ What Protocols See
| Protocol | Without Ashborn | With Shadow Relay |
|----------|-----------------|-------------------|
| PrivacyCash | Your wallet address |
Ashborn Relay |
| ShadowWire | Your stealth meta | Ashborn Relay |
| Light Protocol | Your ZK identity | Ashborn Relay |
| x402 Micropay | Your agent wallet | Ashborn Relay |
| ZK Groth16 | N/A | Real snarkjs proof |---
๐ก๏ธ Features
| Feature | Description |
|---------|-------------|
| Shadow Relay | Protocols see Ashborn, not you |
| K-Anonymityยฒ | Hide in Ashborn pool + protocol pool |
| ECDH Stealth | Vitalik's formula:
P = H(rA)G + B |
| ZK Compliance | Prove statements without revealing data |
| Ring Signatures | 4+ decoys per transfer |---
๐ฆ Modules
`typescript
// Core
import { Ashborn, PrivacyRelay } from '@alleyboss/ashborn-sdk';// Stealth (ECDH)
import { ShadowWire, generateDecoys } from '@alleyboss/ashborn-sdk/stealth';
// ZK Proofs
import { RangeCompliance } from '@alleyboss/ashborn-sdk/zk';
// Integrations
import { PrivacyCashOfficial, HeliusEnhanced } from '@alleyboss/ashborn-sdk/integrations';
``---
- Non-Custodial: Ashborn is a RELAY. Funds transit through, never stored.
- Real ECDH: Uses @noble/curves for proper elliptic curve operations.
- Groth16 Proofs: Real ZK via snarkjs (not simulated).
- Metadata Stripped: IP, User-Agent removed at relay layer.
---
- ๐ฎ Live Demo
- ๐ Documentation
---
PrivacyCash sees nothing. ShadowWire sees nothing.
ARISE. ๐