@civic/civic-eth-provider
TypeScript icon, indicating that this package has built-in type declarations

0.0.20 • Public • Published

@civic/civic-eth-provider

This library builds Provider instances for various EVM chains.

Adding a new EVM chain

  1. Add a mapping from chainId to network name in chainIdMap.json
  2. Add a provider URL in ethProvider.ts

Looking up a chain ID by network name

import { lookupEvmChainIdByNetwork } from '@civic/civic-eth-provider';

const networkName = lookupEvmChainIdByNetwork('xdcApothem'); // returns 51

Looking up a network name by chain ID

import { lookupEvmChainIdByNetwork, lookupEvmChainNetworkById } from '@civic/civic-eth-provider';

const networkName = lookupEvmChainNetworkById(51); // returns 'xdcApothem'

Readme

Keywords

none

Package Sidebar

Install

npm i @civic/civic-eth-provider

Weekly Downloads

26

Version

0.0.20

License

none

Unpacked Size

1.62 MB

Total Files

50

Last publish

Collaborators

  • pedroapfilho
  • callforsanity
  • jp-civic
  • chriteixeira
  • daneel
  • mitchcivic
  • dankelleher
  • jonthepilot
  • civicfinance
  • kevinhcolgan
  • flippiescholtz
  • tyronemichael
  • lucmir