
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@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.7.0');
const registry = await NetworksRegistry.fromExactVersion('0.7.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 graph ID (works with both network ID and alias)
const mainnet = registry.getNetworkByGraphId('mainnet');
if (mainnet) {
console.log(mainnet.fullName); // "Ethereum Mainnet"
console.log(mainnet.caip2Id); // "eip155:1"
}
// You can also use an alias with getNetworkByGraphId
const ethereum = registry.getNetworkByGraphId('eth');
if (ethereum) {
console.log(ethereum.fullName); // "Ethereum Mainnet"
}
// Find network by CAIP-2 chain ID
const ethereumByChainId = registry.getNetworkByCaip2Id('eip155:1');
if (ethereumByChainId) {
console.log(ethereumByChainId.fullName); // "Ethereum Mainnet"
console.log(ethereumByChainId.id); // "mainnet"
}
// Invalid format will produce a warning and return undefined
const invalidNetwork = registry.getNetworkByCaip2Id('invalid-format');
// Warning: CAIP-2 Chain ID should be in the format '[namespace]:[reference]', e.g., 'eip155:1'
// Deprecated methods (will be removed in future versions)
// Find network by ID
// @deprecated Use getNetworkByGraphId instead
const mainnetById = registry.getNetworkById('mainnet');
// Find network by alias
// @deprecated Use getNetworkByGraphId instead
const mainnetByAlias = registry.getNetworkByAlias('eth');
FAQs
TypeScript types and helpers for The Graph Networks Registry
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 5 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.