Skip to main content

wallet_sendCalls

Requests that the wallet submits a batch of calls. This method allows applications to send multiple transactions atomically or sequentially.

Parameters

version(string)required

The version of the API format. Must be "2.0.0".

id(string)

The ID of the batch of calls for tracking purposes.

from(string)required

The sender's address. Pattern: ^0x[0-9a-fA-F]{40}$

chainId(string)required

EIP-155 chain ID of the calls. Must match the currently selected network in the wallet. Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

atomicRequired(boolean)required

true to require atomic execution. If false, the wallet may execute sequentially without atomicity.

calls(array)required

Array of call objects to execute.

capabilities(object)

Used by dapps to communicate supported capabilities to the wallet.

Returns

An object containing information about the sent batch, including transaction details and status.

Errors

CodeDescription
-32602

Invalid request format

-32000

API version not supported

4001

User denied the transaction

4100

Authorization required

5700

Missing capability

5710

Chain not supported

5720

Duplicate batch ID

5740

Batch size limit exceeded

5750

Upgrade rejected

Example request
await provider.request({
method: "wallet_sendCalls",
params: [{
"version": "2.0.0",
"from": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"chainId": "0xaa36a7",
"atomicRequired": true,
"calls": [
{
"to": "0x54f1C1965B355e1AB9ec3465616136be35bb5Ff7",
"value": "0x0"
},
{
"to": "0x2D48e6f5Ae053e4E918d2be53570961D880905F2",
"value": "0x0"
}
]
}]
});
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"batchId": "0x123...",
"status": "pending"
}
}