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/web/index.js CHANGED
@@ -1,27 +1,7 @@
1
- import { MsgHandler } from './snippets/saito-wasm-ac621af49b696a83/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-d893e173c1089dfc/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
5
- const heap = new Array(128).fill(undefined);
6
-
7
- heap.push(undefined, null, true, false);
8
-
9
- function getObject(idx) { return heap[idx]; }
10
-
11
- let heap_next = heap.length;
12
-
13
- function dropObject(idx) {
14
- if (idx < 132) return;
15
- heap[idx] = heap_next;
16
- heap_next = idx;
17
- }
18
-
19
- function takeObject(idx) {
20
- const ret = getObject(idx);
21
- dropObject(idx);
22
- return ret;
23
- }
24
-
25
5
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
26
6
 
27
7
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -40,6 +20,12 @@ function getStringFromWasm0(ptr, len) {
40
20
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
41
21
  }
42
22
 
23
+ const heap = new Array(128).fill(undefined);
24
+
25
+ heap.push(undefined, null, true, false);
26
+
27
+ let heap_next = heap.length;
28
+
43
29
  function addHeapObject(obj) {
44
30
  if (heap_next === heap.length) heap.push(heap.length + 1);
45
31
  const idx = heap_next;
@@ -49,6 +35,20 @@ function addHeapObject(obj) {
49
35
  return idx;
50
36
  }
51
37
 
38
+ function getObject(idx) { return heap[idx]; }
39
+
40
+ function dropObject(idx) {
41
+ if (idx < 132) return;
42
+ heap[idx] = heap_next;
43
+ heap_next = idx;
44
+ }
45
+
46
+ function takeObject(idx) {
47
+ const ret = getObject(idx);
48
+ dropObject(idx);
49
+ return ret;
50
+ }
51
+
52
52
  let WASM_VECTOR_LEN = 0;
53
53
 
54
54
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -232,62 +232,82 @@ function _assertClass(instance, klass) {
232
232
  }
233
233
  return instance.ptr;
234
234
  }
235
+
236
+ let stack_pointer = 128;
237
+
238
+ function addBorrowedObject(obj) {
239
+ if (stack_pointer == 1) throw new Error('out of js stack');
240
+ heap[--stack_pointer] = obj;
241
+ return stack_pointer;
242
+ }
235
243
  /**
236
244
  * @param {Uint8Array} buffer
237
- * @returns {string}
245
+ * @param {number} msg_index
246
+ * @param {bigint} peer_index
247
+ * @returns {Promise<void>}
238
248
  */
