Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chainx/wasm-crypto

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainx/wasm-crypto

Wrapper around crypto hashing functions

  • 2.21.0
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@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 -

const { u8aToHex } = require('@chainx/util');
const { bio39Generate, bip39ToSeed, waitReady } = require('@chainx/wasm-crypto');

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

  // generate phrase
  const phrase = bip39Generate();

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

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

FAQs

Package last updated on 05 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc