Socket
Book a DemoInstallSign in
Socket

@aritz-cracker/cryptowasm

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aritz-cracker/cryptowasm

ultra-lightweight library for Bitcoin, Bitcoin Cash, and Bitauth

latest
Source
npmnpm
Version
1.18.0
Version published
Maintainers
1
Created
Source

Cryptowasm

An ultra-lightweight JavaScript library exposing several cryptographic primitives commonly used in cryptocurrency

Cryptowasm has no dependencies and works in all JavaScript environments, including Node.js, Deno (probably), and browsers.

Purpose

Cryptowasm is a stripped-down fork of libauth by the very skillful bitjson, only including Secp256k1, sha1, sha256, sha512, and Ripemd160. No other utility tools or bitcoin(cash)-specific feature sets.

Getting Started

To get started, install cryptowasm:

npm install cryptowasm

And import the functionality you need:

import { instantiateSecp256k1 } from 'cryptowasm';
import { msgHash, pubkey, sig } from './somewhere';

(async () => {
  const secp256k1 = await instantiateSecp256k1();
  secp256k1.verifySignatureDERLowS(sig, pubkey, msgHash)
    ? console.log('🚀 Signature valid')
    : console.log('❌ Signature invalid');
})();

Stable API

The following APIs are considered stable, and will only include breaking changes in major version upgrades.

WebAssembly ECDSA & Schnorr

WebAssembly Hashing Functions

Keywords

wasm

FAQs

Package last updated on 16 Oct 2020

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