saito-wasm 0.2.160 → 0.2.161

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/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "saito-wasm"
3
- version = "0.2.160"
3
+ version = "0.2.161"
4
4
  edition = "2021"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.160",
3
+ "version": "0.2.161",
4
4
  "description": "js wrappings around saito-core using wasm",
5
5
  "scripts": {
6
6
  "test": "./node_modules/.bin/jest",
package/pkg/node/index.js CHANGED
@@ -1,29 +1,33 @@
1
1
  let imports = {};
2
2
  imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
- const { MsgHandler } = require(String.raw`./snippets/saito-wasm-122825cf7c5f39f7/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-7abf862820f718f5/js/msg_handler.js`);
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
- const heap = new Array(128).fill(undefined);
8
-
9
- heap.push(undefined, null, true, false);
7
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
8
 
11
- function getObject(idx) { return heap[idx]; }
9
+ cachedTextDecoder.decode();
12
10
 
13
- let heap_next = heap.length;
11
+ let cachedUint8Memory0 = null;
14
12
 
15
- function dropObject(idx) {
16
- if (idx < 132) return;
17
- heap[idx] = heap_next;
18
- heap_next = idx;
13
+ function getUint8Memory0() {
14
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
15
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
16
+ }
17
+ return cachedUint8Memory0;
19
18
  }
20
19
 
21
- function takeObject(idx) {
22
- const ret = getObject(idx);
23
- dropObject(idx);
24
- return ret;
20
+ function getStringFromWasm0(ptr, len) {
21
+ ptr = ptr >>> 0;
22
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
25
23
  }
26
24
 
25
+ const heap = new Array(128).fill(undefined);
26
+
27
+ heap.push(undefined, null, true, false);
28
+
29
+ let heap_next = heap.length;
30
+
27
31
  function addHeapObject(obj) {
28
32
  if (heap_next === heap.length) heap.push(heap.length + 1);
29
33
  const idx = heap_next;
@@ -33,22 +37,18 @@ function addHeapObject(obj) {
33
37
  return idx;
34
38
  }
35
39
 
36
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
37
-
38
- cachedTextDecoder.decode();
39
-
40
- let cachedUint8Memory0 = null;
40
+ function getObject(idx) { return heap[idx]; }
41
41
 
42
- function getUint8Memory0() {
43
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
44
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
45
- }
46
- return cachedUint8Memory0;
42
+ function dropObject(idx) {
43
+ if (idx < 132) return;
44
+ heap[idx] = heap_next;
45
+ heap_next = idx;
47
46
  }
48
47
 
49
- function getStringFromWasm0(ptr, len) {
50
- ptr = ptr >>> 0;
51
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
48
+ function takeObject(idx) {
49
+ const ret = getObject(idx);
50
+ dropObject(idx);
51
+ return ret;
52
52
  }
53
53
 
54
54
  let WASM_VECTOR_LEN = 0;
@@ -2642,42 +2642,32 @@ class WasmWalletSlip {
2642
2642
  }
2643
2643
  module.exports.WasmWalletSlip = WasmWalletSlip;
2644
2644
 
2645
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
2646
- takeObject(arg0);
2647
- };
2648
-
2649
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2650
- const ret = BigInt.asUintN(64, arg0);
2651
- return addHeapObject(ret);
2652
- };
2653
-
2654
- module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2655
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2656
- return addHeapObject(ret);
2657
- };
2658
-
2659
2645
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
2660
2646
  const ret = getStringFromWasm0(arg0, arg1);
2661
2647
  return addHeapObject(ret);
2662
2648
  };
2663
2649
 
2650
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2651
+ takeObject(arg0);
2652
+ };
2653
+
2664
2654
  module.exports.__wbg_wasmtransaction_new = function(arg0) {
2665
2655
  const ret = WasmTransaction.__wrap(arg0);
2666
2656
  return addHeapObject(ret);
2667
2657
  };
2668
2658
 
2669
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2670
- const ret = WasmPeer.__wrap(arg0);
2659
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2660
+ const ret = BigInt.asUintN(64, arg0);
2671
2661
  return addHeapObject(ret);
2672
2662
  };
2673
2663
 
2674
- module.exports.__wbg_wasmblock_new = function(arg0) {
2675
- const ret = WasmBlock.__wrap(arg0);
2664
+ module.exports.__wbg_wasmslip_new = function(arg0) {
2665
+ const ret = WasmSlip.__wrap(arg0);
2676
2666
  return addHeapObject(ret);
2677
2667
  };
2678
2668
 
2679
- module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2680
- const ret = WasmWalletSlip.__wrap(arg0);
2669
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2670
+ const ret = WasmPeer.__wrap(arg0);
2681
2671
  return addHeapObject(ret);
2682
2672
  };
