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
Type | Description |
---|---|
string | The targeted chain ID, hex encoded (starting with "0x"). |
Returns
Type | Description |
---|---|
BundlerReservation | The bundler reservation details map (see below). |
BundlerReservation
Name | Type | Description |
---|---|---|
transactor | string | The address of the reserved bundler. |
reservationId | string | The 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
Type | Description |
---|---|
BundleRequest | The bundle request details map (see below). |
BundleRequest
Name | Type | Description |
---|---|---|
chainId | string | The targeted chain ID, hex encoded (starting with "0x"). |
atlasVersion | string | The Atlas version to be used. |
userOperation | map | The user operation, all fields hex encoded (starting with "0x"). |
solverOperations | []map | An array of solver operations, all fields hex encoded (starting with "0x"). |
dAppOperation | map | The dApp operation, all fields hex encoded (starting with "0x"). |
requestOptions | map | Optional object with options (see below). Defaults to empty. |
RequestOptions
Name | Type | Description |
---|---|---|
strictUserOperationGasPrice | boolean | Forces the bundler to use the same gas price as the user operation. Defaults to false. |
gasRefundBeneficiary | string | Address of the gas refund beneficiary, if different from the bundler itself (available from Atlas >= v1.2). |
skipSimulation | boolean | Disable bundler simulations. Defaults to false. |
abortOnNotWonSimulation | boolean | Abort the request if the auction is deemed not won during simulations. Defaults to false. |
addSurchargeValue | boolean | Add surcharge value to the metacall. Defaults to false. |
reservationId | string | Bundler reservation ID. Defaults to empty (no reservation). |
Returns
Type | Description |
---|---|
string | The 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"
}