Skip to main content

Mainnet only

Cloak is deployed on Solana mainnet and nowhere else. There is no devnet, testnet or local deployment, and the published SDK cannot be pointed at one: its endpoints are fixed when the package is built. Test with small amounts on mainnet.

Your Solana RPC

Cloak hosts no Solana RPC. You bring a mainnet endpoint from any provider and the SDK talks to it directly. Cloak never inspects, replaces or proxies it.
What to know about the endpoint:
  • Use a dedicated endpoint for anything beyond a demo. If you omit rpc, createCloak falls back to the public mainnet endpoint, which is rate-limited.
  • Loopback endpoints are refused. A published build throws on a localhost or 127.0.0.1 RPC, because a production artifact talking to a local validator is always a mistake.
  • Keep the URL server-side if it carries an API key. In a browser app, either expose a key-restricted endpoint, or proxy RPC through your own route and pass that route’s URL. Do not ship a secret key in a NEXT_PUBLIC_ variable.
  • Scanning is RPC-heavy. Transaction history (scanTransactions) reads program transactions page by page. Give it an endpoint with generous limits, and pass limit and the resume options to scan incrementally.

The endpoints the SDK reaches

A strict Content-Security-Policy needs all of them:
If the circuits origin is blocked, the failure surfaces inside proof generation as a failed fetch naming the artifact URL. The line that names your policy is in the browser console. Cross-chain shields and sends also reach the routes those calls use. See Cross-chain.

Warming the circuits

The first proof of a page load downloads and verifies the circuits bundle. Start the download when your page mounts, so the user’s first action does not wait on it:
Verified bytes are kept in memory for the life of the page.

relayUrl in the low-level API

The low-level functions take a relayUrl option on every call. Pass the exported constant:
There is no default, and the SDK reads no environment variable for it. Any value off the build’s allowlist throws locally before anything is signed. createCloak takes no endpoint option. Details in Request authentication.