saito-wasm 0.2.169 → 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-ac621af49b696a83/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
239
- * @returns {string}
247
+ * @param {number} msg_index
248
+ * @param {bigint} peer_index
249
+ * @returns {Promise<void>}
240
250
  */
241
- module.exports.hash = function(buffer) {
242
- const ret = wasm.hash(addHeapObject(buffer));
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);
243
253
  return takeObject(ret);
244
254
  };
245
255
 
246
256
  /**
247
- * @param {bigint} threshold
257
+ * @param {Uint8Array} hash
258
+ * @param {bigint} block_id
259
+ * @param {bigint} peer_index
248
260
  * @returns {Promise<void>}
249
261
  */
250
- module.exports.write_issuance_file = function(threshold) {
251
- const ret = wasm.write_issuance_file(threshold);
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);
252
264
  return takeObject(ret);
253
265
  };
254
266
 
255
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
+
276
+ /**
277
+ * @param {Uint8Array} buffer
278
+ * @param {number} msg_index
256
279
  * @param {bigint} peer_index
257
280
  * @returns {Promise<void>}
258
281
  */
259
- module.exports.process_peer_disconnection = function(peer_index) {
260
- const ret = wasm.process_peer_disconnection(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);
261
284
  return takeObject(ret);
262
285
  };
263
286
 
264
287
  /**
265
- * @returns {Promise<string>}
288
+ * @returns {Promise<void>}
266
289
  */
267
- module.exports.get_peer_stats = function() {
268
- const ret = wasm.get_peer_stats();
290
+ module.exports.disable_producing_blocks_by_timer = function() {
291
+ const ret = wasm.disable_producing_blocks_by_timer();
269
292
  return takeObject(ret);
270
293
  };
271
294
 
272
295
  /**
273
- * @param {bigint} num
274
- * @param {bigint} deposit
275
- * @param {Uint8Array} tx_msg
296
+ * @param {Array<any>} public_keys
297
+ * @param {BigUint64Array} amounts
276
298
  * @param {bigint} fee
277
- * @param {string} recipient_public_key
278
- * @param {string} nft_type
299
+ * @param {boolean} _force_merge
279
300
  * @returns {Promise<WasmTransaction>}
280
301
  */
281
- module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
282
- const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
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);
283
304
  return takeObject(ret);
284
305
  };
285
306
 
286
307
  /**
287
- * @param {WasmTransaction} tx
288
- * @returns {Promise<void>}
308
+ * @param {bigint} peer_index
309
+ * @returns {Promise<WasmPeer | undefined>}
289
310
  */
290
- module.exports.propagate_transaction = function(tx) {
291
- _assertClass(tx, WasmTransaction);
292
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
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,209 +324,199 @@ module.exports.process_stun_peer = function(peer_index, public_key) {
304
324
  };
305
325
 
306
326
  /**
307
- * @param {Array<any>} public_keys
308
- * @param {BigUint64Array} amounts
327
+ * @param {bigint} num
328
+ * @param {bigint} deposit
329
+ * @param {Uint8Array} tx_msg
309
330
  * @param {bigint} fee
310
- * @param {boolean} _force_merge
331
+ * @param {string} recipient_public_key
332
+ * @param {string} nft_type
311
333
  * @returns {Promise<WasmTransaction>}
312
334
  */
313
- module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
314
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
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));
315
337
  return takeObject(ret);
316
338
  };
317
339
 
318
340
  /**
319
- * @param {Uint8Array} hash
320
- * @param {bigint} block_id
321
- * @param {bigint} peer_index
341
+ * @param {number} major
342
+ * @param {number} minor
343
+ * @param {number} patch
322
344
  * @returns {Promise<void>}
323
345
  */
324
- module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
325
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
346
+ module.exports.set_wallet_version = function(major, minor, patch) {
347
+ const ret = wasm.set_wallet_version(major, minor, patch);
326
348
  return takeObject(ret);
327
349
  };
328
350
 
329
351
  /**
330
- * @param {string} private_key
331
- * @returns {string}
352
+ * @param {bigint} threshold
353
+ * @returns {Promise<void>}
332
354
  */
