
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@revoke.cash/chains
Advanced tools
Helper module for getting EVM chain info from chainid.network.
Note: This package was initially created by @taylorjdawson. We forked the repository so we can control the release process with an automated script. The original package can be found here.
yarn add @revoke.cash/chains
@revoke.cash/chains
uses a weekly automated release script that updates its chain data. This release script takes breaking changes into account, so breaking changes (e.g. renamed chains) are released as a new major version, while non-breaking changes (e.g. new chains) are released as a new minor version.
Import chains
methods and enums:
import chains, { ChainId, ChainName } from '@revoke.cash/chains'
import { chain } from '@revoke.cash/chains'
console.log(chain.ethereum.rinkeby)
console.log(chain.polygon.mumbai)
console.log(ChainId.EthereumMainnet) // 1
console.log(ChainId.BinanceSmartChainMainnet) // 56
console.log(ChainName.EthereumMainnet) // "Ethereum Mainnet"
console.log(ChainName.Rinkeby) // "Rinkeby"
chains.getById(ChainId.EthereumMainnet) // { name: "Ethereum Mainnet", ..., "infoURL": "https://ethereum.org" }
// Equivalent
chains.getById(1)
chains.getByName(ChainName.EthereumMainnet) // { name: "Ethereum Mainnet", ..., "infoURL": "https://ethereum.org" }
// Equivalent
chains.getByName('Ethereum Mainnet')
const allChains = chains.all()
// { 1: { name: "Ethereum Mainnet", ..., "infoURL": "https://ethereum.org" }, 2: {...}}
import { Chain, NativeCurrency, Explorer } from '@revoke.cash/chains'
const ethereum: Chain = chains.getById(ChainId.EthereumMainnet)
ethereum.chain // 'ETH'
FAQs
Helper module for getting EVM chains info.
The npm package @revoke.cash/chains receives a total of 515 weekly downloads. As such, @revoke.cash/chains popularity was classified as not popular.
We found that @revoke.cash/chains demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.