saito-wasm 0.2.166 → 0.2.168

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