Skip to content
Docs

Client: accounts and chains

Derivation paths and path slots

Default HD paths, pathSlots metadata, and create-time FamilyPaths overrides.

Overview

HD paths come from the @gray3/core catalog. pathSlots (1 | 2 | 3) tells advanced UIs how many segments are editable after locked purpose + coin type.

account.path

js
account.path(chainOrFamily)
FieldRequiredDescription
chainOrFamilyYes`GrayChainId | ChainFamily` — same resolution as `address`.

Response: string BIP-32 path, or "" for watch-only.

js
account.path("evm")     // → "m/44'/60'/0'/0/0"
account.path("solana")  // → "m/44'/501'/0'/0'"

defaultPath

js
defaultPath(chainId, index)
FieldRequiredDescription
chainIdYes`GrayChainId`
indexYes`number` — account / address index

Response: string

js
defaultPath("ethereum", 0)  // → "m/44'/60'/0'/0/0"
defaultPath("solana", 0)    // → "m/44'/501'/0'/0'"
defaultPath("near", 0)      // → "m/44'/397'/0'"
defaultPath("polkadot", 0)  // → "//0"
defaultPath("monero", 0)    // "m/44'/128'/0'/0/0" (Cake Wallet-compatible BIP-39)
defaultPath("bitcoin", 0)   // → "m/84'/0'/0'/0/0"

Custom paths on create / import

Pass paths with keys from FAMILY_PATH_KEYS: use evm once (never ethereum / base). UTXO coins use per-coin keys—not paths.utxo. Customized families stay on account 0. Accounts added with addAccount() use the default paths.

js
await client.wallets.create({
  paths: {
    evm: "m/44'/60'/0'/0/0",
    bitcoin: "m/84'/0'/0'/0/0",
    bitcoin_taproot: "m/86'/0'/0'/0/0",
    solana: "m/44'/501'/0'/0'",
  },
  password: pin,
});

pathSlots

js
import { pathSlotsForFamily } from "@gray3/core";
pathSlotsForFamily("solana"); // 2
pathSlotsForFamily("evm");    // 3
pathSlotsForFamily("near");   // 1

Full tables: How to read the catalog.

Throws

FieldRequiredDescription
invalid_argumentNo`paths.utxo` or individual EVM chain ids in `paths` keys.