function sendCalls(client, params): Promise<{}>;Defined in: packages/wallet-apis/src/actions/sendCalls.ts:56
Prepares, signs, and submits calls. This function internally calls prepareCalls, signPreparedCalls, and sendPreparedCalls.
The client defaults to using EIP-7702 with the signer's address, so you can call
this directly without first calling requestAccount.
// Send calls (uses signer address via EIP-7702 by default)
const result = await client.sendCalls({
calls: [
{
to: "0x1234...",
data: "0xabcdef...",
value: 0n,
},
],
capabilities: {
paymaster: { policyId: "your-policy-id" },
},
});
// The result contains the call ID
console.log(result.id);<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>
| Parameter | Type | Description |
|---|---|---|
|
| The wallet API client to use for the request |
|
| Parameters for sending calls |
Promise<{
}>
A Promise that resolves to the result containing the call ID.