saito-wasm 0.2.163 → 0.2.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/web/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { MsgHandler } from './snippets/saito-wasm-e8d94f6fc48cc1ba/js/msg_handler.js';
1
+ import { MsgHandler } from './snippets/saito-wasm-21975b2e7dbeb5a0/js/msg_handler.js';
2
2
 
3
3
  let wasm;
4
4
 
@@ -241,170 +241,177 @@ function addBorrowedObject(obj) {
241
241
  return stack_pointer;
242
242
  }
243
243
  /**
244
- * @param {bigint} peer_index
245
- * @returns {Promise<void>}
244
+ * @param {string} private_key
245
+ * @returns {string}
246
246
  */
247
- export function remove_stun_peer(peer_index) {
248
- const ret = wasm.remove_stun_peer(peer_index);
249
- return takeObject(ret);
247
+ export function generate_public_key(private_key) {
248
+ try {
249
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
250
+ wasm.generate_public_key(retptr, addHeapObject(private_key));
251
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
252
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
253
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
254
+ if (r2) {
255
+ throw takeObject(r1);
256
+ }
257
+ return takeObject(r0);
258
+ } finally {
259
+ wasm.__wbindgen_add_to_stack_pointer(16);
260
+ }
250
261
  }
251
262
 
252
263
  /**
253
- * @param {bigint} amt
254
- * @param {string} slip1_utxo_key
255
- * @param {string} slip2_utxo_key
256
- * @param {string} slip3_utxo_key
257
- * @param {string} recipient_public_key
258
- * @param {Uint8Array} tx_msg
259
- * @returns {Promise<WasmTransaction>}
264
+ * @param {bigint} current_time
265
+ * @returns {Promise<void>}
260
266
  */
261
- export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
262
- 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));
267
+ export function process_stat_interval(current_time) {
268
+ const ret = wasm.process_stat_interval(current_time);
263
269
  return takeObject(ret);
264
270
  }
265
271
 
266
272
  /**
267
- * @param {bigint} peer_index
268
- * @param {string} ip
269
- * @returns {Promise<void>}
273
+ * @param {string} public_key
274
+ * @returns {Promise<Array<any>>}
270
275
  */
