Othent
  • 👋Welcome to Othent
  • 🥪JS SDK
    • Getting Started
    • Events
    • Error Handling
    • Binary Data Types Utils
    • TypeScript Types
    • Config Constants
  • 🥪JS SDK API
    • constructor()
    • startTabSynching()
    • completeConnectionAfterRedirect()
    • connect()
    • disconnect()
    • requireAuth()
    • isAuthenticated
    • getActiveAddress()
    • getActivePublicKey()
    • getAllAddresses()
    • getWalletNames()
    • getUserDetails()
    • getSyncActiveAddress()
    • getSyncActivePublicKey()
    • getSyncAllAddresses()
    • getSyncWalletNames()
    • getSyncUserDetails()
    • sign() (transaction)
    • dispatch() (transaction)
    • encrypt()
    • decrypt()
    • signature()
    • signDataItem()
    • signMessage()
    • verifyMessage()
    • privateHash()
    • walletName
    • walletVersion
    • config
    • getArweaveConfig()
    • getPermissions()
  • Demos
    • 🍏SDK playground / demo
    • 🍏SDK playground / demo GitHub
    • 🍎File upload app example
    • 🍎File upload app example GitHub
  • 📚External libraries
    • arweave-js
    • Arweave Wallet Kit
  • Additional Links
    • 🌐Othent.io
    • 🌐Discord
    • 🌐GitHub
    • 🌐X
Powered by GitBook
On this page
  • API
  • return Promise<B64UrlString[]>
  • Example usage
  1. JS SDK API

getAllAddresses()

Othent JS SDK getAllAddresses() function

Returns an array of Arweave wallet addresses associated with the active (authenticated) user account.

Othent does not currently support creating/storing more than one wallet associated to the same account, so this function will always return exactly one wallet address.

API

getAllAddresses(): Promise<B64UrlString[]>;

return Promise<B64UrlString[]>

A Promise with an array of all wallet addresses of the active (authenticated) user, or an empty Array if the user is no authenticated.

Example usage

import { Othent } from "@othent/kms";

const othent = new Othent({ ... });

// Make sure the user is authenticated, or prompt them to authenticate:
await othent.requireAuth();

// Obtain the user's wallet addresses:
const addresses = await othent.getAllAddresses();

console.log(`Your wallet addresses are ${ addresses.join(', ') }.`);
PreviousgetActivePublicKey()NextgetWalletNames()

Last updated 8 months ago

🥪