OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

@polkadot/wasm

@polkadot/wasm is a TypeScript library of WebAssembly wrappers around Rust libraries, including hashing and sr25519 and ed25519 cryptographic functions for Polkadot and Substrate JavaScript tooling.

Independent OpenViST project profile, based on linked sources.

@polkadot/wasm — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Polkadot or Substrate JavaScript project needs the Rust-backed WebAssembly functions provided by the library, particularly sr25519 or ed25519 cryptography and hashing.

Who it is for

  • Developers building JavaScript tools for Polkadot or Substrate.
  • Maintainers integrating hashing or sr25519 and ed25519 functions into blockchain client libraries.

Documented uses

  • Use WebAssembly-backed hashing functions in JavaScript tooling.
  • Integrate sr25519 or ed25519 cryptographic functions into a Polkadot or Substrate project.
  • Use WebAssembly implementations of utility functions where supported.
Before you choose

Requirements & limits

The public GitHub repository is licensed under Apache-2.0. Its development instructions recommend Yarn workspaces and installing dependencies with yarn.

  • The README identifies hashing, sr25519, and ed25519 functions in the wasm-crypto package.
  • JavaScript fallbacks are available for some interfaces, such as hashing, in the broader utility context; the README says sr25519 is WASM-only there.
  • WebAssembly compilation and optimization add build overhead.
  • The repository recommends yarn for dependency installation and warns that npm results in broken dependencies.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the repository’s workspace dependencies

Prepare a cloned @polkadot/wasm repository by installing dependencies with its documented workspace package manager.

Before you start

  • A clone of the @polkadot/wasm repository
  • Yarn

Steps

  1. Clone the repository.

  2. From the repository, install its dependencies with yarn; the README advises against using npm because it results in broken dependencies.

Expected outcome

Dependencies are installed using the package manager specified for the repository’s Yarn workspaces.

Guide limitations

  • This covers dependency setup only; it does not document building, running, or integrating the wrappers.
  • The README says dependencies should be installed with Yarn but does not specify a Yarn version.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
11 October 2026
Original website title
polkadot-js/wasm · Official homepage title · retained in its source language