333
- module.exports.generate_public_key = function(private_key) {
334
- try {
335
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
336
- wasm.generate_public_key(retptr, addHeapObject(private_key));
337
- var r0 = getInt32Memory0()[retptr / 4 + 0];
338
- var r1 = getInt32Memory0()[retptr / 4 + 1];
339
- var r2 = getInt32Memory0()[retptr / 4 + 2];
340
- if (r2) {
341
- throw takeObject(r1);
342
- }
343
- return takeObject(r0);
344
- } finally {
345
- wasm.__wbindgen_add_to_stack_pointer(16);
346
- }
355
+ module.exports.write_issuance_file = function(threshold) {
356
+ const ret = wasm.write_issuance_file(threshold);
357
+ return takeObject(ret);
347
358
  };
348
359
 
349
360
  /**
350
- * @param {string} key
351
- * @returns {boolean}
361
+ * @param {Uint8Array} buffer
362
+ * @returns {string}
352
363
  */
353
- module.exports.is_valid_public_key = function(key) {
354
- const ret = wasm.is_valid_public_key(addHeapObject(key));
355
- return ret !== 0;
364
+ module.exports.hash = function(buffer) {
365
+ const ret = wasm.hash(addHeapObject(buffer));
366
+ return takeObject(ret);
356
367
  };
357
368
 
358
369
  /**
359
- * @returns {Promise<Array<any>>}
370
+ * @returns {Promise<string>}
360
371
  */
361
- module.exports.get_nft_list = function() {
362
- const ret = wasm.get_nft_list();
372
+ module.exports.get_congestion_stats = function() {
373
+ const ret = wasm.get_congestion_stats();
363
374
  return takeObject(ret);
364
375
  };
365
376
 
366
377
  /**
367
- * @returns {Promise<WasmBlockchain>}
378
+ * @param {string} slip1_utxo_key
379
+ * @param {string} slip2_utxo_key
380
+ * @param {string} slip3_utxo_key
381
+ * @param {number} left_count
382
+ * @param {number} right_count
383
+ * @param {Uint8Array} tx_msg
384
+ * @returns {Promise<WasmTransaction>}
368
385
  */
369
- module.exports.get_blockchain = function() {
370
- const ret = wasm.get_blockchain();
386
+ module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
387
+ 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));
371
388
  return takeObject(ret);
372
389
  };
373
390
 
374
391
  /**
375
- * @param {Uint8Array} buffer
376
- * @param {number} msg_index
377
- * @param {bigint} peer_index
378
- * @returns {Promise<void>}
392
+ * @param {string} public_key
393
+ * @param {bigint} amount
394
+ * @param {bigint} fee
395
+ * @param {boolean} force_merge
396
+ * @returns {Promise<WasmTransaction>}
379
397
  */
380
- module.exports.send_api_call = function(buffer, msg_index, peer_index) {
381
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
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);
382
400
  return takeObject(ret);
383
401
  };
384
402
 
385
403
  /**
386
- * @param {bigint} peer_index
387
- * @returns {Promise<void>}
404
+ * @param {Uint8Array} buffer
405
+ * @param {string} signature
406
+ * @param {string} public_key
407
+ * @returns {boolean}
388
408
  */
389
- module.exports.remove_stun_peer = function(peer_index) {
390
- const ret = wasm.remove_stun_peer(peer_index);
391
- return takeObject(ret);
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;
392
412
  };
393
413
 
394
414
  /**
395
- * @param {bigint} duration_in_ms
396
- * @returns {Promise<void>}
415
+ * @param {string} nft_id_hex
416
+ * @param {Uint8Array} tx_msg
417
+ * @returns {Promise<WasmTransaction>}
397
418
  */
398
- module.exports.process_timer_event = function(duration_in_ms) {
399
- const ret = wasm.process_timer_event(duration_in_ms);
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));
400
423
  return takeObject(ret);
401
424
  };
402
425
 
403
426
  /**
404
- * @param {bigint} peer_index
405
- * @param {string} ip
406
- * @returns {Promise<void>}
427
+ * @param {string} block_hash
428
+ * @returns {Promise<WasmBlock>}
407
429
  */
