Skip to content
Alchemy Logo

requestAccount

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

Defined in: packages/wallet-apis/src/actions/requestAccount.ts:53

Requests a smart account address for the provided signer using the wallet API client.

Note: This is only needed for non-EIP-7702 accounts. The client defaults to using EIP-7702 with the signer's address, so you can call prepareCalls or sendCalls directly without first calling requestAccount.

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 a non-7702 smart account
const account = await client.requestAccount();

ParameterTypeDescription

client

InnerWalletApiClient

The wallet API client to use for the request

params?

any

Optional parameters for requesting a specific account

Promise<RequestAccountResult>

A Promise that resolves to an object containing a smart account address

Was this page helpful?