Skip to main content

Builder

POST /v1/builder/register

Register builder public keys with BLS signatures.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/builder/register?publicKeys=0x12345...,0x234134...&signatures=2asdfjghadg,xghlktdhj&ofac=false"

Request

ParameterRequiredTypeDescription
publicKeysYESstringComma-separated list of builder BLS public keys in hex
signaturesYESstringComma-separated list of BLS signatures in hex
ofacNObooleanOFAC flag for the builders (default: false)

Response Body

NameTypeDescription
resultsobject[]Results of builder public key registrations
└ publicKeystringPublic key in the registration
└ resultobjectBuilder Registration Result
└└ resultintegerBuilder Registration Result Code
└└ descriptionstringBuilder Registration Result Description

See Builder Registration Result for result codes.

Error Codes

CodeDescription
INVALID_PUBLIC_KEYInvalid builder public key format
BUILDERS_MAXMaximum 100 builders allowed per request
BUILDER_SIGNATURE_SIZE_NOT_MATCH_PUBLIC_KEYNumber of signatures must match number of public keys

GET /v1/builder/signingMessage

Get the required signing message used to sign the BLS signature with the builder's BLS key.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/builder/signingMessage"

Request

No parameters required.

Response Body

NameTypeDescription
messageobjectSigning message
└ eoaAddressstringEOA address of current user

POST /v1/builder/deregister

Deregister builder public keys from ETHGas.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/builder/deregister?publicKeys=0x12342330def...,0x4a93d70def..."

Request

ParameterRequiredTypeDescription
publicKeysYESstringComma-separated list of builder BLS public keys in hex

Response Body

NameTypeDescription
successbooleanWhether API call is successful or not

Error Codes

CodeDescription
INVALID_PUBLIC_KEYInvalid builder public key format
BUILDERS_MAXMaximum 100 builders allowed per request

GET /v1/p/builders

Retrieve a list of builders and fallback builder key.

curl -X GET "$ETHGAS_API_URL/v1/p/builders"

Request

ParameterRequiredTypeDescription
ofacNObooleanFilter by OFAC status (default: false)

Response Body

NameTypeDescription
buildersobjectList of builder objects
└ whitelistedBuildersobjectList of whitelisted builders accessible by builder name
└ unnamedBuilderslistList of public keys of unnamed builders in hex
└ fallbackBuilderstringPublic key of the ETHGas fallback builder in hex

GET /v1/user/builder

Retrieve a list of builder public keys submitted by the current user.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/builder"

Request

No parameters required.

Response Body

NameTypeDescription
buildersstring[]List of builder BLS keys

POST /v1/user/delegate/builder

Delegate or revoke delegation of builder keys by supplying either a comma-separated list of BLS public keys or a builder name (which applies to all keys under that builder).

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/user/delegate/builder?publicKeys=0x12345...,0x2df345...&enable=true"

Request

ParameterRequiredTypeDescription
publicKeysNOstringComma-separated list of BLS builder public keys in hex
builderNameNOstringBuilder name
enableYESbooleanDelegate or revoke builder delegation

Either publicKeys or builderName must be provided.

Response Body

NameTypeDescription
successbooleanIndicates request status

Error Codes

CodeDescription
SYSTEM_VALIDATIONEither publicKeys or builderName must be provided

Note: User needs to delegate a new builder 2 seconds before the market close in order to be effective in that epoch.


POST /v1/builder/update/ofac

Update OFAC flag for existing builder.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/builder/update/ofac?publicKeys=0x12345...,0x2df345...&ofac=true"

Request

ParameterRequiredTypeDescription
publicKeysNOstringComma-separated list of builder BLS public keys in hex. If not provided, updates all builders for the user
ofacYESbooleanOFAC flag for the builders

Response Body

NameTypeDescription
successbooleanWhether API call is successful or not

GET /v1/user/delegate/builder

Get list of delegated builder keys for the current user.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/delegate/builder"

Request

No parameters required.

Response Body

NameTypeDescription
delegatedBuildersstring[]List of delegated builder keys

GET /v1/p/builder/:slot

Retrieve a list of builders by slot ID.

curl -X GET "$ETHGAS_API_URL/v1/p/builder/123"

Request

ParameterRequiredTypeDescription
slotYESintegerSlot ID to retrieve the builder

Response Body

NameTypeDescription
slotintegerSlot number of the block
buildersstring[]List of available builder keys for the queried slot
fallbackBuilderstringPublic key of the fallback builder in hexadecimal format
ofacbooleanOFAC status for the slot

GET /v1/builder/delegation

Retrieve a list of user addresses of those who have delegated to the current user's builder keys.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/builder/delegation"

Request

No parameters required.

Response Body

NameTypeDescription
builderDelegationsobjectMapping of builder delegations from corresponding builder key registered by the user
└ [builderKey]stringCorresponding builder key registered by the user
└└string[]EOA addresses who delegated to the builder key

POST /v1/builder/bundle/reject/:slot

Reject bundles for a specific slot.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/builder/bundle/reject/123" \
-H "Content-Type: application/json" \
-d '{"rejections":[{"uuid":"bundle-uuid-1","rejectCode":1,"txHashList":["0x123...","0x456..."],"reason":"Bundle rejection reason"}]}'

Request

ParameterRequiredTypeDescription
slotYESintegerSlot ID to reject bundles for

Request Body

NameTypeDescription
rejectionsobject[]List of bundle rejections
└ uuidstringBundle UUID
└ rejectCodeintegerRejection code
└ txHashListstring[]List of transaction hashes
└ reasonstringRejection reason

Response Body

NameTypeDescription
successbooleanWhether API call is successful or not

Error Codes

CodeDescription
INVALID_SLOTInvalid slot ID (must be >= 0)
BUNDLE_REJECTION_EMPTYRejections list cannot be empty

GET /v1/p/builder/bundle/reject/:slot/:builderAccountId

Get bundle rejection information for a specific slot and account.

curl -X GET "$ETHGAS_API_URL/v1/p/builder/bundle/reject/123/456"

Request

ParameterRequiredTypeDescription
slotYESintegerSlot ID to retrieve rejections
builderAccountIdYESintegerBuilder account ID

Response Body

NameTypeDescription
rejectionsobject[]List of bundle rejections
└ uuidstringBundle UUID
└ rejectCodeintegerRejection code
└ txHashListstring[]List of transaction hashes
└ reasonstringRejection reason

Error Codes

CodeDescription
INVALID_SLOTInvalid slot ID (must be > 0)
INVALID_ACCOUNT_IDInvalid account ID (must be > 0)