saito-wasm 0.2.93 → 0.2.94
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 +1 -1
- package/package.json +1 -1
- package/pkg/node/index.js +83 -83
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +139 -139
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +139 -139
- package/pkg/web/index.js +79 -79
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +139 -139
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-1508f323aa70efc2 → saito-wasm-c7a7e3d47d523d79}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-1508f323aa70efc2 → saito-wasm-c7a7e3d47d523d79}/js/msg_handler.js +0 -0
package/Cargo.toml
CHANGED
package/package.json
CHANGED
package/pkg/node/index.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-
|
|
4
|
+
const { MsgHandler } = require(String.raw`./snippets/saito-wasm-c7a7e3d47d523d79/js/msg_handler.js`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
7
|
const heap = new Array(128).fill(undefined);
|
|
8
8
|
|
|
9
9
|
heap.push(undefined, null, true, false);
|
|
10
10
|
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
12
|
-
|
|
13
11
|
let heap_next = heap.length;
|
|
14
12
|
|
|
13
|
+
function addHeapObject(obj) {
|
|
14
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
15
|
+
const idx = heap_next;
|
|
16
|
+
heap_next = heap[idx];
|
|
17
|
+
|
|
18
|
+
heap[idx] = obj;
|
|
19
|
+
return idx;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function getObject(idx) { return heap[idx]; }
|
|
23
|
+
|
|
15
24
|
function dropObject(idx) {
|
|
16
25
|
if (idx < 132) return;
|
|
17
26
|
heap[idx] = heap_next;
|
|
@@ -24,15 +33,6 @@ function takeObject(idx) {
|
|
|
24
33
|
return ret;
|
|
25
34
|
}
|
|
26
35
|
|
|
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
36
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
37
37
|
|
|
38
38
|
cachedTextDecoder.decode();
|
|
@@ -228,6 +228,14 @@ function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
|
228
228
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h575b308e3e106cb6(arg0, arg1, addHeapObject(arg2));
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
let stack_pointer = 128;
|
|
232
|
+
|
|
233
|
+
function addBorrowedObject(obj) {
|
|
234
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
235
|
+
heap[--stack_pointer] = obj;
|
|
236
|
+
return stack_pointer;
|
|
237
|
+
}
|
|
238
|
+
|
|
231
239
|
function _assertClass(instance, klass) {
|
|
232
240
|
if (!(instance instanceof klass)) {
|
|
233
241
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -242,14 +250,6 @@ function handleError(f, args) {
|
|
|
242
250
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
243
251
|
}
|
|
244
252
|
}
|
|
245
|
-
|
|
246
|
-
let stack_pointer = 128;
|
|
247
|
-
|
|
248
|
-
function addBorrowedObject(obj) {
|
|
249
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
250
|
-
heap[--stack_pointer] = obj;
|
|
251
|
-
return stack_pointer;
|
|
252
|
-
}
|
|
253
253
|
/**
|
|
254
254
|
* @param {string} json
|
|
255
255
|
* @param {string} private_key
|
|
@@ -2547,17 +2547,22 @@ class WasmWalletSlip {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2549
2549
|
|
|
2550
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2551
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2552
|
+
return addHeapObject(ret);
|
|
2553
|
+
};
|
|
2554
|
+
|
|
2550
2555
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2551
2556
|
takeObject(arg0);
|
|
2552
2557
|
};
|
|
2553
2558
|
|
|
2554
|
-
module.exports.
|
|
2555
|
-
const ret =
|
|
2559
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2560
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2556
2561
|
return addHeapObject(ret);
|
|
2557
2562
|
};
|
|
2558
2563
|
|
|
2559
|
-
module.exports.
|
|
2560
|
-
const ret =
|
|
2564
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2565
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2561
2566
|
return addHeapObject(ret);
|
|
2562
2567
|
};
|
|
2563
2568
|
|
|
@@ -2566,11 +2571,6 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
2566
2571
|
return addHeapObject(ret);
|
|
2567
2572
|
};
|
|
2568
2573
|
|
|
2569
|
-
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2570
|
-
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2571
|
-
return addHeapObject(ret);
|
|
2572
|
-
};
|
|
2573
|
-
|
|
2574
2574
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2575
2575
|
const obj = getObject(arg1);
|
|
2576
2576
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -2585,33 +2585,33 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
|
2585
2585
|
return addHeapObject(ret);
|
|
2586
2586
|
};
|
|
2587
2587
|
|
|
2588
|
-
module.exports.
|
|
2589
|
-
const ret =
|
|
2588
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2589
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2590
2590
|
return addHeapObject(ret);
|
|
2591
2591
|
};
|
|
2592
2592
|
|
|
2593
|
-
module.exports.
|
|
2594
|
-
const ret =
|
|
2593
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2594
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2595
2595
|
return addHeapObject(ret);
|
|
2596
2596
|
};
|
|
2597
2597
|
|
|
2598
|
-
module.exports.
|
|
2599
|
-
const ret =
|
|
2598
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2599
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2600
2600
|
return addHeapObject(ret);
|
|
2601
2601
|
};
|
|
2602
2602
|
|
|
2603
|
-
module.exports.
|
|
2604
|
-
const ret =
|
|
2603
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2604
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2605
2605
|
return addHeapObject(ret);
|
|
2606
2606
|
};
|
|
2607
2607
|
|
|
2608
|
-
module.exports.
|
|
2609
|
-
const ret =
|
|
2608
|
+
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2609
|
+
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2610
2610
|
return addHeapObject(ret);
|
|
2611
2611
|
};
|
|
2612
2612
|
|
|
2613
|
-
module.exports.
|
|
2614
|
-
const ret =
|
|
2613
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2614
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2615
2615
|
return addHeapObject(ret);
|
|
2616
2616
|
};
|
|
2617
2617
|
|
|
@@ -2620,31 +2620,15 @@ module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
|
2620
2620
|
return addHeapObject(ret);
|
|
2621
2621
|
};
|
|
2622
2622
|
|
|
2623
|
-
module.exports.
|
|
2624
|
-
const val = getObject(arg0);
|
|
2625
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2626
|
-
return ret;
|
|
2627
|
-
};
|
|
2628
|
-
|
|
2629
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2630
|
-
const ret = getObject(arg0) === undefined;
|
|
2631
|
-
return ret;
|
|
2632
|
-
};
|
|
2633
|
-
|
|
2634
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
2635
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
2636
|
-
return ret;
|
|
2637
|
-
};
|
|
2638
|
-
|
|
2639
|
-
module.exports.__wbg_sendmessage_7da6b536e60629d8 = function(arg0, arg1) {
|
|
2623
|
+
module.exports.__wbg_sendmessage_594d795106eb02f5 = function(arg0, arg1) {
|
|
2640
2624
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2641
2625
|
};
|
|
2642
2626
|
|
|
2643
|
-
module.exports.
|
|
2627
|
+
module.exports.__wbg_sendmessagetoall_4e076ead1eedc2da = function(arg0, arg1) {
|
|
2644
2628
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2645
2629
|
};
|
|
2646
2630
|
|
|
2647
|
-
module.exports.
|
|
2631
|
+
module.exports.__wbg_connecttopeer_1f47b54f99b99d4c = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2648
2632
|
let deferred0_0;
|
|
2649
2633
|
let deferred0_1;
|
|
2650
2634
|
try {
|
|
@@ -2657,12 +2641,12 @@ module.exports.__wbg_connecttopeer_38a6c0f7ca69b030 = function() { return handle
|
|
|
2657
2641
|
}
|
|
2658
2642
|
}, arguments) };
|
|
2659
2643
|
|
|
2660
|
-
module.exports.
|
|
2644
|
+
module.exports.__wbg_disconnectfrompeer_53c5b29f2f9c0dc7 = function() { return handleError(function (arg0) {
|
|
2661
2645
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2662
2646
|
return addHeapObject(ret);
|
|
2663
2647
|
}, arguments) };
|
|
2664
2648
|
|
|
2665
|
-
module.exports.
|
|
2649
|
+
module.exports.__wbg_fetchblockfrompeer_e6b499e0b479aae2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2666
2650
|
let deferred0_0;
|
|
2667
2651
|
let deferred0_1;
|
|
2668
2652
|
try {
|
|
@@ -2675,7 +2659,7 @@ module.exports.__wbg_fetchblockfrompeer_05f4accffdcb4e73 = function() { return h
|
|
|
2675
2659
|
}
|
|
2676
2660
|
}, arguments) };
|
|
2677
2661
|
|
|
2678
|
-
module.exports.
|
|
2662
|
+
module.exports.__wbg_writevalue_7e12e50eb8cb94c6 = function(arg0, arg1, arg2) {
|
|
2679
2663
|
let deferred0_0;
|
|
2680
2664
|
let deferred0_1;
|
|
2681
2665
|
try {
|
|
@@ -2687,7 +2671,7 @@ module.exports.__wbg_writevalue_52c350b098d8ba6d = function(arg0, arg1, arg2) {
|
|
|
2687
2671
|
}
|
|
2688
2672
|
};
|
|
2689
2673
|
|
|
2690
|
-
module.exports.
|
|
2674
|
+
module.exports.__wbg_appendvalue_f3179a17f42ac7f3 = function(arg0, arg1, arg2) {
|
|
2691
2675
|
let deferred0_0;
|
|
2692
2676
|
let deferred0_1;
|
|
2693
2677
|
try {
|
|
@@ -2699,7 +2683,7 @@ module.exports.__wbg_appendvalue_d52b5112f880c2bd = function(arg0, arg1, arg2) {
|
|
|
2699
2683
|
}
|
|
2700
2684
|
};
|
|
2701
2685
|
|
|
2702
|
-
module.exports.
|
|
2686
|
+
module.exports.__wbg_flushdata_1fe851fa7a3d6a55 = function(arg0, arg1) {
|
|
2703
2687
|
let deferred0_0;
|
|
2704
2688
|
let deferred0_1;
|
|
2705
2689
|
try {
|
|
@@ -2711,7 +2695,7 @@ module.exports.__wbg_flushdata_7eae5dacc6aa6fd6 = function(arg0, arg1) {
|
|
|
2711
2695
|
}
|
|
2712
2696
|
};
|
|
2713
2697
|
|
|
2714
|
-
module.exports.
|
|
2698
|
+
module.exports.__wbg_readvalue_2eeaa4ac144d96ce = function() { return handleError(function (arg0, arg1) {
|
|
2715
2699
|
let deferred0_0;
|
|
2716
2700
|
let deferred0_1;
|
|
2717
2701
|
try {
|
|
@@ -2724,12 +2708,12 @@ module.exports.__wbg_readvalue_2ab41e8d220d2dea = function() { return handleErro
|
|
|
2724
2708
|
}
|
|
2725
2709
|
}, arguments) };
|
|
2726
2710
|
|
|
2727
|
-
module.exports.
|
|
2711
|
+
module.exports.__wbg_loadblockfilelist_60262eab3d6ae9a5 = function() { return handleError(function () {
|
|
2728
2712
|
const ret = MsgHandler.load_block_file_list();
|
|
2729
2713
|
return addHeapObject(ret);
|
|
2730
2714
|
}, arguments) };
|
|
2731
2715
|
|
|
2732
|
-
module.exports.
|
|
2716
|
+
module.exports.__wbg_isexistingfile_a94137c422d0b257 = function() { return handleError(function (arg0, arg1) {
|
|
2733
2717
|
let deferred0_0;
|
|
2734
2718
|
let deferred0_1;
|
|
2735
2719
|
try {
|
|
@@ -2742,7 +2726,7 @@ module.exports.__wbg_isexistingfile_7adfeb51601d9a39 = function() { return handl
|
|
|
2742
2726
|
}
|
|
2743
2727
|
}, arguments) };
|
|
2744
2728
|
|
|
2745
|
-
module.exports.
|
|
2729
|
+
module.exports.__wbg_removevalue_a29f2712d8f8bd61 = function() { return handleError(function (arg0, arg1) {
|
|
2746
2730
|
let deferred0_0;
|
|
2747
2731
|
let deferred0_1;
|
|
2748
2732
|
try {
|
|
@@ -2755,7 +2739,7 @@ module.exports.__wbg_removevalue_023a9b789c850581 = function() { return handleEr
|
|
|
2755
2739
|
}
|
|
2756
2740
|
}, arguments) };
|
|
2757
2741
|
|
|
2758
|
-
module.exports.
|
|
2742
|
+
module.exports.__wbg_ensureblockdirectoryexists_b2308c9956a4a01b = function() { return handleError(function (arg0, arg1) {
|
|
2759
2743
|
let deferred0_0;
|
|
2760
2744
|
let deferred0_1;
|
|
2761
2745
|
try {
|
|
@@ -2767,19 +2751,19 @@ module.exports.__wbg_ensureblockdirectoryexists_18f639bed1c973ea = function() {
|
|
|
2767
2751
|
}
|
|
2768
2752
|
}, arguments) };
|
|
2769
2753
|
|
|
2770
|
-
module.exports.
|
|
2754
|
+
module.exports.__wbg_processapicall_6318c6fc130808b0 = function(arg0, arg1, arg2) {
|
|
2771
2755
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2772
2756
|
};
|
|
2773
2757
|
|
|
2774
|
-
module.exports.
|
|
2758
|
+
module.exports.__wbg_processapisuccess_f4c10a64b78a61e8 = function(arg0, arg1, arg2) {
|
|
2775
2759
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2776
2760
|
};
|
|
2777
2761
|
|
|
2778
|
-
module.exports.
|
|
2762
|
+
module.exports.__wbg_processapierror_08bec5e66ee65020 = function(arg0, arg1, arg2) {
|
|
2779
2763
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2780
2764
|
};
|
|
2781
2765
|
|
|
2782
|
-
module.exports.
|
|
2766
|
+
module.exports.__wbg_sendinterfaceevent_03afdbff74417764 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2783
2767
|
let deferred0_0;
|
|
2784
2768
|
let deferred0_1;
|
|
2785
2769
|
let deferred1_0;
|
|
@@ -2796,7 +2780,7 @@ module.exports.__wbg_sendinterfaceevent_62edd715d62b856b = function(arg0, arg1,
|
|
|
2796
2780
|
}
|
|
2797
2781
|
};
|
|
2798
2782
|
|
|
2799
|
-
module.exports.
|
|
2783
|
+
module.exports.__wbg_sendblocksuccess_227879f53a50c589 = function(arg0, arg1, arg2) {
|
|
2800
2784
|
let deferred0_0;
|
|
2801
2785
|
let deferred0_1;
|
|
2802
2786
|
try {
|
|
@@ -2808,11 +2792,11 @@ module.exports.__wbg_sendblocksuccess_ca14df574b2164de = function(arg0, arg1, ar
|
|
|
2808
2792
|
}
|
|
2809
2793
|
};
|
|
2810
2794
|
|
|
2811
|
-
module.exports.
|
|
2795
|
+
module.exports.__wbg_sendwalletupdate_41f426cbfcca9be9 = function() {
|
|
2812
2796
|
MsgHandler.send_wallet_update();
|
|
2813
2797
|
};
|
|
2814
2798
|
|
|
2815
|
-
module.exports.
|
|
2799
|
+
module.exports.__wbg_sendnewversionalert_8543261301353529 = function(arg0, arg1, arg2) {
|
|
2816
2800
|
let deferred0_0;
|
|
2817
2801
|
let deferred0_1;
|
|
2818
2802
|
try {
|
|
@@ -2824,19 +2808,19 @@ module.exports.__wbg_sendnewversionalert_75337b4f4d4963bc = function(arg0, arg1,
|
|
|
2824
2808
|
}
|
|
2825
2809
|
};
|
|
2826
2810
|
|
|
2827
|
-
module.exports.
|
|
2811
|
+
module.exports.__wbg_sendblockfetchstatusevent_c3abe52d61c9767d = function(arg0) {
|
|
2828
2812
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2829
2813
|
};
|
|
2830
2814
|
|
|
2831
|
-
module.exports.
|
|
2815
|
+
module.exports.__wbg_savewallet_aa6ffa02ce1cade9 = function() {
|
|
2832
2816
|
MsgHandler.save_wallet();
|
|
2833
2817
|
};
|
|
2834
2818
|
|
|
2835
|
-
module.exports.
|
|
2819
|
+
module.exports.__wbg_loadwallet_2593e9c936f7b019 = function() {
|
|
2836
2820
|
MsgHandler.load_wallet();
|
|
2837
2821
|
};
|
|
2838
2822
|
|
|
2839
|
-
module.exports.
|
|
2823
|
+
module.exports.__wbg_getmyservices_ec00e680c8c9a316 = function() {
|
|
2840
2824
|
const ret = MsgHandler.get_my_services();
|
|
2841
2825
|
_assertClass(ret, WasmPeerServiceList);
|
|
2842
2826
|
var ptr1 = ret.__destroy_into_raw();
|
|
@@ -2848,6 +2832,22 @@ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
|
2848
2832
|
return addHeapObject(ret);
|
|
2849
2833
|
};
|
|
2850
2834
|
|
|
2835
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2836
|
+
const val = getObject(arg0);
|
|
2837
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2838
|
+
return ret;
|
|
2839
|
+
};
|
|
2840
|
+
|
|
2841
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2842
|
+
const ret = getObject(arg0) === undefined;
|
|
2843
|
+
return ret;
|
|
2844
|
+
};
|
|
2845
|
+
|
|
2846
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
2847
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
2848
|
+
return ret;
|
|
2849
|
+
};
|
|
2850
|
+
|
|
2851
2851
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2852
2852
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2853
2853
|
return addHeapObject(ret);
|
|
@@ -3219,8 +3219,8 @@ module.exports.__wbindgen_memory = function() {
|
|
|
3219
3219
|
return addHeapObject(ret);
|
|
3220
3220
|
};
|
|
3221
3221
|
|
|
3222
|
-
module.exports.
|
|
3223
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3222
|
+
module.exports.__wbindgen_closure_wrapper1365 = function(arg0, arg1, arg2) {
|
|
3223
|
+
const ret = makeMutClosure(arg0, arg1, 484, __wbg_adapter_38);
|
|
3224
3224
|
return addHeapObject(ret);
|
|
3225
3225
|
};
|
|
3226
3226
|
|
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|