Overview
Offline and Cloud-backed modes
Keys and signing stay local; balances and prepare/broadcast use Cloud or your RPC.
Overview
Wallet SDKs run entirely on the device (or your backend process). They do not call the Gray3 Cloud API by themselves. You choose how much of the product works offline and how much uses the Cloud API.
What works offline
- Create / import / watch wallets and HD accounts
- Derive addresses and paths; validate / detect paste formats
- Sign messages and prepared payloads (keys never leave the vault)
- Encode ERC-20 / NFT calldata and build local contract intents
- Persist wallets via @gray3/keystore
What needs Cloud (or your RPC)
- Portfolio, activity, prices, NFTs, DeFi, gas — Cloud API
- Call
transactions.prepare, sign on the device withsignPreparedTransaction, then calltransactions.broadcast - Monero view-key sync through the Cloud daemon proxy. On Node.js, pass
gray.monero.syncConnection()to the wallet. Its headers contain your secret key, so browser apps route sync through your own backend instead.
Memory-only client
js
const client = await GrayClient.create(); // no storage — session only
const wallet = await client.wallets.create({ label: "Ephemeral" });Without storage, wallets vanish when the process exits. Add keystore when you need reopen across launches—see Initialize the client.
Recommended split
js
// Device / trusted server — secrets
const client = await GrayClient.create({ storage: keystore });
const signed = await account.signPreparedTransaction(prepared);
// Your backend — project secret
const prepared = await gray.transactions.prepare({ kind: "transfer", … });
await gray.transactions.broadcast({ chainId, signedPayload: signed.signedPayload });