transact call submitted to the Soroban PrivacyPoolsContract. The guide targets integrators — developers building end-user applications on top of the Arcane privacy layer.
Prerequisites
Before you begin, make sure you have the following:- Node.js
>=19or a browser environment with the Web Crypto API (crypto.subtle) available. - A Stellar wallet with a funded testnet account. You will need the account’s Stellar address and the ability to sign arbitrary messages and Soroban transactions.
- A deployed
PrivacyPoolsContractaddress on Stellar testnet. The contract must have been initialized with a Groth16 verification key, commitment tree depth, and public slot configuration that match your circuit assets. - Circuit assets — the WASM binary (
privacy_pool_bg.wasm), circuit WASM (circuit.wasm), and proving key (circuit_final.zkey) that correspond to your deployed contract’s verification key.
If you do not have a deployed contract yet, follow the Integration Guide first. It covers contract deployment, Arcane registry setup, and scanner configuration.
Steps
Install the SDK
Install the Arcane client SDK from npm. The package ships the proof-generation WASM and TypeScript types together.
Initialize the SDK
Before calling any SDK method you must load the WASM binary and circuit assets. Fetch or import them as
Uint8Array buffers and pass them to PrivacyPoolSDK.init.PrivacyPoolSDK.init is asynchronous — it compiles the WASM module before returning. Call it once at application startup and reuse the returned instance throughout the session.Generate a stealth address
Stealth addresses decouple a user’s public Stellar identity from their on-chain shielded activity. To derive one, ask the user’s wallet to sign a deterministic message produced by the SDK, then pass the signature back to generate the address.
Build a coin and generate a proof
A coin is the SDK’s representation of a private UTXO. For a deposit you build a new output coin with
generateCoin, then call proveTransaction (or proveWithdrawal for withdrawals) to produce the Groth16 proof and public signals. Refer to the TypeScript types exported by the SDK for the exact argument shapes of each method.Submit the transact call
With the serialized proof and public signals ready, prepare the encrypted audit payload and ask the wallet to sign and submit After a successful call,
PrivacyPoolsContract.transact.PrivacyPoolsContract verifies the proof on-chain, updates the commitment tree and nullifier set, moves tokens, and emits an AuditEncodedDigest event. The Arcane scanner will pick up that event in the next scan cycle and make the interpreted transaction record available through the Auditing Portal.The contract will reject the transaction if the proof is invalid, the nullifier has already been spent, or the Merkle root is not in the contract’s root history. Double-check your witness inputs if you receive a verification failure.
Next steps
You have submitted your first private transaction with Arcane. From here you can explore the full integration surface, understand the underlying cryptography, or set up compliance access for your team.Integration Guide
Deploy the contract, configure the Arcane registry and scanner, and verify your end-to-end integration with the full checklist.
Cryptography Reference
Dive into the Groth16 circuit design, commitment and nullifier schemes, stealth address derivation, and ECDH audit encoding.
Auditor Guide
Learn how compliance teams request scoped disclosure cases, review transaction data, and generate audit reports through the Arcane portal.