sendPreparedCalls

Sends prepared calls by submitting a signed user operation. This method is used after signing the signature request returned from prepareCalls.

Import

1import { sendPreparedCalls } from "@account-kit/wallet-client";

Usage

1// First prepare the calls
2const preparedCalls = await client.prepareCalls({
3 calls: [
4 {
5 to: "0x1234...",
6 data: "0xabcdef...",
7 value: "0x0",
8 },
9 ],
10 capabilities: {
11 paymasterService: { policyId: "your-policy-id" },
12 },
13});
14
15// Then sign the calls
16const signedCalls = await client.signPreparedCalls(preparedCalls);
17
18// Then send the prepared calls with the signature
19const result = await client.sendPreparedCalls({
20 signedCalls,
21});

Parameters

client

InnerWalletApiClient

  • The wallet API client to use for the request

params

SendPreparedCallsParams

  • Parameters for sending prepared calls

Returns

Promise<SendPreparedCallsResult> A Promise that resolves to the result containing the prepared call IDs