saito-wasm 0.2.240 → 0.2.243

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,4 +1,4 @@
1
- import { MsgHandler } from './snippets/saito-wasm-9fecb2991d64dbbe/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-6523703f0a873c92/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
@@ -223,7 +223,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
223
223
  return real;
224
224
  }
225
225
  function __wbg_adapter_40(arg0, arg1, arg2) {
226
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h39c9a967ba047c79(arg0, arg1, addHeapObject(arg2));
226
+ wasm._dyn_core_9b3796e30d99ddb7___ops__function__FnMut_______Output______as_wasm_bindgen_9c0a948636c8b8c4___closure__WasmClosure___describe__invoke___wasm_bindgen_9c0a948636c8b8c4___JsValue_____(arg0, arg1, addHeapObject(arg2));
227
227
  }
228
228
 
229
229
  function handleError(f, args) {
@@ -233,8 +233,8 @@ function handleError(f, args) {
233
233
  wasm.__wbindgen_exn_store(addHeapObject(e));
234
234
  }
235
235
  }
236
- function __wbg_adapter_83(arg0, arg1, arg2, arg3) {
237
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h01747b21cbcb5f0a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
236
+ function __wbg_adapter_91(arg0, arg1, arg2, arg3) {
237
+ wasm.wasm_bindgen_9c0a948636c8b8c4___convert__closures__invoke2_mut___wasm_bindgen_9c0a948636c8b8c4___JsValue__wasm_bindgen_9c0a948636c8b8c4___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
238
238
  }
239
239
 
240
240
  function _assertClass(instance, klass) {
@@ -243,149 +243,169 @@ function _assertClass(instance, klass) {
243
243
  }
244
244
  return instance.ptr;
245
245
  }
246
-
247
- let stack_pointer = 128;
248
-
249
- function addBorrowedObject(obj) {
250
- if (stack_pointer == 1) throw new Error('out of js stack');
251
- heap[--stack_pointer] = obj;
252
- return stack_pointer;
253
- }
254
246
  /**
247
+ * @param {string} json
255
248
  * @returns {string}
256
249
  */
257
- export function generate_private_key() {
258
- const ret = wasm.generate_private_key();
259
- return takeObject(ret);
250
+ export function get_script_address(json) {
251
+ let deferred1_0;
252
+ let deferred1_1;
253
+ try {
254
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
255
+ wasm.get_script_address(retptr, addHeapObject(json));
256
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
257
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
258
+ deferred1_0 = r0;
259
+ deferred1_1 = r1;
260
+ return getStringFromWasm0(r0, r1);
261
+ } finally {
262
+ wasm.__wbindgen_add_to_stack_pointer(16);
263
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
264
+ }
260
265
  }
261
266
 
262
267
  /**
263
- * @returns {Promise<boolean>}
268
+ * @param {string} script_json
269
+ * @param {string} witness_json
270
+ * @returns {string}
264
271
  */
265
- export function produce_block_without_gt() {
266
- const ret = wasm.produce_block_without_gt();
267
- return takeObject(ret);
272
+ export function merge_witness(script_json, witness_json) {
273
+ let deferred1_0;
274
+ let deferred1_1;
275
+ try {
276
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
277
+ wasm.merge_witness(retptr, addHeapObject(script_json), addHeapObject(witness_json));
278
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
279
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
280
+ deferred1_0 = r0;
281
+ deferred1_1 = r1;
282
+ return getStringFromWasm0(r0, r1);
283
+ } finally {
284
+ wasm.__wbindgen_add_to_stack_pointer(16);
285
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
286
+ }
268
287
  }
269
288
 
270
289
  /**
271
- * @param {bigint} peer_id
272
290
  * @param {string} public_key
273
- * @returns {Promise<void>}
291
+ * @returns {Promise<Array<any>>}
274
292
  */
275
- export function remove_stun_peer(peer_id, public_key) {
276
- const ret = wasm.remove_stun_peer(peer_id, addHeapObject(public_key));
293
+ export function get_account_slips(public_key) {
294
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
277
295
  return takeObject(ret);
278
296
  }
279
297
 
280
298
  /**
281
- * @param {string | undefined} [url]
282
- * @returns {Promise<WasmNetworkPeer>}
299
+ * @param {Array<any>} keys
300
+ * @returns {Promise<WasmBalanceSnapshot>}
283
301
  */
284
- export function create_network_peer(url) {
285
- var ptr0 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
286
- var len0 = WASM_VECTOR_LEN;
287
- const ret = wasm.create_network_peer(ptr0, len0);
302
+ export function get_balance_snapshot(keys) {
303
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
288
304
  return takeObject(ret);
289
305
  }
290
306
 
291
307
  /**
292
- * @returns {Promise<boolean>}
308
+ * @param {bigint} threshold
309
+ * @returns {Promise<void>}
293
310
  */
294
- export function produce_block_with_gt() {
295
- const ret = wasm.produce_block_with_gt();
311
+ export function write_issuance_file(threshold) {
312
+ const ret = wasm.write_issuance_file(threshold);
296
313
  return takeObject(ret);
297
314
  }
298
315
 
299
316
  /**
300
- * @returns {Promise<string>}
317
+ * @returns {Promise<void>}
301
318
  */
302
- export function get_latest_block_hash() {
303
- const ret = wasm.get_latest_block_hash();
319
+ export function disable_producing_blocks_by_timer() {
320
+ const ret = wasm.disable_producing_blocks_by_timer();
304
321
  return takeObject(ret);
305
322
  }
306
323
 
307
324
  /**
308
- * @param {Uint8Array} buffer
309
- * @param {string} private_key
310
- * @returns {string}
325
+ * @returns {Promise<void>}
311
326
  */
312
- export function sign_buffer(buffer, private_key) {
313
- try {
314
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
315
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
316
- var r0 = getInt32Memory0()[retptr / 4 + 0];
317
- var r1 = getInt32Memory0()[retptr / 4 + 1];
318
- var r2 = getInt32Memory0()[retptr / 4 + 2];
319
- if (r2) {
320
- throw takeObject(r1);
321
- }
322
- return takeObject(r0);
323
- } finally {
324
- wasm.__wbindgen_add_to_stack_pointer(16);
325
- }
327
+ export function enable_producing_blocks_by_timer() {
328
+ const ret = wasm.enable_producing_blocks_by_timer();
329
+ return takeObject(ret);
326
330
  }
327
331
 
328
- /**
329
- * @returns {WasmNetwork}
330
- */
331
- export function get_network() {
332
- const ret = wasm.get_network();
333
- return WasmNetwork.__wrap(ret);
334
- }
332
+ let cachedUint32Memory0 = null;
335
333
 
336
- /**
337
- * @param {Uint8Array} buffer
338
- * @returns {string}
339
- */
340
- export function hash(buffer) {
341
- const ret = wasm.hash(addHeapObject(buffer));
342
- return takeObject(ret);
334
+ function getUint32Memory0() {
335
+ if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
336
+ cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
337
+ }
338
+ return cachedUint32Memory0;
343
339
  }
344
340
 
341
+ function passArrayJsValueToWasm0(array, malloc) {
342
+ const ptr = malloc(array.length * 4, 4) >>> 0;
343
+ const mem = getUint32Memory0();
344
+ for (let i = 0; i < array.length; i++) {
345
+ mem[ptr / 4 + i] = addHeapObject(array[i]);
346
+ }
347
+ WASM_VECTOR_LEN = array.length;
348
+ return ptr;
349
+ }
345
350
  /**
346
- * @returns {Promise<WasmBlockchain>}
351
+ * @param {(Uint8Array)[] | undefined} [extra_txs]
352
+ * @returns {Promise<boolean>}
347
353
  */
348
- export function get_blockchain() {
349
- const ret = wasm.get_blockchain();
354
+ export function produce_block_with_gt(extra_txs) {
355
+ var ptr0 = isLikeNone(extra_txs) ? 0 : passArrayJsValueToWasm0(extra_txs, wasm.__wbindgen_malloc);
356
+ var len0 = WASM_VECTOR_LEN;
357
+ const ret = wasm.produce_block_with_gt(ptr0, len0);
350
358
  return takeObject(ret);
351
359
  }
352
360
 
353
361
  /**
354
- * @param {bigint} duration_in_ms
355
- * @returns {Promise<void>}
362
+ * @param {(Uint8Array)[] | undefined} [extra_txs]
363
+ * @returns {Promise<boolean>}
356
364
  */
357
- export function process_timer_event(duration_in_ms) {
358
- const ret = wasm.process_timer_event(duration_in_ms);
365
+ export function produce_block_without_gt(extra_txs) {
366
+ var ptr0 = isLikeNone(extra_txs) ? 0 : passArrayJsValueToWasm0(extra_txs, wasm.__wbindgen_malloc);
367
+ var len0 = WASM_VECTOR_LEN;
368
+ const ret = wasm.produce_block_without_gt(ptr0, len0);
359
369
  return takeObject(ret);
360
370
  }
361
371
 
362
372
  /**
363
- * @param {Uint8Array} buffer
364
- * @param {Uint8Array} hash
365
- * @param {bigint} block_id
366
- * @param {bigint} peer_id
373
+ * @param {WasmBalanceSnapshot} snapshot
367
374
  * @returns {Promise<void>}
368
375
  */
369
- export function process_fetched_block(buffer, hash, block_id, peer_id) {
370
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_id);
376
+ export function update_from_balance_snapshot(snapshot) {
377
+ _assertClass(snapshot, WasmBalanceSnapshot);
378
+ var ptr0 = snapshot.__destroy_into_raw();
379
+ const ret = wasm.update_from_balance_snapshot(ptr0);
371
380
  return takeObject(ret);
372
381
  }
373
382
 
374
383
  /**
375
- * @param {string} json
376
- * @returns {Promise<number>}
384
+ * @returns {string}
377
385
  */
378
- export function evaluate_script(json) {
379
- const ret = wasm.evaluate_script(addHeapObject(json));
386
+ export function generate_private_key() {
387
+ const ret = wasm.generate_private_key();
380
388
  return takeObject(ret);
381
389
  }
382
390
 
383
391
  /**
384
- * @returns {Promise<void>}
392
+ * @param {string} private_key
393
+ * @returns {string}
385
394
  */
386
- export function disable_producing_blocks_by_timer() {
387
- const ret = wasm.disable_producing_blocks_by_timer();
388
- return takeObject(ret);
395
+ export function generate_public_key(private_key) {
396
+ try {
397
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
398
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
399
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
400
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
401
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
402
+ if (r2) {
403
+ throw takeObject(r1);
404
+ }
405
+ return takeObject(r0);
406
+ } finally {
407
+ wasm.__wbindgen_add_to_stack_pointer(16);
408
+ }
389
409
  }
390
410
 
391
411
  /**
@@ -397,30 +417,26 @@ export function get_wallet() {
397
417
  }
398
418
 
399
419
  /**
400
- * @param {string} block_hash
401
- * @returns {Promise<WasmBlock>}
420
+ * @returns {WasmNetwork}
402
421
  */
403
- export function get_block(block_hash) {
404
- const ret = wasm.get_block(addHeapObject(block_hash));
405
- return takeObject(ret);
422
+ export function get_network() {
423
+ const ret = wasm.get_network();
424
+ return WasmNetwork.__wrap(ret);
406
425
  }
407
426
 
408
427
  /**
409
- * @returns {Promise<Array<any>>}
428
+ * @returns {Promise<WasmBlockchain>}
410
429
  */
411
- export function get_mempool_txs() {
412
- const ret = wasm.get_mempool_txs();
430
+ export function get_blockchain() {
431
+ const ret = wasm.get_blockchain();
413
432
  return takeObject(ret);
414
433
  }
415
434
 
416
435
  /**
417
- * @param {WasmBalanceSnapshot} snapshot
418
- * @returns {Promise<void>}
436
+ * @returns {Promise<Array<any>>}
419
437
  */
420
- export function update_from_balance_snapshot(snapshot) {
421
- _assertClass(snapshot, WasmBalanceSnapshot);
422
- var ptr0 = snapshot.__destroy_into_raw();
423
- const ret = wasm.update_from_balance_snapshot(ptr0);
438
+ export function get_mempool_txs() {
439
+ const ret = wasm.get_mempool_txs();
424
440
  return takeObject(ret);
425
441
  }
426
442
 
@@ -434,11 +450,13 @@ export function isPublicKey(key) {
434
450
  }
435
451
 
436
452
  /**
437
- * @param {bigint} peer_id
438
- * @returns {Promise<void>}
453
+ * @param {string | undefined} [url]
454
+ * @returns {Promise<WasmNetworkPeer>}
439
455
  */
440
- export function process_peer_disconnection(peer_id) {
441
- const ret = wasm.process_peer_disconnection(peer_id);
456
+ export function create_network_peer(url) {
457
+ var ptr0 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
458
+ var len0 = WASM_VECTOR_LEN;
459
+ const ret = wasm.create_network_peer(ptr0, len0);
442
460
  return takeObject(ret);
443
461
  }
444
462
 
@@ -456,42 +474,61 @@ export function initialize(config_json, private_key, log_level_num, hasten_multi
456
474
  }
457
475
 
458
476
  /**
459
- * @param {bigint} current_time
460
- * @returns {Promise<void>}
477
+ * @returns {Promise<Array<any>>}
461
478
  */
462
- export function process_stat_interval(current_time) {
463
- const ret = wasm.process_stat_interval(current_time);
479
+ export function get_nft_list() {
480
+ const ret = wasm.get_nft_list();
464
481
  return takeObject(ret);
465
482
  }
466
483
 
467
484
  /**
468
- * @param {bigint} threshold
485
+ * @param {bigint} duration_in_ms
469
486
  * @returns {Promise<void>}
470
487
  */
471
- export function write_issuance_file(threshold) {
472
- const ret = wasm.write_issuance_file(threshold);
488
+ export function process_timer_event(duration_in_ms) {
489
+ const ret = wasm.process_timer_event(duration_in_ms);
473
490
  return takeObject(ret);
474
491
  }
475
492
 
476
493
  /**
477
- * @param {Array<any>} keys
478
- * @returns {Promise<WasmBalanceSnapshot>}
494
+ * @param {bigint} current_time
495
+ * @returns {Promise<void>}
479
496
  */
480
- export function get_balance_snapshot(keys) {
481
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
497
+ export function process_stat_interval(current_time) {
498
+ const ret = wasm.process_stat_interval(current_time);
482
499
  return takeObject(ret);
483
500
  }
484
501
 
485
502
  /**
486
- * @param {bigint} peer_id
487
- * @param {boolean} initiate_handshake
488
- * @returns {Promise<void>}
503
+ * @param {Uint8Array} buffer
504
+ * @returns {string}
489
505
  */
490
- export function process_new_peer(peer_id, initiate_handshake) {
491
- const ret = wasm.process_new_peer(peer_id, initiate_handshake);
506
+ export function hash(buffer) {
507
+ const ret = wasm.hash(addHeapObject(buffer));
492
508
  return takeObject(ret);
493
509
  }
494
510
 
511
+ /**
512
+ * @param {Uint8Array} buffer
513
+ * @param {string} private_key
514
+ * @returns {string}
515
+ */
516
+ export function sign_buffer(buffer, private_key) {
517
+ try {
518
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
519
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
520
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
521
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
522
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
523
+ if (r2) {
524
+ throw takeObject(r1);
525
+ }
526
+ return takeObject(r0);
527
+ } finally {
528
+ wasm.__wbindgen_add_to_stack_pointer(16);
529
+ }
530
+ }
531
+
495
532
  /**
496
533
  * @param {Uint8Array} buffer
497
534
  * @param {string} signature
@@ -504,50 +541,70 @@ export function verify_signature(buffer, signature, public_key) {
504
541
  }
505
542
 
506
543
  /**
507
- * @param {Uint8Array} buffer
508
- * @param {WasmNetworkPeer} peer
509
- * @returns {Promise<Uint8Array>}
544
+ * @param {string} json
545
+ * @returns {Promise<number>}
510
546
  */
511
- export function process_msg_buffer_from_peer(buffer, peer) {
512
- _assertClass(peer, WasmNetworkPeer);
513
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer.__wbg_ptr);
547
+ export function evaluate_script(json) {
548
+ const ret = wasm.evaluate_script(addHeapObject(json));
514
549
  return takeObject(ret);
515
550
  }
516
551
 
517
552
  /**
518
- * @param {string} private_key
553
+ * @param {string} json
554
+ * @param {WasmTransaction} tx
555
+ * @returns {Promise<number>}
556
+ */
557
+ export function evaluate_script_with_transaction(json, tx) {
558
+ _assertClass(tx, WasmTransaction);
559
+ const ret = wasm.evaluate_script_with_transaction(addHeapObject(json), tx.__wbg_ptr);
560
+ return takeObject(ret);
561
+ }
562
+
563
+ /**
564
+ * @param {string} json
519
565
  * @returns {string}
520
566
  */
521
- export function generate_public_key(private_key) {
567
+ export function get_script_hash(json) {
568
+ let deferred1_0;
569
+ let deferred1_1;
522
570
  try {
523
571
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
- wasm.generate_public_key(retptr, addHeapObject(private_key));
572
+ wasm.get_script_hash(retptr, addHeapObject(json));
525
573
  var r0 = getInt32Memory0()[retptr / 4 + 0];
526
574
  var r1 = getInt32Memory0()[retptr / 4 + 1];
527
- var r2 = getInt32Memory0()[retptr / 4 + 2];
528
- if (r2) {
529
- throw takeObject(r1);
530
- }
531
- return takeObject(r0);
575
+ deferred1_0 = r0;
576
+ deferred1_1 = r1;
577
+ return getStringFromWasm0(r0, r1);
532
578
  } finally {
533
579
  wasm.__wbindgen_add_to_stack_pointer(16);
580
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
534
581
  }
535
582
  }
536
583
 
537
584
  /**
538
- * @returns {Promise<Array<any>>}
585
+ * @returns {Promise<string>}
539
586
  */
540
- export function get_nft_list() {
541
- const ret = wasm.get_nft_list();
587
+ export function get_latest_block_hash() {
588
+ const ret = wasm.get_latest_block_hash();
542
589
  return takeObject(ret);
543
590
  }
544
591
 
545
592
  /**
546
- * @param {string} public_key
547
- * @returns {Promise<Array<any>>}
593
+ * @param {string} block_hash
594
+ * @returns {Promise<WasmBlock>}
548
595
  */
549
- export function get_account_slips(public_key) {
550
- const ret = wasm.get_account_slips(addHeapObject(public_key));
596
+ export function get_block(block_hash) {
597
+ const ret = wasm.get_block(addHeapObject(block_hash));
598
+ return takeObject(ret);
599
+ }
600
+
601
+ /**
602
+ * @param {bigint} peer_id
603
+ * @param {boolean} initiate_handshake
604
+ * @returns {Promise<void>}
605
+ */
606
+ export function process_new_peer(peer_id, initiate_handshake) {
607
+ const ret = wasm.process_new_peer(peer_id, initiate_handshake);
551
608
  return takeObject(ret);
552
609
  }
553
610
 
@@ -561,6 +618,48 @@ export function process_stun_peer(peer_id, public_key) {
561
618
  return takeObject(ret);
562
619
  }
563
620
 
621
+ /**
622
+ * @param {bigint} peer_id
623
+ * @param {string} public_key
624
+ * @returns {Promise<void>}
625
+ */
626
+ export function remove_stun_peer(peer_id, public_key) {
627
+ const ret = wasm.remove_stun_peer(peer_id, addHeapObject(public_key));
628
+ return takeObject(ret);
629
+ }
630
+
631
+ /**
632
+ * @param {bigint} peer_id
633
+ * @returns {Promise<void>}
634
+ */
635
+ export function process_peer_disconnection(peer_id) {
636
+ const ret = wasm.process_peer_disconnection(peer_id);
637
+ return takeObject(ret);
638
+ }
639
+
640
+ /**
641
+ * @param {Uint8Array} buffer
642
+ * @param {WasmNetworkPeer} peer
643
+ * @returns {Promise<Uint8Array>}
644
+ */
645
+ export function process_msg_buffer_from_peer(buffer, peer) {
646
+ _assertClass(peer, WasmNetworkPeer);
647
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer.__wbg_ptr);
648
+ return takeObject(ret);
649
+ }
650
+
651
+ /**
652
+ * @param {Uint8Array} buffer
653
+ * @param {Uint8Array} hash
654
+ * @param {bigint} block_id
655
+ * @param {bigint} peer_id
656
+ * @returns {Promise<void>}
657
+ */
658
+ export function process_fetched_block(buffer, hash, block_id, peer_id) {
659
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_id);
660
+ return takeObject(ret);
661
+ }
662
+
564
663
  /**
565
664
  * @param {Uint8Array} hash
566
665
  * @param {bigint} block_id
@@ -572,6 +671,14 @@ export function process_failed_block_fetch(hash, block_id, peer_id) {
572
671
  return takeObject(ret);
573
672
  }
574
673
 
674
+ let stack_pointer = 128;
675
+
676
+ function addBorrowedObject(obj) {
677
+ if (stack_pointer == 1) throw new Error('out of js stack');
678
+ heap[--stack_pointer] = obj;
679
+ return stack_pointer;
680
+ }
681
+
575
682
  const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
576
683
  ? { register: () => {}, unregister: () => {} }
577
684
  : new FinalizationRegistry(ptr => wasm.__wbg_saitowasm_free(ptr >>> 0));
@@ -1123,6 +1230,15 @@ export class WasmBlockchain {
1123
1230
  wasm.__wbg_wasmblockchain_free(ptr);
1124
1231
  }
1125
1232
  /**
1233
+ * @param {number} count
1234
+ * @param {boolean} include_offchain
1235
+ * @returns {Promise<Array<any>>}
1236
+ */
1237
+ get_blocks(count, include_offchain) {
1238
+ const ret = wasm.wasmblockchain_get_blocks(this.__wbg_ptr, count, include_offchain);
1239
+ return takeObject(ret);
1240
+ }
1241
+ /**
1126
1242
  * @returns {Promise<string>}
1127
1243
  */
1128
1244
  get_fork_id() {
@@ -1139,6 +1255,15 @@ export class WasmBlockchain {
1139
1255
  }
1140
1256
  /**
1141
1257
  * @param {bigint} block_id
1258
+ * @param {boolean} include_transactions
1259
+ * @returns {Promise<WasmBlock>}
1260
+ */
1261
+ get_block_by_id(block_id, include_transactions) {
1262
+ const ret = wasm.wasmblockchain_get_block_by_id(this.__wbg_ptr, block_id, include_transactions);
1263
+ return takeObject(ret);
1264
+ }
1265
+ /**
1266
+ * @param {bigint} block_id
1142
1267
  * @returns {Promise<Array<any>>}
1143
1268
  */
1144
1269
  get_hashes_at_id(block_id) {
@@ -1272,17 +1397,26 @@ export class WasmBlockchain {
1272
1397
  return takeObject(ret);
1273
1398
  }
1274
1399
  /**
1275
- * @returns {any}
1400
+ * @returns {Promise<void>}
1276
1401
  */
1277
- get() {
1278
- const ret = wasm.wasmblockchain_get(this.__wbg_ptr);
1402
+ reset() {
1403
+ const ret = wasm.wasmblockchain_reset(this.__wbg_ptr);
1279
1404
  return takeObject(ret);
1280
1405
  }
1281
1406
  /**
1282
- * @returns {Promise<void>}
1407
+ * @param {string} block_hash
1408
+ * @param {boolean} include_transactions
1409
+ * @returns {Promise<WasmBlock>}
1283
1410
  */
1284
- reset() {
1285
- const ret = wasm.wasmblockchain_reset(this.__wbg_ptr);
1411
+ get_block(block_hash, include_transactions) {
1412
+ const ret = wasm.wasmblockchain_get_block(this.__wbg_ptr, addHeapObject(block_hash), include_transactions);
1413
+ return takeObject(ret);
1414
+ }
1415
+ /**
1416
+ * @returns {any}
1417
+ */
1418
+ get() {
1419
+ const ret = wasm.wasmblockchain_get(this.__wbg_ptr);
1286
1420
  return takeObject(ret);
1287
1421
  }
1288
1422
  }
@@ -1692,6 +1826,21 @@ export class WasmNetwork {
1692
1826
  return takeObject(ret);
1693
1827
  }
1694
1828
  /**
1829
+ * @param {string} key
1830
+ * @returns {Promise<WasmPeer | undefined>}
1831
+ */
1832
+ getPeer(key) {
1833
+ const ret = wasm.wasmnetwork_getPeer(this.__wbg_ptr, addHeapObject(key));
1834
+ return takeObject(ret);
1835
+ }
1836
+ /**
1837
+ * @returns {Promise<Array<any>>}
1838
+ */
1839
+ getPeers() {
1840
+ const ret = wasm.wasmnetwork_getPeers(this.__wbg_ptr);
1841
+ return takeObject(ret);
1842
+ }
1843
+ /**
1695
1844
  * @returns {WasmNetworkApi}
1696
1845
  */
1697
1846
  get api() {
@@ -1712,21 +1861,6 @@ export class WasmNetwork {
1712
1861
  const ret = wasm.wasmnetwork_api(this.__wbg_ptr);
1713
1862
  return WasmPeers.__wrap(ret);
1714
1863
  }
1715
- /**
1716
- * @param {string} key
1717
- * @returns {Promise<WasmPeer | undefined>}
1718
- */
1719
- getPeer(key) {
1720
- const ret = wasm.wasmnetwork_getPeer(this.__wbg_ptr, addHeapObject(key));
1721
- return takeObject(ret);
1722
- }
1723
- /**
1724
- * @returns {Promise<Array<any>>}
1725
- */
1726
- getPeers() {
1727
- const ret = wasm.wasmnetwork_getPeers(this.__wbg_ptr);
1728
- return takeObject(ret);
1729
- }
1730
1864
  }
1731
1865
 
1732
1866
  const WasmNetworkApiFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1821,13 +1955,6 @@ export class WasmNetworkPeer {
1821
1955
  return takeObject(ret);
1822
1956
  }
1823
1957
  /**
1824
- * @returns {bigint}
1825
- */
1826
- get_id() {
1827
- const ret = wasm.wasmnetworkpeer_get_id(this.__wbg_ptr);
1828
- return BigInt.asUintN(64, ret);
1829
- }
1830
- /**
1831
1958
  * @returns {Promise<string>}
1832
1959
  */
1833
1960
  get_url() {
@@ -1835,6 +1962,13 @@ export class WasmNetworkPeer {
1835
1962
  return takeObject(ret);
1836
1963
  }
1837
1964
  /**
1965
+ * @returns {bigint}
1966
+ */
1967
+ get_id() {
1968
+ const ret = wasm.wasmnetworkpeer_get_id(this.__wbg_ptr);
1969
+ return BigInt.asUintN(64, ret);
1970
+ }
1971
+ /**
1838
1972
  * @param {bigint} peer_id
1839
1973
  */
1840
1974
  constructor(peer_id) {
@@ -1893,6 +2027,13 @@ export class WasmPeer {
1893
2027
  return takeObject(ret);
1894
2028
  }
1895
2029
  /**
2030
+ * @returns {string}
2031
+ */
2032
+ get protocol() {
2033
+ const ret = wasm.wasmpeer_get_protocol(this.__wbg_ptr);
2034
+ return takeObject(ret);
2035
+ }
2036
+ /**
1896
2037
  * @returns {any}
1897
2038
  */
1898
2039
  get services() {
@@ -1926,6 +2067,20 @@ export class WasmPeer {
1926
2067
  const ret = wasm.wasmnetworkpeer_get_id(this.__wbg_ptr);
1927
2068
  return BigInt.asUintN(64, ret);
1928
2069
  }
2070
+ /**
2071
+ * @returns {string}
2072
+ */
2073
+ get host() {
2074
+ const ret = wasm.wasmpeer_get_host(this.__wbg_ptr);
2075
+ return takeObject(ret);
2076
+ }
2077
+ /**
2078
+ * @returns {number}
2079
+ */
2080
+ get port() {
2081
+ const ret = wasm.wasmpeer_get_port(this.__wbg_ptr);
2082
+ return ret;
2083
+ }
1929
2084
  }
1930
2085
 
1931
2086
  const WasmPeerServiceFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -2236,6 +2391,13 @@ export class WasmTransaction {
2236
2391
  wasm.__wbg_wasmtransaction_free(ptr);
2237
2392
  }
2238
2393
  /**
2394
+ * @returns {Promise<void>}
2395
+ */
2396
+ sign() {
2397
+ const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
2398
+ return takeObject(ret);
2399
+ }
2400
+ /**
2239
2401
  * @returns {bigint}
2240
2402
  */
2241
2403
  get total_fees() {
@@ -2350,13 +2512,6 @@ export class WasmTransaction {
2350
2512
  return takeObject(ret);
2351
2513
  }
2352
2514
  /**
2353
- * @returns {Promise<void>}
2354
- */
2355
- sign() {
2356
- const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
2357
- return takeObject(ret);
2358
- }
2359
- /**
2360
2515
  * @param {string} key
2361
2516
  * @returns {boolean}
2362
2517
  */
@@ -2636,13 +2791,6 @@ export class WasmWallet {
2636
2791
  return takeObject(ret);
2637
2792
  }
2638
2793
  /**
2639
- * @returns {any}
2640
- */
2641
- get() {
2642
- const ret = wasm.wasmwallet_get(this.__wbg_ptr);
2643
- return takeObject(ret);
2644
- }
2645
- /**
2646
2794
  * @param {Array<any>} public_keys
2647
2795
  * @param {BigUint64Array} amounts
2648
2796
  * @param {bigint} fee
@@ -2717,6 +2865,13 @@ export class WasmWallet {
2717
2865
  const ret = wasm.wasmwallet_get_slips(this.__wbg_ptr);
2718
2866
  return takeObject(ret);
2719
2867
  }
2868
+ /**
2869
+ * @returns {any}
2870
+ */
2871
+ get() {
2872
+ const ret = wasm.wasmwallet_get(this.__wbg_ptr);
2873
+ return takeObject(ret);
2874
+ }
2720
2875
  }
2721
2876
 
2722
2877
  const WasmWalletSlipFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -3020,60 +3175,29 @@ function __wbg_get_imports() {
3020
3175
  return addHeapObject(ret);
3021
3176
  };
3022
3177
  imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
3023
- const ret = getObject(arg0).call(getObject(arg1));
3024
- return addHeapObject(ret);
3025
- }, arguments) };
3026
- imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
3027
- const ret = getObject(arg0).length;
3028
- return ret;
3029
- };
3030
- imports.wbg.__wbg_new_5b2a2842270c66e6 = function(arg0) {
3031
- const ret = new BigUint64Array(getObject(arg0));
3032
- return addHeapObject(ret);
3033
- };
3034
- imports.wbg.__wbg_set_dc7aa8fdca321349 = function(arg0, arg1, arg2) {
3035
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3036
- };
3037
- imports.wbg.__wbg_newwithbyteoffsetandlength_f3784c11ba58e531 = function(arg0, arg1, arg2) {
3038
- const ret = new BigUint64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
3039
- return addHeapObject(ret);
3040
- };
3041
- imports.wbg.__wbg_length_a641162bc8055216 = function(arg0) {
3042
- const ret = getObject(arg0).length;
3043
- return ret;
3044
- };
3045
- imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
3046
- let result;
3047
- try {
3048
- result = getObject(arg0) instanceof Uint8Array;
3049
- } catch (_) {
3050
- result = false;
3051
- }
3052
- const ret = result;
3053
- return ret;
3054
- };
3055
- imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
3056
- let result;
3057
- try {
3058
- result = getObject(arg0) instanceof ArrayBuffer;
3059
- } catch (_) {
3060
- result = false;
3061
- }
3062
- const ret = result;
3063
- return ret;
3064
- };
3065
- imports.wbg.__wbg_new_d9bc3a0147634640 = function() {
3066
- const ret = new Map();
3178
+ const ret = getObject(arg0).call(getObject(arg1));
3179
+ return addHeapObject(ret);
3180
+ }, arguments) };
3181
+ imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
3182
+ const ret = Symbol.iterator;
3067
3183
  return addHeapObject(ret);
3068
3184
  };
3069
- imports.wbg.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
3070
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
3185
+ imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
3186
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
3187
+ return addHeapObject(ret);
3188
+ }, arguments) };
3189
+ imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
3190
+ const ret = getObject(arg0).next;
3071
3191
  return addHeapObject(ret);
3072
3192
  };
3073
- imports.wbg.__wbg_now_3014639a94423537 = function() {
3074
- const ret = Date.now();
3193
+ imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
3194
+ const ret = getObject(arg0).push(getObject(arg1));
3075
3195
  return ret;
3076
3196
  };
3197
+ imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
3198
+ const ret = new Array();
3199
+ return addHeapObject(ret);
3200
+ };
3077
3201
  imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {
3078
3202
  const ret = new Array(arg0 >>> 0);
3079
3203
  return addHeapObject(ret);
@@ -3082,31 +3206,66 @@ function __wbg_get_imports() {
3082
3206
  const ret = getObject(arg0)[arg1 >>> 0];
3083
3207
  return addHeapObject(ret);
3084
3208
  };
3085
- imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
3086
- const ret = new Array();
3087
- return addHeapObject(ret);
3088
- };
3089
3209
  imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
3090
3210
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3091
3211
  };
3212
+ imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
3213
+ const ret = Array.isArray(getObject(arg0));
3214
+ return ret;
3215
+ };
3092
3216
  imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
3093
3217
  const ret = getObject(arg0).length;
3094
3218
  return ret;
3095
3219
  };
3096
- imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
3097
- const ret = getObject(arg0).push(getObject(arg1));
3220
+ imports.wbg.__wbg_valueOf_b4771ea2a1ea7469 = function(arg0) {
3221
+ const ret = getObject(arg0).valueOf();
3098
3222
  return ret;
3099
3223
  };
3100
- imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
3101
- const ret = Array.isArray(getObject(arg0));
3224
+ imports.wbg.__wbg_new_d9bc3a0147634640 = function() {
3225
+ const ret = new Map();
3226
+ return addHeapObject(ret);
3227
+ };
3228
+ imports.wbg.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
3229
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
3230
+ return addHeapObject(ret);
3231
+ };
3232
+ imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
3233
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
3234
+ return addHeapObject(ret);
3235
+ }, arguments) };
3236
+ imports.wbg.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
3237
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
3238
+ return addHeapObject(ret);
3239
+ }, arguments) };
3240
+ imports.wbg.__wbg_call_938992c832f74314 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3241
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
3242
+ return addHeapObject(ret);
3243
+ }, arguments) };
3244
+ imports.wbg.__wbg_now_3014639a94423537 = function() {
3245
+ const ret = Date.now();
3102
3246
  return ret;
3103
3247
  };
