saito-wasm 0.2.165 → 0.2.166

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-9c691657239d0ce9/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-083e81febfc0ef0c/js/msg_handler.js`);
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
7
  const heap = new Array(128).fill(undefined);
@@ -24,15 +24,6 @@ function takeObject(idx) {
24
24
  return ret;
25
25
  }
26
26
 
27
- function addHeapObject(obj) {
28
- if (heap_next === heap.length) heap.push(heap.length + 1);
29
- const idx = heap_next;
30
- heap_next = heap[idx];
31
-
32
- heap[idx] = obj;
33
- return idx;
34
- }
35
-
36
27
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
37
28
 
38
29
  cachedTextDecoder.decode();
@@ -51,6 +42,15 @@ function getStringFromWasm0(ptr, len) {
51
42
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
52
43
  }
53
44
 
45
+ function addHeapObject(obj) {
46
+ if (heap_next === heap.length) heap.push(heap.length + 1);
47
+ const idx = heap_next;
48
+ heap_next = heap[idx];
49
+
50
+ heap[idx] = obj;
51
+ return idx;
52
+ }
53
+
54
54
  let WASM_VECTOR_LEN = 0;
55
55
 
56
56
  let cachedTextEncoder = new TextEncoder('utf-8');
@@ -225,7 +225,15 @@ function makeMutClosure(arg0, arg1, dtor, f) {
225
225
  return real;
226
226
  }
227
227
  function __wbg_adapter_38(arg0, arg1, arg2) {
228
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf760697bf54687ef(arg0, arg1, addHeapObject(arg2));
228
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18f9d53151d93e96(arg0, arg1, addHeapObject(arg2));
229
+ }
230
+
231
+ let stack_pointer = 128;
232
+
233
+ function addBorrowedObject(obj) {
234
+ if (stack_pointer == 1) throw new Error('out of js stack');
235
+ heap[--stack_pointer] = obj;
236
+ return stack_pointer;
229
237
  }
230
238
 
231
239
  function _assertClass(instance, klass) {
@@ -235,38 +243,54 @@ function _assertClass(instance, klass) {
235
243
  return instance.ptr;
236
244
  }
237
245
 
238
- let stack_pointer = 128;
239
-
240
- function addBorrowedObject(obj) {
241
- if (stack_pointer == 1) throw new Error('out of js stack');
242
- heap[--stack_pointer] = obj;
243
- return stack_pointer;
246
+ function handleError(f, args) {
247
+ try {
248
+ return f.apply(this, args);
249
+ } catch (e) {
250
+ wasm.__wbindgen_exn_store(addHeapObject(e));
251
+ }
244
252
  }
245
253
  /**
246
254
  * @returns {Promise<string>}
247
255
  */
248
- module.exports.get_latest_block_hash = function() {
249
- const ret = wasm.get_latest_block_hash();
256
+ module.exports.get_congestion_stats = function() {
257
+ const ret = wasm.get_congestion_stats();
250
258
  return takeObject(ret);
251
259
  };
252
260
 
253
261
  /**
254
- * @returns {Promise<WasmWallet>}
262
+ * @param {WasmBalanceSnapshot} snapshot
263
+ * @returns {Promise<void>}
255
264
  */
256
- module.exports.get_wallet = function() {
257
- const ret = wasm.get_wallet();
265
+ module.exports.update_from_balance_snapshot = function(snapshot) {
266
+ _assertClass(snapshot, WasmBalanceSnapshot);
267
+ var ptr0 = snapshot.__destroy_into_raw();
268
+ const ret = wasm.update_from_balance_snapshot(ptr0);
258
269
  return takeObject(ret);
259
270
  };
260
271
 
261
272
  /**
262
- * @param {string} nft_id_hex
263
- * @param {Uint8Array} tx_msg
264
- * @returns {Promise<WasmTransaction>}
273
+ * @returns {Promise<void>}
265
274
  */
266
- module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
267
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
268
- const len0 = WASM_VECTOR_LEN;
269
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
275
+ module.exports.disable_producing_blocks_by_timer = function() {
276
+ const ret = wasm.disable_producing_blocks_by_timer();
277
+ return takeObject(ret);
278
+ };
279
+
280
+ /**
281
+ * @returns {Promise<string>}
282
+ */
283
+ module.exports.get_stats = function() {
284
+ const ret = wasm.get_stats();
285
+ return takeObject(ret);
286
+ };
287
+
288
+ /**
289
+ * @param {string} public_key
290
+ * @returns {Promise<Array<any>>}
291
+ */
292
+ module.exports.get_account_slips = function(public_key) {
293
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
270
294
  return takeObject(ret);
271
295
  };
272
296
 
@@ -284,6 +308,32 @@ module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, re
284
308
  return takeObject(ret);
285
309
  };
286
310
 
311
+ /**
312
+ * @param {bigint} peer_index
313
+ * @returns {Promise<void>}
314
+ */
315
+ module.exports.remove_stun_peer = function(peer_index) {
316
+ const ret = wasm.remove_stun_peer(peer_index);
317
+ return takeObject(ret);
318
+ };
319
+
320
+ /**
321
+ * @returns {Promise<any>}
322
+ */
323
+ module.exports.get_confirmations = function() {
324
+ const ret = wasm.get_confirmations();
325
+ return takeObject(ret);
326
+ };
327
+
328
+ /**
329
+ * @param {bigint} current_time
330
+ * @returns {Promise<void>}
331
+ */
332
+ module.exports.process_stat_interval = function(current_time) {
333
+ const ret = wasm.process_stat_interval(current_time);
334
+ return takeObject(ret);
335
+ };
336
+
287
337
  /**
288
338
  * @param {string} key
289
339
  * @returns {boolean}
@@ -294,30 +344,40 @@ module.exports.is_valid_public_key = function(key) {
294
344
  };
295
345
 
296
346
  /**
297
- * @returns {Promise<string>}
347
+ * @param {string} config_json
348
+ * @param {string} private_key
349
+ * @param {number} log_level_num
350
+ * @param {bigint} hasten_multiplier
351
+ * @param {boolean} delete_old_blocks
352
+ * @returns {Promise<any>}
298
353
  */
299
- module.exports.get_congestion_stats = function() {
300
- const ret = wasm.get_congestion_stats();
354
+ module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
355
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
301
356
  return takeObject(ret);
302
357
  };
303
358
 
304
359
  /**
305
- * @param {Array<any>} public_keys
306
- * @param {BigUint64Array} amounts
307
- * @param {bigint} fee
308
- * @param {boolean} _force_merge
360
+ * @param {bigint} amt
361
+ * @param {string} slip1_utxo_key
362
+ * @param {string} slip2_utxo_key
363
+ * @param {string} slip3_utxo_key
364
+ * @param {string} recipient_public_key
365
+ * @param {Uint8Array} tx_msg
309
366
  * @returns {Promise<WasmTransaction>}
310
367
  */
311
- module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
312
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
368
+ module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
369
+ const ret = wasm.create_send_bound_transaction(amt, addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(recipient_public_key), addHeapObject(tx_msg));
313
370
  return takeObject(ret);
314
371
  };
315
372
 
316
373
  /**
317
- * @returns {Promise<void>}
374
+ * @param {string} slip1_utxo_key
375
+ * @param {string} slip2_utxo_key
376
+ * @param {string} slip3_utxo_key
377
+ * @returns {Promise<WasmTransaction>}
318
378
  */
319
- module.exports.start_from_received_ghost_chain = function() {
320
- const ret = wasm.start_from_received_ghost_chain();
379
+ module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
380
+ const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
321
381
  return takeObject(ret);
322
382
  };
323
383
 
@@ -330,76 +390,93 @@ module.exports.get_blockchain = function() {
330
390
  };
331
391
 
332
392
  /**
333
- * @param {Array<any>} keys
334
- * @returns {Promise<WasmBalanceSnapshot>}
393
+ * @returns {Promise<Array<any>>}
335
394
  */
336
- module.exports.get_balance_snapshot = function(keys) {
337
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
395
+ module.exports.get_mempool_txs = function() {
396
+ const ret = wasm.get_mempool_txs();
338
397
  return takeObject(ret);
339
398
  };
340
399
 
341
400
  /**
342
- * @returns {Promise<any>}
401
+ * @param {string} nft_id_hex
402
+ * @param {Uint8Array} tx_msg
403
+ * @returns {Promise<WasmTransaction>}
343
404
  */
344
- module.exports.get_confirmations = function() {
345
- const ret = wasm.get_confirmations();
405
+ module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
406
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
407
+ const len0 = WASM_VECTOR_LEN;
408
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
346
409
  return takeObject(ret);
347
410
  };
348
411
 
349
412
  /**
350
413
  * @returns {Promise<Array<any>>}
351
414
  */
352
- module.exports.get_peers = function() {
353
- const ret = wasm.get_peers();
415
+ module.exports.get_nft_list = function() {
416
+ const ret = wasm.get_nft_list();
354
417
  return takeObject(ret);
355
418
  };
356
419
 
357
420
  /**
358
- * @param {bigint} peer_index
359
- * @param {string} ip
360
- * @returns {Promise<void>}
421
+ * @returns {Promise<string>}
361
422
  */
362
- module.exports.process_new_peer = function(peer_index, ip) {
363
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
423
+ module.exports.get_latest_block_hash = function() {
424
+ const ret = wasm.get_latest_block_hash();
364
425
  return takeObject(ret);
365
426
  };
366
427
 
367
428
  /**
368
429
  * @param {Uint8Array} buffer
430
+ * @param {string} private_key
369
431
  * @returns {string}
370
432
  */
371
- module.exports.hash = function(buffer) {
372
- const ret = wasm.hash(addHeapObject(buffer));
373
- return takeObject(ret);
433
+ module.exports.sign_buffer = function(buffer, private_key) {
434
+ try {
435
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
436
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
437
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
438
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
439
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
440
+ if (r2) {
441
+ throw takeObject(r1);
442
+ }
443
+ return takeObject(r0);
444
+ } finally {
445
+ wasm.__wbindgen_add_to_stack_pointer(16);
446
+ }
374
447
  };
375
448
 
376
449
  /**
377
- * @param {Uint8Array} buffer
378
- * @param {Uint8Array} hash
379
- * @param {bigint} block_id
380
450
  * @param {bigint} peer_index
381
- * @returns {Promise<void>}
451
+ * @returns {Promise<WasmPeer | undefined>}
382
452
  */
383
- module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
384
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
453
+ module.exports.get_peer = function(peer_index) {
454
+ const ret = wasm.get_peer(peer_index);
385
455
  return takeObject(ret);
386
456
  };
387
457
 
388
458
  /**
389
- * @param {bigint} peer_index
390
459
  * @returns {Promise<void>}
391
460
  */
392
- module.exports.process_peer_disconnection = function(peer_index) {
393
- const ret = wasm.process_peer_disconnection(peer_index);
461
+ module.exports.start_from_received_ghost_chain = function() {
462
+ const ret = wasm.start_from_received_ghost_chain();
394
463
  return takeObject(ret);
395
464
  };
396
465
 
397
466
  /**
398
- * @param {bigint} peer_index
399
- * @returns {Promise<WasmPeer | undefined>}
467
+ * @returns {string}
400
468
  */
401
- module.exports.get_peer = function(peer_index) {
402
- const ret = wasm.get_peer(peer_index);
469
+ module.exports.generate_private_key = function() {
470
+ const ret = wasm.generate_private_key();
471
+ return takeObject(ret);
472
+ };
473
+
474
+ /**
475
+ * @param {string} block_hash
476
+ * @returns {Promise<WasmBlock>}
477
+ */
478
+ module.exports.get_block = function(block_hash) {
479
+ const ret = wasm.get_block(addHeapObject(block_hash));
403
480
  return takeObject(ret);
404
481
  };
405
482
 
@@ -415,64 +492,91 @@ module.exports.send_api_error = function(buffer, msg_index, peer_index) {
415
492
  };
416
493
 
417
494
  /**
418
- * @returns {Promise<void>}
495
+ * @param {Array<any>} public_keys
496
+ * @param {BigUint64Array} amounts
497
+ * @param {bigint} fee
498
+ * @param {boolean} _force_merge
499
+ * @returns {Promise<WasmTransaction>}
419
500
  */
420
- module.exports.disable_producing_blocks_by_timer = function() {
421
- const ret = wasm.disable_producing_blocks_by_timer();
501
+ module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
502
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
422
503
  return takeObject(ret);
423
504
  };
424
505
 
425
506
  /**
426
- * @param {bigint} duration_in_ms
427
- * @returns {Promise<void>}
507
+ * @param {Uint8Array} buffer
508
+ * @returns {string}
428
509
  */
429
- module.exports.process_timer_event = function(duration_in_ms) {
430
- const ret = wasm.process_timer_event(duration_in_ms);
510
+ module.exports.hash = function(buffer) {
511
+ const ret = wasm.hash(addHeapObject(buffer));
431
512
  return takeObject(ret);
432
513
  };
433
514
 
434
515
  /**
435
- * @param {string} block_hash
436
- * @returns {Promise<WasmBlock>}
516
+ * @returns {Promise<boolean>}
437
517
  */
438
- module.exports.get_block = function(block_hash) {
439
- const ret = wasm.get_block(addHeapObject(block_hash));
518
+ module.exports.produce_block_with_gt = function() {
519
+ const ret = wasm.produce_block_with_gt();
440
520
  return takeObject(ret);
441
521
  };
442
522
 
443
523
  /**
444
- * @param {bigint} threshold
524
+ * @param {Uint8Array} hash
525
+ * @param {bigint} block_id
526
+ * @param {bigint} peer_index
445
527
  * @returns {Promise<void>}
446
528
  */
447
- module.exports.write_issuance_file = function(threshold) {
448
- const ret = wasm.write_issuance_file(threshold);
529
+ module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
530
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
449
531
  return takeObject(ret);
450
532
  };
451
533
 
452
534
  /**
453
535
  * @param {Uint8Array} buffer
454
- * @param {number} msg_index
536
+ * @param {Uint8Array} hash
537
+ * @param {bigint} block_id
455
538
  * @param {bigint} peer_index
456
539
  * @returns {Promise<void>}
457
540
  */
458
- module.exports.send_api_call = function(buffer, msg_index, peer_index) {
459
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
541
+ module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
542
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
460
543
  return takeObject(ret);
461
544
  };
462
545
 
463
546
  /**
464
- * @returns {Promise<string>}
547
+ * @param {number} major
548
+ * @param {number} minor
549
+ * @param {number} patch
550
+ * @returns {Promise<void>}
465
551
  */
466
- module.exports.get_peer_stats = function() {
467
- const ret = wasm.get_peer_stats();
552
+ module.exports.set_wallet_version = function(major, minor, patch) {
553
+ const ret = wasm.set_wallet_version(major, minor, patch);
468
554
  return takeObject(ret);
469
555
  };
470
556
 
471
557
  /**
472
- * @returns {Promise<Array<any>>}
558
+ * @returns {Promise<boolean>}
473
559
  */
474
- module.exports.get_mempool_txs = function() {
475
- const ret = wasm.get_mempool_txs();
560
+ module.exports.produce_block_without_gt = function() {
561
+ const ret = wasm.produce_block_without_gt();
562
+ return takeObject(ret);
563
+ };
564
+
565
+ /**
566
+ * @param {bigint} threshold
567
+ * @returns {Promise<void>}
568
+ */
569
+ module.exports.write_issuance_file = function(threshold) {
570
+ const ret = wasm.write_issuance_file(threshold);
571
+ return takeObject(ret);
572
+ };
573
+
574
+ /**
575
+ * @param {bigint} peer_index
576
+ * @returns {Promise<void>}
577
+ */
578
+ module.exports.process_peer_disconnection = function(peer_index) {
579
+ const ret = wasm.process_peer_disconnection(peer_index);
476
580
  return takeObject(ret);
477
581
  };
478
582
 
@@ -489,76 +593,58 @@ module.exports.create_transaction = function(public_key, amount, fee, force_merg
489
593
  };
490
594
 
491
595
  /**
492
- * @returns {Promise<boolean>}
596
+ * @param {Array<any>} keys
597
+ * @returns {Promise<WasmBalanceSnapshot>}
493
598
  */
494
- module.exports.produce_block_without_gt = function() {
495
- const ret = wasm.produce_block_without_gt();
599
+ module.exports.get_balance_snapshot = function(keys) {
600
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
496
601
  return takeObject(ret);
497
602
  };
498
603
 
499
604
  /**
500
605
  * @param {Uint8Array} buffer
501
- * @param {string} private_key
502
- * @returns {string}
503
- */
504
- module.exports.sign_buffer = function(buffer, private_key) {
505
- try {
506
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
507
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
508
- var r0 = getInt32Memory0()[retptr / 4 + 0];
509
- var r1 = getInt32Memory0()[retptr / 4 + 1];
510
- var r2 = getInt32Memory0()[retptr / 4 + 2];
511
- if (r2) {
512
- throw takeObject(r1);
513
- }
514
- return takeObject(r0);
515
- } finally {
516
- wasm.__wbindgen_add_to_stack_pointer(16);
517
- }
518
- };
519
-
520
- /**
521
- * @returns {string}
606
+ * @param {bigint} peer_index
607
+ * @returns {Promise<void>}
522
608
  */
523
- module.exports.generate_private_key = function() {
524
- const ret = wasm.generate_private_key();
609
+ module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
610
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
525
611
  return takeObject(ret);
526
612
  };
527
613
 
528
614
  /**
529
- * @param {Uint8Array} hash
530
- * @param {bigint} block_id
531
615
  * @param {bigint} peer_index
616
+ * @param {string} public_key
532
617
  * @returns {Promise<void>}
533
618
  */
534
- module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
535
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
619
+ module.exports.process_stun_peer = function(peer_index, public_key) {
620
+ const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
536
621
  return takeObject(ret);
537
622
  };
538
623
 
539
624
  /**
625
+ * @param {Uint8Array} buffer
626
+ * @param {number} msg_index
540
627
  * @param {bigint} peer_index
541
628
  * @returns {Promise<void>}
542
629
  */
543
- module.exports.remove_stun_peer = function(peer_index) {
544
- const ret = wasm.remove_stun_peer(peer_index);
630
+ module.exports.send_api_success = function(buffer, msg_index, peer_index) {
631
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
545
632
  return takeObject(ret);
546
633
  };
547
634
 
548
635
  /**
549
- * @returns {Promise<string>}
636
+ * @returns {Promise<WasmWallet>}
550
637
  */
551
- module.exports.get_stats = function() {
552
- const ret = wasm.get_stats();
638
+ module.exports.get_wallet = function() {
639
+ const ret = wasm.get_wallet();
553
640
  return takeObject(ret);
554
641
  };
555
642
 
556
643
  /**
557
- * @param {string} public_key
558
644
  * @returns {Promise<Array<any>>}
559
645
  */
560
- module.exports.get_account_slips = function(public_key) {
561
- const ret = wasm.get_account_slips(addHeapObject(public_key));
646
+ module.exports.get_peers = function() {
647
+ const ret = wasm.get_peers();
562
648
  return takeObject(ret);
563
649
  };
564
650
 
@@ -568,49 +654,18 @@ module.exports.get_account_slips = function(public_key) {
568
654
  * @param {bigint} peer_index
569
655
  * @returns {Promise<void>}
570
656
  */
571
- module.exports.send_api_success = function(buffer, msg_index, peer_index) {
572
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
573
- return takeObject(ret);
574
- };
575
-
576
- /**
577
- * @param {string} config_json
578
- * @param {string} private_key
579
- * @param {number} log_level_num
580
- * @param {bigint} hasten_multiplier
581
- * @param {boolean} delete_old_blocks
582
- * @returns {Promise<any>}
583
- */
584
- module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
585
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
657
+ module.exports.send_api_call = function(buffer, msg_index, peer_index) {
658
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
586
659
  return takeObject(ret);
587
660
  };
588
661
 
589
662
  /**
590
- * @param {string} private_key
591
- * @returns {string}
592
- */
593
- module.exports.generate_public_key = function(private_key) {
594
- try {
595
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
596
- wasm.generate_public_key(retptr, addHeapObject(private_key));
597
- var r0 = getInt32Memory0()[retptr / 4 + 0];
598
- var r1 = getInt32Memory0()[retptr / 4 + 1];
599
- var r2 = getInt32Memory0()[retptr / 4 + 2];
600
- if (r2) {
601
- throw takeObject(r1);
602
- }
603
- return takeObject(r0);
604
- } finally {
605
- wasm.__wbindgen_add_to_stack_pointer(16);
606
- }
607
- };
608
-
609
- /**
610
- * @returns {Promise<bigint>}
663
+ * @param {bigint} peer_index
664
+ * @param {string} ip
665
+ * @returns {Promise<void>}
611
666
  */
612
- module.exports.get_next_peer_index = function() {
613
- const ret = wasm.get_next_peer_index();
667
+ module.exports.process_new_peer = function(peer_index, ip) {
668
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
614
669
  return takeObject(ret);
615
670
  };
616
671
 
@@ -624,6 +679,14 @@ module.exports.propagate_transaction = function(tx) {
624
679
  return takeObject(ret);
625
680
  };
626
681
 
682
+ /**
683
+ * @returns {Promise<string>}
684
+ */
685
+ module.exports.get_peer_stats = function() {
686
+ const ret = wasm.get_peer_stats();
687
+ return takeObject(ret);
688
+ };
689
+
627
690
  /**
628
691
  * @param {Uint8Array} buffer
629
692
  * @param {string} signature
@@ -636,45 +699,39 @@ module.exports.verify_signature = function(buffer, signature, public_key) {
636
699
  };
637
700
 
638
701
  /**
639
- * @param {number} major
640
- * @param {number} minor
641
- * @param {number} patch
642
- * @returns {Promise<void>}
643
- */
644
- module.exports.set_wallet_version = function(major, minor, patch) {
645
- const ret = wasm.set_wallet_version(major, minor, patch);
646
- return takeObject(ret);
647
- };
648
-
649
- /**
650
- * @param {bigint} peer_index
651
- * @param {string} public_key
652
- * @returns {Promise<void>}
702
+ * @returns {Promise<bigint>}
653
703
  */
654
- module.exports.process_stun_peer = function(peer_index, public_key) {
655
- const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
704
+ module.exports.get_next_peer_index = function() {
705
+ const ret = wasm.get_next_peer_index();
656
706
  return takeObject(ret);
657
707
  };
658
708
 
659
709
  /**
660
- * @returns {Promise<boolean>}
710
+ * @param {string} private_key
711
+ * @returns {string}
661
712
  */
662
- module.exports.produce_block_with_gt = function() {
663
- const ret = wasm.produce_block_with_gt();
664
- return takeObject(ret);
713
+ module.exports.generate_public_key = function(private_key) {
714
+ try {
715
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
716
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
717
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
718
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
719
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
720
+ if (r2) {
721
+ throw takeObject(r1);
722
+ }
723
+ return takeObject(r0);
724
+ } finally {
725
+ wasm.__wbindgen_add_to_stack_pointer(16);
726
+ }
665
727
  };
666
728
 
667
729
  /**
668
- * @param {bigint} amt
669
- * @param {string} slip1_utxo_key
670
- * @param {string} slip2_utxo_key
671
- * @param {string} slip3_utxo_key
672
- * @param {string} recipient_public_key
673
- * @param {Uint8Array} tx_msg
674
- * @returns {Promise<WasmTransaction>}
730
+ * @param {bigint} duration_in_ms
731
+ * @returns {Promise<void>}
675
732
  */
676
- module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
677
- const ret = wasm.create_send_bound_transaction(amt, addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(recipient_public_key), addHeapObject(tx_msg));
733
+ module.exports.process_timer_event = function(duration_in_ms) {
734
+ const ret = wasm.process_timer_event(duration_in_ms);
678
735
  return takeObject(ret);
679
736
  };
680
737
 
@@ -692,53 +749,8 @@ module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_u
692
749
  return takeObject(ret);
693
750
  };
694
751
 
695
- /**
696
- * @param {Uint8Array} buffer
697
- * @param {bigint} peer_index
698
- * @returns {Promise<void>}
699
- */
700
- module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
701
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
702
- return takeObject(ret);
703
- };
704
-
705
- /**
706
- * @returns {Promise<Array<any>>}
707
- */
708
- module.exports.get_nft_list = function() {
709
- const ret = wasm.get_nft_list();
710
- return takeObject(ret);
711
- };
712
-
713
- /**
714
- * @param {WasmBalanceSnapshot} snapshot
715
- * @returns {Promise<void>}
716
- */
717
- module.exports.update_from_balance_snapshot = function(snapshot) {
718
- _assertClass(snapshot, WasmBalanceSnapshot);
719
- var ptr0 = snapshot.__destroy_into_raw();
720
- const ret = wasm.update_from_balance_snapshot(ptr0);
721
- return takeObject(ret);
722
- };
723
-
724
- /**
725
- * @param {bigint} current_time
726
- * @returns {Promise<void>}
727
- */
728
- module.exports.process_stat_interval = function(current_time) {
729
- const ret = wasm.process_stat_interval(current_time);
730
- return takeObject(ret);
731
- };
732
-
733
- function handleError(f, args) {
734
- try {
735
- return f.apply(this, args);
736
- } catch (e) {
737
- wasm.__wbindgen_exn_store(addHeapObject(e));
738
- }
739
- }
740
- function __wbg_adapter_393(arg0, arg1, arg2, arg3) {
741
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hbc768321d477e205(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
752
+ function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
753
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
742
754
  }
743
755
 
744
756
  const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -2645,18 +2657,28 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2645
2657
  takeObject(arg0);
2646
2658
  };
2647
2659
 
2648
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2649
- const ret = BigInt.asUintN(64, arg0);
2660
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
2661
+ const ret = getStringFromWasm0(arg0, arg1);
2650
2662
  return addHeapObject(ret);
2651
2663
  };
2652
2664
 
2653
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
2654
- const ret = getStringFromWasm0(arg0, arg1);
2665
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2666
+ const ret = WasmPeer.__wrap(arg0);
2655
2667
  return addHeapObject(ret);
2656
2668
  };
2657
2669
 
2658
- module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2659
- const ret = WasmWalletSlip.__wrap(arg0);
2670
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2671
+ const ret = WasmTransaction.__wrap(arg0);
2672
+ return addHeapObject(ret);
2673
+ };
2674
+
2675
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2676
+ const ret = BigInt.asUintN(64, arg0);
2677
+ return addHeapObject(ret);
2678
+ };
2679
+
2680
+ module.exports.__wbg_wasmblock_new = function(arg0) {
2681
+ const ret = WasmBlock.__wrap(arg0);
2660
2682
  return addHeapObject(ret);
2661
2683
  };
2662
2684
 
@@ -2665,6 +2687,11 @@ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2665
2687
  return addHeapObject(ret);
2666
2688
  };
2667
2689
 
2690
+ module.exports.__wbg_wasmnft_new = function(arg0) {
2691
+ const ret = WasmNFT.__wrap(arg0);
2692
+ return addHeapObject(ret);
2693
+ };
2694
+
2668
2695
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
2669
2696
  const obj = getObject(arg1);
2670
2697
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -2674,43 +2701,38 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
2674
2701
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2675
2702
  };
2676
2703
 
2677
- module.exports.__wbg_wasmtransaction_new = function(arg0) {
2678
- const ret = WasmTransaction.__wrap(arg0);
2679
- return addHeapObject(ret);
2680
- };
2681
-
2682
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2683
- const ret = WasmBlockchain.__wrap(arg0);
2704
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2705
+ const ret = WasmWallet.__wrap(arg0);
2684
2706
  return addHeapObject(ret);
2685
2707
  };
2686
2708
 
2687
- module.exports.__wbg_wasmnft_new = function(arg0) {
2688
- const ret = WasmNFT.__wrap(arg0);
2709
+ module.exports.__wbindgen_object_clone_ref = function(arg0) {
2710
+ const ret = getObject(arg0);
2689
2711
  return addHeapObject(ret);
2690
2712
  };
2691
2713
 
2692
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2693
- const ret = WasmPeer.__wrap(arg0);
2714
+ module.exports.__wbg_wasmslip_new = function(arg0) {
2715
+ const ret = WasmSlip.__wrap(arg0);
2694
2716
  return addHeapObject(ret);
2695
2717
  };
2696
2718
 
2697
- module.exports.__wbg_wasmblock_new = function(arg0) {
2698
- const ret = WasmBlock.__wrap(arg0);
2719
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2720
+ const ret = WasmBlockchain.__wrap(arg0);
2699
2721
  return addHeapObject(ret);
2700
2722
  };
2701
2723
 
2702
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2703
- const ret = WasmWallet.__wrap(arg0);
2724
+ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2725
+ const ret = WasmWalletSlip.__wrap(arg0);
2704
2726
  return addHeapObject(ret);
2705
2727
  };
2706
2728
 
2707
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
2708
- const ret = getObject(arg0);
2729
+ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2730
+ const ret = WasmPeerService.__wrap(arg0);
2709
2731
  return addHeapObject(ret);
2710
2732
  };
2711
2733
 
2712
- module.exports.__wbg_wasmslip_new = function(arg0) {
2713
- const ret = WasmSlip.__wrap(arg0);
2734
+ module.exports.__wbg_wasmhop_new = function(arg0) {
2735
+ const ret = WasmHop.__wrap(arg0);
2714
2736
  return addHeapObject(ret);
2715
2737
  };
2716
2738
 
@@ -2730,22 +2752,7 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
2730
2752
  return ret;
2731
2753
  };
2732
2754
 
2733
- module.exports.__wbg_wasmhop_new = function(arg0) {
2734
- const ret = WasmHop.__wrap(arg0);
2735
- return addHeapObject(ret);
2736
- };
2737
-
2738
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
2739
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2740
- return addHeapObject(ret);
2741
- };
2742
-
2743
- module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2744
- const ret = WasmPeerService.__wrap(arg0);
2745
- return addHeapObject(ret);
2746
- };
2747
-
2748
- module.exports.__wbg_flushdata_02f5939a34c7adf1 = function(arg0, arg1) {
2755
+ module.exports.__wbg_flushdata_3e493160b5623279 = function(arg0, arg1) {
2749
2756
  let deferred0_0;
2750
2757
  let deferred0_1;
2751
2758
  try {
@@ -2757,7 +2764,7 @@ module.exports.__wbg_flushdata_02f5939a34c7adf1 = function(arg0, arg1) {
2757
2764
  }
2758
2765
  };
2759
2766
 
2760
- module.exports.__wbg_readvalue_6f58b8d737c8947f = function() { return handleError(function (arg0, arg1) {
2767
+ module.exports.__wbg_readvalue_5d0f093e1595617d = function() { return handleError(function (arg0, arg1) {
2761
2768
  let deferred0_0;
2762
2769
  let deferred0_1;
2763
2770
  try {
@@ -2770,15 +2777,15 @@ module.exports.__wbg_readvalue_6f58b8d737c8947f = function() { return handleErro
2770
2777
  }
2771
2778
  }, arguments) };
2772
2779
 
2773
- module.exports.__wbg_loadwallet_4fa9260e0e5b29ad = function() {
2780
+ module.exports.__wbg_loadwallet_59081515a24e409d = function() {
2774
2781
  MsgHandler.load_wallet();
2775
2782
  };
2776
2783
 
2777
- module.exports.__wbg_savewallet_db43f92c74d98db4 = function() {
2784
+ module.exports.__wbg_savewallet_86e332f8fdf6bc63 = function() {
2778
2785
  MsgHandler.save_wallet();
2779
2786
  };
2780
2787
 
2781
- module.exports.__wbg_writevalue_64abf78ec7b7a0a7 = function(arg0, arg1, arg2) {
2788
+ module.exports.__wbg_writevalue_9f48cba844bce929 = function(arg0, arg1, arg2) {
2782
2789
  let deferred0_0;
2783
2790
  let deferred0_1;
2784
2791
  try {
@@ -2790,7 +2797,7 @@ module.exports.__wbg_writevalue_64abf78ec7b7a0a7 = function(arg0, arg1, arg2) {
2790
2797
  }
2791
2798
  };
2792
2799
 
2793
- module.exports.__wbg_appendvalue_dfb9143a42c8a96f = function(arg0, arg1, arg2) {
2800
+ module.exports.__wbg_appendvalue_e7ab232264abb10f = function(arg0, arg1, arg2) {
2794
2801
  let deferred0_0;
2795
2802
  let deferred0_1;
2796
2803
  try {
@@ -2802,7 +2809,7 @@ module.exports.__wbg_appendvalue_dfb9143a42c8a96f = function(arg0, arg1, arg2) {
2802
2809
  }
2803
2810
  };
2804
2811
 
2805
- module.exports.__wbg_removevalue_54c2c52edfb40121 = function() { return handleError(function (arg0, arg1) {
2812
+ module.exports.__wbg_removevalue_c5af6fcdb8e65e93 = function() { return handleError(function (arg0, arg1) {
2806
2813
  let deferred0_0;
2807
2814
  let deferred0_1;
2808
2815
  try {
@@ -2815,11 +2822,11 @@ module.exports.__wbg_removevalue_54c2c52edfb40121 = function() { return handleEr
2815
2822
  }
2816
2823
  }, arguments) };
2817
2824
 
2818
- module.exports.__wbg_sendmessage_dd1c456fc24d6ae2 = function(arg0, arg1) {
2825
+ module.exports.__wbg_sendmessage_360fd9c5b7eb6710 = function(arg0, arg1) {
2819
2826
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2820
2827
  };
2821
2828
 
2822
- module.exports.__wbg_connecttopeer_2e3115f373923a34 = function() { return handleError(function (arg0, arg1, arg2) {
2829
+ module.exports.__wbg_connecttopeer_099b3d1c7c6e20da = function() { return handleError(function (arg0, arg1, arg2) {
2823
2830
  let deferred0_0;
2824
2831
  let deferred0_1;
2825
2832
  try {
@@ -2832,14 +2839,14 @@ module.exports.__wbg_connecttopeer_2e3115f373923a34 = function() { return handle
2832
2839
  }
2833
2840
  }, arguments) };
2834
2841
 
2835
- module.exports.__wbg_getmyservices_247b7276a00aa7a1 = function() {
2842
+ module.exports.__wbg_getmyservices_012e89506828bc2f = function() {
2836
2843
  const ret = MsgHandler.get_my_services();
2837
2844
  _assertClass(ret, WasmPeerServiceList);
2838
2845
  var ptr1 = ret.__destroy_into_raw();
2839
2846
  return ptr1;
2840
2847
  };
2841
2848
 
2842
- module.exports.__wbg_isexistingfile_54560db336503ad5 = function() { return handleError(function (arg0, arg1) {
2849
+ module.exports.__wbg_isexistingfile_89e9eb758e45ff5e = function() { return handleError(function (arg0, arg1) {
2843
2850
  let deferred0_0;
2844
2851
  let deferred0_1;
2845
2852
  try {
@@ -2852,33 +2859,33 @@ module.exports.__wbg_isexistingfile_54560db336503ad5 = function() { return handl
2852
2859
  }
2853
2860
  }, arguments) };
2854
2861
 
2855
- module.exports.__wbg_processapicall_d409cedb7f665312 = function(arg0, arg1, arg2) {
2862
+ module.exports.__wbg_processapicall_06672752efc468c6 = function(arg0, arg1, arg2) {
2856
2863
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2857
2864
  };
2858
2865
 
2859
- module.exports.__wbg_processapierror_e2c1f858819cf5cf = function(arg0, arg1, arg2) {
2866
+ module.exports.__wbg_processapierror_f821f4aea886cad6 = function(arg0, arg1, arg2) {
2860
2867
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2861
2868
  };
2862
2869
 
2863
- module.exports.__wbg_processapisuccess_dc587307a8ec6a59 = function(arg0, arg1, arg2) {
2870
+ module.exports.__wbg_processapisuccess_b088c5350b1602ab = function(arg0, arg1, arg2) {
2864
2871
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2865
2872
  };
2866
2873
 
2867
- module.exports.__wbg_sendmessagetoall_5c38c389c7434159 = function(arg0, arg1) {
2874
+ module.exports.__wbg_sendmessagetoall_6fcbaa970ca58136 = function(arg0, arg1) {
2868
2875
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2869
2876
  };
2870
2877
 
2871
- module.exports.__wbg_disconnectfrompeer_41e790d250243fd7 = function() { return handleError(function (arg0) {
2878
+ module.exports.__wbg_disconnectfrompeer_300d63aa93f61d50 = function() { return handleError(function (arg0) {
2872
2879
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2873
2880
  return addHeapObject(ret);
2874
2881
  }, arguments) };
2875
2882
 
2876
- module.exports.__wbg_loadblockfilelist_5e719b9d74178df6 = function() { return handleError(function () {
2883
+ module.exports.__wbg_loadblockfilelist_7ebdc6dd8988f2e9 = function() { return handleError(function () {
2877
2884
  const ret = MsgHandler.load_block_file_list();
2878
2885
  return addHeapObject(ret);
2879
2886
  }, arguments) };
2880
2887
 
2881
- module.exports.__wbg_sendinterfaceevent_890fc416d90ba971 = function(arg0, arg1, arg2, arg3, arg4) {
2888
+ module.exports.__wbg_sendinterfaceevent_3091ea002268b66a = function(arg0, arg1, arg2, arg3, arg4) {
2882
2889
  let deferred0_0;
2883
2890
  let deferred0_1;
2884
2891
  let deferred1_0;
@@ -2895,7 +2902,7 @@ module.exports.__wbg_sendinterfaceevent_890fc416d90ba971 = function(arg0, arg1,
2895
2902
  }
2896
2903
  };
2897
2904
 
2898
- module.exports.__wbg_sendblocksuccess_294795b33a4eb2c8 = function(arg0, arg1, arg2) {
2905
+ module.exports.__wbg_sendblocksuccess_4076186533b0dd4b = function(arg0, arg1, arg2) {
2899
2906
  let deferred0_0;
2900
2907
  let deferred0_1;
2901
2908
  try {
@@ -2907,11 +2914,11 @@ module.exports.__wbg_sendblocksuccess_294795b33a4eb2c8 = function(arg0, arg1, ar
2907
2914
  }
2908
2915
  };
2909
2916
 
2910
- module.exports.__wbg_sendwalletupdate_6128fb2a65955772 = function() {
2917
+ module.exports.__wbg_sendwalletupdate_a4a45445d63fa2a1 = function() {
2911
2918
  MsgHandler.send_wallet_update();
2912
2919
  };
2913
2920
 
2914
- module.exports.__wbg_sendnewversionalert_90c0405e8fc96529 = function(arg0, arg1, arg2) {
2921
+ module.exports.__wbg_sendnewversionalert_3ec71b6bf65d28d0 = function(arg0, arg1, arg2) {
2915
2922
  let deferred0_0;
2916
2923
  let deferred0_1;
2917
2924
  try {
@@ -2923,15 +2930,15 @@ module.exports.__wbg_sendnewversionalert_90c0405e8fc96529 = function(arg0, arg1,
2923
2930
  }
2924
2931
  };
2925
2932
 
2926
- module.exports.__wbg_sendblockfetchstatusevent_f8ad3e0c574a3d2f = function(arg0) {
2933
+ module.exports.__wbg_sendblockfetchstatusevent_23c7a26cfd3a5d15 = function(arg0) {
2927
2934
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2928
2935
  };
2929
2936
 
2930
- module.exports.__wbg_sendnewchaindetectedevent_814f1cb2a0968c86 = function() {
2937
+ module.exports.__wbg_sendnewchaindetectedevent_9814eea25ed127aa = function() {
2931
2938
  MsgHandler.send_new_chain_detected_event();
2932
2939
  };
2933
2940
 
2934
- module.exports.__wbg_fetchblockfrompeer_1ae370fdece9cb73 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2941
+ module.exports.__wbg_fetchblockfrompeer_ab58f5ed93834e68 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2935
2942
  let deferred0_0;
2936
2943
  let deferred0_1;
2937
2944
  try {
@@ -2944,7 +2951,7 @@ module.exports.__wbg_fetchblockfrompeer_1ae370fdece9cb73 = function() { return h
2944
2951
  }
2945
2952
  }, arguments) };
2946
2953
 
2947
- module.exports.__wbg_ensureblockdirectoryexists_7fcab2b9dc2610fe = function() { return handleError(function (arg0, arg1) {
2954
+ module.exports.__wbg_ensureblockdirectoryexists_e06f5acab13f0888 = function() { return handleError(function (arg0, arg1) {
2948
2955
  let deferred0_0;
2949
2956
  let deferred0_1;
2950
2957
  try {
@@ -2956,6 +2963,11 @@ module.exports.__wbg_ensureblockdirectoryexists_7fcab2b9dc2610fe = function() {
2956
2963
  }
2957
2964
  }, arguments) };
2958
2965
 
2966
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
2967
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2968
+ return addHeapObject(ret);
2969
+ };
2970
+
2959
2971
  module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2960
2972
  const ret = getObject(arg0) == getObject(arg1);
2961
2973
  return ret;
@@ -3258,7 +3270,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
3258
3270
  const a = state0.a;
3259
3271
  state0.a = 0;
3260
3272
  try {
3261
- return __wbg_adapter_393(a, state0.b, arg0, arg1);
3273
+ return __wbg_adapter_406(a, state0.b, arg0, arg1);
3262
3274
  } finally {
3263
3275
  state0.a = a;
3264
3276
  }
@@ -3332,8 +3344,8 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
3332
3344
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3333
3345
  };
3334
3346
 
3335
- module.exports.__wbindgen_closure_wrapper1619 = function(arg0, arg1, arg2) {
3336
- const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
3347
+ module.exports.__wbindgen_closure_wrapper1627 = function(arg0, arg1, arg2) {
3348
+ const ret = makeMutClosure(arg0, arg1, 581, __wbg_adapter_38);
3337
3349
  return addHeapObject(ret);
3338
3350
  };
3339
3351