Skip to main content
@paxoslabs/amplify-sdk@1.0.0 is chain-agnostic. Every method that touches the chain takes a chainId, and the API returns chain-correct contract addresses and calldata. That has three consequences for your app:
  1. Pull the list of supported chains at runtime instead of hard-coding it.
  2. RPC connectivity belongs to your wallet stack (wagmi / viem / Privy / Dynamic), not the SDK.
  3. Switching chains mid-flow is “pass a different chainId to the next call.” There is no client-side state to reset.

Supported chains

Networks the SDK currently serves: The snippet is the source of truth for the docs site. At runtime, derive the set dynamically (see Discovering chains below) — the backend can light up new chains without an SDK release.

Discovering chains

client.amplify.vaults.list returns vault groups, each with a deployments[] array describing every chain a vault is live on:
Filter at the API layer when you only want one chain — it is faster and avoids paginating through deployments you do not care about:
The filter string follows the same shape as every other listing endpoint: comma-separated field=value clauses with optional AND joins. Supported flags: chainId, inDeprecation, requiresKyt.
Don’t ship a hard-coded chain list in your app. Pull it from client.amplify.vaults.list() (and cache for a few minutes) so a new chain coming online doesn’t require a release.

Per-chain RPC belongs to your wallet

The SDK never opens an RPC connection — it speaks HTTP to api.paxoslabs.com. Submitting prepared.transaction to a chain is the wallet’s job, and configuring per-chain RPC URLs is wagmi/viem territory:
That is the only place RPC URLs need to exist in your app.

Same vault, multiple chains

A single vault from client.amplify.vaults.list() uses the same boringVaultAddress across all chains it’s deployed on. Each deployment carries its own accepted assets and configuration:
When you store vault deployments in app state, key them by (boringVaultAddress, chainId). The vault address is consistent across chains, making it a stable identifier:
This also provides stable React keys when rendering cross-chain deployments in a list.

Chain guard before write

Always check the connected wallet’s chain matches the chain you’re preparing for. The SDK happily prepares calldata for any chain — the wallet will broadcast it on whichever network it is connected to, which is rarely what the user wants:
For wagmi-based apps, prefer useSwitchChain to actively switch the wallet before submitting, then re-read the chain id and assert.

Deposit flow on a specific chain

Withdrawal flow on a specific chain

Switching chains mid-flow

Because the SDK keeps no chain state, switching chains is just “pass the new chainId”:
Cancel any in-flight prepare requests for the old chain before you do, so a late response can’t overwrite the new one’s UI:

Listing across chains

Most list* endpoints accept chainId= in the filter and paginate via pageToken:
The same pattern applies to client.amplify.vaults.listAssets, getApys, getTvls, and getSupplyCaps. Filter by chainId server-side when you only need one chain — it’s cheaper than scanning all pages.

Error handling across chains

A common 400 on multi-chain flows is “vault not deployed on chainId” — usually because you cached a deployment list before a new chain came online, or because the user switched chains between discovery and submission. Re-fetch client.amplify.vaults.list({ filter: 'chainId=<id>' }) on chain-switch events.