239
- export function hash(buffer) {
240
- const ret = wasm.hash(addHeapObject(buffer));
249
+ export function send_api_call(buffer, msg_index, peer_index) {
250
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
241
251
  return takeObject(ret);
242
252
  }
243
253
 
244
254
  /**
245
- * @param {bigint} threshold
255
+ * @param {Uint8Array} hash
256
+ * @param {bigint} block_id
257
+ * @param {bigint} peer_index
246
258
  * @returns {Promise<void>}
247
259
  */
248
- export function write_issuance_file(threshold) {
249
- const ret = wasm.write_issuance_file(threshold);
260
+ export function process_failed_block_fetch(hash, block_id, peer_index) {
261
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
250
262
  return takeObject(ret);
251
263
  }
252
264
 
253
265
  /**
266
+ * @param {string} key
267
+ * @returns {boolean}
268
+ */
269
+ export function is_valid_public_key(key) {
270
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
271
+ return ret !== 0;
272
+ }
273
+
274
+ /**
275
+ * @param {Uint8Array} buffer
276
+ * @param {number} msg_index
254
277
  * @param {bigint} peer_index
255
278
  * @returns {Promise<void>}
256
279
  */
257
- export function process_peer_disconnection(peer_index) {
258
- const ret = wasm.process_peer_disconnection(peer_index);
280
+ export function send_api_success(buffer, msg_index, peer_index) {
281
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
259
282
  return takeObject(ret);
260
283
  }
261
284
 
262
285
  /**
263
- * @returns {Promise<string>}
286
+ * @returns {Promise<void>}
264
287
  */
265
- export function get_peer_stats() {
266
- const ret = wasm.get_peer_stats();
288
+ export function disable_producing_blocks_by_timer() {
289
+ const ret = wasm.disable_producing_blocks_by_timer();
267
290
  return takeObject(ret);
268
291
  }
269
292
 
270
293
  /**
271
- * @param {bigint} num
272
- * @param {bigint} deposit
273
- * @param {Uint8Array} tx_msg
294
+ * @param {Array<any>} public_keys
295
+ * @param {BigUint64Array} amounts
274
296
  * @param {bigint} fee
275
- * @param {string} recipient_public_key
276
- * @param {string} nft_type
297
+ * @param {boolean} _force_merge
277
298
  * @returns {Promise<WasmTransaction>}
278
299
  */
279
- export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
280
- const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
300
+ export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
301
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
281
302
  return takeObject(ret);
282
303
  }
283
304
 
284
305
  /**
285
- * @param {WasmTransaction} tx
286
- * @returns {Promise<void>}
306
+ * @param {bigint} peer_index
307
+ * @returns {Promise<WasmPeer | undefined>}
287
308
  */
288
- export function propagate_transaction(tx) {
289
- _assertClass(tx, WasmTransaction);
290
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
309
+ export function get_peer(peer_index) {
310
+ const ret = wasm.get_peer(peer_index);
291
311
  return takeObject(ret);
292
312
  }
293
313
 
@@ -302,209 +322,199 @@ export function process_stun_peer(peer_index, public_key) {
302
322
  }
303
323
 
304
324
  /**
305
- * @param {Array<any>} public_keys
306
- * @param {BigUint64Array} amounts
325
+ * @param {bigint} num
326
+ * @param {bigint} deposit
327
+ * @param {Uint8Array} tx_msg
307
328
  * @param {bigint} fee
308
- * @param {boolean} _force_merge
329
+ * @param {string} recipient_public_key
330
+ * @param {string} nft_type
309
331
  * @returns {Promise<WasmTransaction>}
310
332
  */
311
- export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
312
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
333
+ export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
334
+ const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
313
335
  return takeObject(ret);
314
336
  }
315
337
 
316
338
  /**
317
- * @param {Uint8Array} hash
318
- * @param {bigint} block_id
319
- * @param {bigint} peer_index
339
+ * @param {number} major
340
+ * @param {number} minor
341
+ * @param {number} patch
320
342
  * @returns {Promise<void>}
321
343
  */
322
- export function process_failed_block_fetch(hash, block_id, peer_index) {
323
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
344
+ export function set_wallet_version(major, minor, patch) {
345
+ const ret = wasm.set_wallet_version(major, minor, patch);
324
346
  return takeObject(ret);
325
347
  }
326
348
 
327
349
  /**
328
- * @param {string} private_key
329
- * @returns {string}
350
+ * @param {bigint} threshold
351
+ * @returns {Promise<void>}
330
352
  */
331
- export function generate_public_key(private_key) {
332
- try {
333
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
334
- wasm.generate_public_key(retptr, addHeapObject(private_key));
335
- var r0 = getInt32Memory0()[retptr / 4 + 0];
336
- var r1 = getInt32Memory0()[retptr / 4 + 1];
337
- var r2 = getInt32Memory0()[retptr / 4 + 2];
338
- if (r2) {
339
- throw takeObject(r1);
340
- }
341
- return takeObject(r0);
342
- } finally {
343
- wasm.__wbindgen_add_to_stack_pointer(16);
344
- }
353
+ export function write_issuance_file(threshold) {
354
+ const ret = wasm.write_issuance_file(threshold);
355
+ return takeObject(ret);
345
356
  }
346
357
 
347
358
  /**
348
- * @param {string} key
349
- * @returns {boolean}
359
+ * @param {Uint8Array} buffer
360
+ * @returns {string}
350
361
  */
351
- export function is_valid_public_key(key) {
352
- const ret = wasm.is_valid_public_key(addHeapObject(key));
353
- return ret !== 0;
362
+ export function hash(buffer) {
363
+ const ret = wasm.hash(addHeapObject(buffer));
364
+ return takeObject(ret);
354
365
  }
355
366
 
356
367
  /**
357
- * @returns {Promise<Array<any>>}
368
+ * @returns {Promise<string>}
358
369
  */
359
- export function get_nft_list() {
360
- const ret = wasm.get_nft_list();
370
+ export function get_congestion_stats() {
371
+ const ret = wasm.get_congestion_stats();
361
372
  return takeObject(ret);
362
373
  }
363
374
 
364
375
  /**
365
- * @returns {Promise<WasmBlockchain>}
376
+ * @param {string} slip1_utxo_key
377
+ * @param {string} slip2_utxo_key
378
+ * @param {string} slip3_utxo_key
379
+ * @param {number} left_count
380
+ * @param {number} right_count
381
+ * @param {Uint8Array} tx_msg
382
+ * @returns {Promise<WasmTransaction>}
366
383
  */
367
- export function get_blockchain() {
368
- const ret = wasm.get_blockchain();
384
+ export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
385
+ 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));
369
386
  return takeObject(ret);
370
387
  }
371
388
 
372
389
  /**
373
- * @param {Uint8Array} buffer
374
- * @param {number} msg_index
375
- * @param {bigint} peer_index
376
- * @returns {Promise<void>}
390
+ * @param {string} public_key
391
+ * @param {bigint} amount
392
+ * @param {bigint} fee
393
+ * @param {boolean} force_merge
394
+ * @returns {Promise<WasmTransaction>}
377
395
  */
378
- export function send_api_call(buffer, msg_index, peer_index) {
379
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
396
+ export function create_transaction(public_key, amount, fee, force_merge) {
397
+ const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
380
398
  return takeObject(ret);
381
399
  }
382
400
 
383
401
  /**
384
- * @param {bigint} peer_index
385
- * @returns {Promise<void>}
402
+ * @param {Uint8Array} buffer
403
+ * @param {string} signature
404
+ * @param {string} public_key
405
+ * @returns {boolean}
386
406
  */
387
- export function remove_stun_peer(peer_index) {
388
- const ret = wasm.remove_stun_peer(peer_index);
389
- return takeObject(ret);
407
+ export function verify_signature(buffer, signature, public_key) {
408
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
409
+ return ret !== 0;
390
410
  }
391
411
 
392
412
  /**
393
- * @param {bigint} duration_in_ms
394
- * @returns {Promise<void>}
413
+ * @param {string} nft_id_hex
414
+ * @param {Uint8Array} tx_msg
415
+ * @returns {Promise<WasmTransaction>}
395
416
  */
396
- export function process_timer_event(duration_in_ms) {
397
- const ret = wasm.process_timer_event(duration_in_ms);
417
+ export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
418
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
419
+ const len0 = WASM_VECTOR_LEN;
420
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
398
421
  return takeObject(ret);
399
422
  }
400
423
 
401
424
  /**
402
- * @param {bigint} peer_index
403
- * @param {string} ip
404
- * @returns {Promise<void>}
425
+ * @param {string} block_hash
426
+ * @returns {Promise<WasmBlock>}
405
427
  */
406
- export function process_new_peer(peer_index, ip) {
407
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
428
+ export function get_block(block_hash) {
429
+ const ret = wasm.get_block(addHeapObject(block_hash));
408
430
  return takeObject(ret);
409
431
  }
410
432
 
411
433
  /**
412
- * @param {WasmBalanceSnapshot} snapshot
434
+ * @param {Uint8Array} buffer
435
+ * @param {Uint8Array} hash
436
+ * @param {bigint} block_id
437
+ * @param {bigint} peer_index
413
438
  * @returns {Promise<void>}
414
439
  */
415
- export function update_from_balance_snapshot(snapshot) {
416
- _assertClass(snapshot, WasmBalanceSnapshot);
417
- var ptr0 = snapshot.__destroy_into_raw();
418
- const ret = wasm.update_from_balance_snapshot(ptr0);
440
+ export function process_fetched_block(buffer, hash, block_id, peer_index) {
441
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
419
442
  return takeObject(ret);
420
443
  }
421
444
 
422
445
  /**
423
- * @param {Array<any>} keys
424
- * @returns {Promise<WasmBalanceSnapshot>}
446
+ * @returns {Promise<string>}
425
447
  */
426
- export function get_balance_snapshot(keys) {
427
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
448
+ export function get_peer_stats() {
449
+ const ret = wasm.get_peer_stats();
428
450
  return takeObject(ret);
429
451
  }
430
452
 
431
453
  /**
432
- * @returns {Promise<string>}
454
+ * @returns {Promise<Array<any>>}
433
455
  */
434
- export function get_stats() {
435
- const ret = wasm.get_stats();
456
+ export function get_nft_list() {
457
+ const ret = wasm.get_nft_list();
436
458
  return takeObject(ret);
437
459
  }
438
460
 
439
461
  /**
462
+ * @param {string} public_key
440
463
  * @returns {Promise<Array<any>>}
441
464
  */
442
- export function get_mempool_txs() {
443
- const ret = wasm.get_mempool_txs();
465
+ export function get_account_slips(public_key) {
466
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
444
467
  return takeObject(ret);
445
468
  }
446
469
 
447
470
  /**
448
- * @returns {Promise<any>}
471
+ * @param {bigint} duration_in_ms
472
+ * @returns {Promise<void>}
449
473
  */
450
- export function get_confirmations() {
451
- const ret = wasm.get_confirmations();
474
+ export function process_timer_event(duration_in_ms) {
475
+ const ret = wasm.process_timer_event(duration_in_ms);
452
476
  return takeObject(ret);
453
477
  }
454
478
 
455
479
  /**
456
- * @returns {string}
480
+ * @returns {Promise<string>}
457
481
  */
458
- export function generate_private_key() {
459
- const ret = wasm.generate_private_key();
482
+ export function get_latest_block_hash() {
483
+ const ret = wasm.get_latest_block_hash();
460
484
  return takeObject(ret);
461
485
  }
462
486
 
463
487
  /**
464
- * @param {Uint8Array} buffer
465
- * @param {number} msg_index
466
488
  * @param {bigint} peer_index
467
489
  * @returns {Promise<void>}
468
490
  */
469
- export function send_api_error(buffer, msg_index, peer_index) {
470
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
491
+ export function remove_stun_peer(peer_index) {
492
+ const ret = wasm.remove_stun_peer(peer_index);
471
493
  return takeObject(ret);
472
494
  }
473
495
 
474
496
  /**
475
497
  * @param {bigint} peer_index
476
- * @returns {Promise<WasmPeer | undefined>}
477
- */
478
- export function get_peer(peer_index) {
479
- const ret = wasm.get_peer(peer_index);
480
- return takeObject(ret);
481
- }
482
-
483
- /**
484
498
  * @returns {Promise<void>}
485
499
  */
486
- export function start_from_received_ghost_chain() {
487
- const ret = wasm.start_from_received_ghost_chain();
500
+ export function process_peer_disconnection(peer_index) {
501
+ const ret = wasm.process_peer_disconnection(peer_index);
488
502
  return takeObject(ret);
489
503
  }
490
504
 
491
505
  /**
492
- * @returns {Promise<void>}
506
+ * @returns {Promise<string>}
493
507
  */
494
- export function disable_producing_blocks_by_timer() {
495
- const ret = wasm.disable_producing_blocks_by_timer();
508
+ export function get_stats() {
509
+ const ret = wasm.get_stats();
496
510
  return takeObject(ret);
497
511
  }
498
512
 
499
513
  /**
500
- * @param {string} nft_id_hex
501
- * @param {Uint8Array} tx_msg
502
- * @returns {Promise<WasmTransaction>}
514
+ * @returns {Promise<boolean>}
503
515
  */
504
- export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
505
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
506
- const len0 = WASM_VECTOR_LEN;
507
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
516
+ export function produce_block_with_gt() {
517
+ const ret = wasm.produce_block_with_gt();
508
518
  return takeObject(ret);
509
519
  }
510
520
 
@@ -520,67 +530,21 @@ export function initialize(config_json, private_key, log_level_num, hasten_multi
520
530
  const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
521
531
  return takeObject(ret);
522
532
  }
523
-
524
- /**
525
- * @param {Uint8Array} buffer
526
- * @param {string} signature
527
- * @param {string} public_key
528
- * @returns {boolean}
529
- */
530
- export function verify_signature(buffer, signature, public_key) {
531
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
532
- return ret !== 0;
533
- }
534
-
535
- /**
536
- * @param {string} public_key
537
- * @returns {Promise<Array<any>>}
538
- */
539
- export function get_account_slips(public_key) {
540
- const ret = wasm.get_account_slips(addHeapObject(public_key));
541
- return takeObject(ret);
542
- }
543
-
544
- /**
545
- * @param {string} block_hash
546
- * @returns {Promise<WasmBlock>}
547
- */
548
- export function get_block(block_hash) {
549
- const ret = wasm.get_block(addHeapObject(block_hash));
550
- return takeObject(ret);
551
- }
552
-
553
- /**
554
- * @param {string} public_key
555
- * @param {bigint} amount
556
- * @param {bigint} fee
557
- * @param {boolean} force_merge
558
- * @returns {Promise<WasmTransaction>}
559
- */
560
- export function create_transaction(public_key, amount, fee, force_merge) {
561
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
562
- return takeObject(ret);
563
- }
564
-
565
- /**
566
- * @param {Uint8Array} buffer
567
- * @param {string} private_key
568
- * @returns {string}
569
- */
570
- export function sign_buffer(buffer, private_key) {
571
- try {
572
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
573
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
574
- var r0 = getInt32Memory0()[retptr / 4 + 0];
575
- var r1 = getInt32Memory0()[retptr / 4 + 1];
576
- var r2 = getInt32Memory0()[retptr / 4 + 2];
577
- if (r2) {
578
- throw takeObject(r1);
579
- }
580
- return takeObject(r0);
581
- } finally {
582
- wasm.__wbindgen_add_to_stack_pointer(16);
583
- }
533
+
534
+ /**
535
+ * @returns {string}
536
+ */
537
+ export function generate_private_key() {
538
+ const ret = wasm.generate_private_key();
539
+ return takeObject(ret);
540
+ }
541
+
542
+ /**
543
+ * @returns {Promise<Array<any>>}
544
+ */
545
+ export function get_mempool_txs() {
546
+ const ret = wasm.get_mempool_txs();
547
+ return takeObject(ret);
584
548
  }
585
549
 
586
550
  /**
@@ -593,20 +557,20 @@ export function process_stat_interval(current_time) {
593
557
  }
594
558
 
595
559
  /**
596
- * @returns {Promise<WasmWallet>}
560
+ * @returns {Promise<boolean>}
597
561
  */
598
- export function get_wallet() {
599
- const ret = wasm.get_wallet();
562
+ export function produce_block_without_gt() {
563
+ const ret = wasm.produce_block_without_gt();
600
564
  return takeObject(ret);
601
565
  }
602
566
 
603
567
  /**
604
- * @param {Uint8Array} buffer
605
- * @param {bigint} peer_index
568
+ * @param {WasmTransaction} tx
606
569
  * @returns {Promise<void>}
607
570
  */
608
- export function process_msg_buffer_from_peer(buffer, peer_index) {
609
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
571
+ export function propagate_transaction(tx) {
572
+ _assertClass(tx, WasmTransaction);
573
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
610
574
  return takeObject(ret);
611
575
  }
612
576
 
@@ -616,35 +580,43 @@ export function process_msg_buffer_from_peer(buffer, peer_index) {
616
580
  * @param {bigint} peer_index
617
581
  * @returns {Promise<void>}
618
582
  */
619
- export function send_api_success(buffer, msg_index, peer_index) {
620
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
583
+ export function send_api_error(buffer, msg_index, peer_index) {
584
+ const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
621
585
  return takeObject(ret);
622
586
  }
623
587
 
624
588
  /**
625
- * @param {string} slip1_utxo_key
626
- * @param {string} slip2_utxo_key
627
- * @param {string} slip3_utxo_key
628
- * @returns {Promise<WasmTransaction>}
589
+ * @param {WasmBalanceSnapshot} snapshot
590
+ * @returns {Promise<void>}
629
591
  */
630
- export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
631
- const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
592
+ export function update_from_balance_snapshot(snapshot) {
593
+ _assertClass(snapshot, WasmBalanceSnapshot);
594
+ var ptr0 = snapshot.__destroy_into_raw();
595
+ const ret = wasm.update_from_balance_snapshot(ptr0);
632
596
  return takeObject(ret);
633
597
  }
634
598
 
635
599
  /**
636
- * @returns {Promise<string>}
600
+ * @param {bigint} peer_index
601
+ * @param {string} ip
602
+ * @returns {Promise<void>}
637
603
  */
638
- export function get_congestion_stats() {
639
- const ret = wasm.get_congestion_stats();
604
+ export function process_new_peer(peer_index, ip) {
605
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
640
606
  return takeObject(ret);
641
607
  }
642
608
 
643
609
  /**
644
- * @returns {Promise<boolean>}
610
+ * @param {bigint} amt
611
+ * @param {string} slip1_utxo_key
612
+ * @param {string} slip2_utxo_key
613
+ * @param {string} slip3_utxo_key
614
+ * @param {string} recipient_public_key
615
+ * @param {Uint8Array} tx_msg
616
+ * @returns {Promise<WasmTransaction>}
645
617
  */
646
- export function produce_block_with_gt() {
647
- const ret = wasm.produce_block_with_gt();
618
+ export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
619
+ 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));
648
620
  return takeObject(ret);
649
621
  }
650
622
 
@@ -657,41 +629,75 @@ export function get_peers() {
657
629
  }
658
630
 
659
631
  /**
660
- * @param {number} major
661
- * @param {number} minor
662
- * @param {number} patch
663
632
  * @returns {Promise<void>}
664
633
  */
665
- export function set_wallet_version(major, minor, patch) {
666
- const ret = wasm.set_wallet_version(major, minor, patch);
634
+ export function start_from_received_ghost_chain() {
635
+ const ret = wasm.start_from_received_ghost_chain();
667
636
  return takeObject(ret);
668
637
  }
669
638
 
670
639
  /**
671
- * @returns {Promise<boolean>}
640
+ * @returns {Promise<any>}
672
641
  */
673
- export function produce_block_without_gt() {
674
- const ret = wasm.produce_block_without_gt();
642
+ export function get_confirmations() {
643
+ const ret = wasm.get_confirmations();
675
644
  return takeObject(ret);
676
645
  }
677
646
 
678
647
  /**
679
- * @returns {Promise<string>}
648
+ * @param {string} slip1_utxo_key
649
+ * @param {string} slip2_utxo_key
650
+ * @param {string} slip3_utxo_key
651
+ * @returns {Promise<WasmTransaction>}
680
652
  */
681
- export function get_latest_block_hash() {
682
- const ret = wasm.get_latest_block_hash();
653
+ export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
654
+ const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
655
+ return takeObject(ret);
656
+ }
657
+
658
+ /**
659
+ * @returns {Promise<WasmWallet>}
660
+ */
661
+ export function get_wallet() {
662
+ const ret = wasm.get_wallet();
683
663
  return takeObject(ret);
684
664
  }
685
665
 
666
+ /**
667
+ * @param {string} private_key
668
+ * @returns {string}
669
+ */
670
+ export function generate_public_key(private_key) {
671
+ try {
672
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
673
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
674
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
675
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
676
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
677
+ if (r2) {
678
+ throw takeObject(r1);
679
+ }
680
+ return takeObject(r0);
681
+ } finally {
682
+ wasm.__wbindgen_add_to_stack_pointer(16);
683
+ }
684
+ }
685
+
686
686
  /**
687
687
  * @param {Uint8Array} buffer
688
- * @param {Uint8Array} hash
689
- * @param {bigint} block_id
690
688
  * @param {bigint} peer_index
691
689
  * @returns {Promise<void>}
692
690
  */
693
- export function process_fetched_block(buffer, hash, block_id, peer_index) {
694
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
691
+ export function process_msg_buffer_from_peer(buffer, peer_index) {
692
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
693
+ return takeObject(ret);
694
+ }
695
+
696
+ /**
697
+ * @returns {Promise<WasmBlockchain>}
698
+ */
699
+ export function get_blockchain() {
700
+ const ret = wasm.get_blockchain();
695
701
  return takeObject(ret);
696
702
  }
697
703
 
@@ -704,31 +710,33 @@ export function get_next_peer_index() {
704
710
  }
705
711
 
706
712
  /**
707
- * @param {string} slip1_utxo_key
708
- * @param {string} slip2_utxo_key
709
- * @param {string} slip3_utxo_key
710
- * @param {number} left_count
711
- * @param {number} right_count
712
- * @param {Uint8Array} tx_msg
713
- * @returns {Promise<WasmTransaction>}
713
+ * @param {Array<any>} keys
714
+ * @returns {Promise<WasmBalanceSnapshot>}
714
715
  */
715
- export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
716
- 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));
716
+ export function get_balance_snapshot(keys) {
717
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
717
718
  return takeObject(ret);
718
719
  }
719
720
 
720
721
  /**
721
- * @param {bigint} amt
722
- * @param {string} slip1_utxo_key
723
- * @param {string} slip2_utxo_key
724
- * @param {string} slip3_utxo_key
725
- * @param {string} recipient_public_key
726
- * @param {Uint8Array} tx_msg
727
- * @returns {Promise<WasmTransaction>}
722
+ * @param {Uint8Array} buffer
723
+ * @param {string} private_key
724
+ * @returns {string}
728
725
  */
729
- export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
730
- 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));
731
- return takeObject(ret);
726
+ export function sign_buffer(buffer, private_key) {
727
+ try {
728
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
729
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
730
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
731
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
732
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
733
+ if (r2) {
734
+ throw takeObject(r1);
735
+ }
736
+ return takeObject(r0);
737
+ } finally {
738
+ wasm.__wbindgen_add_to_stack_pointer(16);
739
+ }
732
740
  }
733
741
 
734
742
  function handleError(f, args) {
@@ -738,15 +746,7 @@ function handleError(f, args) {
738
746
  wasm.__wbindgen_exn_store(addHeapObject(e));
739
747
  }
740
748
  }
741
-
742
- let stack_pointer = 128;
743
-
744
- function addBorrowedObject(obj) {
745
- if (stack_pointer == 1) throw new Error('out of js stack');
746
- heap[--stack_pointer] = obj;
747
- return stack_pointer;
748
- }
749
- function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
749
+ function __wbg_adapter_410(arg0, arg1, arg2, arg3) {
750
750
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
751
751
  }
752
752
 
@@ -1338,6 +1338,14 @@ export class WasmBlockchain {
1338
1338
  return takeObject(ret);
1339
1339
  }
1340
1340
  /**
1341
+ * @param {string} utxokey_hex
1342
+ * @returns {Promise<boolean>}
1343
+ */
1344
+ is_slip_spendable(utxokey_hex) {
1345
+ const ret = wasm.wasmblockchain_is_slip_spendable(this.__wbg_ptr, addHeapObject(utxokey_hex));
1346
+ return takeObject(ret);
1347
+ }
1348
+ /**
1341
1349
  * @param {Function} reorg_cb
1342
1350
  * @param {Function} add_block_cb
1343
1351
  * @param {Function} confirm_cb
@@ -2089,6 +2097,14 @@ export class WasmSlip {
2089
2097
  wasm.wasmslip_set_tx_ordinal(this.__wbg_ptr, ordinal);
2090
2098
  }
2091
2099
  /**
2100
+ * @param {string} key_hex
2101
+ * @returns {WasmSlip | undefined}
2102
+ */
2103
+ static parse_slip_from_utxokey(key_hex) {
2104
+ const ret = wasm.wasmslip_parse_slip_from_utxokey(addHeapObject(key_hex));
2105
+ return ret === 0 ? undefined : WasmSlip.__wrap(ret);
2106
+ }
2107
+ /**
2092
2108
  */
2093
2109
  constructor() {
2094
2110
  const ret = wasm.wasmslip_new();
@@ -2253,6 +2269,18 @@ export class WasmTransaction {
2253
2269
  wasm.wasmtransaction_set_txs_replacements(this.__wbg_ptr, r);
2254
2270
  }
2255
2271
  /**
2272
+ * @returns {Uint8Array}
2273
+ */
2274
+ get_hash_for_signature() {
2275
+ const ret = wasm.wasmtransaction_get_hash_for_signature(this.__wbg_ptr);
2276
+ return takeObject(ret);
2277
+ }
2278
+ /**
2279
+ */
2280
+ generate_hash_for_signature() {
2281
+ wasm.wasmtransaction_generate_hash_for_signature(this.__wbg_ptr);
2282
+ }
2283
+ /**
2256
2284
  * @returns {Array<any>}
2257
2285
  */
2258
2286
  get to() {
@@ -2668,19 +2696,15 @@ async function __wbg_load(module, imports) {
2668
2696
  function __wbg_get_imports() {
2669
2697
  const imports = {};
2670
2698
  imports.wbg = {};
2671
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2672
- takeObject(arg0);
2673
- };
2674
2699
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2675
2700
  const ret = getStringFromWasm0(arg0, arg1);
2676
2701
  return addHeapObject(ret);
2677
2702
  };
2678
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2679
- const ret = WasmTransaction.__wrap(arg0);
2680
- return addHeapObject(ret);
2703
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2704
+ takeObject(arg0);
2681
2705
  };
2682
- imports.wbg.__wbg_wasmnft_new = function(arg0) {
2683
- const ret = WasmNFT.__wrap(arg0);
2706
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2707
+ const ret = BigInt.asUintN(64, arg0);
2684
2708
  return addHeapObject(ret);
2685
2709
  };
2686
2710
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
@@ -2691,30 +2715,30 @@ function __wbg_get_imports() {
2691
2715
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2692
2716
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2693
2717
  };
2694
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2695
- const ret = WasmPeer.__wrap(arg0);
2696
- return addHeapObject(ret);
2697
- };
2698
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2699
- const ret = BigInt.asUintN(64, arg0);
2700
- return addHeapObject(ret);
2701
- };
2702
- imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2703
- const ret = WasmWallet.__wrap(arg0);
2718
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2719
+ const ret = WasmTransaction.__wrap(arg0);
2704
2720
  return addHeapObject(ret);
2705
2721
  };
2706
- imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2707
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2722
+ imports.wbg.__wbg_wasmnft_new = function(arg0) {
2723
+ const ret = WasmNFT.__wrap(arg0);
2708
2724
  return addHeapObject(ret);
2709
2725
  };
2710
2726
  imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2711
2727
  const ret = WasmWalletSlip.__wrap(arg0);
2712
2728
  return addHeapObject(ret);
2713
2729
  };
2730
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2731
+ const ret = WasmPeer.__wrap(arg0);
2732
+ return addHeapObject(ret);
2733
+ };
2714
2734
  imports.wbg.__wbg_wasmblock_new = function(arg0) {
2715
2735
  const ret = WasmBlock.__wrap(arg0);
2716
2736
  return addHeapObject(ret);
2717
2737
  };
2738
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2739
+ const ret = WasmBlockchain.__wrap(arg0);
2740
+ return addHeapObject(ret);
2741
+ };
2718
2742
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2719
2743
  const ret = getObject(arg0);
2720
2744
  return addHeapObject(ret);
@@ -2723,20 +2747,12 @@ function __wbg_get_imports() {
2723
2747
  const ret = WasmSlip.__wrap(arg0);
2724
2748
  return addHeapObject(ret);
2725
2749
  };
2726
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2727
- const ret = WasmBlockchain.__wrap(arg0);
2728
- return addHeapObject(ret);
2729
- };
2730
- imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
2731
- const ret = WasmPeerService.__wrap(arg0);
2732
- return addHeapObject(ret);
2733
- };
2734
- imports.wbg.__wbg_wasmhop_new = function(arg0) {
2735
- const ret = WasmHop.__wrap(arg0);
2750
+ imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2751
+ const ret = WasmWallet.__wrap(arg0);
2736
2752
  return addHeapObject(ret);
2737
2753
  };
2738
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2739
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2754
+ imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2755
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2740
2756
  return addHeapObject(ret);
2741
2757
  };
2742
2758
  imports.wbg.__wbindgen_is_object = function(arg0) {
@@ -2752,7 +2768,11 @@ function __wbg_get_imports() {
2752
2768
  const ret = getObject(arg0) in getObject(arg1);
2753
2769
  return ret;
2754
2770
  };
2755
- imports.wbg.__wbg_flushdata_571e46cce4f70e72 = function(arg0, arg1) {
2771
+ imports.wbg.__wbg_wasmhop_new = function(arg0) {
2772
+ const ret = WasmHop.__wrap(arg0);
2773
+ return addHeapObject(ret);
2774
+ };
2775
+ imports.wbg.__wbg_flushdata_d0071995637d9dca = function(arg0, arg1) {
2756
2776
  let deferred0_0;
2757
2777
  let deferred0_1;
2758
2778
  try {
@@ -2763,7 +2783,7 @@ function __wbg_get_imports() {
2763
2783
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2764
2784
  }
2765
2785
  };
2766
- imports.wbg.__wbg_readvalue_0023aabd3b029c28 = function() { return handleError(function (arg0, arg1) {
2786
+ imports.wbg.__wbg_readvalue_7f66bac15f2b1d9b = function() { return handleError(function (arg0, arg1) {
2767
2787
  let deferred0_0;
2768
2788
  let deferred0_1;
2769
2789
  try {
@@ -2775,13 +2795,13 @@ function __wbg_get_imports() {
2775
2795
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2776
2796
  }
2777
2797
  }, arguments) };
2778
- imports.wbg.__wbg_loadwallet_c7d36edfd9b3141c = function() {
2798
+ imports.wbg.__wbg_loadwallet_6532e71a32ebe34a = function() {
2779
2799
  MsgHandler.load_wallet();
2780
2800
  };
2781
- imports.wbg.__wbg_savewallet_7f660732fea84939 = function() {
2801
+ imports.wbg.__wbg_savewallet_c435deea2f8fe957 = function() {
2782
2802
  MsgHandler.save_wallet();
2783
2803
  };
2784
- imports.wbg.__wbg_writevalue_a37456c36a13f7c1 = function(arg0, arg1, arg2) {
2804
+ imports.wbg.__wbg_writevalue_3c113add4c7138d6 = function(arg0, arg1, arg2) {
2785
2805
  let deferred0_0;
2786
2806
  let deferred0_1;
2787
2807
  try {
@@ -2792,7 +2812,7 @@ function __wbg_get_imports() {
2792
2812
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2793
2813
  }
2794
2814
  };
2795
- imports.wbg.__wbg_appendvalue_5e41b908bebdda6f = function(arg0, arg1, arg2) {
2815
+ imports.wbg.__wbg_appendvalue_66bca83dbfdae00f = function(arg0, arg1, arg2) {
2796
2816
  let deferred0_0;
2797
2817
  let deferred0_1;
2798
2818
  try {
@@ -2803,7 +2823,7 @@ function __wbg_get_imports() {
2803
2823
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2804
2824
  }
2805
2825
  };
2806
- imports.wbg.__wbg_removevalue_942827cd11acedcd = function() { return handleError(function (arg0, arg1) {
2826
+ imports.wbg.__wbg_removevalue_e988da25f31f33f7 = function() { return handleError(function (arg0, arg1) {
2807
2827
  let deferred0_0;
2808
2828
  let deferred0_1;
2809
2829
  try {
@@ -2815,10 +2835,10 @@ function __wbg_get_imports() {
2815
2835
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2816
2836
  }
2817
2837
  }, arguments) };
2818
- imports.wbg.__wbg_sendmessage_586a19ec4082b8fb = function(arg0, arg1) {
2838
+ imports.wbg.__wbg_sendmessage_faf762a243036e23 = function(arg0, arg1) {
2819
2839
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2820
2840
  };
2821
- imports.wbg.__wbg_connecttopeer_da5cf59d8cfa1695 = function() { return handleError(function (arg0, arg1, arg2) {
2841
+ imports.wbg.__wbg_connecttopeer_1d02808ea8234cd0 = function() { return handleError(function (arg0, arg1, arg2) {
2822
2842
  let deferred0_0;
2823
2843
  let deferred0_1;
2824
2844
  try {
@@ -2830,13 +2850,13 @@ function __wbg_get_imports() {
2830
2850
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2831
2851
  }
2832
2852
  }, arguments) };
2833
- imports.wbg.__wbg_getmyservices_4cd3d2838160a2e4 = function() {
2853
+ imports.wbg.__wbg_getmyservices_f19adeeffe50a035 = function() {
2834
2854
  const ret = MsgHandler.get_my_services();
2835
2855
  _assertClass(ret, WasmPeerServiceList);
2836
2856
  var ptr1 = ret.__destroy_into_raw();
2837
2857
  return ptr1;
2838
2858
  };
2839
- imports.wbg.__wbg_isexistingfile_dfbccf2cbef6e84d = function() { return handleError(function (arg0, arg1) {
2859
+ imports.wbg.__wbg_isexistingfile_847c2977bc75bcb7 = function() { return handleError(function (arg0, arg1) {
2840
2860
  let deferred0_0;
2841
2861
  let deferred0_1;
2842
2862
  try {
@@ -2848,27 +2868,27 @@ function __wbg_get_imports() {
2848
2868
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2849
2869
  }
2850
2870
  }, arguments) };
2851
- imports.wbg.__wbg_processapicall_acd7d33fd42c3d1f = function(arg0, arg1, arg2) {
2871
+ imports.wbg.__wbg_processapicall_77c60bf695c62278 = function(arg0, arg1, arg2) {
2852
2872
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2853
2873
  };
2854
- imports.wbg.__wbg_processapierror_ab72949eda06b691 = function(arg0, arg1, arg2) {
2874
+ imports.wbg.__wbg_processapierror_4152ed10526d1e90 = function(arg0, arg1, arg2) {
2855
2875
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2856
2876
  };
2857
- imports.wbg.__wbg_processapisuccess_961e9892246de79c = function(arg0, arg1, arg2) {
2877
+ imports.wbg.__wbg_processapisuccess_e31b2c1bbeda6850 = function(arg0, arg1, arg2) {
2858
2878
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2859
2879
  };
2860
- imports.wbg.__wbg_sendmessagetoall_11e5fcfef1b07a13 = function(arg0, arg1) {
2880
+ imports.wbg.__wbg_sendmessagetoall_23ec9ae3c65baa3b = function(arg0, arg1) {
2861
2881
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2862
2882
  };
2863
- imports.wbg.__wbg_disconnectfrompeer_5c175d44122eb2c6 = function() { return handleError(function (arg0) {
2883
+ imports.wbg.__wbg_disconnectfrompeer_64a207462fb9170f = function() { return handleError(function (arg0) {
2864
2884
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2865
2885
  return addHeapObject(ret);
2866
2886
  }, arguments) };
2867
- imports.wbg.__wbg_loadblockfilelist_b7839cc4defb38f4 = function() { return handleError(function () {
2887
+ imports.wbg.__wbg_loadblockfilelist_de5306e2fa167e2f = function() { return handleError(function () {
2868
2888
  const ret = MsgHandler.load_block_file_list();
2869
2889
  return addHeapObject(ret);
2870
2890
  }, arguments) };
2871
- imports.wbg.__wbg_sendinterfaceevent_a6e7d41837b235e5 = function(arg0, arg1, arg2, arg3, arg4) {
2891
+ imports.wbg.__wbg_sendinterfaceevent_52637a4231d38f0c = function(arg0, arg1, arg2, arg3, arg4) {
2872
2892
  let deferred0_0;
2873
2893
  let deferred0_1;
2874
2894
  let deferred1_0;
@@ -2884,7 +2904,7 @@ function __wbg_get_imports() {
2884
2904
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2885
2905
  }
2886
2906
  };
2887
- imports.wbg.__wbg_sendblocksuccess_3b8aec2ff636f96a = function(arg0, arg1, arg2) {
2907
+ imports.wbg.__wbg_sendblocksuccess_037e59183e3f8fc8 = function(arg0, arg1, arg2) {
2888
2908
  let deferred0_0;
2889
2909
  let deferred0_1;
2890
2910
  try {
@@ -2895,10 +2915,10 @@ function __wbg_get_imports() {
2895
2915
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2896
2916
  }
2897
2917
  };
2898
- imports.wbg.__wbg_sendwalletupdate_7adec123401b1a23 = function() {
2918
+ imports.wbg.__wbg_sendwalletupdate_203090048ea64a43 = function() {
2899
2919
  MsgHandler.send_wallet_update();
2900
2920
  };
2901
- imports.wbg.__wbg_sendnewversionalert_a07a565734d2fc1d = function(arg0, arg1, arg2) {
2921
+ imports.wbg.__wbg_sendnewversionalert_90ec60877849aec0 = function(arg0, arg1, arg2) {
2902
2922
  let deferred0_0;
2903
2923
  let deferred0_1;
2904
2924
  try {
@@ -2909,13 +2929,13 @@ function __wbg_get_imports() {
2909
2929
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2910
2930
  }
2911
2931
  };
2912
- imports.wbg.__wbg_sendblockfetchstatusevent_1d40c9cc7dd2eab0 = function(arg0) {
2932
+ imports.wbg.__wbg_sendblockfetchstatusevent_d5e8d4d7fce58f7e = function(arg0) {
2913
2933
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2914
2934
  };
2915
- imports.wbg.__wbg_sendnewchaindetectedevent_32e1d671ab68b024 = function() {
2935
+ imports.wbg.__wbg_sendnewchaindetectedevent_7f3a6efc2e389a50 = function() {
2916
2936
  MsgHandler.send_new_chain_detected_event();
2917
2937
  };
2918
- imports.wbg.__wbg_fetchblockfrompeer_8c4ed4e20aed0348 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2938
+ imports.wbg.__wbg_fetchblockfrompeer_09517f5c7d00dcb1 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2919
2939
  let deferred0_0;
2920
2940
  let deferred0_1;
2921
2941
  try {
@@ -2927,7 +2947,7 @@ function __wbg_get_imports() {
2927
2947
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2928
2948
  }
2929
2949
  }, arguments) };
2930
- imports.wbg.__wbg_ensuredirectoryexists_9661b66ed6842ef4 = function() { return handleError(function (arg0, arg1) {
2950
+ imports.wbg.__wbg_ensuredirectoryexists_05a10b0b56f6d6e7 = function() { return handleError(function (arg0, arg1) {
2931
2951
  let deferred0_0;
2932
2952
  let deferred0_1;
2933
2953
  try {
@@ -2938,6 +2958,14 @@ function __wbg_get_imports() {
2938
2958
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2939
2959
  }
2940
2960
  }, arguments) };
2961
+ imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
2962
+ const ret = WasmPeerService.__wrap(arg0);
2963
+ return addHeapObject(ret);
2964
+ };
2965
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2966
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2967
+ return addHeapObject(ret);
2968
+ };
2941
2969
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2942
2970
  const ret = getObject(arg0) == getObject(arg1);
2943
2971
  return ret;
@@ -3185,7 +3213,7 @@ function __wbg_get_imports() {
3185
3213
  const a = state0.a;
3186
3214
  state0.a = 0;
3187
3215
  try {
3188
- return __wbg_adapter_406(a, state0.b, arg0, arg1);
3216
+ return __wbg_adapter_410(a, state0.b, arg0, arg1);
3189
3217
  } finally {
3190
3218
  state0.a = a;
3191
3219
  }
@@ -3246,8 +3274,8 @@ function __wbg_get_imports() {
3246
3274
  getInt32Memory0()[arg0 / 4 + 1] = len1;
3247
3275
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3248
3276
  };
3249
- imports.wbg.__wbindgen_closure_wrapper1554 = function(arg0, arg1, arg2) {
3250
- const ret = makeMutClosure(arg0, arg1, 572, __wbg_adapter_38);
3277
+ imports.wbg.__wbindgen_closure_wrapper1558 = function(arg0, arg1, arg2) {
3278
+ const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
3251
3279
  return addHeapObject(ret);
3252
3280
  };
3253
3281