Prerequisites
- An opened
createCloakobject. See Quickstart. - The token in the wallet, plus a little SOL for the network fee.
- At least the pool minimum: 0.01 SOL, or 1 USDC or USDT.
Shield from a Solana wallet
What onProgress reports
A shield from Solana reports steps such as Validating transaction parameters...,
Generating ZK proof..., Waiting for wallet signature..., Sending transaction... and
Confirming transaction.... The first shield of a page load also reports
Downloading circuit files (n of m MB).... Treat the text as display only; it is not an API.
See Events and callbacks.
Shield from another chain
Pass an EVM or Sui wallet tocreateCloak, then name the chain:
Quote first
Common errors
With the low-level API
A deposit istransact with a zero input note and a positive externalAmount. Build the output with
createRecoverableDepositUtxo and pass its salt as chainNoteSalt. The full example is in
Low-level API.