getWalletNames()
Othent JS SDK getWalletNames() function
API
getWalletNames(): Promise<Record<B64UrlString, string>>;return Promise<Record<B64UrlString, string>>
return Promise<Record<B64UrlString, string>>Example usage
import { Othent } from "@othent/kms";
const othent = new Othent({ appInfo, throwErrors: false, ... });
// Make sure the user is authenticated, or prompt them to authenticate:
await othent.requireAuth();
// Obtain the user's wallet names from:
const walletNames = await othent.getWalletNames();
// Obtain the user's active wallet address:
const activeAddress = await othent.getActiveAddress();
console.log(`Your active wallet's nickname is ${ walletNames[activeAddress] }.`);Last updated