2683
2673
 
@@ -2690,8 +2680,13 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
2690
2680
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2691
2681
  };
2692
2682
 
2693
- module.exports.__wbg_wasmnft_new = function(arg0) {
2694
- const ret = WasmNFT.__wrap(arg0);
2683
+ module.exports.__wbindgen_object_clone_ref = function(arg0) {
2684
+ const ret = getObject(arg0);
2685
+ return addHeapObject(ret);
2686
+ };
2687
+
2688
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2689
+ const ret = WasmBlockchain.__wrap(arg0);
2695
2690
  return addHeapObject(ret);
2696
2691
  };
2697
2692
 
@@ -2700,18 +2695,23 @@ module.exports.__wbg_wasmwallet_new = function(arg0) {
2700
2695
  return addHeapObject(ret);
2701
2696
  };
2702
2697
 
2703
- module.exports.__wbg_wasmslip_new = function(arg0) {
2704
- const ret = WasmSlip.__wrap(arg0);
2698
+ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2699
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2705
2700
  return addHeapObject(ret);
2706
2701
  };
2707
2702
 
2708
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
2709
- const ret = getObject(arg0);
2703
+ module.exports.__wbg_wasmblock_new = function(arg0) {
2704
+ const ret = WasmBlock.__wrap(arg0);
2710
2705
  return addHeapObject(ret);
2711
2706
  };
2712
2707
 
2713
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2714
- const ret = WasmBlockchain.__wrap(arg0);
2708
+ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2709
+ const ret = WasmWalletSlip.__wrap(arg0);
2710
+ return addHeapObject(ret);
2711
+ };
2712
+
2713
+ module.exports.__wbg_wasmnft_new = function(arg0) {
2714
+ const ret = WasmNFT.__wrap(arg0);
2715
2715
  return addHeapObject(ret);
2716
2716
  };
2717
2717
 
@@ -2725,15 +2725,15 @@ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2725
2725
  return addHeapObject(ret);
2726
2726
  };
2727
2727
 
