bsv-wasm

Crates.iobsv-wasm
lib.rsbsv-wasm
version1.3.4
sourcesrc
created_at2021-05-07 03:37:38.853185
updated_at2022-06-05 00:23:37.744669
descriptionA Bitcoin SV library with WASM in mind.
homepage
repository
max_upload_size
id394084
size1,775,652
Nick (Firaenix)

documentation

README

BSV.WASM

A Rust/WASM Library to interact with Bitcoin SV

Installation

NodeJS 14.6+:
npm i bsv-wasm --save

Web:
npm i bsv-wasm-web --save

Webpack:
npm i bsv-wasm-bundler --save

Rust:
https://crates.io/crates/bsv-wasm

Deno:

import init, { Transaction } from "https://deno.land/x/bsv_wasm@{VERSION}/bsv_wasm.js"
await init();

Usage

Note: Rust and JS/TS method names and structs are the same

  • Eg. Derive private key from XPriv and log out P2PKH String ExtendedPrivateKey.fromWIF('LMyWif...').toPrivateKey().toPublicKey().toAddress().toString()

Features

  • Hash (SHA256, SHA256d, SHA1, RIPEMD160, Hash160, SHA512)
  • KDF (PBKDF2)
  • Encryption (AES-CBC, AES-CTR)
  • ECDSA (Private Key, Public Key, Signatures)
  • Transaction (Building, Serialising, Deserialising)
  • Script (Serialising, Deserialising)
  • Script Matching (ScriptTemplate)
  • Addresses (P2PKH)
  • Sighash Support
  • Extended Private Keys and Child Derivation (BIP32, BIP42)
  • Testnet support

TODO:

  • Isomorphic Package for JS
  • Write documentation (Inline on functions and structs)

Will not do:

  • Mnemonics

Thanks

Commit count: 0

cargo fmt