bitmask-core 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@ Core functionality for the BitMask wallet - <https://bitmask.app>
3
3
 
4
4
  **BitMask** is a bitcoin wallet and a browser extension for accessing decentralized web applications on the Bitcoin blokchain. It is designed to support UTXO based smart contracting protocols such as RGB, with planned support for Omni layer, TARO and many others.
5
5
 
6
-
6
+ [![Build status](https://img.shields.io/github/actions/workflow/status/diba-io/bitmask-core/rust.yaml?branch=development&style=flat-square)](https://github.com/diba-io/bitmask-core/actions/workflows/rust.yaml)
7
7
  [![Crates.io](https://img.shields.io/crates/v/bitmask-core?style=flat-square)](https://docs.rs/bitmask-core/latest/bitmask-core/)
8
8
  [![npm: bitmask-core](https://img.shields.io/npm/v/bitmask-core?style=flat-square)](https://www.npmjs.com/package/bitmask-core)
9
9
  [![License: MIT+APACHE](https://img.shields.io/crates/l/bitmask-core?style=flat-square)](https://mit-license.org)
@@ -23,6 +23,8 @@ Some environment variables may be needed in order to compile on macos-aarch64, f
23
23
 
24
24
  If there are issues compiling, be sure to check you're compiling with the latest Rust version.
25
25
 
26
+ To build this as a NodeJS module, use: `wasm-pack build --release --target bundler`
27
+
26
28
  ## Test
27
29
 
28
30
  1. Lint against wasm32: `cargo clippy --target wasm32-unknown-unknown`
@@ -35,3 +37,9 @@ To run the bitmaskd node with REST server, either for testing the web wallet, or
35
37
  `cargo install --features=server --path .`
36
38
 
37
39
  Then run `bitmaskd`.
40
+
41
+ ## Development
42
+
43
+ Parts of this application are built with conditional compilation statements for wasm32 support. This is a helpful command for checking linting and correctness while also developing on desktop platforms:
44
+
45
+ `cargo clippy --target wasm32-unknown-unknown --no-default-features --release`
package/bitmask_core.d.ts CHANGED
@@ -27,10 +27,11 @@ export function save_mnemonic_seed(mnemonic: string, encryption_password: string
27
27
  export function get_wallet_data(descriptor: string, change_descriptor?: string): Promise<any>;
28
28
  /**
29
29
  * @param {string} asset
30
- * @param {string} rgb_descriptor_xpub
30
+ * @param {string} utxo
31
+ * @param {string} blinded
31
32
  * @returns {Promise<any>}
32
33
  */
33
- export function import_asset(asset: string, rgb_descriptor_xpub: string): Promise<any>;
34
+ export function import_asset(asset: string, utxo: string, blinded: string): Promise<any>;
34
35
  /**
35
36
  * @param {string} utxo_string
36
37
  * @returns {Promise<any>}
@@ -208,7 +208,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
208
208
  return real;
209
209
  }
210
210
  function __wbg_adapter_28(arg0, arg1, arg2) {
211
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3796fc407ba133cc(arg0, arg1, addHeapObject(arg2));
211
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h57d3c75528372ef2(arg0, arg1, addHeapObject(arg2));
212
212
  }
213
213
 
214
214
  /**
@@ -272,15 +272,18 @@ export function get_wallet_data(descriptor, change_descriptor) {
272
272
 
273
273
  /**
274
274
  * @param {string} asset
275
- * @param {string} rgb_descriptor_xpub
275
+ * @param {string} utxo
276
+ * @param {string} blinded
276
277
  * @returns {Promise<any>}
277
278
  */
278
- export function import_asset(asset, rgb_descriptor_xpub) {
279
+ export function import_asset(asset, utxo, blinded) {
279
280
  const ptr0 = passStringToWasm0(asset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
280
281
  const len0 = WASM_VECTOR_LEN;
281
- const ptr1 = passStringToWasm0(rgb_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
+ const ptr1 = passStringToWasm0(utxo, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
283
  const len1 = WASM_VECTOR_LEN;
283
- const ret = wasm.import_asset(ptr0, len0, ptr1, len1);
284
+ const ptr2 = passStringToWasm0(blinded, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
285
+ const len2 = WASM_VECTOR_LEN;
286
+ const ret = wasm.import_asset(ptr0, len0, ptr1, len1, ptr2, len2);
284
287
  return takeObject(ret);
285
288
  }
286
289
 
@@ -566,7 +569,7 @@ function getArrayU8FromWasm0(ptr, len) {
566
569
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
567
570
  }
568
571
  function __wbg_adapter_137(arg0, arg1, arg2, arg3) {
569
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h15f50af40ffe315b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
572
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__hc589e029f5d654e1(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
570
573
  }
571
574
 
572
575
  export function __wbindgen_string_new(arg0, arg1) {
@@ -690,14 +693,6 @@ export function __wbg_randomFillSync_6894564c2c334c42() { return handleError(fun
690
693
  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
691
694
  }, arguments) };
692
695
 
693
- export function __wbg_randomFillSync_85b3f4c52c56c313(arg0, arg1, arg2) {
694
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
695
- };
696
-
697
- export function __wbg_getRandomValues_cd175915511f705e(arg0, arg1) {
698
- getObject(arg0).getRandomValues(getObject(arg1));
699
- };
700
-
701
696
  export function __wbg_self_7eede1f4488bf346() { return handleError(function () {
702
697
  const ret = self.self;
703
698
  return addHeapObject(ret);
@@ -733,6 +728,14 @@ export function __wbg_getRandomValues_307049345d0bd88c(arg0) {
733
728
  return addHeapObject(ret);
734
729
  };
735
730
 
731
+ export function __wbg_getRandomValues_cd175915511f705e(arg0, arg1) {
732
+ getObject(arg0).getRandomValues(getObject(arg1));
733
+ };
734
+
735
+ export function __wbg_randomFillSync_85b3f4c52c56c313(arg0, arg1, arg2) {
736
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
737
+ };
738
+
736
739
  export function __wbindgen_object_clone_ref(arg0) {
737
740
  const ret = getObject(arg0);
738
741
  return addHeapObject(ret);
@@ -1019,8 +1022,8 @@ export function __wbindgen_memory() {
1019
1022
  return addHeapObject(ret);
1020
1023
  };
1021
1024
 
1022
- export function __wbindgen_closure_wrapper3005(arg0, arg1, arg2) {
1023
- const ret = makeMutClosure(arg0, arg1, 941, __wbg_adapter_28);
1025
+ export function __wbindgen_closure_wrapper3047(arg0, arg1, arg2) {
1026
+ const ret = makeMutClosure(arg0, arg1, 953, __wbg_adapter_28);
1024
1027
  return addHeapObject(ret);
1025
1028
  };
1026
1029
 
Binary file
package/package.json CHANGED
@@ -6,11 +6,11 @@
6
6
  "Francisco Calderón <francisco@diba.io>"
7
7
  ],
8
8
  "description": "Core functionality for the BitMask wallet",
9
- "version": "0.4.2",
9
+ "version": "0.4.3",
10
10
  "license": "MIT",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://github.com/rgb-products/bitmask-core"
13
+ "url": "https://github.com/diba-io/bitmask-core"
14
14
  },
15
15
  "files": [
16
16
  "bitmask_core_bg.wasm",