saito-wasm 0.2.167 → 0.2.169

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