saito-wasm 0.2.170 → 0.2.171

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/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-110f636d48c332b6/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-d893e173c1089dfc/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');
@@ -234,62 +234,82 @@ function _assertClass(instance, klass) {
234
234
  }
235
235
  return instance.ptr;
236
236
  }
237
+
238
+ let stack_pointer = 128;
239
+
240
+ function addBorrowedObject(obj) {
241
+ if (stack_pointer == 1) throw new Error('out of js stack');
242
+ heap[--stack_pointer] = obj;
243
+ return stack_pointer;
244
+ }
237
245
  /**
238
246
  * @param {Uint8Array} buffer
247
+ * @param {number} msg_index
239
248
  * @param {bigint} peer_index
240
249
  * @returns {Promise<void>}
241
250
  */
242
- module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
243
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
251
+ module.exports.send_api_call = function(buffer, msg_index, peer_index) {
252
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
244
253
  return takeObject(ret);
245
254
  };
246
255
 
247
256
  /**
248
- * @param {string} slip1_utxo_key
249
- * @param {string} slip2_utxo_key
250
- * @param {string} slip3_utxo_key
251
- * @returns {Promise<WasmTransaction>}
257
+ * @param {Uint8Array} hash
258
+ * @param {bigint} block_id
259
+ * @param {bigint} peer_index
260
+ * @returns {Promise<void>}
252
261
  */
253
- module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
254
- const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
262
+ module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
263
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
255
264
  return takeObject(ret);
256
265
  };
257
266
 
267
+ /**
268
+ * @param {string} key
269
+ * @returns {boolean}
270
+ */
271
+ module.exports.is_valid_public_key = function(key) {
272
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
273
+ return ret !== 0;
274
+ };
275
+
258
276
  /**
259
277
  * @param {Uint8Array} buffer
260
- * @param {Uint8Array} hash
261
- * @param {bigint} block_id
278
+ * @param {number} msg_index
262
279
  * @param {bigint} peer_index
263
280
  * @returns {Promise<void>}
264
281
  */
265
- module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
266
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
282
+ module.exports.send_api_success = function(buffer, msg_index, peer_index) {
283
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
267
284
  return takeObject(ret);
268
285
  };
269
286
 
270
287
  /**
271
- * @param {bigint} peer_index
272
- * @returns {Promise<WasmPeer | undefined>}
288
+ * @returns {Promise<void>}
273
289
  */
