Skip to content
Alchemy Logo

sendCalls

function sendCalls<TAccount>(client, signer, params): Promise<{}>;

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

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>

const result = await client.sendCalls({
  calls: [
    {
      to: "0x1234...",
      data: "0xabcdef...",
      value: "0x0",
    },
  ],
  capabilities: {
    paymasterService: { policyId: "your-policy-id" },
  },
});
 
// The result contains the call ID
console.log(result.id);

Type ParameterDefault type

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

undefined | `0x${string}`

ParameterTypeDescription

client

InnerWalletApiClient

The wallet API client to use for the request

signer

SmartWalletSigner

The signer to use

params

SendCallsParams<TAccount>

Parameters for sending calls

Promise<{ }>

A Promise that resolves to the result containing the call ID.

Was this page helpful?