getAddress

Asynchronously retrieves addresses from the inner object and returns the first address after applying the getAddress function.

Import

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

Usage

1import { WalletClientSigner } from "@aa-sdk/core";
2import { createWalletClient, custom } from "viem";
3import { mainnet } from "viem/chains";
4
5const client = createWalletClient({
6 chain: mainnet,
7 transport: custom(window.ethereum!),
8});
9
10const signer = new WalletClientSigner(client, "wallet");
11console.log(await signer.getAddress());

Returns

Promise<string> A promise that resolves to the first address after being processed by the getAddress function.