Skip to main content

Gateway LayerZero API (1.0.0)

Download OpenAPI specification:Download

Tannhauser Gateway LayerZero API

Authentication

bearer

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

auth

Login

Request Body schema: application/json
signature
required
string

Responses

Request samples

Content type
application/json
{
  • "signature": "0x94bf8475ea508b148b3a6df470fbe7460ce8fac2c611e197bcdc56a7da4783f50132dcf71c306a4098d7333fa4d59fbcf31be976d72574a1c8288285d455f4491b"
}

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

transactions

Create a transaction

Authorizations:
Request Body schema: application/json
required
object (TransferDto)
required
object (GatewayAddressDto)
namespace
required
string
amount
required
number
ethTxHash
required
string

Responses

Request samples

Content type
application/json
{
  • "transfer": {
    },
  • "gatewayAddress": {
    },
  • "namespace": "relay.bond",
  • "amount": "0.01",
  • "ethTxHash": "0xafda5e4205b21292df4faa6a70e989a05438d67c8890b35c5d0c765c4a4ad734"
}

Response samples

Content type
application/json
{ }

Update a transaction

Authorizations:
Request Body schema: application/json
status
required
string
ethTxHash
required
string
message
required
string

Responses

Request samples

Content type
application/json
{
  • "status": "confirmed",
  • "ethTxHash": "0xafda5e4205b21292df4faa6a70e989a05438d67c8890b35c5d0c765c4a4ad734",
  • "message": "Unhandled rejection"
}

Response samples

Content type
application/json
{ }

Get a transaction

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "createdAt": "2020-10-16T20:48:18.476Z",
  • "address": "0x000000618E8ea9DcA789ba7978fE67CdD76Efaf0",
  • "type": "deposit",
  • "status": "pending",
  • "transfer": {
    },
  • "namespace": "relay.bond",
  • "amount": "0.01",
  • "ethTxHash": "0xafda5e4205b21292df4faa6a70e989a05438d67c8890b35c5d0c765c4a4ad734"
}

Get transactions count

query Parameters
status
string
Enum: "pending" "confirmed" "canceled" "error"

Responses

Response samples

Content type
application/json
{
  • "counter": 42
}

health check

Readiness check

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "info": {
    },
  • "error": { },
  • "details": {
    }
}

liveness check

Liveness check

Responses

Approve

Swap

Switchboard_getQuote

query Parameters
fromTokenAddress
required
string
Example: fromTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
toTokenAddress
required
string
Example: toTokenAddress=0x0000003568D82BDE01De5Ba740719da6eCa1c8cE

Precomputed address from Sushi factory

amount
required
string
Example: amount=10000000000000000
protocols
string

default: all

fee
string

Ethereum: min: 0; max: 3; LayerZero/Stargate: min: 0; max: 3; default: 0; no greater than quote of swap

gasPrice
string

default: confidence: 99, 95

gasLimit
number

maxGasLimit: 150000000

connectorTokens
any

max: 5; approximate of swap bdfs

complexityLevel
any

min: 0; max: 3; default: 2; Pathfinding parameter

mainRouteParts
any

default: Ethereum: 10, LayerZero/Stargate: 10; max: Ethereum: 50, LayerZero/Stargate: 50 approximate of swap

virtualParts
any

virtual split parts. default: 50; max: 500; approximate of swap

parts
any

split parts. default: Ethereum: 50; LayerZero/Stargate: 40 max: Ethereum: 100; LayerZero/Stargate: 100; approximate of swap

Responses

Response samples

Content type
application/json
{
  • "fromToken": {
    },
  • "toToken": {
    },
  • "toTokenAmount": "string",
  • "fromTokenAmount": "string",
  • "protocols": [
    ],
  • "estimatedGas": 0
}

Switchboard_getSwap

query Parameters
fromTokenAddress
required
string
Example: fromTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE

Ethereum WETH address

toTokenAddress
required
string
Example: toTokenAddress=0x0000003568D82BDE01De5Ba740719da6eCa1c8cE

Precomputed address from Sushi factory

amount
required
string
Example: amount=10000000000000000
fromAddress
required
string

The address that calls the contract

slippage
required
number
Example: slippage=1

min: 0.01; warn: 30, max: 50;

protocols
string

default: all

destReceiver
string

Receiver of destination asset. default: fromAddress

referrerAddress
string

Referring EOA or Contract address. Defaults to Sushi router

fee
string

Ethereum: min: 0; max: 3; LayerZero/Stargate: min: 0; max: 3; default: 0; approximate of swap

gasPrice
string

default: confidence: 99, 95

disableEstimate
boolean

Disable transaction cost estimation

burnLz
boolean

default: false; Check user's balance and allowance before setting this flag; LZ should be approved to spender address

allowPartialFill
boolean

Partially fill orders for Swaps

virtualParts
any

virtual split parts. default: 50; max: 500; approximate of swap

parts
any

split parts. default: Ethereum: 50; LayerZero/Stargate: 40 max: Ethereum: 100; LayerZero/Stargate: 100; approximate of swap

mainRouteParts
any

default: Ethereum: 10, LayerZero/Stargate: 10; max: Ethereum: 50, LayerZero/Stargate: 50 approximate of swap

connectorTokens
any

max: 5; approximate of swap

complexityLevel
any

min: 0; max: 3; default: 2; approximate of swap

gasLimit
number

150000000

Responses

Response samples

Content type
application/json
{
  • "fromToken": {
    },
  • "toToken": {
    },
  • "toTokenAmount": "string",
  • "fromTokenAmount": "string",
  • "protocols": [
    ],
  • "tx": {
    }
}

Protocols

Protocol_getProtocols

Responses

Response samples

Content type
application/json
{
  • "protocols": [
    ]
}

Protocol_getActiveProtocols

Responses

Response samples

Content type
application/json
{
  • "protocols": [
    ]
}

Tokens

ActiveMarketsList_getTokens

Responses

Response samples

Content type
application/json
{
  • "tokens": { }
}

ChainAccessList_getPresets

Responses