3104
3248
  imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
3105
3249
  const ret = new Object();
3106
3250
  return addHeapObject(ret);
3107
3251
  };
3108
- imports.wbg.__wbg_valueOf_b4771ea2a1ea7469 = function(arg0) {
3109
- const ret = getObject(arg0).valueOf();
3252
+ imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
3253
+ const ret = getObject(arg0).length;
3254
+ return ret;
3255
+ };
3256
+ imports.wbg.__wbg_new_5b2a2842270c66e6 = function(arg0) {
3257
+ const ret = new BigUint64Array(getObject(arg0));
3258
+ return addHeapObject(ret);
3259
+ };
3260
+ imports.wbg.__wbg_set_dc7aa8fdca321349 = function(arg0, arg1, arg2) {
3261
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3262
+ };
3263
+ imports.wbg.__wbg_newwithbyteoffsetandlength_f3784c11ba58e531 = function(arg0, arg1, arg2) {
3264
+ const ret = new BigUint64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
3265
+ return addHeapObject(ret);
3266
+ };
3267
+ imports.wbg.__wbg_length_a641162bc8055216 = function(arg0) {
3268
+ const ret = getObject(arg0).length;
3110
3269
  return ret;
3111
3270
  };
3112
3271
  imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
@@ -3116,7 +3275,7 @@ function __wbg_get_imports() {
3116
3275
  const a = state0.a;
3117
3276
  state0.a = 0;
3118
3277
  try {
3119
- return __wbg_adapter_83(a, state0.b, arg0, arg1);
3278
+ return __wbg_adapter_91(a, state0.b, arg0, arg1);
3120
3279
  } finally {
3121
3280
  state0.a = a;
3122
3281
  }
@@ -3127,42 +3286,18 @@ function __wbg_get_imports() {
3127
3286
  state0.a = state0.b = 0;
3128
3287
  }
3129
3288
  };
