saito-wasm 0.2.176 → 0.2.177

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,36 +1,7 @@
1
- import { MsgHandler } from './snippets/saito-wasm-2d0d837f15b87abe/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-466f9f7a003f28db/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);
8
-
9
- function getObject(idx) { return heap[idx]; }
10
-
11
- let heap_next = heap.length;
12
-
13
- function dropObject(idx) {
14
- if (idx < 132) return;
15
- heap[idx] = heap_next;
16
- heap_next = idx;
17
- }
18
-
19
- function takeObject(idx) {
20
- const ret = getObject(idx);
21
- dropObject(idx);
22
- return ret;
23
- }
24
-
25
- function addHeapObject(obj) {
26
- if (heap_next === heap.length) heap.push(heap.length + 1);
27
- const idx = heap_next;
28
- heap_next = heap[idx];
29
-
30
- heap[idx] = obj;
31
- return idx;
32
- }
33
-
34
5
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
35
6
 
36
7
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@@ -49,6 +20,23 @@ function getStringFromWasm0(ptr, len) {
49
20
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
50
21
  }
51
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
+
29
+ function addHeapObject(obj) {
30
+ if (heap_next === heap.length) heap.push(heap.length + 1);
31
+ const idx = heap_next;
32
+ heap_next = heap[idx];
33
+
34
+ heap[idx] = obj;
35
+ return idx;
36
+ }
37
+
38
+ function getObject(idx) { return heap[idx]; }
39
+
52
40
  let WASM_VECTOR_LEN = 0;
53
41
 
54
42
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -118,6 +106,18 @@ function getInt32Memory0() {
118
106
  return cachedInt32Memory0;
119
107
  }
120
108
 
109
+ function dropObject(idx) {
110
+ if (idx < 132) return;
111
+ heap[idx] = heap_next;
112
+ heap_next = idx;
113
+ }
114
+
115
+ function takeObject(idx) {
116
+ const ret = getObject(idx);
117
+ dropObject(idx);
118
+ return ret;
119
+ }
120
+
121
121
  let cachedFloat64Memory0 = null;
122
122
 
123
123
  function getFloat64Memory0() {
@@ -232,56 +232,23 @@ function _assertClass(instance, klass) {
232
232
  }
233
233
  return instance.ptr;
234
234
  }
235
-
236
- function handleError(f, args) {
237
- try {
238
- return f.apply(this, args);
239
- } catch (e) {
240
- wasm.__wbindgen_exn_store(addHeapObject(e));
241
- }
242
- }
243
-
244
- let stack_pointer = 128;
245
-
246
- function addBorrowedObject(obj) {
247
- if (stack_pointer == 1) throw new Error('out of js stack');
248
- heap[--stack_pointer] = obj;
249
- return stack_pointer;
250
- }
251
235
  /**
252
- * @param {bigint} duration_in_ms
236
+ * @param {Uint8Array} buffer
237
+ * @param {number} msg_index
238
+ * @param {bigint} peer_index
253
239
  * @returns {Promise<void>}
254
240
  */
255
- export function process_timer_event(duration_in_ms) {
256
- const ret = wasm.process_timer_event(duration_in_ms);
257
- return takeObject(ret);
258
- }
259
-
260
- /**
261
- * @returns {Promise<bigint>}
262
- */
263
- export function get_next_peer_index() {
264
- const ret = wasm.get_next_peer_index();
265
- return takeObject(ret);
266
- }
267
-
268
- /**
269
- * @param {string} nft_id_hex
270
- * @param {Uint8Array} tx_msg
271
- * @returns {Promise<WasmTransaction>}
272
- */
273
- export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
274
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
275
- const len0 = WASM_VECTOR_LEN;
276
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
241
+ export function send_api_call(buffer, msg_index, peer_index) {
242
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
277
243
  return takeObject(ret);
278
244
  }
279
245
 
280
246
  /**
247
+ * @param {bigint} peer_index
281
248
  * @returns {Promise<void>}
282
249
  */
