Skip to content
Docs

Multi-chain wallets

How a Gray3 wallet works

Keys live on the device with @gray3/client, and chain data comes from the Gray3 Cloud API.

Why multi-chain is hard

Every chain family has its own address format, derivation path, fee model, transaction format, and indexing service. Supporting Ethereum, Solana, and Bitcoin directly usually means three key-management code paths and three data integrations before you build any product features. Gray3 handles those differences so your wallet code stays the same for every chain.

Architecture

A Gray3 wallet has three parts:

  1. The device runs @gray3/client, which generates the recovery phrase, derives addresses, and signs transactions. @gray3/keystore encrypts wallet secrets with the user's password and stores them on the device.
  2. Your backend holds the project secret key and calls the Gray3 Cloud API, either over HTTPS or with @gray3/cloud. It never receives private keys.
  3. The Gray3 Cloud API returns balances, history, prices, fee estimates, and unsigned transactions, and broadcasts transactions after they are signed.

Chains and chain families

Chains are grouped into families such as EVM, Solana, and Bitcoin. Chains in the same family share an address: one EVM account has the same address on Ethereum, Base, Polygon, and Arbitrum. Each account in a wallet derives one address per enabled chain, so a single account can hold assets on every supported network. The live catalog for your project is returned by GET /v1/chains, and the full list is in the Chain ID reference.

The steps in this guide

  1. Create a wallet and derive addresses
  2. Show balances and activity
  3. Send a transaction
  4. Test and ship to production