408
- module.exports.process_new_peer = function(peer_index, ip) {
409
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
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
- * @param {WasmBalanceSnapshot} snapshot
436
+ * @param {Uint8Array} buffer
437
+ * @param {Uint8Array} hash
438
+ * @param {bigint} block_id
439
+ * @param {bigint} peer_index
415
440
  * @returns {Promise<void>}
416
441
  */
417
- module.exports.update_from_balance_snapshot = function(snapshot) {
418
- _assertClass(snapshot, WasmBalanceSnapshot);
419
- var ptr0 = snapshot.__destroy_into_raw();
420
- const ret = wasm.update_from_balance_snapshot(ptr0);
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);
421
444
  return takeObject(ret);
422
445
  };
423
446
 
424
447
  /**
425
- * @param {Array<any>} keys
426
- * @returns {Promise<WasmBalanceSnapshot>}
448
+ * @returns {Promise<string>}
427
449
  */
428
- module.exports.get_balance_snapshot = function(keys) {
429
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
450
+ module.exports.get_peer_stats = function() {
451
+ const ret = wasm.get_peer_stats();
430
452
  return takeObject(ret);
431
453
  };
432
454
 
433
455
  /**
434
- * @returns {Promise<string>}
456
+ * @returns {Promise<Array<any>>}
435
457
  */
436
- module.exports.get_stats = function() {
437
- const ret = wasm.get_stats();
458
+ module.exports.get_nft_list = function() {
459
+ const ret = wasm.get_nft_list();
438
460
  return takeObject(ret);
439
461
  };
440
462
 
441
463
  /**
464
+ * @param {string} public_key
442
465
  * @returns {Promise<Array<any>>}
443
466
  */
444
- module.exports.get_mempool_txs = function() {
445
- const ret = wasm.get_mempool_txs();
467
+ module.exports.get_account_slips = function(public_key) {
468
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
446
469
  return takeObject(ret);
447
470
  };
448
471
 
449
472
  /**
450
- * @returns {Promise<any>}
473
+ * @param {bigint} duration_in_ms
474
+ * @returns {Promise<void>}
451
475
  */
452
- module.exports.get_confirmations = function() {
453
- const ret = wasm.get_confirmations();
476
+ module.exports.process_timer_event = function(duration_in_ms) {
477
+ const ret = wasm.process_timer_event(duration_in_ms);
454
478
  return takeObject(ret);
455
479
  };
456
480
 
457
481
  /**
458
- * @returns {string}
482
+ * @returns {Promise<string>}
459
483
  */
460
- module.exports.generate_private_key = function() {
461
- const ret = wasm.generate_private_key();
484
+ module.exports.get_latest_block_hash = function() {
485
+ const ret = wasm.get_latest_block_hash();
462
486
  return takeObject(ret);
463
487
  };
464
488
 
465
489
  /**
466
- * @param {Uint8Array} buffer
467
- * @param {number} msg_index
468
490
  * @param {bigint} peer_index
469
491
  * @returns {Promise<void>}
470
492
  */
471
- module.exports.send_api_error = function(buffer, msg_index, peer_index) {
472
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
493
+ module.exports.remove_stun_peer = function(peer_index) {
494
+ const ret = wasm.remove_stun_peer(peer_index);
473
495
  return takeObject(ret);
474
496
  };
475
497
 
476
498
  /**
477
499
  * @param {bigint} peer_index
478
- * @returns {Promise<WasmPeer | undefined>}
479
- */
480
- module.exports.get_peer = function(peer_index) {
481
- const ret = wasm.get_peer(peer_index);
482
- return takeObject(ret);
483
- };
484
-
485
- /**
486
500
  * @returns {Promise<void>}
487
501
  */
488
- module.exports.start_from_received_ghost_chain = function() {
489
- const ret = wasm.start_from_received_ghost_chain();
502
+ module.exports.process_peer_disconnection = function(peer_index) {
503
+ const ret = wasm.process_peer_disconnection(peer_index);
490
504
  return takeObject(ret);
491
505
  };
492
506
 
493
507
  /**
494
- * @returns {Promise<void>}
508
+ * @returns {Promise<string>}
495
509
  */
496
- module.exports.disable_producing_blocks_by_timer = function() {
497
- const ret = wasm.disable_producing_blocks_by_timer();
510
+ module.exports.get_stats = function() {
511
+ const ret = wasm.get_stats();
498
512
  return takeObject(ret);
499
513
  };
500
514
 
501
515
  /**
502
- * @param {string} nft_id_hex
503
- * @param {Uint8Array} tx_msg
504
- * @returns {Promise<WasmTransaction>}
516
+ * @returns {Promise<boolean>}
505
517
  */
506
- module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
507
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
508
- const len0 = WASM_VECTOR_LEN;
509
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
518
+ module.exports.produce_block_with_gt = function() {
519
+ const ret = wasm.produce_block_with_gt();
510
520
  return takeObject(ret);
511
521
  };
512
522
 
@@ -524,65 +534,19 @@ module.exports.initialize = function(config_json, private_key, log_level_num, ha
524
534
  };
525
535
 
526
536
  /**
527
- * @param {Uint8Array} buffer
528
- * @param {string} signature
529
- * @param {string} public_key
530
- * @returns {boolean}
531
- */
532
- module.exports.verify_signature = function(buffer, signature, public_key) {
533
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
534
- return ret !== 0;
535
- };
536
-
537
- /**
538
- * @param {string} public_key
539
- * @returns {Promise<Array<any>>}
540
- */
541
- module.exports.get_account_slips = function(public_key) {
542
- const ret = wasm.get_account_slips(addHeapObject(public_key));
543
- return takeObject(ret);
544
- };
545
-
546
- /**
547
- * @param {string} block_hash
548
- * @returns {Promise<WasmBlock>}
549
- */
550
- module.exports.get_block = function(block_hash) {
551
- const ret = wasm.get_block(addHeapObject(block_hash));
552
- return takeObject(ret);
553
- };
554
-
555
- /**
556
- * @param {string} public_key
557
- * @param {bigint} amount
558
- * @param {bigint} fee
559
- * @param {boolean} force_merge
560
- * @returns {Promise<WasmTransaction>}
561
- */
562
- module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
563
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
564
- return takeObject(ret);
565
- };
566
-
567
- /**
568
- * @param {Uint8Array} buffer
569
- * @param {string} private_key
570
537
  * @returns {string}
571
538
  */
572
- module.exports.sign_buffer = function(buffer, private_key) {
573
- try {
574
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
575
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
576
- var r0 = getInt32Memory0()[retptr / 4 + 0];
577
- var r1 = getInt32Memory0()[retptr / 4 + 1];
578
- var r2 = getInt32Memory0()[retptr / 4 + 2];
579
- if (r2) {
580
- throw takeObject(r1);
581
- }
582
- return takeObject(r0);
583
- } finally {
584
- wasm.__wbindgen_add_to_stack_pointer(16);
585
- }
539
+ module.exports.generate_private_key = function() {
540
+ const ret = wasm.generate_private_key();
541
+ return takeObject(ret);
542
+ };
543
+
544
+ /**
545
+ * @returns {Promise<Array<any>>}
546
+ */
547
+ module.exports.get_mempool_txs = function() {
548
+ const ret = wasm.get_mempool_txs();
549
+ return takeObject(ret);
586
550
  };
587
551
 
588
552
  /**
@@ -595,20 +559,20 @@ module.exports.process_stat_interval = function(current_time) {
595
559
  };
596
560
 
597
561
  /**
598
- * @returns {Promise<WasmWallet>}
562
+ * @returns {Promise<boolean>}
599
563
  */
600
- module.exports.get_wallet = function() {
601
- const ret = wasm.get_wallet();
564
+ module.exports.produce_block_without_gt = function() {
565
+ const ret = wasm.produce_block_without_gt();
602
566
  return takeObject(ret);
603
567
  };
604
568
 
605
569
  /**
606
- * @param {Uint8Array} buffer
607
- * @param {bigint} peer_index
570
+ * @param {WasmTransaction} tx
608
571
  * @returns {Promise<void>}
609
572
  */
610
- module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
611
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
573
+ module.exports.propagate_transaction = function(tx) {
574
+ _assertClass(tx, WasmTransaction);
575
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
612
576
  return takeObject(ret);
613
577
  };
614
578
 
@@ -618,35 +582,43 @@ module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
618
582
  * @param {bigint} peer_index
619
583
  * @returns {Promise<void>}
620
584
  */
621
- module.exports.send_api_success = function(buffer, msg_index, peer_index) {
622
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
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);
623
587
  return takeObject(ret);
624
588
  };
625
589
 
626
590
  /**
627
- * @param {string} slip1_utxo_key
628
- * @param {string} slip2_utxo_key
629
- * @param {string} slip3_utxo_key
630
- * @returns {Promise<WasmTransaction>}
591
+ * @param {WasmBalanceSnapshot} snapshot
592
+ * @returns {Promise<void>}
631
593
  */
632
- module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
633
- const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
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);
634
598
  return takeObject(ret);
635
599
  };
636
600
 
637
601
  /**
638
- * @returns {Promise<string>}
602
+ * @param {bigint} peer_index
603
+ * @param {string} ip
604
+ * @returns {Promise<void>}
639
605
  */
640
- module.exports.get_congestion_stats = function() {
641
- const ret = wasm.get_congestion_stats();
606
+ module.exports.process_new_peer = function(peer_index, ip) {
607
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
642
608
  return takeObject(ret);
643
609
  };
644
610
 
645
611
  /**
646
- * @returns {Promise<boolean>}
612
+ * @param {bigint} amt
613
+ * @param {string} slip1_utxo_key
614
+ * @param {string} slip2_utxo_key
615
+ * @param {string} slip3_utxo_key
616
+ * @param {string} recipient_public_key
617
+ * @param {Uint8Array} tx_msg
618
+ * @returns {Promise<WasmTransaction>}
647
619
  */
648
- module.exports.produce_block_with_gt = function() {
649
- const ret = wasm.produce_block_with_gt();
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));
650
622
  return takeObject(ret);
651
623
  };
652
624
 
@@ -659,41 +631,75 @@ module.exports.get_peers = function() {
659
631
  };
660
632
 
661
633
  /**
662
- * @param {number} major
663
- * @param {number} minor
664
- * @param {number} patch
665
634
  * @returns {Promise<void>}
666
635
  */
667
- module.exports.set_wallet_version = function(major, minor, patch) {
668
- const ret = wasm.set_wallet_version(major, minor, patch);
636
+ module.exports.start_from_received_ghost_chain = function() {
637
+ const ret = wasm.start_from_received_ghost_chain();
669
638
  return takeObject(ret);
670
639
  };
671
640
 
672
641
  /**
673
- * @returns {Promise<boolean>}
642
+ * @returns {Promise<any>}
674
643
  */
675
- module.exports.produce_block_without_gt = function() {
676
- const ret = wasm.produce_block_without_gt();
644
+ module.exports.get_confirmations = function() {
645
+ const ret = wasm.get_confirmations();
677
646
  return takeObject(ret);
678
647
  };
679
648
 
680
649
  /**
681
- * @returns {Promise<string>}
650
+ * @param {string} slip1_utxo_key
651
+ * @param {string} slip2_utxo_key
652
+ * @param {string} slip3_utxo_key
653
+ * @returns {Promise<WasmTransaction>}
682
654
  */
683
- module.exports.get_latest_block_hash = function() {
684
- const ret = wasm.get_latest_block_hash();
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));
657
+ return takeObject(ret);
658
+ };
659
+
660
+ /**
661
+ * @returns {Promise<WasmWallet>}
662
+ */
663
+ module.exports.get_wallet = function() {
664
+ const ret = wasm.get_wallet();
685
665
  return takeObject(ret);
686
666
  };
687
667
 
668
+ /**
669
+ * @param {string} private_key
670
+ * @returns {string}
671
+ */
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
+ }
686
+ };
687
+
688
688
  /**
689
689
  * @param {Uint8Array} buffer
690
- * @param {Uint8Array} hash
691
- * @param {bigint} block_id
692
690
  * @param {bigint} peer_index
693
691
  * @returns {Promise<void>}
694
692
  */
695
- module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
696
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
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);
695
+ return takeObject(ret);
696
+ };
697
+
698
+ /**
699
+ * @returns {Promise<WasmBlockchain>}
700
+ */
701
+ module.exports.get_blockchain = function() {
702
+ const ret = wasm.get_blockchain();
697
703
  return takeObject(ret);
698
704
  };
699
705
 
@@ -706,31 +712,33 @@ module.exports.get_next_peer_index = function() {
706
712
  };
707
713
 
708
714
  /**
709
- * @param {string} slip1_utxo_key
710
- * @param {string} slip2_utxo_key
711
- * @param {string} slip3_utxo_key
712
- * @param {number} left_count
713
- * @param {number} right_count
714
- * @param {Uint8Array} tx_msg
715
- * @returns {Promise<WasmTransaction>}
715
+ * @param {Array<any>} keys
716
+ * @returns {Promise<WasmBalanceSnapshot>}
716
717
  */
717
- module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
718
- 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));
718
+ module.exports.get_balance_snapshot = function(keys) {
719
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
719
720
  return takeObject(ret);
720
721
  };
