Skip to content

getAddress

Returns the address of the inner object in a specific hexadecimal format.

Import

import { LocalAccountSigner } from "@aa-sdk/core";

Usage

import { LocalAccountSigner } from "@aa-sdk/core";
import { generatePrivateKey } from "viem";
 
const signer = LocalAccountSigner.mnemonicToAccountSigner(generatePrivateKey());
const address = await signer.getAddress();

Returns

Promise<Hex> A promise that resolves to the address in the format 0x{string}