Skip to content

Commit

Permalink
feat(README): update
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKozAllB committed Aug 8, 2024
1 parent 274d3ac commit 0ee3013
Showing 1 changed file with 57 additions and 69 deletions.
126 changes: 57 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,27 @@ Provides an easy integration with the Allbridge Core ChainBridgeService for DApp

## Table of Contents

- [Configuration](#configuration)
- [Networks](#networks)
- [Environment variables](#environment-variables)
- [How to get](#how-to-get)
- [Run docker image](#run-docker-image)
- [Build and run the docker image](#build-and-run-the-docker-image)
- [Host on Heroku](#host-on-heroku)
- [How to use](#how-to-use)
- [Swagger](#swagger)
- [Raw transactions](#raw-transactions)
- [Tokens](#tokens)
- [Pools](#pools)
- [Transfers](#transfers)
<!-- TOC -->
* [Allbridge Core REST API](#allbridge-core-rest-api)
* [Table of Contents](#table-of-contents)
* [Configuration](#configuration)
* [Networks](#networks)
* [Environment variables](#environment-variables)
* [How to get](#how-to-get)
* [Run docker image](#run-docker-image)
* [Build and run the docker image](#build-and-run-the-docker-image)
* [Host on Heroku](#host-on-heroku)
* [Step-by-Step Guide](#step-by-step-guide)
* [Deploy and release REST-API container](#deploy-and-release-rest-api-container)
* [One-Time Setup (Optional for Updates)](#one-time-setup-optional-for-updates)
* [Final Steps](#final-steps)
* [How to use](#how-to-use)
* [Swagger](#swagger)
* [Raw transactions](#raw-transactions)
* [Tokens](#tokens)
* [Pools](#pools)
* [Transfers](#transfers)
<!-- TOC -->

## Configuration

Expand Down Expand Up @@ -224,65 +232,45 @@ You are now ready to use your rest-api app.
After running the docker image, you can access the swagger documentation at `http://localhost:3000/api`. The swagger documentation provides a detailed description of the available endpoints and their parameters.

### Raw transactions

`GET /raw/approve` - Creates a Raw Transaction for approving tokens usage by the bridge

`GET /raw/swap` - Creates a Raw Transaction for initiating the swap of tokens on one chain

`GET /raw/bridge` - Creates a Raw Transaction for initiating the transfer of tokens from one chain to another.

`GET /raw/deposit` - Creates a Raw Transaction for depositing tokens to Liquidity pool

`GET /raw/withdraw` - Creates a Raw Transaction for withdrawing tokens from Liquidity pool

`GET /raw/claim` - Creates a Raw Transaction for claiming rewards from Liquidity pool
| `GET` Endpoint | Description |
|-----------------|--------------------------------------------------------------------------------------------|
| `/raw/approve` | Creates a Raw Transaction for approving tokens usage by the bridge |
| `/raw/swap` | Creates a Raw Transaction for initiating the swap of tokens on one chain |
| `/raw/bridge` | Creates a Raw Transaction for initiating the transfer of tokens from one chain to another. |
| `/raw/deposit` | Creates a Raw Transaction for depositing tokens to Liquidity pool |
| `/raw/withdraw` | Creates a Raw Transaction for withdrawing tokens from Liquidity pool |
| `/raw/claim` | Creates a Raw Transaction for claiming rewards from Liquidity pool |

### Tokens

`GET /tokens` - Returns a list of supported tokens.

`GET /chains` - Returns ChainDetailsMap containing a list of supported tokens groped by chain.

`GET /token/balance` - Get token balance

`GET /token/native/balance` - Get native (gas) token balance

`GET /token/details` - Get token details

`GET /gas/fee` - Fetches possible ways to pay the transfer gas fee.

`GET /gas/balance` - Get gas balance

`GET /gas/extra/limits` - Get possible limit of extra gas amount.
| `GET` Endpoint | Description |
|-------------------------|-------------------------------------------------------------------------------|
| `/tokens` | Returns a list of supported tokens |
| `/chains` | Returns ChainDetailsMap containing a list of supported tokens groped by chain |
| `/token/balance` | Get token balance |
| `/token/native/balance` | Get native (gas) token balance |
| `/token/details` | Get token details |
| `/gas/fee` | Fetches possible ways to pay the transfer gas fee |
| `/gas/balance` | Get gas balance |
| `/gas/extra/limits` | Get possible limit of extra gas amount |

### Pools

`GET /check/allowance` - Check if the amount of approved tokens is enough

`GET /pool/info/server` - Gets information about the pool-info by token from server

`GET /pool/info/blockchain` - Gets information about the pool-info by token from blockchain

`GET /pool/allowance` - Get amount of tokens approved for poolInfo

`GET /liquidity/details` - Get user balance info on liquidity pool

`GET /liquidity/deposit/calculate` - Calculates the amount of LP tokens that will be deposited

`GET /liquidity/withdrawn/calculate` - Calculates the amount of tokens will be withdrawn
| `GET` Endpoint | Description |
|----------------------------------|---------------------------------------------------------------|
| `/check/allowance` | Check if the amount of approved tokens is enough |
| `/pool/info/server` | Gets information about the pool-info by token from server |
| `/pool/info/blockchain` | Gets information about the pool-info by token from blockchain |
| `/pool/allowance` | Get amount of tokens approved for poolInfo |
| `/liquidity/details` | Get user balance info on liquidity pool |
| `/liquidity/deposit/calculate` | Calculates the amount of LP tokens that will be deposited |
| `/liquidity/withdrawn/calculate` | Calculates the amount of tokens will be withdrawn |

### Transfers

`GET /transfer/time` - Gets the average time in ms to complete a transfer for given tokens and messenger.

`GET /transfer/status` - Fetches information about tokens transfer by chosen chainSymbol and transaction Id from the Allbridge Core API.

`GET /pending/info` - Returns information about pending transactions for the same destination chain and the amount of tokens can be received as a result of transfer considering pending transactions.

`GET /swap/details` - Show swap amount changes (fee and amount adjustment) during send through pools

`GET /bridge/details` - Show bridge amount changes (fee and amount adjustment) during send through pools on source and destination chains

`GET /bridge/receive/calculate` - Calculates the amount of tokens to be received as a result of transfer.

`GET /bridge/send/calculate` - Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer.
| `GET` Endpoint | Description |
|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `/transfer/time` | Gets the average time in ms to complete a transfer for given tokens and messenger |
| `/transfer/status` | Fetches information about tokens transfer by chosen chainSymbol and transaction Id from the Allbridge Core API |
| `/pending/info` | Returns information about pending transactions for the same destination chain and the amount of tokens can be received as a result of transfer considering pending transactions |
| `/swap/details` | Show swap amount changes (fee and amount adjustment) during send through pools |
| `/bridge/details` | Show bridge amount changes (fee and amount adjustment) during send through pools on source and destination chains |
| `/bridge/receive/calculate` | Calculates the amount of tokens to be received as a result of transfer |
| `/bridge/send/calculate` | Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer |

0 comments on commit 0ee3013

Please sign in to comment.