0.1.0 • Published 2 years ago

@0xraid/get-chain-name v0.1.0

Weekly downloads
-
License
WTFPL
Repository
-
Last release
2 years ago

utility package used by raid apps, wrapper around this registry, updated every week.

get chain name

const find = require("@raiddotfarm/get-chain-name");

chainName = find(1);
console.log(chainName);

Output:

Ethereum Mainnet

get chain metadata

chainData = find(1);
console.log(chainData);

Output:

{
  "chain": "ETH",
  "chainId": 1,
  "ens": {
    "registry": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
  },
  "explorers": [
    {
      "name": "etherscan",
      "standard": "EIP3091",
      "url": "https://etherscan.io"
    }
  ],
  "faucets": [],
  "icon": "ethereum",
  "infoURL": "https://ethereum.org",
  "name": "Ethereum Mainnet",
  "nativeCurrency": {
    "decimals": 18,
    "name": "Ether",
    "symbol": "ETH"
  },
  "networkId": 1,
  "rpc": [
    "https://mainnet.infura.io/v3/${INFURA_API_KEY}",
    "wss://mainnet.infura.io/ws/v3/${INFURA_API_KEY}",
    "https://api.mycryptoapi.com/eth",
    "https://cloudflare-eth.com"
  ],
  "shortName": "eth",
  "slip44": 60
}