diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..6581d0b Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index aff0795..b4389e6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Elys Asset Registry + [![Better Stack Badge](https://uptime.betterstack.com/status-badges/v1/monitor/1z653.svg)](https://uptime.betterstack.com/?utm_source=status_badge) Official Elys Network asset registry providing standardized blockchain and token configurations for all Elys ecosystem projects. This registry serves as the single source of truth for chain metadata, RPC endpoints, token information, and feature capabilities across the entire Elys ecosystem. @@ -30,25 +31,25 @@ curl https://registry.elys.network/health ### Chain Endpoints -| Method | Endpoint | Description | Status | -|--------|----------|-------------|--------| -| `GET` | `/v1/chains/mainnet` | List all mainnet chains | ✅ Available | -| `GET` | `/v1/chains/testnet` | List all testnet chains | ✅ Available | -| `GET` | `/v1/chains/devnet` | List all devnet chains | ✅ Available | +| Method | Endpoint | Description | Status | +| ------ | -------------------- | ----------------------- | ------------ | +| `GET` | `/v1/chains/mainnet` | List all mainnet chains | ✅ Available | +| `GET` | `/v1/chains/testnet` | List all testnet chains | ✅ Available | +| `GET` | `/v1/chains/devnet` | List all devnet chains | ✅ Available | ### Currency Endpoints -| Method | Endpoint | Description | Status | -|--------|----------|-------------|--------| -| `GET` | `/v1/currencies/mainnet` | List all currencies across mainnet network | ✅ Available | -| `GET` | `/v1/currencies/testnet` | List all currencies across testnet network | ✅ Available | -| `GET` | `/v1/currencies/devnet` | List all currencies across devnet networks | ✅ Available | +| Method | Endpoint | Description | Status | +| ------ | ------------------------ | ------------------------------------------ | ------------ | +| `GET` | `/v1/currencies/mainnet` | List all currencies across mainnet network | ✅ Available | +| `GET` | `/v1/currencies/testnet` | List all currencies across testnet network | ✅ Available | +| `GET` | `/v1/currencies/devnet` | List all currencies across devnet networks | ✅ Available | ### Utility Endpoints -| Method | Endpoint | Description | Status | -|--------|----------|-------------|--------| -| `GET` | `/health` | API health status | ✅ Available | +| Method | Endpoint | Description | Status | +| ------ | --------- | ----------------- | ------------ | +| `GET` | `/health` | API health status | ✅ Available | ## 📊 Data Structure @@ -77,7 +78,6 @@ curl https://registry.elys.network/health "coinIbcDenom": "", "coinDecimals": 6, "coinGeckoId": "elys", - "coinImageUrl": "/tokens/elys.svg", "isFeeCurrency": true, "isStakeCurrency": false, "canSwap": true, @@ -102,20 +102,21 @@ curl https://registry.elys.network/health ## 🔧 Integration Examples ### JavaScript/Node.js -```javascript -const response = await fetch('https://registry.elys.network/v1/chains/mainnet'); +```javascript +const response = await fetch("https://registry.elys.network/v1/chains/mainnet"); const registry = await response.json(); const elysChain = registry.chains.elys; console.log(`RPC URL: ${elysChain.rpcURL}`); const swappableCurrencies = Object.values(registry.chains) - .flatMap(chain => chain.currencies) - .filter(currency => currency.canSwap); + .flatMap((chain) => chain.currencies) + .filter((currency) => currency.canSwap); ``` ### Go + ```go package main @@ -162,6 +163,7 @@ func main() { ``` ### Java + ```java import com.fasterxml.jackson.databind.ObjectMapper; import java.net.http.HttpClient; @@ -171,11 +173,11 @@ import java.net.URI; public class ElysRegistryClient { private static final String REGISTRY_URL = "https://registry.elys.network/v1/chains/mainnet"; - + public static class AssetRegistry { public Map chains; } - + public static class ChainAsset { public String chainId; public String chainName; @@ -183,7 +185,7 @@ public class ElysRegistryClient { public String restURL; public List currencies; } - + public static class Currency { public String coinDenom; public String coinMinimalDenom; @@ -191,19 +193,19 @@ public class ElysRegistryClient { public boolean canSwap; public boolean canDeposit; } - + public static void main(String[] args) throws Exception { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(REGISTRY_URL)) .build(); - - HttpResponse response = client.send(request, + + HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); - + ObjectMapper mapper = new ObjectMapper(); AssetRegistry registry = mapper.readValue(response.body(), AssetRegistry.class); - + ChainAsset elys = registry.chains.get("elys"); System.out.println("Elys RPC: " + elys.rpcURL); } @@ -211,6 +213,7 @@ public class ElysRegistryClient { ``` ### Python + ```python import requests import json @@ -240,12 +243,12 @@ class AssetRegistry: def load_registry() -> AssetRegistry: response = requests.get("https://registry.elys.network/mainnet") data = response.json() - + chains = {} for key, chain_data in data["chains"].items(): currencies = [Currency(**curr) for curr in chain_data["currencies"]] chains[key] = ChainAsset(**{**chain_data, "currencies": currencies}) - + return AssetRegistry(chains=chains) # Uso @@ -255,6 +258,7 @@ print(f"Elys RPC: {elys_chain.rpcURL}") ``` ### Rust + ```rust use serde::{Deserialize, Serialize}; use std::collections::HashMap; @@ -291,17 +295,18 @@ struct AssetRegistry { chains: HashMap# API Endpoints y Consumo Multi-Plataforma ``` + ## 📁 Repository Structure ``` elys-asset-registry/ ├── 📁 data/ -│ ├── 📁 mainnet/ +│ ├── 📁 mainnet/ │ ├──── elys.json │ ├──── cosmos.json │ ├── 📁 testnet/ │ ├──── elys.json -│ ├──── cosmos.json +│ ├──── cosmos.json ├── 📁 schema/ │ └── asset-registry.schema.json # JSON Schema ├── 📁 examples/ @@ -312,7 +317,7 @@ elys-asset-registry/ │ └── rust/ # Rust examples ├── 📁 .github/ │ └── workflows/ -│ └─ validate-registry.yml CI for validatio +│ └─ validate-registry.yml CI for validatio ├──📄 .version └──📄 README.md ``` @@ -340,42 +345,42 @@ Each chain asset must include: ```json { - "chainId": "elys-1", - "chainName": "Elys", - "addressPrefix": "elys", - "rpcURL": "https://rpc.elys.network:443", - "restURL": "https://api.elys.network:443", - "explorerURL": { - "transaction": "https://mainnet.itrocket.net/elys/tx/{transaction}" - }, - "channel": { - "source": "", - "destination": "" - }, - "currencies": [ - { - "coinDenom": "ELYS", - "coinDisplayDenom": "Elys", - "coinMinimalDenom": "uelys", - "coinIbcDenom": "", - "coinDecimals": 6, - "coinGeckoId": "elys", - "canSwap": true, - "isFeeCurrency": true, - "isStakeCurrency": true, - "canWithdraw": true, - "canDeposit": true, - "canUseLiquidityMining": true, - "canUseLeverageLP": false, - "canUsePerpetual": false, - "canUseVaults": true, - "gasPriceStep": { - "low": 0.01, - "average": 0.025, - "high": 0.03 - } - } - ] + "chainId": "elys-1", + "chainName": "Elys", + "addressPrefix": "elys", + "rpcURL": "https://rpc.elys.network:443", + "restURL": "https://api.elys.network:443", + "explorerURL": { + "transaction": "https://mainnet.itrocket.net/elys/tx/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "ELYS", + "coinDisplayDenom": "Elys", + "coinMinimalDenom": "uelys", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "elys", + "canSwap": true, + "isFeeCurrency": true, + "isStakeCurrency": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": false, + "canUsePerpetual": false, + "canUseVaults": true, + "gasPriceStep": { + "low": 0.01, + "average": 0.025, + "high": 0.03 + } + } + ] } ``` diff --git a/data/devnet/agoric.json b/data/devnet/agoric.json new file mode 100644 index 0000000..fa929a7 --- /dev/null +++ b/data/devnet/agoric.json @@ -0,0 +1,39 @@ +{ + "chainId": "agoric-3", + "chainName": "Agoric", + "addressPrefix": "agoric", + "rpcURL": "https://main.rpc.agoric.net:443", + "restURL": "https://main.api.agoric.net:443", + "explorerURL": { + "transaction": "https://www.mintscan.io/agoric/tx/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "BLD", + "coinDisplayDenom": "BLD", + "coinMinimalDenom": "ubld", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "", + "isFeeCurrency": true, + "isStakeCurrency": false, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + + "gasPriceStep": { + "low": 0.03, + "average": 0.05, + "high": 0.07 + } + } + ] +} diff --git a/data/devnet/akashnet-2.json b/data/devnet/akashnet-2.json new file mode 100644 index 0000000..e166a43 --- /dev/null +++ b/data/devnet/akashnet-2.json @@ -0,0 +1,40 @@ +{ + "chainId": "akashnet-2", + "chainName": "Akash", + "addressPrefix": "akash", + "rpcURL": "https://rpc-akash.ottersync.io", + "restURL": "https://api.akashnet.net", + "explorerURL": { + "transaction": "https://www.mintscan.io/akash/tx/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "AKT", + "coinDisplayDenom": "AKT", + "coinMinimalDenom": "uakt", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "akash-network", + + "isStakeCurrency": false, + "isFeeCurrency": true, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + + "gasPriceStep": { + "low": 0.0003, + "average": 0.003, + "high": 0.03 + } + } + ] +} diff --git a/data/devnet/celestia.json b/data/devnet/celestia.json new file mode 100644 index 0000000..0ac6e38 --- /dev/null +++ b/data/devnet/celestia.json @@ -0,0 +1,40 @@ +{ + "chainId": "celestia", + "chainName": "Celestia", + "addressPrefix": "celestia", + "rpcURL": "https://rpc-celestia.ottersync.io", + "restURL": "https://api.lunaroasis.net", + + "explorerURL": { + "transaction": "https://celenium.io/tx/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "TIA", + "coinDisplayDenom": "TIA", + "coinMinimalDenom": "utia", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "celestia", + + "isStakeCurrency": false, + "isFeeCurrency": true, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.015, + "average": 0.025, + "high": 0.1 + } + } + ] +} diff --git a/data/devnet/grand-2.json b/data/devnet/grand-2.json new file mode 100644 index 0000000..2fbc622 --- /dev/null +++ b/data/devnet/grand-2.json @@ -0,0 +1,39 @@ +{ + "chainId": "grand-2", + "chainName": "Noble (devnet)", + "addressPrefix": "noble", + "rpcURL": "https://noble-testnet-rpc.polkachu.com", + "restURL": "https://api.testnet.noble.strange.love", + "explorerURL": { + "transaction": "https://testnet.mintscan.io/noble-testnet/txs/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "USDC", + "coinDisplayDenom": "USDC", + "coinMinimalDenom": "uusdc", + "coinIbcDenom": "", + "coinDecimals": 6, + + "coinGeckoId": "usd-coin", + "isFeeCurrency": true, + "isStakeCurrency": false, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": true, + "canUseVaults": true, + "gasPriceStep": { + "low": 0.01, + "average": 0.025, + "high": 0.03 + } + } + ] +} diff --git a/data/devnet/kava.json b/data/devnet/kava.json new file mode 100644 index 0000000..9af2a28 --- /dev/null +++ b/data/devnet/kava.json @@ -0,0 +1,39 @@ +{ + "chainId": "kava_2222-10", + "chainName": "Kava", + "addressPrefix": "kava", + "rpcURL": "https://rpc.data.kava.io", + "restURL": "https://api.data.kava.io", + + "explorerURL": { + "transaction": "https://www.mintscan.io/kava/transactions/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "KAVA", + "coinDisplayDenom": "KAVA", + "coinMinimalDenom": "ukava", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "kava", + "isStakeCurrency": false, + "isFeeCurrency": true, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.01, + "average": 0.025, + "high": 0.03 + } + } + ] +} diff --git a/data/devnet/mantra-1.json b/data/devnet/mantra-1.json new file mode 100644 index 0000000..dde0c7f --- /dev/null +++ b/data/devnet/mantra-1.json @@ -0,0 +1,40 @@ +{ + "chainId": "mantra-1", + "chainName": "Mantra", + "addressPrefix": "mantra", + "rpcURL": "https://mantra-mainnet-rpc.itrocket.net:443", + "restURL": "https://mantra-mainnet-api.itrocket.net", + + "explorerURL": { + "transaction": "https://mainnet.itrocket.net/mantra/transaction/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "OM", + "coinDisplayDenom": "OM", + "coinMinimalDenom": "uom", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "", + + "isFeeCurrency": true, + "isStakeCurrency": false, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": true, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.01, + "average": 0.02, + "high": 0.03 + } + } + ] +} diff --git a/data/devnet/neutron.json b/data/devnet/neutron.json new file mode 100644 index 0000000..fab8371 --- /dev/null +++ b/data/devnet/neutron.json @@ -0,0 +1,40 @@ +{ + "chainId": "neutron-1", + "chainName": "Neutron", + "addressPrefix": "neutron", + "rpcURL": "https://rpc-voidara.neutron-1.neutron.org", + "restURL": "https://rest.lavenderfive.com/neutron", + + "explorerURL": { + "transaction": "https://www.mintscan.io/neutron/transactions/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "NTRN", + "coinDisplayDenom": "NTRN", + "coinMinimalDenom": "untrn", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "", + + "isFeeCurrency": true, + "isStakeCurrency": false, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.0053, + "average": 0.0053, + "high": 0.0053 + } + } + ] +} diff --git a/data/devnet/osmosis-1.json b/data/devnet/osmosis-1.json new file mode 100644 index 0000000..9ed1b5b --- /dev/null +++ b/data/devnet/osmosis-1.json @@ -0,0 +1,40 @@ +{ + "chainId": "osmosis-1", + "chainName": "Osmosis", + "addressPrefix": "osmo", + "rpcURL": "https://osmosis-rpc.polkachu.com", + "restURL": "https://osmosis-api.polkachu.com", + + "explorerURL": { + "transaction": "https://www.mintscan.io/osmosis/tx/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "OSMO", + "coinDisplayDenom": "OSMO", + "coinMinimalDenom": "uosmo", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "osmosis", + + "isFeeCurrency": true, + "isStakeCurrency": false, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.0025, + "average": 0.025, + "high": 0.04 + } + } + ] +} diff --git a/data/devnet/saga.json b/data/devnet/saga.json new file mode 100644 index 0000000..6435bd1 --- /dev/null +++ b/data/devnet/saga.json @@ -0,0 +1,40 @@ +{ + "chainId": "ssc-1", + "chainName": "Saga", + "addressPrefix": "saga", + "rpcURL": "https://rpc-saga.ottersync.io", + "restURL": "https://api-saga.ottersync.io", + + "explorerURL": { + "transaction": "https://www.mintscan.io/saga/tx/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "SAGA", + "coinDisplayDenom": "SAGA", + "coinMinimalDenom": "usaga", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "saga", + + "isStakeCurrency": false, + "isFeeCurrency": true, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.025, + "average": 0.025, + "high": 0.04 + } + } + ] +} diff --git a/data/devnet/secret.json b/data/devnet/secret.json new file mode 100644 index 0000000..546452b --- /dev/null +++ b/data/devnet/secret.json @@ -0,0 +1,40 @@ +{ + "chainId": "secret-4", + "chainName": "Secret Network", + "addressPrefix": "secret", + "rpcURL": "https://rpc.lavenderfive.com:443/secretnetwork", + "restURL": "https://rest.lavenderfive.com/secretnetwork", + + "explorerURL": { + "transaction": "https://www.mintscan.io/secret/transactions/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "SCRT", + "coinDisplayDenom": "SCRT", + "coinMinimalDenom": "uscrt", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "", + + "isFeeCurrency": true, + "isStakeCurrency": false, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.05, + "average": 0.1, + "high": 0.25 + } + } + ] +} diff --git a/data/devnet/theta-devnet-001.json b/data/devnet/theta-devnet-001.json new file mode 100644 index 0000000..f92a51c --- /dev/null +++ b/data/devnet/theta-devnet-001.json @@ -0,0 +1,39 @@ +{ + "chainId": "theta-devnet-001", + "chainName": "Cosmos Hub (devnet)", + "addressPrefix": "cosmos", + "rpcURL": "https://rpc.sentry-02.theta-testnet.polypore.xyz", + "restURL": "https://rest.sentry-02.theta-testnet.polypore.xyz", + "explorerURL": { + "transaction": "https://testnet.mintscan.io/cosmoshub-testnet/txs/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "ATOM", + "coinDisplayDenom": "ATOM", + "coinMinimalDenom": "uatom", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "cosmos", + + "isStakeCurrency": true, + "isFeeCurrency": true, + "canSwap": true, + "canDeposit": true, + "canWithdraw": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": true, + "canUseVaults": true, + "gasPriceStep": { + "low": 0.01, + "average": 0.025, + "high": 0.03 + } + } + ] +} diff --git a/data/devnet/xion-devnet-1.json b/data/devnet/xion-devnet-1.json new file mode 100644 index 0000000..c61f676 --- /dev/null +++ b/data/devnet/xion-devnet-1.json @@ -0,0 +1,39 @@ +{ + "chainId": "xion-devnet-1", + "chainName": "Xion", + "addressPrefix": "xion", + "rpcURL": "https://rpc-xion.ottersync.io", + "restURL": "https://api-xion.ottersync.io", + "explorerURL": { + "transaction": "https://xion.explorers.guru/transaction/{transaction}" + }, + "channel": { + "source": "", + "destination": "" + }, + "currencies": [ + { + "coinDenom": "XION", + "coinDisplayDenom": "XION", + "coinMinimalDenom": "uxion", + "coinIbcDenom": "", + "coinDecimals": 6, + "coinGeckoId": "xion", + + "isStakeCurrency": false, + "isFeeCurrency": true, + "canSwap": true, + "canWithdraw": true, + "canDeposit": true, + "canUseLiquidityMining": true, + "canUseLeverageLP": true, + "canUsePerpetual": false, + "canUseVaults": false, + "gasPriceStep": { + "low": 0.025, + "average": 0.025, + "high": 0.04 + } + } + ] +}