Socket
Socket
Sign inDemoInstall

@civic/civic-eth-provider

Package Overview
Dependencies
73
Maintainers
15
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @civic/civic-eth-provider

This library builds Provider instances for various EVM chains.


Version published
Weekly downloads
2
decreased by-98.39%
Maintainers
15
Created
Weekly downloads
 

Readme

Source

@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'

FAQs

Last updated on 15 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc