Socket
Socket
Sign inDemoInstall

@polkadot/networks

Package Overview
Dependencies
Maintainers
2
Versions
748
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/networks

A list of all available Substrate networks and their applicable prefixes


Version published
Weekly downloads
116K
increased by5.6%
Maintainers
2
Weekly downloads
 
Created

What is @polkadot/networks?

@polkadot/networks is a utility package that provides information about various networks in the Polkadot ecosystem. It includes details such as network names, prefixes, and other relevant metadata.

What are @polkadot/networks's main functionalities?

Get Network Information

This feature allows you to retrieve information about a specific network in the Polkadot ecosystem. In this example, we fetch details about the Polkadot network.

const { knownSubstrate } = require('@polkadot/networks');

const networkInfo = knownSubstrate.find(network => network.network === 'polkadot');
console.log(networkInfo);

List All Networks

This feature allows you to list all available networks in the Polkadot ecosystem. The code sample demonstrates how to extract and print the names of all networks.

const { knownSubstrate } = require('@polkadot/networks');

const allNetworks = knownSubstrate.map(network => network.network);
console.log(allNetworks);

Get Network Prefix

This feature allows you to retrieve the prefix of a specific network. In this example, we fetch the prefix for the Kusama network.

const { knownSubstrate } = require('@polkadot/networks');

const networkPrefix = knownSubstrate.find(network => network.network === 'kusama').prefix;
console.log(networkPrefix);
0

FAQs

Package last updated on 18 Dec 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc