Relay

Execute Relay Transaction

POST https://gateway-relay.herokuapp.com/api/relay/execute

Headers

Name
Type
Description

Authorization*

jwt token

received via authenticating with the auth endpoints. To learn more about the authentication flow, click here.

Request Body

Name
Type
Description

keyManagerAddress*

string

address of the keymanager that controls the UP of the user sending this relay transaction

transaction.abi*

string

the encoded ABI of the transaction being sent

transaction.signature*

string

the transaction signature, signed by someone who has CALL and TRANSFER permissions to the UP involved in sending the transaction

transaction.nonce*

number

the nonce of the keymanager contract

Example 201 Response
{
    transactionHash: '0x8fe07e8d16e284386de85b5d42883c1f7c6dfbee2047c69b4a60117466087053'
}

Get User Credit Quota

POST https://gateway-relay.herokuapp.com/api/relay/quota

Headers

Name
Type
Description

Authorization*

jwt token

received via authenticating with the auth endpoints. To learn more about the authentication flow, click here.

Request Body

Name
Type
Description

address*

string

UP address associated with the user in question

timestamp*

integer

timestamp of when the request is being sent +/- 5 seconds

signature*

string

a message signed by a controller key with SIGN permission on the user's UP

Example 200 Response
{
    quota: 100, //describes current credit amount
    unit: 'credits',
    totalQuota: 100, //will be 0 if user is not subscribed
    resetDate: 1664380478 //will be -1 if user is not subscribed
}

Get Transaction Status

POST https://gateway-relay.herokuapp.com/api/relay/transactionStatus

Headers

Name
Type
Description

Authorization*

jwt token

received via authenticating with the auth endpoints. To learn more about the authentication flow, click here.

Request Body

Name
Type
Description

transactionHash*

string

the transaction hash associated with the transaction whose status is being received

Example 200 Response
{
    status: 'Success',
    transactionSenderAddress: 0x218C2BbaaBa0D66ddcD5De942Ed2980Bbfd1f004,
    creditsUsed: 2.1,
    creditsBefore: 7.1,
    creditsAfter: 5
}

Last updated