Gateway LayerZero API (1.0.0)
Download OpenAPI specification:Download
Tannhauser Gateway LayerZero API
Request samples
- Payload
{- "signature": "0x94bf8475ea508b148b3a6df470fbe7460ce8fac2c611e197bcdc56a7da4783f50132dcf71c306a4098d7333fa4d59fbcf31be976d72574a1c8288285d455f4491b"
}
Response samples
- 201
{- "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
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
- Payload
{- "transfer": {
- "ethAddress": "0x000000618E8ea9DcA789ba7978fE67CdD76Efaf0",
- "asset": "FOLD",
- "to": "ETH",
- "nonce": "0xd2549e0a95762fcc2b8a1bbf9bd081c12a8e6e783d1dad238d95cad26a65ee46af"
}, - "gatewayAddress": {
- "address": "relay.bond",
- "params": "0x000000F2869469220b6c2EdFF2d685bd5e74f784=="
}, - "namespace": "relay.bond",
- "amount": "0.01",
- "ethTxHash": "0xafda5e4205b21292df4faa6a70e989a05438d67c8890b35c5d0c765c4a4ad734"
}
Response samples
- 201
{ }
Update a transaction
Authorizations:
Request Body schema: application/json
status required | string |
ethTxHash required | string |
message required | string |
Responses
Request samples
- Payload
{- "status": "confirmed",
- "ethTxHash": "0xafda5e4205b21292df4faa6a70e989a05438d67c8890b35c5d0c765c4a4ad734",
- "message": "Unhandled rejection"
}
Response samples
- 200
{ }
Response samples
- 200
{- "createdAt": "2020-10-16T20:48:18.476Z",
- "address": "0x000000618E8ea9DcA789ba7978fE67CdD76Efaf0",
- "type": "deposit",
- "status": "pending",
- "transfer": {
- "ethAddress": "0x000000618E8ea9DcA789ba7978fE67CdD76Efaf0",
- "asset": "FOLD",
- "to": "ETH",
- "nonce": "0xd2549e0a95762fcc2b8a1bbf9bd081c12a8e6e783d1dad238d95cad26a65ee46af"
}, - "namespace": "relay.bond",
- "amount": "0.01",
- "ethTxHash": "0xafda5e4205b21292df4faa6a70e989a05438d67c8890b35c5d0c765c4a4ad734"
}
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
- 200
{- "fromToken": {
- "address": "string",
- "symbol": "string",
- "name": "string",
- "decimals": 0,
- "logoURI": "string"
}, - "toToken": {
- "address": "string",
- "symbol": "string",
- "name": "string",
- "decimals": 0,
- "logoURI": "string"
}, - "toTokenAmount": "string",
- "fromTokenAmount": "string",
- "protocols": [
- {
- "name": "string",
- "part": 0,
- "fromTokenAddress": "string",
- "toTokenAddress": "string"
}
], - "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
- 200
{- "fromToken": {
- "address": "string",
- "symbol": "string",
- "name": "string",
- "decimals": 0,
- "logoURI": "string"
}, - "toToken": {
- "address": "string",
- "symbol": "string",
- "name": "string",
- "decimals": 0,
- "logoURI": "string"
}, - "toTokenAmount": "string",
- "fromTokenAmount": "string",
- "protocols": [
- "string"
], - "tx": {
- "from": "string",
- "to": "string",
- "data": "string",
- "value": "string",
- "gasPrice": "string",
- "gas": null,
- "gasLimit": null,
- "maxPriorityFeePerGas": null,
- "maxFeePerGas": null,
- "index": 0,
- "nonce": 0
}
}