saito-wasm 0.2.172 → 0.2.173
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 +143 -143
- package/pkg/node/index.js +307 -307
- package/pkg/node/index_bg.wasm +0 -0
- package/pkg/node/package.json +3 -3
- package/pkg/web/index.d.ts +143 -143
- package/pkg/web/index.js +305 -305
- package/pkg/web/index_bg.wasm +0 -0
- package/pkg/web/package.json +1 -1
- /package/pkg/node/snippets/{saito-wasm-d2385e3b1368ba5c → saito-wasm-7be8883e9ab9764a}/js/msg_handler.js +0 -0
- /package/pkg/web/snippets/{saito-wasm-d2385e3b1368ba5c → saito-wasm-7be8883e9ab9764a}/js/msg_handler.js +0 -0
package/pkg/node/index.js
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
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-7be8883e9ab9764a/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
|
+
|
|
7
27
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
8
28
|
|
|
9
29
|
cachedTextDecoder.decode();
|
|
@@ -22,12 +42,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
22
42
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
23
43
|
}
|
|
24
44
|
|
|
25
|
-
const heap = new Array(128).fill(undefined);
|
|
26
|
-
|
|
27
|
-
heap.push(undefined, null, true, false);
|
|
28
|
-
|
|
29
|
-
let heap_next = heap.length;
|
|
30
|
-
|
|
31
45
|
function addHeapObject(obj) {
|
|
32
46
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
33
47
|
const idx = heap_next;
|
|
@@ -37,20 +51,6 @@ function addHeapObject(obj) {
|
|
|
37
51
|
return idx;
|
|
38
52
|
}
|
|
39
53
|
|
|
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');
|
|
@@ -243,150 +243,124 @@ function addBorrowedObject(obj) {
|
|
|
243
243
|
return stack_pointer;
|
|
244
244
|
}
|
|
245
245
|
/**
|
|
246
|
-
* @returns {Promise<
|
|
247
|
-
*/
|
|
248
|
-
module.exports.get_mempool_txs = function() {
|
|
249
|
-
const ret = wasm.get_mempool_txs();
|
|
250
|
-
return takeObject(ret);
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* @param {bigint} peer_index
|
|
255
|
-
* @returns {Promise<void>}
|
|
246
|
+
* @returns {Promise<string>}
|
|
256
247
|
*/
|
|
257
|
-
module.exports.
|
|
258
|
-
const ret = wasm.
|
|
248
|
+
module.exports.get_peer_stats = function() {
|
|
249
|
+
const ret = wasm.get_peer_stats();
|
|
259
250
|
return takeObject(ret);
|
|
260
251
|
};
|
|
261
252
|
|
|
262
253
|
/**
|
|
263
|
-
* @param {string}
|
|
264
|
-
* @param {
|
|
265
|
-
* @param {
|
|
266
|
-
* @param {
|
|
254
|
+
* @param {string} slip1_utxo_key
|
|
255
|
+
* @param {string} slip2_utxo_key
|
|
256
|
+
* @param {string} slip3_utxo_key
|
|
257
|
+
* @param {number} left_count
|
|
258
|
+
* @param {number} right_count
|
|
259
|
+
* @param {Uint8Array} tx_msg
|
|
267
260
|
* @returns {Promise<WasmTransaction>}
|
|
268
261
|
*/
|
|
269
|
-
module.exports.
|
|
270
|
-
const ret = wasm.
|
|
271
|
-
return takeObject(ret);
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* @param {Array<any>} keys
|
|
276
|
-
* @returns {Promise<WasmBalanceSnapshot>}
|
|
277
|
-
*/
|
|
278
|
-
module.exports.get_balance_snapshot = function(keys) {
|
|
279
|
-
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
262
|
+
module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
|
|
263
|
+
const ret = wasm.create_split_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), left_count, right_count, addHeapObject(tx_msg));
|
|
280
264
|
return takeObject(ret);
|
|
281
265
|
};
|
|
282
266
|
|
|
283
267
|
/**
|
|
268
|
+
* @param {Uint8Array} buffer
|
|
284
269
|
* @param {bigint} peer_index
|
|
285
|
-
* @returns {Promise<
|
|
270
|
+
* @returns {Promise<void>}
|
|
286
271
|
*/
|
|
287
|
-
module.exports.
|
|
288
|
-
const ret = wasm.
|
|
272
|
+
module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
|
|
273
|
+
const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
|
|
289
274
|
return takeObject(ret);
|
|
290
275
|
};
|
|
291
276
|
|
|
292
277
|
/**
|
|
293
|
-
* @
|
|
278
|
+
* @param {number} major
|
|
279
|
+
* @param {number} minor
|
|
280
|
+
* @param {number} patch
|
|
281
|
+
* @returns {Promise<void>}
|
|
294
282
|
*/
|
|
295
|
-
module.exports.
|
|
296
|
-
const ret = wasm.
|
|
283
|
+
module.exports.set_wallet_version = function(major, minor, patch) {
|
|
284
|
+
const ret = wasm.set_wallet_version(major, minor, patch);
|
|
297
285
|
return takeObject(ret);
|
|
298
286
|
};
|
|
299
287
|
|
|
300
288
|
/**
|
|
301
|
-
* @param {Uint8Array} buffer
|
|
302
289
|
* @returns {string}
|
|
303
290
|
*/
|
|
304
|
-
module.exports.
|
|
305
|
-
const ret = wasm.
|
|
291
|
+
module.exports.generate_private_key = function() {
|
|
292
|
+
const ret = wasm.generate_private_key();
|
|
306
293
|
return takeObject(ret);
|
|
307
294
|
};
|
|
308
295
|
|
|
309
296
|
/**
|
|
310
|
-
* @param {string}
|
|
311
|
-
* @
|
|
297
|
+
* @param {string} nft_id_hex
|
|
298
|
+
* @param {Uint8Array} tx_msg
|
|
299
|
+
* @returns {Promise<WasmTransaction>}
|
|
312
300
|
*/
|
|
313
|
-
module.exports.
|
|
314
|
-
const
|
|
315
|
-
|
|
301
|
+
module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
|
|
302
|
+
const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
303
|
+
const len0 = WASM_VECTOR_LEN;
|
|
304
|
+
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
305
|
+
return takeObject(ret);
|
|
316
306
|
};
|
|
317
307
|
|
|
318
308
|
/**
|
|
319
|
-
* @
|
|
320
|
-
* @param {string} signature
|
|
321
|
-
* @param {string} public_key
|
|
322
|
-
* @returns {boolean}
|
|
309
|
+
* @returns {Promise<boolean>}
|
|
323
310
|
*/
|
|
324
|
-
module.exports.
|
|
325
|
-
const ret = wasm.
|
|
326
|
-
return ret
|
|
311
|
+
module.exports.produce_block_with_gt = function() {
|
|
312
|
+
const ret = wasm.produce_block_with_gt();
|
|
313
|
+
return takeObject(ret);
|
|
327
314
|
};
|
|
328
315
|
|
|
329
316
|
/**
|
|
330
|
-
* @
|
|
331
|
-
* @param {string} ip
|
|
332
|
-
* @returns {Promise<void>}
|
|
317
|
+
* @returns {Promise<Array<any>>}
|
|
333
318
|
*/
|
|
334
|
-
module.exports.
|
|
335
|
-
const ret = wasm.
|
|
319
|
+
module.exports.get_nft_list = function() {
|
|
320
|
+
const ret = wasm.get_nft_list();
|
|
336
321
|
return takeObject(ret);
|
|
337
322
|
};
|
|
338
323
|
|
|
339
324
|
/**
|
|
340
|
-
* @param {
|
|
325
|
+
* @param {Uint8Array} hash
|
|
326
|
+
* @param {bigint} block_id
|
|
327
|
+
* @param {bigint} peer_index
|
|
341
328
|
* @returns {Promise<void>}
|
|
342
329
|
*/
|
|
343
|
-
module.exports.
|
|
344
|
-
const ret = wasm.
|
|
330
|
+
module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
|
|
331
|
+
const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
|
|
345
332
|
return takeObject(ret);
|
|
346
333
|
};
|
|
347
334
|
|
|
348
335
|
/**
|
|
349
|
-
* @returns {
|
|
336
|
+
* @returns {Promise<WasmBlockchain>}
|
|
350
337
|
*/
|
|
351
|
-
module.exports.
|
|
352
|
-
const ret = wasm.
|
|
338
|
+
module.exports.get_blockchain = function() {
|
|
339
|
+
const ret = wasm.get_blockchain();
|
|
353
340
|
return takeObject(ret);
|
|
354
341
|
};
|
|
355
342
|
|
|
356
343
|
/**
|
|
357
|
-
* @param {
|
|
358
|
-
* @param {string}
|
|
359
|
-
* @returns {
|
|
360
|
-
*/
|
|
361
|
-
module.exports.sign_buffer = function(buffer, private_key) {
|
|
362
|
-
try {
|
|
363
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
364
|
-
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
365
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
366
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
367
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
368
|
-
if (r2) {
|
|
369
|
-
throw takeObject(r1);
|
|
370
|
-
}
|
|
371
|
-
return takeObject(r0);
|
|
372
|
-
} finally {
|
|
373
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* @returns {Promise<string>}
|
|
344
|
+
* @param {bigint} peer_index
|
|
345
|
+
* @param {string} public_key
|
|
346
|
+
* @returns {Promise<void>}
|
|
379
347
|
*/
|
|
380
|
-
module.exports.
|
|
381
|
-
const ret = wasm.
|
|
348
|
+
module.exports.process_stun_peer = function(peer_index, public_key) {
|
|
349
|
+
const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
|
|
382
350
|
return takeObject(ret);
|
|
383
351
|
};
|
|
384
352
|
|
|
385
353
|
/**
|
|
386
|
-
* @
|
|
354
|
+
* @param {bigint} num
|
|
355
|
+
* @param {bigint} deposit
|
|
356
|
+
* @param {Uint8Array} tx_msg
|
|
357
|
+
* @param {bigint} fee
|
|
358
|
+
* @param {string} recipient_public_key
|
|
359
|
+
* @param {string} nft_type
|
|
360
|
+
* @returns {Promise<WasmTransaction>}
|
|
387
361
|
*/
|
|
388
|
-
module.exports.
|
|
389
|
-
const ret = wasm.
|
|
362
|
+
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
363
|
+
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
390
364
|
return takeObject(ret);
|
|
391
365
|
};
|
|
392
366
|
|
|
@@ -401,81 +375,57 @@ module.exports.update_from_balance_snapshot = function(snapshot) {
|
|
|
401
375
|
return takeObject(ret);
|
|
402
376
|
};
|
|
403
377
|
|
|
404
|
-
/**
|
|
405
|
-
* @returns {Promise<void>}
|
|
406
|
-
*/
|
|
407
|
-
module.exports.start_from_received_ghost_chain = function() {
|
|
408
|
-
const ret = wasm.start_from_received_ghost_chain();
|
|
409
|
-
return takeObject(ret);
|
|
410
|
-
};
|
|
411
|
-
|
|
412
378
|
/**
|
|
413
379
|
* @returns {Promise<string>}
|
|
414
380
|
*/
|
|
415
|
-
module.exports.
|
|
416
|
-
const ret = wasm.
|
|
381
|
+
module.exports.get_latest_block_hash = function() {
|
|
382
|
+
const ret = wasm.get_latest_block_hash();
|
|
417
383
|
return takeObject(ret);
|
|
418
384
|
};
|
|
419
385
|
|
|
420
386
|
/**
|
|
421
|
-
* @
|
|
387
|
+
* @param {Array<any>} keys
|
|
388
|
+
* @returns {Promise<WasmBalanceSnapshot>}
|
|
422
389
|
*/
|
|
423
|
-
module.exports.
|
|
424
|
-
const ret = wasm.
|
|
390
|
+
module.exports.get_balance_snapshot = function(keys) {
|
|
391
|
+
const ret = wasm.get_balance_snapshot(addHeapObject(keys));
|
|
425
392
|
return takeObject(ret);
|
|
426
393
|
};
|
|
427
394
|
|
|
428
395
|
/**
|
|
429
|
-
* @
|
|
430
|
-
* @param {Uint8Array} hash
|
|
431
|
-
* @param {bigint} block_id
|
|
432
|
-
* @param {bigint} peer_index
|
|
433
|
-
* @returns {Promise<void>}
|
|
396
|
+
* @returns {Promise<string>}
|
|
434
397
|
*/
|
|
435
|
-
module.exports.
|
|
436
|
-
const ret = wasm.
|
|
398
|
+
module.exports.get_stats = function() {
|
|
399
|
+
const ret = wasm.get_stats();
|
|
437
400
|
return takeObject(ret);
|
|
438
401
|
};
|
|
439
402
|
|
|
440
403
|
/**
|
|
441
|
-
* @param {
|
|
442
|
-
* @returns {
|
|
404
|
+
* @param {Uint8Array} buffer
|
|
405
|
+
* @returns {string}
|
|
443
406
|
*/
|
|
444
|
-
module.exports.
|
|
445
|
-
const ret = wasm.
|
|
407
|
+
module.exports.hash = function(buffer) {
|
|
408
|
+
const ret = wasm.hash(addHeapObject(buffer));
|
|
446
409
|
return takeObject(ret);
|
|
447
410
|
};
|
|
448
411
|
|
|
449
412
|
/**
|
|
450
|
-
* @returns {Promise<
|
|
413
|
+
* @returns {Promise<string>}
|
|
451
414
|
*/
|
|
452
|
-
module.exports.
|
|
453
|
-
const ret = wasm.
|
|
415
|
+
module.exports.get_congestion_stats = function() {
|
|
416
|
+
const ret = wasm.get_congestion_stats();
|
|
454
417
|
return takeObject(ret);
|
|
455
418
|
};
|
|
456
419
|
|
|
457
420
|
/**
|
|
421
|
+
* @param {Uint8Array} buffer
|
|
458
422
|
* @param {Uint8Array} hash
|
|
459
423
|
* @param {bigint} block_id
|
|
460
424
|
* @param {bigint} peer_index
|
|
461
425
|
* @returns {Promise<void>}
|
|
462
426
|
*/
|
|
463
|
-
module.exports.
|
|
464
|
-
const ret = wasm.
|
|
465
|
-
return takeObject(ret);
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* @param {bigint} num
|
|
470
|
-
* @param {bigint} deposit
|
|
471
|
-
* @param {Uint8Array} tx_msg
|
|
472
|
-
* @param {bigint} fee
|
|
473
|
-
* @param {string} recipient_public_key
|
|
474
|
-
* @param {string} nft_type
|
|
475
|
-
* @returns {Promise<WasmTransaction>}
|
|
476
|
-
*/
|
|
477
|
-
module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
|
|
478
|
-
const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
|
|
427
|
+
module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
|
|
428
|
+
const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
|
|
479
429
|
return takeObject(ret);
|
|
480
430
|
};
|
|
481
431
|
|
|
@@ -485,29 +435,33 @@ module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, re
|
|
|
485
435
|
* @param {bigint} peer_index
|
|
486
436
|
* @returns {Promise<void>}
|
|
487
437
|
*/
|
|
488
|
-
module.exports.
|
|
489
|
-
const ret = wasm.
|
|
438
|
+
module.exports.send_api_success = function(buffer, msg_index, peer_index) {
|
|
439
|
+
const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
|
|
490
440
|
return takeObject(ret);
|
|
491
441
|
};
|
|
492
442
|
|
|
493
443
|
/**
|
|
494
|
-
* @param {string}
|
|
495
|
-
* @param {string}
|
|
496
|
-
* @param {
|
|
497
|
-
* @
|
|
498
|
-
* @param {boolean} delete_old_blocks
|
|
499
|
-
* @returns {Promise<any>}
|
|
444
|
+
* @param {string} slip1_utxo_key
|
|
445
|
+
* @param {string} slip2_utxo_key
|
|
446
|
+
* @param {string} slip3_utxo_key
|
|
447
|
+
* @returns {Promise<WasmTransaction>}
|
|
500
448
|
*/
|
|
501
|
-
module.exports.
|
|
502
|
-
const ret = wasm.
|
|
449
|
+
module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
|
|
450
|
+
const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
|
|
503
451
|
return takeObject(ret);
|
|
504
452
|
};
|
|
505
453
|
|
|
506
454
|
/**
|
|
507
|
-
* @
|
|
455
|
+
* @param {bigint} amt
|
|
456
|
+
* @param {string} slip1_utxo_key
|
|
457
|
+
* @param {string} slip2_utxo_key
|
|
458
|
+
* @param {string} slip3_utxo_key
|
|
459
|
+
* @param {string} recipient_public_key
|
|
460
|
+
* @param {Uint8Array} tx_msg
|
|
461
|
+
* @returns {Promise<WasmTransaction>}
|
|
508
462
|
*/
|
|
509
|
-
module.exports.
|
|
510
|
-
const ret = wasm.
|
|
463
|
+
module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
|
|
464
|
+
const ret = wasm.create_send_bound_transaction(amt, addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(recipient_public_key), addHeapObject(tx_msg));
|
|
511
465
|
return takeObject(ret);
|
|
512
466
|
};
|
|
513
467
|
|
|
@@ -529,40 +483,63 @@ module.exports.get_next_peer_index = function() {
|
|
|
529
483
|
};
|
|
530
484
|
|
|
531
485
|
/**
|
|
532
|
-
* @param {string}
|
|
533
|
-
* @param {
|
|
534
|
-
* @param {
|
|
486
|
+
* @param {string} public_key
|
|
487
|
+
* @param {bigint} amount
|
|
488
|
+
* @param {bigint} fee
|
|
489
|
+
* @param {boolean} force_merge
|
|
535
490
|
* @returns {Promise<WasmTransaction>}
|
|
536
491
|
*/
|
|
537
|
-
module.exports.
|
|
538
|
-
const ret = wasm.
|
|
492
|
+
module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
|
|
493
|
+
const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
|
|
494
|
+
return takeObject(ret);
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* @param {Uint8Array} buffer
|
|
499
|
+
* @param {string} signature
|
|
500
|
+
* @param {string} public_key
|
|
501
|
+
* @returns {boolean}
|
|
502
|
+
*/
|
|
503
|
+
module.exports.verify_signature = function(buffer, signature, public_key) {
|
|
504
|
+
const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
|
|
505
|
+
return ret !== 0;
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* @returns {Promise<void>}
|
|
510
|
+
*/
|
|
511
|
+
module.exports.start_from_received_ghost_chain = function() {
|
|
512
|
+
const ret = wasm.start_from_received_ghost_chain();
|
|
539
513
|
return takeObject(ret);
|
|
540
514
|
};
|
|
541
515
|
|
|
542
516
|
/**
|
|
543
|
-
* @param {
|
|
544
|
-
* @param {number} minor
|
|
545
|
-
* @param {number} patch
|
|
517
|
+
* @param {bigint} peer_index
|
|
546
518
|
* @returns {Promise<void>}
|
|
547
519
|
*/
|
|
548
|
-
module.exports.
|
|
549
|
-
const ret = wasm.
|
|
520
|
+
module.exports.remove_stun_peer = function(peer_index) {
|
|
521
|
+
const ret = wasm.remove_stun_peer(peer_index);
|
|
550
522
|
return takeObject(ret);
|
|
551
523
|
};
|
|
552
524
|
|
|
553
525
|
/**
|
|
554
|
-
* @
|
|
526
|
+
* @param {string} config_json
|
|
527
|
+
* @param {string} private_key
|
|
528
|
+
* @param {number} log_level_num
|
|
529
|
+
* @param {bigint} hasten_multiplier
|
|
530
|
+
* @param {boolean} delete_old_blocks
|
|
531
|
+
* @returns {Promise<any>}
|
|
555
532
|
*/
|
|
556
|
-
module.exports.
|
|
557
|
-
const ret = wasm.
|
|
533
|
+
module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
|
|
534
|
+
const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
|
|
558
535
|
return takeObject(ret);
|
|
559
536
|
};
|
|
560
537
|
|
|
561
538
|
/**
|
|
562
|
-
* @returns {Promise<
|
|
539
|
+
* @returns {Promise<WasmWallet>}
|
|
563
540
|
*/
|
|
564
|
-
module.exports.
|
|
565
|
-
const ret = wasm.
|
|
541
|
+
module.exports.get_wallet = function() {
|
|
542
|
+
const ret = wasm.get_wallet();
|
|
566
543
|
return takeObject(ret);
|
|
567
544
|
};
|
|
568
545
|
|
|
@@ -578,125 +555,110 @@ module.exports.send_api_error = function(buffer, msg_index, peer_index) {
|
|
|
578
555
|
};
|
|
579
556
|
|
|
580
557
|
/**
|
|
581
|
-
* @
|
|
582
|
-
* @param {bigint} peer_index
|
|
583
|
-
* @returns {Promise<void>}
|
|
558
|
+
* @returns {Promise<any>}
|
|
584
559
|
*/
|
|
585
|
-
module.exports.
|
|
586
|
-
const ret = wasm.
|
|
560
|
+
module.exports.get_confirmations = function() {
|
|
561
|
+
const ret = wasm.get_confirmations();
|
|
587
562
|
return takeObject(ret);
|
|
588
563
|
};
|
|
589
564
|
|
|
590
565
|
/**
|
|
591
|
-
* @
|
|
592
|
-
* @param {string} slip1_utxo_key
|
|
593
|
-
* @param {string} slip2_utxo_key
|
|
594
|
-
* @param {string} slip3_utxo_key
|
|
595
|
-
* @param {string} recipient_public_key
|
|
596
|
-
* @param {Uint8Array} tx_msg
|
|
597
|
-
* @returns {Promise<WasmTransaction>}
|
|
566
|
+
* @returns {Promise<Array<any>>}
|
|
598
567
|
*/
|
|
599
|
-
module.exports.
|
|
600
|
-
const ret = wasm.
|
|
568
|
+
module.exports.get_mempool_txs = function() {
|
|
569
|
+
const ret = wasm.get_mempool_txs();
|
|
601
570
|
return takeObject(ret);
|
|
602
571
|
};
|
|
603
572
|
|
|
604
573
|
/**
|
|
605
|
-
* @
|
|
574
|
+
* @param {WasmTransaction} tx
|
|
575
|
+
* @returns {Promise<void>}
|
|
606
576
|
*/
|
|
607
|
-
module.exports.
|
|
608
|
-
|
|
577
|
+
module.exports.propagate_transaction = function(tx) {
|
|
578
|
+
_assertClass(tx, WasmTransaction);
|
|
579
|
+
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
609
580
|
return takeObject(ret);
|
|
610
581
|
};
|
|
611
582
|
|
|
612
583
|
/**
|
|
613
|
-
* @
|
|
614
|
-
* @returns {string}
|
|
584
|
+
* @returns {Promise<void>}
|
|
615
585
|
*/
|
|
616
|
-
module.exports.
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
620
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
621
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
622
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
623
|
-
if (r2) {
|
|
624
|
-
throw takeObject(r1);
|
|
625
|
-
}
|
|
626
|
-
return takeObject(r0);
|
|
627
|
-
} finally {
|
|
628
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
629
|
-
}
|
|
586
|
+
module.exports.disable_producing_blocks_by_timer = function() {
|
|
587
|
+
const ret = wasm.disable_producing_blocks_by_timer();
|
|
588
|
+
return takeObject(ret);
|
|
630
589
|
};
|
|
631
590
|
|
|
632
591
|
/**
|
|
633
|
-
* @
|
|
592
|
+
* @param {bigint} peer_index
|
|
593
|
+
* @param {string} ip
|
|
594
|
+
* @returns {Promise<void>}
|
|
634
595
|
*/
|
|
635
|
-
module.exports.
|
|
636
|
-
const ret = wasm.
|
|
596
|
+
module.exports.process_new_peer = function(peer_index, ip) {
|
|
597
|
+
const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
|
|
637
598
|
return takeObject(ret);
|
|
638
599
|
};
|
|
639
600
|
|
|
640
601
|
/**
|
|
641
|
-
* @
|
|
602
|
+
* @param {bigint} peer_index
|
|
603
|
+
* @returns {Promise<WasmPeer | undefined>}
|
|
642
604
|
*/
|
|
643
|
-
module.exports.
|
|
644
|
-
const ret = wasm.
|
|
605
|
+
module.exports.get_peer = function(peer_index) {
|
|
606
|
+
const ret = wasm.get_peer(peer_index);
|
|
645
607
|
return takeObject(ret);
|
|
646
608
|
};
|
|
647
609
|
|
|
648
610
|
/**
|
|
649
|
-
* @param {
|
|
611
|
+
* @param {string} key
|
|
612
|
+
* @returns {boolean}
|
|
613
|
+
*/
|
|
614
|
+
module.exports.is_valid_public_key = function(key) {
|
|
615
|
+
const ret = wasm.is_valid_public_key(addHeapObject(key));
|
|
616
|
+
return ret !== 0;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* @param {bigint} duration_in_ms
|
|
650
621
|
* @returns {Promise<void>}
|
|
651
622
|
*/
|
|
652
|
-
module.exports.
|
|
653
|
-
|
|
654
|
-
const ret = wasm.propagate_transaction(tx.__wbg_ptr);
|
|
623
|
+
module.exports.process_timer_event = function(duration_in_ms) {
|
|
624
|
+
const ret = wasm.process_timer_event(duration_in_ms);
|
|
655
625
|
return takeObject(ret);
|
|
656
626
|
};
|
|
657
627
|
|
|
658
628
|
/**
|
|
659
|
-
* @param {bigint}
|
|
660
|
-
* @param {string} public_key
|
|
629
|
+
* @param {bigint} threshold
|
|
661
630
|
* @returns {Promise<void>}
|
|
662
631
|
*/
|
|
663
|
-
module.exports.
|
|
664
|
-
const ret = wasm.
|
|
632
|
+
module.exports.write_issuance_file = function(threshold) {
|
|
633
|
+
const ret = wasm.write_issuance_file(threshold);
|
|
665
634
|
return takeObject(ret);
|
|
666
635
|
};
|
|
667
636
|
|
|
668
637
|
/**
|
|
669
|
-
* @
|
|
670
|
-
* @param {Uint8Array} tx_msg
|
|
671
|
-
* @returns {Promise<WasmTransaction>}
|
|
638
|
+
* @returns {Promise<Array<any>>}
|
|
672
639
|
*/
|
|
673
|
-
module.exports.
|
|
674
|
-
const
|
|
675
|
-
const len0 = WASM_VECTOR_LEN;
|
|
676
|
-
const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
|
|
640
|
+
module.exports.get_peers = function() {
|
|
641
|
+
const ret = wasm.get_peers();
|
|
677
642
|
return takeObject(ret);
|
|
678
643
|
};
|
|
679
644
|
|
|
680
645
|
/**
|
|
681
|
-
* @param {
|
|
646
|
+
* @param {Uint8Array} buffer
|
|
647
|
+
* @param {number} msg_index
|
|
648
|
+
* @param {bigint} peer_index
|
|
682
649
|
* @returns {Promise<void>}
|
|
683
650
|
*/
|
|
684
|
-
module.exports.
|
|
685
|
-
const ret = wasm.
|
|
651
|
+
module.exports.send_api_call = function(buffer, msg_index, peer_index) {
|
|
652
|
+
const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
|
|
686
653
|
return takeObject(ret);
|
|
687
654
|
};
|
|
688
655
|
|
|
689
656
|
/**
|
|
690
|
-
* @param {
|
|
691
|
-
* @
|
|
692
|
-
* @param {string} slip3_utxo_key
|
|
693
|
-
* @param {number} left_count
|
|
694
|
-
* @param {number} right_count
|
|
695
|
-
* @param {Uint8Array} tx_msg
|
|
696
|
-
* @returns {Promise<WasmTransaction>}
|
|
657
|
+
* @param {bigint} current_time
|
|
658
|
+
* @returns {Promise<void>}
|
|
697
659
|
*/
|
|
698
|
-
module.exports.
|
|
699
|
-
const ret = wasm.
|
|
660
|
+
module.exports.process_stat_interval = function(current_time) {
|
|
661
|
+
const ret = wasm.process_stat_interval(current_time);
|
|
700
662
|
return takeObject(ret);
|
|
701
663
|
};
|
|
702
664
|
|
|
@@ -713,25 +675,63 @@ module.exports.create_transaction_with_multiple_payments = function(public_keys,
|
|
|
713
675
|
};
|
|
714
676
|
|
|
715
677
|
/**
|
|
716
|
-
* @
|
|
717
|
-
* @returns {Promise<void>}
|
|
678
|
+
* @returns {Promise<boolean>}
|
|
718
679
|
*/
|
|
719
|
-
module.exports.
|
|
720
|
-
const ret = wasm.
|
|
680
|
+
module.exports.produce_block_without_gt = function() {
|
|
681
|
+
const ret = wasm.produce_block_without_gt();
|
|
721
682
|
return takeObject(ret);
|
|
722
683
|
};
|
|
723
684
|
|
|
724
685
|
/**
|
|
725
|
-
* @param {
|
|
726
|
-
* @
|
|
727
|
-
* @param {bigint} peer_index
|
|
728
|
-
* @returns {Promise<void>}
|
|
686
|
+
* @param {string} public_key
|
|
687
|
+
* @returns {Promise<Array<any>>}
|
|
729
688
|
*/
|
|
730
|
-
module.exports.
|
|
731
|
-
const ret = wasm.
|
|
689
|
+
module.exports.get_account_slips = function(public_key) {
|
|
690
|
+
const ret = wasm.get_account_slips(addHeapObject(public_key));
|
|
732
691
|
return takeObject(ret);
|
|
733
692
|
};
|
|
734
693
|
|
|
694
|
+
/**
|
|
695
|
+
* @param {Uint8Array} buffer
|
|
696
|
+
* @param {string} private_key
|
|
697
|
+
* @returns {string}
|
|
698
|
+
*/
|
|
699
|
+
module.exports.sign_buffer = function(buffer, private_key) {
|
|
700
|
+
try {
|
|
701
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
702
|
+
wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
|
|
703
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
704
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
705
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
706
|
+
if (r2) {
|
|
707
|
+
throw takeObject(r1);
|
|
708
|
+
}
|
|
709
|
+
return takeObject(r0);
|
|
710
|
+
} finally {
|
|
711
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* @param {string} private_key
|
|
717
|
+
* @returns {string}
|
|
718
|
+
*/
|
|
719
|
+
module.exports.generate_public_key = function(private_key) {
|
|
720
|
+
try {
|
|
721
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
722
|
+
wasm.generate_public_key(retptr, addHeapObject(private_key));
|
|
723
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
724
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
725
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
726
|
+
if (r2) {
|
|
727
|
+
throw takeObject(r1);
|
|
728
|
+
}
|
|
729
|
+
return takeObject(r0);
|
|
730
|
+
} finally {
|
|
731
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
|
|
735
735
|
/**
|
|
736
736
|
* @param {string} block_hash
|
|
737
737
|
* @returns {Promise<WasmBlock>}
|
|
@@ -2680,20 +2680,24 @@ class WasmWalletSlip {
|
|
|
2680
2680
|
}
|
|
2681
2681
|
module.exports.WasmWalletSlip = WasmWalletSlip;
|
|
2682
2682
|
|
|
2683
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2684
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2685
|
-
return addHeapObject(ret);
|
|
2686
|
-
};
|
|
2687
|
-
|
|
2688
2683
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2689
2684
|
takeObject(arg0);
|
|
2690
2685
|
};
|
|
2691
2686
|
|
|
2692
|
-
module.exports.
|
|
2693
|
-
const ret =
|
|
2687
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2688
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2694
2689
|
return addHeapObject(ret);
|
|
2695
2690
|
};
|
|
2696
2691
|
|
|
2692
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2693
|
+
const obj = getObject(arg1);
|
|
2694
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2695
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2696
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2697
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2698
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2699
|
+
};
|
|
2700
|
+
|
|
2697
2701
|
module.exports.__wbg_wasmtransaction_new = function(arg0) {
|
|
2698
2702
|
const ret = WasmTransaction.__wrap(arg0);
|
|
2699
2703
|
return addHeapObject(ret);
|
|
@@ -2704,23 +2708,19 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
|
2704
2708
|
return addHeapObject(ret);
|
|
2705
2709
|
};
|
|
2706
2710
|
|
|
2707
|
-
module.exports.
|
|
2708
|
-
const ret =
|
|
2711
|
+
module.exports.__wbg_wasmpeer_new = function(arg0) {
|
|
2712
|
+
const ret = WasmPeer.__wrap(arg0);
|
|
2709
2713
|
return addHeapObject(ret);
|
|
2710
2714
|
};
|
|
2711
2715
|
|
|
2712
|
-
module.exports.
|
|
2713
|
-
const ret =
|
|
2716
|
+
module.exports.__wbg_wasmwallet_new = function(arg0) {
|
|
2717
|
+
const ret = WasmWallet.__wrap(arg0);
|
|
2714
2718
|
return addHeapObject(ret);
|
|
2715
2719
|
};
|
|
2716
2720
|
|
|
2717
|
-
module.exports.
|
|
2718
|
-
const
|
|
2719
|
-
|
|
2720
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2721
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2722
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2723
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2721
|
+
module.exports.__wbg_wasmblockchain_new = function(arg0) {
|
|
2722
|
+
const ret = WasmBlockchain.__wrap(arg0);
|
|
2723
|
+
return addHeapObject(ret);
|
|
2724
2724
|
};
|
|
2725
2725
|
|
|
2726
2726
|
module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
@@ -2728,18 +2728,18 @@ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
|
|
|
2728
2728
|
return addHeapObject(ret);
|
|
2729
2729
|
};
|
|
2730
2730
|
|
|
2731
|
-
module.exports.
|
|
2732
|
-
const ret =
|
|
2731
|
+
module.exports.__wbg_wasmblock_new = function(arg0) {
|
|
2732
|
+
const ret = WasmBlock.__wrap(arg0);
|
|
2733
2733
|
return addHeapObject(ret);
|
|
2734
2734
|
};
|
|
2735
2735
|
|
|
2736
|
-
module.exports.
|
|
2737
|
-
const ret =
|
|
2736
|
+
module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
|
|
2737
|
+
const ret = WasmBalanceSnapshot.__wrap(arg0);
|
|
2738
2738
|
return addHeapObject(ret);
|
|
2739
2739
|
};
|
|
2740
2740
|
|
|
2741
|
-
module.exports.
|
|
2742
|
-
const ret =
|
|
2741
|
+
module.exports.__wbg_wasmnft_new = function(arg0) {
|
|
2742
|
+
const ret = WasmNFT.__wrap(arg0);
|
|
2743
2743
|
return addHeapObject(ret);
|
|
2744
2744
|
};
|
|
2745
2745
|
|
|
@@ -2748,8 +2748,8 @@ module.exports.__wbg_wasmslip_new = function(arg0) {
|
|
|
2748
2748
|
return addHeapObject(ret);
|
|
2749
2749
|
};
|
|
2750
2750
|
|
|
2751
|
-
module.exports.
|
|
2752
|
-
const ret =
|
|
2751
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
2752
|
+
const ret = getObject(arg0);
|
|
2753
2753
|
return addHeapObject(ret);
|
|
2754
2754
|
};
|
|
2755
2755
|
|
|
@@ -2774,7 +2774,7 @@ module.exports.__wbg_wasmhop_new = function(arg0) {
|
|
|
2774
2774
|
return addHeapObject(ret);
|
|
2775
2775
|
};
|
|
2776
2776
|
|
|
2777
|
-
module.exports.
|
|
2777
|
+
module.exports.__wbg_flushdata_782694d9b96c64ed = function(arg0, arg1) {
|
|
2778
2778
|
let deferred0_0;
|
|
2779
2779
|
let deferred0_1;
|
|
2780
2780
|
try {
|
|
@@ -2786,7 +2786,7 @@ module.exports.__wbg_flushdata_92ac04166c91a15f = function(arg0, arg1) {
|
|
|
2786
2786
|
}
|
|
2787
2787
|
};
|
|
2788
2788
|
|
|
2789
|
-
module.exports.
|
|
2789
|
+
module.exports.__wbg_readvalue_c97d73d5a2788af3 = function() { return handleError(function (arg0, arg1) {
|
|
2790
2790
|
let deferred0_0;
|
|
2791
2791
|
let deferred0_1;
|
|
2792
2792
|
try {
|
|
@@ -2799,15 +2799,15 @@ module.exports.__wbg_readvalue_90364f7b3d978c70 = function() { return handleErro
|
|
|
2799
2799
|
}
|
|
2800
2800
|
}, arguments) };
|
|
2801
2801
|
|
|
2802
|
-
module.exports.
|
|
2802
|
+
module.exports.__wbg_loadwallet_195579a7d3db528c = function() {
|
|
2803
2803
|
MsgHandler.load_wallet();
|
|
2804
2804
|
};
|
|
2805
2805
|
|
|
2806
|
-
module.exports.
|
|
2806
|
+
module.exports.__wbg_savewallet_33279d81a586665d = function() {
|
|
2807
2807
|
MsgHandler.save_wallet();
|
|
2808
2808
|
};
|
|
2809
2809
|
|
|
2810
|
-
module.exports.
|
|
2810
|
+
module.exports.__wbg_writevalue_463aeeb91d56f3d5 = function(arg0, arg1, arg2) {
|
|
2811
2811
|
let deferred0_0;
|
|
2812
2812
|
let deferred0_1;
|
|
2813
2813
|
try {
|
|
@@ -2819,7 +2819,7 @@ module.exports.__wbg_writevalue_434a56c8c755c7f7 = function(arg0, arg1, arg2) {
|
|
|
2819
2819
|
}
|
|
2820
2820
|
};
|
|
2821
2821
|
|
|
2822
|
-
module.exports.
|
|
2822
|
+
module.exports.__wbg_appendvalue_b427962970b5abb6 = function(arg0, arg1, arg2) {
|
|
2823
2823
|
let deferred0_0;
|
|
2824
2824
|
let deferred0_1;
|
|
2825
2825
|
try {
|
|
@@ -2831,7 +2831,7 @@ module.exports.__wbg_appendvalue_ef25445ea7aa5547 = function(arg0, arg1, arg2) {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
};
|
|
2833
2833
|
|
|
2834
|
-
module.exports.
|
|
2834
|
+
module.exports.__wbg_removevalue_3c1595639830a6b1 = function() { return handleError(function (arg0, arg1) {
|
|
2835
2835
|
let deferred0_0;
|
|
2836
2836
|
let deferred0_1;
|
|
2837
2837
|
try {
|
|
@@ -2844,11 +2844,11 @@ module.exports.__wbg_removevalue_1ab6adf3d478d47d = function() { return handleEr
|
|
|
2844
2844
|
}
|
|
2845
2845
|
}, arguments) };
|
|
2846
2846
|
|
|
2847
|
-
module.exports.
|
|
2847
|
+
module.exports.__wbg_sendmessage_315b5ec1a9b4580d = function(arg0, arg1) {
|
|
2848
2848
|
MsgHandler.send_message(takeObject(arg0), getObject(arg1));
|
|
2849
2849
|
};
|
|
2850
2850
|
|
|
2851
|
-
module.exports.
|
|
2851
|
+
module.exports.__wbg_connecttopeer_3cdd1ebe4a6a8f2a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2852
2852
|
let deferred0_0;
|
|
2853
2853
|
let deferred0_1;
|
|
2854
2854
|
try {
|
|
@@ -2861,14 +2861,14 @@ module.exports.__wbg_connecttopeer_21362060cef5eda3 = function() { return handle
|
|
|
2861
2861
|
}
|
|
2862
2862
|
}, arguments) };
|
|
2863
2863
|
|
|
2864
|
-
module.exports.
|
|
2864
|
+
module.exports.__wbg_getmyservices_6c00e5de42eb7e4d = function() {
|
|
2865
2865
|
const ret = MsgHandler.get_my_services();
|
|
2866
2866
|
_assertClass(ret, WasmPeerServiceList);
|
|
2867
2867
|
var ptr1 = ret.__destroy_into_raw();
|
|
2868
2868
|
return ptr1;
|
|
2869
2869
|
};
|
|
2870
2870
|
|
|
2871
|
-
module.exports.
|
|
2871
|
+
module.exports.__wbg_isexistingfile_f87b68e97a90dba1 = function() { return handleError(function (arg0, arg1) {
|
|
2872
2872
|
let deferred0_0;
|
|
2873
2873
|
let deferred0_1;
|
|
2874
2874
|
try {
|
|
@@ -2881,33 +2881,33 @@ module.exports.__wbg_isexistingfile_0975acb4bc37b526 = function() { return handl
|
|
|
2881
2881
|
}
|
|
2882
2882
|
}, arguments) };
|
|
2883
2883
|
|
|
2884
|
-
module.exports.
|
|
2884
|
+
module.exports.__wbg_processapicall_90eb27310b01c5c9 = function(arg0, arg1, arg2) {
|
|
2885
2885
|
MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2886
2886
|
};
|
|
2887
2887
|
|
|
2888
|
-
module.exports.
|
|
2888
|
+
module.exports.__wbg_processapierror_0c077a8fbc642abd = function(arg0, arg1, arg2) {
|
|
2889
2889
|
MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2890
2890
|
};
|
|
2891
2891
|
|
|
2892
|
-
module.exports.
|
|
2892
|
+
module.exports.__wbg_processapisuccess_83cda5fc8f709984 = function(arg0, arg1, arg2) {
|
|
2893
2893
|
MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
|
|
2894
2894
|
};
|
|
2895
2895
|
|
|
2896
|
-
module.exports.
|
|
2896
|
+
module.exports.__wbg_sendmessagetoall_65c26d42cf5ec0b1 = function(arg0, arg1) {
|
|
2897
2897
|
MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
|
|
2898
2898
|
};
|
|
2899
2899
|
|
|
2900
|
-
module.exports.
|
|
2900
|
+
module.exports.__wbg_disconnectfrompeer_84bb5ae1a11275a2 = function() { return handleError(function (arg0) {
|
|
2901
2901
|
const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
|
|
2902
2902
|
return addHeapObject(ret);
|
|
2903
2903
|
}, arguments) };
|
|
2904
2904
|
|
|
2905
|
-
module.exports.
|
|
2905
|
+
module.exports.__wbg_loadblockfilelist_5c427c4886a9b35f = function() { return handleError(function () {
|
|
2906
2906
|
const ret = MsgHandler.load_block_file_list();
|
|
2907
2907
|
return addHeapObject(ret);
|
|
2908
2908
|
}, arguments) };
|
|
2909
2909
|
|
|
2910
|
-
module.exports.
|
|
2910
|
+
module.exports.__wbg_sendinterfaceevent_545684113f494709 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
2911
2911
|
let deferred0_0;
|
|
2912
2912
|
let deferred0_1;
|
|
2913
2913
|
let deferred1_0;
|
|
@@ -2924,7 +2924,7 @@ module.exports.__wbg_sendinterfaceevent_1e00e3d559fe276c = function(arg0, arg1,
|
|
|
2924
2924
|
}
|
|
2925
2925
|
};
|
|
2926
2926
|
|
|
2927
|
-
module.exports.
|
|
2927
|
+
module.exports.__wbg_sendblocksuccess_38e53e8b93e087a7 = function(arg0, arg1, arg2) {
|
|
2928
2928
|
let deferred0_0;
|
|
2929
2929
|
let deferred0_1;
|
|
2930
2930
|
try {
|
|
@@ -2936,11 +2936,11 @@ module.exports.__wbg_sendblocksuccess_83826df6b037c48f = function(arg0, arg1, ar
|
|
|
2936
2936
|
}
|
|
2937
2937
|
};
|
|
2938
2938
|
|
|
2939
|
-
module.exports.
|
|
2939
|
+
module.exports.__wbg_sendwalletupdate_ca4df5bf41062961 = function() {
|
|
2940
2940
|
MsgHandler.send_wallet_update();
|
|
2941
2941
|
};
|
|
2942
2942
|
|
|
2943
|
-
module.exports.
|
|
2943
|
+
module.exports.__wbg_sendnewversionalert_905be141c7705d0a = function(arg0, arg1, arg2) {
|
|
2944
2944
|
let deferred0_0;
|
|
2945
2945
|
let deferred0_1;
|
|
2946
2946
|
try {
|
|
@@ -2952,15 +2952,15 @@ module.exports.__wbg_sendnewversionalert_cda1bd8ae6aa0de4 = function(arg0, arg1,
|
|
|
2952
2952
|
}
|
|
2953
2953
|
};
|
|
2954
2954
|
|
|
2955
|
-
module.exports.
|
|
2955
|
+
module.exports.__wbg_sendblockfetchstatusevent_b85682b36072bc70 = function(arg0) {
|
|
2956
2956
|
MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
|
|
2957
2957
|
};
|
|
2958
2958
|
|
|
2959
|
-
module.exports.
|
|
2959
|
+
module.exports.__wbg_sendnewchaindetectedevent_2716566461445c2c = function() {
|
|
2960
2960
|
MsgHandler.send_new_chain_detected_event();
|
|
2961
2961
|
};
|
|
2962
2962
|
|
|
2963
|
-
module.exports.
|
|
2963
|
+
module.exports.__wbg_fetchblockfrompeer_e64e17797e6e941b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2964
2964
|
let deferred0_0;
|
|
2965
2965
|
let deferred0_1;
|
|
2966
2966
|
try {
|
|
@@ -2973,7 +2973,7 @@ module.exports.__wbg_fetchblockfrompeer_581983083ea4d34b = function() { return h
|
|
|
2973
2973
|
}
|
|
2974
2974
|
}, arguments) };
|
|
2975
2975
|
|
|
2976
|
-
module.exports.
|
|
2976
|
+
module.exports.__wbg_ensuredirectoryexists_9256ee76e227cc2c = function() { return handleError(function (arg0, arg1) {
|
|
2977
2977
|
let deferred0_0;
|
|
2978
2978
|
let deferred0_1;
|
|
2979
2979
|
try {
|
|
@@ -3371,7 +3371,7 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
|
3371
3371
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3372
3372
|
};
|
|
3373
3373
|
|
|
3374
|
-
module.exports.
|
|
3374
|
+
module.exports.__wbindgen_closure_wrapper1558 = function(arg0, arg1, arg2) {
|
|
3375
3375
|
const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
|
|
3376
3376
|
return addHeapObject(ret);
|
|
3377
3377
|
};
|