> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloak.ag/llms.txt
> Use this file to discover all available pages before exploring further.

# Developer FAQ

> Short answers to the questions integrators ask most

> [accordion] Is there a devnet or testnet?
>
> No. Cloak is deployed on Solana mainnet only, and the published SDK cannot be pointed at another
> cluster. Test with small amounts: the smallest SOL deposit is 0.01 SOL and the smallest USDC or
> USDT deposit is 1. See [Network and RPC](https://docs.cloak.ag/resources/network-and-rpc.md).

> [accordion] Is there a Rust SDK?
>
> No. `@cloak.dev/sdk` (TypeScript) is the only client SDK. It runs in browsers and in Node.js, so
> a backend in another language can call a small Node service that wraps it. See
> [Backend integration](https://docs.cloak.ag/sdk/backend-integration.md).

> [accordion] Can my on-chain program call Cloak through CPI?
>
> No. The Shield Pool program rejects its tree-appending instructions when they are invoked through
> CPI (`CpiNotAllowed`, `0x10D8`). Integrate at the client or backend level instead. See
> [Custom program integration](https://docs.cloak.ag/sdk/custom-programs.md).

> [accordion] Should I use createCloak or the low-level functions?
>
> Start with [`createCloak`](https://docs.cloak.ag/sdk/create-cloak). It handles notes, fees, storage and resumption.
> Use the [low-level API](https://docs.cloak.ag/sdk/low-level-api.md) for private swaps, your own note storage, batch
> signing, or full control over proofs and submission.

> [accordion] Does the user need SOL?
>
> Only to shield from a Solana wallet, which the wallet signs and pays for. Private sends,
> withdrawals and swaps are submitted for the user and need no SOL in the user's wallet.

> [accordion] How many wallet prompts does a user see?
>
> With `createCloak`: the account message is signed twice the first time a wallet is seen on a
> device and once on later sessions, then one transaction approval per shield from that wallet. Sends and withdrawals do not prompt. With the low-level
> API, each submitted request carries a signed sender, so the wallet signs a message per request.
> See [Request authentication](https://docs.cloak.ag/sdk/request-authentication.md#how-many-wallet-prompts-to-expect).

> [accordion] Which wallets work?
>
> Wallet Standard wallets (Phantom, Solflare, Backpack and others), the Solana wallet adapter,
> Privy wallets, EVM wallets for cross-chain shields, server-held keys and custom signers. A wallet
> must be able to sign the same message the same way twice to open an account from its signature.
> See [Wallet integrations](https://docs.cloak.ag/wallets/overview.md).

> [accordion] How long does a proof take?
>
> It depends on the device. The first proof in a page load also downloads and verifies about
> 23 MB of circuit files. Warm them on mount with `verifyAllCircuits(getCircuitsPath())`, and show
> progress with `onProgress`. See [Events and callbacks](https://docs.cloak.ag/reference/events-and-callbacks.md).

> [accordion] What fees does Cloak charge?
>
> Only the on-chain program charges a fee, and only when value leaves a pool: withdrawals, swaps
> and sends to other networks. Shields and private sends carry no protocol fee. Fees are stored
> per pool on chain. See [Fees](https://docs.cloak.ag/concepts/fees.md).

> [accordion] What happens if the user loses their device?
>
> With `createCloak`, the account's keys come back from the same wallet signature on any device.
> The notes live in the SDK's `storage`. Deposits and the change from withdrawals and swaps can be
> rebuilt by a scan with the account's viewing key, but change from a send needs its amount, and
> notes built by older clients cannot be rebuilt at all. Back the notes up with `cloak.notes()` and
> `encryptToSave` so a new device does not depend on a scan. See
> [Notes and balances](https://docs.cloak.ag/concepts/notes-and-balances.md).

> [accordion] Can Cloak freeze or recover funds?
>
> No custodial path exists in the program: Cloak can't spend, seize, or recover funds. Withdrawals need
> an authorization from Cloak's relay, which Cloak can decline under its sanctions policy. The program's
> upgrade authority is a
> 2-of-3 Squads multisig with a 1-hour time lock. See [Security considerations](https://docs.cloak.ag/resources/security.md).

> [accordion] Can I point the SDK at my own endpoint or self-host?
>
> No. The Cloak endpoint and the circuits origin are fixed when the package is built. Your Solana
> RPC is entirely your choice.

> [accordion] Can I earn from the transactions my app makes?
>
> Approved partners pass an `affiliateCode` and earn commission on fee-bearing transactions. See
> [Earn with the SDK](https://docs.cloak.ag/affiliates/sdk-integration.md).

Still stuck? See [Troubleshooting](https://docs.cloak.ag/resources/troubleshooting.md), or ask in
[Telegram](https://t.me/cloak_community).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.