saito-wasm 0.2.174 → 0.2.176

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/node/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  let imports = {};
2
2
  imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
- const { MsgHandler } = require(String.raw`./snippets/saito-wasm-ae65b4fbc9a49f9c/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-2d0d837f15b87abe/js/msg_handler.js`);
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
7
  const heap = new Array(128).fill(undefined);
@@ -24,6 +24,15 @@ function takeObject(idx) {
24
24
  return ret;
25
25
  }
26
26
 
27
+ function addHeapObject(obj) {
28
+ if (heap_next === heap.length) heap.push(heap.length + 1);
29
+ const idx = heap_next;
30
+ heap_next = heap[idx];
31
+
32
+ heap[idx] = obj;
33
+ return idx;
34
+ }
35
+
27
36
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
28
37
 
29
38
  cachedTextDecoder.decode();
@@ -42,15 +51,6 @@ function getStringFromWasm0(ptr, len) {
42
51
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
43
52
  }
44
53
 
45
- function addHeapObject(obj) {
46
- if (heap_next === heap.length) heap.push(heap.length + 1);
47
- const idx = heap_next;
48
- heap_next = heap[idx];
49
-
50
- heap[idx] = obj;
51
- return idx;
52
- }
53
-
54
54
  let WASM_VECTOR_LEN = 0;
55
55
 
56
56
  let cachedTextEncoder = new TextEncoder('utf-8');
@@ -225,7 +225,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
225
225
  return real;
226
226
  }
227
227
  function __wbg_adapter_38(arg0, arg1, arg2) {
228
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18f9d53151d93e96(arg0, arg1, addHeapObject(arg2));
228
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0f20d323127f6aa2(arg0, arg1, addHeapObject(arg2));
229
229
  }
230
230
 
