
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
@polkadot/api
Advanced tools
Warning - currently this does not actually do all that much, it is an attempt to put into code some thoughts about how to maintain the endpoints. This library provides a clean wrapper around all the methods exposed by a Polkadot network client. Methods are auto-generated for the JsonRPC interface definitions.
Installation -
npm install --save @polkadot/api
Initialisation -
import Api from '@polkadot/api';
import HttpProvider from '@polkadot/api-provider/http';
const provider = new HttpProvider('http://127.0.0.1:9933');
const api = new Api(provider);
Making calls -
api.chain
.getHeader('0x1234567890')
.then((header) => console.log(header))
.catch((error) => console.error(error));
For a list of currently exposed methods, see the @polkadot/api-jsonrpc repository.
FAQs
Promise and RxJS wrappers around the Polkadot JS RPC
The npm package @polkadot/api receives a total of 107,754 weekly downloads. As such, @polkadot/api popularity was classified as popular.
We found that @polkadot/api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.