274
- module.exports.get_peer = function(peer_index) {
275
- const ret = wasm.get_peer(peer_index);
290
+ module.exports.disable_producing_blocks_by_timer = function() {
291
+ const ret = wasm.disable_producing_blocks_by_timer();
276
292
  return takeObject(ret);
277
293
  };
278
294
 
279
295
  /**
280
- * @param {string} block_hash
281
- * @returns {Promise<WasmBlock>}
296
+ * @param {Array<any>} public_keys
297
+ * @param {BigUint64Array} amounts
298
+ * @param {bigint} fee
299
+ * @param {boolean} _force_merge
300
+ * @returns {Promise<WasmTransaction>}
282
301
  */
283
- module.exports.get_block = function(block_hash) {
284
- const ret = wasm.get_block(addHeapObject(block_hash));
302
+ module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
303
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
285
304
  return takeObject(ret);
286
305
  };
287
306
 
288
307
  /**
289
- * @returns {Promise<Array<any>>}
308
+ * @param {bigint} peer_index
309
+ * @returns {Promise<WasmPeer | undefined>}
290
310
  */
291
- module.exports.get_mempool_txs = function() {
292
- const ret = wasm.get_mempool_txs();
311
+ module.exports.get_peer = function(peer_index) {
312
+ const ret = wasm.get_peer(peer_index);
293
313
  return takeObject(ret);
294
314
  };
295
315
 
@@ -304,57 +324,45 @@ module.exports.process_stun_peer = function(peer_index, public_key) {
304
324
  };
305
325
 
306
326
  /**
307
- * @param {string} key
308
- * @returns {boolean}
309
- */
310
- module.exports.is_valid_public_key = function(key) {
311
- const ret = wasm.is_valid_public_key(addHeapObject(key));
312
- return ret !== 0;
313
- };
314
-
315
- /**
316
- * @returns {Promise<string>}
327
+ * @param {bigint} num
328
+ * @param {bigint} deposit
329
+ * @param {Uint8Array} tx_msg
330
+ * @param {bigint} fee
331
+ * @param {string} recipient_public_key
332
+ * @param {string} nft_type
333
+ * @returns {Promise<WasmTransaction>}
317
334
  */
318
- module.exports.get_stats = function() {
319
- const ret = wasm.get_stats();
335
+ module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
336
+ const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
320
337
  return takeObject(ret);
321
338
  };
322
339
 
323
340
  /**
324
- * @param {Uint8Array} buffer
325
- * @param {string} private_key
326
- * @returns {string}
341
+ * @param {number} major
342
+ * @param {number} minor
343
+ * @param {number} patch
344
+ * @returns {Promise<void>}
327
345
  */
328
- module.exports.sign_buffer = function(buffer, private_key) {
329
- try {
330
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
331
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
332
- var r0 = getInt32Memory0()[retptr / 4 + 0];
333
- var r1 = getInt32Memory0()[retptr / 4 + 1];
334
- var r2 = getInt32Memory0()[retptr / 4 + 2];
335
- if (r2) {
336
- throw takeObject(r1);
337
- }
338
- return takeObject(r0);
339
- } finally {
340
- wasm.__wbindgen_add_to_stack_pointer(16);
341
- }
346
+ module.exports.set_wallet_version = function(major, minor, patch) {
347
+ const ret = wasm.set_wallet_version(major, minor, patch);
348
+ return takeObject(ret);
342
349
  };
343
350
 
344
351
  /**
345
- * @param {bigint} peer_index
352
+ * @param {bigint} threshold
346
353
  * @returns {Promise<void>}
347
354
  */
348
- module.exports.process_peer_disconnection = function(peer_index) {
349
- const ret = wasm.process_peer_disconnection(peer_index);
355
+ module.exports.write_issuance_file = function(threshold) {
356
+ const ret = wasm.write_issuance_file(threshold);
350
357
  return takeObject(ret);
351
358
  };
352
359
 
353
360
  /**
354
- * @returns {Promise<WasmBlockchain>}
361
+ * @param {Uint8Array} buffer
362
+ * @returns {string}
355
363
  */
356
- module.exports.get_blockchain = function() {
357
- const ret = wasm.get_blockchain();
364
+ module.exports.hash = function(buffer) {
365
+ const ret = wasm.hash(addHeapObject(buffer));
358
366
  return takeObject(ret);
359
367
  };
360
368
 
@@ -366,14 +374,6 @@ module.exports.get_congestion_stats = function() {
366
374
  return takeObject(ret);
367
375
  };
368
376
 
369
- /**
370
- * @returns {Promise<any>}
371
- */
372
- module.exports.get_confirmations = function() {
373
- const ret = wasm.get_confirmations();
374
- return takeObject(ret);
375
- };
376
-
377
377
  /**
378
378
  * @param {string} slip1_utxo_key
379
379
  * @param {string} slip2_utxo_key
@@ -389,32 +389,58 @@ module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_u
389
389
  };
390
390
 
391
391
  /**
392
- * @param {bigint} amt
393
- * @param {string} slip1_utxo_key
394
- * @param {string} slip2_utxo_key
395
- * @param {string} slip3_utxo_key
396
- * @param {string} recipient_public_key
392
+ * @param {string} public_key
393
+ * @param {bigint} amount
394
+ * @param {bigint} fee
395
+ * @param {boolean} force_merge
396
+ * @returns {Promise<WasmTransaction>}
397
+ */
398
+ module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
399
+ const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
400
+ return takeObject(ret);
401
+ };
402
+
403
+ /**
404
+ * @param {Uint8Array} buffer
405
+ * @param {string} signature
406
+ * @param {string} public_key
407
+ * @returns {boolean}
408
+ */
409
+ module.exports.verify_signature = function(buffer, signature, public_key) {
410
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
411
+ return ret !== 0;
412
+ };
413
+
414
+ /**
415
+ * @param {string} nft_id_hex
397
416
  * @param {Uint8Array} tx_msg
398
417
  * @returns {Promise<WasmTransaction>}
399
418
  */
400
- module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
401
- 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));
419
+ module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
420
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
421
+ const len0 = WASM_VECTOR_LEN;
422
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
402
423
  return takeObject(ret);
403
424
  };
404
425
 
405
426
  /**
406
- * @returns {Promise<string>}
427
+ * @param {string} block_hash
428
+ * @returns {Promise<WasmBlock>}
407
429
  */
408
- module.exports.get_latest_block_hash = function() {
409
- const ret = wasm.get_latest_block_hash();
430
+ module.exports.get_block = function(block_hash) {
431
+ const ret = wasm.get_block(addHeapObject(block_hash));
410
432
  return takeObject(ret);
411
433
  };
412
434
 
413
435
  /**
414
- * @returns {Promise<WasmWallet>}
436
+ * @param {Uint8Array} buffer
437
+ * @param {Uint8Array} hash
438
+ * @param {bigint} block_id
439
+ * @param {bigint} peer_index
440
+ * @returns {Promise<void>}
415
441
  */
416
- module.exports.get_wallet = function() {
417
- const ret = wasm.get_wallet();
442
+ module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
443
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
418
444
  return takeObject(ret);
419
445
  };
420
446
 
@@ -429,266 +455,251 @@ module.exports.get_peer_stats = function() {
429
455
  /**
430
456
  * @returns {Promise<Array<any>>}
431
457
  */
432
- module.exports.get_peers = function() {
433
- const ret = wasm.get_peers();
458
+ module.exports.get_nft_list = function() {
459
+ const ret = wasm.get_nft_list();
434
460
  return takeObject(ret);
435
461
  };
436
462
 
437
463
  /**
438
- * @param {Uint8Array} buffer
439
- * @param {number} msg_index
440
- * @param {bigint} peer_index
464
+ * @param {string} public_key
465
+ * @returns {Promise<Array<any>>}
466
+ */
467
+ module.exports.get_account_slips = function(public_key) {
468
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
469
+ return takeObject(ret);
470
+ };
471
+
472
+ /**
473
+ * @param {bigint} duration_in_ms
441
474
  * @returns {Promise<void>}
442
475
  */
443
- module.exports.send_api_call = function(buffer, msg_index, peer_index) {
444
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
476
+ module.exports.process_timer_event = function(duration_in_ms) {
477
+ const ret = wasm.process_timer_event(duration_in_ms);
445
478
  return takeObject(ret);
446
479
  };
447
480
 
448
481
  /**
449
- * @param {string} private_key
450
- * @returns {string}
482
+ * @returns {Promise<string>}
451
483
  */
452
- module.exports.generate_public_key = function(private_key) {
453
- try {
454
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
455
- wasm.generate_public_key(retptr, addHeapObject(private_key));
456
- var r0 = getInt32Memory0()[retptr / 4 + 0];
457
- var r1 = getInt32Memory0()[retptr / 4 + 1];
458
- var r2 = getInt32Memory0()[retptr / 4 + 2];
459
- if (r2) {
460
- throw takeObject(r1);
461
- }
462
- return takeObject(r0);
463
- } finally {
464
- wasm.__wbindgen_add_to_stack_pointer(16);
465
- }
484
+ module.exports.get_latest_block_hash = function() {
485
+ const ret = wasm.get_latest_block_hash();
486
+ return takeObject(ret);
466
487
  };
467
488
 
468
489
  /**
469
- * @param {WasmTransaction} tx
490
+ * @param {bigint} peer_index
470
491
  * @returns {Promise<void>}
471
492
  */
472
- module.exports.propagate_transaction = function(tx) {
473
- _assertClass(tx, WasmTransaction);
474
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
493
+ module.exports.remove_stun_peer = function(peer_index) {
494
+ const ret = wasm.remove_stun_peer(peer_index);
475
495
  return takeObject(ret);
476
496
  };
477
497
 
478
498
  /**
479
- * @param {Array<any>} keys
480
- * @returns {Promise<WasmBalanceSnapshot>}
499
+ * @param {bigint} peer_index
500
+ * @returns {Promise<void>}
481
501
  */
482
- module.exports.get_balance_snapshot = function(keys) {
483
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
502
+ module.exports.process_peer_disconnection = function(peer_index) {
503
+ const ret = wasm.process_peer_disconnection(peer_index);
484
504
  return takeObject(ret);
485
505
  };
486
506
 
487
507
  /**
488
- * @param {string} nft_id_hex
489
- * @param {Uint8Array} tx_msg
490
- * @returns {Promise<WasmTransaction>}
508
+ * @returns {Promise<string>}
491
509
  */
492
- module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
493
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
494
- const len0 = WASM_VECTOR_LEN;
495
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
510
+ module.exports.get_stats = function() {
511
+ const ret = wasm.get_stats();
496
512
  return takeObject(ret);
497
513
  };
498
514
 
499
515
  /**
500
- * @param {bigint} peer_index
501
- * @param {string} ip
502
- * @returns {Promise<void>}
516
+ * @returns {Promise<boolean>}
503
517
  */
504
- module.exports.process_new_peer = function(peer_index, ip) {
505
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
518
+ module.exports.produce_block_with_gt = function() {
519
+ const ret = wasm.produce_block_with_gt();
506
520
  return takeObject(ret);
507
521
  };
508
522
 
509
523
  /**
510
- * @param {Array<any>} public_keys
511
- * @param {BigUint64Array} amounts
512
- * @param {bigint} fee
513
- * @param {boolean} _force_merge
514
- * @returns {Promise<WasmTransaction>}
524
+ * @param {string} config_json
525
+ * @param {string} private_key
526
+ * @param {number} log_level_num
527
+ * @param {bigint} hasten_multiplier
528
+ * @param {boolean} delete_old_blocks
529
+ * @returns {Promise<any>}
515
530
  */
516
- module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
517
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
531
+ module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
532
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
518
533
  return takeObject(ret);
519
534
  };
520
535
 
521
536
  /**
522
- * @param {Uint8Array} hash
523
- * @param {bigint} block_id
524
- * @param {bigint} peer_index
525
- * @returns {Promise<void>}
537
+ * @returns {string}
526
538
  */
527
- module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
528
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
539
+ module.exports.generate_private_key = function() {
540
+ const ret = wasm.generate_private_key();
529
541
  return takeObject(ret);
530
542
  };
531
543
 
532
544
  /**
533
545
  * @returns {Promise<Array<any>>}
534
546
  */
535
- module.exports.get_nft_list = function() {
536
- const ret = wasm.get_nft_list();
547
+ module.exports.get_mempool_txs = function() {
548
+ const ret = wasm.get_mempool_txs();
537
549
  return takeObject(ret);
538
550
  };
539
551
 
540
552
  /**
541
- * @returns {Promise<boolean>}
553
+ * @param {bigint} current_time
554
+ * @returns {Promise<void>}
542
555
  */
543
- module.exports.produce_block_with_gt = function() {
544
- const ret = wasm.produce_block_with_gt();
556
+ module.exports.process_stat_interval = function(current_time) {
557
+ const ret = wasm.process_stat_interval(current_time);
545
558
  return takeObject(ret);
546
559
  };
547
560
 
548
561
  /**
549
- * @param {bigint} peer_index
550
- * @returns {Promise<void>}
562
+ * @returns {Promise<boolean>}
551
563
  */
552
- module.exports.remove_stun_peer = function(peer_index) {
553
- const ret = wasm.remove_stun_peer(peer_index);
564
+ module.exports.produce_block_without_gt = function() {
565
+ const ret = wasm.produce_block_without_gt();
554
566
  return takeObject(ret);
555
567
  };
556
568
 
557
569
  /**
558
- * @returns {string}
570
+ * @param {WasmTransaction} tx
571
+ * @returns {Promise<void>}
559
572
  */
560
- module.exports.generate_private_key = function() {
561
- const ret = wasm.generate_private_key();
573
+ module.exports.propagate_transaction = function(tx) {
574
+ _assertClass(tx, WasmTransaction);
575
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
562
576
  return takeObject(ret);
563
577
  };
564
578
 
565
579
  /**
580
+ * @param {Uint8Array} buffer
581
+ * @param {number} msg_index
582
+ * @param {bigint} peer_index
566
583
  * @returns {Promise<void>}
567
584
  */
568
- module.exports.start_from_received_ghost_chain = function() {
569
- const ret = wasm.start_from_received_ghost_chain();
585
+ module.exports.send_api_error = function(buffer, msg_index, peer_index) {
586
+ const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
570
587
  return takeObject(ret);
571
588
  };
572
589
 
573
590
  /**
574
- * @param {string} public_key
575
- * @param {bigint} amount
576
- * @param {bigint} fee
577
- * @param {boolean} force_merge
578
- * @returns {Promise<WasmTransaction>}
579
- */
580
- module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
581
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
591
+ * @param {WasmBalanceSnapshot} snapshot
592
+ * @returns {Promise<void>}
593
+ */
594
+ module.exports.update_from_balance_snapshot = function(snapshot) {
595
+ _assertClass(snapshot, WasmBalanceSnapshot);
596
+ var ptr0 = snapshot.__destroy_into_raw();
597
+ const ret = wasm.update_from_balance_snapshot(ptr0);
582
598
  return takeObject(ret);
583
599
  };
584
600
 
585
601
  /**
586
- * @param {string} public_key
587
- * @returns {Promise<Array<any>>}
602
+ * @param {bigint} peer_index
603
+ * @param {string} ip
604
+ * @returns {Promise<void>}
588
605
  */
589
- module.exports.get_account_slips = function(public_key) {
590
- const ret = wasm.get_account_slips(addHeapObject(public_key));
606
+ module.exports.process_new_peer = function(peer_index, ip) {
607
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
591
608
  return takeObject(ret);
592
609
  };
593
610
 
594
611
  /**
595
- * @param {bigint} num
596
- * @param {bigint} deposit
597
- * @param {Uint8Array} tx_msg
598
- * @param {bigint} fee
612
+ * @param {bigint} amt
613
+ * @param {string} slip1_utxo_key
614
+ * @param {string} slip2_utxo_key
615
+ * @param {string} slip3_utxo_key
599
616
  * @param {string} recipient_public_key
600
- * @param {string} nft_type
617
+ * @param {Uint8Array} tx_msg
601
618
  * @returns {Promise<WasmTransaction>}
602
619
  */
603
- module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
604
- const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
620
+ module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
621
+ 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));
605
622
  return takeObject(ret);
606
623
  };
607
624
 
608
625
  /**
609
- * @param {bigint} current_time
610
- * @returns {Promise<void>}
626
+ * @returns {Promise<Array<any>>}
611
627
  */
612
- module.exports.process_stat_interval = function(current_time) {
613
- const ret = wasm.process_stat_interval(current_time);
628
+ module.exports.get_peers = function() {
629
+ const ret = wasm.get_peers();
614
630
  return takeObject(ret);
615
631
  };
616
632
 
617
633
  /**
618
634
  * @returns {Promise<void>}
619
635
  */
620
- module.exports.disable_producing_blocks_by_timer = function() {
621
- const ret = wasm.disable_producing_blocks_by_timer();
636
+ module.exports.start_from_received_ghost_chain = function() {
637
+ const ret = wasm.start_from_received_ghost_chain();
622
638
  return takeObject(ret);
623
639
  };
624
640
 
625
641
  /**
626
- * @param {Uint8Array} buffer
627
- * @param {number} msg_index
628
- * @param {bigint} peer_index
629
- * @returns {Promise<void>}
642
+ * @returns {Promise<any>}
630
643
  */
631
- module.exports.send_api_success = function(buffer, msg_index, peer_index) {
632
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
644
+ module.exports.get_confirmations = function() {
645
+ const ret = wasm.get_confirmations();
633
646
  return takeObject(ret);
634
647
  };
635
648
 
636
649
  /**
637
- * @param {bigint} duration_in_ms
638
- * @returns {Promise<void>}
650
+ * @param {string} slip1_utxo_key
651
+ * @param {string} slip2_utxo_key
652
+ * @param {string} slip3_utxo_key
653
+ * @returns {Promise<WasmTransaction>}
639
654
  */
640
- module.exports.process_timer_event = function(duration_in_ms) {
641
- const ret = wasm.process_timer_event(duration_in_ms);
655
+ module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
656
+ const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
642
657
  return takeObject(ret);
643
658
  };
644
659
 
645
660
  /**
646
- * @returns {Promise<boolean>}
661
+ * @returns {Promise<WasmWallet>}
647
662
  */
648
- module.exports.produce_block_without_gt = function() {
649
- const ret = wasm.produce_block_without_gt();
663
+ module.exports.get_wallet = function() {
664
+ const ret = wasm.get_wallet();
650
665
  return takeObject(ret);
651
666
  };
652
667
 
653
668
  /**
654
- * @param {WasmBalanceSnapshot} snapshot
655
- * @returns {Promise<void>}
669
+ * @param {string} private_key
670
+ * @returns {string}
656
671
  */
657
- module.exports.update_from_balance_snapshot = function(snapshot) {
658
- _assertClass(snapshot, WasmBalanceSnapshot);
659
- var ptr0 = snapshot.__destroy_into_raw();
660
- const ret = wasm.update_from_balance_snapshot(ptr0);
661
- return takeObject(ret);
672
+ module.exports.generate_public_key = function(private_key) {
673
+ try {
674
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
675
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
676
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
677
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
678
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
679
+ if (r2) {
680
+ throw takeObject(r1);
681
+ }
682
+ return takeObject(r0);
683
+ } finally {
684
+ wasm.__wbindgen_add_to_stack_pointer(16);
685
+ }
662
686
  };
663
687
 
664
688
  /**
665
689
  * @param {Uint8Array} buffer
666
- * @param {string} signature
667
- * @param {string} public_key
668
- * @returns {boolean}
669
- */
670
- module.exports.verify_signature = function(buffer, signature, public_key) {
671
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
672
- return ret !== 0;
673
- };
674
-
675
- /**
676
- * @param {number} major
677
- * @param {number} minor
678
- * @param {number} patch
690
+ * @param {bigint} peer_index
679
691
  * @returns {Promise<void>}
680
692
  */
681
- module.exports.set_wallet_version = function(major, minor, patch) {
682
- const ret = wasm.set_wallet_version(major, minor, patch);
693
+ module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
694
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
683
695
  return takeObject(ret);
684
696
  };
685
697
 
686
698
  /**
687
- * @param {bigint} threshold
688
- * @returns {Promise<void>}
699
+ * @returns {Promise<WasmBlockchain>}
689
700
  */
690
- module.exports.write_issuance_file = function(threshold) {
691
- const ret = wasm.write_issuance_file(threshold);
701
+ module.exports.get_blockchain = function() {
702
+ const ret = wasm.get_blockchain();
692
703
  return takeObject(ret);
693
704
  };
694
705
 
@@ -701,36 +712,33 @@ module.exports.get_next_peer_index = function() {
701
712
  };
702
713
 
703
714
  /**
704
- * @param {Uint8Array} buffer
705
- * @returns {string}
706
- */
707
- module.exports.hash = function(buffer) {
708
- const ret = wasm.hash(addHeapObject(buffer));
709
- return takeObject(ret);
710
- };
711
-
712
- /**
713
- * @param {string} config_json
714
- * @param {string} private_key
715
- * @param {number} log_level_num
716
- * @param {bigint} hasten_multiplier
717
- * @param {boolean} delete_old_blocks
718
- * @returns {Promise<any>}
715
+ * @param {Array<any>} keys
716
+ * @returns {Promise<WasmBalanceSnapshot>}
719
717
  */
720
- module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
721
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
718
+ module.exports.get_balance_snapshot = function(keys) {
719
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
722
720
  return takeObject(ret);
723
721
  };
724
722
 
725
723
  /**
726
724
  * @param {Uint8Array} buffer
727
- * @param {number} msg_index
728
- * @param {bigint} peer_index
729
- * @returns {Promise<void>}
725
+ * @param {string} private_key
726
+ * @returns {string}
730
727
  */
731
- module.exports.send_api_error = function(buffer, msg_index, peer_index) {
732
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
733
- return takeObject(ret);
728
+ module.exports.sign_buffer = function(buffer, private_key) {
729
+ try {
730
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
731
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
732
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
733
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
734
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
735
+ if (r2) {
736
+ throw takeObject(r1);
737
+ }
738
+ return takeObject(r0);
739
+ } finally {
740
+ wasm.__wbindgen_add_to_stack_pointer(16);
741
+ }
734
742
  };
735
743
 
736
744
  function handleError(f, args) {
@@ -740,15 +748,7 @@ function handleError(f, args) {
740
748
  wasm.__wbindgen_exn_store(addHeapObject(e));
741
749
  }
742
750
  }
743
-
744
- let stack_pointer = 128;
745
-
746
- function addBorrowedObject(obj) {
747
- if (stack_pointer == 1) throw new Error('out of js stack');
748
- heap[--stack_pointer] = obj;
749
- return stack_pointer;
750
- }
751
- function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
751
+ function __wbg_adapter_410(arg0, arg1, arg2, arg3) {
752
752
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
753
753
  }
754
754
 
@@ -1343,6 +1343,14 @@ class WasmBlockchain {
1343
1343
  return takeObject(ret);
1344
1344
  }
1345
1345
  /**
1346
+ * @param {string} utxokey_hex
1347
+ * @returns {Promise<boolean>}
1348
+ */
1349
+ is_slip_spendable(utxokey_hex) {
1350
+ const ret = wasm.wasmblockchain_is_slip_spendable(this.__wbg_ptr, addHeapObject(utxokey_hex));
1351
+ return takeObject(ret);
1352
+ }
1353
+ /**
1346
1354
  * @param {Function} reorg_cb
1347
1355
  * @param {Function} add_block_cb
1348
1356
  * @param {Function} confirm_cb
@@ -2102,6 +2110,14 @@ class WasmSlip {
2102
2110
  wasm.wasmslip_set_tx_ordinal(this.__wbg_ptr, ordinal);
2103
2111
  }
2104
2112
  /**
2113
+ * @param {string} key_hex
2114
+ * @returns {WasmSlip | undefined}
2115
+ */
2116
+ static parse_slip_from_utxokey(key_hex) {
2117
+ const ret = wasm.wasmslip_parse_slip_from_utxokey(addHeapObject(key_hex));
2118
+ return ret === 0 ? undefined : WasmSlip.__wrap(ret);
2119
+ }
2120
+ /**
2105
2121
  */
2106
2122
  constructor() {
2107
2123
  const ret = wasm.wasmslip_new();
@@ -2268,6 +2284,18 @@ class WasmTransaction {
2268
2284
  wasm.wasmtransaction_set_txs_replacements(this.__wbg_ptr, r);
2269
2285
  }
2270
2286
  /**
2287
+ * @returns {Uint8Array}
2288
+ */
2289
+ get_hash_for_signature() {
2290
+ const ret = wasm.wasmtransaction_get_hash_for_signature(this.__wbg_ptr);
2291
+ return takeObject(ret);
2292
+ }
2293
+ /**
2294
+ */
2295
+ generate_hash_for_signature() {
2296
+ wasm.wasmtransaction_generate_hash_for_signature(this.__wbg_ptr);
2297
+ }
2298
+ /**
2271
2299
  * @returns {Array<any>}
2272
2300
  */
2273
2301
  get to() {
@@ -2652,23 +2680,13 @@ class WasmWalletSlip {
2652
2680
  }
2653
2681
  module.exports.WasmWalletSlip = WasmWalletSlip;
2654
2682
 
2655
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
2656
- takeObject(arg0);
2657
- };
2658
-
2659
2683
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
2660
2684
  const ret = getStringFromWasm0(arg0, arg1);
2661
2685
  return addHeapObject(ret);
2662
2686
  };
2663
2687
 
2664
- module.exports.__wbg_wasmtransaction_new = function(arg0) {
2665
- const ret = WasmTransaction.__wrap(arg0);
2666
- return addHeapObject(ret);
2667
- };
2668
-
2669
- module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2670
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2671
- return addHeapObject(ret);
2688
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2689
+ takeObject(arg0);
2672
2690
  };
2673
2691
 
2674
2692
  module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
@@ -2676,21 +2694,6 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2676
2694
  return addHeapObject(ret);
2677
2695
  };
2678
2696
 
2679
- module.exports.__wbg_wasmnft_new = function(arg0) {
2680
- const ret = WasmNFT.__wrap(arg0);
2681
- return addHeapObject(ret);
2682
- };
2683
-
2684
- module.exports.__wbg_wasmblock_new = function(arg0) {
2685
- const ret = WasmBlock.__wrap(arg0);
2686
- return addHeapObject(ret);
2687
- };
2688
-
2689
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
2690
- const ret = getObject(arg0);
2691
- return addHeapObject(ret);
2692
- };
2693
-
2694
2697
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
2695
2698
  const obj = getObject(arg1);
2696
2699
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -2700,8 +2703,13 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
2700
2703
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2701
2704
  };
2702
2705
 
2703
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2704
- const ret = WasmPeer.__wrap(arg0);
2706
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2707
+ const ret = WasmTransaction.__wrap(arg0);
2708
+ return addHeapObject(ret);
2709
+ };
2710
+
2711
+ module.exports.__wbg_wasmnft_new = function(arg0) {
2712
+ const ret = WasmNFT.__wrap(arg0);
2705
2713
  return addHeapObject(ret);
2706
2714
  };
2707
2715
 
@@ -2710,13 +2718,13 @@ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2710
2718
  return addHeapObject(ret);
2711
2719
  };
2712
2720
 
2713
- module.exports.__wbg_wasmslip_new = function(arg0) {
2714
- const ret = WasmSlip.__wrap(arg0);
2721
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2722
+ const ret = WasmPeer.__wrap(arg0);
2715
2723
  return addHeapObject(ret);
2716
2724
  };
2717
2725
 
2718
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2719
- const ret = WasmWallet.__wrap(arg0);
2726
+ module.exports.__wbg_wasmblock_new = function(arg0) {
2727
+ const ret = WasmBlock.__wrap(arg0);
2720
2728
  return addHeapObject(ret);
2721
2729
  };
2722
2730
 
@@ -2725,18 +2733,23 @@ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2725
2733
  return addHeapObject(ret);
2726
2734
  };
2727
2735
 
2728
- module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2729
- const ret = WasmPeerService.__wrap(arg0);
2736
+ module.exports.__wbindgen_object_clone_ref = function(arg0) {
2737
+ const ret = getObject(arg0);
2730
2738
  return addHeapObject(ret);
2731
2739
  };
2732
2740
 
2733
- module.exports.__wbg_wasmhop_new = function(arg0) {
2734
- const ret = WasmHop.__wrap(arg0);
2741
+ module.exports.__wbg_wasmslip_new = function(arg0) {
2742
+ const ret = WasmSlip.__wrap(arg0);
2735
2743
  return addHeapObject(ret);
2736
2744
  };
2737
2745
 
2738
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
2739
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2746
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2747
+ const ret = WasmWallet.__wrap(arg0);
2748
+ return addHeapObject(ret);
2749
+ };
2750
+
2751
+ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2752
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2740
2753
  return addHeapObject(ret);
2741
2754
  };
2742
2755
 
@@ -2756,7 +2769,12 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
2756
2769
  return ret;
2757
2770
  };
2758
2771
 
2759
- module.exports.__wbg_flushdata_31d2c087e1642e7d = function(arg0, arg1) {
2772
+ module.exports.__wbg_wasmhop_new = function(arg0) {
2773
+ const ret = WasmHop.__wrap(arg0);
2774
+ return addHeapObject(ret);
2775
+ };
2776
+
2777
+ module.exports.__wbg_flushdata_d0071995637d9dca = function(arg0, arg1) {
2760
2778
  let deferred0_0;
2761
2779
  let deferred0_1;
2762
2780
  try {
@@ -2768,7 +2786,7 @@ module.exports.__wbg_flushdata_31d2c087e1642e7d = function(arg0, arg1) {
2768
2786
  }
2769
2787
  };
2770
2788
 
2771
- module.exports.__wbg_readvalue_8d065620fad540d3 = function() { return handleError(function (arg0, arg1) {
2789
+ module.exports.__wbg_readvalue_7f66bac15f2b1d9b = function() { return handleError(function (arg0, arg1) {
2772
2790
  let deferred0_0;
2773
2791
  let deferred0_1;
2774
2792
  try {
@@ -2781,15 +2799,15 @@ module.exports.__wbg_readvalue_8d065620fad540d3 = function() { return handleErro
2781
2799
  }
2782
2800
  }, arguments) };
2783
2801
 
2784
- module.exports.__wbg_loadwallet_b2c7c0fa442cbf65 = function() {
2802
+ module.exports.__wbg_loadwallet_6532e71a32ebe34a = function() {
2785
2803
  MsgHandler.load_wallet();
2786
2804
  };
2787
2805
 
2788
- module.exports.__wbg_savewallet_8ffd86ac6de7743c = function() {
2806
+ module.exports.__wbg_savewallet_c435deea2f8fe957 = function() {
2789
2807
  MsgHandler.save_wallet();
2790
2808
  };
2791
2809
 
2792
- module.exports.__wbg_writevalue_7d36c3a0011f6888 = function(arg0, arg1, arg2) {
2810
+ module.exports.__wbg_writevalue_3c113add4c7138d6 = function(arg0, arg1, arg2) {
2793
2811
  let deferred0_0;
2794
2812
  let deferred0_1;
2795
2813
  try {
@@ -2801,7 +2819,7 @@ module.exports.__wbg_writevalue_7d36c3a0011f6888 = function(arg0, arg1, arg2) {
2801
2819
  }
2802
2820
  };
2803
2821
 
2804
- module.exports.__wbg_appendvalue_9c7e734a5893fc55 = function(arg0, arg1, arg2) {
2822
+ module.exports.__wbg_appendvalue_66bca83dbfdae00f = function(arg0, arg1, arg2) {
2805
2823
  let deferred0_0;
2806
2824
  let deferred0_1;
2807
2825
  try {
@@ -2813,7 +2831,7 @@ module.exports.__wbg_appendvalue_9c7e734a5893fc55 = function(arg0, arg1, arg2) {
2813
2831
  }
2814
2832
  };
2815
2833
 
2816
- module.exports.__wbg_removevalue_227bcc904f295bd0 = function() { return handleError(function (arg0, arg1) {
2834
+ module.exports.__wbg_removevalue_e988da25f31f33f7 = function() { return handleError(function (arg0, arg1) {
2817
2835
  let deferred0_0;
2818
2836
  let deferred0_1;
2819
2837
  try {
@@ -2826,11 +2844,11 @@ module.exports.__wbg_removevalue_227bcc904f295bd0 = function() { return handleEr
2826
2844
  }
2827
2845
  }, arguments) };
2828
2846
 
2829
- module.exports.__wbg_sendmessage_cd344e9a3340f289 = function(arg0, arg1) {
2847
+ module.exports.__wbg_sendmessage_faf762a243036e23 = function(arg0, arg1) {
2830
2848
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2831
2849
  };
2832
2850
 
2833
- module.exports.__wbg_connecttopeer_16e7986091989ecf = function() { return handleError(function (arg0, arg1, arg2) {
2851
+ module.exports.__wbg_connecttopeer_1d02808ea8234cd0 = function() { return handleError(function (arg0, arg1, arg2) {
2834
2852
  let deferred0_0;
2835
2853
  let deferred0_1;
2836
2854
  try {
@@ -2843,14 +2861,14 @@ module.exports.__wbg_connecttopeer_16e7986091989ecf = function() { return handle
2843
2861
  }
2844
2862
  }, arguments) };
2845
2863
 
2846
- module.exports.__wbg_getmyservices_b806cf3d9852d311 = function() {
2864
+ module.exports.__wbg_getmyservices_f19adeeffe50a035 = function() {
2847
2865
  const ret = MsgHandler.get_my_services();
2848
2866
  _assertClass(ret, WasmPeerServiceList);
2849
2867
  var ptr1 = ret.__destroy_into_raw();
2850
2868
  return ptr1;
2851
2869
  };
2852
2870
 
2853
- module.exports.__wbg_isexistingfile_c062164dc13b389d = function() { return handleError(function (arg0, arg1) {
2871
+ module.exports.__wbg_isexistingfile_847c2977bc75bcb7 = function() { return handleError(function (arg0, arg1) {
2854
2872
  let deferred0_0;
2855
2873
  let deferred0_1;
2856
2874
  try {
@@ -2863,33 +2881,33 @@ module.exports.__wbg_isexistingfile_c062164dc13b389d = function() { return handl
2863
2881
  }
2864
2882
  }, arguments) };
2865
2883
 
2866
- module.exports.__wbg_processapicall_c2228580d601f805 = function(arg0, arg1, arg2) {
2884
+ module.exports.__wbg_processapicall_77c60bf695c62278 = function(arg0, arg1, arg2) {
2867
2885
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2868
2886
  };
2869
2887
 
2870
- module.exports.__wbg_processapierror_0cb5fae74370713b = function(arg0, arg1, arg2) {
2888
+ module.exports.__wbg_processapierror_4152ed10526d1e90 = function(arg0, arg1, arg2) {
2871
2889
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2872
2890
  };
2873
2891
 
2874
- module.exports.__wbg_processapisuccess_20585df4ae6a3084 = function(arg0, arg1, arg2) {
2892
+ module.exports.__wbg_processapisuccess_e31b2c1bbeda6850 = function(arg0, arg1, arg2) {
2875
2893
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2876
2894
  };
2877
2895
 
2878
- module.exports.__wbg_sendmessagetoall_8d207c0a3aad8a72 = function(arg0, arg1) {
2896
+ module.exports.__wbg_sendmessagetoall_23ec9ae3c65baa3b = function(arg0, arg1) {
2879
2897
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2880
2898
  };
2881
2899
 
2882
- module.exports.__wbg_disconnectfrompeer_038b8dc66715b3af = function() { return handleError(function (arg0) {
2900
+ module.exports.__wbg_disconnectfrompeer_64a207462fb9170f = function() { return handleError(function (arg0) {
2883
2901
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2884
2902
  return addHeapObject(ret);
2885
2903
  }, arguments) };
2886
2904
 
2887
- module.exports.__wbg_loadblockfilelist_ddddc432935846b1 = function() { return handleError(function () {
2905
+ module.exports.__wbg_loadblockfilelist_de5306e2fa167e2f = function() { return handleError(function () {
2888
2906
  const ret = MsgHandler.load_block_file_list();
2889
2907
  return addHeapObject(ret);
2890
2908
  }, arguments) };
2891
2909
 
2892
- module.exports.__wbg_sendinterfaceevent_b3ac2596012c70b8 = function(arg0, arg1, arg2, arg3, arg4) {
2910
+ module.exports.__wbg_sendinterfaceevent_52637a4231d38f0c = function(arg0, arg1, arg2, arg3, arg4) {
2893
2911
  let deferred0_0;
2894
2912
  let deferred0_1;
2895
2913
  let deferred1_0;
@@ -2906,7 +2924,7 @@ module.exports.__wbg_sendinterfaceevent_b3ac2596012c70b8 = function(arg0, arg1,
2906
2924
  }
2907
2925
  };
2908
2926
 
2909
- module.exports.__wbg_sendblocksuccess_aa77d9dead690b65 = function(arg0, arg1, arg2) {
2927
+ module.exports.__wbg_sendblocksuccess_037e59183e3f8fc8 = function(arg0, arg1, arg2) {
2910
2928
  let deferred0_0;
2911
2929
  let deferred0_1;
2912
2930
  try {
@@ -2918,11 +2936,11 @@ module.exports.__wbg_sendblocksuccess_aa77d9dead690b65 = function(arg0, arg1, ar
2918
2936
  }
2919
2937
  };
2920
2938
 
2921
- module.exports.__wbg_sendwalletupdate_35c6568561a24666 = function() {
2939
+ module.exports.__wbg_sendwalletupdate_203090048ea64a43 = function() {
2922
2940
  MsgHandler.send_wallet_update();
2923
2941
  };
2924
2942
 
2925
- module.exports.__wbg_sendnewversionalert_0046b47daaccee8c = function(arg0, arg1, arg2) {
2943
+ module.exports.__wbg_sendnewversionalert_90ec60877849aec0 = function(arg0, arg1, arg2) {
2926
2944
  let deferred0_0;
2927
2945
  let deferred0_1;
2928
2946
  try {
@@ -2934,15 +2952,15 @@ module.exports.__wbg_sendnewversionalert_0046b47daaccee8c = function(arg0, arg1,
2934
2952
  }
2935
2953
  };
2936
2954
 
2937
- module.exports.__wbg_sendblockfetchstatusevent_ba790c923d8851df = function(arg0) {
2955
+ module.exports.__wbg_sendblockfetchstatusevent_d5e8d4d7fce58f7e = function(arg0) {
2938
2956
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2939
2957
  };
2940
2958
 
2941
- module.exports.__wbg_sendnewchaindetectedevent_ba661f60b624e9c7 = function() {
2959
+ module.exports.__wbg_sendnewchaindetectedevent_7f3a6efc2e389a50 = function() {
2942
2960
  MsgHandler.send_new_chain_detected_event();
2943
2961
  };
2944
2962
 
2945
- module.exports.__wbg_fetchblockfrompeer_d143d80f117d06f4 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2963
+ module.exports.__wbg_fetchblockfrompeer_09517f5c7d00dcb1 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2946
2964
  let deferred0_0;
2947
2965
  let deferred0_1;
2948
2966
  try {
@@ -2955,7 +2973,7 @@ module.exports.__wbg_fetchblockfrompeer_d143d80f117d06f4 = function() { return h
2955
2973
  }
2956
2974
  }, arguments) };
2957
2975
 
2958
- module.exports.__wbg_ensuredirectoryexists_617323f95264e9c1 = function() { return handleError(function (arg0, arg1) {
2976
+ module.exports.__wbg_ensuredirectoryexists_05a10b0b56f6d6e7 = function() { return handleError(function (arg0, arg1) {
2959
2977
  let deferred0_0;
2960
2978
  let deferred0_1;
2961
2979
  try {
@@ -2967,6 +2985,16 @@ module.exports.__wbg_ensuredirectoryexists_617323f95264e9c1 = function() { retur
2967
2985
  }
2968
2986
  }, arguments) };
2969
2987
 
2988
+ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2989
+ const ret = WasmPeerService.__wrap(arg0);
2990
+ return addHeapObject(ret);
2991
+ };
2992
+
2993
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
2994
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2995
+ return addHeapObject(ret);
2996
+ };
2997
+
2970
2998
  module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2971
2999
  const ret = getObject(arg0) == getObject(arg1);
2972
3000
  return ret;
@@ -3269,7 +3297,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
3269
3297
  const a = state0.a;
3270
3298
  state0.a = 0;
3271
3299
  try {
3272
- return __wbg_adapter_406(a, state0.b, arg0, arg1);
3300
+ return __wbg_adapter_410(a, state0.b, arg0, arg1);
3273
3301
  } finally {
3274
3302
  state0.a = a;
3275
3303
  }
@@ -3343,8 +3371,8 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
3343
3371
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3344
3372
  };
3345
3373
 
3346
- module.exports.__wbindgen_closure_wrapper1554 = function(arg0, arg1, arg2) {
3347
- const ret = makeMutClosure(arg0, arg1, 572, __wbg_adapter_38);
3374
+ module.exports.__wbindgen_closure_wrapper1558 = function(arg0, arg1, arg2) {
3375
+ const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
3348
3376
  return addHeapObject(ret);
3349
3377
  };
3350
3378