bsv-wasm-bundler
Advanced tools
Comparing version 1.3.0-beta.7 to 1.3.0
@@ -485,16 +485,2 @@ /* tslint:disable */ | ||
*/ | ||
export enum AESAlgorithms { | ||
AES128_CBC, | ||
AES256_CBC, | ||
AES128_CTR, | ||
AES256_CTR, | ||
} | ||
/** | ||
*/ | ||
export enum SigningHash { | ||
Sha256, | ||
Sha256d, | ||
} | ||
/** | ||
*/ | ||
export enum SigHash { | ||
@@ -563,2 +549,8 @@ FORKID, | ||
*/ | ||
export enum SigningHash { | ||
Sha256, | ||
Sha256d, | ||
} | ||
/** | ||
*/ | ||
export enum DataLengthConstraints { | ||
@@ -588,2 +580,10 @@ Equals, | ||
*/ | ||
export enum AESAlgorithms { | ||
AES128_CBC, | ||
AES256_CBC, | ||
AES128_CTR, | ||
AES256_CTR, | ||
} | ||
/** | ||
*/ | ||
export class AES { | ||
@@ -765,10 +765,2 @@ free(): void; | ||
/** | ||
* @param {Uint8Array} message | ||
* @param {PublicKey} pub_key | ||
* @param {Signature} signature | ||
* @param {number} hash_algo | ||
* @returns {boolean} | ||
*/ | ||
static verify(message: Uint8Array, pub_key: PublicKey, signature: Signature, hash_algo: number): boolean; | ||
/** | ||
* @param {PrivateKey} private_key | ||
@@ -806,2 +798,10 @@ * @param {Uint8Array} preimage | ||
static privateKeyFromSignatureK(signature: Signature, public_key: PublicKey, ephemeral_key: PrivateKey, preimage: Uint8Array, hash_algo: number): PrivateKey; | ||
/** | ||
* @param {Uint8Array} message | ||
* @param {PublicKey} pub_key | ||
* @param {Signature} signature | ||
* @param {number} hash_algo | ||
* @returns {boolean} | ||
*/ | ||
static verify(message: Uint8Array, pub_key: PublicKey, signature: Signature, hash_algo: number): boolean; | ||
} | ||
@@ -808,0 +808,0 @@ /** |
@@ -7,3 +7,3 @@ { | ||
"description": "A Bitcoin SV library with WASM in mind.", | ||
"version": "1.3.0-beta.7", | ||
"version": "1.3.0", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "files": [ |
@@ -6,3 +6,3 @@ # BSV.WASM | ||
## Installation | ||
NodeJS: | ||
NodeJS 14.6+: | ||
`npm i bsv-wasm --save` | ||
@@ -19,3 +19,9 @@ | ||
Deno: | ||
```js | ||
import init, { Transaction } from "https://deno.land/x/bsv_wasm@{VERSION}/bsv_wasm.js" | ||
await init(); | ||
``` | ||
## Usage | ||
@@ -27,7 +33,2 @@ ### Note: Rust and JS/TS method names and structs are the same | ||
## Caveats | ||
- **IMPORTANT**: Call `.free()` on every WASM object after you are done with it to prevent memory leaks and slowdown. This is required because WASM->JS interaction doesnt have garbage collection implemented for it. When the Javascript object goes out of scope, it will free the pointer to the WASM object but never free the memory allocated by the WASM runtime. | ||
- Bitcoin Signed Message (BSM) struct does not implement any base64 string parsing, please pass the raw Signature type or call `fromCompactBytes` on the Signature struct and pass it to the BSM.verify function. | ||
## Features | ||
@@ -40,11 +41,11 @@ - Hash (SHA256, SHA256d, SHA1, RIPEMD160, Hash160, SHA512) | ||
- Script (Serialising, Deserialising) | ||
- Script Matching (ScriptTemplate) | ||
- Addresses (P2PKH) | ||
- Sighash Support | ||
- Extended Private Keys and Child Derivation (BIP32, BIP42) | ||
- Testnet support | ||
## TODO: | ||
- [ ] Script Builder | ||
- [ ] Isomorphic Package for JS | ||
- [ ] Write documentation (Inline on functions and structs) | ||
- [ ] Testnet Support | ||
@@ -51,0 +52,0 @@ ## Will not do: |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
57
993980