Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cosmoscontracts/supply-info-api
An API for basic info about the Juno token supply.
https://github.com/cosmoscontracts/supply-info-api
Last synced: 2 months ago
JSON representation
An API for basic info about the Juno token supply.
- Host: GitHub
- URL: https://github.com/cosmoscontracts/supply-info-api
- Owner: CosmosContracts
- License: apache-2.0
- Created: 2021-10-04T21:06:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T11:22:34.000Z (almost 3 years ago)
- Last Synced: 2024-04-24T03:20:43.654Z (10 months ago)
- Language: JavaScript
- Size: 62.5 KB
- Stars: 1
- Watchers: 5
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# supply-info-api
An API for basic info about the Juno token supply.
The base route `/` returns all info in JSON:
```json
{
"circulatingSupply": "31511686.018182",
"communityPool": "20008679.404121",
"denom": "JUNO",
"totalSupply": "65336746.085331"
}
```## Other routes
- `/circulating-supply`: returns circulating supply in plain text
- `/total-supply`: returns total supply in plain text
- `/community-pool`: returns community pool size in plain text
- `/denom`: returns denom in plain text### How circulating supply is calculated
1. Get total supply.
2. Get community pool.
3. Subtract community pool from total supply.
4. Iterate through list of vesting amounts for large accounts (like the Dev Fund), and subtract the vesting ammount from total supply.This yields the circulating supply.
Vesting accounts are provided by an environment variable. See `.env.example` for an example.