getActiveAddress()
Othent JS SDK getActiveAddress() function
API
getActiveAddress(): Promise<B64UrlString | "">;return Promise<B64UrlString | "">
return Promise<B64UrlString | "">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 address:
const address = await othent.getActiveAddress();
console.log(`Your wallet address is ${ address }.`);Last updated