Skip to main content

API Reference

Overview

The Atlas Operations Relay API provides JSON-RPC http and websocket endpoints, respectively for Atlas auctioneers and solvers.

Auctioneers access the http endpoint to submit user operations for propagation to the solver network, and to collect solver operations.

Solvers access the websocket endpoint to stream new user operations and submit their solutions.

Solver JSON RPC Methods

solver_subscribe

This method subscribes to a particular topic. Notification messages are sent following a successful subscription.

info

Currently, only the userOperations topic is available.

Parameters

TypeDescription
stringThe subscription topic.

Returns

TypeDescription
stringA unique subscription ID that will be referenced in every notification messages.

Notification

note

Notification data is located at params.result, see an example notification in the below section.

TypeDescription
AuctionDataThe new auction data map (see below).

AuctionData

NameTypeDescription
auction_idstringThe unique ID for this auction.
partial_user_operationPartialUserOperationThe partial user operation map (see below).

PartialUserOperation

NameTypeDescription
chainIdstringThe chain ID, hex encoded.
userOpHashstringThe user operation hash.
tostringThe user operation to field.
gasstringThe user operation gas field, hex encoded.
maxFeePerGasstringThe user operation maxFeePerGas field, hex encoded.
deadlinestringThe user operation deadline field, hex encoded.
dappstringThe user operation dapp field.
controlstringThe user operation control field.
hints[]stringAn array of hint addresses (optional).
fromstringThe user oepration from field (optional).
valuestringThe user operation value field, hex encoded (optional).
datastringThe user operation data field (optional).
warning

The fields hints and (from, value, data) are mutually exclusive. Only one or the other can be present.

Example Request

{
"jsonrpc": "2.0",
"id": 1,
"method": "solver_subscribe",
"params": ["userOperations"]
}

Example Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "5ed17bf8-ed27-4625-97ef-447554594a3c"
}

Example Notification

{
"jsonrpc": "2.0",
"method": "solver_subscription",
"params": {
"subscription": "5ed17bf8-ed27-4625-97ef-447554594a3c",
"result" : {
"auction_id": "1bc9a4ce-4fcf-4eb1-8632-959e2273953e",
"partial_user_operation": {...}
}
}
}

solver_submitSolverOperation

Submits a solution to the operations-relay.

Parameters

TypeDescription
SolutionDataThe solution data map (see below).

SolutionData

NameTypeDescription
auction_idstringThe unique auction ID, received with the user operation notification.
auction_solutionSolverOperationThe SolverOperation data map (see below).

SolverOperation

NameTypeDescription
fromstringSolver from field.
tostringSolver to field.
valuestringSolver value field, hex encoded.
gasstringSolver gas field, hex encoded.
maxFeePerGasstringSolver maxFeePerGas field, hex encoded.
deadlinestringSolver deadline field, hex encoded.
solverstringSolver solver field.
controlstringSolver control field.
userOpHashstringSolver userOpHash field.
bidTokenstringSolver bidToken field.
bidAmountstringSolver bidAmount field, hex encoded.
datastringSolver data field.
signaturestringSolver signature field.

Returns

An empty result on success.

Example Request

{
"jsonrpc": "2.0",
"id": 1,
"method": "solver_submitSolverOperation",
"params": [{
"auction_id": "1bc9a4ce-4fcf-4eb1-8632-959e2273953e",
"auction_solution": {...}
}]
}

Example Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "null"
}
info

Empty result is expected on successfull submission.

Auctioneer JSON RPC Methods

relay_userOperation

Submit a UserOperation to the relay for propogation to the solver network.

Parameters

NameTypeDescription
userOperationUserOperationPartialThe UserOperation to submit.

Returns

TypeDescription
auctionIdThe auction ID of the resultant auction.
auctionSecretAn auth secret for retrieving solver operations submitted for this auction.

Example

{
"jsonrpc": "2.0",
"id": 1,
"method": "relay_userOperation",
"params": [
{
"chainId": "0x2105",
"userOpHash": "0x21d03d618fa4fb9166ae91f199b774b64390b8bf6ecdd2ae4637096e7b60e5e3",
"to": "0xb25BdDC2180cF83B3ECb1eDE074a177c9C7Acc5f",
"gas": "0x4e20",
"maxFeePerGas": "0x4c4b40",
"deadline": "0x19d8c75",
"dapp": "0x43b4aae0f98fc9ebd86a1e9496cdb9d7208ee55b",
"control": "0x43b4aae0f98fc9ebd86a1e9496cdb9d7208ee55b",
"value": "0x0",
"data": "0x1ad6fbc3",
"from": "0xfc8b8974fc3adb8281a6c4c38d7cc895769a8568",
}
]
}

Example Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"auctionId": "abcd12-345678-901234",
"auctionSecret": "12042c-123456-789012"
}
}

relay_solverOperations

Retrieve SolverOperations for a given auction.

Parameters

NameTypeDescription
auctionIdstringThe auction ID of the auction to retrieve solver operations for.
auctionSecretstringThe auth secret for the auction.

Returns

TypeDescription
solverOperationsSolverOperationRaw[]

Example

{
"jsonrpc": "2.0",
"id": 1,
"method": "relay_solverOperations",
"params": ["abcd12-345678-901234", "12042c-123456-789012"]
}

Example Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
[
{
"from": "0xfc8b8974fc3adb8281a6c4c38d7cc895769a8568",
"to": "0xb25BdDC2180cF83B3ECb1eDE074a177c9C7Acc5f",
"value": "0x0",
"gas": "0x4e20",
"maxFeePerGas": "0x4c4b40",
"deadline": "0x19d8c75",
"solver": "0x1234567890123456789012345678901234567890",
"control": "0x43b4aae0f98fc9ebd86a1e9496cdb9d7208ee55b",
"userOpHash": "0x21d03d618fa4fb9166ae91f199b774b64390b8bf6ecdd2ae4637096e7b60e5e3",
"bidToken": "0x43b4aae0f98fc9ebd86a1e9496cdb9d7208ee55b",
"bidAmount": "0x10",
"data": "0x1ad6fbc311223344",
"signature": "0x1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
}
]
}
}