Function Signature
fetchWalletMetadata(accountAddress: string): Promise<WalletMetadata>
Description
Returns wallet identity metadata for an account address. Useful for re-identifying a wallet (chain, derivation path, threshold scheme) when you have only the address — for example in admin tooling or read-only audit flows.
This is an identity-only lookup — the returned walletMetadata includes walletId, accountAddress, chainName, derivationPath, and thresholdSignatureScheme, but not externalServerKeySharesBackupInfo or addressType. The backup-pointer metadata is not recoverable from the server via SDK-scoped endpoints.
fetchWalletMetadata is not a lost-cache recovery path for signing or exporting. When you pass caller-supplied externalServerKeyShares into signMessage, signTransaction, signTypedData, exportKey, or exportPrivateKey, the SDK requires walletMetadata.externalServerKeySharesBackupInfo to be present and throws if it is missing. The identity-only metadata returned here will be rejected by those methods. Treat the full walletMetadata from createWalletAccount / importPrivateKey as recovery-critical and persist it from creation.
| Operation | Works with identity-only walletMetadata? |
|---|
signMessage / signTransaction / signTypedData (with caller-supplied externalServerKeyShares) | ❌ No — throws MissingBackupInfoError |
exportKey / exportPrivateKey (with caller-supplied externalServerKeyShares) | ❌ No — throws MissingBackupInfoError |
verifyPassword, refreshWalletAccountShares, reshare, updatePassword | ❌ No — requires the full walletMetadata from creation |
| Re-identifying a wallet (display chain / address type lookup in admin UI) | ✅ Yes |
The recommended path is to persist the full walletMetadata from creation. fetchWalletMetadata is an identification primitive, not a recovery primitive.
Parameters
accountAddress (string) — The wallet’s account address (must include 0x prefix for EVM)
Returns
Promise<WalletMetadata> — Identity-only metadata. externalServerKeySharesBackupInfo and addressType are not populated on this path.
Example
import { authenticatedEvmClient } from './client';
const evmClient = await authenticatedEvmClient();
// Re-identify a wallet by address — e.g. for an admin tool that needs
// to render chain / derivation path next to the address.
const walletMetadata = await evmClient.fetchWalletMetadata(accountAddress);
console.log(walletMetadata.chainName); // "EVM"
console.log(walletMetadata.thresholdSignatureScheme); // ThresholdSignatureScheme.TWO_OF_TWO
// Do NOT attempt to sign or export from this object — those throw
// because externalServerKeySharesBackupInfo is missing:
// await evmClient.signMessage({ walletMetadata, externalServerKeyShares, ... });
// // → MissingBackupInfoError