saito-wasm 0.2.239 → 0.2.242

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/node/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  let imports = {};
2
2
  imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
- const { MsgHandler } = require(String.raw`./snippets/saito-wasm-785d0781d8caf60c/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-5f70c6a4e79426c7/js/msg_handler.js`);
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
7
  const heap = new Array(128).fill(undefined);
@@ -225,7 +225,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
225
225
  return real;
226
226
  }
227
227
  function __wbg_adapter_40(arg0, arg1, arg2) {
228
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h39c9a967ba047c79(arg0, arg1, addHeapObject(arg2));
228
+ wasm._dyn_core_9b3796e30d99ddb7___ops__function__FnMut_______Output______as_wasm_bindgen_9c0a948636c8b8c4___closure__WasmClosure___describe__invoke___wasm_bindgen_9c0a948636c8b8c4___JsValue_____(arg0, arg1, addHeapObject(arg2));
229
229
  }
230
230
 
231
231
  function handleError(f, args) {
@@ -235,8 +235,8 @@ function handleError(f, args) {
235
235
  wasm.__wbindgen_exn_store(addHeapObject(e));
236
236
  }
237
237
  }
238
- function __wbg_adapter_83(arg0, arg1, arg2, arg3) {
239
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h01747b21cbcb5f0a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
238
+ function __wbg_adapter_91(arg0, arg1, arg2, arg3) {
239
+ wasm.wasm_bindgen_9c0a948636c8b8c4___convert__closures__invoke2_mut___wasm_bindgen_9c0a948636c8b8c4___JsValue__wasm_bindgen_9c0a948636c8b8c4___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
240
240
  }
241
241
 
242
242
  function _assertClass(instance, klass) {
@@ -245,35 +245,67 @@ function _assertClass(instance, klass) {
245
245
  }
246
246
  return instance.ptr;
247
247
  }
248
+ /**
249
+ * @param {string} json
250
+ * @returns {string}
251
+ */
252
+ module.exports.get_script_address = function(json) {
253
+ let deferred1_0;
254
+ let deferred1_1;
255
+ try {
256
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
257
+ wasm.get_script_address(retptr, addHeapObject(json));
258
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
259
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
260
+ deferred1_0 = r0;
261
+ deferred1_1 = r1;
262
+ return getStringFromWasm0(r0, r1);
263
+ } finally {
264
+ wasm.__wbindgen_add_to_stack_pointer(16);
265
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
266
+ }
267
+ };
248
268
 
249
- let stack_pointer = 128;
250
-
251
- function addBorrowedObject(obj) {
252
- if (stack_pointer == 1) throw new Error('out of js stack');
253
- heap[--stack_pointer] = obj;
254
- return stack_pointer;
255
- }
256
269
  /**
257
- * @param {Uint8Array} buffer
258
- * @param {string} private_key
270
+ * @param {string} script_json
271
+ * @param {string} witness_json
259
272
  * @returns {string}
260
273
  */
261
- module.exports.sign_buffer = function(buffer, private_key) {
274
+ module.exports.merge_witness = function(script_json, witness_json) {
275
+ let deferred1_0;
276
+ let deferred1_1;
262
277
  try {
263
278
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
264
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
279
+ wasm.merge_witness(retptr, addHeapObject(script_json), addHeapObject(witness_json));
265
280
  var r0 = getInt32Memory0()[retptr / 4 + 0];
266
281
  var r1 = getInt32Memory0()[retptr / 4 + 1];
267
- var r2 = getInt32Memory0()[retptr / 4 + 2];
268
- if (r2) {
269
- throw takeObject(r1);
270
- }
271
- return takeObject(r0);
282
+ deferred1_0 = r0;
283
+ deferred1_1 = r1;
284
+ return getStringFromWasm0(r0, r1);
272
285
  } finally {
273
286
  wasm.__wbindgen_add_to_stack_pointer(16);
287
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
274
288
  }
275
289
  };
276
290
 
291
+ /**
292
+ * @param {string} public_key
293
+ * @returns {Promise<Array<any>>}
294
+ */
295
+ module.exports.get_account_slips = function(public_key) {
296
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
297
+ return takeObject(ret);
298
+ };
299
+
300
+ /**
301
+ * @param {Array<any>} keys
302
+ * @returns {Promise<WasmBalanceSnapshot>}
303
+ */
304
+ module.exports.get_balance_snapshot = function(keys) {
305
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
306
+ return takeObject(ret);
307
+ };
308
+
277
309
  /**
278
310
  * @param {bigint} threshold
279
311
  * @returns {Promise<void>}
@@ -284,20 +316,58 @@ module.exports.write_issuance_file = function(threshold) {
284
316
  };
285
317
 
286
318
  /**
287
- * @param {bigint} peer_id
288
- * @param {string} public_key
289
319
  * @returns {Promise<void>}
290
320
  */
291
- module.exports.process_stun_peer = function(peer_id, public_key) {
292
- const ret = wasm.process_stun_peer(peer_id, addHeapObject(public_key));
321
+ module.exports.disable_producing_blocks_by_timer = function() {
322
+ const ret = wasm.disable_producing_blocks_by_timer();
293
323
  return takeObject(ret);
294
324
  };
295
325
 
296
326
  /**
327
+ * @returns {Promise<void>}
328
+ */
329
+ module.exports.enable_producing_blocks_by_timer = function() {
330
+ const ret = wasm.enable_producing_blocks_by_timer();
331
+ return takeObject(ret);
332
+ };
333
+
334
+ let cachedUint32Memory0 = null;
335
+
336
+ function getUint32Memory0() {
337
+ if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
338
+ cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
339
+ }
340
+ return cachedUint32Memory0;
341
+ }
342
+
343
+ function passArrayJsValueToWasm0(array, malloc) {
344
+ const ptr = malloc(array.length * 4, 4) >>> 0;
345
+ const mem = getUint32Memory0();
346
+ for (let i = 0; i < array.length; i++) {
347
+ mem[ptr / 4 + i] = addHeapObject(array[i]);
348
+ }
349
+ WASM_VECTOR_LEN = array.length;
350
+ return ptr;
351
+ }
352
+ /**
353
+ * @param {(Uint8Array)[] | undefined} [extra_txs]
354
+ * @returns {Promise<boolean>}
355
+ */
356
+ module.exports.produce_block_with_gt = function(extra_txs) {
357
+ var ptr0 = isLikeNone(extra_txs) ? 0 : passArrayJsValueToWasm0(extra_txs, wasm.__wbindgen_malloc);
358
+ var len0 = WASM_VECTOR_LEN;
359
+ const ret = wasm.produce_block_with_gt(ptr0, len0);
360
+ return takeObject(ret);
361
+ };
362
+
363
+ /**
364
+ * @param {(Uint8Array)[] | undefined} [extra_txs]
297
365
  * @returns {Promise<boolean>}
298
366
  */
299
- module.exports.produce_block_without_gt = function() {
300
- const ret = wasm.produce_block_without_gt();
367
+ module.exports.produce_block_without_gt = function(extra_txs) {
368
+ var ptr0 = isLikeNone(extra_txs) ? 0 : passArrayJsValueToWasm0(extra_txs, wasm.__wbindgen_malloc);
369
+ var len0 = WASM_VECTOR_LEN;
370
+ const ret = wasm.produce_block_without_gt(ptr0, len0);
301
371
  return takeObject(ret);
302
372
  };
303
373
 
@@ -313,132 +383,142 @@ module.exports.update_from_balance_snapshot = function(snapshot) {
313
383
  };
314
384
 
315
385
  /**
316
- * @returns {Promise<void>}
386
+ * @returns {string}
317
387
  */
318
- module.exports.disable_producing_blocks_by_timer = function() {
319
- const ret = wasm.disable_producing_blocks_by_timer();
388
+ module.exports.generate_private_key = function() {
389
+ const ret = wasm.generate_private_key();
320
390
  return takeObject(ret);
321
391
  };
322
392
 
323
393
  /**
324
- * @param {Uint8Array} hash
325
- * @param {bigint} block_id
326
- * @param {bigint} peer_id
327
- * @returns {Promise<void>}
394
+ * @param {string} private_key
395
+ * @returns {string}
328
396
  */
329
- module.exports.process_failed_block_fetch = function(hash, block_id, peer_id) {
330
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_id);
331
- return takeObject(ret);
397
+ module.exports.generate_public_key = function(private_key) {
398
+ try {
399
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
400
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
401
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
402
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
403
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
404
+ if (r2) {
405
+ throw takeObject(r1);
406
+ }
407
+ return takeObject(r0);
408
+ } finally {
409
+ wasm.__wbindgen_add_to_stack_pointer(16);
410
+ }
332
411
  };
333
412
 
334
413
  /**
335
- * @param {string} block_hash
336
- * @returns {Promise<WasmBlock>}
414
+ * @returns {Promise<WasmWallet>}
337
415
  */
338
- module.exports.get_block = function(block_hash) {
339
- const ret = wasm.get_block(addHeapObject(block_hash));
416
+ module.exports.get_wallet = function() {
417
+ const ret = wasm.get_wallet();
340
418
  return takeObject(ret);
341
419
  };
342
420
 
343
421
  /**
344
- * @param {string} key
345
- * @returns {boolean}
422
+ * @returns {WasmNetwork}
346
423
  */
347
- module.exports.isPublicKey = function(key) {
348
- const ret = wasm.isPublicKey(addHeapObject(key));
349
- return ret !== 0;
424
+ module.exports.get_network = function() {
425
+ const ret = wasm.get_network();
426
+ return WasmNetwork.__wrap(ret);
350
427
  };
351
428
 
352
429
  /**
353
- * @param {Uint8Array} buffer
354
- * @returns {string}
430
+ * @returns {Promise<WasmBlockchain>}
355
431
  */
356
- module.exports.hash = function(buffer) {
357
- const ret = wasm.hash(addHeapObject(buffer));
432
+ module.exports.get_blockchain = function() {
433
+ const ret = wasm.get_blockchain();
358
434
  return takeObject(ret);
359
435
  };
360
436
 
361
437
  /**
362
- * @param {Array<any>} keys
363
- * @returns {Promise<WasmBalanceSnapshot>}
438
+ * @returns {Promise<Array<any>>}
364
439
  */
365
- module.exports.get_balance_snapshot = function(keys) {
366
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
440
+ module.exports.get_mempool_txs = function() {
441
+ const ret = wasm.get_mempool_txs();
367
442
  return takeObject(ret);
368
443
  };
369
444
 
370
445
  /**
371
- * @param {Uint8Array} buffer
372
- * @param {string} signature
373
- * @param {string} public_key
446
+ * @param {string} key
374
447
  * @returns {boolean}
375
448
  */
376
- module.exports.verify_signature = function(buffer, signature, public_key) {
377
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
449
+ module.exports.isPublicKey = function(key) {
450
+ const ret = wasm.isPublicKey(addHeapObject(key));
378
451
  return ret !== 0;
379
452
  };
380
453
 
381
454
  /**
382
- * @returns {Promise<string>}
455
+ * @param {string | undefined} [url]
456
+ * @returns {Promise<WasmNetworkPeer>}
383
457
  */
384
- module.exports.get_latest_block_hash = function() {
385
- const ret = wasm.get_latest_block_hash();
458
+ module.exports.create_network_peer = function(url) {
459
+ var ptr0 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
460
+ var len0 = WASM_VECTOR_LEN;
461
+ const ret = wasm.create_network_peer(ptr0, len0);
386
462
  return takeObject(ret);
387
463
  };
388
464
 
389
465
  /**
390
- * @returns {Promise<boolean>}
466
+ * @param {string} config_json
467
+ * @param {string} private_key
468
+ * @param {number} log_level_num
469
+ * @param {bigint} hasten_multiplier
470
+ * @param {boolean} delete_old_blocks
471
+ * @returns {Promise<any>}
391
472
  */
392
- module.exports.produce_block_with_gt = function() {
393
- const ret = wasm.produce_block_with_gt();
473
+ module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
474
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
394
475
  return takeObject(ret);
395
476
  };
396
477
 
397
478
  /**
398
- * @param {bigint} peer_id
399
- * @returns {Promise<void>}
479
+ * @returns {Promise<Array<any>>}
400
480
  */
401
- module.exports.process_peer_disconnection = function(peer_id) {
402
- const ret = wasm.process_peer_disconnection(peer_id);
481
+ module.exports.get_nft_list = function() {
482
+ const ret = wasm.get_nft_list();
403
483
  return takeObject(ret);
404
484
  };
405
485
 
406
486
  /**
407
- * @returns {Promise<WasmBlockchain>}
487
+ * @param {bigint} duration_in_ms
488
+ * @returns {Promise<void>}
408
489
  */
409
- module.exports.get_blockchain = function() {
410
- const ret = wasm.get_blockchain();
490
+ module.exports.process_timer_event = function(duration_in_ms) {
491
+ const ret = wasm.process_timer_event(duration_in_ms);
411
492
  return takeObject(ret);
412
493
  };
413
494
 
414
495
  /**
415
- * @param {bigint} peer_id
416
- * @param {string} public_key
496
+ * @param {bigint} current_time
417
497
  * @returns {Promise<void>}
418
498
  */
419
- module.exports.remove_stun_peer = function(peer_id, public_key) {
420
- const ret = wasm.remove_stun_peer(peer_id, addHeapObject(public_key));
499
+ module.exports.process_stat_interval = function(current_time) {
500
+ const ret = wasm.process_stat_interval(current_time);
421
501
  return takeObject(ret);
422
502
  };
423
503
 
424
504
  /**
425
- * @param {bigint} peer_id
426
- * @param {boolean} initiate_handshake
427
- * @returns {Promise<void>}
505
+ * @param {Uint8Array} buffer
506
+ * @returns {string}
428
507
  */
429
- module.exports.process_new_peer = function(peer_id, initiate_handshake) {
430
- const ret = wasm.process_new_peer(peer_id, initiate_handshake);
508
+ module.exports.hash = function(buffer) {
509
+ const ret = wasm.hash(addHeapObject(buffer));
431
510
  return takeObject(ret);
432
511
  };
433
512
 
434
513
  /**
514
+ * @param {Uint8Array} buffer
435
515
  * @param {string} private_key
436
516
  * @returns {string}
437
517
  */
438
- module.exports.generate_public_key = function(private_key) {
518
+ module.exports.sign_buffer = function(buffer, private_key) {
439
519
  try {
440
520
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
441
- wasm.generate_public_key(retptr, addHeapObject(private_key));
521
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
442
522
  var r0 = getInt32Memory0()[retptr / 4 + 0];
443
523
  var r1 = getInt32Memory0()[retptr / 4 + 1];
444
524
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -452,98 +532,110 @@ module.exports.generate_public_key = function(private_key) {
452
532
  };
453
533
 
454
534
  /**
455
- * @param {string | undefined} [url]
456
- * @returns {Promise<WasmNetworkPeer>}
535
+ * @param {Uint8Array} buffer
536
+ * @param {string} signature
537
+ * @param {string} public_key
538
+ * @returns {boolean}
457
539
  */
458
- module.exports.create_network_peer = function(url) {
459
- var ptr0 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
460
- var len0 = WASM_VECTOR_LEN;
461
- const ret = wasm.create_network_peer(ptr0, len0);
462
- return takeObject(ret);
540
+ module.exports.verify_signature = function(buffer, signature, public_key) {
541
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
542
+ return ret !== 0;
463
543
  };
464
544
 
465
545
  /**
466
- * @returns {WasmNetwork}
546
+ * @param {string} json
547
+ * @returns {Promise<number>}
467
548
  */
468
- module.exports.get_network = function() {
469
- const ret = wasm.get_network();
470
- return WasmNetwork.__wrap(ret);
549
+ module.exports.evaluate_script = function(json) {
550
+ const ret = wasm.evaluate_script(addHeapObject(json));
551
+ return takeObject(ret);
471
552
  };
472
553
 
473
554
  /**
474
- * @param {Uint8Array} buffer
475
- * @param {Uint8Array} hash
476
- * @param {bigint} block_id
477
- * @param {bigint} peer_id
478
- * @returns {Promise<void>}
555
+ * @param {string} json
556
+ * @param {WasmTransaction} tx
557
+ * @returns {Promise<number>}
479
558
  */
480
- module.exports.process_fetched_block = function(buffer, hash, block_id, peer_id) {
481
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_id);
559
+ module.exports.evaluate_script_with_transaction = function(json, tx) {
560
+ _assertClass(tx, WasmTransaction);
561
+ const ret = wasm.evaluate_script_with_transaction(addHeapObject(json), tx.__wbg_ptr);
482
562
  return takeObject(ret);
483
563
  };
484
564
 
485
565
  /**
486
566
  * @param {string} json
487
- * @returns {Promise<number>}
567
+ * @returns {string}
488
568
  */
489
- module.exports.evaluate_script = function(json) {
490
- const ret = wasm.evaluate_script(addHeapObject(json));
491
- return takeObject(ret);
569
+ module.exports.get_script_hash = function(json) {
570
+ let deferred1_0;
571
+ let deferred1_1;
572
+ try {
573
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
574
+ wasm.get_script_hash(retptr, addHeapObject(json));
575
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
576
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
577
+ deferred1_0 = r0;
578
+ deferred1_1 = r1;
579
+ return getStringFromWasm0(r0, r1);
580
+ } finally {
581
+ wasm.__wbindgen_add_to_stack_pointer(16);
582
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
583
+ }
492
584
  };
493
585
 
494
586
  /**
495
- * @param {bigint} current_time
496
- * @returns {Promise<void>}
587
+ * @returns {Promise<string>}
497
588
  */
498
- module.exports.process_stat_interval = function(current_time) {
499
- const ret = wasm.process_stat_interval(current_time);
589
+ module.exports.get_latest_block_hash = function() {
590
+ const ret = wasm.get_latest_block_hash();
500
591
  return takeObject(ret);
501
592
  };
502
593
 
503
594
  /**
504
- * @param {string} public_key
505
- * @returns {Promise<Array<any>>}
595
+ * @param {string} block_hash
596
+ * @returns {Promise<WasmBlock>}
506
597
  */
507
- module.exports.get_account_slips = function(public_key) {
508
- const ret = wasm.get_account_slips(addHeapObject(public_key));
598
+ module.exports.get_block = function(block_hash) {
599
+ const ret = wasm.get_block(addHeapObject(block_hash));
509
600
  return takeObject(ret);
510
601
  };
511
602
 
512
603
  /**
513
- * @param {string} config_json
514
- * @param {string} private_key
515
- * @param {number} log_level_num
516
- * @param {bigint} hasten_multiplier
517
- * @param {boolean} delete_old_blocks
518
- * @returns {Promise<any>}
604
+ * @param {bigint} peer_id
605
+ * @param {boolean} initiate_handshake
606
+ * @returns {Promise<void>}
519
607
  */
520
- module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
521
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
608
+ module.exports.process_new_peer = function(peer_id, initiate_handshake) {
609
+ const ret = wasm.process_new_peer(peer_id, initiate_handshake);
522
610
  return takeObject(ret);
523
611
  };
524
612
 
525
613
  /**
526
- * @returns {Promise<Array<any>>}
614
+ * @param {bigint} peer_id
615
+ * @param {string} public_key
616
+ * @returns {Promise<void>}
527
617
  */
528
- module.exports.get_mempool_txs = function() {
529
- const ret = wasm.get_mempool_txs();
618
+ module.exports.process_stun_peer = function(peer_id, public_key) {
619
+ const ret = wasm.process_stun_peer(peer_id, addHeapObject(public_key));
530
620
  return takeObject(ret);
531
621
  };
532
622
 
533
623
  /**
534
- * @param {bigint} duration_in_ms
624
+ * @param {bigint} peer_id
625
+ * @param {string} public_key
535
626
  * @returns {Promise<void>}
536
627
  */
537
- module.exports.process_timer_event = function(duration_in_ms) {
538
- const ret = wasm.process_timer_event(duration_in_ms);
628
+ module.exports.remove_stun_peer = function(peer_id, public_key) {
629
+ const ret = wasm.remove_stun_peer(peer_id, addHeapObject(public_key));
539
630
  return takeObject(ret);
540
631
  };
541
632
 
542
633
  /**
543
- * @returns {string}
634
+ * @param {bigint} peer_id
635
+ * @returns {Promise<void>}
544
636
  */
545
- module.exports.generate_private_key = function() {
546
- const ret = wasm.generate_private_key();
637
+ module.exports.process_peer_disconnection = function(peer_id) {
638
+ const ret = wasm.process_peer_disconnection(peer_id);
547
639
  return takeObject(ret);
548
640
  };
549
641
 
@@ -559,21 +651,36 @@ module.exports.process_msg_buffer_from_peer = function(buffer, peer) {
559
651
  };
560
652
 
561
653
  /**
562
- * @returns {Promise<WasmWallet>}
654
+ * @param {Uint8Array} buffer
655
+ * @param {Uint8Array} hash
656
+ * @param {bigint} block_id
657
+ * @param {bigint} peer_id
658
+ * @returns {Promise<void>}
563
659
  */
564
- module.exports.get_wallet = function() {
565
- const ret = wasm.get_wallet();
660
+ module.exports.process_fetched_block = function(buffer, hash, block_id, peer_id) {
661
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_id);
566
662
  return takeObject(ret);
567
663
  };
568
664
 
569
665
  /**
570
- * @returns {Promise<Array<any>>}
666
+ * @param {Uint8Array} hash
667
+ * @param {bigint} block_id
668
+ * @param {bigint} peer_id
669
+ * @returns {Promise<void>}
571
670
  */
572
- module.exports.get_nft_list = function() {
573
- const ret = wasm.get_nft_list();
671
+ module.exports.process_failed_block_fetch = function(hash, block_id, peer_id) {
672
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_id);
574
673
  return takeObject(ret);
575
674
  };
576
675
 
676
+ let stack_pointer = 128;
677
+
678
+ function addBorrowedObject(obj) {
679
+ if (stack_pointer == 1) throw new Error('out of js stack');
680
+ heap[--stack_pointer] = obj;
681
+ return stack_pointer;
682
+ }
683
+
577
684
  const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
578
685
  ? { register: () => {}, unregister: () => {} }
579
686
  : new FinalizationRegistry(ptr => wasm.__wbg_saitowasm_free(ptr >>> 0));
@@ -1128,6 +1235,15 @@ class WasmBlockchain {
1128
1235
  wasm.__wbg_wasmblockchain_free(ptr);
1129
1236
  }
1130
1237
  /**
1238
+ * @param {number} count
1239
+ * @param {boolean} include_offchain
1240
+ * @returns {Promise<Array<any>>}
1241
+ */
1242
+ get_blocks(count, include_offchain) {
1243
+ const ret = wasm.wasmblockchain_get_blocks(this.__wbg_ptr, count, include_offchain);
1244
+ return takeObject(ret);
1245
+ }
1246
+ /**
1131
1247
  * @returns {Promise<string>}
1132
1248
  */
1133
1249
  get_fork_id() {
@@ -1144,6 +1260,15 @@ class WasmBlockchain {
1144
1260
  }
1145
1261
  /**
1146
1262
  * @param {bigint} block_id
1263
+ * @param {boolean} include_transactions
1264
+ * @returns {Promise<WasmBlock>}
1265
+ */
1266
+ get_block_by_id(block_id, include_transactions) {
1267
+ const ret = wasm.wasmblockchain_get_block_by_id(this.__wbg_ptr, block_id, include_transactions);
1268
+ return takeObject(ret);
1269
+ }
1270
+ /**
1271
+ * @param {bigint} block_id
1147
1272
  * @returns {Promise<Array<any>>}
1148
1273
  */
1149
1274
  get_hashes_at_id(block_id) {
@@ -1277,17 +1402,26 @@ class WasmBlockchain {
1277
1402
  return takeObject(ret);
1278
1403
  }
1279
1404
  /**
1280
- * @returns {any}
1405
+ * @returns {Promise<void>}
1281
1406
  */
1282
- get() {
1283
- const ret = wasm.wasmblockchain_get(this.__wbg_ptr);
1407
+ reset() {
1408
+ const ret = wasm.wasmblockchain_reset(this.__wbg_ptr);
1284
1409
  return takeObject(ret);
1285
1410
  }
1286
1411
  /**
1287
- * @returns {Promise<void>}
1412
+ * @param {string} block_hash
1413
+ * @param {boolean} include_transactions
1414
+ * @returns {Promise<WasmBlock>}
1288
1415
  */
1289
- reset() {
1290
- const ret = wasm.wasmblockchain_reset(this.__wbg_ptr);
1416
+ get_block(block_hash, include_transactions) {
1417
+ const ret = wasm.wasmblockchain_get_block(this.__wbg_ptr, addHeapObject(block_hash), include_transactions);
1418
+ return takeObject(ret);
1419
+ }
1420
+ /**
1421
+ * @returns {any}
1422
+ */
1423
+ get() {
1424
+ const ret = wasm.wasmblockchain_get(this.__wbg_ptr);
1291
1425
  return takeObject(ret);
1292
1426
  }
1293
1427
  }
@@ -1702,6 +1836,21 @@ class WasmNetwork {
1702
1836
  return takeObject(ret);
1703
1837
  }
1704
1838
  /**
1839
+ * @param {string} key
1840
+ * @returns {Promise<WasmPeer | undefined>}
1841
+ */
1842
+ getPeer(key) {
1843
+ const ret = wasm.wasmnetwork_getPeer(this.__wbg_ptr, addHeapObject(key));
1844
+ return takeObject(ret);
1845
+ }
1846
+ /**
1847
+ * @returns {Promise<Array<any>>}
1848
+ */
1849
+ getPeers() {
1850
+ const ret = wasm.wasmnetwork_getPeers(this.__wbg_ptr);
1851
+ return takeObject(ret);
1852
+ }
1853
+ /**
1705
1854
  * @returns {WasmNetworkApi}
1706
1855
  */
1707
1856
  get api() {
@@ -1722,21 +1871,6 @@ class WasmNetwork {
1722
1871
  const ret = wasm.wasmnetwork_api(this.__wbg_ptr);
1723
1872
  return WasmPeers.__wrap(ret);
1724
1873
  }
1725
- /**
1726
- * @param {string} key
1727
- * @returns {Promise<WasmPeer | undefined>}
1728
- */
1729
- getPeer(key) {
1730
- const ret = wasm.wasmnetwork_getPeer(this.__wbg_ptr, addHeapObject(key));
1731
- return takeObject(ret);
1732
- }
1733
- /**
1734
- * @returns {Promise<Array<any>>}
1735
- */
1736
- getPeers() {
1737
- const ret = wasm.wasmnetwork_getPeers(this.__wbg_ptr);
1738
- return takeObject(ret);
1739
- }
1740
1874
  }
1741
1875
  module.exports.WasmNetwork = WasmNetwork;
1742
1876
 
@@ -1833,13 +1967,6 @@ class WasmNetworkPeer {
1833
1967
  return takeObject(ret);
1834
1968
  }
1835
1969
  /**
1836
- * @returns {bigint}
1837
- */
1838
- get_id() {
1839
- const ret = wasm.wasmnetworkpeer_get_id(this.__wbg_ptr);
1840
- return BigInt.asUintN(64, ret);
1841
- }
1842
- /**
1843
1970
  * @returns {Promise<string>}
1844
1971
  */
1845
1972
  get_url() {
@@ -1847,6 +1974,13 @@ class WasmNetworkPeer {
1847
1974
  return takeObject(ret);
1848
1975
  }
1849
1976
  /**
1977
+ * @returns {bigint}
1978
+ */
1979
+ get_id() {
1980
+ const ret = wasm.wasmnetworkpeer_get_id(this.__wbg_ptr);
1981
+ return BigInt.asUintN(64, ret);
1982
+ }
1983
+ /**
1850
1984
  * @param {bigint} peer_id
1851
1985
  */
1852
1986
  constructor(peer_id) {
@@ -1906,6 +2040,13 @@ class WasmPeer {
1906
2040
  return takeObject(ret);
1907
2041
  }
1908
2042
  /**
2043
+ * @returns {string}
2044
+ */
2045
+ get protocol() {
2046
+ const ret = wasm.wasmpeer_get_protocol(this.__wbg_ptr);
2047
+ return takeObject(ret);
2048
+ }
2049
+ /**
1909
2050
  * @returns {any}
1910
2051
  */
1911
2052
  get services() {
@@ -1939,6 +2080,20 @@ class WasmPeer {
1939
2080
  const ret = wasm.wasmnetworkpeer_get_id(this.__wbg_ptr);
1940
2081
  return BigInt.asUintN(64, ret);
1941
2082
  }
2083
+ /**
2084
+ * @returns {string}
2085
+ */
2086
+ get host() {
2087
+ const ret = wasm.wasmpeer_get_host(this.__wbg_ptr);
2088
+ return takeObject(ret);
2089
+ }
2090
+ /**
2091
+ * @returns {number}
2092
+ */
2093
+ get port() {
2094
+ const ret = wasm.wasmpeer_get_port(this.__wbg_ptr);
2095
+ return ret;
2096
+ }
1942
2097
  }
1943
2098
  module.exports.WasmPeer = WasmPeer;
1944
2099
 
@@ -2254,6 +2409,13 @@ class WasmTransaction {
2254
2409
  wasm.__wbg_wasmtransaction_free(ptr);
2255
2410
  }
2256
2411
  /**
2412
+ * @returns {Promise<void>}
2413
+ */
2414
+ sign() {
2415
+ const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
2416
+ return takeObject(ret);
2417
+ }
2418
+ /**
2257
2419
  * @returns {bigint}
2258
2420
  */
2259
2421
  get total_fees() {
@@ -2368,13 +2530,6 @@ class WasmTransaction {
2368
2530
  return takeObject(ret);
2369
2531
  }
2370
2532
  /**
2371
- * @returns {Promise<void>}
2372
- */
2373
- sign() {
2374
- const ret = wasm.wasmtransaction_sign(this.__wbg_ptr);
2375
- return takeObject(ret);
2376
- }
2377
- /**
2378
2533
  * @param {string} key
2379
2534
  * @returns {boolean}
2380
2535
  */
@@ -2655,13 +2810,6 @@ class WasmWallet {
2655
2810
  return takeObject(ret);
2656
2811
  }
2657
2812
  /**
2658
- * @returns {any}
2659
- */
2660
- get() {
2661
- const ret = wasm.wasmwallet_get(this.__wbg_ptr);
2662
- return takeObject(ret);
2663
- }
2664
- /**
2665
2813
  * @param {Array<any>} public_keys
2666
2814
  * @param {BigUint64Array} amounts
2667
2815
  * @param {bigint} fee
@@ -2736,6 +2884,13 @@ class WasmWallet {
2736
2884
  const ret = wasm.wasmwallet_get_slips(this.__wbg_ptr);
2737
2885
  return takeObject(ret);
2738
2886
  }
2887
+ /**
2888
+ * @returns {any}
2889
+ */
2890
+ get() {
2891
+ const ret = wasm.wasmwallet_get(this.__wbg_ptr);
2892
+ return takeObject(ret);
2893
+ }
2739
2894
  }
2740
2895
  module.exports.WasmWallet = WasmWallet;
2741
2896
 
@@ -3041,49 +3196,57 @@ module.exports.__wbg_call_27c0f87801dedf93 = function() { return handleError(fun
3041
3196
  return addHeapObject(ret);
3042
3197
  }, arguments) };
3043
3198
 
3044
- module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
3045
- const ret = getObject(arg0).length;
3199
+ module.exports.__wbg_iterator_2cee6dadfd956dfa = function() {
3200
+ const ret = Symbol.iterator;
3201
+ return addHeapObject(ret);
3202
+ };
3203
+
3204
+ module.exports.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
3205
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
3206
+ return addHeapObject(ret);
3207
+ }, arguments) };
3208
+
3209
+ module.exports.__wbg_next_40fc327bfc8770e6 = function(arg0) {
3210
+ const ret = getObject(arg0).next;
3211
+ return addHeapObject(ret);
3212
+ };
3213
+
3214
+ module.exports.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
3215
+ const ret = getObject(arg0).push(getObject(arg1));
3046
3216
  return ret;
3047
3217
  };
3048
3218
 
3049
- module.exports.__wbg_new_5b2a2842270c66e6 = function(arg0) {
3050
- const ret = new BigUint64Array(getObject(arg0));
3219
+ module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
3220
+ const ret = new Array();
3051
3221
  return addHeapObject(ret);
3052
3222
  };
3053
3223
 
3054
- module.exports.__wbg_set_dc7aa8fdca321349 = function(arg0, arg1, arg2) {
3055
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3224
+ module.exports.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {
3225
+ const ret = new Array(arg0 >>> 0);
3226
+ return addHeapObject(ret);
3056
3227
  };
3057
3228
 
3058
- module.exports.__wbg_newwithbyteoffsetandlength_f3784c11ba58e531 = function(arg0, arg1, arg2) {
3059
- const ret = new BigUint64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
3229
+ module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
3230
+ const ret = getObject(arg0)[arg1 >>> 0];
3060
3231
  return addHeapObject(ret);
3061
3232
  };
3062
3233
 
3063
- module.exports.__wbg_length_a641162bc8055216 = function(arg0) {
3064
- const ret = getObject(arg0).length;
3234
+ module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
3235
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3236
+ };
3237
+
3238
+ module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
3239
+ const ret = Array.isArray(getObject(arg0));
3065
3240
  return ret;
3066
3241
  };
3067
3242
 
3068
- module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
3069
- let result;
3070
- try {
3071
- result = getObject(arg0) instanceof Uint8Array;
3072
- } catch (_) {
3073
- result = false;
3074
- }
3075
- const ret = result;
3243
+ module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
3244
+ const ret = getObject(arg0).length;
3076
3245
  return ret;
3077
3246
  };
3078
3247
 
3079
- module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
3080
- let result;
3081
- try {
3082
- result = getObject(arg0) instanceof ArrayBuffer;
3083
- } catch (_) {
3084
- result = false;
3085
- }
3086
- const ret = result;
3248
+ module.exports.__wbg_valueOf_b4771ea2a1ea7469 = function(arg0) {
3249
+ const ret = getObject(arg0).valueOf();
3087
3250
  return ret;
3088
3251
  };
3089
3252
 
@@ -3097,52 +3260,52 @@ module.exports.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
3097
3260
  return addHeapObject(ret);
3098
3261
  };
3099
3262
 
3100
- module.exports.__wbg_now_3014639a94423537 = function() {
3101
- const ret = Date.now();
3102
- return ret;
3103
- };
3263
+ module.exports.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
3264
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
3265
+ return addHeapObject(ret);
3266
+ }, arguments) };
3104
3267
 
3105
- module.exports.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {
3106
- const ret = new Array(arg0 >>> 0);
3268
+ module.exports.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
3269
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
3107
3270
  return addHeapObject(ret);
3108
- };
3271
+ }, arguments) };
3109
3272
 
3110
- module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
3111
- const ret = getObject(arg0)[arg1 >>> 0];
3273
+ module.exports.__wbg_call_938992c832f74314 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3274
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
3112
3275
  return addHeapObject(ret);
3113
- };
3276
+ }, arguments) };
3114
3277
 
3115
- module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
3116
- const ret = new Array();
3117
- return addHeapObject(ret);
3278
+ module.exports.__wbg_now_3014639a94423537 = function() {
3279
+ const ret = Date.now();
3280
+ return ret;
3118
3281
  };
3119
3282
 
3120
- module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
3121
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3283
+ module.exports.__wbg_new_72fb9a18b5ae2624 = function() {
3284
+ const ret = new Object();
3285
+ return addHeapObject(ret);
3122
3286
  };
3123
3287
 
3124
- module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
3288
+ module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
3125
3289
  const ret = getObject(arg0).length;
3126
3290
  return ret;
3127
3291
  };
3128
3292
 
3129
- module.exports.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
3130
- const ret = getObject(arg0).push(getObject(arg1));
3131
- return ret;
3293
+ module.exports.__wbg_new_5b2a2842270c66e6 = function(arg0) {
3294
+ const ret = new BigUint64Array(getObject(arg0));
3295
+ return addHeapObject(ret);
3132
3296
  };
3133
3297
 
3134
- module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
3135
- const ret = Array.isArray(getObject(arg0));
3136
- return ret;
3298
+ module.exports.__wbg_set_dc7aa8fdca321349 = function(arg0, arg1, arg2) {
3299
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3137
3300
  };
3138
3301
 
3139
- module.exports.__wbg_new_72fb9a18b5ae2624 = function() {
3140
- const ret = new Object();
3302
+ module.exports.__wbg_newwithbyteoffsetandlength_f3784c11ba58e531 = function(arg0, arg1, arg2) {
3303
+ const ret = new BigUint64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
3141
3304
  return addHeapObject(ret);
3142
3305
  };
3143
3306
 
3144
- module.exports.__wbg_valueOf_b4771ea2a1ea7469 = function(arg0) {
3145
- const ret = getObject(arg0).valueOf();
3307
+ module.exports.__wbg_length_a641162bc8055216 = function(arg0) {
3308
+ const ret = getObject(arg0).length;
3146
3309
  return ret;
3147
3310
  };
3148
3311
 
@@ -3153,7 +3316,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
3153
3316
  const a = state0.a;
3154
3317
  state0.a = 0;
3155
3318
  try {
3156
- return __wbg_adapter_83(a, state0.b, arg0, arg1);
3319
+ return __wbg_adapter_91(a, state0.b, arg0, arg1);
3157
3320
  } finally {
3158
3321
  state0.a = a;
3159
3322
  }
@@ -3165,13 +3328,13 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
3165
3328
  }
3166
3329
  };
3167
3330
 
3168
- module.exports.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
3169
- const ret = getObject(arg0).then(getObject(arg1));
3331
+ module.exports.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
3332
+ const ret = Promise.resolve(getObject(arg0));
3170
3333
  return addHeapObject(ret);
3171
3334
  };
3172
3335
 
3173
- module.exports.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
3174
- const ret = Promise.resolve(getObject(arg0));
3336
+ module.exports.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
3337
+ const ret = getObject(arg0).then(getObject(arg1));
3175
3338
  return addHeapObject(ret);
3176
3339
  };
3177
3340
 
@@ -3180,36 +3343,6 @@ module.exports.__wbg_set_1f9b04f170055d33 = function() { return handleError(func
3180
3343
  return ret;
3181
3344
  }, arguments) };
3182
3345
 
3183
- module.exports.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
3184
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
3185
- return addHeapObject(ret);
3186
- }, arguments) };
3187
-
3188
- module.exports.__wbg_call_8e7cb608789c2528 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
3189
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
3190
- return addHeapObject(ret);
3191
- }, arguments) };
3192
-
3193
- module.exports.__wbg_call_938992c832f74314 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3194
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
3195
- return addHeapObject(ret);
3196
- }, arguments) };
3197
-
3198
- module.exports.__wbg_iterator_2cee6dadfd956dfa = function() {
3199
- const ret = Symbol.iterator;
3200
- return addHeapObject(ret);
3201
- };
3202
-
3203
- module.exports.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
3204
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
3205
- return addHeapObject(ret);
3206
- }, arguments) };
3207
-
3208
- module.exports.__wbg_next_40fc327bfc8770e6 = function(arg0) {
3209
- const ret = getObject(arg0).next;
3210
- return addHeapObject(ret);
3211
- };
3212
-
3213
3346
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
3214
3347
  const obj = getObject(arg1);
