Skip to main content

API Reference

Overview

The Atlas Bundler API provides JSON-RPC methods for submitting and managing operation bundles.

JSON RPC Methods

atlas_acquireBundler

This method reserves a bundler. This is useful when a specific bundler needs to be enforced for a dApp operation. If no particular bundler needs to be enforced, the caller can proceed to call the atlas_sendBundle method directly, where any available bundler will be assigned.

warning

The reservation lasts 5 seconds. After this delay, the reserved bundler will be released, and the reservation ID cancelled.

Parameters

TypeDescription
stringThe targeted chain ID, hex encoded (starting with "0x").

Returns

TypeDescription
BundlerReservationThe bundler reservation details map (see below).

BundlerReservation

NameTypeDescription
transactorstringThe address of the reserved bundler.
reservationIdstringThe reservation ID, to be passed to atlas_sendBundle.

Example Request

{
"jsonrpc": "2.0",
"id": 1,
"method": "atlas_acquireBundler",
"params": ["0xaa36a7"]
}

Example Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactor": "0x1234567890123456789012345678901234567890",
"reservationId": "0123456789-0123456789"
}
}

atlas_sendBundle

Sends a bundle of operations for bundling.

Parameters

TypeDescription
BundleRequestThe bundle request details map (see below).

BundleRequest

NameTypeDescription
chainIdstringThe targeted chain ID, hex encoded (starting with "0x").
atlasVersionstringThe Atlas version to be used.
userOperationmapThe user operation, all fields hex encoded (starting with "0x").
solverOperations[]mapAn array of solver operations, all fields hex encoded (starting with "0x").
dAppOperationmapThe dApp operation, all fields hex encoded (starting with "0x").
requestOptionsmapOptional object with options (see below). Defaults to empty.

RequestOptions

NameTypeDescription
strictUserOperationGasPricebooleanForces the bundler to use the same gas price as the user operation. Defaults to false.
gasRefundBeneficiarystringAddress of the gas refund beneficiary, if different from the bundler itself (available from Atlas >= v1.2).
skipSimulationbooleanDisable bundler simulations. Defaults to false.
abortOnNotWonSimulationbooleanAbort the request if the auction is deemed not won during simulations. Defaults to false.
addSurchargeValuebooleanAdd surcharge value to the metacall. Defaults to false.
reservationIdstringBundler reservation ID. Defaults to empty (no reservation).

Returns

TypeDescription
stringThe resulting transaction raw encoded (starting with 0x).

Example Request

{
"jsonrpc": "2.0",
"id": 1,
"method": "atlas_sendBundle",
"params": [{
"chainId": "0xaa36a7",
"atlasVersion": "1.3",
"userOperation": {...},
"solverOperations": [{...}, {...}],
"dAppOperation": {...},
"requestOptions": {
"strictUserOperationGasPrice": false,
"gasRefundBeneficiary": "0x1234567890123456789012345678901234567890",
"skipSimulation": false,
"abortOnNotWonSimulation": false,
"addSurchargeValue": false,
"reservationId": "0123456789-0123456789"
}
}]
}

Example Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
}