Multi-Chain
Privacy Boost supports operating across multiple EVM-compatible blockchains from a single SDK instance. Your cryptographic identity (keys) is shared across all chains, while each chain maintains its own authentication state, balances, and transaction history.How It Works
The multi-chain architecture has two layers:- Parent SDK (
PrivacyBoost) — initialized once with your primary chain. Holds your identity keys. - Chain clients (
ChainClient) — created per chain viasdk.chain(). Each has its own server connection, JWT, and chain state, but shares the parent’s identity.
Quick Example
ChainClient Configuration
OnlyindexerUrl is required. All other fields are auto-discovered from the chain’s indexer /api/v1/info endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
indexerUrl | string | Yes | URL of this chain’s indexer/server |
chainId | number | No | EVM chain ID (auto-discovered) |
shieldContract | string | No | Shield contract address (auto-discovered) |
wethContract | string | No | WETH contract address (for ETH wrapping) |
rpcUrl | string | No | RPC URL for on-chain reads |
tokenRegistryAddress | string | No | Token registry contract (auto-discovered) |
teePublicKey | string | No | TEE public key (auto-discovered) |
Caching
Chain clients are cached byindexerUrl. Calling sdk.chain() with the same URL returns the same instance:
sdk.chain() freely in components or functions without worrying about creating duplicate clients.
Per-Chain Authentication
Each chain client must be authenticated independently. The authentication uses shared identity keys from the parent SDK, but obtains a separate JWT for each chain’s server.Available Operations
AChainClient provides the same core operations as the parent SDK:
| Resource | Operations |
|---|---|
vault | deposit(), withdraw(), send(), getBalance(), getAllBalances() |
transactions | Transaction history and status polling |
audit | Auditor-specific operations |
Identity Lookup
Look up a user’s privacy address on a specific chain:Cleanup
Chain clients are disposed automatically when the parent SDK is disposed. You can also dispose individual clients:Next Steps
TypeScript Multi-Chain Guide
Detailed TypeScript examples and patterns
React Multi-Chain Guide
React hooks and component patterns for multi-chain
Configuration
SDK configuration and auto-discovery
Authentication
Authentication methods and wallet integration