Skip to content
Alchemy Logo

requestAccount

function requestAccount(client, signer, params?): Promise<RequestAccountResult>;

Defined in: account-kit/wallet-client/src/client/actions/requestAccount.ts:45

Requests an account for the provided signer using the wallet API client. If an account already exists for the signer, it will always return that account unless a new ID is specified. If an account already exists, the creationHint will be ignored.

// Request an account with default parameters using a local signer
const signer = LocalAccountSigner.privateKeyToAccountSigner("0x...");
const account = await client.requestAccount(signer);

ParameterTypeDescription

client

InnerWalletApiClient

The wallet API client to use for the request

signer

SmartWalletSigner

The signer that will be associated with the account

params?

RequestAccountParams

Optional parameters for requesting a specific account

Promise<RequestAccountResult>

A Promise that resolves to a SmartContractAccount instance

Was this page helpful?