
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
@pinax/graph-networks-registry
Advanced tools
TypeScript types and helpers for The Graph Networks Registry
TypeScript types and helpers for The Graph Networks Registry.
Documentation available here.
npm install @pinax/graph-networks-registry
import { NetworksRegistry } from '@pinax/graph-networks-registry';
// Load from the latest compatible registry JSON at networks-registry.thegraph.com
const registry = await NetworksRegistry.fromLatestVersion();
// Load from specific version tag at networks-registry.thegraph.com
const registry = await NetworksRegistry.fromExactVersion('0.6.0');
const registry = await NetworksRegistry.fromExactVersion('0.6.x');
// Load from URL
const registry = await NetworksRegistry.fromUrl('https://networks-registry.thegraph.com/TheGraphNetworksRegistry.json');
// Load from local file
const registry = NetworksRegistry.fromFile('./TheGraphNetworksRegistry.json');
// Load from JSON string
const registry = NetworksRegistry.fromJson(jsonString);
// Find network by ID
const mainnet = registry.getNetworkById('mainnet');
if (mainnet) {
console.log(mainnet.fullName); // "Ethereum Mainnet"
console.log(mainnet.caip2Id); // "eip155:1"
}
// Find network by alias
const mainnet = registry.getNetworkByAlias('eth');
if (mainnet) {
console.log(mainnet.fullName); // "Ethereum Mainnet"
}
FAQs
TypeScript types and helpers for The Graph Networks Registry
The npm package @pinax/graph-networks-registry receives a total of 6,636 weekly downloads. As such, @pinax/graph-networks-registry popularity was classified as popular.
We found that @pinax/graph-networks-registry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.