Skip to content

wallet_sendCalls

Requests that a wallet submits a batch of calls.

Example Usage

provider.request({
  method: 'wallet_sendCalls',
  params: [{
    version: '1.0',
    chainId: '0x01',
    from: '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
    calls: [
      {
        to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
        value: '0x9184e72a',
        data: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
      },
      {
        to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
        value: '0x182183',
        data: '0xfbadbaf01'
      }
    ],
    capabilities: {
      // Illustrative
      paymasterService: {
        url: 'https://...'
      }
    }
  }]
})
'0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331'

Parameters

An array with a single object that contains the following fields:

  • version

    • string
    • The version of the sendCalls API to use. Currently, '1.0' is the only version.
  • chainId

    • Hex
    • The chain ID to send the calls on. This is top level because all calls must be submitted on the same chain.
  • from

    • Address
    • The address to send the calls from. This is top level because all calls must be submitted by the same address.
  • calls

    • Call[]
    • The calls to submit. A Call is defined as an object that has the following fields:
      • to (optional)
        • Address
        • The address to send this call to. This field is optional because a call can be a contract creation.
      • value (optional)
        • Hex
        • Value in wei to send with this call.
      • data
        • Hex
        • The hash of the invoked method signature and encoded parameters OR the compiled code of a contract.
  • capabilities

    • Object
    • An object where the keys are the names of capaiblities and the values conform to a shape defined by the capability specification.

Returns

  • [string]

A call bundle identifier. This identifier is only meant to be used with the wallet_getCallsStatus and wallet_showCallsStatus RPC methods, so apps should not assume that this string is a transaction hash or any other specific type of identifier.