271
- export function process_new_peer(peer_index, ip) {
272
- const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
276
+ export function get_account_slips(public_key) {
277
+ const ret = wasm.get_account_slips(addHeapObject(public_key));
273
278
  return takeObject(ret);
274
279
  }
275
280
 
276
281
  /**
277
- * @param {Array<any>} public_keys
278
- * @param {BigUint64Array} amounts
279
- * @param {bigint} fee
280
- * @param {boolean} _force_merge
281
- * @returns {Promise<WasmTransaction>}
282
+ * @returns {Promise<string>}
282
283
  */
283
- export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
284
- const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
284
+ export function get_latest_block_hash() {
285
+ const ret = wasm.get_latest_block_hash();
285
286
  return takeObject(ret);
286
287
  }
287
288
 
288
289
  /**
289
- * @param {string} config_json
290
- * @param {string} private_key
291
- * @param {number} log_level_num
292
- * @param {bigint} hasten_multiplier
293
- * @param {boolean} delete_old_blocks
294
- * @returns {Promise<any>}
290
+ * @param {bigint} peer_index
291
+ * @returns {Promise<WasmPeer | undefined>}
295
292
  */
296
- export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
297
- const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
293
+ export function get_peer(peer_index) {
294
+ const ret = wasm.get_peer(peer_index);
298
295
  return takeObject(ret);
299
296
  }
300
297
 
301
298
  /**
302
- * @returns {Promise<void>}
299
+ * @returns {Promise<boolean>}
303
300
  */
304
- export function start_from_received_ghost_chain() {
305
- const ret = wasm.start_from_received_ghost_chain();
301
+ export function produce_block_without_gt() {
302
+ const ret = wasm.produce_block_without_gt();
306
303
  return takeObject(ret);
307
304
  }
308
305
 
309
306
  /**
310
- * @param {Uint8Array} hash
311
- * @param {bigint} block_id
307
+ * @param {Uint8Array} buffer
308
+ * @param {number} msg_index
312
309
  * @param {bigint} peer_index
313
310
  * @returns {Promise<void>}
314
311
  */
315
- export function process_failed_block_fetch(hash, block_id, peer_index) {
316
- const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
312
+ export function send_api_call(buffer, msg_index, peer_index) {
313
+ const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
317
314
  return takeObject(ret);
318
315
  }
319
316
 
320
317
  /**
318
+ * @param {bigint} peer_index
321
319
  * @param {string} public_key
322
- * @param {bigint} amount
323
- * @param {bigint} fee
324
- * @param {boolean} force_merge
325
- * @returns {Promise<WasmTransaction>}
320
+ * @returns {Promise<void>}
326
321
  */
327
- export function create_transaction(public_key, amount, fee, force_merge) {
328
- const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
322
+ export function process_stun_peer(peer_index, public_key) {
323
+ const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
329
324
  return takeObject(ret);
330
325
  }
331
326
 
332
327
  /**
333
- * @param {Uint8Array} buffer
334
- * @param {number} msg_index
328
+ * @param {Uint8Array} hash
329
+ * @param {bigint} block_id
335
330
  * @param {bigint} peer_index
336
331
  * @returns {Promise<void>}
337
332
  */
338
- export function send_api_success(buffer, msg_index, peer_index) {
339
- const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
333
+ export function process_failed_block_fetch(hash, block_id, peer_index) {
334
+ const ret = wasm.process_failed_block_fetch(addHeapObject(hash), block_id, peer_index);
340
335
  return takeObject(ret);
341
336
  }
342
337
 
343
338
  /**
344
- * @param {bigint} threshold
345
- * @returns {Promise<void>}
339
+ * @param {string} config_json
340
+ * @param {string} private_key
341
+ * @param {number} log_level_num
342
+ * @param {bigint} hasten_multiplier
343
+ * @param {boolean} delete_old_blocks
344
+ * @returns {Promise<any>}
346
345
  */
347
- export function write_issuance_file(threshold) {
348
- const ret = wasm.write_issuance_file(threshold);
346
+ export function initialize(config_json, private_key, log_level_num, hasten_multiplier, delete_old_blocks) {
347
+ const ret = wasm.initialize(addHeapObject(config_json), addHeapObject(private_key), log_level_num, hasten_multiplier, delete_old_blocks);
349
348
  return takeObject(ret);
350
349
  }
351
350
 
351
+ /**
352
+ * @param {string} key
353
+ * @returns {boolean}
354
+ */
355
+ export function is_valid_public_key(key) {
356
+ const ret = wasm.is_valid_public_key(addHeapObject(key));
357
+ return ret !== 0;
358
+ }
359
+
352
360
  /**
353
361
  * @returns {Promise<Array<any>>}
354
362
  */
355
- export function get_peers() {
356
- const ret = wasm.get_peers();
363
+ export function get_nft_list() {
364
+ const ret = wasm.get_nft_list();
357
365
  return takeObject(ret);
358
366
  }
359
367
 
360
368
  /**
361
- * @param {bigint} num
362
- * @param {bigint} deposit
369
+ * @param {string} nft_id_hex
363
370
  * @param {Uint8Array} tx_msg
364
- * @param {bigint} fee
365
- * @param {string} recipient_public_key
366
- * @param {string} nft_type
367
371
  * @returns {Promise<WasmTransaction>}
368
372
  */
369
- export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
370
- const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
373
+ export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
374
+ const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
375
+ const len0 = WASM_VECTOR_LEN;
376
+ const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
371
377
  return takeObject(ret);
372
378
  }
373
379
 
374
380
  /**
375
- * @param {WasmBalanceSnapshot} snapshot
376
- * @returns {Promise<void>}
381
+ * @returns {Promise<WasmBlockchain>}
377
382
  */
378
- export function update_from_balance_snapshot(snapshot) {
379
- _assertClass(snapshot, WasmBalanceSnapshot);
380
- var ptr0 = snapshot.__destroy_into_raw();
381
- const ret = wasm.update_from_balance_snapshot(ptr0);
383
+ export function get_blockchain() {
384
+ const ret = wasm.get_blockchain();
382
385
  return takeObject(ret);
383
386
  }
384
387
 
385
388
  /**
386
- * @param {bigint} peer_index
387
- * @returns {Promise<void>}
389
+ * @param {Array<any>} keys
390
+ * @returns {Promise<WasmBalanceSnapshot>}
388
391
  */
389
- export function process_peer_disconnection(peer_index) {
390
- const ret = wasm.process_peer_disconnection(peer_index);
392
+ export function get_balance_snapshot(keys) {
393
+ const ret = wasm.get_balance_snapshot(addHeapObject(keys));
391
394
  return takeObject(ret);
392
395
  }
393
396
 
394
397
  /**
395
- * @returns {Promise<any>}
398
+ * @param {bigint} threshold
399
+ * @returns {Promise<void>}
396
400
  */
397
- export function get_confirmations() {
398
- const ret = wasm.get_confirmations();
401
+ export function write_issuance_file(threshold) {
402
+ const ret = wasm.write_issuance_file(threshold);
399
403
  return takeObject(ret);
400
404
  }
401
405
 
402
406
  /**
403
407
  * @param {Uint8Array} buffer
404
- * @returns {string}
408
+ * @param {Uint8Array} hash
409
+ * @param {bigint} block_id
410
+ * @param {bigint} peer_index
411
+ * @returns {Promise<void>}
405
412
  */
406
- export function hash(buffer) {
407
- const ret = wasm.hash(addHeapObject(buffer));
413
+ export function process_fetched_block(buffer, hash, block_id, peer_index) {
414
+ const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
408
415
  return takeObject(ret);
409
416
  }
410
417
 
@@ -417,142 +424,143 @@ export function get_next_peer_index() {
417
424
  }
418
425
 
419
426
  /**
420
- * @returns {Promise<string>}
427
+ * @returns {Promise<Array<any>>}
421
428
  */
422
- export function get_peer_stats() {
423
- const ret = wasm.get_peer_stats();
429
+ export function get_mempool_txs() {
430
+ const ret = wasm.get_mempool_txs();
424
431
  return takeObject(ret);
425
432
  }
426
433
 
427
434
  /**
428
- * @param {string} key
429
- * @returns {boolean}
435
+ * @returns {Promise<boolean>}
430
436
  */
431
- export function is_valid_public_key(key) {
432
- const ret = wasm.is_valid_public_key(addHeapObject(key));
433
- return ret !== 0;
437
+ export function produce_block_with_gt() {
438
+ const ret = wasm.produce_block_with_gt();
439
+ return takeObject(ret);
434
440
  }
435
441
 
436
442
  /**
437
- * @param {string} nft_id_hex
438
- * @param {Uint8Array} tx_msg
439
- * @returns {Promise<WasmTransaction>}
443
+ * @returns {string}
440
444
  */
441
- export function create_merge_bound_transaction(nft_id_hex, tx_msg) {
442
- const ptr0 = passStringToWasm0(nft_id_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
443
- const len0 = WASM_VECTOR_LEN;
444
- const ret = wasm.create_merge_bound_transaction(ptr0, len0, addHeapObject(tx_msg));
445
+ export function generate_private_key() {
446
+ const ret = wasm.generate_private_key();
445
447
  return takeObject(ret);
446
448
  }
447
449
 
448
450
  /**
449
- * @returns {Promise<boolean>}
451
+ * @param {Uint8Array} buffer
452
+ * @param {number} msg_index
453
+ * @param {bigint} peer_index
454
+ * @returns {Promise<void>}
450
455
  */
451
- export function produce_block_with_gt() {
452
- const ret = wasm.produce_block_with_gt();
456
+ export function send_api_error(buffer, msg_index, peer_index) {
457
+ const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
453
458
  return takeObject(ret);
454
459
  }
455
460
 
456
461
  /**
457
- * @param {string} private_key
458
- * @returns {string}
462
+ * @param {string} slip1_utxo_key
463
+ * @param {string} slip2_utxo_key
464
+ * @param {string} slip3_utxo_key
465
+ * @param {number} left_count
466
+ * @param {number} right_count
467
+ * @param {Uint8Array} tx_msg
468
+ * @returns {Promise<WasmTransaction>}
459
469
  */
460
- export function generate_public_key(private_key) {
461
- try {
462
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
463
- wasm.generate_public_key(retptr, addHeapObject(private_key));
464
- var r0 = getInt32Memory0()[retptr / 4 + 0];
465
- var r1 = getInt32Memory0()[retptr / 4 + 1];
466
- var r2 = getInt32Memory0()[retptr / 4 + 2];
467
- if (r2) {
468
- throw takeObject(r1);
469
- }
470
- return takeObject(r0);
471
- } finally {
472
- wasm.__wbindgen_add_to_stack_pointer(16);
473
- }
470
+ export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
471
+ 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));
472
+ return takeObject(ret);
474
473
  }
475
474
 
476
475
  /**
477
- * @returns {Promise<WasmBlockchain>}
476
+ * @param {WasmBalanceSnapshot} snapshot
477
+ * @returns {Promise<void>}
478
478
  */
479
- export function get_blockchain() {
480
- const ret = wasm.get_blockchain();
479
+ export function update_from_balance_snapshot(snapshot) {
480
+ _assertClass(snapshot, WasmBalanceSnapshot);
481
+ var ptr0 = snapshot.__destroy_into_raw();
482
+ const ret = wasm.update_from_balance_snapshot(ptr0);
481
483
  return takeObject(ret);
482
484
  }
483
485
 
484
486
  /**
485
- * @param {bigint} peer_index
486
- * @param {string} public_key
487
- * @returns {Promise<void>}
487
+ * @param {bigint} amt
488
+ * @param {string} slip1_utxo_key
489
+ * @param {string} slip2_utxo_key
490
+ * @param {string} slip3_utxo_key
491
+ * @param {string} recipient_public_key
492
+ * @param {Uint8Array} tx_msg
493
+ * @returns {Promise<WasmTransaction>}
488
494
  */
489
- export function process_stun_peer(peer_index, public_key) {
490
- const ret = wasm.process_stun_peer(peer_index, addHeapObject(public_key));
495
+ export function create_send_bound_transaction(amt, slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, recipient_public_key, tx_msg) {
496
+ 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));
491
497
  return takeObject(ret);
492
498
  }
493
499
 
494
500
  /**
495
- * @param {Uint8Array} buffer
496
- * @param {string} signature
497
- * @param {string} public_key
498
- * @returns {boolean}
501
+ * @param {string} block_hash
502
+ * @returns {Promise<WasmBlock>}
499
503
  */
500
- export function verify_signature(buffer, signature, public_key) {
501
- const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
502
- return ret !== 0;
504
+ export function get_block(block_hash) {
505
+ const ret = wasm.get_block(addHeapObject(block_hash));
506
+ return takeObject(ret);
503
507
  }
504
508
 
505
509
  /**
506
510
  * @returns {Promise<string>}
507
511
  */
508
- export function get_congestion_stats() {
509
- const ret = wasm.get_congestion_stats();
512
+ export function get_peer_stats() {
513
+ const ret = wasm.get_peer_stats();
510
514
  return takeObject(ret);
511
515
  }
512
516
 
513
517
  /**
514
- * @returns {Promise<Array<any>>}
518
+ * @param {bigint} peer_index
519
+ * @returns {Promise<void>}
515
520
  */
516
- export function get_nft_list() {
517
- const ret = wasm.get_nft_list();
521
+ export function remove_stun_peer(peer_index) {
522
+ const ret = wasm.remove_stun_peer(peer_index);
518
523
  return takeObject(ret);
519
524
  }
520
525
 
521
526
  /**
522
527
  * @param {Uint8Array} buffer
523
- * @param {number} msg_index
524
- * @param {bigint} peer_index
525
- * @returns {Promise<void>}
528
+ * @returns {string}
526
529
  */
527
- export function send_api_call(buffer, msg_index, peer_index) {
528
- const ret = wasm.send_api_call(addHeapObject(buffer), msg_index, peer_index);
530
+ export function hash(buffer) {
531
+ const ret = wasm.hash(addHeapObject(buffer));
529
532
  return takeObject(ret);
530
533
  }
531
534
 
532
535
  /**
533
- * @param {WasmTransaction} tx
534
- * @returns {Promise<void>}
536
+ * @param {Array<any>} public_keys
537
+ * @param {BigUint64Array} amounts
538
+ * @param {bigint} fee
539
+ * @param {boolean} _force_merge
540
+ * @returns {Promise<WasmTransaction>}
535
541
  */
536
- export function propagate_transaction(tx) {
537
- _assertClass(tx, WasmTransaction);
538
- const ret = wasm.propagate_transaction(tx.__wbg_ptr);
542
+ export function create_transaction_with_multiple_payments(public_keys, amounts, fee, _force_merge) {
543
+ const ret = wasm.create_transaction_with_multiple_payments(addHeapObject(public_keys), addHeapObject(amounts), fee, _force_merge);
539
544
  return takeObject(ret);
540
545
  }
541
546
 
542
547
  /**
543
- * @param {string} public_key
544
- * @returns {Promise<Array<any>>}
548
+ * @param {bigint} duration_in_ms
549
+ * @returns {Promise<void>}
545
550
  */
546
- export function get_account_slips(public_key) {
547
- const ret = wasm.get_account_slips(addHeapObject(public_key));
551
+ export function process_timer_event(duration_in_ms) {
552
+ const ret = wasm.process_timer_event(duration_in_ms);
548
553
  return takeObject(ret);
549
554
  }
550
555
 
551
556
  /**
552
- * @returns {Promise<boolean>}
557
+ * @param {number} major
558
+ * @param {number} minor
559
+ * @param {number} patch
560
+ * @returns {Promise<void>}
553
561
  */
554
- export function produce_block_without_gt() {
555
- const ret = wasm.produce_block_without_gt();
562
+ export function set_wallet_version(major, minor, patch) {
563
+ const ret = wasm.set_wallet_version(major, minor, patch);
556
564
  return takeObject(ret);
557
565
  }
558
566
 
@@ -562,91 +570,97 @@ export function produce_block_without_gt() {
562
570
  * @param {bigint} peer_index
563
571
  * @returns {Promise<void>}
564
572
  */
565
- export function send_api_error(buffer, msg_index, peer_index) {
566
- const ret = wasm.send_api_error(addHeapObject(buffer), msg_index, peer_index);
573
+ export function send_api_success(buffer, msg_index, peer_index) {
574
+ const ret = wasm.send_api_success(addHeapObject(buffer), msg_index, peer_index);
567
575
  return takeObject(ret);
568
576
  }
569
577
 
570
578
  /**
571
- * @param {bigint} current_time
579
+ * @param {bigint} peer_index
580
+ * @param {string} ip
572
581
  * @returns {Promise<void>}
573
582
  */
574
- export function process_stat_interval(current_time) {
575
- const ret = wasm.process_stat_interval(current_time);
576
- return takeObject(ret);
577
- }
578
-
579
- /**
580
- * @param {string} slip1_utxo_key
581
- * @param {string} slip2_utxo_key
582
- * @param {string} slip3_utxo_key
583
- * @param {number} left_count
584
- * @param {number} right_count
585
- * @param {Uint8Array} tx_msg
586
- * @returns {Promise<WasmTransaction>}
587
- */
588
- export function create_split_bound_transaction(slip1_utxo_key, slip2_utxo_key, slip3_utxo_key, left_count, right_count, tx_msg) {
589
- 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));
583
+ export function process_new_peer(peer_index, ip) {
584
+ const ret = wasm.process_new_peer(peer_index, addHeapObject(ip));
590
585
  return takeObject(ret);
591
586
  }
592
587
 
593
588
  /**
594
- * @returns {Promise<string>}
589
+ * @param {Uint8Array} buffer
590
+ * @param {string} signature
591
+ * @param {string} public_key
592
+ * @returns {boolean}
595
593
  */
596
- export function get_latest_block_hash() {
597
- const ret = wasm.get_latest_block_hash();
598
- return takeObject(ret);
594
+ export function verify_signature(buffer, signature, public_key) {
595
+ const ret = wasm.verify_signature(addHeapObject(buffer), addHeapObject(signature), addHeapObject(public_key));
596
+ return ret !== 0;
599
597
  }
600
598
 
601
599
  /**
602
- * @returns {Promise<string>}
600
+ * @returns {Promise<Array<any>>}
603
601
  */
604
- export function get_stats() {
605
- const ret = wasm.get_stats();
602
+ export function get_peers() {
603
+ const ret = wasm.get_peers();
606
604
  return takeObject(ret);
607
605
  }
608
606
 
609
607
  /**
610
- * @param {Array<any>} keys
611
- * @returns {Promise<WasmBalanceSnapshot>}
608
+ * @param {Uint8Array} buffer
609
+ * @param {bigint} peer_index
610
+ * @returns {Promise<void>}
612
611
  */
613
- export function get_balance_snapshot(keys) {
614
- const ret = wasm.get_balance_snapshot(addHeapObject(keys));
612
+ export function process_msg_buffer_from_peer(buffer, peer_index) {
613
+ const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
615
614
  return takeObject(ret);
616
615
  }
617
616
 
618
617
  /**
619
618
  * @returns {Promise<void>}
620
619
  */
621
- export function disable_producing_blocks_by_timer() {
622
- const ret = wasm.disable_producing_blocks_by_timer();
620
+ export function start_from_received_ghost_chain() {
621
+ const ret = wasm.start_from_received_ghost_chain();
623
622
  return takeObject(ret);
624
623
  }
625
624
 
626
625
  /**
627
- * @returns {string}
626
+ * @param {string} public_key
627
+ * @param {bigint} amount
628
+ * @param {bigint} fee
629
+ * @param {boolean} force_merge
630
+ * @returns {Promise<WasmTransaction>}
628
631
  */
629
- export function generate_private_key() {
630
- const ret = wasm.generate_private_key();
632
+ export function create_transaction(public_key, amount, fee, force_merge) {
633
+ const ret = wasm.create_transaction(addHeapObject(public_key), amount, fee, force_merge);
631
634
  return takeObject(ret);
632
635
  }
633
636
 
634
637
  /**
635
- * @param {string} block_hash
636
- * @returns {Promise<WasmBlock>}
638
+ * @returns {Promise<string>}
637
639
  */
638
- export function get_block(block_hash) {
639
- const ret = wasm.get_block(addHeapObject(block_hash));
640
+ export function get_congestion_stats() {
641
+ const ret = wasm.get_congestion_stats();
640
642
  return takeObject(ret);
641
643
  }
642
644
 
643
645
  /**
644
- * @param {bigint} duration_in_ms
645
- * @returns {Promise<void>}
646
+ * @param {Uint8Array} buffer
647
+ * @param {string} private_key
648
+ * @returns {string}
646
649
  */
647
- export function process_timer_event(duration_in_ms) {
648
- const ret = wasm.process_timer_event(duration_in_ms);
649
- return takeObject(ret);
650
+ export function sign_buffer(buffer, private_key) {
651
+ try {
652
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
653
+ wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
654
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
655
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
656
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
657
+ if (r2) {
658
+ throw takeObject(r1);
659
+ }
660
+ return takeObject(r0);
661
+ } finally {
662
+ wasm.__wbindgen_add_to_stack_pointer(16);
663
+ }
650
664
  }
651
665
 
652
666
  /**
@@ -658,73 +672,59 @@ export function get_wallet() {
658
672
  }
659
673
 
660
674
  /**
661
- * @param {Uint8Array} buffer
662
- * @param {bigint} peer_index
663
- * @returns {Promise<void>}
675
+ * @param {bigint} num
676
+ * @param {bigint} deposit
677
+ * @param {Uint8Array} tx_msg
678
+ * @param {bigint} fee
679
+ * @param {string} recipient_public_key
680
+ * @param {string} nft_type
681
+ * @returns {Promise<WasmTransaction>}
664
682
  */
665
- export function process_msg_buffer_from_peer(buffer, peer_index) {
666
- const ret = wasm.process_msg_buffer_from_peer(addHeapObject(buffer), peer_index);
683
+ export function create_bound_transaction(num, deposit, tx_msg, fee, recipient_public_key, nft_type) {
684
+ const ret = wasm.create_bound_transaction(num, deposit, addHeapObject(tx_msg), fee, addHeapObject(recipient_public_key), addHeapObject(nft_type));
667
685
  return takeObject(ret);
668
686
  }
669
687
 
670
688
  /**
671
- * @returns {Promise<Array<any>>}
689
+ * @returns {Promise<any>}
672
690
  */
673
- export function get_mempool_txs() {
674
- const ret = wasm.get_mempool_txs();
691
+ export function get_confirmations() {
692
+ const ret = wasm.get_confirmations();
675
693
  return takeObject(ret);
676
694
  }
677
695
 
678
696
  /**
679
- * @param {number} major
680
- * @param {number} minor
681
- * @param {number} patch
697
+ * @param {WasmTransaction} tx
682
698
  * @returns {Promise<void>}
683
699
  */
684
- export function set_wallet_version(major, minor, patch) {
685
- const ret = wasm.set_wallet_version(major, minor, patch);
700
+ export function propagate_transaction(tx) {
701
+ _assertClass(tx, WasmTransaction);
702
+ const ret = wasm.propagate_transaction(tx.__wbg_ptr);
686
703
  return takeObject(ret);
687
704
  }
688
705
 
689
706
  /**
690
- * @param {Uint8Array} buffer
691
- * @param {string} private_key
692
- * @returns {string}
707
+ * @returns {Promise<string>}
693
708
  */
694
- export function sign_buffer(buffer, private_key) {
695
- try {
696
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
697
- wasm.sign_buffer(retptr, addHeapObject(buffer), addHeapObject(private_key));
698
- var r0 = getInt32Memory0()[retptr / 4 + 0];
699
- var r1 = getInt32Memory0()[retptr / 4 + 1];
700
- var r2 = getInt32Memory0()[retptr / 4 + 2];
701
- if (r2) {
702
- throw takeObject(r1);
703
- }
704
- return takeObject(r0);
705
- } finally {
706
- wasm.__wbindgen_add_to_stack_pointer(16);
707
- }
709
+ export function get_stats() {
710
+ const ret = wasm.get_stats();
711
+ return takeObject(ret);
708
712
  }
709
713
 
710
714
  /**
711
715
  * @param {bigint} peer_index
712
- * @returns {Promise<WasmPeer | undefined>}
716
+ * @returns {Promise<void>}
713
717
  */
714
- export function get_peer(peer_index) {
715
- const ret = wasm.get_peer(peer_index);
718
+ export function process_peer_disconnection(peer_index) {
719
+ const ret = wasm.process_peer_disconnection(peer_index);
716
720
  return takeObject(ret);
717
721
  }
718
722
 
719
723
  /**
720
- * @param {Uint8Array} buffer
721
- * @param {Uint8Array} hash
722
- * @param {bigint} block_id
723
- * @param {bigint} peer_index
724
724
  * @returns {Promise<void>}
725
725
  */
726
- export function process_fetched_block(buffer, hash, block_id, peer_index) {
727
- const ret = wasm.process_fetched_block(addHeapObject(buffer), addHeapObject(hash), block_id, peer_index);
726
+ export function disable_producing_blocks_by_timer() {
727
+ const ret = wasm.disable_producing_blocks_by_timer();
728
728
  return takeObject(ret);
729
729
  }
730
730
 
@@ -2664,14 +2664,26 @@ function __wbg_get_imports() {
2664
2664
  const ret = BigInt.asUintN(64, arg0);
2665
2665
  return addHeapObject(ret);
2666
2666
  };
2667
- imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2668
- const ret = WasmWallet.__wrap(arg0);
2667
+ imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2668
+ const ret = WasmTransaction.__wrap(arg0);
2669
+ return addHeapObject(ret);
2670
+ };
2671
+ imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2672
+ const ret = WasmPeer.__wrap(arg0);
2669
2673
  return addHeapObject(ret);
2670
2674
  };
2671
2675
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2672
2676
  const ret = getStringFromWasm0(arg0, arg1);
2673
2677
  return addHeapObject(ret);
2674
2678
  };
2679
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2680
+ const ret = getObject(arg0);
2681
+ return addHeapObject(ret);
2682
+ };
2683
+ imports.wbg.__wbg_wasmslip_new = function(arg0) {
2684
+ const ret = WasmSlip.__wrap(arg0);
2685
+ return addHeapObject(ret);
2686
+ };
2675
2687
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2676
2688
  const obj = getObject(arg1);
2677
2689
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -2680,32 +2692,20 @@ function __wbg_get_imports() {
2680
2692
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2681
2693
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2682
2694
  };
2683
- imports.wbg.__wbg_wasmtransaction_new = function(arg0) {
2684
- const ret = WasmTransaction.__wrap(arg0);
2685
- return addHeapObject(ret);
2686
- };
2687
- imports.wbg.__wbg_wasmslip_new = function(arg0) {
2688
- const ret = WasmSlip.__wrap(arg0);
2689
- return addHeapObject(ret);
2690
- };
2691
- imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2692
- const ret = WasmWalletSlip.__wrap(arg0);
2695
+ imports.wbg.__wbg_wasmblock_new = function(arg0) {
2696
+ const ret = WasmBlock.__wrap(arg0);
2693
2697
  return addHeapObject(ret);
2694
2698
  };
2695
2699
  imports.wbg.__wbg_wasmnft_new = function(arg0) {
2696
2700
  const ret = WasmNFT.__wrap(arg0);
2697
2701
  return addHeapObject(ret);
2698
2702
  };
2699
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2700
- const ret = getObject(arg0);
2701
- return addHeapObject(ret);
2702
- };
2703
- imports.wbg.__wbg_wasmblock_new = function(arg0) {
2704
- const ret = WasmBlock.__wrap(arg0);
2703
+ imports.wbg.__wbg_wasmwalletslip_new = function(arg0) {
2704
+ const ret = WasmWalletSlip.__wrap(arg0);
2705
2705
  return addHeapObject(ret);
2706
2706
  };
2707
- imports.wbg.__wbg_wasmpeer_new = function(arg0) {
2708
- const ret = WasmPeer.__wrap(arg0);
2707
+ imports.wbg.__wbg_wasmwallet_new = function(arg0) {
2708
+ const ret = WasmWallet.__wrap(arg0);
2709
2709
  return addHeapObject(ret);
2710
2710
  };
2711
2711
  imports.wbg.__wbg_wasmbalancesnapshot_new = function(arg0) {
@@ -2741,7 +2741,7 @@ function __wbg_get_imports() {
2741
2741
  const ret = WasmPeerService.__wrap(arg0);
2742
2742
  return addHeapObject(ret);
2743
2743
  };
2744
- imports.wbg.__wbg_flushdata_43f1541fff3d78bd = function(arg0, arg1) {
2744
+ imports.wbg.__wbg_flushdata_aece8dc223521e86 = function(arg0, arg1) {
2745
2745
  let deferred0_0;
2746
2746
  let deferred0_1;
2747
2747
  try {
@@ -2752,7 +2752,7 @@ function __wbg_get_imports() {
2752
2752
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2753
2753
  }
2754
2754
  };
2755
- imports.wbg.__wbg_readvalue_0a9c92750448f1d1 = function() { return handleError(function (arg0, arg1) {
2755
+ imports.wbg.__wbg_readvalue_6b30d6a36eadedae = function() { return handleError(function (arg0, arg1) {
2756
2756
  let deferred0_0;
2757
2757
  let deferred0_1;
2758
2758
  try {
@@ -2764,13 +2764,13 @@ function __wbg_get_imports() {
2764
2764
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2765
2765
  }
2766
2766
  }, arguments) };
2767
- imports.wbg.__wbg_loadwallet_5cd451ac436ab682 = function() {
2767
+ imports.wbg.__wbg_loadwallet_859958a8a64bf9fa = function() {
2768
2768
  MsgHandler.load_wallet();
2769
2769
  };
2770
- imports.wbg.__wbg_savewallet_6826e875e5dd251b = function() {
2770
+ imports.wbg.__wbg_savewallet_2980f66ae84af44e = function() {
2771
2771
  MsgHandler.save_wallet();
2772
2772
  };
2773
- imports.wbg.__wbg_writevalue_cf07df01ae9d9d9b = function(arg0, arg1, arg2) {
2773
+ imports.wbg.__wbg_writevalue_6c5d0ae738c625fd = function(arg0, arg1, arg2) {
2774
2774
  let deferred0_0;
2775
2775
  let deferred0_1;
2776
2776
  try {
@@ -2781,7 +2781,7 @@ function __wbg_get_imports() {
2781
2781
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2782
2782
  }
2783
2783
  };
2784
- imports.wbg.__wbg_appendvalue_3d3f4ddc7cd7f668 = function(arg0, arg1, arg2) {
2784
+ imports.wbg.__wbg_appendvalue_7a64f2b8d6b939c6 = function(arg0, arg1, arg2) {
2785
2785
  let deferred0_0;
2786
2786
  let deferred0_1;
2787
2787
  try {
@@ -2792,7 +2792,7 @@ function __wbg_get_imports() {
2792
2792
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2793
2793
  }
2794
2794
  };
2795
- imports.wbg.__wbg_removevalue_f5900816b911805e = function() { return handleError(function (arg0, arg1) {
2795
+ imports.wbg.__wbg_removevalue_fa146f87d5f18cc2 = function() { return handleError(function (arg0, arg1) {
2796
2796
  let deferred0_0;
2797
2797
  let deferred0_1;
2798
2798
  try {
@@ -2804,10 +2804,10 @@ function __wbg_get_imports() {
2804
2804
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2805
2805
  }
2806
2806
  }, arguments) };
2807
- imports.wbg.__wbg_sendmessage_6d75e3e0b6cbcdea = function(arg0, arg1) {
2807
+ imports.wbg.__wbg_sendmessage_678a358e5a2bbc3c = function(arg0, arg1) {
2808
2808
  MsgHandler.send_message(takeObject(arg0), getObject(arg1));
2809
2809
  };
2810
- imports.wbg.__wbg_connecttopeer_0dbfd6477b38b460 = function() { return handleError(function (arg0, arg1, arg2) {
2810
+ imports.wbg.__wbg_connecttopeer_67e8d4deca7e7daf = function() { return handleError(function (arg0, arg1, arg2) {
2811
2811
  let deferred0_0;
2812
2812
  let deferred0_1;
2813
2813
  try {
@@ -2819,13 +2819,13 @@ function __wbg_get_imports() {
2819
2819
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2820
2820
  }
2821
2821
  }, arguments) };
2822
- imports.wbg.__wbg_getmyservices_671fa3941c07e37c = function() {
2822
+ imports.wbg.__wbg_getmyservices_519eae3c1e735bb8 = function() {
2823
2823
  const ret = MsgHandler.get_my_services();
2824
2824
  _assertClass(ret, WasmPeerServiceList);
2825
2825
  var ptr1 = ret.__destroy_into_raw();
2826
2826
  return ptr1;
2827
2827
  };
2828
- imports.wbg.__wbg_isexistingfile_9c5802df7eec1b8c = function() { return handleError(function (arg0, arg1) {
2828
+ imports.wbg.__wbg_isexistingfile_e53dd691a0d35efd = function() { return handleError(function (arg0, arg1) {
2829
2829
  let deferred0_0;
2830
2830
  let deferred0_1;
2831
2831
  try {
@@ -2837,27 +2837,27 @@ function __wbg_get_imports() {
2837
2837
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2838
2838
  }
2839
2839
  }, arguments) };
2840
- imports.wbg.__wbg_processapicall_84802524f4b72626 = function(arg0, arg1, arg2) {
2840
+ imports.wbg.__wbg_processapicall_7010105e6c44f1f7 = function(arg0, arg1, arg2) {
2841
2841
  MsgHandler.process_api_call(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2842
2842
  };
2843
- imports.wbg.__wbg_processapierror_d543c65b7ba51917 = function(arg0, arg1, arg2) {
2843
+ imports.wbg.__wbg_processapierror_f885f698605b436e = function(arg0, arg1, arg2) {
2844
2844
  MsgHandler.process_api_error(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2845
2845
  };
2846
- imports.wbg.__wbg_processapisuccess_346f01f1e249ab95 = function(arg0, arg1, arg2) {
2846
+ imports.wbg.__wbg_processapisuccess_f35eaefa100da4a2 = function(arg0, arg1, arg2) {
2847
2847
  MsgHandler.process_api_success(takeObject(arg0), arg1 >>> 0, takeObject(arg2));
2848
2848
  };
2849
- imports.wbg.__wbg_sendmessagetoall_8b367c13a928c498 = function(arg0, arg1) {
2849
+ imports.wbg.__wbg_sendmessagetoall_4a160fbd574d23b3 = function(arg0, arg1) {
2850
2850
  MsgHandler.send_message_to_all(getObject(arg0), getObject(arg1));
2851
2851
  };
2852
- imports.wbg.__wbg_disconnectfrompeer_eb1d4acfd8e133d3 = function() { return handleError(function (arg0) {
2852
+ imports.wbg.__wbg_disconnectfrompeer_2739f7a30005ac18 = function() { return handleError(function (arg0) {
2853
2853
  const ret = MsgHandler.disconnect_from_peer(takeObject(arg0));
2854
2854
  return addHeapObject(ret);
2855
2855
  }, arguments) };
2856
- imports.wbg.__wbg_loadblockfilelist_e8a6bbf7850e77ec = function() { return handleError(function () {
2856
+ imports.wbg.__wbg_loadblockfilelist_9c3eba157d4018d7 = function() { return handleError(function () {
2857
2857
  const ret = MsgHandler.load_block_file_list();
2858
2858
  return addHeapObject(ret);
2859
2859
  }, arguments) };
2860
- imports.wbg.__wbg_sendinterfaceevent_478dfe7c1d77edc1 = function(arg0, arg1, arg2, arg3, arg4) {
2860
+ imports.wbg.__wbg_sendinterfaceevent_9ec642f87407fb57 = function(arg0, arg1, arg2, arg3, arg4) {
2861
2861
  let deferred0_0;
2862
2862
  let deferred0_1;
2863
2863
  let deferred1_0;
@@ -2873,7 +2873,7 @@ function __wbg_get_imports() {
2873
2873
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2874
2874
  }
2875
2875
  };
2876
- imports.wbg.__wbg_sendblocksuccess_50f30a221c95ccb2 = function(arg0, arg1, arg2) {
2876
+ imports.wbg.__wbg_sendblocksuccess_8593630796d08f4a = function(arg0, arg1, arg2) {
2877
2877
  let deferred0_0;
2878
2878
  let deferred0_1;
2879
2879
  try {
@@ -2884,10 +2884,10 @@ function __wbg_get_imports() {
2884
2884
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2885
2885
  }
2886
2886
  };
2887
- imports.wbg.__wbg_sendwalletupdate_f56f83f3e07b49a9 = function() {
2887
+ imports.wbg.__wbg_sendwalletupdate_a4fae063dc4307f9 = function() {
2888
2888
  MsgHandler.send_wallet_update();
2889
2889
  };
2890
- imports.wbg.__wbg_sendnewversionalert_cf706b447638507f = function(arg0, arg1, arg2) {
2890
+ imports.wbg.__wbg_sendnewversionalert_90ce546ef6f38fc8 = function(arg0, arg1, arg2) {
2891
2891
  let deferred0_0;
2892
2892
  let deferred0_1;
2893
2893
  try {
@@ -2898,13 +2898,13 @@ function __wbg_get_imports() {
2898
2898
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2899
2899
  }
2900
2900
  };
2901
- imports.wbg.__wbg_sendblockfetchstatusevent_34b0e8fb201fbfc5 = function(arg0) {
2901
+ imports.wbg.__wbg_sendblockfetchstatusevent_1a279a1f6532f08b = function(arg0) {
2902
2902
  MsgHandler.send_block_fetch_status_event(BigInt.asUintN(64, arg0));
2903
2903
  };
2904
- imports.wbg.__wbg_sendnewchaindetectedevent_3ebfc9ce48ce2f00 = function() {
2904
+ imports.wbg.__wbg_sendnewchaindetectedevent_3137097dd52dfe5f = function() {
2905
2905
  MsgHandler.send_new_chain_detected_event();
2906
2906
  };
2907
- imports.wbg.__wbg_fetchblockfrompeer_42bdb36ab5eb6374 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2907
+ imports.wbg.__wbg_fetchblockfrompeer_e70058129ff6d454 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2908
2908
  let deferred0_0;
2909
2909
  let deferred0_1;
2910
2910
  try {
@@ -2916,7 +2916,7 @@ function __wbg_get_imports() {
2916
2916
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2917
2917
  }
2918
2918
  }, arguments) };
2919
- imports.wbg.__wbg_ensureblockdirectoryexists_2eeab9246fcb6206 = function() { return handleError(function (arg0, arg1) {
2919
+ imports.wbg.__wbg_ensureblockdirectoryexists_423cb5cd137cb12e = function() { return handleError(function (arg0, arg1) {
2920
2920
  let deferred0_0;
2921
2921
  let deferred0_1;
2922
2922
  try {