saito-wasm 0.2.165 → 0.2.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/web/index.js CHANGED
@@ -1,27 +1,31 @@
1
- import { MsgHandler } from './snippets/saito-wasm-9c691657239d0ce9/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-25d13ca010c26982/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
5
- const heap = new Array(128).fill(undefined);
6
-
7
- heap.push(undefined, null, true, false);
5
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
8
6
 
9
- function getObject(idx) { return heap[idx]; }
7
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
10
8
 
11
- let heap_next = heap.length;
9
+ let cachedUint8Memory0 = null;
12
10
 
13
- function dropObject(idx) {
14
- if (idx < 132) return;
15
- heap[idx] = heap_next;
16
- heap_next = idx;
11
+ function getUint8Memory0() {
12
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
13
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
14
+ }
15
+ return cachedUint8Memory0;
17
16
  }
18
17
 
19
- function takeObject(idx) {
20
- const ret = getObject(idx);
21
- dropObject(idx);
22
- return ret;
18
+ function getStringFromWasm0(ptr, len) {
19
+ ptr = ptr >>> 0;
20
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
23
21
  }
24
22
 
23
+ const heap = new Array(128).fill(undefined);
24
+
25
+ heap.push(undefined, null, true, false);
26
+
27
+ let heap_next = heap.length;
28
+
25
29
  function addHeapObject(obj) {
26
30
  if (heap_next === heap.length) heap.push(heap.length + 1);
27
31
  const idx = heap_next;
@@ -31,22 +35,18 @@ function addHeapObject(obj) {
31
35
  return idx;
32
36
  }
33
37
 
34
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
35
-
36
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
37
-
38
- let cachedUint8Memory0 = null;
38
+ function getObject(idx) { return heap[idx]; }
39
39
 
40
- function getUint8Memory0() {
41
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
42
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
43
- }
44
- return cachedUint8Memory0;
40
+ function dropObject(idx) {
41
+ if (idx < 132) return;
42
+ heap[idx] = heap_next;
43
+ heap_next = idx;
45
44
  }
46
45
 
47
- function getStringFromWasm0(ptr, len) {
48
- ptr = ptr >>> 0;
49
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
46
+ function takeObject(idx) {
47
+ const ret = getObject(idx);
48
+ dropObject(idx);
49
+ return ret;
50
50
  }
51
51
 
52
52
  let WASM_VECTOR_LEN = 0;
@@ -223,7 +223,15 @@ function makeMutClosure(arg0, arg1, dtor, f) {
223
223
  return real;
224
224
  }
225
225
  function __wbg_adapter_38(arg0, arg1, arg2) {
226
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf760697bf54687ef(arg0, arg1, addHeapObject(arg2));
226
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18f9d53151d93e96(arg0, arg1, addHeapObject(arg2));
227
+ }
228
+
229
+ let stack_pointer = 128;
230
+
231
+ function addBorrowedObject(obj) {
232
+ if (stack_pointer == 1) throw new Error('out of js stack');
233
+ heap[--stack_pointer] = obj;
234
+ return stack_pointer;
227
235
  }
228
236
 
229
237
  function _assertClass(instance, klass) {
@@ -233,132 +241,152 @@ function _assertClass(instance, klass) {
233
241
  return instance.ptr;
234
242
  }
235
243
 
236
- let stack_pointer = 128;
237
-
238
- function addBorrowedObject(obj) {
239
- if (stack_pointer == 1) throw new Error('out of js stack');
240
- heap[--stack_pointer] = obj;
241
- return stack_pointer;
244
+ function handleError(f, args) {
245
+ try {
246
+ return f.apply(this, args);
247
+ } catch (e) {
248
+ wasm.__wbindgen_exn_store(addHeapObject(e));
249
+ }
242
250
  }
243
251
  /**
244
- * @returns {Promise<string>}
252
+ * @returns {Promise<boolean>}
245
253
  */
246
- export function get_latest_block_hash() {
247
- const ret = wasm.get_latest_block_hash();
254
+ export function produce_block_with_gt() {
255
+ const ret = wasm.produce_block_with_gt();
248
256
  return takeObject(ret);
249
257
  }
250
258
 
251
259
  /**
252
- * @returns {Promise<WasmWallet>}
260
+ * @param {bigint} duration_in_ms
261
+ * @returns {Promise<void>}
253
262
  */
254
- export function get_wallet() {
255
- const ret = wasm.get_wallet();
263
+ export function process_timer_event(duration_in_ms) {
264
+ const ret = wasm.process_timer_event(duration_in_ms);
256
265
  return takeObject(ret);
257
266
  }
258
267
 
259
268
  /**
260
- * @param {string} nft_id_hex
261
- * @param {Uint8Array} tx_msg
269
+ * @param {Array<any>} public_keys
270
+ * @param {BigUint64Array} amounts
271
+ * @param {bigint} fee
272
+ * @param {boolean} _force_merge
262
273
  * @returns {Promise<WasmTransaction>}
263
274
  */
264
- export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
265
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
266
- const len0 = WASM_VECTOR_LEN;
267
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
275
+ export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
276
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
268
277
  return takeObject(ret);
269
278
  }
270
279
 
271
280
  /**
272
- * @param {bigint} num
273
- * @param {bigint} deposit
274
- * @param {Uint8Array} tx_msg
275
- * @param {bigint} fee
276
- * @param {string} recipient_public_key
277
- * @param {string} nft_type
278
- * @returns {Promise<WasmTransaction>}
281
+ * @returns {Promise<boolean>}
279
282
  */
280
- export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
281
- const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
283
+ export function produce_block_without_gt() {
284
+ const ret = wasm.produce_block_without_gt();
282
285
  return takeObject(ret);
283
286
  }
284
287
 
285
288
  /**
286
- * @param {string} key
287
- * @returns {boolean}
289
+ * @param {Uint8Array} buffer
290
+ * @param {number} msg_index
291
+ * @param {bigint} peer_index
292
+ * @returns {Promise<void>}
288
293
  */
289
- export function is_valid_public_key(key) {
290
- const ret = wasm.is_valid_public_key(addHeapObject(key));
291
- return ret !== 0;
294
+ export function send_api_success(buffer, msg_index, peer_index) {
295
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
296
+ return takeObject(ret);
292
297
  }
293
298
 
294
299
  /**
295
- * @returns {Promise<string>}
300
+ * @param {number} major
301
+ * @param {number} minor
302
+ * @param {number} patch
303
+ * @returns {Promise<void>}
296
304
  */
297
- export function get_congestion_stats() {
298
- const ret = wasm.get_congestion_stats();
305
+ export function set_wallet_version(major, minor, patch) {
306
+ const ret = wasm.set_wallet_version(major, minor, patch);
299
307
  return takeObject(ret);
300
308
  }
301
309
 
302
310
  /**
303
- * @param {Array<any>} public_keys
304
- * @param {BigUint64Array} amounts
305
- * @param {bigint} fee
306
- * @param {boolean} _force_merge
307
- * @returns {Promise<WasmTransaction>}
311
+ * @param {Uint8Array} hash
312
+ * @param {bigint} block_id
313
+ * @param {bigint} peer_index
314
+ * @returns {Promise<void>}
308
315
  */
309
- export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
310
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
316
+ export function process_failed_block_fetch(hash, block_id, peer_index) {
317
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
311
318
  return takeObject(ret);
312
319
  }
313
320
 
314
321
  /**
315
- * @returns {Promise<void>}
322
+ * @param {string} block_hash
323
+ * @returns {Promise<WasmBlock>}
316
324
  */
317
- export function start_from_received_ghost_chain() {
318
- const ret = wasm.start_from_received_ghost_chain();
325
+ export function get_block(block_hash) {
326
+ const ret = wasm.get_block(addHeapObject(block_hash));
319
327
  return takeObject(ret);
320
328
  }
321
329
 
322
330
  /**
323
- * @returns {Promise<WasmBlockchain>}
331
+ * @param {string} private_key
332
+ * @returns {string}
324
333
  */
325
- export function get_blockchain() {
326
- const ret = wasm.get_blockchain();
327
- return takeObject(ret);
334
+ export function generate_public_key(private_key) {
335
+ try {
336
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
337
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
338
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
339
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
340
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
341
+ if (r2) {
342
+ throw takeObject(r1);
343
+ }
344
+ return takeObject(r0);
345
+ } finally {
346
+ wasm.__wbindgen_add_to_stack_pointer(16);
347
+ }
328
348
  }
329
349
 
330
350
  /**
331
- * @param {Array<any>} keys
332
- * @returns {Promise<WasmBalanceSnapshot>}
351
+ * @returns {Promise<Array<any>>}
333
352
  */
334
- export function get_balance_snapshot(keys) {
335
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
353
+ export function get_nft_list() {
354
+ const ret = wasm.get_nft_list();
336
355
  return takeObject(ret);
337
356
  }
338
357
 
339
358
  /**
340
- * @returns {Promise<any>}
359
+ * @param {Uint8Array} buffer
360
+ * @param {string} signature
361
+ * @param {string} public_key
362
+ * @returns {boolean}
341
363
  */
342
- export function get_confirmations() {
343
- const ret = wasm.get_confirmations();
364
+ export function verify_signature(buffer, signature, public_key) {
365
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
366
+ return ret !== 0;
367
+ }
368
+
369
+ /**
370
+ * @returns {Promise<string>}
371
+ */
372
+ export function get_stats() {
373
+ const ret = wasm.get_stats();
344
374
  return takeObject(ret);
345
375
  }
346
376
 
347
377
  /**
348
- * @returns {Promise<Array<any>>}
378
+ * @returns {Promise<any>}
349
379
  */
350
- export function get_peers() {
351
- const ret = wasm.get_peers();
380
+ export function get_confirmations() {
381
+ const ret = wasm.get_confirmations();
352
382
  return takeObject(ret);
353
383
  }
354
384
 
355
385
  /**
356
- * @param {bigint} peer_index
357
- * @param {string} ip
358
- * @returns {Promise<void>}
386
+ * @returns {Promise<string>}
359
387
  */
360
- export function process_new_peer(peer_index, ip) {
361
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
388
+ export function get_latest_block_hash() {
389
+ const ret = wasm.get_latest_block_hash();
362
390
  return takeObject(ret);
363
391
  }
364
392
 
@@ -372,69 +400,62 @@ export function hash(buffer) {
372
400
  }
373
401
 
374
402
  /**
375
- * @param {Uint8Array} buffer
376
- * @param {Uint8Array} hash
377
- * @param {bigint} block_id
378
- * @param {bigint} peer_index
379
- * @returns {Promise<void>}
403
+ * @returns {Promise<string>}
380
404
  */
381
- export function process_fetched_block(buffer, hash, block_id, peer_index) {
382
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
405
+ export function get_peer_stats() {
406
+ const ret = wasm.get_peer_stats();
383
407
  return takeObject(ret);
384
408
  }
385
409
 
386
410
  /**
387
411
  * @param {bigint} peer_index
412
+ * @param {string} public_key
388
413
  * @returns {Promise<void>}
389
414
  */
390
- export function process_peer_disconnection(peer_index) {
391
- const ret = wasm.process_peer_disconnection(peer_index);
415
+ export function process_stun_peer(peer_index, public_key) {
416
+ const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
392
417
  return takeObject(ret);
393
418
  }
394
419
 
395
420
  /**
396
- * @param {bigint} peer_index
397
- * @returns {Promise<WasmPeer | undefined>}
421
+ * @returns {Promise<WasmWallet>}
398
422
  */
399
- export function get_peer(peer_index) {
400
- const ret = wasm.get_peer(peer_index);
423
+ export function get_wallet() {
424
+ const ret = wasm.get_wallet();
401
425
  return takeObject(ret);
402
426
  }
403
427
 
404
428
  /**
405
429
  * @param {Uint8Array} buffer
406
- * @param {number} msg_index
407
430
  * @param {bigint} peer_index
408
431
  * @returns {Promise<void>}
409
432
  */
410
- export function send_api_error(buffer, msg_index, peer_index) {
411
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
433
+ export function process_msg_buffer_from_peer(buffer, peer_index) {
434
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
412
435
  return takeObject(ret);
413
436
  }
414
437
 
415
438
  /**
416
- * @returns {Promise<void>}
439
+ * @returns {Promise<bigint>}
417
440
  */
418
- export function disable_producing_blocks_by_timer() {
419
- const ret = wasm.disable_producing_blocks_by_timer();
441
+ export function get_next_peer_index() {
442
+ const ret = wasm.get_next_peer_index();
420
443
  return takeObject(ret);
421
444
  }
422
445
 
423
446
  /**
424
- * @param {bigint} duration_in_ms
425
- * @returns {Promise<void>}
447
+ * @returns {Promise<Array<any>>}
426
448
  */
427
- export function process_timer_event(duration_in_ms) {
428
- const ret = wasm.process_timer_event(duration_in_ms);
449
+ export function get_peers() {
450
+ const ret = wasm.get_peers();
429
451
  return takeObject(ret);
430
452
  }
431
453
 
432
454
  /**
433
- * @param {string} block_hash
434
- * @returns {Promise<WasmBlock>}
455
+ * @returns {Promise<WasmBlockchain>}
435
456
  */
436
- export function get_block(block_hash) {
437
- const ret = wasm.get_block(addHeapObject(block_hash));
457
+ export function get_blockchain() {
458
+ const ret = wasm.get_blockchain();
438
459
  return takeObject(ret);
439
460
  }
440
461
 
@@ -453,68 +474,23 @@ export function write_issuance_file(threshold) {
453
474
  * @param {bigint} peer_index
454
475
  * @returns {Promise<void>}
455
476
  */
456
- export function send_api_call(buffer, msg_index, peer_index) {
457
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
458
- return takeObject(ret);
459
- }
460
-
461
- /**
462
- * @returns {Promise<string>}
463
- */
464
- export function get_peer_stats() {
465
- const ret = wasm.get_peer_stats();
466
- return takeObject(ret);
467
- }
468
-
469
- /**
470
- * @returns {Promise<Array<any>>}
471
- */
472
- export function get_mempool_txs() {
473
- const ret = wasm.get_mempool_txs();
477
+ export function send_api_error(buffer, msg_index, peer_index) {
478
+ const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
474
479
  return takeObject(ret);
475
480
  }
476
481
 
477
482
  /**
478
- * @param {string} public_key
479
- * @param {bigint} amount
480
- * @param {bigint} fee
481
- * @param {boolean} force_merge
483
+ * @param {string} nft_id_hex
484
+ * @param {Uint8Array} tx_msg
482
485
  * @returns {Promise<WasmTransaction>}
483
486
  */
484
- export function create_transaction(public_key, amount, fee, force_merge) {
485
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
486
- return takeObject(ret);
487
- }
488
-
489
- /**
490
- * @returns {Promise<boolean>}
491
- */
492
- export function produce_block_without_gt() {
493
- const ret = wasm.produce_block_without_gt();
487
+ export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
488
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
489
+ const len0 = WASM_VECTOR_LEN;
490
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
494
491
  return takeObject(ret);
495
492
  }
496
493
 
497
- /**
498
- * @param {Uint8Array} buffer
499
- * @param {string} private_key
500
- * @returns {string}
501
- */
502
- export function sign_buffer(buffer, private_key) {
503
- try {
504
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
505
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
506
- var r0 = getInt32Memory0()[retptr / 4 + 0];
507
- var r1 = getInt32Memory0()[retptr / 4 + 1];
508
- var r2 = getInt32Memory0()[retptr / 4 + 2];
509
- if (r2) {
510
- throw takeObject(r1);
511
- }
512
- return takeObject(r0);
513
- } finally {
514
- wasm.__wbindgen_add_to_stack_pointer(16);
515
- }
516
- }
517
-
518
494
  /**
519
495
  * @returns {string}
520
496
  */
@@ -523,17 +499,6 @@ export function generate_private_key() {
523
499
  return takeObject(ret);
524
500
  }
525
501
 
526
- /**
527
- * @param {Uint8Array} hash
528
- * @param {bigint} block_id
529
- * @param {bigint} peer_index
530
- * @returns {Promise<void>}
531
- */
532
- export function process_failed_block_fetch(hash, block_id, peer_index) {
533
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
534
- return takeObject(ret);
535
- }
536
-
537
502
  /**
538
503
  * @param {bigint} peer_index
539
504
  * @returns {Promise<void>}
@@ -544,121 +509,89 @@ export function remove_stun_peer(peer_index) {
544
509
  }
545
510
 
546
511
  /**
547
- * @returns {Promise<string>}
548
- */
549
- export function get_stats() {
550
- const ret = wasm.get_stats();
551
- return takeObject(ret);
552
- }
553
-
554
- /**
555
- * @param {string} public_key
556
- * @returns {Promise<Array<any>>}
557
- */
558
- export function get_account_slips(public_key) {
559
- const ret = wasm.get_account_slips(addHeapObject(public_key));
560
- return takeObject(ret);
561
- }
562
-
563
- /**
564
- * @param {Uint8Array} buffer
565
- * @param {number} msg_index
566
- * @param {bigint} peer_index
512
+ * @param {WasmBalanceSnapshot} snapshot
567
513
  * @returns {Promise<void>}
568
514
  */
569
- export function send_api_success(buffer, msg_index, peer_index) {
570
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
515
+ export function update_from_balance_snapshot(snapshot) {
516
+ _assertClass(snapshot, WasmBalanceSnapshot);
517
+ var ptr0 = snapshot.__destroy_into_raw();
518
+ const ret = wasm.update_from_balance_snapshot(ptr0);
571
519
  return takeObject(ret);
572
520
  }
573
521
 
574
522
  /**
575
- * @param {string} config_json
576
- * @param {string} private_key
577
- * @param {number} log_level_num
578
- * @param {bigint} hasten_multiplier
579
- * @param {boolean} delete_old_blocks
580
- * @returns {Promise<any>}
523
+ * @returns {Promise<string>}
581
524
  */
582
- export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
583
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
525
+ export function get_congestion_stats() {
526
+ const ret = wasm.get_congestion_stats();
584
527
  return takeObject(ret);
585
528
  }
586
529
 
587
530
  /**
588
- * @param {string} private_key
589
- * @returns {string}
531
+ * @param {Uint8Array} buffer
532
+ * @param {Uint8Array} hash
533
+ * @param {bigint} block_id
534
+ * @param {bigint} peer_index
535
+ * @returns {Promise<void>}
590
536
  */
591
- export function generate_public_key(private_key) {
592
- try {
593
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
594
- wasm.generate_public_key(retptr, addHeapObject(private_key));
595
- var r0 = getInt32Memory0()[retptr / 4 + 0];
596
- var r1 = getInt32Memory0()[retptr / 4 + 1];
597
- var r2 = getInt32Memory0()[retptr / 4 + 2];
598
- if (r2) {
599
- throw takeObject(r1);
600
- }
601
- return takeObject(r0);
602
- } finally {
603
- wasm.__wbindgen_add_to_stack_pointer(16);
604
- }
537
+ export function process_fetched_block(buffer, hash, block_id, peer_index) {
538
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
539
+ return takeObject(ret);
605
540
  }
606
541
 
607
542
  /**
608
- * @returns {Promise<bigint>}
543
+ * @param {string} slip1_utxo_key
544
+ * @param {string} slip2_utxo_key
545
+ * @param {string} slip3_utxo_key
546
+ * @returns {Promise<WasmTransaction>}
609
547
  */
610
- export function get_next_peer_index() {
611
- const ret = wasm.get_next_peer_index();
548
+ export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
549
+ const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
612
550
  return takeObject(ret);
613
551
  }
614
552
 
615
553
  /**
616
- * @param {WasmTransaction} tx
617
554
  * @returns {Promise<void>}
618
555
  */
619
- export function propagate_transaction(tx) {
620
- _assertClass(tx, WasmTransaction);
621
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
556
+ export function disable_producing_blocks_by_timer() {
557
+ const ret = wasm.disable_producing_blocks_by_timer();
622
558
  return takeObject(ret);
623
559
  }
624
560
 
625
561
  /**
626
- * @param {Uint8Array} buffer
627
- * @param {string} signature
628
562
  * @param {string} public_key
629
- * @returns {boolean}
563
+ * @param {bigint} amount
564
+ * @param {bigint} fee
565
+ * @param {boolean} force_merge
566
+ * @returns {Promise<WasmTransaction>}
630
567
  */
631
- export function verify_signature(buffer, signature, public_key) {
632
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
633
- return ret !== 0;
568
+ export function create_transaction(public_key, amount, fee, force_merge) {
569
+ const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
570
+ return takeObject(ret);
634
571
  }
635
572
 
636
573
  /**
637
- * @param {number} major
638
- * @param {number} minor
639
- * @param {number} patch
640
- * @returns {Promise<void>}
574
+ * @returns {Promise<Array<any>>}
641
575
  */
642
- export function set_wallet_version(major, minor, patch) {
643
- const ret = wasm.set_wallet_version(major, minor, patch);
576
+ export function get_mempool_txs() {
577
+ const ret = wasm.get_mempool_txs();
644
578
  return takeObject(ret);
645
579
  }
646
580
 
647
581
  /**
648
- * @param {bigint} peer_index
649
- * @param {string} public_key
650
582
  * @returns {Promise<void>}
651
583
  */
652
- export function process_stun_peer(peer_index, public_key) {
653
- const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
584
+ export function start_from_received_ghost_chain() {
585
+ const ret = wasm.start_from_received_ghost_chain();
654
586
  return takeObject(ret);
655
587
  }
656
588
 
657
589
  /**
658
- * @returns {Promise<boolean>}
590
+ * @param {bigint} peer_index
591
+ * @returns {Promise<WasmPeer | undefined>}
659
592
  */
660
- export function produce_block_with_gt() {
661
- const ret = wasm.produce_block_with_gt();
593
+ export function get_peer(peer_index) {
594
+ const ret = wasm.get_peer(peer_index);
662
595
  return takeObject(ret);
663
596
  }
664
597
 
@@ -676,6 +609,37 @@ export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_ke
676
609
  return takeObject(ret);
677
610
  }
678
611
 
612
+ /**
613
+ * @param {string} key
614
+ * @returns {boolean}
615
+ */
616
+ export function is_valid_public_key(key) {
617
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
618
+ return ret !== 0;
619
+ }
620
+
621
+ /**
622
+ * @param {Array<any>} keys
623
+ * @returns {Promise<WasmBalanceSnapshot>}
624
+ */
625
+ export function get_balance_snapshot(keys) {
626
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
627
+ return takeObject(ret);
628
+ }
629
+
630
+ /**
631
+ * @param {string} config_json
632
+ * @param {string} private_key
633
+ * @param {number} log_level_num
634
+ * @param {bigint} hasten_multiplier
635
+ * @param {boolean} delete_old_blocks
636
+ * @returns {Promise<any>}
637
+ */
638
+ export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
639
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
640
+ return takeObject(ret);
641
+ }
642
+
679
643
  /**
680
644
  * @param {string} slip1_utxo_key
681
645
  * @param {string} slip2_utxo_key
@@ -692,30 +656,41 @@ export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, s
692
656
 
693
657
  /**
694
658
  * @param {Uint8Array} buffer
659
+ * @param {number} msg_index
695
660
  * @param {bigint} peer_index
696
661
  * @returns {Promise<void>}
697
662
  */
698
- export function process_msg_buffer_from_peer(buffer, peer_index) {
699
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
663
+ export function send_api_call(buffer, msg_index, peer_index) {
664
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
700
665
  return takeObject(ret);
701
666
  }
702
667
 
703
668
  /**
669
+ * @param {string} public_key
704
670
  * @returns {Promise<Array<any>>}
705
671
  */
706
- export function get_nft_list() {
707
- const ret = wasm.get_nft_list();
672
+ export function get_account_slips(public_key) {
673
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
708
674
  return takeObject(ret);
709
675
  }
710
676
 
711
677
  /**
712
- * @param {WasmBalanceSnapshot} snapshot
678
+ * @param {WasmTransaction} tx
713
679
  * @returns {Promise<void>}
714
680
  */
715
- export function update_from_balance_snapshot(snapshot) {
716
- _assertClass(snapshot, WasmBalanceSnapshot);
717
- var ptr0 = snapshot.__destroy_into_raw();
718
- const ret = wasm.update_from_balance_snapshot(ptr0);
681
+ export function propagate_transaction(tx) {
682
+ _assertClass(tx, WasmTransaction);
683
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
684
+ return takeObject(ret);
685
+ }
686
+
687
+ /**
688
+ * @param {bigint} peer_index
689
+ * @param {string} ip
690
+ * @returns {Promise<void>}
691
+ */
692
+ export function process_new_peer(peer_index, ip) {
693
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
719
694
  return takeObject(ret);
720
695
  }
721
696
 
@@ -728,15 +703,52 @@ export function process_stat_interval(current_time) {
728
703
  return takeObject(ret);
729
704
  }
730
705
 
731
- function handleError(f, args) {
706
+ /**
707
+ * @param {bigint} peer_index
708
+ * @returns {Promise<void>}
709
+ */
710
+ export function process_peer_disconnection(peer_index) {
711
+ const ret = wasm.process_peer_disconnection(peer_index);
712
+ return takeObject(ret);
713
+ }
714
+
715
+ /**
716
+ * @param {bigint} num
717
+ * @param {bigint} deposit
718
+ * @param {Uint8Array} tx_msg
719
+ * @param {bigint} fee
720
+ * @param {string} recipient_public_key
721
+ * @param {string} nft_type
722
+ * @returns {Promise<WasmTransaction>}
723
+ */
724
+ export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
725
+ const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
726
+ return takeObject(ret);
727
+ }
728
+
729
+ /**
730
+ * @param {Uint8Array} buffer
731
+ * @param {string} private_key
732
+ * @returns {string}
733
+ */
734
+ export function sign_buffer(buffer, private_key) {
732
735
  try {
733
- return f.apply(this, args);
734
- } catch (e) {
735
- wasm.__wbindgen_exn_store(addHeapObject(e));
736
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
737
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
738
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
739
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
740
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
741
+ if (r2) {
742
+ throw takeObject(r1);
743
+ }
744
+ return takeObject(r0);
745
+ } finally {
746
+ wasm.__wbindgen_add_to_stack_pointer(16);
736
747
  }
737
748
  }
738
- function __wbg_adapter_393(arg0, arg1, arg2, arg3) {
739
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hbc768321d477e205(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
749
+
750
+ function __wbg_adapter_406(arg0, arg1, arg2, arg3) {
751
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
740
752
  }
741
753
 
742
754
  const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -2657,6 +2669,10 @@ async function __wbg_load(module, imports) {
2657
2669
  function __wbg_get_imports() {
2658
2670
  const imports = {};
2659
2671
  imports.wbg = {};
2672
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2673
+ const ret = getStringFromWasm0(arg0, arg1);
2674
+ return addHeapObject(ret);
2675
+ };
2660
2676
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2661
2677
  takeObject(arg0);
2662
2678
  };
@@ -2664,16 +2680,12 @@ function __wbg_get_imports() {
2664
2680
  const ret = BigInt.asUintN(64, arg0);
2665
2681
  return addHeapObject(ret);
2666
2682
  };
2667
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2668
- const ret = getStringFromWasm0(arg0, arg1);
2669
- return addHeapObject(ret);
2670
- };
2671
- imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2672
- const ret = WasmWalletSlip.__wrap(arg0);
2683
+ imports.wbg.__wbg_wasmblock_new = function(arg0) {
2684
+ const ret = WasmBlock.__wrap(arg0);
2673
2685
  return addHeapObject(ret);
2674
2686
  };
2675
- imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2676
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2687
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2688
+ const ret = WasmTransaction.__wrap(arg0);
2677
2689
  return addHeapObject(ret);
2678
2690
  };
2679
2691
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
@@ -2684,24 +2696,20 @@ function __wbg_get_imports() {
2684
2696
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2685
2697
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2686
2698
  };
2687
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2688
- const ret = WasmTransaction.__wrap(arg0);
2689
- return addHeapObject(ret);
2690
- };
2691
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2692
- const ret = WasmBlockchain.__wrap(arg0);
2699
+ imports.wbg.__wbg_wasmslip_new = function(arg0) {
2700
+ const ret = WasmSlip.__wrap(arg0);
2693
2701
  return addHeapObject(ret);
2694
2702
  };
2695
- imports.wbg.__wbg_wasmnft_new = function(arg0) {
2696
- const ret = WasmNFT.__wrap(arg0);
2703
+ imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2704
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2697
2705
  return addHeapObject(ret);
2698
2706
  };
2699
2707
  imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2700
2708
  const ret = WasmPeer.__wrap(arg0);
2701
2709
  return addHeapObject(ret);
2702
2710
  };
2703
- imports.wbg.__wbg_wasmblock_new = function(arg0) {
2704
- const ret = WasmBlock.__wrap(arg0);
2711
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2712
+ const ret = WasmBlockchain.__wrap(arg0);
2705
2713
  return addHeapObject(ret);
2706
2714
  };
2707
2715
  imports.wbg.__wbg_wasmwallet_new = function(arg0) {
@@ -2712,8 +2720,20 @@ function __wbg_get_imports() {
2712
2720
  const ret = getObject(arg0);
2713
2721
  return addHeapObject(ret);
2714
2722
  };
2715
- imports.wbg.__wbg_wasmslip_new = function(arg0) {
2716
- const ret = WasmSlip.__wrap(arg0);
2723
+ imports.wbg.__wbg_wasmnft_new = function(arg0) {
2724
+ const ret = WasmNFT.__wrap(arg0);
2725
+ return addHeapObject(ret);
2726
+ };
2727
+ imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2728
+ const ret = WasmWalletSlip.__wrap(arg0);
2729
+ return addHeapObject(ret);
2730
+ };
2731
+ imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
2732
+ const ret = WasmPeerService.__wrap(arg0);
2733
+ return addHeapObject(ret);
2734
+ };
2735
+ imports.wbg.__wbg_wasmhop_new = function(arg0) {
2736
+ const ret = WasmHop.__wrap(arg0);
2717
2737
  return addHeapObject(ret);
2718
2738
  };
2719
2739
  imports.wbg.__wbindgen_is_object = function(arg0) {
@@ -2729,19 +2749,7 @@ function __wbg_get_imports() {
2729
2749
  const ret = getObject(arg0) in getObject(arg1);
2730
2750
  return ret;
2731
2751
  };
2732
- imports.wbg.__wbg_wasmhop_new = function(arg0) {
2733
- const ret = WasmHop.__wrap(arg0);
2734
- return addHeapObject(ret);
2735
- };
2736
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2737
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2738
- return addHeapObject(ret);
2739
- };
2740
- imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
2741
- const ret = WasmPeerService.__wrap(arg0);
2742
- return addHeapObject(ret);
2743
- };
2744
- imports.wbg.__wbg_flushdata_02f5939a34c7adf1 = function(arg0, arg1) {
2752
+ imports.wbg.__wbg_flushdata_2c769b019d5f1e66 = function(arg0, arg1) {
2745
2753
  let deferred0_0;
2746
2754
  let deferred0_1;
2747
2755
  try {
@@ -2752,7 +2760,7 @@ function __wbg_get_imports() {
2752
2760
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2753
2761
  }
2754
2762
  };
2755
- imports.wbg.__wbg_readvalue_6f58b8d737c8947f = function() { return handleError(function (arg0, arg1) {
2763
+ imports.wbg.__wbg_readvalue_19e0ac3170ed6477 = function() { return handleError(function (arg0, arg1) {
2756
2764
  let deferred0_0;
2757
2765
  let deferred0_1;
2758
2766
  try {
@@ -2764,13 +2772,13 @@ function __wbg_get_imports() {
2764
2772
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2765
2773
  }
2766
2774
  }, arguments) };
2767
- imports.wbg.__wbg_loadwallet_4fa9260e0e5b29ad = function() {
2775
+ imports.wbg.__wbg_loadwallet_9ad824e287b4d1e9 = function() {
2768
2776
  MsgHandler.load_wallet();
2769
2777
  };
2770
- imports.wbg.__wbg_savewallet_db43f92c74d98db4 = function() {
2778
+ imports.wbg.__wbg_savewallet_c607f3a3206411cf = function() {
2771
2779
  MsgHandler.save_wallet();
2772
2780
  };
2773
- imports.wbg.__wbg_writevalue_64abf78ec7b7a0a7 = function(arg0, arg1, arg2) {
2781
+ imports.wbg.__wbg_writevalue_2f493d22dc09e6f5 = function(arg0, arg1, arg2) {
2774
2782
  let deferred0_0;
2775
2783
  let deferred0_1;
2776
2784
  try {
@@ -2781,7 +2789,7 @@ function __wbg_get_imports() {
2781
2789
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2782
2790
  }
2783
2791
  };
2784
- imports.wbg.__wbg_appendvalue_dfb9143a42c8a96f = function(arg0, arg1, arg2) {
2792
+ imports.wbg.__wbg_appendvalue_720c0ca8080d6eac = function(arg0, arg1, arg2) {
2785
2793
  let deferred0_0;
2786
2794
  let deferred0_1;
2787
2795
  try {
@@ -2792,7 +2800,7 @@ function __wbg_get_imports() {
2792
2800
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2793
2801
  }
2794
2802
  };
2795
- imports.wbg.__wbg_removevalue_54c2c52edfb40121 = function() { return handleError(function (arg0, arg1) {
2803
+ imports.wbg.__wbg_removevalue_215faba975f5b863 = function() { return handleError(function (arg0, arg1) {
2796
2804
  let deferred0_0;
2797
2805
  let deferred0_1;
2798
2806
  try {
@@ -2804,10 +2812,10 @@ function __wbg_get_imports() {
2804
2812
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2805
2813
  }
2806
2814
  }, arguments) };
2807
- imports.wbg.__wbg_sendmessage_dd1c456fc24d6ae2 = function(arg0, arg1) {
2815
+ imports.wbg.__wbg_sendmessage_bd6888af7ee69749 = function(arg0, arg1) {
2808
2816
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2809
2817
  };
2810
- imports.wbg.__wbg_connecttopeer_2e3115f373923a34 = function() { return handleError(function (arg0, arg1, arg2) {
2818
+ imports.wbg.__wbg_connecttopeer_6940934591bed84e = function() { return handleError(function (arg0, arg1, arg2) {
2811
2819
  let deferred0_0;
2812
2820
  let deferred0_1;
2813
2821
  try {
@@ -2819,13 +2827,13 @@ function __wbg_get_imports() {
2819
2827
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2820
2828
  }
2821
2829
  }, arguments) };
2822
- imports.wbg.__wbg_getmyservices_247b7276a00aa7a1 = function() {
2830
+ imports.wbg.__wbg_getmyservices_ba97efc7dbbb3da2 = function() {
2823
2831
  const ret = MsgHandler.get_my_services();
2824
2832
  _assertClass(ret, WasmPeerServiceList);
2825
2833
  var ptr1 = ret.__destroy_into_raw();
2826
2834
  return ptr1;
2827
2835
  };
2828
- imports.wbg.__wbg_isexistingfile_54560db336503ad5 = function() { return handleError(function (arg0, arg1) {
2836
+ imports.wbg.__wbg_isexistingfile_7f4f0c51bececaa6 = function() { return handleError(function (arg0, arg1) {
2829
2837
  let deferred0_0;
2830
2838
  let deferred0_1;
2831
2839
  try {
@@ -2837,27 +2845,27 @@ function __wbg_get_imports() {
2837
2845
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2838
2846
  }
2839
2847
  }, arguments) };
2840
- imports.wbg.__wbg_processapicall_d409cedb7f665312 = function(arg0, arg1, arg2) {
2848
+ imports.wbg.__wbg_processapicall_9af56479d30d7f49 = function(arg0, arg1, arg2) {
2841
2849
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2842
2850
  };
2843
- imports.wbg.__wbg_processapierror_e2c1f858819cf5cf = function(arg0, arg1, arg2) {
2851
+ imports.wbg.__wbg_processapierror_1405fddcb5daf450 = function(arg0, arg1, arg2) {
2844
2852
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2845
2853
  };
2846
- imports.wbg.__wbg_processapisuccess_dc587307a8ec6a59 = function(arg0, arg1, arg2) {
2854
+ imports.wbg.__wbg_processapisuccess_8690e76bad65861c = function(arg0, arg1, arg2) {
2847
2855
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2848
2856
  };
2849
- imports.wbg.__wbg_sendmessagetoall_5c38c389c7434159 = function(arg0, arg1) {
2857
+ imports.wbg.__wbg_sendmessagetoall_7d5345f9160e8d4c = function(arg0, arg1) {
2850
2858
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2851
2859
  };
2852
- imports.wbg.__wbg_disconnectfrompeer_41e790d250243fd7 = function() { return handleError(function (arg0) {
2860
+ imports.wbg.__wbg_disconnectfrompeer_86615bc01515789c = function() { return handleError(function (arg0) {
2853
2861
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2854
2862
  return addHeapObject(ret);
2855
2863
  }, arguments) };
2856
- imports.wbg.__wbg_loadblockfilelist_5e719b9d74178df6 = function() { return handleError(function () {
2864
+ imports.wbg.__wbg_loadblockfilelist_39475ff4bda56def = function() { return handleError(function () {
2857
2865
  const ret = MsgHandler.load_block_file_list();
2858
2866
  return addHeapObject(ret);
2859
2867
  }, arguments) };
2860
- imports.wbg.__wbg_sendinterfaceevent_890fc416d90ba971 = function(arg0, arg1, arg2, arg3, arg4) {
2868
+ imports.wbg.__wbg_sendinterfaceevent_9c79439340b79f8e = function(arg0, arg1, arg2, arg3, arg4) {
2861
2869
  let deferred0_0;
2862
2870
  let deferred0_1;
2863
2871
  let deferred1_0;
@@ -2873,7 +2881,7 @@ function __wbg_get_imports() {
2873
2881
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2874
2882
  }
2875
2883
  };
2876
- imports.wbg.__wbg_sendblocksuccess_294795b33a4eb2c8 = function(arg0, arg1, arg2) {
2884
+ imports.wbg.__wbg_sendblocksuccess_1c721c4150775963 = function(arg0, arg1, arg2) {
2877
2885
  let deferred0_0;
2878
2886
  let deferred0_1;
2879
2887
  try {
@@ -2884,10 +2892,10 @@ function __wbg_get_imports() {
2884
2892
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2885
2893
  }
2886
2894
  };
2887
- imports.wbg.__wbg_sendwalletupdate_6128fb2a65955772 = function() {
2895
+ imports.wbg.__wbg_sendwalletupdate_ddb4fb9d9766e284 = function() {
2888
2896
  MsgHandler.send_wallet_update();
2889
2897
  };
2890
- imports.wbg.__wbg_sendnewversionalert_90c0405e8fc96529 = function(arg0, arg1, arg2) {
2898
+ imports.wbg.__wbg_sendnewversionalert_fa5e1d7df7e1161b = function(arg0, arg1, arg2) {
2891
2899
  let deferred0_0;
2892
2900
  let deferred0_1;
2893
2901
  try {
@@ -2898,13 +2906,13 @@ function __wbg_get_imports() {
2898
2906
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2899
2907
  }
2900
2908
  };
2901
- imports.wbg.__wbg_sendblockfetchstatusevent_f8ad3e0c574a3d2f = function(arg0) {
2909
+ imports.wbg.__wbg_sendblockfetchstatusevent_3f27984e18d29a1c = function(arg0) {
2902
2910
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2903
2911
  };
2904
- imports.wbg.__wbg_sendnewchaindetectedevent_814f1cb2a0968c86 = function() {
2912
+ imports.wbg.__wbg_sendnewchaindetectedevent_8e502ee05519582d = function() {
2905
2913
  MsgHandler.send_new_chain_detected_event();
2906
2914
  };
2907
- imports.wbg.__wbg_fetchblockfrompeer_1ae370fdece9cb73 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2915
+ imports.wbg.__wbg_fetchblockfrompeer_d09e3f0752b33dd5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2908
2916
  let deferred0_0;
2909
2917
  let deferred0_1;
2910
2918
  try {
@@ -2916,7 +2924,7 @@ function __wbg_get_imports() {
2916
2924
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2917
2925
  }
2918
2926
  }, arguments) };
2919
- imports.wbg.__wbg_ensureblockdirectoryexists_7fcab2b9dc2610fe = function() { return handleError(function (arg0, arg1) {
2927
+ imports.wbg.__wbg_ensureblockdirectoryexists_23741132d74452f6 = function() { return handleError(function (arg0, arg1) {
2920
2928
  let deferred0_0;
2921
2929
  let deferred0_1;
2922
2930
  try {
@@ -2927,6 +2935,10 @@ function __wbg_get_imports() {
2927
2935
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2928
2936
  }
2929
2937
  }, arguments) };
2938
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2939
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2940
+ return addHeapObject(ret);
2941
+ };
2930
2942
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2931
2943
  const ret = getObject(arg0) == getObject(arg1);
2932
2944
  return ret;
@@ -3174,7 +3186,7 @@ function __wbg_get_imports() {
3174
3186
  const a = state0.a;
3175
3187
  state0.a = 0;
3176
3188
  try {
3177
- return __wbg_adapter_393(a, state0.b, arg0, arg1);
3189
+ return __wbg_adapter_406(a, state0.b, arg0, arg1);
3178
3190
  } finally {
3179
3191
  state0.a = a;
3180
3192
  }
@@ -3235,8 +3247,8 @@ function __wbg_get_imports() {
3235
3247
  getInt32Memory0()[arg0 / 4 + 1] = len1;
3236
3248
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3237
3249
  };
3238
- imports.wbg.__wbindgen_closure_wrapper1619 = function(arg0, arg1, arg2) {
3239
- const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
3250
+ imports.wbg.__wbindgen_closure_wrapper1628 = function(arg0, arg1, arg2) {
3251
+ const ret = makeMutClosure(arg0, arg1, 581, __wbg_adapter_38);
3240
3252
  return addHeapObject(ret);
3241
3253
  };
3242
3254