Skip to main content

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:
  1. Parent SDK (PrivacyBoost) — initialized once with your primary chain. Holds your identity keys.
  2. Chain clients (ChainClient) — created per chain via sdk.forChain(). Each has its own server connection, JWT, and chain state, but shares the parent’s identity.
This means you authenticate once per chain, but your privacy address is consistent across all of them.

Quick Example

ChainClient Configuration

Only serverUrl is required. All other fields are auto-discovered from the chain’s server /api/v1/info endpoint.

Caching

Chain clients are cached by serverUrl. Calling sdk.forChain() with the same URL returns the same instance:
This means you can call sdk.forChain() 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

A ChainClient provides the same core operations as the parent SDK:

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