Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/firaenix/bsv-wasm
BSV stdlib written in Rust and runs in WASM environments
https://github.com/firaenix/bsv-wasm
bitcoin bitcoin-sv bsv cryptography rust wasm webassembly
Last synced: 4 days ago
JSON representation
BSV stdlib written in Rust and runs in WASM environments
- Host: GitHub
- URL: https://github.com/firaenix/bsv-wasm
- Owner: Firaenix
- License: mit
- Created: 2021-03-17T13:05:29.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T14:54:48.000Z (about 1 year ago)
- Last Synced: 2025-02-16T11:56:06.193Z (4 days ago)
- Topics: bitcoin, bitcoin-sv, bsv, cryptography, rust, wasm, webassembly
- Language: Rust
- Homepage:
- Size: 5.4 MB
- Stars: 68
- Watchers: 7
- Forks: 18
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE_MIT
Awesome Lists containing this project
README
# BSV.WASM/BSV-RS
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/bsvDeno:
```js
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:
- [ ] Split WASM modules from Rust - Release standalone bsv-rs
- [ ] Break WASM packages up to be more modular
- [ ] Allow Interop between WASM Packages
- [ ] Write documentation (Inline on functions and structs)### Thanks
- Brenton Gunning [(rust-sv)](https://github.com/brentongunning/rust-sv)
- Moneybutton Team [(bsv.js)](https://github.com/moneybutton/bsv)
- [Bitping Team](https://bitping.com)
- [learnmeabitcoin.com](https://learnmeabitcoin.com)
- [Bitcoin SV Wiki](https://wiki.bitcoinsv.io)