Before you begin
You need:- Arcane Solana SDK source or private package access.
- A backend that can store wallet rows, scan progress, decoded UTXOs, encrypted outputs, and operation history.
- A Solana RPC endpoint.
- Arcane indexer, relayer, Light RPC, and circuit configuration.
- A test amount of SOL or a supported test asset.
Step 1: Start a backend session
The frontend connects the user’s external Solana wallet and sendsowner_wallet_public_key to your backend.
Your backend uses that value as the owner scope. It should not restore a “latest wallet” in a multi-user production flow.
Step 2: Create or restore the wallet row
If the owner has no wallet row, your backend creates one.| Field | Purpose |
|---|---|
owner_wallet_public_key | External Solana wallet identity |
managed_public_key | Backend-managed public key, usually the active stealth deposit public key |
private_key_base58 | Backend-managed Solana private key; use KMS or HSM in production |
proof_signature_base58 | Stable proof authority signature used for UTXO derivation |
stealth_deposit_index | Deposit address offset |
Step 3: Initialize scan state
Createarcane_utxo_scan_state for the owner wallet.
For a new user, initialize from the current Arcane API total and set start_at_current=true. This avoids scanning unrelated historical commitments.
Step 4: Display the deposit address
Show the active stealth SOL deposit address to the user. Your product can attach its own product reference, such as a card funding session id, but that reference stays in your backend.Step 5: Check public funding and shield
After the user sends funds, your backend checks the stealth deposit address through Solana RPC. When funds are available, calldepositWithRelayer. The SDK creates private output UTXOs, generates the proof, builds the Arcane transaction, and submits through the relayer.
Record a shield_deposit_submitted history event with the returned signature and timing metadata.
Step 6: Scan private balance
After shielding, callgetMyUtxos with server-side storage scoped by owner_wallet_public_key.
Persist:
- Decoded UTXOs.
- Encrypted outputs.
- Scan progress.
- User-visible history.
Step 7: Reconcile the product result
Mark the product action ready only after the chain transaction is confirmed and the private state is indexed. For card funding, link the card funding session to:- The public funding transaction.
- The shield transaction signature.
- The scan state that made the private balance available.
Next guides
Private payments integration guide
Implement the full backend-managed wallet pattern.
Private card funding
Apply the pattern to a card funding product flow.