sendPreparedCalls

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

Defined in: account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts:48

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

Example

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

ParameterTypeDescription

client

InnerWalletApiClient

The wallet API client to use for the request

params

SendPreparedCallsParams

Parameters for sending prepared calls

Returns

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

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