721
722
 
722
723
  /**
723
- * @param {bigint} amt
724
- * @param {string} slip1_utxo_key
725
- * @param {string} slip2_utxo_key
726
- * @param {string} slip3_utxo_key
727
- * @param {string} recipient_public_key
728
- * @param {Uint8Array} tx_msg
729
- * @returns {Promise<WasmTransaction>}
724
+ * @param {Uint8Array} buffer
725
+ * @param {string} private_key
726
+ * @returns {string}
730
727
  */
731
- module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
732
- 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));
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,22 +2680,17 @@ 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);
2688
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2689
+ takeObject(arg0);
2667
2690
  };
2668
2691
 
2669
- module.exports.__wbg_wasmnft_new = function(arg0) {
2670
- const ret = WasmNFT.__wrap(arg0);
2692
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2693
+ const ret = BigInt.asUintN(64, arg0);
2671
2694
  return addHeapObject(ret);
2672
2695
  };
2673
2696
 
@@ -2680,33 +2703,33 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
2680
2703
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2681
2704
  };
2682
2705
 
2683
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2684
- const ret = WasmPeer.__wrap(arg0);
2706
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2707
+ const ret = WasmTransaction.__wrap(arg0);
2685
2708
  return addHeapObject(ret);
2686
2709
  };