2728
- module.exports.__wbg_sendmessage_c80eaa9b19e0ac36 = function(arg0, arg1) {
2728
+ module.exports.__wbg_sendmessage_2ec021f2331a30ec = function(arg0, arg1) {
2729
2729
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2730
2730
  };
2731
2731
 
2732
- module.exports.__wbg_sendmessagetoall_2a745f01564e1a27 = function(arg0, arg1) {
2732
+ module.exports.__wbg_sendmessagetoall_ed21e40a37b3756d = function(arg0, arg1) {
2733
2733
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2734
2734
  };
2735
2735
 
2736
- module.exports.__wbg_connecttopeer_c9687fa011b843ee = function() { return handleError(function (arg0, arg1, arg2) {
2736
+ module.exports.__wbg_connecttopeer_d9c0012333c1437e = function() { return handleError(function (arg0, arg1, arg2) {
2737
2737
  let deferred0_0;
2738
2738
  let deferred0_1;
2739
2739
  try {
@@ -2746,12 +2746,12 @@ module.exports.__wbg_connecttopeer_c9687fa011b843ee = function() { return handle
2746
2746
  }
2747
2747
  }, arguments) };
2748
2748
 
2749
- module.exports.__wbg_disconnectfrompeer_252c41da932cfd9f = function() { return handleError(function (arg0) {
2749
+ module.exports.__wbg_disconnectfrompeer_3d1d80c79865ac44 = function() { return handleError(function (arg0) {
2750
2750
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2751
2751
  return addHeapObject(ret);
2752
2752
  }, arguments) };
2753
2753
 
2754
- module.exports.__wbg_fetchblockfrompeer_a544fc87bb886d10 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2754
+ module.exports.__wbg_fetchblockfrompeer_b7db05d9da1ee6e5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2755
2755
  let deferred0_0;
2756
2756
  let deferred0_1;
2757
2757
  try {
@@ -2764,7 +2764,7 @@ module.exports.__wbg_fetchblockfrompeer_a544fc87bb886d10 = function() { return h
2764
2764
  }
2765
2765
  }, arguments) };
2766
2766
 
2767
- module.exports.__wbg_writevalue_1de47e80b5beca95 = function(arg0, arg1, arg2) {
2767
+ module.exports.__wbg_writevalue_a7c9fd75e5362a0a = function(arg0, arg1, arg2) {
2768
2768
  let deferred0_0;
2769
2769
  let deferred0_1;
2770
2770
  try {
@@ -2776,7 +2776,7 @@ module.exports.__wbg_writevalue_1de47e80b5beca95 = function(arg0, arg1, arg2) {
2776
2776
  }
2777
2777
  };
2778
2778
 
2779
- module.exports.__wbg_appendvalue_c4fdadef535a2ed8 = function(arg0, arg1, arg2) {
2779
+ module.exports.__wbg_appendvalue_47a9f88e91fb3f21 = function(arg0, arg1, arg2) {
2780
2780
  let deferred0_0;
2781
2781
  let deferred0_1;
2782
2782
  try {
@@ -2788,7 +2788,7 @@ module.exports.__wbg_appendvalue_c4fdadef535a2ed8 = function(arg0, arg1, arg2) {
2788
2788
  }
2789
2789
  };
2790
2790
 
2791
- module.exports.__wbg_flushdata_581cc9cb44db9d33 = function(arg0, arg1) {
2791
+ module.exports.__wbg_flushdata_b5e6923b95569717 = function(arg0, arg1) {
2792
2792
  let deferred0_0;
2793
2793
  let deferred0_1;
2794
2794
  try {
@@ -2800,7 +2800,7 @@ module.exports.__wbg_flushdata_581cc9cb44db9d33 = function(arg0, arg1) {
2800
2800
  }
2801
2801
  };
2802
2802
 
2803
- module.exports.__wbg_readvalue_d87fdba36bd6d60e = function() { return handleError(function (arg0, arg1) {
2803
+ module.exports.__wbg_readvalue_cce66abba4678860 = function() { return handleError(function (arg0, arg1) {
2804
2804
  let deferred0_0;
2805
2805
  let deferred0_1;
2806
2806
  try {
@@ -2813,12 +2813,12 @@ module.exports.__wbg_readvalue_d87fdba36bd6d60e = function() { return handleErro
2813
2813
  }
2814
2814
  }, arguments) };
2815
2815
 
2816
- module.exports.__wbg_loadblockfilelist_7e2487784e15319e = function() { return handleError(function () {
2816
+ module.exports.__wbg_loadblockfilelist_6ee195b852fb0251 = function() { return handleError(function () {
2817
2817
  const ret = MsgHandler.load_block_file_list();
2818
2818
  return addHeapObject(ret);
2819
2819
  }, arguments) };
2820
2820
 
2821
- module.exports.__wbg_isexistingfile_c1cf4925a7493fef = function() { return handleError(function (arg0, arg1) {
2821
+ module.exports.__wbg_isexistingfile_2b9a4fbeaf73b278 = function() { return handleError(function (arg0, arg1) {
2822
2822
  let deferred0_0;
2823
2823
  let deferred0_1;
2824
2824
  try {
@@ -2831,7 +2831,7 @@ module.exports.__wbg_isexistingfile_c1cf4925a7493fef = function() { return handl
2831
2831
  }
2832
2832
  }, arguments) };
2833
2833
 
2834
- module.exports.__wbg_removevalue_1acaace00e2d4fc2 = function() { return handleError(function (arg0, arg1) {
2834
+ module.exports.__wbg_removevalue_3b721b1437117d87 = function() { return handleError(function (arg0, arg1) {
2835
2835
  let deferred0_0;
2836
2836
  let deferred0_1;
2837
2837
  try {
@@ -2844,7 +2844,7 @@ module.exports.__wbg_removevalue_1acaace00e2d4fc2 = function() { return handleEr
2844
2844
  }
2845
2845
  }, arguments) };
2846
2846
 
2847
- module.exports.__wbg_ensureblockdirectoryexists_b6ce5b7f9adb4b80 = function() { return handleError(function (arg0, arg1) {
2847
+ module.exports.__wbg_ensureblockdirectoryexists_fa8ada2200733e99 = function() { return handleError(function (arg0, arg1) {
2848
2848
  let deferred0_0;
2849
2849
  let deferred0_1;
2850
2850
  try {
@@ -2856,19 +2856,19 @@ module.exports.__wbg_ensureblockdirectoryexists_b6ce5b7f9adb4b80 = function() {
2856
2856
  }
2857
2857
  }, arguments) };
2858
2858
 
2859
- module.exports.__wbg_processapicall_9b7712d650f2b70e = function(arg0, arg1, arg2) {
2859
+ module.exports.__wbg_processapicall_5004afd43c1ee680 = function(arg0, arg1, arg2) {
2860
2860
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2861
2861
  };
2862
2862
 
2863
- module.exports.__wbg_processapisuccess_7391a7e5c6ee9416 = function(arg0, arg1, arg2) {
2863
+ module.exports.__wbg_processapisuccess_92a95540a6660a60 = function(arg0, arg1, arg2) {
2864
2864
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2865
2865
  };
2866
2866
 
2867
- module.exports.__wbg_processapierror_f05e49407e18b500 = function(arg0, arg1, arg2) {
2867
+ module.exports.__wbg_processapierror_d8c1fa7448823bc2 = function(arg0, arg1, arg2) {
2868
2868
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2869
2869
  };
2870
2870
 
2871
- module.exports.__wbg_sendinterfaceevent_92fcef30fc9a3ff0 = function(arg0, arg1, arg2, arg3, arg4) {
2871
+ module.exports.__wbg_sendinterfaceevent_563825bcd92676c7 = function(arg0, arg1, arg2, arg3, arg4) {
2872
2872
  let deferred0_0;
2873
2873
  let deferred0_1;
2874
2874
  let deferred1_0;
@@ -2885,7 +2885,7 @@ module.exports.__wbg_sendinterfaceevent_92fcef30fc9a3ff0 = function(arg0, arg1,
2885
2885
  }
2886
2886
  };
2887
2887
 
2888
- module.exports.__wbg_sendblocksuccess_6f7db513ee6cb0cf = function(arg0, arg1, arg2) {
2888
+ module.exports.__wbg_sendblocksuccess_2ba6e16e88f766bc = function(arg0, arg1, arg2) {
2889
2889
  let deferred0_0;
2890
2890
  let deferred0_1;
2891
2891
  try {
@@ -2897,11 +2897,11 @@ module.exports.__wbg_sendblocksuccess_6f7db513ee6cb0cf = function(arg0, arg1, ar
2897
2897
  }
2898
2898
  };
2899
2899
 
2900
- module.exports.__wbg_sendwalletupdate_4b0ff2bea21f690c = function() {
2900
+ module.exports.__wbg_sendwalletupdate_2750f81611d6d46b = function() {
2901
2901
  MsgHandler.send_wallet_update();
2902
2902
  };
2903
2903
 
2904
- module.exports.__wbg_sendnewversionalert_c4835a2f1dd01953 = function(arg0, arg1, arg2) {
2904
+ module.exports.__wbg_sendnewversionalert_55eefbff860ae87a = function(arg0, arg1, arg2) {
2905
2905
  let deferred0_0;
2906
2906
  let deferred0_1;
2907
2907
  try {
@@ -2913,23 +2913,23 @@ module.exports.__wbg_sendnewversionalert_c4835a2f1dd01953 = function(arg0, arg1,
2913
2913
  }
2914
2914
  };
2915
2915
 
2916
- module.exports.__wbg_sendblockfetchstatusevent_774c4d8d0f67b37b = function(arg0) {
2916
+ module.exports.__wbg_sendblockfetchstatusevent_f6dacd96583f8cf9 = function(arg0) {
2917
2917
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2918
2918
  };
2919
2919
 
2920
- module.exports.__wbg_sendnewchaindetectedevent_3ee3257a7ec6d32f = function() {
2920
+ module.exports.__wbg_sendnewchaindetectedevent_be9dfef507784bbd = function() {
2921
2921
  MsgHandler.send_new_chain_detected_event();
2922
2922
  };
2923
2923
 
2924
- module.exports.__wbg_savewallet_3848dd4bd7f71304 = function() {
2924
+ module.exports.__wbg_savewallet_ffb2a491b1f66b51 = function() {
2925
2925
  MsgHandler.save_wallet();
2926
2926
  };
2927
2927
 
2928
- module.exports.__wbg_loadwallet_343de9de6ae9b3da = function() {
2928
+ module.exports.__wbg_loadwallet_1977a51ad3fcae42 = function() {
2929
2929
  MsgHandler.load_wallet();
2930
2930
  };
2931
2931
 
2932
- module.exports.__wbg_getmyservices_d61e4c83e12e7dcd = function() {
2932
+ module.exports.__wbg_getmyservices_88ebd4bb428eae73 = function() {
2933
2933
  const ret = MsgHandler.get_my_services();
2934
2934
  _assertClass(ret, WasmPeerServiceList);
2935
2935
  var ptr1 = ret.__destroy_into_raw();
@@ -3333,7 +3333,7 @@ module.exports.__wbindgen_memory = function() {
3333
3333
  return addHeapObject(ret);
3334
3334
  };
3335
3335
 
3336
- module.exports.__wbindgen_closure_wrapper1623 = function(arg0, arg1, arg2) {
3336
+ module.exports.__wbindgen_closure_wrapper1625 = function(arg0, arg1, arg2) {
3337
3337
  const ret = makeMutClosure(arg0, arg1, 580, __wbg_adapter_38);
3338
3338
  return addHeapObject(ret);
3339
3339
  };
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.160",
3
+ "version": "0.2.161",
4
4
  "files": [
5
5
  "index_bg.wasm",
6
6
  "index.js",
package/pkg/web/index.js CHANGED
@@ -1,27 +1,31 @@
1
- import { MsgHandler } from './snippets/saito-wasm-122825cf7c5f39f7/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-7abf862820f718f5/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
5
- const heap = new Array(128).fill(undefined);
6
-
7
- heap.push(undefined, null, true, false);
5
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
8
6
 
9
- function getObject(idx) { return heap[idx]; }
7
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
10
8
 
11
- let heap_next = heap.length;
9
+ let cachedUint8Memory0 = null;
12
10
 
13
- function dropObject(idx) {
14
- if (idx < 132) return;
15
- heap[idx] = heap_next;
16
- heap_next = idx;
11
+ function getUint8Memory0() {
12
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
13
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
14
+ }
15
+ return cachedUint8Memory0;
17
16
  }
18
17
 
19
- function takeObject(idx) {
20
- const ret = getObject(idx);
21
- dropObject(idx);
22
- return ret;
18
+ function getStringFromWasm0(ptr, len) {
19
+ ptr = ptr >>> 0;
20
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
23
21
  }
24
22
 
23
+ const heap = new Array(128).fill(undefined);
24
+
25
+ heap.push(undefined, null, true, false);
26
+
27
+ let heap_next = heap.length;
28
+
25
29
  function addHeapObject(obj) {
26
30
  if (heap_next === heap.length) heap.push(heap.length + 1);
27
31
  const idx = heap_next;
@@ -31,22 +35,18 @@ function addHeapObject(obj) {
31
35
  return idx;
32
36
  }
33
37
 
34
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
35
-
36
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
37
-
38
- let cachedUint8Memory0 = null;
38
+ function getObject(idx) { return heap[idx]; }
39
39
 
40
- function getUint8Memory0() {
41
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
42
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
43
- }
44
- return cachedUint8Memory0;
40
+ function dropObject(idx) {
41
+ if (idx < 132) return;
42
+ heap[idx] = heap_next;
43
+ heap_next = idx;
45
44
  }
46
45
 
47
- function getStringFromWasm0(ptr, len) {
48
- ptr = ptr >>> 0;
49
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
46
+ function takeObject(idx) {
47
+ const ret = getObject(idx);
48
+ dropObject(idx);
49
+ return ret;
50
50
  }
51
51
 
52
52
  let WASM_VECTOR_LEN = 0;
@@ -2658,35 +2658,27 @@ async function __wbg_load(module, imports) {
2658
2658
  function __wbg_get_imports() {
2659
2659
  const imports = {};
2660
2660
  imports.wbg = {};
2661
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2662
- takeObject(arg0);
2663
- };
2664
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2665
- const ret = BigInt.asUintN(64, arg0);
2666
- return addHeapObject(ret);
2667
- };
2668
- imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2669
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2670
- return addHeapObject(ret);
2671
- };
2672
2661
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2673
2662
  const ret = getStringFromWasm0(arg0, arg1);
2674
2663
  return addHeapObject(ret);
2675
2664
  };
2665
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2666
+ takeObject(arg0);
2667
+ };
2676
2668
  imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2677
2669
  const ret = WasmTransaction.__wrap(arg0);
2678
2670
  return addHeapObject(ret);
2679
2671
  };
2680
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2681
- const ret = WasmPeer.__wrap(arg0);
2672
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2673
+ const ret = BigInt.asUintN(64, arg0);
2682
2674
  return addHeapObject(ret);
2683
2675
  };
2684
- imports.wbg.__wbg_wasmblock_new = function(arg0) {
2685
- const ret = WasmBlock.__wrap(arg0);
2676
+ imports.wbg.__wbg_wasmslip_new = function(arg0) {
2677
+ const ret = WasmSlip.__wrap(arg0);
2686
2678
  return addHeapObject(ret);
2687
2679
  };
2688
- imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2689
- const ret = WasmWalletSlip.__wrap(arg0);
2680
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2681
+ const ret = WasmPeer.__wrap(arg0);
2690
2682
  return addHeapObject(ret);
2691
2683
  };
2692
2684
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
@@ -2697,24 +2689,32 @@ function __wbg_get_imports() {
2697
2689
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2698
2690
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2699
2691
  };
2700
- imports.wbg.__wbg_wasmnft_new = function(arg0) {
2701
- const ret = WasmNFT.__wrap(arg0);
2692
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2693
+ const ret = getObject(arg0);
2694
+ return addHeapObject(ret);
2695
+ };
2696
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2697
+ const ret = WasmBlockchain.__wrap(arg0);
2702
2698
  return addHeapObject(ret);
2703
2699
  };
2704
2700
  imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2705
2701
  const ret = WasmWallet.__wrap(arg0);
2706
2702
  return addHeapObject(ret);
2707
2703
  };
2708
- imports.wbg.__wbg_wasmslip_new = function(arg0) {
2709
- const ret = WasmSlip.__wrap(arg0);
2704
+ imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2705
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2710
2706
  return addHeapObject(ret);
2711
2707
  };
2712
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2713
- const ret = getObject(arg0);
2708
+ imports.wbg.__wbg_wasmblock_new = function(arg0) {
2709
+ const ret = WasmBlock.__wrap(arg0);
2714
2710
  return addHeapObject(ret);
2715
2711
  };
2716
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2717
- const ret = WasmBlockchain.__wrap(arg0);
2712
+ imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2713
+ const ret = WasmWalletSlip.__wrap(arg0);
2714
+ return addHeapObject(ret);
2715
+ };
2716
+ imports.wbg.__wbg_wasmnft_new = function(arg0) {
2717
+ const ret = WasmNFT.__wrap(arg0);
2718
2718
  return addHeapObject(ret);
2719
2719
  };
2720
2720
  imports.wbg.__wbg_wasmhop_new = function(arg0) {
@@ -2725,13 +2725,13 @@ function __wbg_get_imports() {
2725
2725
  const ret = WasmPeerService.__wrap(arg0);
2726
2726
  return addHeapObject(ret);
2727
2727
  };
2728
- imports.wbg.__wbg_sendmessage_c80eaa9b19e0ac36 = function(arg0, arg1) {
2728
+ imports.wbg.__wbg_sendmessage_2ec021f2331a30ec = function(arg0, arg1) {
2729
2729
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2730
2730
  };
2731
- imports.wbg.__wbg_sendmessagetoall_2a745f01564e1a27 = function(arg0, arg1) {
2731
+ imports.wbg.__wbg_sendmessagetoall_ed21e40a37b3756d = function(arg0, arg1) {
2732
2732
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2733
2733
  };
2734
- imports.wbg.__wbg_connecttopeer_c9687fa011b843ee = function() { return handleError(function (arg0, arg1, arg2) {
2734
+ imports.wbg.__wbg_connecttopeer_d9c0012333c1437e = function() { return handleError(function (arg0, arg1, arg2) {
2735
2735
  let deferred0_0;
2736
2736
  let deferred0_1;
2737
2737
  try {
@@ -2743,11 +2743,11 @@ function __wbg_get_imports() {
2743
2743
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2744
2744
  }
2745
2745
  }, arguments) };
2746
- imports.wbg.__wbg_disconnectfrompeer_252c41da932cfd9f = function() { return handleError(function (arg0) {
2746
+ imports.wbg.__wbg_disconnectfrompeer_3d1d80c79865ac44 = function() { return handleError(function (arg0) {
2747
2747
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2748
2748
  return addHeapObject(ret);
2749
2749
  }, arguments) };
2750
- imports.wbg.__wbg_fetchblockfrompeer_a544fc87bb886d10 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2750
+ imports.wbg.__wbg_fetchblockfrompeer_b7db05d9da1ee6e5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2751
2751
  let deferred0_0;
2752
2752
  let deferred0_1;
2753
2753
  try {
@@ -2759,7 +2759,7 @@ function __wbg_get_imports() {
2759
2759
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2760
2760
  }
2761
2761
  }, arguments) };
2762
- imports.wbg.__wbg_writevalue_1de47e80b5beca95 = function(arg0, arg1, arg2) {
2762
+ imports.wbg.__wbg_writevalue_a7c9fd75e5362a0a = function(arg0, arg1, arg2) {
2763
2763
  let deferred0_0;
2764
2764
  let deferred0_1;
2765
2765
  try {
@@ -2770,7 +2770,7 @@ function __wbg_get_imports() {
2770
2770
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2771
2771
  }
2772
2772
  };
2773
- imports.wbg.__wbg_appendvalue_c4fdadef535a2ed8 = function(arg0, arg1, arg2) {
2773
+ imports.wbg.__wbg_appendvalue_47a9f88e91fb3f21 = function(arg0, arg1, arg2) {
2774
2774
  let deferred0_0;
2775
2775
  let deferred0_1;
2776
2776
  try {
@@ -2781,7 +2781,7 @@ function __wbg_get_imports() {
2781
2781
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2782
2782
  }
2783
2783
  };
2784
- imports.wbg.__wbg_flushdata_581cc9cb44db9d33 = function(arg0, arg1) {
2784
+ imports.wbg.__wbg_flushdata_b5e6923b95569717 = function(arg0, arg1) {
2785
2785
  let deferred0_0;
2786
2786
  let deferred0_1;
2787
2787
  try {
@@ -2792,7 +2792,7 @@ function __wbg_get_imports() {
2792
2792
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2793
2793
  }
2794
2794
  };
2795
- imports.wbg.__wbg_readvalue_d87fdba36bd6d60e = function() { return handleError(function (arg0, arg1) {
2795
+ imports.wbg.__wbg_readvalue_cce66abba4678860 = function() { return handleError(function (arg0, arg1) {
2796
2796
  let deferred0_0;
2797
2797
  let deferred0_1;
2798
2798
  try {
@@ -2804,11 +2804,11 @@ function __wbg_get_imports() {
2804
2804
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2805
2805
  }
2806
2806
  }, arguments) };
2807
- imports.wbg.__wbg_loadblockfilelist_7e2487784e15319e = function() { return handleError(function () {
2807
+ imports.wbg.__wbg_loadblockfilelist_6ee195b852fb0251 = function() { return handleError(function () {
2808
2808
  const ret = MsgHandler.load_block_file_list();
2809
2809
  return addHeapObject(ret);
2810
2810
  }, arguments) };
2811
- imports.wbg.__wbg_isexistingfile_c1cf4925a7493fef = function() { return handleError(function (arg0, arg1) {
2811
+ imports.wbg.__wbg_isexistingfile_2b9a4fbeaf73b278 = function() { return handleError(function (arg0, arg1) {
2812
2812
  let deferred0_0;
2813
2813
  let deferred0_1;
2814
2814
  try {
@@ -2820,7 +2820,7 @@ function __wbg_get_imports() {
2820
2820
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2821
2821
  }
2822
2822
  }, arguments) };
2823
- imports.wbg.__wbg_removevalue_1acaace00e2d4fc2 = function() { return handleError(function (arg0, arg1) {
2823
+ imports.wbg.__wbg_removevalue_3b721b1437117d87 = function() { return handleError(function (arg0, arg1) {
2824
2824
  let deferred0_0;
2825
2825
  let deferred0_1;
2826
2826
  try {
@@ -2832,7 +2832,7 @@ function __wbg_get_imports() {
2832
2832
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2833
2833
  }
2834
2834
  }, arguments) };
2835
- imports.wbg.__wbg_ensureblockdirectoryexists_b6ce5b7f9adb4b80 = function() { return handleError(function (arg0, arg1) {
2835
+ imports.wbg.__wbg_ensureblockdirectoryexists_fa8ada2200733e99 = function() { return handleError(function (arg0, arg1) {
2836
2836
  let deferred0_0;
2837
2837
  let deferred0_1;
2838
2838
  try {
@@ -2843,16 +2843,16 @@ function __wbg_get_imports() {
2843
2843
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2844
2844
  }
2845
2845
  }, arguments) };
2846
- imports.wbg.__wbg_processapicall_9b7712d650f2b70e = function(arg0, arg1, arg2) {
2846
+ imports.wbg.__wbg_processapicall_5004afd43c1ee680 = function(arg0, arg1, arg2) {
2847
2847
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2848
2848
  };
2849
- imports.wbg.__wbg_processapisuccess_7391a7e5c6ee9416 = function(arg0, arg1, arg2) {
2849
+ imports.wbg.__wbg_processapisuccess_92a95540a6660a60 = function(arg0, arg1, arg2) {
2850
2850
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2851
2851
  };
2852
- imports.wbg.__wbg_processapierror_f05e49407e18b500 = function(arg0, arg1, arg2) {
2852
+ imports.wbg.__wbg_processapierror_d8c1fa7448823bc2 = function(arg0, arg1, arg2) {
2853
2853
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2854
2854
  };
2855
- imports.wbg.__wbg_sendinterfaceevent_92fcef30fc9a3ff0 = function(arg0, arg1, arg2, arg3, arg4) {
2855
+ imports.wbg.__wbg_sendinterfaceevent_563825bcd92676c7 = function(arg0, arg1, arg2, arg3, arg4) {
2856
2856
  let deferred0_0;
2857
2857
  let deferred0_1;
2858
2858
  let deferred1_0;
@@ -2868,7 +2868,7 @@ function __wbg_get_imports() {
2868
2868
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2869
2869
  }
2870
2870
  };
2871
- imports.wbg.__wbg_sendblocksuccess_6f7db513ee6cb0cf = function(arg0, arg1, arg2) {
2871
+ imports.wbg.__wbg_sendblocksuccess_2ba6e16e88f766bc = function(arg0, arg1, arg2) {
2872
2872
  let deferred0_0;
2873
2873
  let deferred0_1;
2874
2874
  try {
@@ -2879,10 +2879,10 @@ function __wbg_get_imports() {
2879
2879
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2880
2880
  }
2881
2881
  };
2882
- imports.wbg.__wbg_sendwalletupdate_4b0ff2bea21f690c = function() {
2882
+ imports.wbg.__wbg_sendwalletupdate_2750f81611d6d46b = function() {
2883
2883
  MsgHandler.send_wallet_update();
2884
2884
  };
2885
- imports.wbg.__wbg_sendnewversionalert_c4835a2f1dd01953 = function(arg0, arg1, arg2) {
2885
+ imports.wbg.__wbg_sendnewversionalert_55eefbff860ae87a = function(arg0, arg1, arg2) {
2886
2886
  let deferred0_0;
2887
2887
  let deferred0_1;
2888
2888
  try {
@@ -2893,19 +2893,19 @@ function __wbg_get_imports() {
2893
2893
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2894
2894
  }
2895
2895
  };
2896
- imports.wbg.__wbg_sendblockfetchstatusevent_774c4d8d0f67b37b = function(arg0) {
2896
+ imports.wbg.__wbg_sendblockfetchstatusevent_f6dacd96583f8cf9 = function(arg0) {
2897
2897
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2898
2898
  };
2899
- imports.wbg.__wbg_sendnewchaindetectedevent_3ee3257a7ec6d32f = function() {
2899
+ imports.wbg.__wbg_sendnewchaindetectedevent_be9dfef507784bbd = function() {
2900
2900
  MsgHandler.send_new_chain_detected_event();
2901
2901
  };
2902
- imports.wbg.__wbg_savewallet_3848dd4bd7f71304 = function() {
2902
+ imports.wbg.__wbg_savewallet_ffb2a491b1f66b51 = function() {
2903
2903
  MsgHandler.save_wallet();
2904
2904
  };
2905
- imports.wbg.__wbg_loadwallet_343de9de6ae9b3da = function() {
2905
+ imports.wbg.__wbg_loadwallet_1977a51ad3fcae42 = function() {
2906
2906
  MsgHandler.load_wallet();
2907
2907
  };
2908
- imports.wbg.__wbg_getmyservices_d61e4c83e12e7dcd = function() {
2908
+ imports.wbg.__wbg_getmyservices_88ebd4bb428eae73 = function() {
2909
2909
  const ret = MsgHandler.get_my_services();
2910
2910
  _assertClass(ret, WasmPeerServiceList);
2911
2911
  var ptr1 = ret.__destroy_into_raw();
@@ -3236,7 +3236,7 @@ function __wbg_get_imports() {
3236
3236
  const ret = wasm.memory;
3237
3237
  return addHeapObject(ret);
3238
3238
  };
3239
- imports.wbg.__wbindgen_closure_wrapper1623 = function(arg0, arg1, arg2) {
3239
+ imports.wbg.__wbindgen_closure_wrapper1625 = function(arg0, arg1, arg2) {
3240
3240
  const ret = makeMutClosure(arg0, arg1, 580, __wbg_adapter_38);
3241
3241
  return addHeapObject(ret);
3242
3242
  };
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.160",
3
+ "version": "0.2.161",
4
4
  "files": [
5
5
  "index_bg.wasm",
6
6
  "index.js",
@@ -12,7 +12,7 @@
12
12
  "./snippets/*"
13
13
  ],
14
14
  "dependencies": {
15
- "node-fetch": "3.3.0",
16
- "cross-env": "7.0.3"
15
+ "cross-env": "7.0.3",
16
+ "node-fetch": "3.3.0"
17
17
  }
18
18
  }