> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# fetchWalletMetadata

> Recovers wallet identity metadata by account address — for the lost-cache recovery path

## Function Signature

```typescript theme={"system"}
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`. The backup-pointer metadata is **not recoverable from the server via SDK-scoped endpoints**.

<Warning>
  **`fetchWalletMetadata` is not a lost-cache recovery path for signing or exporting.** When you pass caller-supplied `externalServerKeyShares` into `signMessage`, `signTransaction`, `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.
</Warning>

| Operation                                                                          | Works with identity-only `walletMetadata`?              |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------- |
| `signMessage` / `signTransaction` (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 / derivation path 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

## Returns

* **`Promise<WalletMetadata>`** — Identity-only metadata.

## Example

```typescript theme={"system"}
import { authenticatedSvmClient } from './client';

const svmClient = await authenticatedSvmClient();

// 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 svmClient.fetchWalletMetadata(accountAddress);

console.log(walletMetadata.chainName);              // "SVM"
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 svmClient.signMessage({ walletMetadata, externalServerKeyShares, ... });
//   // → MissingBackupInfoError
```

## Related

* [`WalletMetadata`](/node/reference/types/wallet-metadata) - The metadata object passed to every operation
* [`createWalletAccount()`](/node/reference/svm/create-wallet-account) - The canonical source of complete `walletMetadata`
* [Storage Best Practices](/node/wallets/server-wallets/storage-best-practices) - Persist the full `walletMetadata` to avoid this fallback