231
231
  function _assertClass(instance, klass) {
@@ -235,6 +235,14 @@ function _assertClass(instance, klass) {
235
235
  return instance.ptr;
236
236
  }
237
237
 
238
+ function handleError(f, args) {
239
+ try {
240
+ return f.apply(this, args);
241
+ } catch (e) {
242
+ wasm.__wbindgen_exn_store(addHeapObject(e));
243
+ }
244
+ }
245
+
238
246
  let stack_pointer = 128;
239
247
 
240
248
  function addBorrowedObject(obj) {
@@ -243,168 +251,146 @@ function addBorrowedObject(obj) {
243
251
  return stack_pointer;
244
252
  }
245
253
  /**
246
- * @param {Uint8Array} buffer
247
- * @param {Uint8Array} hash
248
- * @param {bigint} block_id
249
- * @param {bigint} peer_index
254
+ * @param {bigint} duration_in_ms
250
255
  * @returns {Promise<void>}
251
256
  */
252
- module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
253
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
257
+ module.exports.process_timer_event = function(duration_in_ms) {
258
+ const ret = wasm.process_timer_event(duration_in_ms);
254
259
  return takeObject(ret);
255
260
  };
256
261
 
257
262
  /**
258
- * @param {Uint8Array} buffer
259
- * @param {number} msg_index
260
- * @param {bigint} peer_index
261
- * @returns {Promise<void>}
263
+ * @returns {Promise<bigint>}
262
264
  */
263
- module.exports.send_api_call = function(buffer, msg_index, peer_index) {
264
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
265
+ module.exports.get_next_peer_index = function() {
266
+ const ret = wasm.get_next_peer_index();
265
267
  return takeObject(ret);
266
268
  };
267
269
 
268
270
  /**
269
- * @param {string} public_key
270
- * @param {bigint} amount
271
- * @param {bigint} fee
272
- * @param {boolean} force_merge
271
+ * @param {string} nft_id_hex
272
+ * @param {Uint8Array} tx_msg
273
273
  * @returns {Promise<WasmTransaction>}
274
274
  */
275
- module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
276
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
275
+ module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
276
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
277
+ const len0 = WASM_VECTOR_LEN;
278
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
277
279
  return takeObject(ret);
278
280
  };
279
281
 
280
282
  /**
281
- * @param {number} major
282
- * @param {number} minor
283
- * @param {number} patch
284
283
  * @returns {Promise<void>}
285
284
  */
286
- module.exports.set_wallet_version = function(major, minor, patch) {
287
- const ret = wasm.set_wallet_version(major, minor, patch);
285
+ module.exports.disable_producing_blocks_by_timer = function() {
286
+ const ret = wasm.disable_producing_blocks_by_timer();
288
287
  return takeObject(ret);
289
288
  };
290
289
 
291
290
  /**
292
- * @returns {Promise<string>}
291
+ * @returns {Promise<Array<any>>}
293
292
  */
294
- module.exports.get_stats = function() {
295
- const ret = wasm.get_stats();
293
+ module.exports.get_mempool_txs = function() {
294
+ const ret = wasm.get_mempool_txs();
296
295
  return takeObject(ret);
297
296
  };
298
297
 
299
298
  /**
300
- * @returns {Promise<string>}
299
+ * @param {Uint8Array} buffer
300
+ * @param {number} msg_index
301
+ * @param {bigint} peer_index
302
+ * @returns {Promise<void>}
301
303
  */
302
- module.exports.get_peer_stats = function() {
303
- const ret = wasm.get_peer_stats();
304
+ module.exports.send_api_error = function(buffer, msg_index, peer_index) {
305
+ const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
304
306
  return takeObject(ret);
305
307
  };
306
308
 
307
309
  /**
308
- * @param {string} key
309
- * @returns {boolean}
310
+ * @param {bigint} peer_index
311
+ * @param {string} ip
312
+ * @returns {Promise<void>}
310
313
  */
311
- module.exports.is_valid_public_key = function(key) {
312
- const ret = wasm.is_valid_public_key(addHeapObject(key));
313
- return ret !== 0;
314
+ module.exports.process_new_peer = function(peer_index, ip) {
315
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
316
+ return takeObject(ret);
314
317
  };
315
318
 
316
319
  /**
317
- * @param {bigint} amt
318
- * @param {string} slip1_utxo_key
319
- * @param {string} slip2_utxo_key
320
- * @param {string} slip3_utxo_key
321
- * @param {string} recipient_public_key
322
- * @param {Uint8Array} tx_msg
323
- * @returns {Promise<WasmTransaction>}
320
+ * @param {bigint} peer_index
321
+ * @param {string} public_key
322
+ * @returns {Promise<void>}
324
323
  */
325
- module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
326
- 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));
324
+ module.exports.process_stun_peer = function(peer_index, public_key) {
325
+ const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
327
326
  return takeObject(ret);
328
327
  };
329
328
 
330
329
  /**
331
- * @param {bigint} peer_index
332
- * @returns {Promise<void>}
330
+ * @returns {Promise<WasmWallet>}
333
331
  */
334
- module.exports.process_peer_disconnection = function(peer_index) {
335
- const ret = wasm.process_peer_disconnection(peer_index);
332
+ module.exports.get_wallet = function() {
333
+ const ret = wasm.get_wallet();
336
334
  return takeObject(ret);
337
335
  };
338
336
 
339
337
  /**
340
- * @param {string} nft_id_hex
341
- * @param {Uint8Array} tx_msg
338
+ * @param {string} slip1_utxo_key
339
+ * @param {string} slip2_utxo_key
340
+ * @param {string} slip3_utxo_key
342
341
  * @returns {Promise<WasmTransaction>}
343
342
  */
344
- module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
345
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
346
- const len0 = WASM_VECTOR_LEN;
347
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
343
+ module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
344
+ const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
348
345
  return takeObject(ret);
349
346
  };
350
347
 
351
348
  /**
352
- * @param {string} private_key
353
- * @returns {string}
349
+ * @returns {Promise<string>}
354
350
  */
355
- module.exports.generate_public_key = function(private_key) {
356
- try {
357
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
358
- wasm.generate_public_key(retptr, addHeapObject(private_key));
359
- var r0 = getInt32Memory0()[retptr / 4 + 0];
360
- var r1 = getInt32Memory0()[retptr / 4 + 1];
361
- var r2 = getInt32Memory0()[retptr / 4 + 2];
362
- if (r2) {
363
- throw takeObject(r1);
364
- }
365
- return takeObject(r0);
366
- } finally {
367
- wasm.__wbindgen_add_to_stack_pointer(16);
368
- }
351
+ module.exports.get_peer_stats = function() {
352
+ const ret = wasm.get_peer_stats();
353
+ return takeObject(ret);
369
354
  };
370
355
 
371
356
  /**
372
- * @param {bigint} peer_index
373
- * @param {string} public_key
357
+ * @param {WasmTransaction} tx
374
358
  * @returns {Promise<void>}
375
359
  */
376
- module.exports.process_stun_peer = function(peer_index, public_key) {
377
- const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
360
+ module.exports.propagate_transaction = function(tx) {
361
+ _assertClass(tx, WasmTransaction);
362
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
378
363
  return takeObject(ret);
379
364
  };
380
365
 
381
366
  /**
382
- * @param {Array<any>} keys
383
- * @returns {Promise<WasmBalanceSnapshot>}
367
+ * @param {Uint8Array} buffer
368
+ * @returns {string}
384
369
  */
385
- module.exports.get_balance_snapshot = function(keys) {
386
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
370
+ module.exports.hash = function(buffer) {
371
+ const ret = wasm.hash(addHeapObject(buffer));
387
372
  return takeObject(ret);
388
373
  };
389
374
 
390
375
  /**
391
- * @returns {Promise<WasmWallet>}
376
+ * @param {Uint8Array} buffer
377
+ * @param {number} msg_index
378
+ * @param {bigint} peer_index
379
+ * @returns {Promise<void>}
392
380
  */
393
- module.exports.get_wallet = function() {
394
- const ret = wasm.get_wallet();
381
+ module.exports.send_api_call = function(buffer, msg_index, peer_index) {
382
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
395
383
  return takeObject(ret);
396
384
  };
397
385
 
398
386
  /**
399
- * @param {string} config_json
400
- * @param {string} private_key
401
- * @param {number} log_level_num
402
- * @param {bigint} hasten_multiplier
403
- * @param {boolean} delete_old_blocks
404
- * @returns {Promise<any>}
387
+ * @param {Uint8Array} buffer
388
+ * @param {number} msg_index
389
+ * @param {bigint} peer_index
390
+ * @returns {Promise<void>}
405
391
  */
406
- module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
407
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
392
+ module.exports.send_api_success = function(buffer, msg_index, peer_index) {
393
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
408
394
  return takeObject(ret);
409
395
  };
410
396
 
@@ -412,8 +398,8 @@ module.exports.initialize = function(config_json, private_key, log_level_num, ha
412
398
  * @param {bigint} peer_index
413
399
  * @returns {Promise<void>}
414
400
  */
415
- module.exports.remove_stun_peer = function(peer_index) {
416
- const ret = wasm.remove_stun_peer(peer_index);
401
+ module.exports.process_peer_disconnection = function(peer_index) {
402
+ const ret = wasm.process_peer_disconnection(peer_index);
417
403
  return takeObject(ret);
418
404
  };
419
405
 
@@ -432,324 +418,339 @@ module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, re
432
418
  };
433
419
 
434
420
  /**
435
- * @param {string} slip1_utxo_key
436
- * @param {string} slip2_utxo_key
437
- * @param {string} slip3_utxo_key
421
+ * @param {Array<any>} public_keys
422
+ * @param {BigUint64Array} amounts
423
+ * @param {bigint} fee
424
+ * @param {boolean} _force_merge
438
425
  * @returns {Promise<WasmTransaction>}
439
426
  */
440
- module.exports.create_remove_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key) {
441
- const ret = wasm.create_remove_bound_transaction(addHeapObject(slip1_utxo_key), addHeapObject(slip2_utxo_key), addHeapObject(slip3_utxo_key));
427
+ module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
428
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
429
+ return takeObject(ret);
430
+ };
431
+
432
+ /**
433
+ * @returns {Promise<any>}
434
+ */
435
+ module.exports.get_confirmations = function() {
436
+ const ret = wasm.get_confirmations();
442
437
  return takeObject(ret);
443
438
  };
444
439
 
445
440
  /**
446
- * @param {bigint} current_time
447
441
  * @returns {Promise<void>}
448
442
  */
449
- module.exports.process_stat_interval = function(current_time) {
450
- const ret = wasm.process_stat_interval(current_time);
443
+ module.exports.start_from_received_ghost_chain = function() {
444
+ const ret = wasm.start_from_received_ghost_chain();
451
445
  return takeObject(ret);
452
446
  };
453
447
 
454
448
  /**
455
- * @param {Array<any>} public_keys
456
- * @param {BigUint64Array} amounts
457
- * @param {bigint} fee
458
- * @param {boolean} _force_merge
459
- * @returns {Promise<WasmTransaction>}
449
+ * @returns {Promise<string>}
460
450
  */
461
- module.exports.create_transaction_with_multiple_payments = function(public_keys, amounts, fee, _force_merge) {
462
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
451
+ module.exports.get_latest_block_hash = function() {
452
+ const ret = wasm.get_latest_block_hash();
463
453
  return takeObject(ret);
464
454
  };
465
455
 
466
456
  /**
467
- * @returns {Promise<bigint>}
457
+ * @returns {Promise<boolean>}
468
458
  */
469
- module.exports.get_next_peer_index = function() {
470
- const ret = wasm.get_next_peer_index();
459
+ module.exports.produce_block_without_gt = function() {
460
+ const ret = wasm.produce_block_without_gt();
471
461
  return takeObject(ret);
472
462
  };
473
463
 
474
464
  /**
475
- * @param {bigint} duration_in_ms
476
- * @returns {Promise<void>}
465
+ * @param {bigint} peer_index
466
+ * @returns {Promise<WasmPeer | undefined>}
477
467
  */
478
- module.exports.process_timer_event = function(duration_in_ms) {
479
- const ret = wasm.process_timer_event(duration_in_ms);
468
+ module.exports.get_peer = function(peer_index) {
469
+ const ret = wasm.get_peer(peer_index);
480
470
  return takeObject(ret);
481
471
  };
482
472
 
483
473
  /**
474
+ * @param {string} config_json
475
+ * @param {string} private_key
476
+ * @param {number} log_level_num
477
+ * @param {bigint} hasten_multiplier
478
+ * @param {boolean} delete_old_blocks
484
479
  * @returns {Promise<any>}
485
480
  */
486
- module.exports.get_confirmations = function() {
487
- const ret = wasm.get_confirmations();
481
+ module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
482
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
488
483
  return takeObject(ret);
489
484
  };
490
485
 
491
486
  /**
492
- * @param {Uint8Array} buffer
493
- * @param {bigint} peer_index
494
- * @returns {Promise<void>}
487
+ * @returns {Promise<WasmBlockchain>}
495
488
  */
496
- module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
497
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
489
+ module.exports.get_blockchain = function() {
490
+ const ret = wasm.get_blockchain();
498
491
  return takeObject(ret);
499
492
  };
500
493
 
501
494
  /**
502
- * @param {Uint8Array} buffer
503
- * @param {number} msg_index
504
- * @param {bigint} peer_index
495
+ * @param {bigint} threshold
505
496
  * @returns {Promise<void>}
506
497
  */
507
- module.exports.send_api_success = function(buffer, msg_index, peer_index) {
508
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
498
+ module.exports.write_issuance_file = function(threshold) {
499
+ const ret = wasm.write_issuance_file(threshold);
509
500
  return takeObject(ret);
510
501
  };
511
502
 
512
503
  /**
504
+ * @param {string} public_key
513
505
  * @returns {Promise<Array<any>>}
514
506
  */
515
- module.exports.get_nft_list = function() {
516
- const ret = wasm.get_nft_list();
507
+ module.exports.get_account_slips = function(public_key) {
508
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
517
509
  return takeObject(ret);
518
510
  };
519
511
 
520
512
  /**
521
- * @param {Uint8Array} buffer
522
- * @param {string} private_key
523
- * @returns {string}
513
+ * @param {bigint} peer_index
514
+ * @returns {Promise<void>}
524
515
  */
525
- module.exports.sign_buffer = function(buffer, private_key) {
526
- try {
527
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
528
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
529
- var r0 = getInt32Memory0()[retptr / 4 + 0];
530
- var r1 = getInt32Memory0()[retptr / 4 + 1];
531
- var r2 = getInt32Memory0()[retptr / 4 + 2];
532
- if (r2) {
533
- throw takeObject(r1);
534
- }
535
- return takeObject(r0);
536
- } finally {
537
- wasm.__wbindgen_add_to_stack_pointer(16);
538
- }
516
+ module.exports.remove_stun_peer = function(peer_index) {
517
+ const ret = wasm.remove_stun_peer(peer_index);
518
+ return takeObject(ret);
539
519
  };
540
520
 
541
521
  /**
542
- * @param {WasmBalanceSnapshot} snapshot
522
+ * @param {Uint8Array} buffer
523
+ * @param {Uint8Array} hash
524
+ * @param {bigint} block_id
525
+ * @param {bigint} peer_index
543
526
  * @returns {Promise<void>}
544
527
  */
545
- module.exports.update_from_balance_snapshot = function(snapshot) {
546
- _assertClass(snapshot, WasmBalanceSnapshot);
547
- var ptr0 = snapshot.__destroy_into_raw();
548
- const ret = wasm.update_from_balance_snapshot(ptr0);
528
+ module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
529
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
549
530
  return takeObject(ret);
550
531
  };
551
532
 
552
533
  /**
553
- * @param {WasmTransaction} tx
554
- * @returns {Promise<void>}
534
+ * @param {string} slip1_utxo_key
535
+ * @param {string} slip2_utxo_key
536
+ * @param {string} slip3_utxo_key
537
+ * @param {number} left_count
538
+ * @param {number} right_count
539
+ * @param {Uint8Array} tx_msg
540
+ * @returns {Promise<WasmTransaction>}
555
541
  */
556
- module.exports.propagate_transaction = function(tx) {
557
- _assertClass(tx, WasmTransaction);
558
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
542
+ module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
543
+ 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));
559
544
  return takeObject(ret);
560
545
  };
561
546
 
562
547
  /**
563
- * @returns {Promise<string>}
548
+ * @returns {Promise<Array<any>>}
564
549
  */
565
- module.exports.get_latest_block_hash = function() {
566
- const ret = wasm.get_latest_block_hash();
550
+ module.exports.get_nft_list = function() {
551
+ const ret = wasm.get_nft_list();
567
552
  return takeObject(ret);
568
553
  };
569
554
 
570
555
  /**
571
- * @returns {Promise<boolean>}
556
+ * @returns {Promise<string>}
572
557
  */
573
- module.exports.produce_block_with_gt = function() {
574
- const ret = wasm.produce_block_with_gt();
558
+ module.exports.get_stats = function() {
559
+ const ret = wasm.get_stats();
575
560
  return takeObject(ret);
576
561
  };
577
562
 
578
563
  /**
579
- * @returns {Promise<boolean>}
564
+ * @param {number} major
565
+ * @param {number} minor
566
+ * @param {number} patch
567
+ * @returns {Promise<void>}
580
568
  */
581
- module.exports.produce_block_without_gt = function() {
582
- const ret = wasm.produce_block_without_gt();
569
+ module.exports.set_wallet_version = function(major, minor, patch) {
570
+ const ret = wasm.set_wallet_version(major, minor, patch);
583
571
  return takeObject(ret);
584
572
  };
585
573
 
586
574
  /**
587
- * @param {Uint8Array} buffer
588
- * @param {string} signature
589
- * @param {string} public_key
590
- * @returns {boolean}
575
+ * @returns {Promise<string>}
591
576
  */
592
- module.exports.verify_signature = function(buffer, signature, public_key) {
593
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
594
- return ret !== 0;
577
+ module.exports.get_congestion_stats = function() {
578
+ const ret = wasm.get_congestion_stats();
579
+ return takeObject(ret);
595
580
  };
596
581
 
597
582
  /**
598
- * @returns {string}
583
+ * @param {bigint} amt
584
+ * @param {string} slip1_utxo_key
585
+ * @param {string} slip2_utxo_key
586
+ * @param {string} slip3_utxo_key
587
+ * @param {string} recipient_public_key
588
+ * @param {Uint8Array} tx_msg
589
+ * @returns {Promise<WasmTransaction>}
599
590
  */
600
- module.exports.generate_private_key = function() {
601
- const ret = wasm.generate_private_key();
591
+ module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
592
+ 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));
602
593
  return takeObject(ret);
603
594
  };
604
595
 
605
596
  /**
606
- * @param {bigint} threshold
607
- * @returns {Promise<void>}
597
+ * @param {Uint8Array} buffer
598
+ * @param {string} private_key
599
+ * @returns {string}
608
600
  */
609
- module.exports.write_issuance_file = function(threshold) {
610
- const ret = wasm.write_issuance_file(threshold);
611
- return takeObject(ret);
601
+ module.exports.sign_buffer = function(buffer, private_key) {
602
+ try {
603
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
604
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
605
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
606
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
607
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
608
+ if (r2) {
609
+ throw takeObject(r1);
610
+ }
611
+ return takeObject(r0);
612
+ } finally {
613
+ wasm.__wbindgen_add_to_stack_pointer(16);
614
+ }
612
615
  };
613
616
 
614
617
  /**
615
- * @param {Uint8Array} buffer
616
- * @returns {string}
618
+ * @param {string} block_hash
619
+ * @returns {Promise<WasmBlock>}
617
620
  */
618
- module.exports.hash = function(buffer) {
619
- const ret = wasm.hash(addHeapObject(buffer));
621
+ module.exports.get_block = function(block_hash) {
622
+ const ret = wasm.get_block(addHeapObject(block_hash));
620
623
  return takeObject(ret);
621
624
  };
622
625
 
623
626
  /**
624
- * @returns {Promise<void>}
627
+ * @param {string} private_key
628
+ * @returns {string}
625
629
  */
626
- module.exports.disable_producing_blocks_by_timer = function() {
627
- const ret = wasm.disable_producing_blocks_by_timer();
628
- return takeObject(ret);
630
+ module.exports.generate_public_key = function(private_key) {
631
+ try {
632
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
633
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
634
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
635
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
636
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
637
+ if (r2) {
638
+ throw takeObject(r1);
639
+ }
640
+ return takeObject(r0);
641
+ } finally {
642
+ wasm.__wbindgen_add_to_stack_pointer(16);
643
+ }
629
644
  };
630
645
 
631
646
  /**
632
- * @returns {Promise<string>}
647
+ * @param {Uint8Array} buffer
648
+ * @param {string} signature
649
+ * @param {string} public_key
650
+ * @returns {boolean}
633
651
  */
634
- module.exports.get_congestion_stats = function() {
635
- const ret = wasm.get_congestion_stats();
636
- return takeObject(ret);
652
+ module.exports.verify_signature = function(buffer, signature, public_key) {
653
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
654
+ return ret !== 0;
637
655
  };
638
656
 
639
657
  /**
640
- * @param {Uint8Array} hash
641
- * @param {bigint} block_id
658
+ * @param {Uint8Array} buffer
642
659
  * @param {bigint} peer_index
643
660
  * @returns {Promise<void>}
644
661
  */
645
- module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
646
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
647
- return takeObject(ret);
648
- };
649
-
650
- /**
651
- * @returns {Promise<WasmBlockchain>}
652
- */
653
- module.exports.get_blockchain = function() {
654
- const ret = wasm.get_blockchain();
662
+ module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
663
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
655
664
  return takeObject(ret);
656
665
  };
657
666
 
658
667
  /**
659
- * @returns {Promise<void>}
668
+ * @returns {Promise<Array<any>>}
660
669
  */
661
- module.exports.start_from_received_ghost_chain = function() {
662
- const ret = wasm.start_from_received_ghost_chain();
670
+ module.exports.get_peers = function() {
671
+ const ret = wasm.get_peers();
663
672
  return takeObject(ret);
664
673
  };
665
674
 
666
675
  /**
667
- * @returns {Promise<Array<any>>}
676
+ * @returns {Promise<boolean>}
668
677
  */
669
- module.exports.get_mempool_txs = function() {
670
- const ret = wasm.get_mempool_txs();
678
+ module.exports.produce_block_with_gt = function() {
679
+ const ret = wasm.produce_block_with_gt();
671
680
  return takeObject(ret);
672
681
  };
673
682
 
674
683
  /**
675
- * @returns {Promise<Array<any>>}
684
+ * @param {string} key
685
+ * @returns {boolean}
676
686
  */
677
- module.exports.get_peers = function() {
678
- const ret = wasm.get_peers();
679
- return takeObject(ret);
687
+ module.exports.is_valid_public_key = function(key) {
688
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
689
+ return ret !== 0;
680
690
  };
681
691
 
682
692
  /**
683
- * @param {string} slip1_utxo_key
684
- * @param {string} slip2_utxo_key
685
- * @param {string} slip3_utxo_key
686
- * @param {number} left_count
687
- * @param {number} right_count
688
- * @param {Uint8Array} tx_msg
693
+ * @param {string} public_key
694
+ * @param {bigint} amount
695
+ * @param {bigint} fee
696
+ * @param {boolean} force_merge
689
697
  * @returns {Promise<WasmTransaction>}
690
698
  */
691
- module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
692
- 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));
699
+ module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
700
+ const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
693
701
  return takeObject(ret);
694
702
  };
695
703
 
696
704
  /**
697
- * @param {string} public_key
698
- * @returns {Promise<Array<any>>}
705
+ * @param {WasmBalanceSnapshot} snapshot
706
+ * @returns {Promise<void>}
699
707
  */
700
- module.exports.get_account_slips = function(public_key) {
701
- const ret = wasm.get_account_slips(addHeapObject(public_key));
708
+ module.exports.update_from_balance_snapshot = function(snapshot) {
709
+ _assertClass(snapshot, WasmBalanceSnapshot);
710
+ var ptr0 = snapshot.__destroy_into_raw();
711
+ const ret = wasm.update_from_balance_snapshot(ptr0);
702
712
  return takeObject(ret);
703
713
  };
704
714
 
705
715
  /**
706
- * @param {string} block_hash
707
- * @returns {Promise<WasmBlock>}
716
+ * @returns {string}
708
717
  */
709
- module.exports.get_block = function(block_hash) {
710
- const ret = wasm.get_block(addHeapObject(block_hash));
718
+ module.exports.generate_private_key = function() {
719
+ const ret = wasm.generate_private_key();
711
720
  return takeObject(ret);
712
721
  };
713
722
 
714
723
  /**
715
- * @param {bigint} peer_index
716
- * @returns {Promise<WasmPeer | undefined>}
724
+ * @param {bigint} current_time
725
+ * @returns {Promise<void>}
717
726
  */
718
- module.exports.get_peer = function(peer_index) {
719
- const ret = wasm.get_peer(peer_index);
727
+ module.exports.process_stat_interval = function(current_time) {
728
+ const ret = wasm.process_stat_interval(current_time);
720
729
  return takeObject(ret);
721
730
  };
722
731
 
723
732
  /**
724
- * @param {bigint} peer_index
725
- * @param {string} ip
726
- * @returns {Promise<void>}
733
+ * @param {Array<any>} keys
734
+ * @returns {Promise<WasmBalanceSnapshot>}
727
735
  */
728
- module.exports.process_new_peer = function(peer_index, ip) {
729
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
736
+ module.exports.get_balance_snapshot = function(keys) {
737
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
730
738
  return takeObject(ret);
731
739
  };
732
740
 
733
741
  /**
734
- * @param {Uint8Array} buffer
735
- * @param {number} msg_index
742
+ * @param {Uint8Array} hash
743
+ * @param {bigint} block_id
736
744
  * @param {bigint} peer_index
737
745
  * @returns {Promise<void>}
738
746
  */
739
- module.exports.send_api_error = function(buffer, msg_index, peer_index) {
740
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
747
+ module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
748
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
741
749
  return takeObject(ret);
742
750
  };
743
751
 
744
- function handleError(f, args) {
745
- try {
746
- return f.apply(this, args);
747
- } catch (e) {
748
- wasm.__wbindgen_exn_store(addHeapObject(e));
749
- }
750
- }
751
- function __wbg_adapter_410(arg0, arg1, arg2, arg3) {
752
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h58ba5fc31ee09770(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
752
+ function __wbg_adapter_454(arg0, arg1, arg2, arg3) {
753
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h67b6352f6b82f267(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
753
754
  }
754
755
 
755
756
  const SaitoWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -2684,38 +2685,42 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2684
2685
  takeObject(arg0);
2685
2686
  };
2686
2687
 
2687
- module.exports.__wbg_wasmnft_new = function(arg0) {
2688
- const ret = WasmNFT.__wrap(arg0);
2688
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2689
+ const ret = BigInt.asUintN(64, arg0);
2689
2690
  return addHeapObject(ret);
2690
2691
  };
2691
2692
 
2692
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
2693
- const ret = getStringFromWasm0(arg0, arg1);
2693
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2694
+ const ret = WasmWallet.__wrap(arg0);
2694
2695
  return addHeapObject(ret);
2695
2696
  };
2696
2697
 
2697
- module.exports.__wbg_wasmtransaction_new = function(arg0) {
2698
- const ret = WasmTransaction.__wrap(arg0);
2698
+ module.exports.__wbg_wasmnft_new = function(arg0) {
2699
+ const ret = WasmNFT.__wrap(arg0);
2699
2700
  return addHeapObject(ret);
2700
2701
  };
2701
2702
 
2702
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2703
- const ret = WasmPeer.__wrap(arg0);
2703
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
2704
+ const ret = getStringFromWasm0(arg0, arg1);
2704
2705
  return addHeapObject(ret);
2705
2706
  };
2706
2707
 
2707
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2708
- const ret = BigInt.asUintN(64, arg0);
2708
+ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2709
+ const ret = WasmTransaction.__wrap(arg0);
2709
2710
  return addHeapObject(ret);
2710
2711
  };
2711
2712
 
2712
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
2713
- const ret = getObject(arg0);
2714
- return addHeapObject(ret);
2713
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
2714
+ const obj = getObject(arg1);
2715
+ const ret = typeof(obj) === 'string' ? obj : undefined;
2716
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2717
+ var len1 = WASM_VECTOR_LEN;
2718
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2719
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2715
2720
  };
2716
2721
 
2717
- module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2718
- const ret = WasmWalletSlip.__wrap(arg0);
2722
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2723
+ const ret = WasmBlockchain.__wrap(arg0);
2719
2724
  return addHeapObject(ret);
2720
2725
  };
2721
2726
 
@@ -2729,44 +2734,29 @@ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2729
2734
  return addHeapObject(ret);
2730
2735
  };
2731
2736
 
2732
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
2733
- const obj = getObject(arg1);
2734
- const ret = typeof(obj) === 'string' ? obj : undefined;
2735
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2736
- var len1 = WASM_VECTOR_LEN;
2737
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2738
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2739
- };
2740
-
2741
- module.exports.__wbg_wasmslip_new = function(arg0) {
2742
- const ret = WasmSlip.__wrap(arg0);
2737
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2738
+ const ret = WasmPeer.__wrap(arg0);
2743
2739
  return addHeapObject(ret);
2744
2740
  };
2745
2741
 
2746
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2747
- const ret = WasmBlockchain.__wrap(arg0);
2742
+ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2743
+ const ret = WasmWalletSlip.__wrap(arg0);
2748
2744
  return addHeapObject(ret);
2749
2745
  };
2750
2746
 
2751
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2752
- const ret = WasmWallet.__wrap(arg0);
2747
+ module.exports.__wbg_wasmslip_new = function(arg0) {
2748
+ const ret = WasmSlip.__wrap(arg0);
2753
2749
  return addHeapObject(ret);
2754
2750
  };
2755
2751
 
2756
- module.exports.__wbindgen_is_object = function(arg0) {
2757
- const val = getObject(arg0);
2758
- const ret = typeof(val) === 'object' && val !== null;
2759
- return ret;
2760
- };
2761
-
2762
- module.exports.__wbindgen_is_undefined = function(arg0) {
2763
- const ret = getObject(arg0) === undefined;
2764
- return ret;
2752
+ module.exports.__wbindgen_object_clone_ref = function(arg0) {
2753
+ const ret = getObject(arg0);
2754
+ return addHeapObject(ret);
2765
2755
  };
2766
2756
 
2767
- module.exports.__wbindgen_in = function(arg0, arg1) {
2768
- const ret = getObject(arg0) in getObject(arg1);
2769
- return ret;
2757
+ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2758
+ const ret = WasmPeerService.__wrap(arg0);
2759
+ return addHeapObject(ret);
2770
2760
  };
2771
2761
 
2772
2762
  module.exports.__wbg_wasmhop_new = function(arg0) {
@@ -2774,7 +2764,7 @@ module.exports.__wbg_wasmhop_new = function(arg0) {
2774
2764
  return addHeapObject(ret);
2775
2765
  };
2776
2766
 
2777
- module.exports.__wbg_flushdata_69f5339cf155fcf4 = function(arg0, arg1) {
2767
+ module.exports.__wbg_flushdata_4a3c00c70a7a4625 = function(arg0, arg1) {
2778
2768
  let deferred0_0;
2779
2769
  let deferred0_1;
2780
2770
  try {
@@ -2786,7 +2776,7 @@ module.exports.__wbg_flushdata_69f5339cf155fcf4 = function(arg0, arg1) {
2786
2776
  }
2787
2777
  };
2788
2778
 
2789
- module.exports.__wbg_readvalue_db587e79e6f3fb9e = function() { return handleError(function (arg0, arg1) {
2779
+ module.exports.__wbg_readvalue_b1f136bf0a95ebbe = function() { return handleError(function (arg0, arg1) {
2790
2780
  let deferred0_0;
2791
2781
  let deferred0_1;
2792
2782
  try {
@@ -2799,15 +2789,15 @@ module.exports.__wbg_readvalue_db587e79e6f3fb9e = function() { return handleErro
2799
2789
  }
2800
2790
  }, arguments) };
2801
2791
 
2802
- module.exports.__wbg_loadwallet_9a8ac44bd0e449f2 = function() {
2792
+ module.exports.__wbg_loadwallet_fd9804310ff92531 = function() {
2803
2793
  MsgHandler.load_wallet();
2804
2794
  };
2805
2795
 
2806
- module.exports.__wbg_savewallet_08659aa41a3a3b8c = function() {
2796
+ module.exports.__wbg_savewallet_c739e33b66c93d1f = function() {
2807
2797
  MsgHandler.save_wallet();
2808
2798
  };
2809
2799
 
2810
- module.exports.__wbg_writevalue_829d6afba3d7e073 = function(arg0, arg1, arg2) {
2800
+ module.exports.__wbg_writevalue_fe157db73c65dda2 = function(arg0, arg1, arg2) {
2811
2801
  let deferred0_0;
2812
2802
  let deferred0_1;
2813
2803
  try {
@@ -2819,7 +2809,7 @@ module.exports.__wbg_writevalue_829d6afba3d7e073 = function(arg0, arg1, arg2) {
2819
2809
  }
2820
2810
  };
2821
2811
 
2822
- module.exports.__wbg_appendvalue_717ada2450cd8353 = function(arg0, arg1, arg2) {
2812
+ module.exports.__wbg_appendvalue_94d7e5873b3a4bec = function(arg0, arg1, arg2) {
2823
2813
  let deferred0_0;
2824
2814
  let deferred0_1;
2825
2815
  try {
@@ -2831,7 +2821,7 @@ module.exports.__wbg_appendvalue_717ada2450cd8353 = function(arg0, arg1, arg2) {
2831
2821
  }
2832
2822
  };
2833
2823
 
2834
- module.exports.__wbg_removevalue_5e61c5d5776e1642 = function() { return handleError(function (arg0, arg1) {
2824
+ module.exports.__wbg_removevalue_af13cf003306789a = function() { return handleError(function (arg0, arg1) {
2835
2825
  let deferred0_0;
2836
2826
  let deferred0_1;
2837
2827
  try {
@@ -2844,11 +2834,11 @@ module.exports.__wbg_removevalue_5e61c5d5776e1642 = function() { return handleEr
2844
2834
  }
2845
2835
  }, arguments) };
2846
2836
 
2847
- module.exports.__wbg_sendmessage_a2d8f51709ef90ba = function(arg0, arg1) {
2837
+ module.exports.__wbg_sendmessage_775b38830fcb7210 = function(arg0, arg1) {
2848
2838
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2849
2839
  };
2850
2840
 
2851
- module.exports.__wbg_connecttopeer_044f65cc51be6b22 = function() { return handleError(function (arg0, arg1, arg2) {
2841
+ module.exports.__wbg_connecttopeer_88e6ca13804ea1f3 = function() { return handleError(function (arg0, arg1, arg2) {
2852
2842
  let deferred0_0;
2853
2843
  let deferred0_1;
2854
2844
  try {
@@ -2861,14 +2851,14 @@ module.exports.__wbg_connecttopeer_044f65cc51be6b22 = function() { return handle
2861
2851
  }
2862
2852
  }, arguments) };
2863
2853
 
2864
- module.exports.__wbg_getmyservices_1954474087b66484 = function() {
2854
+ module.exports.__wbg_getmyservices_d7074f9c235f6a0e = function() {
2865
2855
  const ret = MsgHandler.get_my_services();
2866
2856
  _assertClass(ret, WasmPeerServiceList);
2867
2857
  var ptr1 = ret.__destroy_into_raw();
2868
2858
  return ptr1;
2869
2859
  };
2870
2860
 
2871
- module.exports.__wbg_isexistingfile_b160b225b0ebf317 = function() { return handleError(function (arg0, arg1) {
2861
+ module.exports.__wbg_isexistingfile_20dcafe0b9e7725b = function() { return handleError(function (arg0, arg1) {
2872
2862
  let deferred0_0;
2873
2863
  let deferred0_1;
2874
2864
  try {
@@ -2881,33 +2871,33 @@ module.exports.__wbg_isexistingfile_b160b225b0ebf317 = function() { return handl
2881
2871
  }
2882
2872
  }, arguments) };
2883
2873
 
2884
- module.exports.__wbg_processapicall_a09661040af24e29 = function(arg0, arg1, arg2) {
2874
+ module.exports.__wbg_processapicall_6b02629e72ff0c5b = function(arg0, arg1, arg2) {
2885
2875
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2886
2876
  };
2887
2877
 
2888
- module.exports.__wbg_processapierror_c889a2b7d06c4549 = function(arg0, arg1, arg2) {
2878
+ module.exports.__wbg_processapierror_f59412f3a8af3bf0 = function(arg0, arg1, arg2) {
2889
2879
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2890
2880
  };
2891
2881
 
2892
- module.exports.__wbg_processapisuccess_f458fbe6c019cc75 = function(arg0, arg1, arg2) {
2882
+ module.exports.__wbg_processapisuccess_51f3850af704adbf = function(arg0, arg1, arg2) {
2893
2883
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2894
2884
  };
2895
2885
 
2896
- module.exports.__wbg_sendmessagetoall_caeb7aa562fdcf58 = function(arg0, arg1) {
2886
+ module.exports.__wbg_sendmessagetoall_963e7281ab4a95d8 = function(arg0, arg1) {
2897
2887
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2898
2888
  };
2899
2889
 
2900
- module.exports.__wbg_disconnectfrompeer_77faa63c7da71011 = function() { return handleError(function (arg0) {
2890
+ module.exports.__wbg_disconnectfrompeer_57e1fe8480cf1735 = function() { return handleError(function (arg0) {
2901
2891
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2902
2892
  return addHeapObject(ret);
2903
2893
  }, arguments) };
2904
2894
 
2905
- module.exports.__wbg_loadblockfilelist_d0b9744f9ef2f6e5 = function() { return handleError(function () {
2895
+ module.exports.__wbg_loadblockfilelist_7fc02777710ecbff = function() { return handleError(function () {
2906
2896
  const ret = MsgHandler.load_block_file_list();
2907
2897
  return addHeapObject(ret);
2908
2898
  }, arguments) };
2909
2899
 
2910
- module.exports.__wbg_sendinterfaceevent_6d41a333bfd8a21a = function(arg0, arg1, arg2, arg3, arg4) {
2900
+ module.exports.__wbg_sendinterfaceevent_bafa9a94648a8b92 = function(arg0, arg1, arg2, arg3, arg4) {
2911
2901
  let deferred0_0;
2912
2902
  let deferred0_1;
2913
2903
  let deferred1_0;
@@ -2924,7 +2914,7 @@ module.exports.__wbg_sendinterfaceevent_6d41a333bfd8a21a = function(arg0, arg1,
2924
2914
  }
2925
2915
  };
2926
2916
 
2927
- module.exports.__wbg_sendblocksuccess_468375797025263d = function(arg0, arg1, arg2) {
2917
+ module.exports.__wbg_sendblocksuccess_93c70716863ab68d = function(arg0, arg1, arg2) {
2928
2918
  let deferred0_0;
2929
2919
  let deferred0_1;
2930
2920
  try {
@@ -2936,11 +2926,11 @@ module.exports.__wbg_sendblocksuccess_468375797025263d = function(arg0, arg1, ar
2936
2926
  }
2937
2927
  };
2938
2928
 
2939
- module.exports.__wbg_sendwalletupdate_f76f3cac797fc3dd = function() {
2929
+ module.exports.__wbg_sendwalletupdate_a7146f389edd34d1 = function() {
2940
2930
  MsgHandler.send_wallet_update();
2941
2931
  };
2942
2932
 
2943
- module.exports.__wbg_sendnewversionalert_6352ce612552e34f = function(arg0, arg1, arg2) {
2933
+ module.exports.__wbg_sendnewversionalert_adab699c8e2201d3 = function(arg0, arg1, arg2) {
2944
2934
  let deferred0_0;
2945
2935
  let deferred0_1;
2946
2936
  try {
@@ -2952,15 +2942,15 @@ module.exports.__wbg_sendnewversionalert_6352ce612552e34f = function(arg0, arg1,
2952
2942
  }
2953
2943
  };
2954
2944
 
2955
- module.exports.__wbg_sendblockfetchstatusevent_c3fac19845f73f2d = function(arg0) {
2945
+ module.exports.__wbg_sendblockfetchstatusevent_8bb0e111963c6dee = function(arg0) {
2956
2946
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2957
2947
  };
2958
2948
 
2959
- module.exports.__wbg_sendnewchaindetectedevent_1ae7c31138b2d482 = function() {
2949
+ module.exports.__wbg_sendnewchaindetectedevent_a859f945b1e2a8d8 = function() {
2960
2950
  MsgHandler.send_new_chain_detected_event();
2961
2951
  };
2962
2952
 
2963
- module.exports.__wbg_fetchblockfrompeer_3cbbc387243e2582 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2953
+ module.exports.__wbg_fetchblockfrompeer_e1b60bd96ef7212c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2964
2954
  let deferred0_0;
2965
2955
  let deferred0_1;
2966
2956
  try {
@@ -2973,7 +2963,7 @@ module.exports.__wbg_fetchblockfrompeer_3cbbc387243e2582 = function() { return h
2973
2963
  }
2974
2964
  }, arguments) };
2975
2965
 
2976
- module.exports.__wbg_ensuredirectoryexists_45bb4c871cc81be6 = function() { return handleError(function (arg0, arg1) {
2966
+ module.exports.__wbg_ensuredirectoryexists_1025c9af63f0ee64 = function() { return handleError(function (arg0, arg1) {
2977
2967
  let deferred0_0;
2978
2968
  let deferred0_1;
2979
2969
  try {
@@ -2985,16 +2975,27 @@ module.exports.__wbg_ensuredirectoryexists_45bb4c871cc81be6 = function() { retur
2985
2975
  }
2986
2976
  }, arguments) };
2987
2977
 
2988
- module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2989
- const ret = WasmPeerService.__wrap(arg0);
2990
- return addHeapObject(ret);
2991
- };
2992
-
2993
2978
  module.exports.__wbindgen_error_new = function(arg0, arg1) {
2994
2979
  const ret = new Error(getStringFromWasm0(arg0, arg1));
2995
2980
  return addHeapObject(ret);
2996
2981
  };
2997
2982
 
2983
+ module.exports.__wbindgen_is_object = function(arg0) {
2984
+ const val = getObject(arg0);
2985
+ const ret = typeof(val) === 'object' && val !== null;
2986
+ return ret;
2987
+ };
2988
+
2989
+ module.exports.__wbindgen_is_undefined = function(arg0) {
2990
+ const ret = getObject(arg0) === undefined;
2991
+ return ret;
2992
+ };
2993
+
2994
+ module.exports.__wbindgen_in = function(arg0, arg1) {
2995
+ const ret = getObject(arg0) in getObject(arg1);
2996
+ return ret;
2997
+ };
2998
+
2998
2999
  module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2999
3000
  const ret = getObject(arg0) == getObject(arg1);
3000
3001
  return ret;
@@ -3018,6 +3019,16 @@ module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
3018
3019
  return addHeapObject(ret);
3019
3020
  };
3020
3021
 
3022
+ module.exports.__wbindgen_cb_drop = function(arg0) {
3023
+ const obj = takeObject(arg0).original;
3024
+ if (obj.cnt-- == 1) {
3025
+ obj.a = 0;
3026
+ return true;
3027
+ }
3028
+ const ret = false;
3029
+ return ret;
3030
+ };
3031
+
3021
3032
  module.exports.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
3022
3033
  queueMicrotask(getObject(arg0));
3023
3034
  };
@@ -3032,16 +3043,6 @@ module.exports.__wbindgen_is_function = function(arg0) {
3032
3043
  return ret;
3033
3044
  };
3034
3045
 
3035
- module.exports.__wbindgen_cb_drop = function(arg0) {
3036
- const obj = takeObject(arg0).original;
3037
- if (obj.cnt-- == 1) {
3038
- obj.a = 0;
3039
- return true;
3040
- }
3041
- const ret = false;
3042
- return ret;
3043
- };
3044
-
3045
3046
  module.exports.__wbg_new_abda76e883ba8a5f = function() {
3046
3047
  const ret = new Error();
3047
3048
  return addHeapObject(ret);
@@ -3297,7 +3298,7 @@ module.exports.__wbg_new_81740750da40724f = function(arg0, arg1) {
3297
3298
  const a = state0.a;
3298
3299
  state0.a = 0;
3299
3300
  try {
3300
- return __wbg_adapter_410(a, state0.b, arg0, arg1);
3301
+ return __wbg_adapter_454(a, state0.b, arg0, arg1);
3301
3302
  } finally {
3302
3303
  state0.a = a;
3303
3304
  }
@@ -3371,8 +3372,8 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
3371
3372
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3372
3373
  };
3373
3374
 
3374
- module.exports.__wbindgen_closure_wrapper1559 = function(arg0, arg1, arg2) {
3375
- const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
3375
+ module.exports.__wbindgen_closure_wrapper1615 = function(arg0, arg1, arg2) {
3376
+ const ret = makeMutClosure(arg0, arg1, 600, __wbg_adapter_38);
3376
3377
  return addHeapObject(ret);
3377
3378
  };
3378
3379