@mintgate/evm-chains
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.13 • Public • Published

    evm-chains

    Package to query chain data from ethereum-lists/chains

    Install

    npm install --save evm-chains
    
    #or
    
    yarn add evm-chains

    API

    function getAllChains(): IChainData[];
    function getChain(chainId: number): IChainData;
    function getChainByChainId(chainId: number): IChainData;
    function getChainByKeyValue(key: string, value: any): IChainData;
    function getChainByNetworkId(networkId: number): number;
    function convertNetworkIdToChainId(networkId: number): number;
    function convertChainIdToNetworkId(chainId: number): number;

    Types

    interface IChainData {
      name: string;
      chainId: number;
      shortName: string;
      chain: string;
      network: string;
      networkId: number;
      nativeCurrency: {
        name: string;
        symbol: string;
        decimals: number;
      };
      rpc: string[];
      faucets: string[];
      infoURL: string;
    }

    Data Source

    https://github.com/ethereum-lists/chains

    Install

    npm i @mintgate/evm-chains

    DownloadsWeekly Downloads

    245

    Version

    0.3.13

    License

    MIT

    Unpacked Size

    290 kB

    Total Files

    25

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar