requestAccount

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

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

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.

Example

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

Parameters

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

Returns

Promise<RequestAccountResult>

A Promise that resolves to a SmartContractAccount instance