3215
3348
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -3234,6 +3367,28 @@ module.exports.__wbg_value_d93c65011f51a456 = function(arg0) {
3234
3367
  return addHeapObject(ret);
3235
3368
  };
3236
3369
 
3370
+ module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
3371
+ let result;
3372
+ try {
3373
+ result = getObject(arg0) instanceof Uint8Array;
3374
+ } catch (_) {
3375
+ result = false;
3376
+ }
3377
+ const ret = result;
3378
+ return ret;
3379
+ };
3380
+
3381
+ module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
3382
+ let result;
3383
+ try {
3384
+ result = getObject(arg0) instanceof ArrayBuffer;
3385
+ } catch (_) {
3386
+ result = false;
3387
+ }
3388
+ const ret = result;
3389
+ return ret;
3390
+ };
3391
+
3237
3392
  module.exports.__wbindgen_number_new = function(arg0) {
3238
3393
  const ret = arg0;
3239
3394
  return addHeapObject(ret);
@@ -3248,7 +3403,72 @@ module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
3248
3403
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3249
3404
  };
3250
3405
 
3251
- module.exports.__wbg_flushdata_b83ca5dfd0e29452 = function(arg0, arg1) {
3406
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
3407
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
3408
+ return addHeapObject(ret);
3409
+ };
3410
+
3411
+ module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
3412
+ const ret = getObject(arg0)[getObject(arg1)];
3413
+ return addHeapObject(ret);
3414
+ };
3415
+
3416
+ module.exports.__wbindgen_in = function(arg0, arg1) {
3417
+ const ret = getObject(arg0) in getObject(arg1);
3418
+ return ret;
3419
+ };
3420
+
3421
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
3422
+ const ret = WasmPeer.__wrap(arg0);
3423
+ return addHeapObject(ret);
3424
+ };
3425
+
3426
+ module.exports.__wbg_wasmblock_new = function(arg0) {
3427
+ const ret = WasmBlock.__wrap(arg0);
3428
+ return addHeapObject(ret);
3429
+ };
3430
+
3431
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
3432
+ const ret = WasmTransaction.__wrap(arg0);
3433
+ return addHeapObject(ret);
3434
+ };
3435
+
3436
+ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
3437
+ const ret = WasmWalletSlip.__wrap(arg0);
3438
+ return addHeapObject(ret);
3439
+ };
3440
+
3441
+ module.exports.__wbg_wasmnetworkpeer_new = function(arg0) {
3442
+ const ret = WasmNetworkPeer.__wrap(arg0);
3443
+ return addHeapObject(ret);
3444
+ };
3445
+
3446
+ module.exports.__wbg_wasmslip_new = function(arg0) {
3447
+ const ret = WasmSlip.__wrap(arg0);
3448
+ return addHeapObject(ret);
3449
+ };
3450
+
3451
+ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
3452
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
3453
+ return addHeapObject(ret);
3454
+ };
3455
+
3456
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
3457
+ const ret = WasmWallet.__wrap(arg0);
3458
+ return addHeapObject(ret);
3459
+ };
3460
+
3461
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
3462
+ const ret = WasmBlockchain.__wrap(arg0);
3463
+ return addHeapObject(ret);
3464
+ };
3465
+
3466
+ module.exports.__wbg_wasmnft_new = function(arg0) {
3467
+ const ret = WasmNFT.__wrap(arg0);
3468
+ return addHeapObject(ret);
3469
+ };
3470
+
3471
+ module.exports.__wbg_flushdata_52519a6e50f846fc = function(arg0, arg1) {
3252
3472
  let deferred0_0;
3253
3473
  let deferred0_1;
3254
3474
  try {
@@ -3260,7 +3480,7 @@ module.exports.__wbg_flushdata_b83ca5dfd0e29452 = function(arg0, arg1) {
3260
3480
  }
3261
3481
  };
3262
3482
 
3263
- module.exports.__wbg_readvalue_8ca89f95bfe8c944 = function() { return handleError(function (arg0, arg1) {
3483
+ module.exports.__wbg_readvalue_5568305686a58e68 = function() { return handleError(function (arg0, arg1) {
3264
3484
  let deferred0_0;
3265
3485
  let deferred0_1;
3266
3486
  try {
@@ -3273,15 +3493,15 @@ module.exports.__wbg_readvalue_8ca89f95bfe8c944 = function() { return handleErro
3273
3493
  }
3274
3494
  }, arguments) };
3275
3495
 
3276
- module.exports.__wbg_loadwallet_97d25e53a03a6a56 = function() {
3496
+ module.exports.__wbg_loadwallet_ff48a5aaba046847 = function() {
3277
3497
  MsgHandler.load_wallet();
3278
3498
  };
3279
3499
 
3280
- module.exports.__wbg_savewallet_596fb85e8cbee355 = function() {
3500
+ module.exports.__wbg_savewallet_68c0ca680830e3d5 = function() {
3281
3501
  MsgHandler.save_wallet();
3282
3502
  };
3283
3503
 
3284
- module.exports.__wbg_writevalue_ea7fa78ef5b39d86 = function(arg0, arg1, arg2) {
3504
+ module.exports.__wbg_writevalue_904b706a0395df9e = function(arg0, arg1, arg2) {
3285
3505
  let deferred0_0;
3286
3506
  let deferred0_1;
3287
3507
  try {
@@ -3293,7 +3513,7 @@ module.exports.__wbg_writevalue_ea7fa78ef5b39d86 = function(arg0, arg1, arg2) {
3293
3513
  }
3294
3514
  };
3295
3515
 
3296
- module.exports.__wbg_appendvalue_24226e288f591dd1 = function(arg0, arg1, arg2) {
3516
+ module.exports.__wbg_appendvalue_8b7d0ca3e5ebf99e = function(arg0, arg1, arg2) {
3297
3517
  let deferred0_0;
3298
3518
  let deferred0_1;
3299
3519
  try {
@@ -3305,7 +3525,7 @@ module.exports.__wbg_appendvalue_24226e288f591dd1 = function(arg0, arg1, arg2) {
3305
3525
  }
3306
3526
  };
3307
3527
 
3308
- module.exports.__wbg_removevalue_f932e0ed2bf8400d = function() { return handleError(function (arg0, arg1) {
3528
+ module.exports.__wbg_removevalue_b5b3f8b8b8f0943e = function() { return handleError(function (arg0, arg1) {
3309
3529
  let deferred0_0;
3310
3530
  let deferred0_1;
3311
3531
  try {
@@ -3318,7 +3538,7 @@ module.exports.__wbg_removevalue_f932e0ed2bf8400d = function() { return handleEr
3318
3538
  }
3319
3539
  }, arguments) };
3320
3540
 
3321
- module.exports.__wbg_sendmessage_b4d1847c2b021a82 = function(arg0, arg1, arg2) {
3541
+ module.exports.__wbg_sendmessage_7ca8422d40e335be = function(arg0, arg1, arg2) {
3322
3542
  let deferred0_0;
3323
3543
  let deferred0_1;
3324
3544
  try {
@@ -3330,7 +3550,7 @@ module.exports.__wbg_sendmessage_b4d1847c2b021a82 = function(arg0, arg1, arg2) {
3330
3550
  }
3331
3551
  };
3332
3552
 
3333
- module.exports.__wbg_connecttopeer_8a6739b7848714bb = function() { return handleError(function (arg0, arg1) {
3553
+ module.exports.__wbg_connecttopeer_2e0d0a5cbc81f476 = function() { return handleError(function (arg0, arg1) {
3334
3554
  let deferred0_0;
3335
3555
  let deferred0_1;
3336
3556
  try {
@@ -3343,14 +3563,7 @@ module.exports.__wbg_connecttopeer_8a6739b7848714bb = function() { return handle
3343
3563
  }
3344
3564
  }, arguments) };
3345
3565
 
3346
- module.exports.__wbg_getmyservices_54e00b491be9702b = function() {
3347
- const ret = MsgHandler.get_my_services();
3348
- _assertClass(ret, WasmPeerServiceList);
3349
- var ptr1 = ret.__destroy_into_raw();
3350
- return ptr1;
3351
- };
3352
-
3353
- module.exports.__wbg_isexistingfile_729bbaf16e1fc1eb = function() { return handleError(function (arg0, arg1) {
3566
+ module.exports.__wbg_isexistingfile_b65bab8ca5111097 = function() { return handleError(function (arg0, arg1) {
3354
3567
  let deferred0_0;
3355
3568
  let deferred0_1;
3356
3569
  try {
@@ -3363,7 +3576,7 @@ module.exports.__wbg_isexistingfile_729bbaf16e1fc1eb = function() { return handl
3363
3576
  }
3364
3577
  }, arguments) };
3365
3578
 
3366
- module.exports.__wbg_processapicall_894298f60f733af7 = function(arg0, arg1, arg2, arg3) {
3579
+ module.exports.__wbg_processapicall_cf6fb477dd6592cd = function(arg0, arg1, arg2, arg3) {
3367
3580
  let deferred0_0;
3368
3581
  let deferred0_1;
3369
3582
  try {
@@ -3375,7 +3588,7 @@ module.exports.__wbg_processapicall_894298f60f733af7 = function(arg0, arg1, arg2
3375
3588
  }
3376
3589
  };
3377
3590
 
3378
- module.exports.__wbg_processapierror_c0cff35bfda0d70f = function(arg0, arg1, arg2, arg3) {
3591
+ module.exports.__wbg_processapierror_a2affad2e5fbad02 = function(arg0, arg1, arg2, arg3) {
3379
3592
  let deferred0_0;
3380
3593
  let deferred0_1;
3381
3594
  try {
@@ -3387,7 +3600,7 @@ module.exports.__wbg_processapierror_c0cff35bfda0d70f = function(arg0, arg1, arg
3387
3600
  }
3388
3601
  };
3389
3602
 
3390
- module.exports.__wbg_processapisuccess_52f79c0d74c970a8 = function(arg0, arg1, arg2, arg3) {
3603
+ module.exports.__wbg_processapisuccess_410259d80fbf4605 = function(arg0, arg1, arg2, arg3) {
3391
3604
  let deferred0_0;
3392
3605
  let deferred0_1;
3393
3606
  try {
@@ -3399,25 +3612,21 @@ module.exports.__wbg_processapisuccess_52f79c0d74c970a8 = function(arg0, arg1, a
3399
3612
  }
3400
3613
  };
3401
3614
 
3402
- module.exports.__wbg_sendmessagetoall_596c525857e45a64 = function(arg0, arg1) {
3615
+ module.exports.__wbg_sendmessagetoall_c777f2eb4738f927 = function(arg0, arg1) {
3403
3616
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
3404
3617
  };
3405
3618
 
3406
- module.exports.__wbg_disconnectfrompeer_de724f594081a3dd = function() { return handleError(function (arg0) {
3619
+ module.exports.__wbg_disconnectfrompeer_ddc2daef4bda77ee = function() { return handleError(function (arg0) {
3407
3620
  const ret = MsgHandler.disconnect_from_peer(BigInt.asUintN(64, arg0));
3408
3621
  return addHeapObject(ret);
3409
3622
  }, arguments) };
3410
3623
 
3411
- module.exports.__wbg_loadblockfilelist_27d8a02029193360 = function() { return handleError(function () {
3624
+ module.exports.__wbg_loadblockfilelist_17e8ef00bc52d1c9 = function() { return handleError(function () {
3412
3625
  const ret = MsgHandler.load_block_file_list();
3413
3626
  return addHeapObject(ret);
3414
3627
  }, arguments) };
3415
3628
 
3416
- module.exports.__wbg_emitinterfaceevent_9485f82710a2343d = function(arg0, arg1, arg2, arg3) {
3417
- MsgHandler.emit_interface_event(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
3418
- };
3419
-
3420
- module.exports.__wbg_fetchblockfrompeer_5cda6b7a0e312f7b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3629
+ module.exports.__wbg_fetchblockfrompeer_38e6b1c4057e9f16 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3421
3630
  let deferred0_0;
3422
3631
  let deferred0_1;
3423
3632
  try {
@@ -3430,7 +3639,22 @@ module.exports.__wbg_fetchblockfrompeer_5cda6b7a0e312f7b = function() { return h
3430
3639
  }
3431
3640
  }, arguments) };
3432
3641
 
3433
- module.exports.__wbg_ensuredirectoryexists_c7d5f00e20b68be6 = function() { return handleError(function (arg0, arg1) {
3642
+ module.exports.__wbg_sendmessagebypeerid_3aa55f197168b58c = function(arg0, arg1) {
3643
+ MsgHandler.send_message_by_peer_id(BigInt.asUintN(64, arg0), getObject(arg1));
3644
+ };
3645
+
3646
+ module.exports.__wbg_getmyservices_023eedd510316add = function() {
3647
+ const ret = MsgHandler.get_my_services();
3648
+ _assertClass(ret, WasmPeerServiceList);
3649
+ var ptr1 = ret.__destroy_into_raw();
3650
+ return ptr1;
3651
+ };
3652
+
3653
+ module.exports.__wbg_emitinterfaceevent_40084d68ffe12e86 = function(arg0, arg1, arg2, arg3) {
3654
+ MsgHandler.emit_interface_event(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
3655
+ };
3656
+
3657
+ module.exports.__wbg_ensuredirectoryexists_b53cb69330198d5c = function() { return handleError(function (arg0, arg1) {
3434
3658
  let deferred0_0;
3435
3659
  let deferred0_1;
3436
3660
  try {
@@ -3442,75 +3666,6 @@ module.exports.__wbg_ensuredirectoryexists_c7d5f00e20b68be6 = function() { retur
3442
3666
  }
3443
3667
  }, arguments) };
3444
3668
 
3445
- module.exports.__wbg_sendmessagebypeerid_6a3fb6b5731d0dfc = function(arg0, arg1) {
3446
- MsgHandler.send_message_by_peer_id(BigInt.asUintN(64, arg0), getObject(arg1));
3447
- };
3448
-
3449
- module.exports.__wbg_wasmtransaction_new = function(arg0) {
3450
- const ret = WasmTransaction.__wrap(arg0);
3451
- return addHeapObject(ret);
3452
- };
3453
-
3454
- module.exports.__wbg_wasmwallet_new = function(arg0) {
3455
- const ret = WasmWallet.__wrap(arg0);
3456
- return addHeapObject(ret);
3457
- };
3458
-
3459
- module.exports.__wbg_wasmblock_new = function(arg0) {
3460
- const ret = WasmBlock.__wrap(arg0);
3461
- return addHeapObject(ret);
3462
- };
3463
-
3464
- module.exports.__wbg_wasmpeer_new = function(arg0) {
3465
- const ret = WasmPeer.__wrap(arg0);
3466
- return addHeapObject(ret);
3467
- };
3468
-
3469
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
3470
- const ret = WasmBlockchain.__wrap(arg0);
3471
- return addHeapObject(ret);
3472
- };
3473
-
3474
- module.exports.__wbg_wasmwalletslip_new = function(arg0) {
3475
- const ret = WasmWalletSlip.__wrap(arg0);
3476
- return addHeapObject(ret);
3477
- };
3478
-
3479
- module.exports.__wbg_wasmnft_new = function(arg0) {
3480
- const ret = WasmNFT.__wrap(arg0);
3481
- return addHeapObject(ret);
3482
- };
3483
-
3484
- module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
3485
- const ret = WasmBalanceSnapshot.__wrap(arg0);
3486
- return addHeapObject(ret);
3487
- };
3488
-
3489
- module.exports.__wbg_wasmslip_new = function(arg0) {
3490
- const ret = WasmSlip.__wrap(arg0);
3491
- return addHeapObject(ret);
3492
- };
3493
-
3494
- module.exports.__wbg_wasmnetworkpeer_new = function(arg0) {
3495
- const ret = WasmNetworkPeer.__wrap(arg0);
3496
- return addHeapObject(ret);
3497
- };
3498
-
3499
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
3500
- const ret = new Error(getStringFromWasm0(arg0, arg1));
3501
- return addHeapObject(ret);
3502
- };
3503
-
3504
- module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
3505
- const ret = getObject(arg0)[getObject(arg1)];
3506
- return addHeapObject(ret);
3507
- };
3508
-
3509
- module.exports.__wbindgen_in = function(arg0, arg1) {
3510
- const ret = getObject(arg0) in getObject(arg1);
3511
- return ret;
3512
- };
3513
-
3514
3669
  module.exports.__wbg_wasmpeerservice_new = function(arg0) {
3515
3670
  const ret = WasmPeerService.__wrap(arg0);
3516
3671
  return addHeapObject(ret);
@@ -3551,10 +3706,6 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
3551
3706
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3552
3707
  };
3553
3708
 
3554
- module.exports.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
3555
- queueMicrotask(getObject(arg0));
3556
- };
3557
-
3558
3709
  module.exports.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
3559
3710
  const ret = getObject(arg0).queueMicrotask;
3560
3711
  return addHeapObject(ret);
@@ -3570,6 +3721,10 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
3570
3721
  return ret;
3571
3722
  };
3572
3723
 
3724
+ module.exports.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
3725
+ queueMicrotask(getObject(arg0));
3726
+ };
3727
+
3573
3728
  module.exports.__wbg_info_80803d9a3f0aad16 = function(arg0, arg1, arg2, arg3) {
3574
3729
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
3575
3730
  };
@@ -3586,8 +3741,8 @@ module.exports.__wbg_error_696630710900ec44 = function(arg0, arg1, arg2, arg3) {
3586
3741
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
3587
3742
  };
3588
3743
 
3589
- module.exports.__wbindgen_closure_wrapper2900 = function(arg0, arg1, arg2) {
3590
- const ret = makeMutClosure(arg0, arg1, 805, __wbg_adapter_40);
3744
+ module.exports.__wbindgen_closure_wrapper2970 = function(arg0, arg1, arg2) {
3745
+ const ret = makeMutClosure(arg0, arg1, 827, __wbg_adapter_40);
3591
3746
  return addHeapObject(ret);
3592
3747
  };
3593
3748