283
- export function disable_producing_blocks_by_timer() {
284
- const ret = wasm.disable_producing_blocks_by_timer();
250
+ export function remove_stun_peer(peer_index) {
251
+ const ret = wasm.remove_stun_peer(peer_index);
285
252
  return takeObject(ret);
286
253
  }
287
254
 
@@ -294,90 +261,89 @@ export function get_mempool_txs() {
294
261
  }
295
262
 
296
263
  /**
297
- * @param {Uint8Array} buffer
298
- * @param {number} msg_index
299
- * @param {bigint} peer_index
300
- * @returns {Promise<void>}
264
+ * @param {string} key
265
+ * @returns {boolean}
301
266
  */
302
- export function send_api_error(buffer, msg_index, peer_index) {
303
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
304
- return takeObject(ret);
267
+ export function is_valid_public_key(key) {
268
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
269
+ return ret !== 0;
305
270
  }
306
271
 
307
272
  /**
308
- * @param {bigint} peer_index
309
- * @param {string} ip
310
- * @returns {Promise<void>}
273
+ * @returns {Promise<boolean>}
311
274
  */
312
- export function process_new_peer(peer_index, ip) {
313
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
275
+ export function produce_block_without_gt() {
276
+ const ret = wasm.produce_block_without_gt();
314
277
  return takeObject(ret);
315
278
  }
316
279
 
317
280
  /**
318
- * @param {bigint} peer_index
319
- * @param {string} public_key
281
+ * @param {number} major
282
+ * @param {number} minor
283
+ * @param {number} patch
320
284
  * @returns {Promise<void>}
321
285
  */
322
- export function process_stun_peer(peer_index, public_key) {
323
- const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
324
- return takeObject(ret);
325
- }
326
-
327
- /**
328
- * @returns {Promise<WasmWallet>}
329
- */
330
- export function get_wallet() {
331
- const ret = wasm.get_wallet();
286
+ export function set_wallet_version(major, minor, patch) {
287
+ const ret = wasm.set_wallet_version(major, minor, patch);
332
288
  return takeObject(ret);
333
289
  }
334
290
 
335
291
  /**
336
- * @param {string} slip1_utxo_key
337
- * @param {string} slip2_utxo_key
338
- * @param {string} slip3_utxo_key
339
- * @returns {Promise<WasmTransaction>}
292
+ * @param {bigint} threshold
293
+ * @returns {Promise<void>}
340
294
  */
341
- export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
342
- const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
295
+ export function write_issuance_file(threshold) {
296
+ const ret = wasm.write_issuance_file(threshold);
343
297
  return takeObject(ret);
344
298
  }
345
299
 
346
300
  /**
347
- * @returns {Promise<string>}
301
+ * @returns {Promise<Array<any>>}
348
302
  */
349
- export function get_peer_stats() {
350
- const ret = wasm.get_peer_stats();
303
+ export function get_peers() {
304
+ const ret = wasm.get_peers();
351
305
  return takeObject(ret);
352
306
  }
353
307
 
354
308
  /**
355
- * @param {WasmTransaction} tx
356
- * @returns {Promise<void>}
309
+ * @param {string} public_key
310
+ * @returns {Promise<Array<any>>}
357
311
  */
358
- export function propagate_transaction(tx) {
359
- _assertClass(tx, WasmTransaction);
360
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
312
+ export function get_account_slips(public_key) {
313
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
361
314
  return takeObject(ret);
362
315
  }
363
316
 
364
317
  /**
365
318
  * @param {Uint8Array} buffer
319
+ * @param {string} private_key
366
320
  * @returns {string}
367
321
  */
368
- export function hash(buffer) {
369
- const ret = wasm.hash(addHeapObject(buffer));
370
- return takeObject(ret);
322
+ export function sign_buffer(buffer, private_key) {
323
+ try {
324
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
325
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
326
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
327
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
328
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
329
+ if (r2) {
330
+ throw takeObject(r1);
331
+ }
332
+ return takeObject(r0);
333
+ } finally {
334
+ wasm.__wbindgen_add_to_stack_pointer(16);
335
+ }
371
336
  }
372
337
 
373
338
  /**
374
- * @param {Uint8Array} buffer
375
- * @param {number} msg_index
376
- * @param {bigint} peer_index
377
- * @returns {Promise<void>}
339
+ * @param {string} nft_id_hex
340
+ * @param {Uint8Array} tx_msg
341
+ * @returns {Promise<WasmTransaction>}
378
342
  */
379
- export function send_api_call(buffer, msg_index, peer_index) {
380
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
343
+ export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
344
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
345
+ const len0 = WASM_VECTOR_LEN;
346
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
381
347
  return takeObject(ret);
382
348
  }
383
349
 
@@ -387,59 +353,20 @@ export function send_api_call(buffer, msg_index, peer_index) {
387
353
  * @param {bigint} peer_index
388
354
  * @returns {Promise<void>}
389
355
  */
390
- export function send_api_success(buffer, msg_index, peer_index) {
391
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
392
- return takeObject(ret);
393
- }
394
-
395
- /**
396
- * @param {bigint} peer_index
397
- * @returns {Promise<void>}
398
- */
399
- export function process_peer_disconnection(peer_index) {
400
- const ret = wasm.process_peer_disconnection(peer_index);
356
+ export function send_api_error(buffer, msg_index, peer_index) {
357
+ const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
401
358
  return takeObject(ret);
402
359
  }
403
360
 
404
361
  /**
405
- * @param {bigint} num
406
- * @param {bigint} deposit
362
+ * @param {string} slip1_utxo_key
363
+ * @param {string} slip2_utxo_key
364
+ * @param {string} slip3_utxo_key
407
365
  * @param {Uint8Array} tx_msg
408
- * @param {bigint} fee
409
- * @param {string} recipient_public_key
410
- * @param {string} nft_type
411
- * @returns {Promise<WasmTransaction>}
412
- */
413
- export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
414
- const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
415
- return takeObject(ret);
416
- }
417
-
418
- /**
419
- * @param {Array<any>} public_keys
420
- * @param {BigUint64Array} amounts
421
- * @param {bigint} fee
422
- * @param {boolean} _force_merge
423
366
  * @returns {Promise<WasmTransaction>}
424
367
  */
425
- export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
426
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
427
- return takeObject(ret);
428
- }
429
-
430
- /**
431
- * @returns {Promise<any>}
432
- */
433
- export function get_confirmations() {
434
- const ret = wasm.get_confirmations();
435
- return takeObject(ret);
436
- }
437
-
438
- /**
439
- * @returns {Promise<void>}
440
- */
441
- export function start_from_received_ghost_chain() {
442
- const ret = wasm.start_from_received_ghost_chain();
368
+ export function create_remove_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, tx_msg) {
369
+ const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key), addHeapObject(tx_msg));
443
370
  return takeObject(ret);
444
371
  }
445
372
 
@@ -452,172 +379,193 @@ export function get_latest_block_hash() {
452
379
  }
453
380
 
454
381
  /**
455
- * @returns {Promise<boolean>}
382
+ * @returns {Promise<string>}
456
383
  */
457
- export function produce_block_without_gt() {
458
- const ret = wasm.produce_block_without_gt();
384
+ export function get_congestion_stats() {
385
+ const ret = wasm.get_congestion_stats();
459
386
  return takeObject(ret);
460
387
  }
461
388
 
462
389
  /**
390
+ * @param {Uint8Array} buffer
391
+ * @param {Uint8Array} hash
392
+ * @param {bigint} block_id
463
393
  * @param {bigint} peer_index
464
- * @returns {Promise<WasmPeer | undefined>}
394
+ * @returns {Promise<void>}
465
395
  */
466
- export function get_peer(peer_index) {
467
- const ret = wasm.get_peer(peer_index);
396
+ export function process_fetched_block(buffer, hash, block_id, peer_index) {
397
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
468
398
  return takeObject(ret);
469
399
  }
470
400
 
471
401
  /**
472
- * @param {string} config_json
473
- * @param {string} private_key
474
- * @param {number} log_level_num
475
- * @param {bigint} hasten_multiplier
476
- * @param {boolean} delete_old_blocks
477
- * @returns {Promise<any>}
402
+ * @param {WasmBalanceSnapshot} snapshot
403
+ * @returns {Promise<void>}
478
404
  */
479
- export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
480
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
405
+ export function update_from_balance_snapshot(snapshot) {
406
+ _assertClass(snapshot, WasmBalanceSnapshot);
407
+ var ptr0 = snapshot.__destroy_into_raw();
408
+ const ret = wasm.update_from_balance_snapshot(ptr0);
481
409
  return takeObject(ret);
482
410
  }
483
411
 
484
412
  /**
485
- * @returns {Promise<WasmBlockchain>}
413
+ * @param {bigint} peer_index
414
+ * @param {string} public_key
415
+ * @returns {Promise<void>}
486
416
  */
487
- export function get_blockchain() {
488
- const ret = wasm.get_blockchain();
417
+ export function process_stun_peer(peer_index, public_key) {
418
+ const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
489
419
  return takeObject(ret);
490
420
  }
491
421
 
492
422
  /**
493
- * @param {bigint} threshold
423
+ * @param {bigint} peer_index
494
424
  * @returns {Promise<void>}
495
425
  */
496
- export function write_issuance_file(threshold) {
497
- const ret = wasm.write_issuance_file(threshold);
426
+ export function process_peer_disconnection(peer_index) {
427
+ const ret = wasm.process_peer_disconnection(peer_index);
498
428
  return takeObject(ret);
499
429
  }
500
430
 
501
431
  /**
502
- * @param {string} public_key
503
- * @returns {Promise<Array<any>>}
432
+ * @param {bigint} current_time
433
+ * @returns {Promise<void>}
504
434
  */
505
- export function get_account_slips(public_key) {
506
- const ret = wasm.get_account_slips(addHeapObject(public_key));
435
+ export function process_stat_interval(current_time) {
436
+ const ret = wasm.process_stat_interval(current_time);
507
437
  return takeObject(ret);
508
438
  }
509
439
 
510
440
  /**
511
- * @param {bigint} peer_index
512
441
  * @returns {Promise<void>}
513
442
  */
514
- export function remove_stun_peer(peer_index) {
515
- const ret = wasm.remove_stun_peer(peer_index);
443
+ export function start_from_received_ghost_chain() {
444
+ const ret = wasm.start_from_received_ghost_chain();
516
445
  return takeObject(ret);
517
446
  }
518
447
 
519
448
  /**
520
449
  * @param {Uint8Array} buffer
521
- * @param {Uint8Array} hash
522
- * @param {bigint} block_id
523
450
  * @param {bigint} peer_index
524
451
  * @returns {Promise<void>}
525
452
  */
526
- export function process_fetched_block(buffer, hash, block_id, peer_index) {
527
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
453
+ export function process_msg_buffer_from_peer(buffer, peer_index) {
454
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
528
455
  return takeObject(ret);
529
456
  }
530
457
 
531
458
  /**
459
+ * @param {bigint} amt
532
460
  * @param {string} slip1_utxo_key
533
461
  * @param {string} slip2_utxo_key
534
462
  * @param {string} slip3_utxo_key
535
- * @param {number} left_count
536
- * @param {number} right_count
463
+ * @param {string} recipient_public_key
537
464
  * @param {Uint8Array} tx_msg
538
465
  * @returns {Promise<WasmTransaction>}
539
466
  */
540
- export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
541
- 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));
467
+ export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
468
+ 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));
542
469
  return takeObject(ret);
543
470
  }
544
471
 
545
472
  /**
546
- * @returns {Promise<Array<any>>}
473
+ * @param {string} block_hash
474
+ * @returns {Promise<WasmBlock>}
547
475
  */
548
- export function get_nft_list() {
549
- const ret = wasm.get_nft_list();
476
+ export function get_block(block_hash) {
477
+ const ret = wasm.get_block(addHeapObject(block_hash));
550
478
  return takeObject(ret);
551
479
  }
552
480
 
553
481
  /**
554
- * @returns {Promise<string>}
482
+ * @returns {Promise<WasmBlockchain>}
555
483
  */
556
- export function get_stats() {
557
- const ret = wasm.get_stats();
484
+ export function get_blockchain() {
485
+ const ret = wasm.get_blockchain();
558
486
  return takeObject(ret);
559
487
  }
560
488
 
561
489
  /**
562
- * @param {number} major
563
- * @param {number} minor
564
- * @param {number} patch
565
- * @returns {Promise<void>}
490
+ * @param {bigint} peer_index
491
+ * @returns {Promise<WasmPeer | undefined>}
566
492
  */
567
- export function set_wallet_version(major, minor, patch) {
568
- const ret = wasm.set_wallet_version(major, minor, patch);
493
+ export function get_peer(peer_index) {
494
+ const ret = wasm.get_peer(peer_index);
569
495
  return takeObject(ret);
570
496
  }
571
497
 
572
498
  /**
573
499
  * @returns {Promise<string>}
574
500
  */
575
- export function get_congestion_stats() {
576
- const ret = wasm.get_congestion_stats();
501
+ export function get_stats() {
502
+ const ret = wasm.get_stats();
503
+ return takeObject(ret);
504
+ }
505
+
506
+ /**
507
+ * @returns {Promise<boolean>}
508
+ */
509
+ export function produce_block_with_gt() {
510
+ const ret = wasm.produce_block_with_gt();
577
511
  return takeObject(ret);
578
512
  }
579
513
 
580
514
  /**
581
- * @param {bigint} amt
582
515
  * @param {string} slip1_utxo_key
583
516
  * @param {string} slip2_utxo_key
584
517
  * @param {string} slip3_utxo_key
585
- * @param {string} recipient_public_key
518
+ * @param {number} left_count
519
+ * @param {number} right_count
586
520
  * @param {Uint8Array} tx_msg
587
521
  * @returns {Promise<WasmTransaction>}
588
522
  */
589
- export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
590
- 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));
523
+ export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
524
+ 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));
525
+ return takeObject(ret);
526
+ }
527
+
528
+ /**
529
+ * @param {bigint} duration_in_ms
530
+ * @returns {Promise<void>}
531
+ */
532
+ export function process_timer_event(duration_in_ms) {
533
+ const ret = wasm.process_timer_event(duration_in_ms);
591
534
  return takeObject(ret);
592
535
  }
593
536
 
594
537
  /**
595
538
  * @param {Uint8Array} buffer
596
- * @param {string} private_key
597
- * @returns {string}
539
+ * @param {string} signature
540
+ * @param {string} public_key
541
+ * @returns {boolean}
598
542
  */
599
- export function sign_buffer(buffer, private_key) {
600
- try {
601
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
602
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
603
- var r0 = getInt32Memory0()[retptr / 4 + 0];
604
- var r1 = getInt32Memory0()[retptr / 4 + 1];
605
- var r2 = getInt32Memory0()[retptr / 4 + 2];
606
- if (r2) {
607
- throw takeObject(r1);
608
- }
609
- return takeObject(r0);
610
- } finally {
611
- wasm.__wbindgen_add_to_stack_pointer(16);
612
- }
543
+ export function verify_signature(buffer, signature, public_key) {
544
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
545
+ return ret !== 0;
546
+ }
547
+
548
+ /**
549
+ * @returns {Promise<Array<any>>}
550
+ */
551
+ export function get_nft_list() {
552
+ const ret = wasm.get_nft_list();
553
+ return takeObject(ret);
613
554
  }
614
555
 
615
556
  /**
616
- * @param {string} block_hash
617
- * @returns {Promise<WasmBlock>}
557
+ * @returns {Promise<string>}
618
558
  */
619
- export function get_block(block_hash) {
620
- const ret = wasm.get_block(addHeapObject(block_hash));
559
+ export function get_peer_stats() {
560
+ const ret = wasm.get_peer_stats();
561
+ return takeObject(ret);
562
+ }
563
+
564
+ /**
565
+ * @returns {Promise<void>}
566
+ */
567
+ export function disable_producing_blocks_by_timer() {
568
+ const ret = wasm.disable_producing_blocks_by_timer();
621
569
  return takeObject(ret);
622
570
  }
623
571
 
@@ -642,111 +590,163 @@ export function generate_public_key(private_key) {
642
590
  }
643
591
 
644
592
  /**
645
- * @param {Uint8Array} buffer
646
- * @param {string} signature
647
- * @param {string} public_key
648
- * @returns {boolean}
593
+ * @returns {Promise<bigint>}
649
594
  */
650
- export function verify_signature(buffer, signature, public_key) {
651
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
652
- return ret !== 0;
595
+ export function get_next_peer_index() {
596
+ const ret = wasm.get_next_peer_index();
597
+ return takeObject(ret);
653
598
  }
654
599
 
655
600
  /**
656
- * @param {Uint8Array} buffer
657
- * @param {bigint} peer_index
658
- * @returns {Promise<void>}
601
+ * @returns {Promise<WasmWallet>}
659
602
  */
660
- export function process_msg_buffer_from_peer(buffer, peer_index) {
661
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
603
+ export function get_wallet() {
604
+ const ret = wasm.get_wallet();
662
605
  return takeObject(ret);
663
606
  }
664
607
 
665
608
  /**
666
- * @returns {Promise<Array<any>>}
609
+ * @returns {string}
667
610
  */
668
- export function get_peers() {
669
- const ret = wasm.get_peers();
611
+ export function generate_private_key() {
612
+ const ret = wasm.generate_private_key();
670
613
  return takeObject(ret);
671
614
  }
672
615
 
673
616
  /**
674
- * @returns {Promise<boolean>}
617
+ * @returns {Promise<any>}
675
618
  */
676
- export function produce_block_with_gt() {
677
- const ret = wasm.produce_block_with_gt();
619
+ export function get_confirmations() {
620
+ const ret = wasm.get_confirmations();
678
621
  return takeObject(ret);
679
622
  }
680
623
 
681
624
  /**
682
- * @param {string} key
683
- * @returns {boolean}
625
+ * @param {string} config_json
626
+ * @param {string} private_key
627
+ * @param {number} log_level_num
628
+ * @param {bigint} hasten_multiplier
629
+ * @param {boolean} delete_old_blocks
630
+ * @returns {Promise<any>}
684
631
  */
685
- export function is_valid_public_key(key) {
686
- const ret = wasm.is_valid_public_key(addHeapObject(key));
687
- return ret !== 0;
632
+ export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
633
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
634
+ return takeObject(ret);
688
635
  }
689
636
 
690
637
  /**
691
- * @param {string} public_key
692
- * @param {bigint} amount
638
+ * @param {bigint} num
639
+ * @param {bigint} deposit
640
+ * @param {Uint8Array} tx_msg
693
641
  * @param {bigint} fee
694
- * @param {boolean} force_merge
642
+ * @param {string} recipient_public_key
643
+ * @param {string} nft_type
695
644
  * @returns {Promise<WasmTransaction>}
696
645
  */
697
- export function create_transaction(public_key, amount, fee, force_merge) {
698
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
646
+ export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
647
+ const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
699
648
  return takeObject(ret);
700
649
  }
701
650
 
702
651
  /**
703
- * @param {WasmBalanceSnapshot} snapshot
704
- * @returns {Promise<void>}
652
+ * @param {Uint8Array} buffer
653
+ * @returns {string}
705
654
  */
706
- export function update_from_balance_snapshot(snapshot) {
707
- _assertClass(snapshot, WasmBalanceSnapshot);
708
- var ptr0 = snapshot.__destroy_into_raw();
709
- const ret = wasm.update_from_balance_snapshot(ptr0);
655
+ export function hash(buffer) {
656
+ const ret = wasm.hash(addHeapObject(buffer));
710
657
  return takeObject(ret);
711
658
  }
712
659
 
713
660
  /**
714
- * @returns {string}
661
+ * @param {Array<any>} keys
662
+ * @returns {Promise<WasmBalanceSnapshot>}
715
663
  */
716
- export function generate_private_key() {
717
- const ret = wasm.generate_private_key();
664
+ export function get_balance_snapshot(keys) {
665
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
718
666
  return takeObject(ret);
719
667
  }
720
668
 
721
669
  /**
722
- * @param {bigint} current_time
670
+ * @param {bigint} peer_index
671
+ * @param {string} ip
723
672
  * @returns {Promise<void>}
724
673
  */
725
- export function process_stat_interval(current_time) {
726
- const ret = wasm.process_stat_interval(current_time);
674
+ export function process_new_peer(peer_index, ip) {
675
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
727
676
  return takeObject(ret);
728
677
  }
729
678
 
730
679
  /**
731
- * @param {Array<any>} keys
732
- * @returns {Promise<WasmBalanceSnapshot>}
680
+ * @param {Uint8Array} hash
681
+ * @param {bigint} block_id
682
+ * @param {bigint} peer_index
683
+ * @returns {Promise<void>}
733
684
  */
734
- export function get_balance_snapshot(keys) {
735
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
685
+ export function process_failed_block_fetch(hash, block_id, peer_index) {
686
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
736
687
  return takeObject(ret);
737
688
  }
738
689
 
739
690
  /**
740
- * @param {Uint8Array} hash
741
- * @param {bigint} block_id
691
+ * @param {Array<any>} public_keys
692
+ * @param {BigUint64Array} amounts
693
+ * @param {bigint} fee
694
+ * @param {boolean} _force_merge
695
+ * @returns {Promise<WasmTransaction>}
696
+ */
697
+ export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
698
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
699
+ return takeObject(ret);
700
+ }
701
+
702
+ /**
703
+ * @param {Uint8Array} buffer
704
+ * @param {number} msg_index
742
705
  * @param {bigint} peer_index
743
706
  * @returns {Promise<void>}
744
707
  */
745
- export function process_failed_block_fetch(hash, block_id, peer_index) {
746
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
708
+ export function send_api_success(buffer, msg_index, peer_index) {
709
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
710
+ return takeObject(ret);
711
+ }
712
+
713
+ /**
714
+ * @param {string} public_key
715
+ * @param {bigint} amount
716
+ * @param {bigint} fee
717
+ * @param {boolean} force_merge
718
+ * @returns {Promise<WasmTransaction>}
719
+ */
720
+ export function create_transaction(public_key, amount, fee, force_merge) {
721
+ const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
722
+ return takeObject(ret);
723
+ }
724
+
725
+ /**
726
+ * @param {WasmTransaction} tx
727
+ * @returns {Promise<void>}
728
+ */
729
+ export function propagate_transaction(tx) {
730
+ _assertClass(tx, WasmTransaction);
731
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
747
732
  return takeObject(ret);
748
733
  }
749
734
 
735
+ function handleError(f, args) {
736
+ try {
737
+ return f.apply(this, args);
738
+ } catch (e) {
739
+ wasm.__wbindgen_exn_store(addHeapObject(e));
740
+ }
741
+ }
742
+
743
+ let stack_pointer = 128;
744
+
745
+ function addBorrowedObject(obj) {
746
+ if (stack_pointer == 1) throw new Error('out of js stack');
747
+ heap[--stack_pointer] = obj;
748
+ return stack_pointer;
749
+ }
750
750
  function __wbg_adapter_454(arg0, arg1, arg2, arg3) {
751
751
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h67b6352f6b82f267(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
752
752
  }
@@ -2697,29 +2697,10 @@ async function __wbg_load(module, imports) {
2697
2697
  function __wbg_get_imports() {
2698
2698
  const imports = {};
2699
2699
  imports.wbg = {};
2700
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2701
- takeObject(arg0);
2702
- };
2703
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2704
- const ret = BigInt.asUintN(64, arg0);
2705
- return addHeapObject(ret);
2706
- };
2707
- imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2708
- const ret = WasmWallet.__wrap(arg0);
2709
- return addHeapObject(ret);
2710
- };
2711
- imports.wbg.__wbg_wasmnft_new = function(arg0) {
2712
- const ret = WasmNFT.__wrap(arg0);
2713
- return addHeapObject(ret);
2714
- };
2715
2700
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2716
2701
  const ret = getStringFromWasm0(arg0, arg1);
2717
2702
  return addHeapObject(ret);
2718
2703
  };
2719
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2720
- const ret = WasmTransaction.__wrap(arg0);
2721
- return addHeapObject(ret);
2722
- };
2723
2704
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2724
2705
  const obj = getObject(arg1);
2725
2706
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -2728,43 +2709,79 @@ function __wbg_get_imports() {
2728
2709
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2729
2710
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2730
2711
  };
2731
- imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2732
- const ret = WasmBlockchain.__wrap(arg0);
2712
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2713
+ takeObject(arg0);
2714
+ };
2715
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2716
+ const ret = WasmTransaction.__wrap(arg0);
2733
2717
  return addHeapObject(ret);
2734
2718
  };
2735
- imports.wbg.__wbg_wasmblock_new = function(arg0) {
2736
- const ret = WasmBlock.__wrap(arg0);
2719
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2720
+ const ret = WasmPeer.__wrap(arg0);
2721
+ return addHeapObject(ret);
2722
+ };
2723
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2724
+ const ret = BigInt.asUintN(64, arg0);
2737
2725
  return addHeapObject(ret);
2738
2726
  };
2739
2727
  imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
2740
2728
  const ret = WasmBalanceSnapshot.__wrap(arg0);
2741
2729
  return addHeapObject(ret);
2742
2730
  };
2743
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2744
- const ret = WasmPeer.__wrap(arg0);
2731
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2732
+ const ret = getObject(arg0);
2745
2733
  return addHeapObject(ret);
2746
2734
  };
2747
- imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2748
- const ret = WasmWalletSlip.__wrap(arg0);
2735
+ imports.wbg.__wbg_wasmblock_new = function(arg0) {
2736
+ const ret = WasmBlock.__wrap(arg0);
2737
+ return addHeapObject(ret);
2738
+ };
2739
+ imports.wbg.__wbg_wasmblockchain_new = function(arg0) {
2740
+ const ret = WasmBlockchain.__wrap(arg0);
2749
2741
  return addHeapObject(ret);
2750
2742
  };
2751
2743
  imports.wbg.__wbg_wasmslip_new = function(arg0) {
2752
2744
  const ret = WasmSlip.__wrap(arg0);
2753
2745
  return addHeapObject(ret);
2754
2746
  };
2755
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2756
- const ret = getObject(arg0);
2747
+ imports.wbg.__wbg_wasmnft_new = function(arg0) {
2748
+ const ret = WasmNFT.__wrap(arg0);
2749
+ return addHeapObject(ret);
2750
+ };
2751
+ imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2752
+ const ret = WasmWallet.__wrap(arg0);
2753
+ return addHeapObject(ret);
2754
+ };
2755
+ imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2756
+ const ret = WasmWalletSlip.__wrap(arg0);
2757
+ return addHeapObject(ret);
2758
+ };
2759
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2760
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2757
2761
  return addHeapObject(ret);
2758
2762
  };
2759
2763
  imports.wbg.__wbg_wasmpeerservice_new = function(arg0) {
2760
2764
  const ret = WasmPeerService.__wrap(arg0);
2761
2765
  return addHeapObject(ret);
2762
2766
  };
2767
+ imports.wbg.__wbindgen_is_object = function(arg0) {
2768
+ const val = getObject(arg0);
2769
+ const ret = typeof(val) === 'object' && val !== null;
2770
+ return ret;
2771
+ };
2772
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
2773
+ const ret = getObject(arg0) === undefined;
2774
+ return ret;
2775
+ };
2776
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
2777
+ const ret = getObject(arg0) in getObject(arg1);
2778
+ return ret;
2779
+ };
2763
2780
  imports.wbg.__wbg_wasmhop_new = function(arg0) {
2764
2781
  const ret = WasmHop.__wrap(arg0);
2765
2782
  return addHeapObject(ret);
2766
2783
  };
2767
- imports.wbg.__wbg_flushdata_4a3c00c70a7a4625 = function(arg0, arg1) {
2784
+ imports.wbg.__wbg_flushdata_fe8f2b14acc9b24d = function(arg0, arg1) {
2768
2785
  let deferred0_0;
2769
2786
  let deferred0_1;
2770
2787
  try {
@@ -2775,7 +2792,7 @@ function __wbg_get_imports() {
2775
2792
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2776
2793
  }
2777
2794
  };
2778
- imports.wbg.__wbg_readvalue_b1f136bf0a95ebbe = function() { return handleError(function (arg0, arg1) {
2795
+ imports.wbg.__wbg_readvalue_d64cea469f05b942 = function() { return handleError(function (arg0, arg1) {
2779
2796
  let deferred0_0;
2780
2797
  let deferred0_1;
2781
2798
  try {
@@ -2787,13 +2804,13 @@ function __wbg_get_imports() {
2787
2804
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2788
2805
  }
2789
2806
  }, arguments) };
2790
- imports.wbg.__wbg_loadwallet_fd9804310ff92531 = function() {
2807
+ imports.wbg.__wbg_loadwallet_e2fe08af150b25b3 = function() {
2791
2808
  MsgHandler.load_wallet();
2792
2809
  };
2793
- imports.wbg.__wbg_savewallet_c739e33b66c93d1f = function() {
2810
+ imports.wbg.__wbg_savewallet_40b319771a21726b = function() {
2794
2811
  MsgHandler.save_wallet();
2795
2812
  };
2796
- imports.wbg.__wbg_writevalue_fe157db73c65dda2 = function(arg0, arg1, arg2) {
2813
+ imports.wbg.__wbg_writevalue_32ec94b797810683 = function(arg0, arg1, arg2) {
2797
2814
  let deferred0_0;
2798
2815
  let deferred0_1;
2799
2816
  try {
@@ -2804,7 +2821,7 @@ function __wbg_get_imports() {
2804
2821
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2805
2822
  }
2806
2823
  };
2807
- imports.wbg.__wbg_appendvalue_94d7e5873b3a4bec = function(arg0, arg1, arg2) {
2824
+ imports.wbg.__wbg_appendvalue_f7131aa8b22d0eaf = function(arg0, arg1, arg2) {
2808
2825
  let deferred0_0;
2809
2826
  let deferred0_1;
2810
2827
  try {
@@ -2815,7 +2832,7 @@ function __wbg_get_imports() {
2815
2832
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2816
2833
  }
2817
2834
  };
2818
- imports.wbg.__wbg_removevalue_af13cf003306789a = function() { return handleError(function (arg0, arg1) {
2835
+ imports.wbg.__wbg_removevalue_9b8aebaa72738b75 = function() { return handleError(function (arg0, arg1) {
2819
2836
  let deferred0_0;
2820
2837
  let deferred0_1;
2821
2838
  try {
@@ -2827,10 +2844,10 @@ function __wbg_get_imports() {
2827
2844
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2828
2845
  }
2829
2846
  }, arguments) };
2830
- imports.wbg.__wbg_sendmessage_775b38830fcb7210 = function(arg0, arg1) {
2847
+ imports.wbg.__wbg_sendmessage_eb846022c945f874 = function(arg0, arg1) {
2831
2848
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2832
2849
  };
2833
- imports.wbg.__wbg_connecttopeer_88e6ca13804ea1f3 = function() { return handleError(function (arg0, arg1, arg2) {
2850
+ imports.wbg.__wbg_connecttopeer_eaf6ce31754ad986 = function() { return handleError(function (arg0, arg1, arg2) {
2834
2851
  let deferred0_0;
2835
2852
  let deferred0_1;
2836
2853
  try {
@@ -2842,13 +2859,13 @@ function __wbg_get_imports() {
2842
2859
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2843
2860
  }
2844
2861
  }, arguments) };
2845
- imports.wbg.__wbg_getmyservices_d7074f9c235f6a0e = function() {
2862
+ imports.wbg.__wbg_getmyservices_62760619d2342fa5 = function() {
2846
2863
  const ret = MsgHandler.get_my_services();
2847
2864
  _assertClass(ret, WasmPeerServiceList);
2848
2865
  var ptr1 = ret.__destroy_into_raw();
2849
2866
  return ptr1;
2850
2867
  };
2851
- imports.wbg.__wbg_isexistingfile_20dcafe0b9e7725b = function() { return handleError(function (arg0, arg1) {
2868
+ imports.wbg.__wbg_isexistingfile_e40370e8a861f62f = function() { return handleError(function (arg0, arg1) {
2852
2869
  let deferred0_0;
2853
2870
  let deferred0_1;
2854
2871
  try {
@@ -2860,27 +2877,27 @@ function __wbg_get_imports() {
2860
2877
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2861
2878
  }
2862
2879
  }, arguments) };
2863
- imports.wbg.__wbg_processapicall_6b02629e72ff0c5b = function(arg0, arg1, arg2) {
2880
+ imports.wbg.__wbg_processapicall_66f8ffbeb5c99ff6 = function(arg0, arg1, arg2) {
2864
2881
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2865
2882
  };
2866
- imports.wbg.__wbg_processapierror_f59412f3a8af3bf0 = function(arg0, arg1, arg2) {
2883
+ imports.wbg.__wbg_processapierror_4fa7d921e6184952 = function(arg0, arg1, arg2) {
2867
2884
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2868
2885
  };
2869
- imports.wbg.__wbg_processapisuccess_51f3850af704adbf = function(arg0, arg1, arg2) {
2886
+ imports.wbg.__wbg_processapisuccess_58560e91ffc5828f = function(arg0, arg1, arg2) {
2870
2887
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2871
2888
  };
2872
- imports.wbg.__wbg_sendmessagetoall_963e7281ab4a95d8 = function(arg0, arg1) {
2889
+ imports.wbg.__wbg_sendmessagetoall_4dd78d8ae91ba697 = function(arg0, arg1) {
2873
2890
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2874
2891
  };
2875
- imports.wbg.__wbg_disconnectfrompeer_57e1fe8480cf1735 = function() { return handleError(function (arg0) {
2892
+ imports.wbg.__wbg_disconnectfrompeer_d68f336d7341192e = function() { return handleError(function (arg0) {
2876
2893
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2877
2894
  return addHeapObject(ret);
2878
2895
  }, arguments) };
2879
- imports.wbg.__wbg_loadblockfilelist_7fc02777710ecbff = function() { return handleError(function () {
2896
+ imports.wbg.__wbg_loadblockfilelist_b8ecca73e095b6a8 = function() { return handleError(function () {
2880
2897
  const ret = MsgHandler.load_block_file_list();
2881
2898
  return addHeapObject(ret);
2882
2899
  }, arguments) };
2883
- imports.wbg.__wbg_sendinterfaceevent_bafa9a94648a8b92 = function(arg0, arg1, arg2, arg3, arg4) {
2900
+ imports.wbg.__wbg_sendinterfaceevent_3dca7509961c850b = function(arg0, arg1, arg2, arg3, arg4) {
2884
2901
  let deferred0_0;
2885
2902
  let deferred0_1;
2886
2903
  let deferred1_0;
@@ -2896,7 +2913,7 @@ function __wbg_get_imports() {
2896
2913
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2897
2914
  }
2898
2915
  };
2899
- imports.wbg.__wbg_sendblocksuccess_93c70716863ab68d = function(arg0, arg1, arg2) {
2916
+ imports.wbg.__wbg_sendblocksuccess_1ce7c0c7e5070778 = function(arg0, arg1, arg2) {
2900
2917
  let deferred0_0;
2901
2918
  let deferred0_1;
2902
2919
  try {
@@ -2907,10 +2924,10 @@ function __wbg_get_imports() {
2907
2924
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2908
2925
  }
2909
2926
  };
2910
- imports.wbg.__wbg_sendwalletupdate_a7146f389edd34d1 = function() {
2927
+ imports.wbg.__wbg_sendwalletupdate_7478002f88b31974 = function() {
2911
2928
  MsgHandler.send_wallet_update();
2912
2929
  };
2913
- imports.wbg.__wbg_sendnewversionalert_adab699c8e2201d3 = function(arg0, arg1, arg2) {
2930
+ imports.wbg.__wbg_sendnewversionalert_8b31deb2b86f3516 = function(arg0, arg1, arg2) {
2914
2931
  let deferred0_0;
2915
2932
  let deferred0_1;
2916
2933
  try {
@@ -2921,13 +2938,13 @@ function __wbg_get_imports() {
2921
2938
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2922
2939
  }
2923
2940
  };
2924
- imports.wbg.__wbg_sendblockfetchstatusevent_8bb0e111963c6dee = function(arg0) {
2941
+ imports.wbg.__wbg_sendblockfetchstatusevent_e42c5bfced93021d = function(arg0) {
2925
2942
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2926
2943
  };
2927
- imports.wbg.__wbg_sendnewchaindetectedevent_a859f945b1e2a8d8 = function() {
2944
+ imports.wbg.__wbg_sendnewchaindetectedevent_79305c180f237bc2 = function() {
2928
2945
  MsgHandler.send_new_chain_detected_event();
2929
2946
  };
2930
- imports.wbg.__wbg_fetchblockfrompeer_e1b60bd96ef7212c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2947
+ imports.wbg.__wbg_fetchblockfrompeer_dbbd33e8b8a662e1 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2931
2948
  let deferred0_0;
2932
2949
  let deferred0_1;
2933
2950
  try {
@@ -2939,7 +2956,7 @@ function __wbg_get_imports() {
2939
2956
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2940
2957
  }
2941
2958
  }, arguments) };
2942
- imports.wbg.__wbg_ensuredirectoryexists_1025c9af63f0ee64 = function() { return handleError(function (arg0, arg1) {
2959
+ imports.wbg.__wbg_ensuredirectoryexists_521d5078695937c9 = function() { return handleError(function (arg0, arg1) {
2943
2960
  let deferred0_0;
2944
2961
  let deferred0_1;
2945
2962
  try {
@@ -2950,23 +2967,6 @@ function __wbg_get_imports() {
2950
2967
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2951
2968
  }
2952
2969
  }, arguments) };
2953
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2954
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2955
- return addHeapObject(ret);
2956
- };
2957
- imports.wbg.__wbindgen_is_object = function(arg0) {
2958
- const val = getObject(arg0);
2959
- const ret = typeof(val) === 'object' && val !== null;
2960
- return ret;
2961
- };
2962
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
2963
- const ret = getObject(arg0) === undefined;
2964
- return ret;
2965
- };
2966
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
2967
- const ret = getObject(arg0) in getObject(arg1);
2968
- return ret;
2969
- };
2970
2970
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2971
2971
  const ret = getObject(arg0) == getObject(arg1);
2972
2972
  return ret;
@@ -3276,7 +3276,7 @@ function __wbg_get_imports() {
3276
3276
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3277
3277
  };
3278
3278
  imports.wbg.__wbindgen_closure_wrapper1615 = function(arg0, arg1, arg2) {
3279
- const ret = makeMutClosure(arg0, arg1, 600, __wbg_adapter_38);
3279
+ const ret = makeMutClosure(arg0, arg1, 598, __wbg_adapter_38);
3280
3280
  return addHeapObject(ret);
3281
3281
  };
3282
3282