2687
2710
 
2688
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2689
- const ret = BigInt.asUintN(64, arg0);
2711
+ module.exports.__wbg_wasmnft_new = function(arg0) {
2712
+ const ret = WasmNFT.__wrap(arg0);
2690
2713
  return addHeapObject(ret);
2691
2714
  };
2692
2715
 
2693
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2694
- const ret = WasmWallet.__wrap(arg0);
2716
+ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2717
+ const ret = WasmWalletSlip.__wrap(arg0);
2695
2718
  return addHeapObject(ret);
2696
2719
  };
2697
2720
 
2698
- module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2699
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2721
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2722
+ const ret = WasmPeer.__wrap(arg0);
2700
2723
  return addHeapObject(ret);
2701
2724
  };
2702
2725
 
2703
- module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2704
- const ret = WasmWalletSlip.__wrap(arg0);
2726
+ module.exports.__wbg_wasmblock_new = function(arg0) {
2727
+ const ret = WasmBlock.__wrap(arg0);
2705
2728
  return addHeapObject(ret);
2706
2729
  };
2707
2730
 
2708
- module.exports.__wbg_wasmblock_new = function(arg0) {
2709
- const ret = WasmBlock.__wrap(arg0);
2731
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2732
+ const ret = WasmBlockchain.__wrap(arg0);
2710
2733
  return addHeapObject(ret);
2711
2734
  };
