# @polkadot/wasm-crypto

> A wasm interface layer for use by @polkadot/util-crypto

Latest version **7.5.4** (published 2025-12-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @polkadot/wasm-crypto
pnpm add @polkadot/wasm-crypto
yarn add @polkadot/wasm-crypto
bun add @polkadot/wasm-crypto
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.5.4 |
| Published | 2025-12-09 |
| First published | 2019-03-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 6 |
| Unpacked size | 296.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 136 |
| Author | Jaco Greeff |
| Maintainers | jacogr, polkadotjs |

## Links

- npm: https://www.npmjs.com/package/@polkadot/wasm-crypto
- Repository: https://github.com/polkadot-js/wasm
- Homepage: https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto#readme
- Issues: https://github.com/polkadot-js/wasm/issues
- npm.io page: https://npm.io/package/@polkadot/wasm-crypto

## Dependencies (6)

- [tslib](https://npm.io/package/tslib.md) ^2.7.0
- [@polkadot/wasm-util](https://npm.io/package/@polkadot/wasm-util.md) 7.5.4
- [@polkadot/wasm-bridge](https://npm.io/package/@polkadot/wasm-bridge.md) 7.5.4
- [@polkadot/wasm-crypto-init](https://npm.io/package/@polkadot/wasm-crypto-init.md) 7.5.4
- [@polkadot/wasm-crypto-wasm](https://npm.io/package/@polkadot/wasm-crypto-wasm.md) 7.5.4
- [@polkadot/wasm-crypto-asmjs](https://npm.io/package/@polkadot/wasm-crypto-asmjs.md) 7.5.4

## Recent versions

- 7.5.4 (latest) — 2025-12-09
- 6.1.4-0 (beta) — 2022-06-21
- 7.5.3 — 2025-11-24
- 7.5.2 — 2025-11-11
- 7.5.1 — 2025-08-25
- 7.4.1 — 2024-10-21
- 7.3.2 — 2023-12-06
- 7.3.1 — 2023-11-17
- 7.2.2 — 2023-08-17
- 7.2.1 — 2023-05-13
- 7.1.2 — 2023-04-28
- 7.1.1 — 2023-04-22
- 7.0.3 — 2023-03-11
- 7.0.2 — 2023-03-04
- 7.0.1 — 2023-03-04
- … 554 more at https://npm.io/package/@polkadot/wasm-crypto/versions

## README

# @polkadot/wasm-crypto

Wrapper around crypto hashing functions

## Usage

Install the package (also requires `@polkadot/util` for `TextEncoder` polyfills - not included here as a dependency to keep the tree lean)

`yarn add @polkadot/wasm-crypto @polkadot/util`

Use it -

```js
import { u8aToHex } from '@polkadot/util';
import { bip39Generate, bip39ToSeed, waitReady } from '@polkadot/wasm-crypto';

// first wait until the WASM has been loaded (async init)
await waitReady();

// generate phrase
const phrase = bip39Generate(12);

// get ed25519 seed from phrase
const seed = bip39ToSeed(phrase, '');

// display
console.log('phrase:', phrase);
console.log('seed:', u8aToHex(seed));
```

---
_Source: https://npm.io/package/@polkadot/wasm-crypto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
