Polkadot-API
Typescript API to interact with Polkadot chains.
npm install polkadot-api
Light client first
Built from the ground up for the light client, allowing the running of a node from the browser.
Fully typed API
IDEs show all the type information for every operation of a chain.
Lightweight
Minimal impact on the main bundle (under 50kB).
Features
- 🪶 Light client first: built on top of the new JSON-RPC spec to fully leverage the potential of light-clients.
- 💡 Delightful TypeScript support with types and docs generated from on-chain metadata.
- 📋 First class support for storage reads, constants, transactions, events and runtime calls.
- 🔗 Perform multiple connections to different chains simultaneously.
- 🔄 Prepare for upcoming runtime updates by generating multiple descriptors and performing compatibility checks.
- 🚀 Performant and lightweight: ships with multiple subpaths, so dApps don't bundle unnecessary assets.
- 🔢 Uses native BigInt, instead of large BigNumber libraries
- ⚡ Leverages dynamic imports to favour faster loading times.
- ✨ Promise-based and Observable-based APIs: use the one that best suit your needs and/or coding style.
- 🔑 Use signers from your browser extension, or from a private key.
- 🧩 Easy integration with PJS-based extensions.