Skip to main content
WalletMetadata describes a wallet’s non-sensitive identity and backup-pointer state. It is returned alongside externalServerKeyShares from wallet-creation methods and must be passed as an explicit argument to every subsequent sign, export, backup, refresh, reshare, and password operation. The Node SDK is stateless — it does not hold wallet state between calls. Persist walletMetadata in a cache (Redis, Postgres, etc.) and externalServerKeyShares in a secrets vault (HSM, KMS-wrapped DB column, Secret Manager). See Storage Best Practices for the recommended split.

Interface Definition

Properties

Required Properties

  • walletId (string) — Unique identifier for the wallet
  • accountAddress (string) — The wallet’s account address
  • chainName (string) — SDK-internal chain name (EVM, SVM, BTC, TON)
  • thresholdSignatureScheme (ThresholdSignatureScheme) — The threshold signature scheme used for this wallet

Optional Properties

  • derivationPath (string) — Derivation path for the wallet (e.g. EVM uses a BIP-44 path; encoded as a JSON object)
  • addressType (string) — Bitcoin address type (taproot or native_segwit). Required for BTC operations; absent for other chains.
  • externalServerKeySharesBackupInfo (KeyShareBackupInfo) — Per-share pointer metadata describing where each share is backed up. Required for signMessage, signTransaction, signTypedData, exportKey, exportPrivateKey, password verification, share recovery, refreshWalletAccountShares, reshare, and updatePassword whenever you pass caller-held externalServerKeyShares. Operations that need it throw a descriptive error when it’s missing. Caching the full walletMetadata returned from createWalletAccount() / importPrivateKey() ensures you have it.

How to obtain WalletMetadata

There are two paths to obtain a walletMetadata value, with different completeness guarantees: The recommended flow is to persist the full walletMetadata from creation. The backup-pointer metadata (externalServerKeySharesBackupInfo) is not recoverable via SDK-scoped endpoints — there is no server-side fallback if you lose it.
fetchWalletMetadata(accountAddress) is not a recovery path for signing or exporting. It returns identity only (no externalServerKeySharesBackupInfo, no addressType). signMessage, signTransaction, signTypedData, exportKey, and exportPrivateKey all throw when called with caller-supplied externalServerKeyShares and a walletMetadata that lacks externalServerKeySharesBackupInfo. If you lose the cached object, you cannot sign — only re-identify.

Example

Updating cached walletMetadata after mutating operations

updatePassword, refreshWalletAccountShares, and reshare all return a new backupInfo reflecting the new backup state. You must merge it into your cached walletMetadata — otherwise the next operation reads stale metadata and either silently misbehaves or surfaces a “stale walletMetadata” error.
Last modified on May 21, 2026