Skip to content
Utilities and base libraries for use across polkadot-js. Includes base libraries, crypto helpers and tools for working with Trie hashes & databases. Full documentation & examples available
Branch: master
Clone or download
Travis CI
Latest commit 18278b4 Jul 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Swap to using eslint (#435) Jul 14, 2019
packages [CI Skip] 0.94.0-beta.15 Jul 17, 2019
.babelrc.js TypeScript conversion (#142) Jun 22, 2018
.codeclimate.yml [CI Skip] Update .codeclimate.yml (#268) Dec 8, 2018
.editorconfig Initial add (split from @polkadot/api) Nov 18, 2017
.eslintignore Swap to using eslint (#435) Jul 14, 2019
.eslintrc.js Swap to using eslint (#435) Jul 14, 2019
.gitignore rm -rf cc-test-reporter Apr 29, 2019
.npmignore Pull flow-typed from @polkadot/dev (#20) Nov 26, 2017
.nvmrc docs: Fixes #157. Add Gitbook documentation for Polkadot-JS Common (#231 Oct 19, 2018
.travis.yml Bumps (#398) Apr 29, 2019
123trigger Create 123trigger Jul 17, 2019 0.93 (#423) Jun 14, 2019 Build docs to gh-pages (#341) Feb 28, 2019
LICENSE LICENSE and README updates (#254) Nov 21, 2018 Update (#425) Jun 14, 2019
babel.config.js Use @babel 7 (#126) May 16, 2018
jest.config.js Swap to using eslint (#435) Jul 14, 2019
lerna.json [CI Skip] 0.94.0-beta.15 Jul 17, 2019
package.json [CI Skip] 0.94.0-beta.15 Jul 17, 2019
typedoc.js Swap docs to use vuepress (#330) Feb 26, 2019
yarn.lock Bump wasm-crypto (#442) Jul 17, 2019

polkadotjs license style npm travis maintainability coverage greenkeeper


Various useful utility functions that are used across all projects in the @polkadot namespace. It provides utility functions with additional safety checks, allowing not only for consistent coding, but also reducing the general boilerplate.


This repository is split up into a number of internal packages, namely utilities -

Various useful trie and database interfaces -

  • db Sync memory and disk database interfaces
  • trie-db Merkle Patricia Tree implementation adapcted for Polkadot
  • trie-hash Calculate hashes (either ordered or unordered) from a set of inputs


Contributions are welcome!

To start off, this repo (along with others in the @polkadot family) uses yarn workspaces to organise the code. As such, after cloning, its dependencies should be installed via yarn, not via npm; the latter will result in broken dependencies.

To get started -

  1. Clone the repo locally, via git clone <optional local path>
  2. Ensure that you have a recent version of Node.js, for development purposes Node 10 is recommended.
  3. Ensure that you have a recent version of Yarn, for development purposes Yarn >=1.10.1 is required.
  4. Install the dependencies by running yarn
  5. Build the everything via yarn run build
  6. You can also launch the API Docs, via yarn vuepress dev docs
  7. Access the docs via http://localhost:8080


Looking for tutorials to get started? Look at examples for guides on how to use the base utilities.

You can’t perform that action at this time.