
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
eth-chainlist
Advanced tools
eth-chainlist
is a Node.JS NPM Package that provides evm chain based on the data from https://chainlist.org/
This package automatically updates itself once a day as long as there is chain data updates.
import { getChainById } from 'eth-chainlist';
const currentChain = getChainById(1);
/**
* {
name: 'Ethereum Mainnet',
chain: 'ETH',
icon: 'ethereum',
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'
],
faucets: [],
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
infoURL: 'https://ethereum.org',
shortName: 'eth',
chainId: 1,
networkId: 1,
slip44: 60,
ens: { registry: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' },
explorers: [
{
name: 'etherscan',
url: 'https://etherscan.io',
standard: 'EIP3091'
}
]
}
* **/
The following APIs are available in this package:
rawChainData
will return all the chain data in JSON format.
getChainById
takes in a chain id and will return you a single chain
getChainByNetworkId
takes in a network id and will return you a single chain
getChainByName
takes in a name and will return you a single chain
getChainByShortName
takes in a short name and will return you a single chain
FAQs
List of EVM Chains
The npm package eth-chainlist receives a total of 19,995 weekly downloads. As such, eth-chainlist popularity was classified as popular.
We found that eth-chainlist 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
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.