sendCalls

1function sendCalls<TAccount>(
2 client,
3 signer,
4 params,
5): Promise<{
6 preparedCallIds: `0x${string}`[];
7}>;

Defined in: account-kit/wallet-client/src/client/actions/sendCalls.ts:52

Prepares, signs, and submits calls. This function internally calls prepareCalls, signPreparedCalls, and sendPreparedCalls.

<Note> If using this action with an ERC-20 paymaster in pre-operation mode with autoPermit, the contents of the permit will be hidden from the user. It is recommended to use the prepareCalls action instead to manually handle the permit signature. </Note>

Example

1const result = await client.sendCalls({
2 calls: [
3 {
4 to: "0x1234...",
5 data: "0xabcdef...",
6 value: "0x0",
7 },
8 ],
9 capabilities: {
10 paymasterService: { policyId: "your-policy-id" },
11 },
12});
13
14// The result contains the prepared call IDs
15console.log(result.preparedCallIds);

Type Parameters

Type ParameterDefault type

TAccount extends undefined | `0x${string}`

undefined | `0x${string}`

Parameters

ParameterTypeDescription

client

InnerWalletApiClient

The wallet API client to use for the request

signer

SmartAccountSigner

The signer to use

params

SendCallsParams<TAccount>

Parameters for sending calls

Returns

Promise<{ preparedCallIds: `0x${string}`[]; }>

A Promise that resolves to the result containing the prepared call IDs.