saito-wasm 0.2.163 → 0.2.165

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-e8d94f6fc48cc1ba/js/msg_handler.js`);
4
+ const { MsgHandler } = require(String.raw`./snippets/saito-wasm-9c691657239d0ce9/js/msg_handler.js`);
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
6
 
7
7
  const heap = new Array(128).fill(undefined);
@@ -243,35 +243,61 @@ function addBorrowedObject(obj) {
243
243
  return stack_pointer;
244
244
  }
245
245
  /**
246
- * @param {bigint} peer_index
247
- * @returns {Promise<void>}
246
+ * @returns {Promise<string>}
248
247
  */
249
- module.exports.remove_stun_peer = function(peer_index) {
250
- const ret = wasm.remove_stun_peer(peer_index);
248
+ module.exports.get_latest_block_hash = function() {
249
+ const ret = wasm.get_latest_block_hash();
251
250
  return takeObject(ret);
252
251
  };
253
252
 
254
253
  /**
255
- * @param {bigint} amt
256
- * @param {string} slip1_utxo_key
257
- * @param {string} slip2_utxo_key
258
- * @param {string} slip3_utxo_key
259
- * @param {string} recipient_public_key
254
+ * @returns {Promise<WasmWallet>}
255
+ */
256
+ module.exports.get_wallet = function() {
257
+ const ret = wasm.get_wallet();
258
+ return takeObject(ret);
259
+ };
260
+
261
+ /**
262
+ * @param {string} nft_id_hex
260
263
  * @param {Uint8Array} tx_msg
261
264
  * @returns {Promise<WasmTransaction>}
262
265
  */
263
- module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
264
- 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));
266
+ module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
267
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
268
+ const len0 = WASM_VECTOR_LEN;
269
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
265
270
  return takeObject(ret);
266
271
  };
267
272
 
268
273
  /**
269
- * @param {bigint} peer_index
270
- * @param {string} ip
271
- * @returns {Promise<void>}
274
+ * @param {bigint} num
275
+ * @param {bigint} deposit
276
+ * @param {Uint8Array} tx_msg
277
+ * @param {bigint} fee
278
+ * @param {string} recipient_public_key
279
+ * @param {string} nft_type
280
+ * @returns {Promise<WasmTransaction>}
272
281
  */
273
- module.exports.process_new_peer = function(peer_index, ip) {
274
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
282
+ module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
283
+ const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
284
+ return takeObject(ret);
285
+ };
286
+
287
+ /**
288
+ * @param {string} key
289
+ * @returns {boolean}
290
+ */
291
+ module.exports.is_valid_public_key = function(key) {
292
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
293
+ return ret !== 0;
294
+ };
295
+
296
+ /**
297
+ * @returns {Promise<string>}
298
+ */
299
+ module.exports.get_congestion_stats = function() {
300
+ const ret = wasm.get_congestion_stats();
275
301
  return takeObject(ret);
276
302
  };
277
303
 
@@ -288,133 +314,149 @@ module.exports.create_transaction_with_multiple_payments = function(public_keys,
288
314
  };
289
315
 
290
316
  /**
291
- * @param {string} config_json
292
- * @param {string} private_key
293
- * @param {number} log_level_num
294
- * @param {bigint} hasten_multiplier
295
- * @param {boolean} delete_old_blocks
317
+ * @returns {Promise<void>}
318
+ */
319
+ module.exports.start_from_received_ghost_chain = function() {
320
+ const ret = wasm.start_from_received_ghost_chain();
321
+ return takeObject(ret);
322
+ };
323
+
324
+ /**
325
+ * @returns {Promise<WasmBlockchain>}
326
+ */
327
+ module.exports.get_blockchain = function() {
328
+ const ret = wasm.get_blockchain();
329
+ return takeObject(ret);
330
+ };
331
+
332
+ /**
333
+ * @param {Array<any>} keys
334
+ * @returns {Promise<WasmBalanceSnapshot>}
335
+ */
336
+ module.exports.get_balance_snapshot = function(keys) {
337
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
338
+ return takeObject(ret);
339
+ };
340
+
341
+ /**
296
342
  * @returns {Promise<any>}
297
343
  */
298
- module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
299
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
344
+ module.exports.get_confirmations = function() {
345
+ const ret = wasm.get_confirmations();
300
346
  return takeObject(ret);
301
347
  };
302
348
 
303
349
  /**
304
- * @returns {Promise<void>}
350
+ * @returns {Promise<Array<any>>}
305
351
  */
306
- module.exports.start_from_received_ghost_chain = function() {
307
- const ret = wasm.start_from_received_ghost_chain();
352
+ module.exports.get_peers = function() {
353
+ const ret = wasm.get_peers();
308
354
  return takeObject(ret);
309
355
  };
310
356
 
311
357
  /**
312
- * @param {Uint8Array} hash
313
- * @param {bigint} block_id
314
358
  * @param {bigint} peer_index
359
+ * @param {string} ip
315
360
  * @returns {Promise<void>}
316
361
  */
317
- module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
318
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
362
+ module.exports.process_new_peer = function(peer_index, ip) {
363
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
319
364
  return takeObject(ret);
320
365
  };
321
366
 
322
367
  /**
323
- * @param {string} public_key
324
- * @param {bigint} amount
325
- * @param {bigint} fee
326
- * @param {boolean} force_merge
327
- * @returns {Promise<WasmTransaction>}
368
+ * @param {Uint8Array} buffer
369
+ * @returns {string}
328
370
  */
329
- module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
330
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
371
+ module.exports.hash = function(buffer) {
372
+ const ret = wasm.hash(addHeapObject(buffer));
331
373
  return takeObject(ret);
332
374
  };
333
375
 
334
376
  /**
335
377
  * @param {Uint8Array} buffer
336
- * @param {number} msg_index
378
+ * @param {Uint8Array} hash
379
+ * @param {bigint} block_id
337
380
  * @param {bigint} peer_index
338
381
  * @returns {Promise<void>}
339
382
  */
340
- module.exports.send_api_success = function(buffer, msg_index, peer_index) {
341
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
383
+ module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
384
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
342
385
  return takeObject(ret);
343
386
  };
344
387
 
345
388
  /**
346
- * @param {bigint} threshold
389
+ * @param {bigint} peer_index
347
390
  * @returns {Promise<void>}
348
391
  */
349
- module.exports.write_issuance_file = function(threshold) {
350
- const ret = wasm.write_issuance_file(threshold);
392
+ module.exports.process_peer_disconnection = function(peer_index) {
393
+ const ret = wasm.process_peer_disconnection(peer_index);
351
394
  return takeObject(ret);
352
395
  };
353
396
 
354
397
  /**
355
- * @returns {Promise<Array<any>>}
398
+ * @param {bigint} peer_index
399
+ * @returns {Promise<WasmPeer | undefined>}
356
400
  */
357
- module.exports.get_peers = function() {
358
- const ret = wasm.get_peers();
401
+ module.exports.get_peer = function(peer_index) {
402
+ const ret = wasm.get_peer(peer_index);
359
403
  return takeObject(ret);
360
404
  };
361
405
 
362
406
  /**
363
- * @param {bigint} num
364
- * @param {bigint} deposit
365
- * @param {Uint8Array} tx_msg
366
- * @param {bigint} fee
367
- * @param {string} recipient_public_key
368
- * @param {string} nft_type
369
- * @returns {Promise<WasmTransaction>}
407
+ * @param {Uint8Array} buffer
408
+ * @param {number} msg_index
409
+ * @param {bigint} peer_index
410
+ * @returns {Promise<void>}
370
411
  */
371
- module.exports.create_bound_transaction = function(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
372
- const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
412
+ module.exports.send_api_error = function(buffer, msg_index, peer_index) {
413
+ const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
373
414
  return takeObject(ret);
374
415
  };
375
416
 
376
417
  /**
377
- * @param {WasmBalanceSnapshot} snapshot
378
418
  * @returns {Promise<void>}
379
419
  */
380
- module.exports.update_from_balance_snapshot = function(snapshot) {
381
- _assertClass(snapshot, WasmBalanceSnapshot);
382
- var ptr0 = snapshot.__destroy_into_raw();
383
- const ret = wasm.update_from_balance_snapshot(ptr0);
420
+ module.exports.disable_producing_blocks_by_timer = function() {
421
+ const ret = wasm.disable_producing_blocks_by_timer();
384
422
  return takeObject(ret);
385
423
  };
386
424
 
387
425
  /**
388
- * @param {bigint} peer_index
426
+ * @param {bigint} duration_in_ms
389
427
  * @returns {Promise<void>}
390
428
  */
391
- module.exports.process_peer_disconnection = function(peer_index) {
392
- const ret = wasm.process_peer_disconnection(peer_index);
429
+ module.exports.process_timer_event = function(duration_in_ms) {
430
+ const ret = wasm.process_timer_event(duration_in_ms);
393
431
  return takeObject(ret);
394
432
  };
395
433
 
396
434
  /**
397
- * @returns {Promise<any>}
435
+ * @param {string} block_hash
436
+ * @returns {Promise<WasmBlock>}
398
437
  */
399
- module.exports.get_confirmations = function() {
400
- const ret = wasm.get_confirmations();
438
+ module.exports.get_block = function(block_hash) {
439
+ const ret = wasm.get_block(addHeapObject(block_hash));
401
440
  return takeObject(ret);
402
441
  };
403
442
 
404
443
  /**
405
- * @param {Uint8Array} buffer
406
- * @returns {string}
444
+ * @param {bigint} threshold
445
+ * @returns {Promise<void>}
407
446
  */
408
- module.exports.hash = function(buffer) {
409
- const ret = wasm.hash(addHeapObject(buffer));
447
+ module.exports.write_issuance_file = function(threshold) {
448
+ const ret = wasm.write_issuance_file(threshold);
410
449
  return takeObject(ret);
411
450
  };
412
451
 
413
452
  /**
414
- * @returns {Promise<bigint>}
453
+ * @param {Uint8Array} buffer
454
+ * @param {number} msg_index
455
+ * @param {bigint} peer_index
456
+ * @returns {Promise<void>}
415
457
  */
416
- module.exports.get_next_peer_index = function() {
417
- const ret = wasm.get_next_peer_index();
458
+ module.exports.send_api_call = function(buffer, msg_index, peer_index) {
459
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
418
460
  return takeObject(ret);
419
461
  };
420
462
 
@@ -427,42 +469,42 @@ module.exports.get_peer_stats = function() {
427
469
  };
428
470
 
429
471
  /**
430
- * @param {string} key
431
- * @returns {boolean}
472
+ * @returns {Promise<Array<any>>}
432
473
  */
433
- module.exports.is_valid_public_key = function(key) {
434
- const ret = wasm.is_valid_public_key(addHeapObject(key));
435
- return ret !== 0;
474
+ module.exports.get_mempool_txs = function() {
475
+ const ret = wasm.get_mempool_txs();
476
+ return takeObject(ret);
436
477
  };
437
478
 
438
479
  /**
439
- * @param {string} nft_id_hex
440
- * @param {Uint8Array} tx_msg
480
+ * @param {string} public_key
481
+ * @param {bigint} amount
482
+ * @param {bigint} fee
483
+ * @param {boolean} force_merge
441
484
  * @returns {Promise<WasmTransaction>}
442
485
  */
443
- module.exports.create_merge_bound_transaction = function(nft_id_hex, tx_msg) {
444
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
445
- const len0 = WASM_VECTOR_LEN;
446
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
486
+ module.exports.create_transaction = function(public_key, amount, fee, force_merge) {
487
+ const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
447
488
  return takeObject(ret);
448
489
  };
449
490
 
450
491
  /**
451
492
  * @returns {Promise<boolean>}
452
493
  */
453
- module.exports.produce_block_with_gt = function() {
454
- const ret = wasm.produce_block_with_gt();
494
+ module.exports.produce_block_without_gt = function() {
495
+ const ret = wasm.produce_block_without_gt();
455
496
  return takeObject(ret);
456
497
  };
457
498
 
458
499
  /**
500
+ * @param {Uint8Array} buffer
459
501
  * @param {string} private_key
460
502
  * @returns {string}
461
503
  */
462
- module.exports.generate_public_key = function(private_key) {
504
+ module.exports.sign_buffer = function(buffer, private_key) {
463
505
  try {
464
506
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
465
- wasm.generate_public_key(retptr, addHeapObject(private_key));
507
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
466
508
  var r0 = getInt32Memory0()[retptr / 4 + 0];
467
509
  var r1 = getInt32Memory0()[retptr / 4 + 1];
468
510
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -476,68 +518,38 @@ module.exports.generate_public_key = function(private_key) {
476
518
  };
477
519
 
478
520
  /**
479
- * @returns {Promise<WasmBlockchain>}
521
+ * @returns {string}
480
522
  */
481
- module.exports.get_blockchain = function() {
482
- const ret = wasm.get_blockchain();
523
+ module.exports.generate_private_key = function() {
524
+ const ret = wasm.generate_private_key();
483
525
  return takeObject(ret);
484
526
  };
485
527
 
486
528
  /**
529
+ * @param {Uint8Array} hash
530
+ * @param {bigint} block_id
487
531
  * @param {bigint} peer_index
488
- * @param {string} public_key
489
532
  * @returns {Promise<void>}
490
533
  */
491
- module.exports.process_stun_peer = function(peer_index, public_key) {
492
- const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
493
- return takeObject(ret);
494
- };
495
-
496
- /**
497
- * @param {Uint8Array} buffer
498
- * @param {string} signature
499
- * @param {string} public_key
500
- * @returns {boolean}
501
- */
502
- module.exports.verify_signature = function(buffer, signature, public_key) {
503
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
504
- return ret !== 0;
505
- };
506
-
507
- /**
508
- * @returns {Promise<string>}
509
- */
510
- module.exports.get_congestion_stats = function() {
511
- const ret = wasm.get_congestion_stats();
512
- return takeObject(ret);
513
- };
514
-
515
- /**
516
- * @returns {Promise<Array<any>>}
517
- */
518
- module.exports.get_nft_list = function() {
519
- const ret = wasm.get_nft_list();
534
+ module.exports.process_failed_block_fetch = function(hash, block_id, peer_index) {
535
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
520
536
  return takeObject(ret);
521
537
  };
522
538
 
523
539
  /**
524
- * @param {Uint8Array} buffer
525
- * @param {number} msg_index
526
540
  * @param {bigint} peer_index
527
541
  * @returns {Promise<void>}
528
542
  */
529
- module.exports.send_api_call = function(buffer, msg_index, peer_index) {
530
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
543
+ module.exports.remove_stun_peer = function(peer_index) {
544
+ const ret = wasm.remove_stun_peer(peer_index);
531
545
  return takeObject(ret);
532
546
  };
533
547
 
534
548
  /**
535
- * @param {WasmTransaction} tx
536
- * @returns {Promise<void>}
549
+ * @returns {Promise<string>}
537
550
  */
538
- module.exports.propagate_transaction = function(tx) {
539
- _assertClass(tx, WasmTransaction);
540
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
551
+ module.exports.get_stats = function() {
552
+ const ret = wasm.get_stats();
541
553
  return takeObject(ret);
542
554
  };
543
555
 
@@ -550,112 +562,133 @@ module.exports.get_account_slips = function(public_key) {
550
562
  return takeObject(ret);
551
563
  };
552
564
 
553
- /**
554
- * @returns {Promise<boolean>}
555
- */
556
- module.exports.produce_block_without_gt = function() {
557
- const ret = wasm.produce_block_without_gt();
558
- return takeObject(ret);
559
- };
560
-
561
565
  /**
562
566
  * @param {Uint8Array} buffer
563
567
  * @param {number} msg_index
564
568
  * @param {bigint} peer_index
565
569
  * @returns {Promise<void>}
566
570
  */
567
- module.exports.send_api_error = function(buffer, msg_index, peer_index) {
568
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
571
+ module.exports.send_api_success = function(buffer, msg_index, peer_index) {
572
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
569
573
  return takeObject(ret);
570
574
  };
571
575
 
572
576
  /**
573
- * @param {bigint} current_time
574
- * @returns {Promise<void>}
577
+ * @param {string} config_json
578
+ * @param {string} private_key
579
+ * @param {number} log_level_num
580
+ * @param {bigint} hasten_multiplier
581
+ * @param {boolean} delete_old_blocks
582
+ * @returns {Promise<any>}
575
583
  */
576
- module.exports.process_stat_interval = function(current_time) {
577
- const ret = wasm.process_stat_interval(current_time);
584
+ module.exports.initialize = function(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
585
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
578
586
  return takeObject(ret);
579
587
  };
580
588
 
581
589
  /**
582
- * @param {string} slip1_utxo_key
583
- * @param {string} slip2_utxo_key
584
- * @param {string} slip3_utxo_key
585
- * @param {number} left_count
586
- * @param {number} right_count
587
- * @param {Uint8Array} tx_msg
588
- * @returns {Promise<WasmTransaction>}
590
+ * @param {string} private_key
591
+ * @returns {string}
589
592
  */
590
- module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
591
- 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));
592
- return takeObject(ret);
593
+ module.exports.generate_public_key = function(private_key) {
594
+ try {
595
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
596
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
597
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
598
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
599
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
600
+ if (r2) {
601
+ throw takeObject(r1);
602
+ }
603
+ return takeObject(r0);
604
+ } finally {
605
+ wasm.__wbindgen_add_to_stack_pointer(16);
606
+ }
593
607
  };
594
608
 
595
609
  /**
596
- * @returns {Promise<string>}
610
+ * @returns {Promise<bigint>}
597
611
  */
598
- module.exports.get_latest_block_hash = function() {
599
- const ret = wasm.get_latest_block_hash();
612
+ module.exports.get_next_peer_index = function() {
613
+ const ret = wasm.get_next_peer_index();
600
614
  return takeObject(ret);
601
615
  };
602
616
 
603
617
  /**
604
- * @returns {Promise<string>}
618
+ * @param {WasmTransaction} tx
619
+ * @returns {Promise<void>}
605
620
  */
606
- module.exports.get_stats = function() {
607
- const ret = wasm.get_stats();
621
+ module.exports.propagate_transaction = function(tx) {
622
+ _assertClass(tx, WasmTransaction);
623
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
608
624
  return takeObject(ret);
609
625
  };
610
626
 
611
627
  /**
612
- * @param {Array<any>} keys
613
- * @returns {Promise<WasmBalanceSnapshot>}
628
+ * @param {Uint8Array} buffer
629
+ * @param {string} signature
630
+ * @param {string} public_key
631
+ * @returns {boolean}
614
632
  */
615
- module.exports.get_balance_snapshot = function(keys) {
616
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
617
- return takeObject(ret);
633
+ module.exports.verify_signature = function(buffer, signature, public_key) {
634
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
635
+ return ret !== 0;
618
636
  };
619
637
 
620
638
  /**
639
+ * @param {number} major
640
+ * @param {number} minor
641
+ * @param {number} patch
621
642
  * @returns {Promise<void>}
622
643
  */
623
- module.exports.disable_producing_blocks_by_timer = function() {
624
- const ret = wasm.disable_producing_blocks_by_timer();
644
+ module.exports.set_wallet_version = function(major, minor, patch) {
645
+ const ret = wasm.set_wallet_version(major, minor, patch);
625
646
  return takeObject(ret);
626
647
  };
627
648
 
628
649
  /**
629
- * @returns {string}
650
+ * @param {bigint} peer_index
651
+ * @param {string} public_key
652
+ * @returns {Promise<void>}
630
653
  */
631
- module.exports.generate_private_key = function() {
632
- const ret = wasm.generate_private_key();
654
+ module.exports.process_stun_peer = function(peer_index, public_key) {
655
+ const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
633
656
  return takeObject(ret);
634
657
  };
635
658
 
636
659
  /**
637
- * @param {string} block_hash
638
- * @returns {Promise<WasmBlock>}
660
+ * @returns {Promise<boolean>}
639
661
  */
640
- module.exports.get_block = function(block_hash) {
641
- const ret = wasm.get_block(addHeapObject(block_hash));
662
+ module.exports.produce_block_with_gt = function() {
663
+ const ret = wasm.produce_block_with_gt();
642
664
  return takeObject(ret);
643
665
  };
644
666
 
645
667
  /**
646
- * @param {bigint} duration_in_ms
647
- * @returns {Promise<void>}
668
+ * @param {bigint} amt
669
+ * @param {string} slip1_utxo_key
670
+ * @param {string} slip2_utxo_key
671
+ * @param {string} slip3_utxo_key
672
+ * @param {string} recipient_public_key
673
+ * @param {Uint8Array} tx_msg
674
+ * @returns {Promise<WasmTransaction>}
648
675
  */
649
- module.exports.process_timer_event = function(duration_in_ms) {
650
- const ret = wasm.process_timer_event(duration_in_ms);
676
+ module.exports.create_send_bound_transaction = function(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
677
+ 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));
651
678
  return takeObject(ret);
652
679
  };
653
680
 
654
681
  /**
655
- * @returns {Promise<WasmWallet>}
682
+ * @param {string} slip1_utxo_key
683
+ * @param {string} slip2_utxo_key
684
+ * @param {string} slip3_utxo_key
685
+ * @param {number} left_count
686
+ * @param {number} right_count
687
+ * @param {Uint8Array} tx_msg
688
+ * @returns {Promise<WasmTransaction>}
656
689
  */
657
- module.exports.get_wallet = function() {
658
- const ret = wasm.get_wallet();
690
+ module.exports.create_split_bound_transaction = function(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
691
+ 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));
659
692
  return takeObject(ret);
660
693
  };
661
694
 
@@ -672,61 +705,28 @@ module.exports.process_msg_buffer_from_peer = function(buffer, peer_index) {
672
705
  /**
673
706
  * @returns {Promise<Array<any>>}
674
707
  */
675
- module.exports.get_mempool_txs = function() {
676
- const ret = wasm.get_mempool_txs();
708
+ module.exports.get_nft_list = function() {
709
+ const ret = wasm.get_nft_list();
677
710
  return takeObject(ret);
678
711
  };
679
712
 
680
713
  /**
681
- * @param {number} major
682
- * @param {number} minor
683
- * @param {number} patch
714
+ * @param {WasmBalanceSnapshot} snapshot
684
715
  * @returns {Promise<void>}
685
716
  */
686
- module.exports.set_wallet_version = function(major, minor, patch) {
687
- const ret = wasm.set_wallet_version(major, minor, patch);
688
- return takeObject(ret);
689
- };
690
-
691
- /**
692
- * @param {Uint8Array} buffer
693
- * @param {string} private_key
694
- * @returns {string}
695
- */
696
- module.exports.sign_buffer = function(buffer, private_key) {
697
- try {
698
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
699
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
700
- var r0 = getInt32Memory0()[retptr / 4 + 0];
701
- var r1 = getInt32Memory0()[retptr / 4 + 1];
702
- var r2 = getInt32Memory0()[retptr / 4 + 2];
703
- if (r2) {
704
- throw takeObject(r1);
705
- }
706
- return takeObject(r0);
707
- } finally {
708
- wasm.__wbindgen_add_to_stack_pointer(16);
709
- }
710
- };
711
-
712
- /**
713
- * @param {bigint} peer_index
714
- * @returns {Promise<WasmPeer | undefined>}
715
- */
716
- module.exports.get_peer = function(peer_index) {
717
- const ret = wasm.get_peer(peer_index);
717
+ module.exports.update_from_balance_snapshot = function(snapshot) {
718
+ _assertClass(snapshot, WasmBalanceSnapshot);
719
+ var ptr0 = snapshot.__destroy_into_raw();
720
+ const ret = wasm.update_from_balance_snapshot(ptr0);
718
721
  return takeObject(ret);
719
722
  };
720
723
 
721
724
  /**
722
- * @param {Uint8Array} buffer
723
- * @param {Uint8Array} hash
724
- * @param {bigint} block_id
725
- * @param {bigint} peer_index
725
+ * @param {bigint} current_time
726
726
  * @returns {Promise<void>}
727
727
  */
728
- module.exports.process_fetched_block = function(buffer, hash, block_id, peer_index) {
729
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
728
+ module.exports.process_stat_interval = function(current_time) {
729
+ const ret = wasm.process_stat_interval(current_time);
730
730
  return takeObject(ret);
731
731
  };
732
732
 
@@ -2650,13 +2650,18 @@ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
2650
2650
  return addHeapObject(ret);
2651
2651
  };
2652
2652
 
2653
- module.exports.__wbg_wasmwallet_new = function(arg0) {
2654
- const ret = WasmWallet.__wrap(arg0);
2653
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
2654
+ const ret = getStringFromWasm0(arg0, arg1);
2655
2655
  return addHeapObject(ret);
2656
2656
  };
2657
2657
 
2658
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
2659
- const ret = getStringFromWasm0(arg0, arg1);
2658
+ module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2659
+ const ret = WasmWalletSlip.__wrap(arg0);
2660
+ return addHeapObject(ret);
2661
+ };
2662
+
2663
+ module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2664
+ const ret = WasmBalanceSnapshot.__wrap(arg0);
2660
2665
  return addHeapObject(ret);
2661
2666
  };
2662
2667
 
@@ -2674,13 +2679,8 @@ module.exports.__wbg_wasmtransaction_new = function(arg0) {
2674
2679
  return addHeapObject(ret);
2675
2680
  };
2676
2681
 
2677
- module.exports.__wbg_wasmslip_new = function(arg0) {
2678
- const ret = WasmSlip.__wrap(arg0);
2679
- return addHeapObject(ret);
2680
- };
2681
-
2682
- module.exports.__wbg_wasmwalletslip_new = function(arg0) {
2683
- const ret = WasmWalletSlip.__wrap(arg0);
2682
+ module.exports.__wbg_wasmblockchain_new = function(arg0) {
2683
+ const ret = WasmBlockchain.__wrap(arg0);
2684
2684
  return addHeapObject(ret);
2685
2685
  };
2686
2686
 
@@ -2689,8 +2689,8 @@ module.exports.__wbg_wasmnft_new = function(arg0) {
2689
2689
  return addHeapObject(ret);
2690
2690
  };
2691
2691
 
2692
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
2693
- const ret = getObject(arg0);
2692
+ module.exports.__wbg_wasmpeer_new = function(arg0) {
2693
+ const ret = WasmPeer.__wrap(arg0);
2694
2694
  return addHeapObject(ret);
2695
2695
  };
2696
2696
 
@@ -2699,18 +2699,18 @@ module.exports.__wbg_wasmblock_new = function(arg0) {
2699
2699
  return addHeapObject(ret);
2700
2700
  };
2701
2701
 
2702
- module.exports.__wbg_wasmpeer_new = function(arg0) {
2703
- const ret = WasmPeer.__wrap(arg0);
2702
+ module.exports.__wbg_wasmwallet_new = function(arg0) {
2703
+ const ret = WasmWallet.__wrap(arg0);
2704
2704
  return addHeapObject(ret);
2705
2705
  };
2706
2706
 
2707
- module.exports.__wbg_wasmbalancesnapshot_new = function(arg0) {
2708
- const ret = WasmBalanceSnapshot.__wrap(arg0);
2707
+ module.exports.__wbindgen_object_clone_ref = function(arg0) {
2708
+ const ret = getObject(arg0);
2709
2709
  return addHeapObject(ret);
2710
2710
  };
2711
2711
 
2712
- module.exports.__wbg_wasmblockchain_new = function(arg0) {
2713
- const ret = WasmBlockchain.__wrap(arg0);
2712
+ module.exports.__wbg_wasmslip_new = function(arg0) {
2713
+ const ret = WasmSlip.__wrap(arg0);
2714
2714
  return addHeapObject(ret);
2715
2715
  };
2716
2716
 
@@ -2745,7 +2745,7 @@ module.exports.__wbg_wasmpeerservice_new = function(arg0) {
2745
2745
  return addHeapObject(ret);
2746
2746
  };
2747
2747
 
2748
- module.exports.__wbg_flushdata_43f1541fff3d78bd = function(arg0, arg1) {
2748
+ module.exports.__wbg_flushdata_02f5939a34c7adf1 = function(arg0, arg1) {
2749
2749
  let deferred0_0;
2750
2750
  let deferred0_1;
2751
2751
  try {
@@ -2757,7 +2757,7 @@ module.exports.__wbg_flushdata_43f1541fff3d78bd = function(arg0, arg1) {
2757
2757
  }
2758
2758
  };
2759
2759
 
2760
- module.exports.__wbg_readvalue_0a9c92750448f1d1 = function() { return handleError(function (arg0, arg1) {
2760
+ module.exports.__wbg_readvalue_6f58b8d737c8947f = function() { return handleError(function (arg0, arg1) {
2761
2761
  let deferred0_0;
2762
2762
  let deferred0_1;
2763
2763
  try {
@@ -2770,15 +2770,15 @@ module.exports.__wbg_readvalue_0a9c92750448f1d1 = function() { return handleErro
2770
2770
  }
2771
2771
  }, arguments) };
2772
2772
 
2773
- module.exports.__wbg_loadwallet_5cd451ac436ab682 = function() {
2773
+ module.exports.__wbg_loadwallet_4fa9260e0e5b29ad = function() {
2774
2774
  MsgHandler.load_wallet();
2775
2775
  };
2776
2776
 
2777
- module.exports.__wbg_savewallet_6826e875e5dd251b = function() {
2777
+ module.exports.__wbg_savewallet_db43f92c74d98db4 = function() {
2778
2778
  MsgHandler.save_wallet();
2779
2779
  };
2780
2780
 
2781
- module.exports.__wbg_writevalue_cf07df01ae9d9d9b = function(arg0, arg1, arg2) {
2781
+ module.exports.__wbg_writevalue_64abf78ec7b7a0a7 = function(arg0, arg1, arg2) {
2782
2782
  let deferred0_0;
2783
2783
  let deferred0_1;
2784
2784
  try {
@@ -2790,7 +2790,7 @@ module.exports.__wbg_writevalue_cf07df01ae9d9d9b = function(arg0, arg1, arg2) {
2790
2790
  }
2791
2791
  };
2792
2792
 
2793
- module.exports.__wbg_appendvalue_3d3f4ddc7cd7f668 = function(arg0, arg1, arg2) {
2793
+ module.exports.__wbg_appendvalue_dfb9143a42c8a96f = function(arg0, arg1, arg2) {
2794
2794
  let deferred0_0;
2795
2795
  let deferred0_1;
2796
2796
  try {
@@ -2802,7 +2802,7 @@ module.exports.__wbg_appendvalue_3d3f4ddc7cd7f668 = function(arg0, arg1, arg2) {
2802
2802
  }
2803
2803
  };
2804
2804
 
2805
- module.exports.__wbg_removevalue_f5900816b911805e = function() { return handleError(function (arg0, arg1) {
2805
+ module.exports.__wbg_removevalue_54c2c52edfb40121 = function() { return handleError(function (arg0, arg1) {
2806
2806
  let deferred0_0;
2807
2807
  let deferred0_1;
2808
2808
  try {
@@ -2815,11 +2815,11 @@ module.exports.__wbg_removevalue_f5900816b911805e = function() { return handleEr
2815
2815
  }
2816
2816
  }, arguments) };
2817
2817
 
2818
- module.exports.__wbg_sendmessage_6d75e3e0b6cbcdea = function(arg0, arg1) {
2818
+ module.exports.__wbg_sendmessage_dd1c456fc24d6ae2 = function(arg0, arg1) {
2819
2819
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2820
2820
  };
2821
2821
 
2822
- module.exports.__wbg_connecttopeer_0dbfd6477b38b460 = function() { return handleError(function (arg0, arg1, arg2) {
2822
+ module.exports.__wbg_connecttopeer_2e3115f373923a34 = function() { return handleError(function (arg0, arg1, arg2) {
2823
2823
  let deferred0_0;
2824
2824
  let deferred0_1;
2825
2825
  try {
@@ -2832,14 +2832,14 @@ module.exports.__wbg_connecttopeer_0dbfd6477b38b460 = function() { return handle
2832
2832
  }
2833
2833
  }, arguments) };
2834
2834
 
2835
- module.exports.__wbg_getmyservices_671fa3941c07e37c = function() {
2835
+ module.exports.__wbg_getmyservices_247b7276a00aa7a1 = function() {
2836
2836
  const ret = MsgHandler.get_my_services();
2837
2837
  _assertClass(ret, WasmPeerServiceList);
2838
2838
  var ptr1 = ret.__destroy_into_raw();
2839
2839
  return ptr1;
2840
2840
  };
2841
2841
 
2842
- module.exports.__wbg_isexistingfile_9c5802df7eec1b8c = function() { return handleError(function (arg0, arg1) {
2842
+ module.exports.__wbg_isexistingfile_54560db336503ad5 = function() { return handleError(function (arg0, arg1) {
2843
2843
  let deferred0_0;
2844
2844
  let deferred0_1;
2845
2845
  try {
@@ -2852,33 +2852,33 @@ module.exports.__wbg_isexistingfile_9c5802df7eec1b8c = function() { return handl
2852
2852
  }
2853
2853
  }, arguments) };
2854
2854
 
2855
- module.exports.__wbg_processapicall_84802524f4b72626 = function(arg0, arg1, arg2) {
2855
+ module.exports.__wbg_processapicall_d409cedb7f665312 = function(arg0, arg1, arg2) {
2856
2856
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2857
2857
  };
2858
2858
 
2859
- module.exports.__wbg_processapierror_d543c65b7ba51917 = function(arg0, arg1, arg2) {
2859
+ module.exports.__wbg_processapierror_e2c1f858819cf5cf = function(arg0, arg1, arg2) {
2860
2860
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2861
2861
  };
2862
2862
 
2863
- module.exports.__wbg_processapisuccess_346f01f1e249ab95 = function(arg0, arg1, arg2) {
2863
+ module.exports.__wbg_processapisuccess_dc587307a8ec6a59 = function(arg0, arg1, arg2) {
2864
2864
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2865
2865
  };
2866
2866
 
2867
- module.exports.__wbg_sendmessagetoall_8b367c13a928c498 = function(arg0, arg1) {
2867
+ module.exports.__wbg_sendmessagetoall_5c38c389c7434159 = function(arg0, arg1) {
2868
2868
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2869
2869
  };
2870
2870
 
2871
- module.exports.__wbg_disconnectfrompeer_eb1d4acfd8e133d3 = function() { return handleError(function (arg0) {
2871
+ module.exports.__wbg_disconnectfrompeer_41e790d250243fd7 = function() { return handleError(function (arg0) {
2872
2872
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2873
2873
  return addHeapObject(ret);
2874
2874
  }, arguments) };
2875
2875
 
2876
- module.exports.__wbg_loadblockfilelist_e8a6bbf7850e77ec = function() { return handleError(function () {
2876
+ module.exports.__wbg_loadblockfilelist_5e719b9d74178df6 = function() { return handleError(function () {
2877
2877
  const ret = MsgHandler.load_block_file_list();
2878
2878
  return addHeapObject(ret);
2879
2879
  }, arguments) };
2880
2880
 
2881
- module.exports.__wbg_sendinterfaceevent_478dfe7c1d77edc1 = function(arg0, arg1, arg2, arg3, arg4) {
2881
+ module.exports.__wbg_sendinterfaceevent_890fc416d90ba971 = function(arg0, arg1, arg2, arg3, arg4) {
2882
2882
  let deferred0_0;
2883
2883
  let deferred0_1;
2884
2884
  let deferred1_0;
@@ -2895,7 +2895,7 @@ module.exports.__wbg_sendinterfaceevent_478dfe7c1d77edc1 = function(arg0, arg1,
2895
2895
  }
2896
2896
  };
2897
2897
 
2898
- module.exports.__wbg_sendblocksuccess_50f30a221c95ccb2 = function(arg0, arg1, arg2) {
2898
+ module.exports.__wbg_sendblocksuccess_294795b33a4eb2c8 = function(arg0, arg1, arg2) {
2899
2899
  let deferred0_0;
2900
2900
  let deferred0_1;
2901
2901
  try {
@@ -2907,11 +2907,11 @@ module.exports.__wbg_sendblocksuccess_50f30a221c95ccb2 = function(arg0, arg1, ar
2907
2907
  }
2908
2908
  };
2909
2909
 
2910
- module.exports.__wbg_sendwalletupdate_f56f83f3e07b49a9 = function() {
2910
+ module.exports.__wbg_sendwalletupdate_6128fb2a65955772 = function() {
2911
2911
  MsgHandler.send_wallet_update();
2912
2912
  };
2913
2913
 
2914
- module.exports.__wbg_sendnewversionalert_cf706b447638507f = function(arg0, arg1, arg2) {
2914
+ module.exports.__wbg_sendnewversionalert_90c0405e8fc96529 = function(arg0, arg1, arg2) {
2915
2915
  let deferred0_0;
2916
2916
  let deferred0_1;
2917
2917
  try {
@@ -2923,15 +2923,15 @@ module.exports.__wbg_sendnewversionalert_cf706b447638507f = function(arg0, arg1,
2923
2923
  }
2924
2924
  };
2925
2925
 
2926
- module.exports.__wbg_sendblockfetchstatusevent_34b0e8fb201fbfc5 = function(arg0) {
2926
+ module.exports.__wbg_sendblockfetchstatusevent_f8ad3e0c574a3d2f = function(arg0) {
2927
2927
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2928
2928
  };
2929
2929
 
2930
- module.exports.__wbg_sendnewchaindetectedevent_3ebfc9ce48ce2f00 = function() {
2930
+ module.exports.__wbg_sendnewchaindetectedevent_814f1cb2a0968c86 = function() {
2931
2931
  MsgHandler.send_new_chain_detected_event();
2932
2932
  };
2933
2933
 
2934
- module.exports.__wbg_fetchblockfrompeer_42bdb36ab5eb6374 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2934
+ module.exports.__wbg_fetchblockfrompeer_1ae370fdece9cb73 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2935
2935
  let deferred0_0;
2936
2936
  let deferred0_1;
2937
2937
  try {
@@ -2944,7 +2944,7 @@ module.exports.__wbg_fetchblockfrompeer_42bdb36ab5eb6374 = function() { return h
2944
2944
  }
2945
2945
  }, arguments) };
2946
2946
 
2947
- module.exports.__wbg_ensureblockdirectoryexists_2eeab9246fcb6206 = function() { return handleError(function (arg0, arg1) {
2947
+ module.exports.__wbg_ensureblockdirectoryexists_7fcab2b9dc2610fe = function() { return handleError(function (arg0, arg1) {
2948
2948
  let deferred0_0;
2949
2949
  let deferred0_1;
2950
2950
  try {
@@ -3332,7 +3332,7 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
3332
3332
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3333
3333
  };
3334
3334
 
3335
- module.exports.__wbindgen_closure_wrapper1618 = function(arg0, arg1, arg2) {
3335
+ module.exports.__wbindgen_closure_wrapper1619 = function(arg0, arg1, arg2) {
3336
3336
  const ret = makeMutClosure(arg0, arg1, 574, __wbg_adapter_38);
3337
3337
  return addHeapObject(ret);
3338
3338
  };