saito-wasm 0.2.99 → 0.2.101
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 +7 -4
- package/pkg/node/index.d.ts +25 -7
- package/pkg/node/index.js +150 -109
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/index_bg.wasm.d.ts +132 -129
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +157 -136
- package/pkg/web/index.js +146 -105
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/index_bg.wasm.d.ts +132 -129
- package/pkg/web/package.json +3 -3
- /package/pkg/node/snippets/{saito-wasm-4375448d2b4dc1d8 → saito-wasm-958bee07b1c04fca}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-4375448d2b4dc1d8 → saito-wasm-958bee07b1c04fca}/js/msg_handler.js +0 -0
package/Cargo.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saito-wasm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.101",
|
|
4
4
|
"description": "js wrappings around saito-core using wasm",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "./node_modules/.bin/jest",
|
|
7
7
|
"start": "ts-node-dev index.ts",
|
|
8
8
|
"build-prod": "cross-env WASM_BINDGEN_WEAKREF=1 npm run build-web-prod && npm run build-nodejs-prod",
|
|
9
|
+
"build-profile": "cross-env WASM_BINDGEN_WEAKREF=1 npm run build-web-profile && npm run build-nodejs-profile",
|
|
9
10
|
"build": "cross-env WASM_BINDGEN_WEAKREF=1 npm run build-web && npm run build-nodejs",
|
|
10
11
|
"serve": "webpack-dev-server",
|
|
11
|
-
"build-web": "wasm-pack build --target web --out-dir ./pkg/web --out-name index",
|
|
12
|
-
"build-nodejs": "wasm-pack build --target nodejs --out-dir ./pkg/node --out-name index",
|
|
12
|
+
"build-web": "wasm-pack build --target web --out-dir ./pkg/web --out-name index --dev",
|
|
13
|
+
"build-nodejs": "wasm-pack build --target nodejs --out-dir ./pkg/node --out-name index --dev",
|
|
13
14
|
"build-web-prod": "wasm-pack build --target web --out-dir ./pkg/web --out-name index --release",
|
|
14
|
-
"build-nodejs-prod": "wasm-pack build --target nodejs --out-dir ./pkg/node --out-name index --release"
|
|
15
|
+
"build-nodejs-prod": "wasm-pack build --target nodejs --out-dir ./pkg/node --out-name index --release",
|
|
16
|
+
"build-web-profile": "wasm-pack build --target web --out-dir ./pkg/web --out-name index --profiling",
|
|
17
|
+
"build-nodejs-profile": "wasm-pack build --target nodejs --out-dir ./pkg/node --out-name index --profiling"
|
|
15
18
|
},
|
|
16
19
|
"author": "",
|
|
17
20
|
"license": "ISC",
|
package/pkg/node/index.d.ts
CHANGED
|
@@ -26,20 +26,15 @@ export function create_transaction(public_key: string, amount: bigint, fee: bigi
|
|
|
26
26
|
*/
|
|
27
27
|
export function create_transaction_with_multiple_payments(public_keys: Array<any>, amounts: BigUint64Array, fee: bigint, _force_merge: boolean): Promise<WasmTransaction>;
|
|
28
28
|
/**
|
|
29
|
-
* @param {bigint}
|
|
30
|
-
* @param {bigint} bid
|
|
31
|
-
* @param {bigint} tid
|
|
32
|
-
* @param {bigint} sid
|
|
33
|
-
* @param {number} num
|
|
29
|
+
* @param {bigint} num
|
|
34
30
|
* @param {bigint} deposit
|
|
35
|
-
* @param {bigint} change
|
|
36
31
|
* @param {string} data
|
|
37
32
|
* @param {bigint} fee
|
|
38
33
|
* @param {string} recipient_public_key
|
|
39
34
|
* @param {string} nft_type
|
|
40
35
|
* @returns {Promise<WasmTransaction>}
|
|
41
36
|
*/
|
|
42
|
-
export function create_bound_transaction(
|
|
37
|
+
export function create_bound_transaction(num: bigint, deposit: bigint, data: string, fee: bigint, recipient_public_key: string, nft_type: string): Promise<WasmTransaction>;
|
|
43
38
|
/**
|
|
44
39
|
* @param {bigint} amt
|
|
45
40
|
* @param {string} slip1_utxo_key
|
|
@@ -51,6 +46,20 @@ export function create_bound_transaction(amt: bigint, bid: bigint, tid: bigint,
|
|
|
51
46
|
*/
|
|
52
47
|
export function create_send_bound_transaction(amt: bigint, slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, data: string, recipient_public_key: string): Promise<WasmTransaction>;
|
|
53
48
|
/**
|
|
49
|
+
* @param {string} slip1_utxo_key
|
|
50
|
+
* @param {string} slip2_utxo_key
|
|
51
|
+
* @param {string} slip3_utxo_key
|
|
52
|
+
* @param {number} left_count
|
|
53
|
+
* @param {number} right_count
|
|
54
|
+
* @returns {Promise<WasmTransaction>}
|
|
55
|
+
*/
|
|
56
|
+
export function create_split_bound_transaction(slip1_utxo_key: string, slip2_utxo_key: string, slip3_utxo_key: string, left_count: number, right_count: number): Promise<WasmTransaction>;
|
|
57
|
+
/**
|
|
58
|
+
* @param {string} nft_id_hex
|
|
59
|
+
* @returns {Promise<WasmTransaction>}
|
|
60
|
+
*/
|
|
61
|
+
export function create_merge_bound_transaction(nft_id_hex: string): Promise<WasmTransaction>;
|
|
62
|
+
/**
|
|
54
63
|
* @returns {Promise<Array<any>>}
|
|
55
64
|
*/
|
|
56
65
|
export function get_nft_list(): Promise<Array<any>>;
|
|
@@ -846,6 +855,15 @@ export class WasmWallet {
|
|
|
846
855
|
* @returns {Promise<void>}
|
|
847
856
|
*/
|
|
848
857
|
set_key_list(key_list: Array<any>): Promise<void>;
|
|
858
|
+
/**
|
|
859
|
+
* @param {string} slip1_hex
|
|
860
|
+
* @param {string} slip2_hex
|
|
861
|
+
* @param {string} slip3_hex
|
|
862
|
+
* @param {string} id_hex
|
|
863
|
+
* @param {string} sig_hex
|
|
864
|
+
* @returns {Promise<void>}
|
|
865
|
+
*/
|
|
866
|
+
add_nft(slip1_hex: string, slip2_hex: string, slip3_hex: string, id_hex: string, sig_hex: string): Promise<void>;
|
|
849
867
|
}
|
|
850
868
|
/**
|
|
851
869
|
*/
|
package/pkg/node/index.js
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
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-958bee07b1c04fca/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);
|
|
10
|
-
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
12
|
-
|
|
13
|
-
let heap_next = heap.length;
|
|
14
|
-
|
|
15
|
-
function dropObject(idx) {
|
|
16
|
-
if (idx < 132) return;
|
|
17
|
-
heap[idx] = heap_next;
|
|
18
|
-
heap_next = idx;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function takeObject(idx) {
|
|
22
|
-
const ret = getObject(idx);
|
|
23
|
-
dropObject(idx);
|
|
24
|
-
return ret;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
7
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
28
8
|
|
|
29
9
|
cachedTextDecoder.decode();
|
|
@@ -42,6 +22,12 @@ function getStringFromWasm0(ptr, len) {
|
|
|
42
22
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
43
23
|
}
|
|
44
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
|
+
|
|
45
31
|
function addHeapObject(obj) {
|
|
46
32
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
33
|
const idx = heap_next;
|
|
@@ -51,6 +37,20 @@ function addHeapObject(obj) {
|
|
|
51
37
|
return idx;
|
|
52
38
|
}
|
|
53
39
|
|
|
40
|
+
function getObject(idx) { return heap[idx]; }
|
|
41
|
+
|
|
42
|
+
function dropObject(idx) {
|
|
43
|
+
if (idx < 132) return;
|
|
44
|
+
heap[idx] = heap_next;
|
|
45
|
+
heap_next = idx;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function takeObject(idx) {
|
|
49
|
+
const ret = getObject(idx);
|
|
50
|
+
dropObject(idx);
|
|
51
|
+
return ret;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
55
55
|
|
|
56
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -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
|
+
function handleError(f, args) {
|
|
232
|
+
try {
|
|
233
|
+
return f.apply(this, args);
|
|
234
|
+
} catch (e) {
|
|
235
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
231
239
|
function _assertClass(instance, klass) {
|
|
232
240
|
if (!(instance instanceof klass)) {
|
|
233
241
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -272,23 +280,18 @@ module.exports.create_transaction_with_multiple_payments = function(public_keys,
|
|
|
272
280
|
};
|
|
273
281
|
|
|
274
282
|
/**
|
|
275
|
-
* @param {bigint}
|
|
276
|
-
* @param {bigint} bid
|
|
277
|
-
* @param {bigint} tid
|
|
278
|
-
* @param {bigint} sid
|
|
279
|
-
* @param {number} num
|
|
283
|
+
* @param {bigint} num
|
|
280
284
|
* @param {bigint} deposit
|
|
281
|
-
* @param {bigint} change
|
|
282
285
|
* @param {string} data
|
|
283
286
|
* @param {bigint} fee
|
|
284
287
|
* @param {string} recipient_public_key
|
|
285
288
|
* @param {string} nft_type
|
|
286
289
|
* @returns {Promise<WasmTransaction>}
|
|
287
290
|
*/
|
|
288
|
-
module.exports.create_bound_transaction = function(
|
|
291
|
+
module.exports.create_bound_transaction = function(num, deposit, data, fee, recipient_public_key, nft_type) {
|
|
289
292
|
const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
290
293
|
const len0 = WASM_VECTOR_LEN;
|
|
291
|
-
const ret = wasm.create_bound_transaction(
|
|
294
|
+
const ret = wasm.create_bound_transaction(num, deposit, ptr0, len0, fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
292
295
|
return takeObject(ret);
|
|
293
296
|
};
|
|
294
297
|
|
|
@@ -308,6 +311,30 @@ module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, sli
|
|
|
308
311
|
return takeObject(ret);
|
|
309
312
|
};
|
|
310
313
|
|
|
314
|
+
/**
|
|
315
|
+
* @param {string} slip1_utxo_key
|
|
316
|
+
* @param {string} slip2_utxo_key
|
|
317
|
+
* @param {string} slip3_utxo_key
|
|
318
|
+
* @param {number} left_count
|
|
319
|
+
* @param {number} right_count
|
|
320
|
+
* @returns {Promise<WasmTransaction>}
|
|
321
|
+
*/
|
|
322
|
+
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count) {
|
|
323
|
+
const ret = wasm.create_split_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), left_count, right_count);
|
|
324
|
+
return takeObject(ret);
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @param {string} nft_id_hex
|
|
329
|
+
* @returns {Promise<WasmTransaction>}
|
|
330
|
+
*/
|
|
331
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex) {
|
|
332
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
333
|
+
const len0 = WASM_VECTOR_LEN;
|
|
334
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0);
|
|
335
|
+
return takeObject(ret);
|
|
336
|
+
};
|
|
337
|
+
|
|
311
338
|
/**
|
|
312
339
|
* @returns {Promise<Array<any>>}
|
|
313
340
|
*/
|
|
@@ -696,15 +723,7 @@ function addBorrowedObject(obj) {
|
|
|
696
723
|
heap[--stack_pointer] = obj;
|
|
697
724
|
return stack_pointer;
|
|
698
725
|
}
|
|
699
|
-
|
|
700
|
-
function handleError(f, args) {
|
|
701
|
-
try {
|
|
702
|
-
return f.apply(this, args);
|
|
703
|
-
} catch (e) {
|
|
704
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
function __wbg_adapter_421(arg0, arg1, arg2, arg3) {
|
|
726
|
+
function __wbg_adapter_424(arg0, arg1, arg2, arg3) {
|
|
708
727
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h1d2fe914d97897fe(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
709
728
|
}
|
|
710
729
|
|
|
@@ -2419,6 +2438,28 @@ class WasmWallet {
|
|
|
2419
2438
|
const ret = wasm.wasmwallet_set_key_list(this.__wbg_ptr, addHeapObject(key_list));
|
|
2420
2439
|
return takeObject(ret);
|
|
2421
2440
|
}
|
|
2441
|
+
/**
|
|
2442
|
+
* @param {string} slip1_hex
|
|
2443
|
+
* @param {string} slip2_hex
|
|
2444
|
+
* @param {string} slip3_hex
|
|
2445
|
+
* @param {string} id_hex
|
|
2446
|
+
* @param {string} sig_hex
|
|
2447
|
+
* @returns {Promise<void>}
|
|
2448
|
+
*/
|
|
2449
|
+
add_nft(slip1_hex, slip2_hex, slip3_hex, id_hex, sig_hex) {
|
|
2450
|
+
const ptr0 = passStringToWasm0(slip1_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2451
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2452
|
+
const ptr1 = passStringToWasm0(slip2_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2453
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2454
|
+
const ptr2 = passStringToWasm0(slip3_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2455
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2456
|
+
const ptr3 = passStringToWasm0(id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2457
|
+
const len3 = WASM_VECTOR_LEN;
|
|
2458
|
+
const ptr4 = passStringToWasm0(sig_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2459
|
+
const len4 = WASM_VECTOR_LEN;
|
|
2460
|
+
const ret = wasm.wasmwallet_add_nft(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
2461
|
+
return takeObject(ret);
|
|
2462
|
+
}
|
|
2422
2463
|
}
|
|
2423
2464
|
module.exports.WasmWallet = WasmWallet;
|
|
2424
2465
|
|
|
@@ -2465,40 +2506,40 @@ class WasmWalletSlip {
|
|
|
2465
2506
|
* @returns {bigint}
|
|
2466
2507
|
*/
|
|
2467
2508
|
get_amount() {
|
|
2468
|
-
const ret = wasm.
|
|
2509
|
+
const ret = wasm.wasmslip_amount(this.__wbg_ptr);
|
|
2469
2510
|
return BigInt.asUintN(64, ret);
|
|
2470
2511
|
}
|
|
2471
2512
|
/**
|
|
2472
2513
|
* @param {bigint} amount
|
|
2473
2514
|
*/
|
|
2474
2515
|
set_amount(amount) {
|
|
2475
|
-
wasm.
|
|
2516
|
+
wasm.wasmslip_set_amount(this.__wbg_ptr, amount);
|
|
2476
2517
|
}
|
|
2477
2518
|
/**
|
|
2478
2519
|
* @returns {bigint}
|
|
2479
2520
|
*/
|
|
2480
2521
|
get_block_id() {
|
|
2481
|
-
const ret = wasm.
|
|
2522
|
+
const ret = wasm.wasmslip_block_id(this.__wbg_ptr);
|
|
2482
2523
|
return BigInt.asUintN(64, ret);
|
|
2483
2524
|
}
|
|
2484
2525
|
/**
|
|
2485
2526
|
* @param {bigint} block_id
|
|
2486
2527
|
*/
|
|
2487
2528
|
set_block_id(block_id) {
|
|
2488
|
-
wasm.
|
|
2529
|
+
wasm.wasmslip_set_block_id(this.__wbg_ptr, block_id);
|
|
2489
2530
|
}
|
|
2490
2531
|
/**
|
|
2491
2532
|
* @returns {bigint}
|
|
2492
2533
|
*/
|
|
2493
2534
|
get_tx_ordinal() {
|
|
2494
|
-
const ret = wasm.
|
|
2535
|
+
const ret = wasm.wasmslip_tx_ordinal(this.__wbg_ptr);
|
|
2495
2536
|
return BigInt.asUintN(64, ret);
|
|
2496
2537
|
}
|
|
2497
2538
|
/**
|
|
2498
2539
|
* @param {bigint} ordinal
|
|
2499
2540
|
*/
|
|
2500
2541
|
set_tx_ordinal(ordinal) {
|
|
2501
|
-
wasm.
|
|
2542
|
+
wasm.wasmslip_set_tx_ordinal(this.__wbg_ptr, ordinal);
|
|
2502
2543
|
}
|
|
2503
2544
|
/**
|
|
2504
2545
|
* @returns {number}
|
|
@@ -2562,23 +2603,13 @@ class WasmWalletSlip {
|
|
|
2562
2603
|
}
|
|
2563
2604
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2564
2605
|
|
|
2565
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2566
|
-
takeObject(arg0);
|
|
2567
|
-
};
|
|
2568
|
-
|
|
2569
2606
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2570
2607
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
2571
2608
|
return addHeapObject(ret);
|
|
2572
2609
|
};
|
|
2573
2610
|
|
|
2574
|
-
module.exports.
|
|
2575
|
-
|
|
2576
|
-
return addHeapObject(ret);
|
|
2577
|
-
};
|
|
2578
|
-
|
|
2579
|
-
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2580
|
-
const ret = WasmSlip.__wrap(arg0);
|
|
2581
|
-
return addHeapObject(ret);
|
|
2611
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2612
|
+
takeObject(arg0);
|
|
2582
2613
|
};
|
|
2583
2614
|
|
|
2584
2615
|
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
@@ -2586,13 +2617,9 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
|
2586
2617
|
return addHeapObject(ret);
|
|
2587
2618
|
};
|
|
2588
2619
|
|
|
2589
|
-
module.exports.
|
|
2590
|
-
const
|
|
2591
|
-
|
|
2592
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2593
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2594
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2595
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2620
|
+
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2621
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2622
|
+
return addHeapObject(ret);
|
|
2596
2623
|
};
|
|
2597
2624
|
|
|
2598
2625
|
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
@@ -2600,16 +2627,6 @@ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
|
2600
2627
|
return addHeapObject(ret);
|
|
2601
2628
|
};
|
|
2602
2629
|
|
|
2603
|
-
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2604
|
-
const ret = WasmPeer.__wrap(arg0);
|
|
2605
|
-
return addHeapObject(ret);
|
|
2606
|
-
};
|
|
2607
|
-
|
|
2608
|
-
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2609
|
-
const ret = WasmNFT.__wrap(arg0);
|
|
2610
|
-
return addHeapObject(ret);
|
|
2611
|
-
};
|
|
2612
|
-
|
|
2613
2630
|
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2614
2631
|
const ret = WasmBlock.__wrap(arg0);
|
|
2615
2632
|
return addHeapObject(ret);
|
|
@@ -2620,9 +2637,13 @@ module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
|
2620
2637
|
return addHeapObject(ret);
|
|
2621
2638
|
};
|
|
2622
2639
|
|
|
2623
|
-
module.exports.
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2640
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2641
|
+
const obj = getObject(arg1);
|
|
2642
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2643
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2644
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2645
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2646
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2626
2647
|
};
|
|
2627
2648
|
|
|
2628
2649
|
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
@@ -2630,18 +2651,23 @@ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
|
2630
2651
|
return addHeapObject(ret);
|
|
2631
2652
|
};
|
|
2632
2653
|
|
|
2633
|
-
module.exports.
|
|
2634
|
-
const ret =
|
|
2654
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2655
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2635
2656
|
return addHeapObject(ret);
|
|
2636
2657
|
};
|
|
2637
2658
|
|
|
2638
|
-
module.exports.
|
|
2639
|
-
const ret =
|
|
2659
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2660
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2640
2661
|
return addHeapObject(ret);
|
|
2641
2662
|
};
|
|
2642
2663
|
|
|
2643
|
-
module.exports.
|
|
2644
|
-
const ret =
|
|
2664
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2665
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2666
|
+
return addHeapObject(ret);
|
|
2667
|
+
};
|
|
2668
|
+
|
|
2669
|
+
module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
2670
|
+
const ret = WasmSlip.__wrap(arg0);
|
|
2645
2671
|
return addHeapObject(ret);
|
|
2646
2672
|
};
|
|
2647
2673
|
|
|
@@ -2661,15 +2687,15 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
|
2661
2687
|
return ret;
|
|
2662
2688
|
};
|
|
2663
2689
|
|
|
2664
|
-
module.exports.
|
|
2690
|
+
module.exports.__wbg_sendmessage_d0e06410fff34f9f = function(arg0, arg1) {
|
|
2665
2691
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2666
2692
|
};
|
|
2667
2693
|
|
|
2668
|
-
module.exports.
|
|
2694
|
+
module.exports.__wbg_sendmessagetoall_b2330294b57f683e = function(arg0, arg1) {
|
|
2669
2695
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2670
2696
|
};
|
|
2671
2697
|
|
|
2672
|
-
module.exports.
|
|
2698
|
+
module.exports.__wbg_connecttopeer_4a7e032cdcc7ece3 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2673
2699
|
let deferred0_0;
|
|
2674
2700
|
let deferred0_1;
|
|
2675
2701
|
try {
|
|
@@ -2682,12 +2708,12 @@ module.exports.__wbg_connecttopeer_2ab190f6ca71f5f7 = function() { return handle
|
|
|
2682
2708
|
}
|
|
2683
2709
|
}, arguments) };
|
|
2684
2710
|
|
|
2685
|
-
module.exports.
|
|
2711
|
+
module.exports.__wbg_disconnectfrompeer_4c1ff4e46907a233 = function() { return handleError(function (arg0) {
|
|
2686
2712
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2687
2713
|
return addHeapObject(ret);
|
|
2688
2714
|
}, arguments) };
|
|
2689
2715
|
|
|
2690
|
-
module.exports.
|
|
2716
|
+
module.exports.__wbg_fetchblockfrompeer_34b697fd2793f1b6 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2691
2717
|
let deferred0_0;
|
|
2692
2718
|
let deferred0_1;
|
|
2693
2719
|
try {
|
|
@@ -2700,7 +2726,7 @@ module.exports.__wbg_fetchblockfrompeer_ebaf495142809113 = function() { return h
|
|
|
2700
2726
|
}
|
|
2701
2727
|
}, arguments) };
|
|
2702
2728
|
|
|
2703
|
-
module.exports.
|
|
2729
|
+
module.exports.__wbg_writevalue_d2581b549eeb5c4a = function(arg0, arg1, arg2) {
|
|
2704
2730
|
let deferred0_0;
|
|
2705
2731
|
let deferred0_1;
|
|
2706
2732
|
try {
|
|
@@ -2712,7 +2738,7 @@ module.exports.__wbg_writevalue_db033c89e3cc6ce1 = function(arg0, arg1, arg2) {
|
|
|
2712
2738
|
}
|
|
2713
2739
|
};
|
|
2714
2740
|
|
|
2715
|
-
module.exports.
|
|
2741
|
+
module.exports.__wbg_appendvalue_2f0317c234604430 = function(arg0, arg1, arg2) {
|
|
2716
2742
|
let deferred0_0;
|
|
2717
2743
|
let deferred0_1;
|
|
2718
2744
|
try {
|
|
@@ -2724,7 +2750,7 @@ module.exports.__wbg_appendvalue_b71488e99c0b2acc = function(arg0, arg1, arg2) {
|
|
|
2724
2750
|
}
|
|
2725
2751
|
};
|
|
2726
2752
|
|
|
2727
|
-
module.exports.
|
|
2753
|
+
module.exports.__wbg_flushdata_ecad627b19d54427 = function(arg0, arg1) {
|
|
2728
2754
|
let deferred0_0;
|
|
2729
2755
|
let deferred0_1;
|
|
2730
2756
|
try {
|
|
@@ -2736,7 +2762,7 @@ module.exports.__wbg_flushdata_9472c01596035377 = function(arg0, arg1) {
|
|
|
2736
2762
|
}
|
|
2737
2763
|
};
|
|
2738
2764
|
|
|
2739
|
-
module.exports.
|
|
2765
|
+
module.exports.__wbg_readvalue_2cf01bced3e50050 = function() { return handleError(function (arg0, arg1) {
|
|
2740
2766
|
let deferred0_0;
|
|
2741
2767
|
let deferred0_1;
|
|
2742
2768
|
try {
|
|
@@ -2749,12 +2775,12 @@ module.exports.__wbg_readvalue_52aaffc6b45c3221 = function() { return handleErro
|
|
|
2749
2775
|
}
|
|
2750
2776
|
}, arguments) };
|
|
2751
2777
|
|
|
2752
|
-
module.exports.
|
|
2778
|
+
module.exports.__wbg_loadblockfilelist_eb7c9d3d4df62209 = function() { return handleError(function () {
|
|
2753
2779
|
const ret = MsgHandler.load_block_file_list();
|
|
2754
2780
|
return addHeapObject(ret);
|
|
2755
2781
|
}, arguments) };
|
|
2756
2782
|
|
|
2757
|
-
module.exports.
|
|
2783
|
+
module.exports.__wbg_isexistingfile_4485ea39c2201d92 = function() { return handleError(function (arg0, arg1) {
|
|
2758
2784
|
let deferred0_0;
|
|
2759
2785
|
let deferred0_1;
|
|
2760
2786
|
try {
|
|
@@ -2767,7 +2793,7 @@ module.exports.__wbg_isexistingfile_961bc3427edd9588 = function() { return handl
|
|
|
2767
2793
|
}
|
|
2768
2794
|
}, arguments) };
|
|
2769
2795
|
|
|
2770
|
-
module.exports.
|
|
2796
|
+
module.exports.__wbg_removevalue_cc37642e2a0f3f93 = function() { return handleError(function (arg0, arg1) {
|
|
2771
2797
|
let deferred0_0;
|
|
2772
2798
|
let deferred0_1;
|
|
2773
2799
|
try {
|
|
@@ -2780,7 +2806,7 @@ module.exports.__wbg_removevalue_04f5e8da4126f5ff = function() { return handleEr
|
|
|
2780
2806
|
}
|
|
2781
2807
|
}, arguments) };
|
|
2782
2808
|
|
|
2783
|
-
module.exports.
|
|
2809
|
+
module.exports.__wbg_ensureblockdirectoryexists_7a89c316da8abeb7 = function() { return handleError(function (arg0, arg1) {
|
|
2784
2810
|
let deferred0_0;
|
|
2785
2811
|
let deferred0_1;
|
|
2786
2812
|
try {
|
|
@@ -2792,19 +2818,19 @@ module.exports.__wbg_ensureblockdirectoryexists_a66636c752771723 = function() {
|
|
|
2792
2818
|
}
|
|
2793
2819
|
}, arguments) };
|
|
2794
2820
|
|
|
2795
|
-
module.exports.
|
|
2821
|
+
module.exports.__wbg_processapicall_ec41cb6e4e986c5e = function(arg0, arg1, arg2) {
|
|
2796
2822
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2797
2823
|
};
|
|
2798
2824
|
|
|
2799
|
-
module.exports.
|
|
2825
|
+
module.exports.__wbg_processapisuccess_2b75673333585a5d = function(arg0, arg1, arg2) {
|
|
2800
2826
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2801
2827
|
};
|
|
2802
2828
|
|
|
2803
|
-
module.exports.
|
|
2829
|
+
module.exports.__wbg_processapierror_f62de6fe14995b76 = function(arg0, arg1, arg2) {
|
|
2804
2830
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2805
2831
|
};
|
|
2806
2832
|
|
|
2807
|
-
module.exports.
|
|
2833
|
+
module.exports.__wbg_sendinterfaceevent_5b837221da0f48ce = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2808
2834
|
let deferred0_0;
|
|
2809
2835
|
let deferred0_1;
|
|
2810
2836
|
let deferred1_0;
|
|
@@ -2821,7 +2847,7 @@ module.exports.__wbg_sendinterfaceevent_d7add55de27c21bc = function(arg0, arg1,
|
|
|
2821
2847
|
}
|
|
2822
2848
|
};
|
|
2823
2849
|
|
|
2824
|
-
module.exports.
|
|
2850
|
+
module.exports.__wbg_sendblocksuccess_ce5dc56f76095a37 = function(arg0, arg1, arg2) {
|
|
2825
2851
|
let deferred0_0;
|
|
2826
2852
|
let deferred0_1;
|
|
2827
2853
|
try {
|
|
@@ -2833,11 +2859,11 @@ module.exports.__wbg_sendblocksuccess_35d6fef02f71245a = function(arg0, arg1, ar
|
|
|
2833
2859
|
}
|
|
2834
2860
|
};
|
|
2835
2861
|
|
|
2836
|
-
module.exports.
|
|
2862
|
+
module.exports.__wbg_sendwalletupdate_66d217b0538cffb9 = function() {
|
|
2837
2863
|
MsgHandler.send_wallet_update();
|
|
2838
2864
|
};
|
|
2839
2865
|
|
|
2840
|
-
module.exports.
|
|
2866
|
+
module.exports.__wbg_sendnewversionalert_497b5d3cb9566dc8 = function(arg0, arg1, arg2) {
|
|
2841
2867
|
let deferred0_0;
|
|
2842
2868
|
let deferred0_1;
|
|
2843
2869
|
try {
|
|
@@ -2849,25 +2875,40 @@ module.exports.__wbg_sendnewversionalert_7edac17a51748e05 = function(arg0, arg1,
|
|
|
2849
2875
|
}
|
|
2850
2876
|
};
|
|
2851
2877
|
|
|
2852
|
-
module.exports.
|
|
2878
|
+
module.exports.__wbg_sendblockfetchstatusevent_213af79ffaab952b = function(arg0) {
|
|
2853
2879
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2854
2880
|
};
|
|
2855
2881
|
|
|
2856
|
-
module.exports.
|
|
2882
|
+
module.exports.__wbg_savewallet_ce62d845625e4c60 = function() {
|
|
2857
2883
|
MsgHandler.save_wallet();
|
|
2858
2884
|
};
|
|
2859
2885
|
|
|
2860
|
-
module.exports.
|
|
2886
|
+
module.exports.__wbg_loadwallet_c7ef93181a027f77 = function() {
|
|
2861
2887
|
MsgHandler.load_wallet();
|
|
2862
2888
|
};
|
|
2863
2889
|
|
|
2864
|
-
module.exports.
|
|
2890
|
+
module.exports.__wbg_getmyservices_5c453dad0c5de4b1 = function() {
|
|
2865
2891
|
const ret = MsgHandler.get_my_services();
|
|
2866
2892
|
_assertClass(ret, WasmPeerServiceList);
|
|
2867
2893
|
var ptr1 = ret.__destroy_into_raw();
|
|
2868
2894
|
return ptr1;
|
|
2869
2895
|
};
|
|
2870
2896
|
|
|
2897
|
+
module.exports.__wbg_wasmpeerservice_new = function(arg0) {
|
|
2898
|
+
const ret = WasmPeerService.__wrap(arg0);
|
|
2899
|
+
return addHeapObject(ret);
|
|
2900
|
+
};
|
|
2901
|
+
|
|
2902
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
2903
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2904
|
+
return addHeapObject(ret);
|
|
2905
|
+
};
|
|
2906
|
+
|
|
2907
|
+
module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
2908
|
+
const ret = WasmHop.__wrap(arg0);
|
|
2909
|
+
return addHeapObject(ret);
|
|
2910
|
+
};
|
|
2911
|
+
|
|
2871
2912
|
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2872
2913
|
const ret = getObject(arg0) == getObject(arg1);
|
|
2873
2914
|
return ret;
|
|
@@ -3136,7 +3177,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
|
|
|
3136
3177
|
const a = state0.a;
|
|
3137
3178
|
state0.a = 0;
|
|
3138
3179
|
try {
|
|
3139
|
-
return
|
|
3180
|
+
return __wbg_adapter_424(a, state0.b, arg0, arg1);
|
|
3140
3181
|
} finally {
|
|
3141
3182
|
state0.a = a;
|
|
3142
3183
|
}
|
|
@@ -3234,8 +3275,8 @@ module.exports.__wbindgen_memory = function() {
|
|
|
3234
3275
|
return addHeapObject(ret);
|
|
3235
3276
|
};
|
|
3236
3277
|
|
|
3237
|
-
module.exports.
|
|
3238
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3278
|
+
module.exports.__wbindgen_closure_wrapper1511 = function(arg0, arg1, arg2) {
|
|
3279
|
+
const ret = makeMutClosure(arg0, arg1, 541, __wbg_adapter_38);
|
|
3239
3280
|
return addHeapObject(ret);
|
|
3240
3281
|
};
|
|
3241
3282
|
|
package/pkg/node/index_bg.wasm
CHANGED
|
Binary file
|