**Authors: Sean Sing OKX, Lucas Lim OKX**
# UPDATE IN PROGRESS AS OF JULY 23
# 1. Terminology
| | Terminology | Description |
| -------- | -------- | -------- |
| 1 | Wallet Core | OKX's 7702 product: https://github.com/okx/wallet-core |
| 2 | Relayer | The proposed off-chain service that simulates user intent, validates signed transactions, and submits it to the blockchain. |
# 2. Background
After an EOA upgrades to Wallet Core via EIP-7702, it unlocks powerful smart account capabilities—such as gas sponsorship and the ability to pay gas fees in alternative tokens. However, most dApps are not yet equipped to take full advantage of these features directly as they still require orchestration: collecting user intent, generating signatures, and submitting transactions. This orchestration is typically handled by wallet providers or SDKs allowing developers to integrate smart account features without complex integration work.
To bridge this gap, we designed WalletCore-Relayer architecture, which makes it easy for dApps and wallet providers to tap into smart account features with lowered costs. The architecture is designed such that the relayer takes on the role of both gas sponsorship as well as transaction submission without requiring new protocol infrastructure, custom mempools, or non-standard transaction types.
OKX’s “gas-free” initiative is a strategic priority. **We're currently looking to onboard one or two Relayer partners to support gasless transactions for all OKX Wallet users**. While there's the possibility of operating our own relayer as a fallback, our clear preference is to partner with trusted providers to fulfill this role.
The architecture is designed to allow third-party partners to spin up their own Relayer instances with custom configurations. Third-party partners are free to rewrite, re-optimize, or develop their own relayer implementations, but they must expose the minimum required API endpoints as specified in the Technical Specifications covered in section 6.
[Go to Technical Specifications](#6-Technical-Specifications)
# 3. Transaction Lifecycle
## 3.1 User Flow
1. The dApp prepares transaction calls and prompts the user to sign them via the OKX Wallet Extension.
2. The user selects a relayer based on certain metrics and submits the signed transaction to the chosen relayer.
3. The relayer performs necessary checks, including validating the ERC20 token payment, before forwarding the transaction to the blockchain node.
4. There will be a reverting batch call that may include token transfers to the relayer to cover service fees. The relayer may choose to perform more actions.
5. Subsequent calls in the batch will then be executed in order.

## 3.2 Transaction simulation
When preparing the batch calls that represent the user’s intent, the OKX Wallet Extension can invoke an endpoint to retrieve an estimated total gas cost for the batch transaction, along with a quote for the equivalent amount in the selected payment token. At this stage, the transaction calls do not need to be signed.
The quote for the equivalent amount in payment token is calculated using the price retrieved from OKX's API and the service fee on top of the gas cost. Likewise, these can be configured according to the relayer's needs.
[Go to Section 6.1.1](#6.1.1-Transaction-Simulation)
## 3.3 Transaction execution
After receiving a payment token quote from the relayer, the user can specify the amount they are willing to pay. This amount may be lower than the quoted value, as long as it meets the relayer’s minimum acceptable threshold.
The user will then be prompted to sign the transaction, which includes both the payment transfer to the relayer and the remaining batch calls. The signed calldata is then submitted to the relayer, which performs a final validation of the entire transaction before broadcasting it on-chain.
[Go to Section 6.1.2](#6.1.2-Transaction-Submission)
# 4. Contract Design
To support a secure and reliable relayer-based transaction flow, the contract architecture is designed around three core principles: trusted validation, batch transaction safety, and relayer protection.
## 4.1 Trusted Validation with Secure Validator
All transactions are subjected to a robust validation process handled by a trusted validator contract. This ensures that:
- The user’s intent matches the transaction logic.
- Only correctly formed and authorized transactions proceed to execution.
This validator can be upgraded or customized by third parties if needed, but it must adhere to core validation logic in Wallet Core. The default validator is the ECDSA validator.
## 4.2 Guaranteed Relayer Payment
To ensure relayers are compensated even when a user-supplied transaction fails, the contract design isolates the payment logic so that it cannot revert, while the rest of the batch maintains standard revert behavior.
Specifically:
- Isolated Critical Actions: Operations such as payment token transfers to the relayer and validation state updates are executed in isolation as the first transaction in the batch. If any subsequent user intent call fails, the rest of the batch reverts except for the critical actions. This design ensures that the relayer receives payment regardless of the outcome of the user's batch calls, mitigating economic risk for relayers.
- Transparent Failure Reporting: If a user call fails, its revert reason is bubbled up and made available to the relayer, allowing for accurate error reporting including the specific call index and cause of failure.
## 4.3 Gas and Attack Protection for Relayers
The system includes several mechanisms to protect relayers from malicious activity or unexpected gas consumption:
- Prepayment Enforcement: As described above, there will be a reverting batch call that may include a token transfer or more from the user to the relayer, ensuring that relayers are compensated before executing further calls.
- Simulation and Fee Quoting: Relayers can simulate the batch and provide a quote upfront, ensuring the transaction cost is known before execution. Any reverts found within the user's transactions are also captured and reported during simulation.
- Throttle and Abuse Protection: Optional rate-limiting, signature checks, and access controls can be implemented to guard against spam or denial-of-service attacks.
- Gas-Limited Execution: Transaction executions are capped with a maximum forwarded gas, reducing the risk of gas griefing or unexpected consumption that could lead to denial-of-service or fund depletion.
# 5. Current Status & Third-Party Participation
OKX has successfully completed a Proof of Concept (POC) and now has a working demo showcasing the end-to-end relayer flow for the user flow above (request for demo).
Moving forward, we envision selected third-party teams building and operating their own Relayer that implements support for the key Wallet Core smart account interfaces. These relayers should expose a public API endpoint that the OKX Wallet and its users can call to relay transactions.
The Relayer can include configurable options such as:
- Markup Fee: Optional fee added to gas costs
- Supported Tokens: ERC20 tokens accepted for gas payment
- Supported Chains: Networks the relayer will support
- Access Controls (optional): Rate limits, IP whitelists, etc.
- Support for Wallet Core’s interface
To foster a vibrant ecosystem, one of OKX's long term goals is to launch a shared Relayer Registry, allowing users to discover and compare relayers based on fees, supported chains, and historical performance (akin to Chanlist for RPC providers).
# 6. Technical Specifications
## 6.1 Sequence Diagram
### 6.1.1 Transaction Simulation

### 6.1.2 Transaction Submission

## 6.2 API Specs
Third-party partners must expose the minimum required API endpoints on their Relayer implementation, that is-
1. `POST` Relayer RPC
- `relayer_exchangeRate`
- `relayer_getQuote`
- `relayer_sendTransaction` // token pay or free gas
- `relayer_getCapabilities` // getting relayer config
- `relayer_getStatus`
## 6.3 RPC Specs
`/api/v1/gasless/{chain_id}/rpc`
``` rust
impl EvmRpcMethod {
pub fn from_string(method: &str) -> Option<Self> {
match method {
"relayer_exchangeRate" => Some(EvmRpcMethod::ExchangeRate),
"relayer_getQuote" => Some(EvmRpcMethod::GetQuote),
"relayer_sendTransaction" => Some(EvmRpcMethod::SendTransaction),
"relayer_getCapabilties" => Some(EvmRpcMethod::GetCapabilities),
"relayer_getStatus" => Some(EvmRpcMethod::GetStatus),
_ => None,
}
}
}
```
### 6.3.1 Capability
"capabilities": {
"payment": {
"type" : "erc20",
"token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"signature" : "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" // can be anything, but mainly used for whitelisting purposes
}
### 6.3.2 relayer_exchangeRate
The purpose of this RPC method is to return a quote in ERC20 token given a gas estimate. This is for the use-case of a user desiring to query the cost of their gas estimate without needing to resimulate the transaction calls.
Example request
``` bash
{
"jsonrpc": "2.0",
"method": "relayer_exchangeRate",
"params": {
"gas_estimate" : "45666",
"token_address" : "0xbCF26943C0197d2eE0E5D05c716Be60cc2761508"
},
"id": 2
}
```
| Params | Type | Description | Sample |
|--------|------|-------------|--------|
| gas_estimate | String | Estimated gas value | "45666" |
| token_address | String | MUST be a valid ERC20 token address approved in the config | "0xbCF26943C0197d2eE0E5D05c716Be60cc2761508" |
| Output | Type | Description | Sample |
|--------|------|-------------|--------|
| token_amount_needed | int | Amount of ERC20 token required to pay for the above stated amount of gas | "132" |
Example response
``` json
{
"jsonrpc": "2.0",
"result": {
"fee": {
"amount": 132;
"rate": 3702.23;
"token": {
"decimals": "6";
"address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
"symbol": "USDC";
"name": "USDC";
};
};
"gasPrice": string;
"maxFeePerGas": string;
"maxPriorityFeePerGas": string;
// relayerCalls
"relayerCalls": [{
"to": "0x...",
"data": "0x...",
}],
"relayer_payment_address" : "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
},
"id": 2
}
```
### 6.3.3 relayer_getQuote
Example request
``` json
{
"jsonrpc": "2.0",
"method": "relayer_getQuote",
"params": [
{
"to": "0x55f3a93f544e01ce4378d25e927d7c493b863bd7";
"data": "0x64015e7100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000bcf26943c0197d2ee0e5d05c716be60cc2761508000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb00000000000000000000000055f3a93f544e01ce4378d25e927d7c493b863bd60000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000000000000000000000000000bcf26943c0197d2ee0e5d05c716be60cc2761508000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb00000000000000000000000055f3a93f544e01ce4378d25e927d7c493b863bd6000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000",
"capabilities": {
"payment": {
"type" : "erc20",
"token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
},
"chainId": "0x01",
"authorizationList" : "[[chain_id, address, nonce, y_parity, r, s]]"
}]
"id": 2
}
```
| Params | Type | Description | Sample |
|--------|------|-------------|--------|
| data | String | SHOULD start with function selector of `"0x64015e71"`, the signature of the `simulateExecuteWithRelayer` function on Wallet Core | "0x64015e71..." |
| to | String | MUST be user's EOA address | "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC" |
| Output | Type | Description | Sample |
|--------|------|-------------|--------|
| execution_gas | int | Amount of gas required for execution | 18483 |
| fee.amount | String | Amount of ERC20 token required to pay for the above stated amount of gas | "132" |
| revert_reason | String | Revert reason if exist | "0x87f20438000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000840000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008408c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002645524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
| relayer_payment_address | String | Address of relayer's EOA to transfer to | "0x55f3a93f544e01ce4378d25e927d7c493b863bd6" |
Example response
``` json
{
"jsonrpc": "2.0",
"result": {
"fee": {
"amount": 132;
"rate": 3702.23;
"token": {
"decimals": "6";
"address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
"symbol": "USDC";
"name": "USDC";
};
};
"gasUsed": string;
"gasUsedL1": string;
"gasPrice": string;
"maxFeePerGas": string;
"maxPriorityFeePerGas": string;
// relayerCalls
"relayerCalls": [{
"to": "0x...",
"data": "0x...",
}],
"relayer_payment_address" : "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"execution_gas" : 18483,
"revert_reason" : "0x87f20438000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000840000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008408c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002645524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
},
"id": 2
}
```
### 6.3.4 relayer_sendTransaction
``` json
{
"jsonrpc": "2.0",
"method": "relayer_sendTransaction",
"params": [
{
"to": "0x55f3a93f544e01ce4378d25e927d7c493b863bd7",
"data": "0x29cb0f49000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000bcf26943c0197d2ee0e5d05c716be60cc2761508000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb00000000000000000000000055f3a93f544e01ce4378d25e927d7c493b863bd60000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000000000000000000000000000bcf26943c0197d2ee0e5d05c716be60cc2761508000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb00000000000000000000000055f3a93f544e01ce4378d25e927d7c493b863bd6000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041050023f0bc7c332fb55bbfd5665491e56f2e7a8263b235b491a4ab8379fd383715e24e26ef65ee3de4f9333c79c9f7fa58fd7c44219cc67c3d31c38afc3503191c00000000000000000000000000000000000000000000000000000000000000",
"capabilities": {
"payment": {
"type" : "erc20",
"token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"signature" : "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" // can be anything, but mainly used for whitelisting purposes
},
"chainId": "0x01",
"authorizationList" : "[[chain_id, address, nonce, y_parity, r, s]]"
}]
"id": 2
}
```
| Params | Type | Description | Sample |
|--------|------|-------------|--------|
| data | String | 1. SHOULD start with function selector `0x29cb0f49` (for `executeWithRelayer` function)<br>2. SHOULD conform to the `Call` struct in Wallet Core<br>3. MUST include an ERC20 transfer to the relayer's EOA address as part of the`relayerCall`<br>4. SHOULD match `executeWithRelayer` ABI:<br>• `uint256 executionGas`<br>• `address validator`<br>• `Call[] calldata relayerCalls`<br>• `Call[] calldata calls`<br> • `bytes calldata validationData` | "0x29cb0f49..." |
| to | String | MUST be user's EOA address | "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC" |
| Output | Type | Description | Sample |
|--------|------|-------------|--------|
| id | String | 64 bytes ID from relayer, as described in EIP-5792 | "0x00000000000000000000000000000000000000000000000000000000000000000e670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331" |
Example response
``` json
{
"jsonrpc": "2.0",
"result": {
"id" : " "0x00000000000000000000000000000000000000000000000000000000000000000e670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
"
},
"id": 2
}
```
### 6.3.5 relayer_getCapabilities
Example request
``` json
{
"jsonrpc": "2.0",
"method": "relayer_getCapabilities",
"params": {},
"id": 2
}
```
| Output | Type | Description | Sample |
|--------|------|-------------|--------|
| success | bool | Success value of HTTP call | true |
| data | Json | Information on relayer config | {} |
| data.id | String | ID of the relayer | "sepolia-example" |
| data.name | String | Name of the relayer | "Sepolia Example" |
| data.network | String | Network used by the relayer | "base-sepolia" |
| data.network_type | String | Type of blockchain network | "evm" |
| data.paused | bool | Whether the relayer is paused | true |
| data.policies | Json | Policies in the config file of the relayer | [] |
| data.policies.private_transactions | bool | Whether only private transactions are allowed | false |
| data.policies.fee_percentage | int | Commission percentage charged by the relayer | 10 |
| data.policies.stale_timing | int | Time in seconds before price cache becomes stale | 10 |
| data.policies.allowed_tokens | List of objects | List of allowed ERC tokens and their configuration | [] |
| data.policies.allowed_tokens[].address | String | Address of the ERC token | "0xbCF26943C0197d2eE0E5D05c716Be60cc2761508" |
| data.policies.allowed_tokens[].decimals | int | Decimal precision of the token | 18 |
| data.policies.allowed_tokens[].ticker | String | Ticker used to obtain token price | "ETH-USDC" |
| data.policies.allowed_selectors | List of String | List of 4-byte function selectors in calldata | "fcfbd33a" |
| data.policies.blacklist_receivers | List of String | Blacklisted receiver addresses | ["0x201D848C0f45378b6DED630517A55Ae4D07d4dE6"] |
| data.address | String | Relayer's Externally Owned Address (EOA) | "0x55f3a93f544e01ce4378d25e927d7c493b863bd6" |
| data.system_disabled | bool | Status of the relayer (false = enabled) | false |
Example Response
``` json
{
"success": true,
"data": {
[
1: {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": {
"address": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
"symbol": "USDC",
"decimals": "6"
}
},
8432: {
"feeCollector": "0x55f3a93f544e01ce4378d25e927d7c493b863bd6",
"tokens": {
"address": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
"symbol": "USDC",
"decimals": "6"
}
}
]
},
"error": null
}
```
### 6.3.6 relayer_getStatus
Example request
``` json
{
"jsonrpc": "2.0",
"method": "relayer_getStatus",
"params": {
"id": "0x00000000000000000000000000000000000000000000000000000000000000000e670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
},
"id": 2
}
```
| Params | Type | Description | Sample |
|--------|------|-------------|--------|
| id | String | Transaction id given by the relayer |"0x00000000000000000000000000000000000000000000000000000000000000000e670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"|
Example Response
``` json
{
"jsonrpc": "2.0",
"result": {
"version": "2.0.0",
"chainId": "0x01",
"id": "0x00000000000000000000000000000000000000000000000000000000000000000e670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"status": 200,
"atomic": true,
"receipts": [
{
"logs": [
{
"address": "0xa922b54716264130634d6ff183747a8ead91a40b",
"topics": [
"0x5a2a90727cc9d000dd060b1132a5c977c9702bb3a52afe360c9c22f0e9451a68"
],
"data": "0xabcd"
}
],
"status": "0x1",
"blockHash": "0xf19bbafd9fd0124ec110b848e8de4ab4f62bf60c189524e54213285e7f540d4a",
"blockNumber": "0xabcd",
"gasUsed": "0xdef",
"transactionHash": "0x9b7bb827c2e5e3c1a0a44dc53e573aa0b3af3bd1f9f5ed03071b100bb039eaff"
}
]
},
"id" : 1
}
```
## 6.4 Structs
```
type Payment = {
type: "erc20",
token: "0x...0"
} |
{
type: "sponsored"
} | {
type: "native"
}
```
```
type Request = {
method: 'relayer_exchangeRate',
params:[{
gasEstimate: string,
tokenAddress: string
}]
}
type Response = {
jsonRpc: string;
id: string;
result : {
fee: {
amount: string;
rate: number;
token: {
decimals: number;
address: Address;
symbol?: string;
name?: string;
};
};
gasPrice: string;
maxFeePerGas?: string;
maxPriorityFeePerGas?: string;
relayerCalls?: [{
to: string,
data: string,
}];
relayer_payment_address: string
}
}
```
```
type Request = {
method: 'relayer_sendTransaction',
params: [{
to: string,
data: string,
chainId: string,
capabilities: {
payment: Payment // If non erc20, quote should be in native (e.g ETH) - otherwise in token specified
},
authorizationList?
}],
}
type Response = {
jsonRpc: string;
id: string;
result: {
id: string
}
}
```
```
type Request = {
method: 'relayer_getQuote',
params: [
{
to: string,
data: string,
chainId: string,
capabilities: {
payment: Payment
},
authorizationList?
}
],
}
type Response = {
jsonRpc: string;
id: string;
result : {
fee: {
amount: string;
rate: number;
token: {
decimals: number;
address: Address;
symbol?: string;
name?: string;
};
};
gasUsed: string;
gasUsedL1?: string;
gasPrice: string;
maxFeePerGas?: string;
maxPriorityFeePerGas?: string;
relayerCalls?: [{
to: string,
data: string,
}]
}
}
```
```
type Request = {
method: 'relayer_getCapabilities',
// chainId
params: string[],
}
type Response = {
jsonRpc: string;
id: string;
result : {
[chainId]: {
feeCollector: string,
tokens: {
address: string,
symbol: string,
decimals: string
}[]
}
}
}
}
}
```
# 7. Swagger Spec
```
openapi: 3.0.3
info:
title: Relayer API
version: 1.0.0
description: API spec for Relayer integration
servers:
- url: https://relayer-endpoint.io/api/v1
paths:
/gasless/{chain_id}/rpc:
post:
summary: Relayer RPC
parameters:
- name: chain_id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RpcRequest'
examples:
relayer_exchangeRate:
summary: relayer_exchangeRate
value:
jsonrpc: "2.0"
method: "relayer_exchangeRate"
params:
gas_estimate: "45666"
token_address: "0xbCF26943C0197d2eE0E5D05c716Be60cc2761508"
id: 2
relayer_getQuote:
summary: relayer_getQuote
value:
jsonrpc: "2.0"
method: "relayer_getQuote"
params:
to: "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
data: "0x64015e71..."
chainId: "0x01"
capabilities:
payment:
type: erc20
token: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
authorizationList: "[[chain_id, address, nonce, y_parity, r, s]]"
id: 2
relayer_sendTransaction:
summary: relayer_sendTransaction
value:
jsonrpc: "2.0"
method: "relayer_sendTransaction"
params:
to: "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
data: "0x29cb0f49..."
chainId: "0x01"
capabilities:
payment:
type: erc20
token: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
signature: "0x0000000000000000000000000000000000000000000000000000000000000000"
authorizationList: "[[chain_id, address, nonce, y_parity, r, s]]"
id: 2
relayer_getCapabilities:
summary: relayer_getCapabilities
value:
jsonrpc: "2.0"
method: "relayer_getCapabilities"
params: ["1"]
id: 2
relayer_getStatus:
summary: relayer_getStatus
value:
jsonrpc: "2.0"
method: "relayer_getStatus"
params:
id: "0x0000...7331"
id: 2
responses:
'200':
description: Successful RPC response
content:
application/json:
schema:
$ref: '#/components/schemas/RpcResponse'
examples:
relayer_exchangeRate:
value:
jsonrpc: "2.0"
result:
fee:
amount: "132"
rate: 3702.23
token:
decimals: 6
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
symbol: "USDC"
name: "USDC"
gasPrice: "1000000000"
maxFeePerGas: "1500000000"
maxPriorityFeePerGas: "200000000"
relayerCalls:
- to: "0x..."
data: "0x..."
relayer_payment_address: "0x55f3a93f544e01ce4378d25e927d7c493b863bd6"
id: 2
relayer_getQuote:
value:
jsonrpc: "2.0"
result:
fee:
amount: "132"
rate: 3702.23
token:
decimals: 6
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
symbol: "USDC"
name: "USDC"
gasUsed: "21000"
gasUsedL1: "0"
gasPrice: "1000000000"
maxFeePerGas: "1500000000"
maxPriorityFeePerGas: "200000000"
relayerCalls:
- to: "0x..."
data: "0x..."
relayer_payment_address: "0x55f3a93f544e01ce4378d25e927d7c493b863bd6"
execution_gas: 18483
revert_reason: "0x..."
id: 2
relayer_sendTransaction:
value:
jsonrpc: "2.0"
result:
id: "0xabc123..."
id: 2
relayer_getCapabilities:
value:
jsonrpc: "2.0"
result:
"1":
feeCollector: "0x55f3a93f544e01ce4378d25e927d7c493b863bd6"
tokens:
- address: "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
symbol: "USDC"
decimals: "6"
id: 2
relayer_getStatus:
value:
jsonrpc: "2.0"
result:
version: "2.0.0"
chainId: "0x01"
id: "0x0000...7331"
status: 200
atomic: true
receipts:
- logs:
- address: "0xa922b5..."
topics:
- "0x5a2a90..."
data: "0xabcd"
status: "0x1"
blockHash: "0xf19bba..."
blockNumber: "0xabcd"
gasUsed: "0xdef"
transactionHash: "0x9b7bb8..."
id: 2
components:
schemas:
RpcRequest:
type: object
required: [jsonrpc, method, params, id]
properties:
jsonrpc:
type: string
example: "2.0"
method:
type: string
enum:
- relayer_exchangeRate
- relayer_getQuote
- relayer_sendTransaction
- relayer_getCapabilities
- relayer_getStatus
params:
type: object
example:
gas_estimate: "45666"
token_address: "0xbCF26943C0197d2eE0E5D05c716Be60cc2761508"
id:
type: integer
example: 2
RpcResponse:
type: object
properties:
jsonrpc:
type: string
example: "2.0"
result:
type: object
id:
type: integer
example: 2
ExchangeRateParams:
type: object
required:
- gas_estimate
- token_address
properties:
gas_estimate:
type: string
example: "45666"
description: Estimated gas amount
token_address:
type: string
example: "0xbCF26943C0197d2eE0E5D05c716Be60cc2761508"
description: ERC20 token address used to pay for gas
ExchangeRateResponse:
type: object
properties:
fee:
type: object
required:
- amount
- rate
- token
properties:
amount:
type: string
example: "132"
description: Token amount needed for the estimated gas
rate:
type: number
example: 3702.23
description: Exchange rate between gas and token
token:
type: object
properties:
decimals:
type: integer
example: 6
address:
type: string
example: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
symbol:
type: string
example: "USDC"
name:
type: string
example: "USDC"
gasPrice:
type: string
example: "1000000000"
maxFeePerGas:
type: string
example: "1500000000"
maxPriorityFeePerGas:
type: string
example: "200000000"
relayerCalls:
type: array
items:
type: object
properties:
to:
type: string
example: "0x..."
data:
type: string
example: "0x..."
relayer_payment_address:
type: string
example: "0x55f3a93f544e01ce4378d25e927d7c493b863bd6"
GetQuoteParams:
type: object
properties:
to:
type: string
example: "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"
data:
type: string
example: "0x64015e71..."
chainId:
type: string
example: "0x01"
capabilities:
$ref: '#/components/schemas/Capabilities'
authorizationList:
type: string
example: "[[chain_id, address, nonce, y_parity, r, s]]"
GetQuoteResponse:
type: object
properties:
fee:
type: object
properties:
amount:
type: string
example: "132"
rate:
type: number
example: 3702.23
token:
type: object
properties:
decimals:
type: integer
example: 6
address:
type: string
example: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
symbol:
type: string
example: "USDC"
name:
type: string
example: "USDC"
gasUsed:
type: string
example: "21000"
gasUsedL1:
type: string
gasPrice:
type: string
maxFeePerGas:
type: string
maxPriorityFeePerGas:
type: string
relayerCalls:
type: array
items:
type: object
properties:
to:
type: string
data:
type: string
relayer_payment_address:
type: string
example: "0x55f3a93f544e01ce4378d25e927d7c493b863bd6"
execution_gas:
type: integer
example: 18483
revert_reason:
type: string
SendTransactionParams:
type: object
properties:
to:
type: string
data:
type: string
chainId:
type: string
capabilities:
$ref: '#/components/schemas/Capabilities'
authorizationList:
type: string
SendTransactionResponse:
type: object
properties:
id:
type: string
example: "0x..."
Capabilities:
type: object
properties:
payment:
$ref: '#/components/schemas/Payment'
Payment:
oneOf:
- type: object
properties:
type:
type: string
enum: [erc20]
token:
type: string
signature:
type: string
- type: object
properties:
type:
type: string
enum: [sponsored, native]
GetCapabilitiesParams:
type: array
items:
type: string
GetCapabilitiesResponse:
type: object
additionalProperties:
type: object
properties:
feeCollector:
type: string
tokens:
type: array
items:
type: object
properties:
address:
type: string
symbol:
type: string
decimals:
type: string
GetStatusParams:
type: object
properties:
id:
type: string
GetStatusResponse:
type: object
properties:
version:
type: string
chainId:
type: string
id:
type: string
status:
type: integer
atomic:
type: boolean
receipts:
type: array
items:
type: object
properties:
logs:
type: array
items:
type: object
properties:
address:
type: string
topics:
type: array
items:
type: string
data:
type: string
status:
type: string
blockHash:
type: string
blockNumber:
type: string
gasUsed:
type: string
transactionHash:
type: string
```