Skip to content
Docs

Client: wallets

Watch-only wallet

Track an address without secrets; Monero throws unsupported_capability.

Overview

Creates a kind: "watch" wallet that can derive / display addresses but cannot sign or export keys. Monero is not supported—address alone cannot read balance (needs view-key sync).

Signature

js
await client.wallets.watch(options)

Parameters

WatchWalletOptions

FieldRequiredDescription
addressYes`string` — address to watch.
familyYes`"evm"` covers all EVM. Not `"monero"`.
chainIdNo`GrayChainId` — required when `family !== "evm"` (e.g. `solana`, `litecoin`).
labelNo`string` — UI name.
passwordNo`string` — keystore PIN when storage is encrypted (persists meta).

Response

Promise<Wallet> — kind: "watch"

ts
{
  id: string;
  label: string;
  kind: "watch";
  // account.address(…) works; sign* / export* throw
}

Usage

js
await client.wallets.watch({
  address: "0x…",
  family: "evm",
  label: "Watch",
  password: pin,
});

await client.wallets.watch({
  address: "7weV…",
  family: "solana",
  chainId: "solana",
  password: pin,
});

const d = detectAddress(input);
const m = d.matches[0];
if (m?.family === "monero") {
  // Do not watch — import mnemonic/PK + sync instead
} else if (m) {
  await client.wallets.watch({
    address: d.normalized ?? d.address,
    family: m.family,
    ...(m.family !== "evm" ? { chainId: m.chainIds[0] } : {}),
    password: pin,
  });
}

Throws

FieldRequiredDescription
unsupported_capabilityNoFamily `"monero"` — watch-only is not supported. Use create / importMnemonic / importPrivateKey, then `account.monero.sync()`.
conflictNoAddress already present on those chains (any wallet kind).
invalid_argumentNoAddress invalid for family/chain, or missing chainId.
unauthorizedNoEncrypted storage — bad or missing PIN.