2712
2735
 
@@ -2720,23 +2743,13 @@ module.exports.__wbg_wasmslip_new = function(arg0) {
2720
2743
  return addHeapObject(ret);
2721
2744
  };
2722
2745
 
2723
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2724
- const ret = WasmBlockchain.__wrap(arg0);
2725
- return addHeapObject(ret);
2726
- };
2727
-
2728
- module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2729
- const ret = WasmPeerService.__wrap(arg0);
2730
- return addHeapObject(ret);
2731
- };
2732
-
2733
- module.exports.__wbg_wasmhop_new = function(arg0) {
2734
- const ret = WasmHop.__wrap(arg0);
2746
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2747
+ const ret = WasmWallet.__wrap(arg0);
2735
2748
  return addHeapObject(ret);
2736
2749
  };
2737
2750
 
2738
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
2739
- const ret = new Error(getStringFromWasm0(arg0, arg1));
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_571e46cce4f70e72 = 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_571e46cce4f70e72 = function(arg0, arg1) {
2768
2786
  }
2769
2787
  };
2770
2788
 
2771
- module.exports.__wbg_readvalue_0023aabd3b029c28 = 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_0023aabd3b029c28 = function() { return handleErro
2781
2799
  }
2782
2800
  }, arguments) };
2783
2801
 
