✳ Lambatoken / Mobile DocsAUTH 0.7.0 · WALLET 0.2.0
Wallet / 13

Wallet list, selection and management

Distinguish device metadata from server records, local selection from primary wallet.

List and reconcile

Local wallet IDs and backend wallet IDs are different. Local metadata includes backendWalletId after sync. The top-level listWallets returns server records. A server record may exist without keys on this device.

typescript
const local = await sdk.wallet.listWallets();
const remote = await sdk.listWallets();
await sdk.refreshAllWalletMetadataFromBackend();

Switch, rename and set primary

Switching is local selection; setting primary updates the backend. The latter requires a registered local wallet. Refresh the list after changes.

typescript
await sdk.wallet.switchWallet(localWalletId);
await sdk.renameWallet(localWalletId, label);
await sdk.setPrimaryWallet(localWalletId);
const active = await sdk.wallet.getActiveWallet();

Disconnect and remove

Confirm consequences before disconnecting. Preserve local keys by default. Only remove local material after the user verifies an independent backup. Local removal is not the same as disconnecting a backend record.

typescript
await sdk.disconnectWallet(localWalletId, { removeLocal: false, reason });
// Destructive local removal: sdk.wallet.removeWallet(localWalletId)

Export secrets

The wallet manager invokes local device authentication before export. Do not put secrets on the clipboard, in logs, screenshots or application caches. Local device authentication is not Central Auth PIN or MFA.

typescript
const exported = await sdk.wallet.exportWallet(localWalletId);
// Secure one-time display of exported.secret; clear immediately afterward.