3130
- imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
3131
- const ret = getObject(arg0).then(getObject(arg1));
3132
- return addHeapObject(ret);
3133
- };
3134
3289
  imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
3135
3290
  const ret = Promise.resolve(getObject(arg0));
3136
3291
  return addHeapObject(ret);
3137
3292
  };
3293
+ imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
3294
+ const ret = getObject(arg0).then(getObject(arg1));
3295
+ return addHeapObject(ret);
3296
+ };
3138
3297
  imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {
3139
3298
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
3140
3299
  return ret;
3141
3300
  }, arguments) };
3142
- imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
3143
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
3144
- return addHeapObject(ret);
3145
- }, arguments) };
3146
- imports.wbg.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
3147
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
3148
- return addHeapObject(ret);
3149
- }, arguments) };
3150
- imports.wbg.__wbg_call_938992c832f74314 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3151
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
3152
- return addHeapObject(ret);
3153
- }, arguments) };
3154
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
3155
- const ret = Symbol.iterator;
3156
- return addHeapObject(ret);
3157
- };
3158
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
3159
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
3160
- return addHeapObject(ret);
3161
- }, arguments) };
3162
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
3163
- const ret = getObject(arg0).next;
3164
- return addHeapObject(ret);
3165
- };
3166
3301
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
3167
3302
  const obj = getObject(arg1);
