bitmask-core 0.4.2 → 0.4.4
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 +9 -1
- package/bitmask_core.d.ts +3 -2
- package/bitmask_core_bg.js +19 -16
- package/bitmask_core_bg.wasm +0 -0
- package/package.json +2 -2
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
|
+
[](https://github.com/diba-io/bitmask-core/actions/workflows/rust.yaml)
|
|
7
7
|
[](https://docs.rs/bitmask-core/latest/bitmask-core/)
|
|
8
8
|
[](https://www.npmjs.com/package/bitmask-core)
|
|
9
9
|
[](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}
|
|
30
|
+
* @param {string} utxo
|
|
31
|
+
* @param {string} blinded
|
|
31
32
|
* @returns {Promise<any>}
|
|
32
33
|
*/
|
|
33
|
-
export function import_asset(asset: string,
|
|
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>}
|
package/bitmask_core_bg.js
CHANGED
|
@@ -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.
|
|
211
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbe3df01c3df2952a(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}
|
|
275
|
+
* @param {string} utxo
|
|
276
|
+
* @param {string} blinded
|
|
276
277
|
* @returns {Promise<any>}
|
|
277
278
|
*/
|
|
278
|
-
export function import_asset(asset,
|
|
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(
|
|
282
|
+
const ptr1 = passStringToWasm0(utxo, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
282
283
|
const len1 = WASM_VECTOR_LEN;
|
|
283
|
-
const
|
|
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.
|
|
572
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2c2191a3f795eba0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
570
573
|
}
|
|
571
574
|
|
|
572
575
|
export function __wbindgen_string_new(arg0, arg1) {
|
|
@@ -959,6 +962,14 @@ export function __wbg_stringify_d6471d300ded9b68() { return handleError(function
|
|
|
959
962
|
return addHeapObject(ret);
|
|
960
963
|
}, arguments) };
|
|
961
964
|
|
|
965
|
+
export function __wbg_getRandomValues_02639197c8166a96(arg0, arg1, arg2) {
|
|
966
|
+
getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
export function __wbg_randomFillSync_dd2297de5917c74e(arg0, arg1, arg2) {
|
|
970
|
+
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
971
|
+
};
|
|
972
|
+
|
|
962
973
|
export function __wbg_new_d87f272aec784ec0(arg0, arg1) {
|
|
963
974
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
964
975
|
return addHeapObject(ret);
|
|
@@ -994,14 +1005,6 @@ export function __wbg_require_0993fe224bf8e202(arg0, arg1) {
|
|
|
994
1005
|
return addHeapObject(ret);
|
|
995
1006
|
};
|
|
996
1007
|
|
|
997
|
-
export function __wbg_randomFillSync_dd2297de5917c74e(arg0, arg1, arg2) {
|
|
998
|
-
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
999
|
-
};
|
|
1000
|
-
|
|
1001
|
-
export function __wbg_getRandomValues_02639197c8166a96(arg0, arg1, arg2) {
|
|
1002
|
-
getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
|
|
1003
|
-
};
|
|
1004
|
-
|
|
1005
1008
|
export function __wbindgen_debug_string(arg0, arg1) {
|
|
1006
1009
|
const ret = debugString(getObject(arg1));
|
|
1007
1010
|
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1019,8 +1022,8 @@ export function __wbindgen_memory() {
|
|
|
1019
1022
|
return addHeapObject(ret);
|
|
1020
1023
|
};
|
|
1021
1024
|
|
|
1022
|
-
export function
|
|
1023
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1025
|
+
export function __wbindgen_closure_wrapper3033(arg0, arg1, arg2) {
|
|
1026
|
+
const ret = makeMutClosure(arg0, arg1, 942, __wbg_adapter_28);
|
|
1024
1027
|
return addHeapObject(ret);
|
|
1025
1028
|
};
|
|
1026
1029
|
|
package/bitmask_core_bg.wasm
CHANGED
|
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.
|
|
9
|
+
"version": "0.4.4",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "https://github.com/diba-io/bitmask-core"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"bitmask_core_bg.wasm",
|