Multi-Chain
The Android SDK currently does not expose a native chain-context API —PrivacyBoost is initialized against a single chain via its config. Multi-chain support exists in the underlying Rust core and is exposed today on the TypeScript, React Native, and Web/WASM SDKs.
For an architectural overview of how multi-chain identity works, see Multi-Chain Concepts. The same identity keys and privacy address apply across chains regardless of which SDK creates them.
Single-Chain Setup
Pick a chain at SDK init time:chainId.
Multiple SDK Instances (Workaround)
If you need to operate on more than one chain in a single app session, you can instantiate onePrivacyBoost per chain. Each instance keeps its own JWT and chain state, but you must authenticate each one separately.
Caveats
- Persistence collisions. Both instances will try to read/write the same Keystore entries if you pass
persistenceStorage/persistenceUnlock. Either leave persistence off (null) on the secondary instances, or use distinctappIds — but distinct app IDs mean distinct identities, which defeats the multi-chain story. - Re-derivation per chain. Each instance derives keys via the wallet signature and re-issues a JWT, so the user signs once per chain.
- No cross-instance state. Pending transactions, balances, and history are siloed per instance — your app code must aggregate.
- No proper resource sharing. The multi-chain
ChainContextAPI on TS/RN/Web shares one identity and only multiplexes the chain JWT; with multiple Android SDK instances you pay the full proving / state init cost on each one.
Operating per Chain
Once authenticated, the API surface is identical across instances:Parallel Operations
Use coroutines to fan out:Aggregating Balances
Roadmap
A nativeChainContextHandle for Android — mirroring the React Native and TypeScript surfaces — is planned. When available, it will replace the multi-instance workaround with a single SDK instance that multiplexes JWTs and shares identity keys.