Skip to main content

Multi-Chain

This guide covers using ChainContextHandle to operate on multiple blockchains from a single React Native SDK instance.
For an overview of multi-chain concepts, see Multi-Chain Concepts.

Setup

Initialize the parent SDK against your primary chain, then open a chain context for each additional chain:
ChainContextConfig.chainId is a bigint. It and serverUrl are the only fields you have to give: ChainContextConfig.create({...}) fills in the rest, so an omitted contract address is discovered from the server and timeoutMs falls back to the SDK-wide 30s.

Authentication

Each chain context needs to authenticate before it can operate. Authentication shares your privacy keys from the parent SDK but obtains a chain-specific JWT and registration:
ChainContextHandle.authenticate() only takes a WalletDelegate — keySource and tokenProvider come from the parent SDK.

Operations

Once authenticated, a ChainContextHandle exposes the same per-chain operations as the parent SDK:

Deposits

Private Transfers

Withdrawals

Balances

Status polling and history

Cross-Chain Patterns

Parallel Operations

Chain contexts are independent — run operations concurrently:

Multi-Chain Balance Aggregation

Chain Selection

React Hook Pattern

Cleanup

Each chain context can drop its JWT independently while keeping the parent SDK identity intact:

Next Steps