Skip to content

shawntabrizi/substrate-js-utilities

Repository files navigation

Substrate JS Utilities

A collection of browser-based utilities for working with Substrate and Polkadot data. No build step required — just static HTML and JavaScript.

Live site: shawntabrizi.com/substrate-js-utilities

Utilities

Main Page

  • String to Hex — Bidirectional string/hex conversion
  • Balance to Hex — Number to little-endian hex conversion
  • AccountId to Hex — SS58 address to raw hex bytes
  • Blake2 Hash — Blake2b hashing with configurable bit length
  • Blake2 Concat — Blake2b hash concatenated with input
  • XXHash — TwoX hashing with configurable bit length
  • XXHash Concat — TwoX hash concatenated with input
  • Seed to Address — Generate SS58 address from a seed phrase
  • Change Address Prefix — Convert addresses between network prefixes
  • Module ID to Address — Convert a pallet ID to its sovereign account
  • Pallet ID Sub-Account — Derive pallet sub-accounts from a pallet ID and index
  • Para ID to Address — Derive parachain sovereign accounts (child or sibling)
  • Sub-Account Generator — Derive Utility pallet sub-accounts
  • Ethereum to Substrate Address — Bidirectional ETH/Substrate address conversion
  • u8a Array to Hex — Convert byte arrays to hex and back
  • Number to Hex — Configurable bit length, endianness, and SCALE compact encoding

Additional Pages

Development

No build step needed. The site runs as static files with dependencies loaded via CDN.

Running Tests

npm install
npm test

Tests use Node's built-in test runner and cover all utility logic (SCALE encoding/decoding, address derivation, hashing, conversions, etc.).

License

MIT

About

A set of useful JavaScript utilities for Substrate using Polkadot.js API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors