OthentKMS getActiveAddress() function

The getActiveAddress() function returns the Arweave wallet address associated with the active user account. The wallet address is derived from the corresponding public key.

Example Usage

To use the getActiveAddress() function, import it from the @othent/kms package and call it within an asynchronous function as follows:

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

const handleGetActiveAddress = async () => {
  const res = await getActiveAddress();
  console.log(res);
};

<aside> ⚠️ Note: A user must be logged in to an application to successfully call this function.

</aside>

Result

On successful execution, the function returns the wallet address of the connected user as follows:

"DUMI1f8xahdOebdoUu0-v2yGY4EjUayLEidGZnwYVDs"

Applications can then either display this address within their UI or use it as part of other operations.