Devnet
Cloak runs on Solana devnet so you can develop and test your integration against a live shield pool without spending real funds. Devnet is intended for development only — token balances are not real and supported assets are limited. This page is for app developers who want to integrate the Cloak SDK against a non-production environment.Endpoints
Supported assets
Real Circle USDC and USDT are not available on devnet.
SDK install
The published@cloak.dev/sdk targets mainnet. For devnet, install the dedicated devnet SDK package — it pre-configures the program ID, the relay URL, and exports a DEVNET_MOCK_USDC_MINT constant. The surface is otherwise identical to the mainnet SDK.
Quickstart: deposit SOL
Example: SOL shielded transfer
A shielded-to-shielded SOL transfer: sender deposits SOL into the pool, then transfers part of it to a recipient UTXO and keeps a change UTXO.Example: mock-USDC shielded transfer
Same pattern as SOL, but using the devnet mock-USDC mint. The sender’s mock-USDC ATA must already hold the deposit amount — mint via the faucet (UI or HTTP), or wire your own funding flow.Example: swap SOL → mock-USDC
Devnet swaps from shielded SOL to mock-USDC settle at a Pyth-quoted spot price. The SDK call shape is identical to a mainnetswapWithChange — only the output mint differs.
Getting devnet SOL
Use the official Solana devnet faucet:https://faucet.solana.com/. Faucets rate-limit at roughly 2 SOL per request.
Getting mock USDC
Cloak runs a public faucet that mints mock USDC straight to any devnet wallet’s associated token account. Two ways to use it:Web UI
Visit devnet.cloak.ag/privacy/faucet, paste a recipient address (or connect a wallet), pick an amount, click send. The faucet creates the recipient’s mock-USDC ATA on demand if it doesn’t exist yet.HTTP API
For scripted or automated flows (CI, integration tests, soak runs), POST directly to/api/faucet:
amount is in 6-decimal mock-USDC base units (100_000_000 = 100 mock USDC). If omitted, the default is 100 mock USDC.
Successful response:
Rate limits
Limits are enforced server-side in-memory per Vercel instance — they reset when the warm container is evicted, so don’t treat them as a hard ceiling. If you need significantly more than the per-day cap for a load test, ask in Discord.
Notes
- Rate limits are scoped to the recipient wallet, not the caller. Spamming from multiple machines doesn’t bypass them.
- Mock USDC only. SOL comes from
https://faucet.solana.com/. - Devnet only — there is no equivalent endpoint on mainnet (mainnet uses real Circle USDC, sourced normally).
Switching to mainnet
When you ship to production, change one line:DEVNET_MOCK_USDC_MINT for Circle USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) and use a mainnet RPC for your Connection. Cloak’s mainnet swapWithChange routes through Jupiter (real liquidity); devnet routes through the Pyth-priced mock path.
Limitations
- Only SOL and mock USDC are supported. No real Circle USDC, no USDT, no other tokens.
- Devnet is reset by Solana Foundation on a periodic basis. Don’t rely on long-lived UTXOs.
- Sanctions screening is disabled on devnet — all addresses pass automatically. On mainnet, deposits are screened against OFAC + Range risk lists.
- Swap is SOL → mock-USDC only. The reverse direction is not yet supported on devnet.
Help
- Discord: https://discord.gg/FmtUrR3a9