saito-wasm 0.2.94 → 0.2.96
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.d.ts +4 -0
- package/pkg/node/index.js +104 -96
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +61 -60
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +65 -60
- package/pkg/web/index.js +98 -90
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +61 -60
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-c7a7e3d47d523d79 → saito-wasm-d7370202607d5c1c}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-c7a7e3d47d523d79 → saito-wasm-d7370202607d5c1c}/js/msg_handler.js +0 -0
package/Cargo.toml
CHANGED
package/package.json
CHANGED
package/pkg/node/index.d.ts
CHANGED
|
@@ -243,6 +243,10 @@ export function produce_block_without_gt(): Promise<boolean>;
|
|
|
243
243
|
*/
|
|
244
244
|
export function get_stats(): Promise<string>;
|
|
245
245
|
/**
|
|
246
|
+
* @returns {Promise<string>}
|
|
247
|
+
*/
|
|
248
|
+
export function get_peer_stats(): Promise<string>;
|
|
249
|
+
/**
|
|
246
250
|
*/
|
|
247
251
|
export class SaitoWasm {
|
|
248
252
|
free(): void;
|
package/pkg/node/index.js
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
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-d7370202607d5c1c/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
|
-
let heap_next = heap.length;
|
|
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
11
|
function getObject(idx) { return heap[idx]; }
|
|
23
12
|
|
|
13
|
+
let heap_next = heap.length;
|
|
14
|
+
|
|
24
15
|
function dropObject(idx) {
|
|
25
16
|
if (idx < 132) return;
|
|
26
17
|
heap[idx] = heap_next;
|
|
@@ -51,6 +42,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
51
42
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
52
43
|
}
|
|
53
44
|
|
|
45
|
+
function addHeapObject(obj) {
|
|
46
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
|
+
const idx = heap_next;
|
|
48
|
+
heap_next = heap[idx];
|
|
49
|
+
|
|
50
|
+
heap[idx] = obj;
|
|
51
|
+
return idx;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
55
55
|
|
|
56
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -228,12 +228,12 @@ 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
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
231
|
+
function handleError(f, args) {
|
|
232
|
+
try {
|
|
233
|
+
return f.apply(this, args);
|
|
234
|
+
} catch (e) {
|
|
235
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
236
|
+
}
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
function _assertClass(instance, klass) {
|
|
@@ -243,12 +243,12 @@ function _assertClass(instance, klass) {
|
|
|
243
243
|
return instance.ptr;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
252
|
}
|
|
253
253
|
/**
|
|
254
254
|
* @param {string} json
|
|
@@ -689,7 +689,15 @@ module.exports.get_stats = function() {
|
|
|
689
689
|
return takeObject(ret);
|
|
690
690
|
};
|
|
691
691
|
|
|
692
|
-
|
|
692
|
+
/**
|
|
693
|
+
* @returns {Promise<string>}
|
|
694
|
+
*/
|
|
695
|
+
module.exports.get_peer_stats = function() {
|
|
696
|
+
const ret = wasm.get_peer_stats();
|
|
697
|
+
return takeObject(ret);
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
function __wbg_adapter_420(arg0, arg1, arg2, arg3) {
|
|
693
701
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h1d2fe914d97897fe(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
694
702
|
}
|
|
695
703
|
|
|
@@ -2547,25 +2555,10 @@ class WasmWalletSlip {
|
|
|
2547
2555
|
}
|
|
2548
2556
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2549
2557
|
|
|
2550
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2551
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
2552
|
-
return addHeapObject(ret);
|
|
2553
|
-
};
|
|
2554
|
-
|
|
2555
2558
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2556
2559
|
takeObject(arg0);
|
|
2557
2560
|
};
|
|
2558
2561
|
|
|
2559
|
-
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2560
|
-
const ret = WasmPeer.__wrap(arg0);
|
|
2561
|
-
return addHeapObject(ret);
|
|
2562
|
-
};
|
|
2563
|
-
|
|
2564
|
-
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2565
|
-
const ret = WasmNFT.__wrap(arg0);
|
|
2566
|
-
return addHeapObject(ret);
|
|
2567
|
-
};
|
|
2568
|
-
|
|
2569
2562
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2570
2563
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
2571
2564
|
return addHeapObject(ret);
|
|
@@ -2585,13 +2578,18 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
|
2585
2578
|
return addHeapObject(ret);
|
|
2586
2579
|
};
|
|
2587
2580
|
|
|
2588
|
-
module.exports.
|
|
2589
|
-
const ret =
|
|
2581
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2582
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2590
2583
|
return addHeapObject(ret);
|
|
2591
2584
|
};
|
|
2592
2585
|
|
|
2593
|
-
module.exports.
|
|
2594
|
-
const ret =
|
|
2586
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2587
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2588
|
+
return addHeapObject(ret);
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2592
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2595
2593
|
return addHeapObject(ret);
|
|
2596
2594
|
};
|
|
2597
2595
|
|
|
@@ -2600,35 +2598,61 @@ module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
|
2600
2598
|
return addHeapObject(ret);
|
|
2601
2599
|
};
|
|
2602
2600
|
|
|
2601
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2602
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2603
|
+
return addHeapObject(ret);
|
|
2604
|
+
};
|
|
2605
|
+
|
|
2606
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2607
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2608
|
+
return addHeapObject(ret);
|
|
2609
|
+
};
|
|
2610
|
+
|
|
2603
2611
|
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2604
2612
|
const ret = WasmSlip.__wrap(arg0);
|
|
2605
2613
|
return addHeapObject(ret);
|
|
2606
2614
|
};
|
|
2607
2615
|
|
|
2616
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2617
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2618
|
+
return addHeapObject(ret);
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2608
2621
|
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
2609
2622
|
const ret = WasmWalletSlip.__wrap(arg0);
|
|
2610
2623
|
return addHeapObject(ret);
|
|
2611
2624
|
};
|
|
2612
2625
|
|
|
2613
|
-
module.exports.
|
|
2614
|
-
const ret =
|
|
2626
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2627
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2615
2628
|
return addHeapObject(ret);
|
|
2616
2629
|
};
|
|
2617
2630
|
|
|
2618
|
-
module.exports.
|
|
2619
|
-
const
|
|
2620
|
-
|
|
2631
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2632
|
+
const val = getObject(arg0);
|
|
2633
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2634
|
+
return ret;
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2637
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2638
|
+
const ret = getObject(arg0) === undefined;
|
|
2639
|
+
return ret;
|
|
2640
|
+
};
|
|
2641
|
+
|
|
2642
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
2643
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
2644
|
+
return ret;
|
|
2621
2645
|
};
|
|
2622
2646
|
|
|
2623
|
-
module.exports.
|
|
2647
|
+
module.exports.__wbg_sendmessage_fa7a8124c7dbe00e = function(arg0, arg1) {
|
|
2624
2648
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2625
2649
|
};
|
|
2626
2650
|
|
|
2627
|
-
module.exports.
|
|
2651
|
+
module.exports.__wbg_sendmessagetoall_7c973814ebd92595 = function(arg0, arg1) {
|
|
2628
2652
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2629
2653
|
};
|
|
2630
2654
|
|
|
2631
|
-
module.exports.
|
|
2655
|
+
module.exports.__wbg_connecttopeer_a1e2c4cfd6cb6997 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2632
2656
|
let deferred0_0;
|
|
2633
2657
|
let deferred0_1;
|
|
2634
2658
|
try {
|
|
@@ -2641,12 +2665,12 @@ module.exports.__wbg_connecttopeer_1f47b54f99b99d4c = function() { return handle
|
|
|
2641
2665
|
}
|
|
2642
2666
|
}, arguments) };
|
|
2643
2667
|
|
|
2644
|
-
module.exports.
|
|
2668
|
+
module.exports.__wbg_disconnectfrompeer_8aa5ebd3ec5a11a4 = function() { return handleError(function (arg0) {
|
|
2645
2669
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2646
2670
|
return addHeapObject(ret);
|
|
2647
2671
|
}, arguments) };
|
|
2648
2672
|
|
|
2649
|
-
module.exports.
|
|
2673
|
+
module.exports.__wbg_fetchblockfrompeer_ea41df70b4b768e4 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2650
2674
|
let deferred0_0;
|
|
2651
2675
|
let deferred0_1;
|
|
2652
2676
|
try {
|
|
@@ -2659,7 +2683,7 @@ module.exports.__wbg_fetchblockfrompeer_e6b499e0b479aae2 = function() { return h
|
|
|
2659
2683
|
}
|
|
2660
2684
|
}, arguments) };
|
|
2661
2685
|
|
|
2662
|
-
module.exports.
|
|
2686
|
+
module.exports.__wbg_writevalue_f9b709ddde5c102b = function(arg0, arg1, arg2) {
|
|
2663
2687
|
let deferred0_0;
|
|
2664
2688
|
let deferred0_1;
|
|
2665
2689
|
try {
|
|
@@ -2671,7 +2695,7 @@ module.exports.__wbg_writevalue_7e12e50eb8cb94c6 = function(arg0, arg1, arg2) {
|
|
|
2671
2695
|
}
|
|
2672
2696
|
};
|
|
2673
2697
|
|
|
2674
|
-
module.exports.
|
|
2698
|
+
module.exports.__wbg_appendvalue_00a0891256e2d1af = function(arg0, arg1, arg2) {
|
|
2675
2699
|
let deferred0_0;
|
|
2676
2700
|
let deferred0_1;
|
|
2677
2701
|
try {
|
|
@@ -2683,7 +2707,7 @@ module.exports.__wbg_appendvalue_f3179a17f42ac7f3 = function(arg0, arg1, arg2) {
|
|
|
2683
2707
|
}
|
|
2684
2708
|
};
|
|
2685
2709
|
|
|
2686
|
-
module.exports.
|
|
2710
|
+
module.exports.__wbg_flushdata_d74e84968bb2bb0f = function(arg0, arg1) {
|
|
2687
2711
|
let deferred0_0;
|
|
2688
2712
|
let deferred0_1;
|
|
2689
2713
|
try {
|
|
@@ -2695,7 +2719,7 @@ module.exports.__wbg_flushdata_1fe851fa7a3d6a55 = function(arg0, arg1) {
|
|
|
2695
2719
|
}
|
|
2696
2720
|
};
|
|
2697
2721
|
|
|
2698
|
-
module.exports.
|
|
2722
|
+
module.exports.__wbg_readvalue_7b7cdfd5b703d8f5 = function() { return handleError(function (arg0, arg1) {
|
|
2699
2723
|
let deferred0_0;
|
|
2700
2724
|
let deferred0_1;
|
|
2701
2725
|
try {
|
|
@@ -2708,12 +2732,12 @@ module.exports.__wbg_readvalue_2eeaa4ac144d96ce = function() { return handleErro
|
|
|
2708
2732
|
}
|
|
2709
2733
|
}, arguments) };
|
|
2710
2734
|
|
|
2711
|
-
module.exports.
|
|
2735
|
+
module.exports.__wbg_loadblockfilelist_72f526d78d5b4cb3 = function() { return handleError(function () {
|
|
2712
2736
|
const ret = MsgHandler.load_block_file_list();
|
|
2713
2737
|
return addHeapObject(ret);
|
|
2714
2738
|
}, arguments) };
|
|
2715
2739
|
|
|
2716
|
-
module.exports.
|
|
2740
|
+
module.exports.__wbg_isexistingfile_c5ee5093903eb9e7 = function() { return handleError(function (arg0, arg1) {
|
|
2717
2741
|
let deferred0_0;
|
|
2718
2742
|
let deferred0_1;
|
|
2719
2743
|
try {
|
|
@@ -2726,7 +2750,7 @@ module.exports.__wbg_isexistingfile_a94137c422d0b257 = function() { return handl
|
|
|
2726
2750
|
}
|
|
2727
2751
|
}, arguments) };
|
|
2728
2752
|
|
|
2729
|
-
module.exports.
|
|
2753
|
+
module.exports.__wbg_removevalue_558005620aef5e36 = function() { return handleError(function (arg0, arg1) {
|
|
2730
2754
|
let deferred0_0;
|
|
2731
2755
|
let deferred0_1;
|
|
2732
2756
|
try {
|
|
@@ -2739,7 +2763,7 @@ module.exports.__wbg_removevalue_a29f2712d8f8bd61 = function() { return handleEr
|
|
|
2739
2763
|
}
|
|
2740
2764
|
}, arguments) };
|
|
2741
2765
|
|
|
2742
|
-
module.exports.
|
|
2766
|
+
module.exports.__wbg_ensureblockdirectoryexists_336ca16e9d60923b = function() { return handleError(function (arg0, arg1) {
|
|
2743
2767
|
let deferred0_0;
|
|
2744
2768
|
let deferred0_1;
|
|
2745
2769
|
try {
|
|
@@ -2751,19 +2775,19 @@ module.exports.__wbg_ensureblockdirectoryexists_b2308c9956a4a01b = function() {
|
|
|
2751
2775
|
}
|
|
2752
2776
|
}, arguments) };
|
|
2753
2777
|
|
|
2754
|
-
module.exports.
|
|
2778
|
+
module.exports.__wbg_processapicall_f721e50b94451ca2 = function(arg0, arg1, arg2) {
|
|
2755
2779
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2756
2780
|
};
|
|
2757
2781
|
|
|
2758
|
-
module.exports.
|
|
2782
|
+
module.exports.__wbg_processapisuccess_900a9588104f9c34 = function(arg0, arg1, arg2) {
|
|
2759
2783
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2760
2784
|
};
|
|
2761
2785
|
|
|
2762
|
-
module.exports.
|
|
2786
|
+
module.exports.__wbg_processapierror_945b908899bd8e09 = function(arg0, arg1, arg2) {
|
|
2763
2787
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2764
2788
|
};
|
|
2765
2789
|
|
|
2766
|
-
module.exports.
|
|
2790
|
+
module.exports.__wbg_sendinterfaceevent_685c5971bbaee5b9 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2767
2791
|
let deferred0_0;
|
|
2768
2792
|
let deferred0_1;
|
|
2769
2793
|
let deferred1_0;
|
|
@@ -2780,7 +2804,7 @@ module.exports.__wbg_sendinterfaceevent_03afdbff74417764 = function(arg0, arg1,
|
|
|
2780
2804
|
}
|
|
2781
2805
|
};
|
|
2782
2806
|
|
|
2783
|
-
module.exports.
|
|
2807
|
+
module.exports.__wbg_sendblocksuccess_585f8b5f0a75cf55 = function(arg0, arg1, arg2) {
|
|
2784
2808
|
let deferred0_0;
|
|
2785
2809
|
let deferred0_1;
|
|
2786
2810
|
try {
|
|
@@ -2792,11 +2816,11 @@ module.exports.__wbg_sendblocksuccess_227879f53a50c589 = function(arg0, arg1, ar
|
|
|
2792
2816
|
}
|
|
2793
2817
|
};
|
|
2794
2818
|
|
|
2795
|
-
module.exports.
|
|
2819
|
+
module.exports.__wbg_sendwalletupdate_ddf2562957aaa462 = function() {
|
|
2796
2820
|
MsgHandler.send_wallet_update();
|
|
2797
2821
|
};
|
|
2798
2822
|
|
|
2799
|
-
module.exports.
|
|
2823
|
+
module.exports.__wbg_sendnewversionalert_96efb3efb614663b = function(arg0, arg1, arg2) {
|
|
2800
2824
|
let deferred0_0;
|
|
2801
2825
|
let deferred0_1;
|
|
2802
2826
|
try {
|
|
@@ -2808,48 +2832,32 @@ module.exports.__wbg_sendnewversionalert_8543261301353529 = function(arg0, arg1,
|
|
|
2808
2832
|
}
|
|
2809
2833
|
};
|
|
2810
2834
|
|
|
2811
|
-
module.exports.
|
|
2835
|
+
module.exports.__wbg_sendblockfetchstatusevent_a5dc70100cf5a94b = function(arg0) {
|
|
2812
2836
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2813
2837
|
};
|
|
2814
2838
|
|
|
2815
|
-
module.exports.
|
|
2839
|
+
module.exports.__wbg_savewallet_88b3d39db83ef7bc = function() {
|
|
2816
2840
|
MsgHandler.save_wallet();
|
|
2817
2841
|
};
|
|
2818
2842
|
|
|
2819
|
-
module.exports.
|
|
2843
|
+
module.exports.__wbg_loadwallet_103853d18e46f437 = function() {
|
|
2820
2844
|
MsgHandler.load_wallet();
|
|
2821
2845
|
};
|
|
2822
2846
|
|
|
2823
|
-
module.exports.
|
|
2847
|
+
module.exports.__wbg_getmyservices_76e2d5fd1c547778 = function() {
|
|
2824
2848
|
const ret = MsgHandler.get_my_services();
|
|
2825
2849
|
_assertClass(ret, WasmPeerServiceList);
|
|
2826
2850
|
var ptr1 = ret.__destroy_into_raw();
|
|
2827
2851
|
return ptr1;
|
|
2828
2852
|
};
|
|
2829
2853
|
|
|
2830
|
-
module.exports.
|
|
2831
|
-
const ret =
|
|
2854
|
+
module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
2855
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2832
2856
|
return addHeapObject(ret);
|
|
2833
2857
|
};
|
|
2834
2858
|
|
|
2835
|
-
module.exports.
|
|
2836
|
-
const
|
|
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
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2852
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2859
|
+
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2860
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2853
2861
|
return addHeapObject(ret);
|
|
2854
2862
|
};
|
|
2855
2863
|
|
|
@@ -3121,7 +3129,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
3121
3129
|
const a = state0.a;
|
|
3122
3130
|
state0.a = 0;
|
|
3123
3131
|
try {
|
|
3124
|
-
return
|
|
3132
|
+
return __wbg_adapter_420(a, state0.b, arg0, arg1);
|
|
3125
3133
|
} finally {
|
|
3126
3134
|
state0.a = a;
|
|
3127
3135
|
}
|
|
@@ -3219,8 +3227,8 @@ module.exports.__wbindgen_memory = function() {
|
|
|
3219
3227
|
return addHeapObject(ret);
|
|
3220
3228
|
};
|
|
3221
3229
|
|
|
3222
|
-
module.exports.
|
|
3223
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3230
|
+
module.exports.__wbindgen_closure_wrapper1369 = function(arg0, arg1, arg2) {
|
|
3231
|
+
const ret = makeMutClosure(arg0, arg1, 489, __wbg_adapter_38);
|
|
3224
3232
|
return addHeapObject(ret);
|
|
3225
3233
|
};
|
|
3226
3234
|
|
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|
|
@@ -6,30 +6,8 @@ export function wasmbalancesnapshot_get_file_name(a: number): number;
|
|
|
6
6
|
export function wasmbalancesnapshot_get_entries(a: number): number;
|
|
7
7
|
export function wasmbalancesnapshot_from_string(a: number, b: number): void;
|
|
8
8
|
export function wasmbalancesnapshot_to_string(a: number): number;
|
|
9
|
-
export function __wbg_wasmblockchain_free(a: number): void;
|
|
10
|
-
export function wasmblockchain_reset(a: number): number;
|
|
11
|
-
export function wasmblockchain_get_last_block_id(a: number): number;
|
|
12
|
-
export function wasmblockchain_get_last_timestamp(a: number): number;
|
|
13
|
-
export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
|
|
14
|
-
export function wasmblockchain_get_last_block_hash(a: number): number;
|
|
15
|
-
export function wasmblockchain_get_last_burnfee(a: number): number;
|
|
16
|
-
export function wasmblockchain_get_genesis_block_id(a: number): number;
|
|
17
|
-
export function wasmblockchain_get_genesis_timestamp(a: number): number;
|
|
18
|
-
export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
|
|
19
|
-
export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
|
|
20
|
-
export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
|
|
21
|
-
export function wasmblockchain_get_latest_block_id(a: number): number;
|
|
22
|
-
export function wasmblockchain_get_fork_id(a: number): number;
|
|
23
|
-
export function wasmblockchain_set_fork_id(a: number, b: number): number;
|
|
24
|
-
export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
|
|
25
|
-
export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
|
|
26
|
-
export function wasmblockchain_set_safe_to_prune_transaction(a: number, b: number): number;
|
|
27
9
|
export function __wbg_wasmconfiguration_free(a: number): void;
|
|
28
10
|
export function wasmconfiguration_new(): number;
|
|
29
|
-
export function __wbg_wasmhop_free(a: number): void;
|
|
30
|
-
export function wasmhop_from(a: number, b: number): void;
|
|
31
|
-
export function wasmhop_sig(a: number, b: number): void;
|
|
32
|
-
export function wasmhop_to(a: number, b: number): void;
|
|
33
11
|
export function __wbg_wasmnft_free(a: number): void;
|
|
34
12
|
export function wasmnft_new(): number;
|
|
35
13
|
export function wasmnft_id(a: number): number;
|
|
@@ -42,6 +20,17 @@ export function wasmnft_slip2(a: number): number;
|
|
|
42
20
|
export function wasmnft_set_slip2(a: number, b: number): void;
|
|
43
21
|
export function wasmnft_slip3(a: number): number;
|
|
44
22
|
export function wasmnft_set_slip3(a: number, b: number): void;
|
|
23
|
+
export function __wbg_wasmpeerservicelist_free(a: number): void;
|
|
24
|
+
export function __wbg_wasmpeerservice_free(a: number): void;
|
|
25
|
+
export function wasmpeerservice_new(): number;
|
|
26
|
+
export function wasmpeerservice_set_service(a: number, b: number): void;
|
|
27
|
+
export function wasmpeerservice_get_service(a: number): number;
|
|
28
|
+
export function wasmpeerservice_set_name(a: number, b: number): void;
|
|
29
|
+
export function wasmpeerservice_get_name(a: number): number;
|
|
30
|
+
export function wasmpeerservice_set_domain(a: number, b: number): void;
|
|
31
|
+
export function wasmpeerservice_get_domain(a: number): number;
|
|
32
|
+
export function wasmpeerservicelist_push(a: number, b: number): void;
|
|
33
|
+
export function wasmpeerservicelist_new(): number;
|
|
45
34
|
export function __wbg_wasmwallet_free(a: number): void;
|
|
46
35
|
export function __wbg_wasmwalletslip_free(a: number): void;
|
|
47
36
|
export function wasmwallet_save(a: number): number;
|
|
@@ -75,27 +64,22 @@ export function wasmwalletslip_set_lc(a: number, b: number): void;
|
|
|
75
64
|
export function wasmwalletslip_get_slip_type(a: number): number;
|
|
76
65
|
export function wasmwalletslip_set_slip_type(a: number, b: number): void;
|
|
77
66
|
export function wasmwalletslip_new_(): number;
|
|
78
|
-
export function
|
|
79
|
-
export function
|
|
80
|
-
export function
|
|
81
|
-
export function
|
|
82
|
-
export function
|
|
83
|
-
export function
|
|
84
|
-
export function
|
|
85
|
-
export function
|
|
86
|
-
export function
|
|
87
|
-
export function
|
|
88
|
-
export function
|
|
89
|
-
export function
|
|
90
|
-
export function
|
|
91
|
-
export function
|
|
92
|
-
export function
|
|
93
|
-
export function
|
|
94
|
-
export function wasmpeerservice_get_name(a: number): number;
|
|
95
|
-
export function wasmpeerservice_set_domain(a: number, b: number): void;
|
|
96
|
-
export function wasmpeerservice_get_domain(a: number): number;
|
|
97
|
-
export function wasmpeerservicelist_push(a: number, b: number): void;
|
|
98
|
-
export function wasmpeerservicelist_new(): number;
|
|
67
|
+
export function __wbg_wasmconsensusvalues_free(a: number): void;
|
|
68
|
+
export function wasmconsensusvalues_it_num(a: number): number;
|
|
69
|
+
export function wasmconsensusvalues_fee_transaction(a: number): number;
|
|
70
|
+
export function wasmconsensusvalues_it_index(a: number): number;
|
|
71
|
+
export function wasmconsensusvalues_ft_num(a: number): number;
|
|
72
|
+
export function wasmconsensusvalues_ft_index(a: number): number;
|
|
73
|
+
export function wasmconsensusvalues_gt_index(a: number): number;
|
|
74
|
+
export function wasmconsensusvalues_total_fees(a: number): number;
|
|
75
|
+
export function wasmconsensusvalues_expected_difficulty(a: number): number;
|
|
76
|
+
export function wasmconsensusvalues_total_rebroadcast_slips(a: number): number;
|
|
77
|
+
export function wasmconsensusvalues_total_rebroadcast_nolan(a: number): number;
|
|
78
|
+
export function wasmconsensusvalues_total_rebroadcast_fees_nolan(a: number): number;
|
|
79
|
+
export function wasmconsensusvalues_total_rebroadcast_staking_payouts_nolan(a: number): number;
|
|
80
|
+
export function wasmconsensusvalues_rebroadcast_hash(a: number): number;
|
|
81
|
+
export function wasmconsensusvalues_avg_income(a: number): number;
|
|
82
|
+
export function wasmconsensusvalues_avg_total_fees(a: number): number;
|
|
99
83
|
export function __wbg_saitowasm_free(a: number): void;
|
|
100
84
|
export function initialize(a: number, b: number, c: number, d: number, e: number): number;
|
|
101
85
|
export function create_transaction(a: number, b: number, c: number, d: number): number;
|
|
@@ -139,23 +123,11 @@ export function disable_producing_blocks_by_timer(): number;
|
|
|
139
123
|
export function produce_block_with_gt(): number;
|
|
140
124
|
export function produce_block_without_gt(): number;
|
|
141
125
|
export function get_stats(): number;
|
|
142
|
-
export function
|
|
143
|
-
export function
|
|
144
|
-
export function
|
|
145
|
-
export function
|
|
146
|
-
export function
|
|
147
|
-
export function wasmconsensusvalues_ft_num(a: number): number;
|
|
148
|
-
export function wasmconsensusvalues_ft_index(a: number): number;
|
|
149
|
-
export function wasmconsensusvalues_gt_index(a: number): number;
|
|
150
|
-
export function wasmconsensusvalues_total_fees(a: number): number;
|
|
151
|
-
export function wasmconsensusvalues_expected_difficulty(a: number): number;
|
|
152
|
-
export function wasmconsensusvalues_total_rebroadcast_slips(a: number): number;
|
|
153
|
-
export function wasmconsensusvalues_total_rebroadcast_nolan(a: number): number;
|
|
154
|
-
export function wasmconsensusvalues_total_rebroadcast_fees_nolan(a: number): number;
|
|
155
|
-
export function wasmconsensusvalues_total_rebroadcast_staking_payouts_nolan(a: number): number;
|
|
156
|
-
export function wasmconsensusvalues_rebroadcast_hash(a: number): number;
|
|
157
|
-
export function wasmconsensusvalues_avg_income(a: number): number;
|
|
158
|
-
export function wasmconsensusvalues_avg_total_fees(a: number): number;
|
|
126
|
+
export function get_peer_stats(): number;
|
|
127
|
+
export function __wbg_wasmhop_free(a: number): void;
|
|
128
|
+
export function wasmhop_from(a: number, b: number): void;
|
|
129
|
+
export function wasmhop_sig(a: number, b: number): void;
|
|
130
|
+
export function wasmhop_to(a: number, b: number): void;
|
|
159
131
|
export function __wbg_wasmblock_free(a: number): void;
|
|
160
132
|
export function wasmblock_new(): number;
|
|
161
133
|
export function wasmblock_get_transactions(a: number): number;
|
|
@@ -213,6 +185,16 @@ export function wasmblock_golden_ticket_index(a: number): number;
|
|
|
213
185
|
export function wasmblock_fee_transaction_index(a: number): number;
|
|
214
186
|
export function wasmblock_total_payout_atr(a: number): number;
|
|
215
187
|
export function wasmblock_avg_payout_mining(a: number): number;
|
|
188
|
+
export function __wbg_wasmpeer_free(a: number): void;
|
|
189
|
+
export function wasmpeer_get_public_key(a: number): number;
|
|
190
|
+
export function wasmpeer_get_key_list(a: number): number;
|
|
191
|
+
export function wasmpeer_get_peer_index(a: number): number;
|
|
192
|
+
export function wasmpeer_new(a: number): number;
|
|
193
|
+
export function wasmpeer_get_sync_type(a: number): number;
|
|
194
|
+
export function wasmpeer_get_services(a: number): number;
|
|
195
|
+
export function wasmpeer_set_services(a: number, b: number): void;
|
|
196
|
+
export function wasmpeer_has_service(a: number, b: number): number;
|
|
197
|
+
export function wasmpeer_get_status(a: number): number;
|
|
216
198
|
export function __wbg_wasmslip_free(a: number): void;
|
|
217
199
|
export function wasmslip_amount(a: number): number;
|
|
218
200
|
export function wasmslip_set_amount(a: number, b: number): void;
|
|
@@ -229,6 +211,7 @@ export function wasmslip_set_tx_ordinal(a: number, b: number): void;
|
|
|
229
211
|
export function wasmslip_set_utxo_key(a: number, b: number): void;
|
|
230
212
|
export function wasmslip_utxo_key(a: number): number;
|
|
231
213
|
export function wasmslip_new(): number;
|
|
214
|
+
export function __wbg_wasmstats_free(a: number): void;
|
|
232
215
|
export function __wbg_wasmtransaction_free(a: number): void;
|
|
233
216
|
export function wasmtransaction_new(): number;
|
|
234
217
|
export function wasmtransaction_signature(a: number): number;
|
|
@@ -253,6 +236,24 @@ export function wasmtransaction_total_fees(a: number): number;
|
|
|
253
236
|
export function wasmtransaction_serialize(a: number): number;
|
|
254
237
|
export function wasmtransaction_deserialize(a: number, b: number): void;
|
|
255
238
|
export function wasmblock_avg_total_fees(a: number): number;
|
|
239
|
+
export function __wbg_wasmblockchain_free(a: number): void;
|
|
240
|
+
export function wasmblockchain_reset(a: number): number;
|
|
241
|
+
export function wasmblockchain_get_last_block_id(a: number): number;
|
|
242
|
+
export function wasmblockchain_get_last_timestamp(a: number): number;
|
|
243
|
+
export function wasmblockchain_get_longest_chain_hash_at(a: number, b: number): number;
|
|
244
|
+
export function wasmblockchain_get_last_block_hash(a: number): number;
|
|
245
|
+
export function wasmblockchain_get_last_burnfee(a: number): number;
|
|
246
|
+
export function wasmblockchain_get_genesis_block_id(a: number): number;
|
|
247
|
+
export function wasmblockchain_get_genesis_timestamp(a: number): number;
|
|
248
|
+
export function wasmblockchain_get_lowest_acceptable_timestamp(a: number): number;
|
|
249
|
+
export function wasmblockchain_get_lowest_acceptable_block_hash(a: number): number;
|
|
250
|
+
export function wasmblockchain_get_lowest_acceptable_block_id(a: number): number;
|
|
251
|
+
export function wasmblockchain_get_latest_block_id(a: number): number;
|
|
252
|
+
export function wasmblockchain_get_fork_id(a: number): number;
|
|
253
|
+
export function wasmblockchain_set_fork_id(a: number, b: number): number;
|
|
254
|
+
export function wasmblockchain_get_longest_chain_hash_at_id(a: number, b: number): number;
|
|
255
|
+
export function wasmblockchain_get_hashes_at_id(a: number, b: number): number;
|
|
256
|
+
export function wasmblockchain_set_safe_to_prune_transaction(a: number, b: number): number;
|
|
256
257
|
export function rustsecp256k1_v0_10_0_context_create(a: number): number;
|
|
257
258
|
export function rustsecp256k1_v0_10_0_context_destroy(a: number): void;
|
|
258
259
|
export function rustsecp256k1_v0_10_0_default_illegal_callback_fn(a: number, b: number): void;
|
package/pkg/node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saito-wasm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.96",
|
|
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
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"cross-env": "^7.0.3",
|
|
13
|
+
"node-fetch": "^3.3.0"
|
|
14
14
|
}
|
|
15
15
|
}
|