New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@hyperplay/chains

Package Overview
Dependencies
Maintainers
8
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperplay/chains

A package to get chain metadata

latest
npmnpm
Version
0.6.6
Version published
Maintainers
8
Created
Source

chains

chains is a lightweight (~600 kb) package that supports constant time lookup of chain metadata given a chainId. chains works offline with a chain map of around 1000 chains, and if a chain is not found, ethereum-lists/chains will be queried.

Most existing implementations of chain metadata lookup require the dev to copy paste a large json array of chain into their application which the dev then does linear time lookups or parses into a map at runtime. This has poor performance and maintainability. When chains are added, the dev has to replace the json array. Updating an npm package is much easier.

The other solution is to query external api's. These api's may fail occasionally though, and this does not support offline use either which is an important requirement for some applications.

chains solves these issues.

Getting started

yarn add @hyperplay/chains

import { getChainMetadata } from '@hyperplay/chains'
const chainId = '1'
const metadata = await getChainMetadata(chainId)
console.log(JSON.stringify(metadata, null, 4))

Getting your chain listed

Please submit a PR to https://github.com/ethereum-lists/chains with the appropriate data added to the _data folder. After this is merged, @hyperplay/chains will automatically start working with your chain.

Developers

Updating the chain map

Run yarn generateChainMap and yarn buildDist in the root directory and then submit a PR with the updated map. Bump the package.json version before merging and the GHA will publish.

FAQs

Package last updated on 15 Apr 2026

Did you know?

Socket

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