generated from ChainSafe/yarn-workspaces-typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
15,256 additions
and
3,323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "API", | ||
"position": 4, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "5 minutes to learn the most important Docusaurus concepts." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Fungible Assets | ||
|
||
This section explains how to get a list of fungible tokens available on the service. | ||
|
||
## /assets/fungible | ||
|
||
### Description | ||
|
||
Returns a list of supported tokens. | ||
|
||
### Endpoint | ||
|
||
`GET /assets/fungible` | ||
|
||
### Response | ||
|
||
The response is a JSON object containing an array of fungible token objects. | ||
|
||
### Example Request | ||
|
||
```shell | ||
curl -X 'GET' \ | ||
'https://gopher.test.buildwithsygma.com/assets/fungible' \ | ||
-H 'accept: application/json' | ||
``` | ||
|
||
### Example Response | ||
|
||
```json | ||
{ | ||
"data": [ | ||
{ | ||
"symbol": "USDC", | ||
"name": "USD Coin", | ||
"decimals": 6, | ||
"addresses": { | ||
"1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eb48", | ||
"42161": "0xFF970A61A04b1Ca14834A43f5de4533eBdDB5CC8" | ||
}, | ||
"logoURI": "https://example.com/logos/usdc.png" | ||
}, | ||
{ | ||
"symbol": "DAI", | ||
"name": "Dai Stablecoin", | ||
"decimals": 18, | ||
"addresses": { | ||
"1": "0x6B175474E89094C44Da98b954EedeAC495271d0F", | ||
"42161": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1" | ||
}, | ||
"logoURI": "https://example.com/logos/dai.png" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Fields | ||
|
||
- `symbol`: The symbol of the token (e.g., "USDC"). | ||
- `name`: The name of the token (e.g., "USD Coin"). | ||
- `decimals`: The number of decimals the token uses. | ||
- `addresses`: An object mapping chain IDs to token contract addresses. | ||
- `logoURI`: The URI for the token's logo. | ||
|
||
### Usage Notes | ||
|
||
- The response includes all supported fungible tokens along with their details and addresses on different blockchain networks. | ||
|
||
## /assets/fungible/{"{token}"} | ||
|
||
### Description | ||
|
||
Returns information about a specific token. | ||
|
||
### Endpoint | ||
|
||
`GET /assets/fungible/{token}` | ||
|
||
### Parameters | ||
|
||
- `{token}`: The symbol of the token (e.g., "USDC"). | ||
|
||
### Response | ||
|
||
The response is a JSON object containing the details of the specified token. | ||
|
||
### Example Request | ||
|
||
```shell | ||
curl -X 'GET' \ | ||
'https://gopher.test.buildwithsygma.com/assets/fungible/usdc' \ | ||
-H 'accept: application/json' | ||
``` | ||
|
||
### Example Response | ||
|
||
```json | ||
{ | ||
"symbol": "USDC", | ||
"name": "USD Coin", | ||
"decimals": 6, | ||
"addresses": { | ||
"1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eb48", | ||
"42161": "0xFF970A61A04b1Ca14834A43f5de4533eBdDB5CC8" | ||
}, | ||
"logoURI": "https://example.com/logos/usdc.png" | ||
} | ||
``` | ||
|
||
### Fields | ||
|
||
- `symbol`: The symbol of the token (e.g., "USDC"). | ||
- `name`: The name of the token (e.g., "USD Coin"). | ||
- `decimals`: The number of decimals the token uses. | ||
- `addresses`: An object mapping chain IDs to token contract addresses. | ||
- `logoURI`: The URI for the token's logo. | ||
|
||
### Usage Notes | ||
|
||
- Replace `{token}` with the symbol of the token you want to retrieve information about. | ||
|
||
## /networks/{"{chainID}"}/assets/fungible | ||
|
||
### Description | ||
|
||
Returns a list of supported tokens for a specific network. | ||
|
||
### Endpoint | ||
|
||
`GET /networks/{chainID}/assets/fungible` | ||
|
||
### Parameters | ||
|
||
- `{chainID}`: The ID of the blockchain network. | ||
|
||
### Response | ||
|
||
The response is a JSON object containing an array of fungible token objects for the specified network. | ||
|
||
### Example Request | ||
|
||
```shell | ||
curl -X 'GET' \ | ||
'https://gopher.test.buildwithsygma.com/networks/1/assets/fungible' \ | ||
-H 'accept: application/json' | ||
``` | ||
|
||
### Example Response | ||
|
||
```json | ||
{ | ||
"data": [ | ||
{ | ||
"symbol": "USDC", | ||
"name": "USD Coin", | ||
"decimals": 6, | ||
"addresses": { | ||
"1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eb48" | ||
}, | ||
"logoURI": "https://example.com/logos/usdc.png" | ||
}, | ||
{ | ||
"symbol": "DAI", | ||
"name": "Dai Stablecoin", | ||
"decimals": 18, | ||
"addresses": { | ||
"1": "0x6B175474E89094C44Da98b954EedeAC495271d0F" | ||
}, | ||
"logoURI": "https://example.com/logos/dai.png" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Fields | ||
|
||
- `symbol`: The symbol of the token (e.g., "USDC"). | ||
- `name`: The name of the token (e.g., "USD Coin"). | ||
- `decimals`: The number of decimals the token uses. | ||
- `addresses`: An object mapping chain IDs to token contract addresses. | ||
- `logoURI`: The URI for the token's logo. | ||
|
||
### Usage Notes | ||
|
||
- Replace `{chainID}` with the ID of the blockchain network you want to retrieve supported tokens for. | ||
|
||
The above commands return JSON objects with the list of fungible tokens, details about specific tokens, or supported tokens for a specific network. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Get Started | ||
|
||
## API Usage | ||
|
||
If you prefer using API calls directly or due to limitations of your environment, you can use the Gopher API. This guide provides an overview of the available endpoints and examples of how to interact with them. | ||
|
||
You can use the Swagger documentation available at [Gopher Swagger API](https://gopher.test.buildwithsygma.com/swagger/index.html) for more detailed information. | ||
|
||
### Example | ||
|
||
Example of getting a list of supported networks: | ||
|
||
```shell | ||
curl -X 'GET' \ | ||
'https://gopher.test.buildwithsygma.com/networks' \ | ||
-H 'accept: application/json' | ||
``` | ||
|
||
### Table of Contents | ||
|
||
For more detailed information about each endpoint, please refer to the specific documents: | ||
|
||
- [Fungible Assets](assets.md) | ||
- Get all assets information | ||
- Get specific assets information | ||
- Get specific network assets | ||
- [Networks](networks.md) | ||
- Get all supported networks | ||
- [Solutions](solutions.md) | ||
- Token aggregation | ||
- Token aggregation with contract call | ||
|
||
Explore each section to understand how to make the most out of the Gopher API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Networks | ||
|
||
This section explains how to get a list of networks available on the service and their details. | ||
|
||
## /networks | ||
|
||
### Description | ||
|
||
Returns a list of supported networks. Each network includes information such as the network ID, name, type, and RPC URLs. | ||
|
||
### Endpoint | ||
|
||
`GET /networks` | ||
|
||
### Response | ||
|
||
The response is a JSON object containing an array of network objects. | ||
|
||
### Example Request | ||
|
||
```shell | ||
curl -X 'GET' \ | ||
'https://gopher.test.buildwithsygma.com/networks' \ | ||
-H 'accept: application/json' | ||
``` | ||
|
||
### Example Response | ||
|
||
```json | ||
{ | ||
"data": [ | ||
{ | ||
"chainID": 1, | ||
"chainType": "EVM", | ||
"name": "Ethereum Mainnet", | ||
"logoURI": "https://example.com/logos/ethereum.png", | ||
"rpcurls": [ | ||
"https://mainnet.ethereumnode.com", | ||
"https://rpc.ankr.com/eth" | ||
] | ||
}, | ||
{ | ||
"chainID": 42161, | ||
"chainType": "EVM", | ||
"name": "Arbitrum One", | ||
"logoURI": "https://example.com/logos/arbitrum.png", | ||
"rpcurls": [ | ||
"https://arb1.arbitrum.io/rpc", | ||
"https://arbitrum.node.com/rpc" | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Fields | ||
|
||
- `chainID`: The unique identifier for the blockchain network. | ||
- `chainType`: The type of the blockchain (e.g., EVM). | ||
- `name`: The name of the blockchain network. | ||
- `logoURI`: The URI of the network's logo. | ||
- `rpcurls`: An array of RPC URLs for the network. | ||
|
||
### Usage Notes | ||
|
||
- The response includes multiple RPC URLs for redundancy and reliability. | ||
|
||
The above command returns a JSON object with the list of supported networks and their details. |
Oops, something went wrong.