2784
- module.exports.__wbg_loadwallet_c7d36edfd9b3141c = function() {
2802
+ module.exports.__wbg_loadwallet_6532e71a32ebe34a = function() {
2785
2803
  MsgHandler.load_wallet();
2786
2804
  };
2787
2805
 
2788
- module.exports.__wbg_savewallet_7f660732fea84939 = function() {
2806
+ module.exports.__wbg_savewallet_c435deea2f8fe957 = function() {
2789
2807
  MsgHandler.save_wallet();
2790
2808
  };
2791
2809
 
2792
- module.exports.__wbg_writevalue_a37456c36a13f7c1 = 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_a37456c36a13f7c1 = function(arg0, arg1, arg2) {
2801
2819
  }
2802
2820
  };
2803
2821
 
2804
- module.exports.__wbg_appendvalue_5e41b908bebdda6f = 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_5e41b908bebdda6f = function(arg0, arg1, arg2) {
2813
2831
  }
2814
2832
  };
2815
2833
 
2816
- module.exports.__wbg_removevalue_942827cd11acedcd = 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_942827cd11acedcd = function() { return handleEr
2826
2844
  }
2827
2845
  }, arguments) };
2828
2846
 
2829
- module.exports.__wbg_sendmessage_586a19ec4082b8fb = 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_da5cf59d8cfa1695 = 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_da5cf59d8cfa1695 = function() { return handle
2843
2861
  }
2844
2862
  }, arguments) };
2845
2863
 
2846
- module.exports.__wbg_getmyservices_4cd3d2838160a2e4 = 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_dfbccf2cbef6e84d = 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_dfbccf2cbef6e84d = function() { return handl
2863
2881
  }
2864
2882
  }, arguments) };
2865
2883
 
2866
- module.exports.__wbg_processapicall_acd7d33fd42c3d1f = 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_ab72949eda06b691 = 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_961e9892246de79c = 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_11e5fcfef1b07a13 = 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_5c175d44122eb2c6 = 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_b7839cc4defb38f4 = 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_a6e7d41837b235e5 = 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_a6e7d41837b235e5 = function(arg0, arg1,
2906
2924
  }
2907
2925
  };
2908
2926
 
2909
- module.exports.__wbg_sendblocksuccess_3b8aec2ff636f96a = 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_3b8aec2ff636f96a = function(arg0, arg1, ar
2918
2936
  }
2919
2937
  };
2920
2938
 
2921
- module.exports.__wbg_sendwalletupdate_7adec123401b1a23 = function() {
2939
+ module.exports.__wbg_sendwalletupdate_203090048ea64a43 = function() {
2922
2940
  MsgHandler.send_wallet_update();
2923
2941
  };
2924
2942
 
2925
- module.exports.__wbg_sendnewversionalert_a07a565734d2fc1d = 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_a07a565734d2fc1d = function(arg0, arg1,
2934
2952
  }
2935
2953
  };
2936
2954
 
2937
- module.exports.__wbg_sendblockfetchstatusevent_1d40c9cc7dd2eab0 = 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_32e1d671ab68b024 = 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_8c4ed4e20aed0348 = 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_8c4ed4e20aed0348 = function() { return h
2955
2973
  }
2956
2974
  }, arguments) };
2957
2975
 
2958
- module.exports.__wbg_ensuredirectoryexists_9661b66ed6842ef4 = 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_9661b66ed6842ef4 = 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