saito-wasm 0.2.90 → 0.2.91

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.90"
3
+ version = "0.2.91"
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.90",
3
+ "version": "0.2.91",
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,8 +1,8 @@
1
1
  let imports = {};
2
2
  imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
- const { MsgHandler } = require(String.raw`./snippets/saito-wasm-3ab50a3facd7ff19/js/msg_handler.js`);
5
- const { TextDecoder, TextEncoder } = require(`util`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-f7efd141dd704c2a/js/msg_handler.js`);
5
+ const { TextEncoder, TextDecoder } = require(`util`);
6
6
 
7
7
  const heap = new Array(128).fill(undefined);
8
8
 
@@ -24,18 +24,7 @@ function takeObject(idx) {
24
24
  return ret;
25
25
  }
26
26
 
27
- function addHeapObject(obj) {
28
- if (heap_next === heap.length) heap.push(heap.length + 1);
29
- const idx = heap_next;
30
- heap_next = heap[idx];
31
-
32
- heap[idx] = obj;
33
- return idx;
34
- }
35
-
36
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
37
-
38
- cachedTextDecoder.decode();
27
+ let WASM_VECTOR_LEN = 0;
39
28
 
40
29
  let cachedUint8Memory0 = null;
41
30
 
@@ -46,13 +35,6 @@ function getUint8Memory0() {
46
35
  return cachedUint8Memory0;
47
36
  }
48
37
 
49
- function getStringFromWasm0(ptr, len) {
50
- ptr = ptr >>> 0;
51
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
52
- }
53
-
54
- let WASM_VECTOR_LEN = 0;
55
-
56
38
  let cachedTextEncoder = new TextEncoder('utf-8');
57
39
 
58
40
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -120,6 +102,24 @@ function getInt32Memory0() {
120
102
  return cachedInt32Memory0;
121
103
  }
122
104
 
105
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
106
+
107
+ cachedTextDecoder.decode();
108
+
109
+ function getStringFromWasm0(ptr, len) {
110
+ ptr = ptr >>> 0;
111
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
112
+ }
113
+
114
+ function addHeapObject(obj) {
115
+ if (heap_next === heap.length) heap.push(heap.length + 1);
116
+ const idx = heap_next;
117
+ heap_next = heap[idx];
118
+
119
+ heap[idx] = obj;
120
+ return idx;
121
+ }
122
+
123
123
  let cachedFloat64Memory0 = null;
124
124
 
125
125
  function getFloat64Memory0() {
@@ -681,7 +681,7 @@ module.exports.produce_block_without_gt = function() {
681
681
  return takeObject(ret);
682
682
  };
683
683
 
684
- function __wbg_adapter_420(arg0, arg1, arg2, arg3) {
684
+ function __wbg_adapter_418(arg0, arg1, arg2, arg3) {
685
685
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h1d2fe914d97897fe(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
686
686
  }
687
687
 
@@ -2522,13 +2522,22 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2522
2522
  takeObject(arg0);
2523
2523
  };
2524
2524
 
2525
- module.exports.__wbg_wasmnft_new = function(arg0) {
2526
- const ret = WasmNFT.__wrap(arg0);
2525
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
2526
+ const obj = getObject(arg1);
2527
+ const ret = typeof(obj) === 'string' ? obj : undefined;
2528
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2529
+ var len1 = WASM_VECTOR_LEN;
2530
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2531
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2532
+ };
2533
+
2534
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2535
+ const ret = WasmPeer.__wrap(arg0);
2527
2536
  return addHeapObject(ret);
2528
2537
  };
2529
2538
 
2530
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2531
- const ret = WasmBlockchain.__wrap(arg0);
2539
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
2540
+ const ret = getStringFromWasm0(arg0, arg1);
2532
2541
  return addHeapObject(ret);
2533
2542
  };
2534
2543
 
@@ -2537,52 +2546,43 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2537
2546
  return addHeapObject(ret);
2538
2547
  };
2539
2548
 
2540
- module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2541
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2549
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2550
+ const ret = WasmTransaction.__wrap(arg0);
2542
2551
  return addHeapObject(ret);
2543
2552
  };
2544
2553
 
2545
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2546
- const ret = WasmWallet.__wrap(arg0);
2554
+ module.exports.__wbg_wasmslip_new = function(arg0) {
2555
+ const ret = WasmSlip.__wrap(arg0);
2547
2556
  return addHeapObject(ret);
2548
2557
  };
2549
2558
 
2550
- module.exports.__wbg_wasmtransaction_new = function(arg0) {
2551
- const ret = WasmTransaction.__wrap(arg0);
2559
+ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2560
+ const ret = WasmWalletSlip.__wrap(arg0);
2552
2561
  return addHeapObject(ret);
2553
2562
  };
2554
2563
 
2555
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
2556
- const ret = getStringFromWasm0(arg0, arg1);
2564
+ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2565
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2557
2566
  return addHeapObject(ret);
2558
2567
  };
2559
2568
 
2560
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
2561
- const obj = getObject(arg1);
2562
- const ret = typeof(obj) === 'string' ? obj : undefined;
2563
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2564
- var len1 = WASM_VECTOR_LEN;
2565
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2566
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2567
- };
2568
-
2569
- module.exports.__wbg_wasmblock_new = function(arg0) {
2570
- const ret = WasmBlock.__wrap(arg0);
2569
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2570
+ const ret = WasmWallet.__wrap(arg0);
2571
2571
  return addHeapObject(ret);
2572
2572
  };
2573
2573
 
2574
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2575
- const ret = WasmPeer.__wrap(arg0);
2574
+ module.exports.__wbg_wasmnft_new = function(arg0) {
2575
+ const ret = WasmNFT.__wrap(arg0);
2576
2576
  return addHeapObject(ret);
2577
2577
  };
2578
2578
 
2579
- module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2580
- const ret = WasmWalletSlip.__wrap(arg0);
2579
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2580
+ const ret = WasmBlockchain.__wrap(arg0);
2581
2581
  return addHeapObject(ret);
2582
2582
  };
2583
2583
 
2584
- module.exports.__wbg_wasmslip_new = function(arg0) {
2585
- const ret = WasmSlip.__wrap(arg0);
2584
+ module.exports.__wbg_wasmblock_new = function(arg0) {
2585
+ const ret = WasmBlock.__wrap(arg0);
2586
2586
  return addHeapObject(ret);
2587
2587
  };
2588
2588
 
@@ -2602,15 +2602,15 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
2602
2602
  return ret;
2603
2603
  };
2604
2604
 
2605
- module.exports.__wbg_sendmessage_a946c0e1f31be3c7 = function(arg0, arg1) {
2605
+ module.exports.__wbg_sendmessage_bcb69449949ecf5f = function(arg0, arg1) {
2606
2606
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2607
2607
  };
2608
2608
 
2609
- module.exports.__wbg_sendmessagetoall_3ea52d9ea7ed9df6 = function(arg0, arg1) {
2609
+ module.exports.__wbg_sendmessagetoall_8de3636330a1ae14 = function(arg0, arg1) {
2610
2610
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2611
2611
  };
2612
2612
 
2613
- module.exports.__wbg_connecttopeer_b469614fed3571aa = function() { return handleError(function (arg0, arg1, arg2) {
2613
+ module.exports.__wbg_connecttopeer_f0aa249c0cb260bb = function() { return handleError(function (arg0, arg1, arg2) {
2614
2614
  let deferred0_0;
2615
2615
  let deferred0_1;
2616
2616
  try {
@@ -2623,12 +2623,12 @@ module.exports.__wbg_connecttopeer_b469614fed3571aa = function() { return handle
2623
2623
  }
2624
2624
  }, arguments) };
2625
2625
 
2626
- module.exports.__wbg_disconnectfrompeer_eebf23b1bb5b8aa6 = function() { return handleError(function (arg0) {
2626
+ module.exports.__wbg_disconnectfrompeer_370fae8ec2368aa9 = function() { return handleError(function (arg0) {
2627
2627
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2628
2628
  return addHeapObject(ret);
2629
2629
  }, arguments) };
2630
2630
 
2631
- module.exports.__wbg_fetchblockfrompeer_719d60abf896ae96 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2631
+ module.exports.__wbg_fetchblockfrompeer_446802cc5a0e8f24 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2632
2632
  let deferred0_0;
2633
2633
  let deferred0_1;
2634
2634
  try {
@@ -2641,7 +2641,7 @@ module.exports.__wbg_fetchblockfrompeer_719d60abf896ae96 = function() { return h
2641
2641
  }
2642
2642
  }, arguments) };
2643
2643
 
2644
- module.exports.__wbg_writevalue_bff411c3c2f52643 = function(arg0, arg1, arg2) {
2644
+ module.exports.__wbg_writevalue_7f197a2c14d6ffad = function(arg0, arg1, arg2) {
2645
2645
  let deferred0_0;
2646
2646
  let deferred0_1;
2647
2647
  try {
@@ -2653,7 +2653,7 @@ module.exports.__wbg_writevalue_bff411c3c2f52643 = function(arg0, arg1, arg2) {
2653
2653
  }
2654
2654
  };
2655
2655
 
2656
- module.exports.__wbg_appendvalue_6bd4c8a70b74f7e6 = function(arg0, arg1, arg2) {
2656
+ module.exports.__wbg_appendvalue_8121a88094f3f7a8 = function(arg0, arg1, arg2) {
2657
2657
  let deferred0_0;
2658
2658
  let deferred0_1;
2659
2659
  try {
@@ -2665,7 +2665,7 @@ module.exports.__wbg_appendvalue_6bd4c8a70b74f7e6 = function(arg0, arg1, arg2) {
2665
2665
  }
2666
2666
  };
2667
2667
 
2668
- module.exports.__wbg_flushdata_86721e9b4d74385b = function(arg0, arg1) {
2668
+ module.exports.__wbg_flushdata_2b2068dbe003e2b6 = function(arg0, arg1) {
2669
2669
  let deferred0_0;
2670
2670
  let deferred0_1;
2671
2671
  try {
@@ -2677,7 +2677,7 @@ module.exports.__wbg_flushdata_86721e9b4d74385b = function(arg0, arg1) {
2677
2677
  }
2678
2678
  };
2679
2679
 
2680
- module.exports.__wbg_readvalue_b6d77e44747f094d = function() { return handleError(function (arg0, arg1) {
2680
+ module.exports.__wbg_readvalue_b21d23088be046b6 = function() { return handleError(function (arg0, arg1) {
2681
2681
  let deferred0_0;
2682
2682
  let deferred0_1;
2683
2683
  try {
@@ -2690,12 +2690,12 @@ module.exports.__wbg_readvalue_b6d77e44747f094d = function() { return handleErro
2690
2690
  }
2691
2691
  }, arguments) };
2692
2692
 
2693
- module.exports.__wbg_loadblockfilelist_ee4b24b38ad73a9b = function() { return handleError(function () {
2693
+ module.exports.__wbg_loadblockfilelist_06fd87ff516e9b04 = function() { return handleError(function () {
2694
2694
  const ret = MsgHandler.load_block_file_list();
2695
2695
  return addHeapObject(ret);
2696
2696
  }, arguments) };
2697
2697
 
2698
- module.exports.__wbg_isexistingfile_433825053c0c3e4e = function() { return handleError(function (arg0, arg1) {
2698
+ module.exports.__wbg_isexistingfile_f6d46fc85bf42315 = function() { return handleError(function (arg0, arg1) {
2699
2699
  let deferred0_0;
2700
2700
  let deferred0_1;
2701
2701
  try {
@@ -2708,7 +2708,7 @@ module.exports.__wbg_isexistingfile_433825053c0c3e4e = function() { return handl
2708
2708
  }
2709
2709
  }, arguments) };
2710
2710
 
2711
- module.exports.__wbg_removevalue_0aff2c93b354899e = function() { return handleError(function (arg0, arg1) {
2711
+ module.exports.__wbg_removevalue_fed69886decc678c = function() { return handleError(function (arg0, arg1) {
2712
2712
  let deferred0_0;
2713
2713
  let deferred0_1;
2714
2714
  try {
@@ -2721,7 +2721,7 @@ module.exports.__wbg_removevalue_0aff2c93b354899e = function() { return handleEr
2721
2721
  }
2722
2722
  }, arguments) };
2723
2723
 
2724
- module.exports.__wbg_ensureblockdirectoryexists_65cba3c518399613 = function() { return handleError(function (arg0, arg1) {
2724
+ module.exports.__wbg_ensureblockdirectoryexists_2fabac0174f39885 = function() { return handleError(function (arg0, arg1) {
2725
2725
  let deferred0_0;
2726
2726
  let deferred0_1;
2727
2727
  try {
@@ -2733,19 +2733,19 @@ module.exports.__wbg_ensureblockdirectoryexists_65cba3c518399613 = function() {
2733
2733
  }
2734
2734
  }, arguments) };
2735
2735
 
2736
- module.exports.__wbg_processapicall_895643ad20f41e9a = function(arg0, arg1, arg2) {
2736
+ module.exports.__wbg_processapicall_4c22e8bc8bacc81b = function(arg0, arg1, arg2) {
2737
2737
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2738
2738
  };
2739
2739
 
2740
- module.exports.__wbg_processapisuccess_f831762c0c753409 = function(arg0, arg1, arg2) {
2740
+ module.exports.__wbg_processapisuccess_3eb33d090d75d7d6 = function(arg0, arg1, arg2) {
2741
2741
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2742
2742
  };
2743
2743
 
2744
- module.exports.__wbg_processapierror_a8c396cc2d88131a = function(arg0, arg1, arg2) {
2744
+ module.exports.__wbg_processapierror_9b116ad739ee81b9 = function(arg0, arg1, arg2) {
2745
2745
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2746
2746
  };
2747
2747
 
2748
- module.exports.__wbg_sendinterfaceevent_34f3db156a64459c = function(arg0, arg1, arg2, arg3, arg4) {
2748
+ module.exports.__wbg_sendinterfaceevent_74088ba4c3a6770e = function(arg0, arg1, arg2, arg3, arg4) {
2749
2749
  let deferred0_0;
2750
2750
  let deferred0_1;
2751
2751
  let deferred1_0;
@@ -2762,7 +2762,7 @@ module.exports.__wbg_sendinterfaceevent_34f3db156a64459c = function(arg0, arg1,
2762
2762
  }
2763
2763
  };
2764
2764
 
2765
- module.exports.__wbg_sendblocksuccess_9b19c987074800fa = function(arg0, arg1, arg2) {
2765
+ module.exports.__wbg_sendblocksuccess_59aa6c448defd85b = function(arg0, arg1, arg2) {
2766
2766
  let deferred0_0;
2767
2767
  let deferred0_1;
2768
2768
  try {
@@ -2774,11 +2774,11 @@ module.exports.__wbg_sendblocksuccess_9b19c987074800fa = function(arg0, arg1, ar
2774
2774
  }
2775
2775
  };
2776
2776
 
2777
- module.exports.__wbg_sendwalletupdate_fb91053f2dfd92d7 = function() {
2777
+ module.exports.__wbg_sendwalletupdate_294efd44c64954db = function() {
2778
2778
  MsgHandler.send_wallet_update();
2779
2779
  };
2780
2780
 
2781
- module.exports.__wbg_sendnewversionalert_fb8556f510067fa0 = function(arg0, arg1, arg2) {
2781
+ module.exports.__wbg_sendnewversionalert_3d8a016478a008a8 = function(arg0, arg1, arg2) {
2782
2782
  let deferred0_0;
2783
2783
  let deferred0_1;
2784
2784
  try {
@@ -2790,19 +2790,19 @@ module.exports.__wbg_sendnewversionalert_fb8556f510067fa0 = function(arg0, arg1,
2790
2790
  }
2791
2791
  };
2792
2792
 
2793
- module.exports.__wbg_sendblockfetchstatusevent_33a10478a811b057 = function(arg0) {
2793
+ module.exports.__wbg_sendblockfetchstatusevent_88a23787c102103b = function(arg0) {
2794
2794
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2795
2795
  };
2796
2796
 
2797
- module.exports.__wbg_savewallet_b413f5663e5b068c = function() {
2797
+ module.exports.__wbg_savewallet_b8dcef91791f45a0 = function() {
2798
2798
  MsgHandler.save_wallet();
2799
2799
  };
2800
2800
 
2801
- module.exports.__wbg_loadwallet_0d0931a9d5668c85 = function() {
2801
+ module.exports.__wbg_loadwallet_4420613b5d56134a = function() {
2802
2802
  MsgHandler.load_wallet();
2803
2803
  };
2804
2804
 
2805
- module.exports.__wbg_getmyservices_9e2781f9e7a4910d = function() {
2805
+ module.exports.__wbg_getmyservices_70704d160a1a8c49 = function() {
2806
2806
  const ret = MsgHandler.get_my_services();
2807
2807
  _assertClass(ret, WasmPeerServiceList);
2808
2808
  var ptr1 = ret.__destroy_into_raw();
@@ -2913,10 +2913,6 @@ module.exports.__wbg_info_80803d9a3f0aad16 = function(arg0, arg1, arg2, arg3) {
2913
2913
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2914
2914
  };
2915
2915
 
2916
- module.exports.__wbg_log_151eb4333ef0fe39 = function(arg0, arg1, arg2, arg3) {
2917
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2918
- };
2919
-
2920
2916
  module.exports.__wbg_warn_5d3f783b0bae8943 = function(arg0, arg1, arg2, arg3) {
2921
2917
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2922
2918
  };
@@ -3096,7 +3092,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
3096
3092
  const a = state0.a;
3097
3093
  state0.a = 0;
3098
3094
  try {
3099
- return __wbg_adapter_420(a, state0.b, arg0, arg1);
3095
+ return __wbg_adapter_418(a, state0.b, arg0, arg1);
3100
3096
  } finally {
3101
3097
  state0.a = a;
3102
3098
  }
@@ -3195,7 +3191,7 @@ module.exports.__wbindgen_memory = function() {
3195
3191
  };
3196
3192
 
3197
3193
  module.exports.__wbindgen_closure_wrapper1345 = function(arg0, arg1, arg2) {
3198
- const ret = makeMutClosure(arg0, arg1, 483, __wbg_adapter_38);
3194
+ const ret = makeMutClosure(arg0, arg1, 482, __wbg_adapter_38);
3199
3195
  return addHeapObject(ret);
3200
3196
  };
3201
3197
 
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.90",
3
+ "version": "0.2.91",
4
4
  "files": [
5
5
  "index_bg.wasm",
6
6
  "index.js",
@@ -9,7 +9,7 @@
9
9
  "main": "index.js",
10
10
  "types": "index.d.ts",
11
11
  "dependencies": {
12
- "node-fetch": "^3.3.0",
13
- "cross-env": "^7.0.3"
12
+ "cross-env": "^7.0.3",
13
+ "node-fetch": "^3.3.0"
14
14
  }
15
15
  }
package/pkg/web/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { MsgHandler } from './snippets/saito-wasm-3ab50a3facd7ff19/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-f7efd141dd704c2a/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
@@ -22,18 +22,7 @@ function takeObject(idx) {
22
22
  return ret;
23
23
  }
24
24
 
25
- function addHeapObject(obj) {
26
- if (heap_next === heap.length) heap.push(heap.length + 1);
27
- const idx = heap_next;
28
- heap_next = heap[idx];
29
-
30
- heap[idx] = obj;
31
- return idx;
32
- }
33
-
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(); };
25
+ let WASM_VECTOR_LEN = 0;
37
26
 
38
27
  let cachedUint8Memory0 = null;
39
28
 
@@ -44,13 +33,6 @@ function getUint8Memory0() {
44
33
  return cachedUint8Memory0;
45
34
  }
46
35
 
47
- function getStringFromWasm0(ptr, len) {
48
- ptr = ptr >>> 0;
49
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
50
- }
51
-
52
- let WASM_VECTOR_LEN = 0;
53
-
54
36
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
55
37
 
56
38
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -118,6 +100,24 @@ function getInt32Memory0() {
118
100
  return cachedInt32Memory0;
119
101
  }
120
102
 
103
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
104
+
105
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
106
+
107
+ function getStringFromWasm0(ptr, len) {
108
+ ptr = ptr >>> 0;
109
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
110
+ }
111
+
112
+ function addHeapObject(obj) {
113
+ if (heap_next === heap.length) heap.push(heap.length + 1);
114
+ const idx = heap_next;
115
+ heap_next = heap[idx];
116
+
117
+ heap[idx] = obj;
118
+ return idx;
119
+ }
120
+
121
121
  let cachedFloat64Memory0 = null;
122
122
 
123
123
  function getFloat64Memory0() {
@@ -679,7 +679,7 @@ export function produce_block_without_gt() {
679
679
  return takeObject(ret);
680
680
  }
681
681
 
682
- function __wbg_adapter_420(arg0, arg1, arg2, arg3) {
682
+ function __wbg_adapter_418(arg0, arg1, arg2, arg3) {
683
683
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h1d2fe914d97897fe(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
684
684
  }
685
685
 
@@ -2538,56 +2538,56 @@ function __wbg_get_imports() {
2538
2538
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2539
2539
  takeObject(arg0);
2540
2540
  };
2541
- imports.wbg.__wbg_wasmnft_new = function(arg0) {
2542
- const ret = WasmNFT.__wrap(arg0);
2541
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2542
+ const obj = getObject(arg1);
2543
+ const ret = typeof(obj) === 'string' ? obj : undefined;
2544
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2545
+ var len1 = WASM_VECTOR_LEN;
2546
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2547
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2548
+ };
2549
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2550
+ const ret = WasmPeer.__wrap(arg0);
2543
2551
  return addHeapObject(ret);
2544
2552
  };
2545
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2546
- const ret = WasmBlockchain.__wrap(arg0);
2553
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2554
+ const ret = getStringFromWasm0(arg0, arg1);
2547
2555
  return addHeapObject(ret);
2548
2556
  };
2549
2557
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2550
2558
  const ret = BigInt.asUintN(64, arg0);
2551
2559
  return addHeapObject(ret);
2552
2560
  };
2553
- imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2554
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2561
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2562
+ const ret = WasmTransaction.__wrap(arg0);
2555
2563
  return addHeapObject(ret);
2556
2564
  };
2557
- imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2558
- const ret = WasmWallet.__wrap(arg0);
2565
+ imports.wbg.__wbg_wasmslip_new = function(arg0) {
2566
+ const ret = WasmSlip.__wrap(arg0);
2559
2567
  return addHeapObject(ret);
2560
2568
  };
2561
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2562
- const ret = WasmTransaction.__wrap(arg0);
2569
+ imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2570
+ const ret = WasmWalletSlip.__wrap(arg0);
2563
2571
  return addHeapObject(ret);
2564
2572
  };
2565
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2566
- const ret = getStringFromWasm0(arg0, arg1);
2573
+ imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2574
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2567
2575
  return addHeapObject(ret);
2568
2576
  };
2569
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2570
- const obj = getObject(arg1);
2571
- const ret = typeof(obj) === 'string' ? obj : undefined;
2572
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2573
- var len1 = WASM_VECTOR_LEN;
2574
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2575
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2576
- };
2577
- imports.wbg.__wbg_wasmblock_new = function(arg0) {
2578
- const ret = WasmBlock.__wrap(arg0);
2577
+ imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2578
+ const ret = WasmWallet.__wrap(arg0);
2579
2579
  return addHeapObject(ret);
2580
2580
  };
2581
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2582
- const ret = WasmPeer.__wrap(arg0);
2581
+ imports.wbg.__wbg_wasmnft_new = function(arg0) {
2582
+ const ret = WasmNFT.__wrap(arg0);
2583
2583
  return addHeapObject(ret);
2584
2584
  };
2585
- imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2586
- const ret = WasmWalletSlip.__wrap(arg0);
2585
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2586
+ const ret = WasmBlockchain.__wrap(arg0);
2587
2587
  return addHeapObject(ret);
2588
2588
  };
2589
- imports.wbg.__wbg_wasmslip_new = function(arg0) {
2590
- const ret = WasmSlip.__wrap(arg0);
2589
+ imports.wbg.__wbg_wasmblock_new = function(arg0) {
2590
+ const ret = WasmBlock.__wrap(arg0);
2591
2591
  return addHeapObject(ret);
2592
2592
  };
2593
2593
  imports.wbg.__wbindgen_is_object = function(arg0) {
@@ -2603,13 +2603,13 @@ function __wbg_get_imports() {
2603
2603
  const ret = getObject(arg0) in getObject(arg1);
2604
2604
  return ret;
2605
2605
  };
2606
- imports.wbg.__wbg_sendmessage_a946c0e1f31be3c7 = function(arg0, arg1) {
2606
+ imports.wbg.__wbg_sendmessage_bcb69449949ecf5f = function(arg0, arg1) {
2607
2607
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2608
2608
  };
2609
- imports.wbg.__wbg_sendmessagetoall_3ea52d9ea7ed9df6 = function(arg0, arg1) {
2609
+ imports.wbg.__wbg_sendmessagetoall_8de3636330a1ae14 = function(arg0, arg1) {
2610
2610
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2611
2611
  };
2612
- imports.wbg.__wbg_connecttopeer_b469614fed3571aa = function() { return handleError(function (arg0, arg1, arg2) {
2612
+ imports.wbg.__wbg_connecttopeer_f0aa249c0cb260bb = function() { return handleError(function (arg0, arg1, arg2) {
2613
2613
  let deferred0_0;
2614
2614
  let deferred0_1;
2615
2615
  try {
@@ -2621,11 +2621,11 @@ function __wbg_get_imports() {
2621
2621
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2622
2622
  }
2623
2623
  }, arguments) };
2624
- imports.wbg.__wbg_disconnectfrompeer_eebf23b1bb5b8aa6 = function() { return handleError(function (arg0) {
2624
+ imports.wbg.__wbg_disconnectfrompeer_370fae8ec2368aa9 = function() { return handleError(function (arg0) {
2625
2625
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2626
2626
  return addHeapObject(ret);
2627
2627
  }, arguments) };
2628
- imports.wbg.__wbg_fetchblockfrompeer_719d60abf896ae96 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2628
+ imports.wbg.__wbg_fetchblockfrompeer_446802cc5a0e8f24 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2629
2629
  let deferred0_0;
2630
2630
  let deferred0_1;
2631
2631
  try {
@@ -2637,7 +2637,7 @@ function __wbg_get_imports() {
2637
2637
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2638
2638
  }
2639
2639
  }, arguments) };
2640
- imports.wbg.__wbg_writevalue_bff411c3c2f52643 = function(arg0, arg1, arg2) {
2640
+ imports.wbg.__wbg_writevalue_7f197a2c14d6ffad = function(arg0, arg1, arg2) {
2641
2641
  let deferred0_0;
2642
2642
  let deferred0_1;
2643
2643
  try {
@@ -2648,7 +2648,7 @@ function __wbg_get_imports() {
2648
2648
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2649
2649
  }
2650
2650
  };
2651
- imports.wbg.__wbg_appendvalue_6bd4c8a70b74f7e6 = function(arg0, arg1, arg2) {
2651
+ imports.wbg.__wbg_appendvalue_8121a88094f3f7a8 = function(arg0, arg1, arg2) {
2652
2652
  let deferred0_0;
2653
2653
  let deferred0_1;
2654
2654
  try {
@@ -2659,7 +2659,7 @@ function __wbg_get_imports() {
2659
2659
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2660
2660
  }
2661
2661
  };
2662
- imports.wbg.__wbg_flushdata_86721e9b4d74385b = function(arg0, arg1) {
2662
+ imports.wbg.__wbg_flushdata_2b2068dbe003e2b6 = function(arg0, arg1) {
2663
2663
  let deferred0_0;
2664
2664
  let deferred0_1;
2665
2665
  try {
@@ -2670,7 +2670,7 @@ function __wbg_get_imports() {
2670
2670
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2671
2671
  }
2672
2672
  };
2673
- imports.wbg.__wbg_readvalue_b6d77e44747f094d = function() { return handleError(function (arg0, arg1) {
2673
+ imports.wbg.__wbg_readvalue_b21d23088be046b6 = function() { return handleError(function (arg0, arg1) {
2674
2674
  let deferred0_0;
2675
2675
  let deferred0_1;
2676
2676
  try {
@@ -2682,11 +2682,11 @@ function __wbg_get_imports() {
2682
2682
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2683
2683
  }
2684
2684
  }, arguments) };
2685
- imports.wbg.__wbg_loadblockfilelist_ee4b24b38ad73a9b = function() { return handleError(function () {
2685
+ imports.wbg.__wbg_loadblockfilelist_06fd87ff516e9b04 = function() { return handleError(function () {
2686
2686
  const ret = MsgHandler.load_block_file_list();
2687
2687
  return addHeapObject(ret);
2688
2688
  }, arguments) };
2689
- imports.wbg.__wbg_isexistingfile_433825053c0c3e4e = function() { return handleError(function (arg0, arg1) {
2689
+ imports.wbg.__wbg_isexistingfile_f6d46fc85bf42315 = function() { return handleError(function (arg0, arg1) {
2690
2690
  let deferred0_0;
2691
2691
  let deferred0_1;
2692
2692
  try {
@@ -2698,7 +2698,7 @@ function __wbg_get_imports() {
2698
2698
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2699
2699
  }
2700
2700
  }, arguments) };
2701
- imports.wbg.__wbg_removevalue_0aff2c93b354899e = function() { return handleError(function (arg0, arg1) {
2701
+ imports.wbg.__wbg_removevalue_fed69886decc678c = function() { return handleError(function (arg0, arg1) {
2702
2702
  let deferred0_0;
2703
2703
  let deferred0_1;
2704
2704
  try {
@@ -2710,7 +2710,7 @@ function __wbg_get_imports() {
2710
2710
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2711
2711
  }
2712
2712
  }, arguments) };
2713
- imports.wbg.__wbg_ensureblockdirectoryexists_65cba3c518399613 = function() { return handleError(function (arg0, arg1) {
2713
+ imports.wbg.__wbg_ensureblockdirectoryexists_2fabac0174f39885 = function() { return handleError(function (arg0, arg1) {
2714
2714
  let deferred0_0;
2715
2715
  let deferred0_1;
2716
2716
  try {
@@ -2721,16 +2721,16 @@ function __wbg_get_imports() {
2721
2721
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2722
2722
  }
2723
2723
  }, arguments) };
2724
- imports.wbg.__wbg_processapicall_895643ad20f41e9a = function(arg0, arg1, arg2) {
2724
+ imports.wbg.__wbg_processapicall_4c22e8bc8bacc81b = function(arg0, arg1, arg2) {
2725
2725
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2726
2726
  };
2727
- imports.wbg.__wbg_processapisuccess_f831762c0c753409 = function(arg0, arg1, arg2) {
2727
+ imports.wbg.__wbg_processapisuccess_3eb33d090d75d7d6 = function(arg0, arg1, arg2) {
2728
2728
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2729
2729
  };
2730
- imports.wbg.__wbg_processapierror_a8c396cc2d88131a = function(arg0, arg1, arg2) {
2730
+ imports.wbg.__wbg_processapierror_9b116ad739ee81b9 = function(arg0, arg1, arg2) {
2731
2731
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2732
2732
  };
2733
- imports.wbg.__wbg_sendinterfaceevent_34f3db156a64459c = function(arg0, arg1, arg2, arg3, arg4) {
2733
+ imports.wbg.__wbg_sendinterfaceevent_74088ba4c3a6770e = function(arg0, arg1, arg2, arg3, arg4) {
2734
2734
  let deferred0_0;
2735
2735
  let deferred0_1;
2736
2736
  let deferred1_0;
@@ -2746,7 +2746,7 @@ function __wbg_get_imports() {
2746
2746
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2747
2747
  }
2748
2748
  };
2749
- imports.wbg.__wbg_sendblocksuccess_9b19c987074800fa = function(arg0, arg1, arg2) {
2749
+ imports.wbg.__wbg_sendblocksuccess_59aa6c448defd85b = function(arg0, arg1, arg2) {
2750
2750
  let deferred0_0;
2751
2751
  let deferred0_1;
2752
2752
  try {
@@ -2757,10 +2757,10 @@ function __wbg_get_imports() {
2757
2757
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2758
2758
  }
2759
2759
  };
2760
- imports.wbg.__wbg_sendwalletupdate_fb91053f2dfd92d7 = function() {
2760
+ imports.wbg.__wbg_sendwalletupdate_294efd44c64954db = function() {
2761
2761
  MsgHandler.send_wallet_update();
2762
2762
  };
2763
- imports.wbg.__wbg_sendnewversionalert_fb8556f510067fa0 = function(arg0, arg1, arg2) {
2763
+ imports.wbg.__wbg_sendnewversionalert_3d8a016478a008a8 = function(arg0, arg1, arg2) {
2764
2764
  let deferred0_0;
2765
2765
  let deferred0_1;
2766
2766
  try {
@@ -2771,16 +2771,16 @@ function __wbg_get_imports() {
2771
2771
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2772
2772
  }
2773
2773
  };
2774
- imports.wbg.__wbg_sendblockfetchstatusevent_33a10478a811b057 = function(arg0) {
2774
+ imports.wbg.__wbg_sendblockfetchstatusevent_88a23787c102103b = function(arg0) {
2775
2775
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2776
2776
  };
2777
- imports.wbg.__wbg_savewallet_b413f5663e5b068c = function() {
2777
+ imports.wbg.__wbg_savewallet_b8dcef91791f45a0 = function() {
2778
2778
  MsgHandler.save_wallet();
2779
2779
  };
2780
- imports.wbg.__wbg_loadwallet_0d0931a9d5668c85 = function() {
2780
+ imports.wbg.__wbg_loadwallet_4420613b5d56134a = function() {
2781
2781
  MsgHandler.load_wallet();
2782
2782
  };
2783
- imports.wbg.__wbg_getmyservices_9e2781f9e7a4910d = function() {
2783
+ imports.wbg.__wbg_getmyservices_70704d160a1a8c49 = function() {
2784
2784
  const ret = MsgHandler.get_my_services();
2785
2785
  _assertClass(ret, WasmPeerServiceList);
2786
2786
  var ptr1 = ret.__destroy_into_raw();
@@ -2872,9 +2872,6 @@ function __wbg_get_imports() {
2872
2872
  imports.wbg.__wbg_info_80803d9a3f0aad16 = function(arg0, arg1, arg2, arg3) {
2873
2873
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2874
2874
  };
2875
- imports.wbg.__wbg_log_151eb4333ef0fe39 = function(arg0, arg1, arg2, arg3) {
2876
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2877
- };
2878
2875
  imports.wbg.__wbg_warn_5d3f783b0bae8943 = function(arg0, arg1, arg2, arg3) {
2879
2876
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
2880
2877
  };
@@ -3020,7 +3017,7 @@ function __wbg_get_imports() {
3020
3017
  const a = state0.a;
3021
3018
  state0.a = 0;
3022
3019
  try {
3023
- return __wbg_adapter_420(a, state0.b, arg0, arg1);
3020
+ return __wbg_adapter_418(a, state0.b, arg0, arg1);
3024
3021
  } finally {
3025
3022
  state0.a = a;
3026
3023
  }
@@ -3102,7 +3099,7 @@ function __wbg_get_imports() {
3102
3099
  return addHeapObject(ret);
3103
3100
  };
3104
3101
  imports.wbg.__wbindgen_closure_wrapper1345 = function(arg0, arg1, arg2) {
3105
- const ret = makeMutClosure(arg0, arg1, 483, __wbg_adapter_38);
3102
+ const ret = makeMutClosure(arg0, arg1, 482, __wbg_adapter_38);
3106
3103
  return addHeapObject(ret);
3107
3104
  };
3108
3105
 
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saito-wasm",
3
- "version": "0.2.90",
3
+ "version": "0.2.91",
4
4
  "files": [
5
5
  "index_bg.wasm",
6
6
  "index.js",