This guide shows the shortest source-backed path to a first successful private transaction. Use it to confirm that your backend can create or restore a managed wallet, scan private state, shield funds, and reconcile the result with your product state.

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.
See Testnet Setup for environment setup.

Step 1: Start a backend session

The frontend connects the user’s external Solana wallet and sends owner_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.
FieldPurpose
owner_wallet_public_keyExternal Solana wallet identity
managed_public_keyBackend-managed public key, usually the active stealth deposit public key
private_key_base58Backend-managed Solana private key; use KMS or HSM in production
proof_signature_base58Stable proof authority signature used for UTXO derivation
stealth_deposit_indexDeposit address offset
Return only public context to the frontend.

Step 3: Initialize scan state

Create arcane_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, call depositWithRelayer. 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, call getMyUtxos 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.