3168
3303
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -3183,6 +3318,26 @@ function __wbg_get_imports() {
3183
3318
  const ret = getObject(arg0).value;
3184
3319
  return addHeapObject(ret);
3185
3320
  };
3321
+ imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
3322
+ let result;
3323
+ try {
3324
+ result = getObject(arg0) instanceof Uint8Array;
3325
+ } catch (_) {
3326
+ result = false;
3327
+ }
3328
+ const ret = result;
3329
+ return ret;
3330
+ };
3331
+ imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
3332
+ let result;
3333
+ try {
3334
+ result = getObject(arg0) instanceof ArrayBuffer;
3335
+ } catch (_) {
3336
+ result = false;
3337
+ }
3338
+ const ret = result;
3339
+ return ret;
3340
+ };
3186
3341
  imports.wbg.__wbindgen_number_new = function(arg0) {
3187
3342
  const ret = arg0;
3188
3343
  return addHeapObject(ret);
@@ -3194,7 +3349,59 @@ function __wbg_get_imports() {
3194
3349
  imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
3195
3350
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3196
3351
  };
3197
- imports.wbg.__wbg_flushdata_15c72fd141afd1f6 = function(arg0, arg1) {
3352
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
3353
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
3354
+ return addHeapObject(ret);
3355
+ };
3356
+ imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
3357
+ const ret = getObject(arg0)[getObject(arg1)];
3358
+ return addHeapObject(ret);
3359
+ };
3360
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
3361
+ const ret = getObject(arg0) in getObject(arg1);
3362
+ return ret;
3363
+ };
3364
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
3365
+ const ret = WasmPeer.__wrap(arg0);
3366
+ return addHeapObject(ret);
3367
+ };
3368
+ imports.wbg.__wbg_wasmblock_new = function(arg0) {
3369
+ const ret = WasmBlock.__wrap(arg0);
3370
+ return addHeapObject(ret);
3371
+ };
3372
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
3373
+ const ret = WasmTransaction.__wrap(arg0);
3374
+ return addHeapObject(ret);
3375
+ };
3376
+ imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
3377
+ const ret = WasmWalletSlip.__wrap(arg0);
3378
+ return addHeapObject(ret);
3379
+ };
3380
+ imports.wbg.__wbg_wasmnetworkpeer_new = function(arg0) {
3381
+ const ret = WasmNetworkPeer.__wrap(arg0);
3382
+ return addHeapObject(ret);
3383
+ };
3384
+ imports.wbg.__wbg_wasmslip_new = function(arg0) {
3385
+ const ret = WasmSlip.__wrap(arg0);
3386
+ return addHeapObject(ret);
3387
+ };
3388
+ imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
3389
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
3390
+ return addHeapObject(ret);
3391
+ };
3392
+ imports.wbg.__wbg_wasmwallet_new = function(arg0) {
3393
+ const ret = WasmWallet.__wrap(arg0);
3394
+ return addHeapObject(ret);
3395
+ };
3396
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
3397
+ const ret = WasmBlockchain.__wrap(arg0);
3398
+ return addHeapObject(ret);
3399
+ };
3400
+ imports.wbg.__wbg_wasmnft_new = function(arg0) {
3401
+ const ret = WasmNFT.__wrap(arg0);
3402
+ return addHeapObject(ret);
3403
+ };
3404
+ imports.wbg.__wbg_flushdata_9ece0e84eb7462e3 = function(arg0, arg1) {
3198
3405
  let deferred0_0;
3199
3406
  let deferred0_1;
3200
3407
  try {
@@ -3205,7 +3412,7 @@ function __wbg_get_imports() {
3205
3412
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3206
3413
  }
3207
3414
  };
3208
- imports.wbg.__wbg_readvalue_69a3f2e88a3c946e = function() { return handleError(function (arg0, arg1) {
3415
+ imports.wbg.__wbg_readvalue_67f8062fd6fa00ec = function() { return handleError(function (arg0, arg1) {
3209
3416
  let deferred0_0;
3210
3417
  let deferred0_1;
3211
3418
  try {
@@ -3217,13 +3424,13 @@ function __wbg_get_imports() {
3217
3424
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3218
3425
  }
3219
3426
  }, arguments) };
3220
- imports.wbg.__wbg_loadwallet_513ce6acad23df9a = function() {
3427
+ imports.wbg.__wbg_loadwallet_1e41cbb5ea438afc = function() {
3221
3428
  MsgHandler.load_wallet();
3222
3429
  };
3223
- imports.wbg.__wbg_savewallet_9aec487e01fc9fd2 = function() {
3430
+ imports.wbg.__wbg_savewallet_515ec9471bebaf69 = function() {
3224
3431
  MsgHandler.save_wallet();
3225
3432
  };
3226
- imports.wbg.__wbg_writevalue_1520a480bb7c22ad = function(arg0, arg1, arg2) {
3433
+ imports.wbg.__wbg_writevalue_9b57371e9f40783d = function(arg0, arg1, arg2) {
3227
3434
  let deferred0_0;
3228
3435
  let deferred0_1;
3229
3436
  try {
@@ -3234,7 +3441,7 @@ function __wbg_get_imports() {
3234
3441
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3235
3442
  }
3236
3443
  };
3237
- imports.wbg.__wbg_appendvalue_581d6c9ae5452456 = function(arg0, arg1, arg2) {
3444
+ imports.wbg.__wbg_appendvalue_85b932d641763676 = function(arg0, arg1, arg2) {
3238
3445
  let deferred0_0;
3239
3446
  let deferred0_1;
3240
3447
  try {
@@ -3245,7 +3452,7 @@ function __wbg_get_imports() {
3245
3452
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3246
3453
  }
3247
3454
  };
3248
- imports.wbg.__wbg_removevalue_dd1985a9a11c06d0 = function() { return handleError(function (arg0, arg1) {
3455
+ imports.wbg.__wbg_removevalue_f00e02247f09aa21 = function() { return handleError(function (arg0, arg1) {
3249
3456
  let deferred0_0;
3250
3457
  let deferred0_1;
3251
3458
  try {
@@ -3257,7 +3464,7 @@ function __wbg_get_imports() {
3257
3464
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3258
3465
  }
3259
3466
  }, arguments) };
3260
- imports.wbg.__wbg_sendmessage_f113d492eb4524b5 = function(arg0, arg1, arg2) {
3467
+ imports.wbg.__wbg_sendmessage_0daf407989ca8b40 = function(arg0, arg1, arg2) {
3261
3468
  let deferred0_0;
3262
3469
  let deferred0_1;
3263
3470
  try {
@@ -3268,7 +3475,7 @@ function __wbg_get_imports() {
3268
3475
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3269
3476
  }
3270
3477
  };
3271
- imports.wbg.__wbg_connecttopeer_50c2d98a86c4e5b6 = function() { return handleError(function (arg0, arg1) {
3478
+ imports.wbg.__wbg_connecttopeer_78667955172c1b64 = function() { return handleError(function (arg0, arg1) {
3272
3479
  let deferred0_0;
3273
3480
  let deferred0_1;
3274
3481
  try {
@@ -3280,13 +3487,7 @@ function __wbg_get_imports() {
3280
3487
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3281
3488
  }
3282
3489
  }, arguments) };
3283
- imports.wbg.__wbg_getmyservices_cc19d8692abbc29e = function() {
3284
- const ret = MsgHandler.get_my_services();
3285
- _assertClass(ret, WasmPeerServiceList);
3286
- var ptr1 = ret.__destroy_into_raw();
3287
- return ptr1;
3288
- };
3289
- imports.wbg.__wbg_isexistingfile_1a7b6ec3d354fe47 = function() { return handleError(function (arg0, arg1) {
3490
+ imports.wbg.__wbg_isexistingfile_c568db3c025a33e4 = function() { return handleError(function (arg0, arg1) {
3290
3491
  let deferred0_0;
3291
3492
  let deferred0_1;
3292
3493
  try {
@@ -3298,7 +3499,7 @@ function __wbg_get_imports() {
3298
3499
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3299
3500
  }
3300
3501
  }, arguments) };
3301
- imports.wbg.__wbg_processapicall_1e58d2a1f1ee5c8f = function(arg0, arg1, arg2, arg3) {
3502
+ imports.wbg.__wbg_processapicall_2d751e023280ca3d = function(arg0, arg1, arg2, arg3) {
3302
3503
  let deferred0_0;
3303
3504
  let deferred0_1;
3304
3505
  try {
@@ -3309,7 +3510,7 @@ function __wbg_get_imports() {
3309
3510
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3310
3511
  }
3311
3512
  };
3312
- imports.wbg.__wbg_processapierror_10fc62fff96aca4e = function(arg0, arg1, arg2, arg3) {
3513
+ imports.wbg.__wbg_processapierror_4826eb89adba3884 = function(arg0, arg1, arg2, arg3) {
3313
3514
  let deferred0_0;
3314
3515
  let deferred0_1;
3315
3516
  try {
@@ -3320,7 +3521,7 @@ function __wbg_get_imports() {
3320
3521
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3321
3522
  }
3322
3523
  };
3323
- imports.wbg.__wbg_processapisuccess_115f7ccf9993b8bb = function(arg0, arg1, arg2, arg3) {
3524
+ imports.wbg.__wbg_processapisuccess_fa0856e746ec1f81 = function(arg0, arg1, arg2, arg3) {
3324
3525
  let deferred0_0;
3325
3526
  let deferred0_1;
3326
3527
  try {
@@ -3331,21 +3532,18 @@ function __wbg_get_imports() {
3331
3532
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3332
3533
  }
3333
3534
  };
3334
- imports.wbg.__wbg_sendmessagetoall_3a2755dbde8c724b = function(arg0, arg1) {
3535
+ imports.wbg.__wbg_sendmessagetoall_4b1ea082c4e969dd = function(arg0, arg1) {
3335
3536
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
3336
3537
  };
3337
- imports.wbg.__wbg_disconnectfrompeer_6b3a9c09ca632433 = function() { return handleError(function (arg0) {
3538
+ imports.wbg.__wbg_disconnectfrompeer_b486d43e000ce035 = function() { return handleError(function (arg0) {
3338
3539
  const ret = MsgHandler.disconnect_from_peer(BigInt.asUintN(64, arg0));
3339
3540
  return addHeapObject(ret);
3340
3541
  }, arguments) };
3341
- imports.wbg.__wbg_loadblockfilelist_233c686ce335ec67 = function() { return handleError(function () {
3542
+ imports.wbg.__wbg_loadblockfilelist_59d21845541aa7f6 = function() { return handleError(function () {
3342
3543
  const ret = MsgHandler.load_block_file_list();
3343
3544
  return addHeapObject(ret);
3344
3545
  }, arguments) };
3345
- imports.wbg.__wbg_emitinterfaceevent_141e012d55133e7f = function(arg0, arg1, arg2, arg3) {
3346
- MsgHandler.emit_interface_event(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
3347
- };
3348
- imports.wbg.__wbg_fetchblockfrompeer_3c7bd808808548a3 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3546
+ imports.wbg.__wbg_fetchblockfrompeer_86df2b7bab93a76f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3349
3547
  let deferred0_0;
3350
3548
  let deferred0_1;
3351
3549
  try {
@@ -3357,7 +3555,19 @@ function __wbg_get_imports() {
3357
3555
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3358
3556
  }
3359
3557
  }, arguments) };
3360
- imports.wbg.__wbg_ensuredirectoryexists_46fdedb3a33ad8ed = function() { return handleError(function (arg0, arg1) {
3558
+ imports.wbg.__wbg_sendmessagebypeerid_97c4b297d1ae6e07 = function(arg0, arg1) {
3559
+ MsgHandler.send_message_by_peer_id(BigInt.asUintN(64, arg0), getObject(arg1));
3560
+ };
3561
+ imports.wbg.__wbg_getmyservices_5fbf6dacc06df628 = function() {
3562
+ const ret = MsgHandler.get_my_services();
3563
+ _assertClass(ret, WasmPeerServiceList);
3564
+ var ptr1 = ret.__destroy_into_raw();
3565
+ return ptr1;
3566
+ };
3567
+ imports.wbg.__wbg_emitinterfaceevent_88ce821fcc3034c0 = function(arg0, arg1, arg2, arg3) {
3568
+ MsgHandler.emit_interface_event(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
3569
+ };
3570
+ imports.wbg.__wbg_ensuredirectoryexists_1e42102868fcc2ae = function() { return handleError(function (arg0, arg1) {
3361
3571
  let deferred0_0;
3362
3572
  let deferred0_1;
3363
3573
  try {
@@ -3368,61 +3578,6 @@ function __wbg_get_imports() {
3368
3578
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3369
3579
  }
3370
3580
  }, arguments) };
3371
- imports.wbg.__wbg_sendmessagebypeerid_571fb58dab25fe97 = function(arg0, arg1) {
3372
- MsgHandler.send_message_by_peer_id(BigInt.asUintN(64, arg0), getObject(arg1));
3373
- };
3374
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
3375
- const ret = WasmTransaction.__wrap(arg0);
3376
- return addHeapObject(ret);
3377
- };
3378
- imports.wbg.__wbg_wasmslip_new = function(arg0) {
3379
- const ret = WasmSlip.__wrap(arg0);
3380
- return addHeapObject(ret);
3381
- };
3382
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
3383
- const ret = WasmBlockchain.__wrap(arg0);
3384
- return addHeapObject(ret);
3385
- };
3386
- imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
3387
- const ret = WasmBalanceSnapshot.__wrap(arg0);
3388
- return addHeapObject(ret);
3389
- };
3390
- imports.wbg.__wbg_wasmwallet_new = function(arg0) {
3391
- const ret = WasmWallet.__wrap(arg0);
3392
- return addHeapObject(ret);
3393
- };
3394
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
3395
- const ret = WasmPeer.__wrap(arg0);
3396
- return addHeapObject(ret);
3397
- };
3398
- imports.wbg.__wbg_wasmnft_new = function(arg0) {
3399
- const ret = WasmNFT.__wrap(arg0);
3400
- return addHeapObject(ret);
3401
- };
3402
- imports.wbg.__wbg_wasmnetworkpeer_new = function(arg0) {
3403
- const ret = WasmNetworkPeer.__wrap(arg0);
3404
- return addHeapObject(ret);
3405
- };
3406
- imports.wbg.__wbg_wasmblock_new = function(arg0) {
3407
- const ret = WasmBlock.__wrap(arg0);
3408
- return addHeapObject(ret);
3409
- };
3410
- imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
3411
- const ret = WasmWalletSlip.__wrap(arg0);
3412
- return addHeapObject(ret);
3413
- };
3414
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
3415
- const ret = new Error(getStringFromWasm0(arg0, arg1));
3416
- return addHeapObject(ret);
3417
- };
3418
- imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
3419
- const ret = getObject(arg0)[getObject(arg1)];
3420
- return addHeapObject(ret);
3421
- };
3422
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
3423
- const ret = getObject(arg0) in getObject(arg1);
3424
- return ret;
3425
- };
3426
3581
  imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
3427
3582
  const ret = WasmPeerService.__wrap(arg0);
3428
3583
  return addHeapObject(ret);
@@ -3456,9 +3611,6 @@ function __wbg_get_imports() {
3456
3611
  getInt32Memory0()[arg0 / 4 + 1] = len1;
3457
3612
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3458
3613
  };
3459
- imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
3460
- queueMicrotask(getObject(arg0));
3461
- };
3462
3614
  imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
3463
3615
  const ret = getObject(arg0).queueMicrotask;
3464
3616
  return addHeapObject(ret);
@@ -3472,6 +3624,9 @@ function __wbg_get_imports() {
3472
3624
  const ret = false;
3473
3625
  return ret;
3474
3626
  };
3627
+ imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
3628
+ queueMicrotask(getObject(arg0));
3629
+ };
3475
3630
  imports.wbg.__wbg_info_80803d9a3f0aad16 = function(arg0, arg1, arg2, arg3) {
3476
3631
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
3477
3632
  };
@@ -3484,8 +3639,8 @@ function __wbg_get_imports() {
3484
3639
  imports.wbg.__wbg_error_696630710900ec44 = function(arg0, arg1, arg2, arg3) {
3485
3640
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
3486
3641
  };
3487
- imports.wbg.__wbindgen_closure_wrapper2900 = function(arg0, arg1, arg2) {
3488
- const ret = makeMutClosure(arg0, arg1, 805, __wbg_adapter_40);
3642
+ imports.wbg.__wbindgen_closure_wrapper2970 = function(arg0, arg1, arg2) {
3643
+ const ret = makeMutClosure(arg0, arg1, 827, __wbg_adapter_40);
3489
3644
  return addHeapObject(ret);
3490
3645
  };
3491
3646
 
@@ -3501,6 +3656,7 @@ function __wbg_finalize_init(instance, module) {
3501
3656
  __wbg_init.__wbindgen_wasm_module = module;
3502
3657
  cachedFloat64Memory0 = null;
3503
3658
  cachedInt32Memory0 = null;
3659
+ cachedUint32Memory0 = null;
3504
3660
  cachedUint8Memory0 = null;
3505
3661
 
3506
3662