OpenZeppelin Relayer API (0.1.0)

Download OpenAPI specification:

OpenZeppelin Relayer API

Relayers

Relayers are the core components of the OpenZeppelin Relayer API. They are responsible for executing transactions on behalf of users and providing a secure and reliable way to interact with the blockchain.

Relayer routes implementation

Note: OpenAPI documentation for these endpoints can be found in the openapi.rs file

Lists all relayers with pagination support.

Authorizations:
bearer_auth
query Parameters
page
integer >= 0

Page number for pagination (starts at 1)

per_page
integer >= 0

Number of items per page (default: 10)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Retrieves details of a specific relayer by ID.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Updates a relayer's information based on the provided update request.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Request Body schema: application/json
required
paused
boolean

Responses

Request samples

Content type
application/json
{
  • "paused": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Retrieves the balance of a specific relayer.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Performs a JSON-RPC call using the specified relayer.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Request Body schema: application/json
required

JSON-RPC request with method and parameters

One of
One of
method
required
string
Value: "feeEstimate"
required
object (FeeEstimateRequestParams)
null or (JsonRpcId (JsonRpcId (string) or JsonRpcId (integer)))
jsonrpc
required
string

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "jsonrpc": "2.0",
  • "method": "feeEstimate",
  • "params": {
    }
}

Response samples

Content type
application/json
{
  • "error": {
    },
  • "id": "string",
  • "jsonrpc": "string",
  • "result": {
    }
}

Signs data using the specified relayer.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Request Body schema: application/json
required
message
required
string

Responses

Request samples

Content type
application/json
{
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Signs typed data using the specified relayer.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Request Body schema: application/json
required
domain_separator
required
string
hash_struct_message
required
string

Responses

Request samples

Content type
application/json
{
  • "domain_separator": "string",
  • "hash_struct_message": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Fetches the current status of a specific relayer.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Sends a transaction through the specified relayer.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Request Body schema: application/json
required
One of
data
string
gas_limit
required
integer <int64> >= 0
gas_price
integer >= 0
max_fee_per_gas
integer >= 0
max_priority_fee_per_gas
integer >= 0
speed
string (Speed)
Enum: "fastest" "fast" "average" "safeLow"
to
string
valid_until
string
value
required
integer <u128> >= 0

Responses

Request samples

Content type
application/json
Example
{
  • "data": "string",
  • "gas_limit": 0,
  • "gas_price": 0,
  • "max_fee_per_gas": 0,
  • "max_priority_fee_per_gas": 0,
  • "speed": "fastest",
  • "to": "string",
  • "valid_until": "string",
  • "value": 0
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Lists all transactions for a specific relayer with pagination.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

query Parameters
page
integer >= 0

Page number for pagination (starts at 1)

per_page
integer >= 0

Number of items per page (default: 10)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Retrieves a transaction by its nonce value.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

nonce
required
integer >= 0

The nonce of the transaction

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Deletes all pending transactions for a specific relayer.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Retrieves a specific transaction by its ID.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

transaction_id
required
string

The unique identifier of the transaction

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Replaces a specific transaction with a new one.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

transaction_id
required
string

The unique identifier of the transaction

Request Body schema: application/json
required
One of
data
string
gas_limit
required
integer <int64> >= 0
gas_price
integer >= 0
max_fee_per_gas
integer >= 0
max_priority_fee_per_gas
integer >= 0
speed
string (Speed)
Enum: "fastest" "fast" "average" "safeLow"
to
string
valid_until
string
value
required
integer <u128> >= 0

Responses

Request samples

Content type
application/json
Example
{
  • "data": "string",
  • "gas_limit": 0,
  • "gas_price": 0,
  • "max_fee_per_gas": 0,
  • "max_priority_fee_per_gas": 0,
  • "speed": "fastest",
  • "to": "string",
  • "valid_until": "string",
  • "value": 0
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Cancels a specific transaction by its ID.

Authorizations:
bearer_auth
path Parameters
relayer_id
required
string

The unique identifier of the relayer

transaction_id
required
string

The unique identifier of the transaction

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Plugins

Plugins are TypeScript functions that can be used to extend the OpenZeppelin Relayer API functionality.

Calls a plugin method.

Authorizations:
bearer_auth
path Parameters
plugin_id
required
string

The unique identifier of the plugin

Request Body schema: application/json
required
params
required
any

Plugin parameters

Responses

Request samples

Content type
application/json
{
  • "params": null
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "pagination": {
    },
  • "success": true
}

Metrics

Metrics are responsible for showing the metrics related to the relayers.

Triggers an update of system metrics and returns the result in plain text format.

Returns

An HttpResponse containing the updated metrics in plain text, or an error message if the update fails.

Responses

Metrics routes implementation

Note: OpenAPI documentation for these endpoints can be found in the openapi.rs file Returns a list of all available metric names in JSON format.

Returns

An HttpResponse containing a JSON array of metric names.

Responses

Response samples

Content type
application/json
[
  • "string"
]

Returns the details of a specific metric in plain text format.

Parameters

  • path: The name of the metric to retrieve details for.

Returns

An HttpResponse containing the metric details in plain text, or a 404 error if the metric is not found.

Authorizations:
bearer_auth
path Parameters
metric_name
required
string

Name of the metric to retrieve, e.g. utopia_transactions_total

Responses

Health

Health is responsible for showing the health of the relayers.

Health routes implementation

Note: OpenAPI documentation for these endpoints can be found in the openapi.rs file Handles the /health endpoint.

Returns an HttpResponse with a status of 200 OK and a body of "OK".

Responses