@secondts/bark-react-native 0.3.0-beta.1 → 0.3.1

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.
@@ -340,6 +340,14 @@ export type Config = {
340
340
  * Confirmations required before considering a round tx fully confirmed
341
341
  */
342
342
  roundTxRequiredConfirmations: /*u32*/ number | undefined;
343
+ /**
344
+ * Fast sync interval for daemon tasks (lightning sync) in seconds
345
+ */
346
+ daemonFastSyncIntervalSecs: /*u64*/ bigint | undefined;
347
+ /**
348
+ * Slow sync interval for daemon tasks (onchain, exits, boards, etc.) in seconds
349
+ */
350
+ daemonSlowSyncIntervalSecs: /*u64*/ bigint | undefined;
343
351
  };
344
352
  /**
345
353
  * Generated factory for {@link Config} record objects.
@@ -574,6 +582,48 @@ export declare const ExitVtxo: Readonly<{
574
582
  */
575
583
  defaults: () => Partial<ExitVtxo>;
576
584
  }>;
585
+ /**
586
+ * Result of a fee estimation
587
+ */
588
+ export type FeeEstimate = {
589
+ /**
590
+ * The total amount including fees in sats
591
+ */
592
+ grossAmountSats: bigint;
593
+ /**
594
+ * The fee amount charged by the server in sats
595
+ */
596
+ feeSats: bigint;
597
+ /**
598
+ * The amount excluding fees in sats.
599
+ * For sends, this is the amount the recipient receives.
600
+ * For receives, this is the amount the user gets.
601
+ */
602
+ netAmountSats: bigint;
603
+ /**
604
+ * The VTXO IDs that would be spent for this operation
605
+ */
606
+ vtxosSpent: Array<string>;
607
+ };
608
+ /**
609
+ * Generated factory for {@link FeeEstimate} record objects.
610
+ */
611
+ export declare const FeeEstimate: Readonly<{
612
+ /**
613
+ * Create a frozen instance of {@link FeeEstimate}, with defaults specified
614
+ * in Rust, in the {@link bark} crate.
615
+ */
616
+ create: (partial: Partial<FeeEstimate> & Required<Omit<FeeEstimate, never>>) => FeeEstimate;
617
+ /**
618
+ * Create a frozen instance of {@link FeeEstimate}, with defaults specified
619
+ * in Rust, in the {@link bark} crate.
620
+ */
621
+ new: (partial: Partial<FeeEstimate> & Required<Omit<FeeEstimate, never>>) => FeeEstimate;
622
+ /**
623
+ * Defaults specified in the {@link bark} crate.
624
+ */
625
+ defaults: () => Partial<FeeEstimate>;
626
+ }>;
577
627
  /**
578
628
  * Result of creating a BOLT11 invoice
579
629
  */
@@ -2456,21 +2506,29 @@ export interface OnchainWalletInterface {
2456
2506
  /**
2457
2507
  * Get the onchain wallet balance
2458
2508
  */
2459
- balance(): OnchainBalance;
2509
+ balance(asyncOpts_?: {
2510
+ signal: AbortSignal;
2511
+ }): Promise<OnchainBalance>;
2460
2512
  /**
2461
2513
  * Generate a new Bitcoin address
2462
2514
  */
2463
- newAddress(): string;
2515
+ newAddress(asyncOpts_?: {
2516
+ signal: AbortSignal;
2517
+ }): Promise<string>;
2464
2518
  /**
2465
2519
  * Send Bitcoin to an address
2466
2520
  * Returns the transaction ID
2467
2521
  */
2468
- send(address: string, amountSats: bigint, feeRateSatPerVb: bigint): string;
2522
+ send(address: string, amountSats: bigint, feeRateSatPerVb: bigint, asyncOpts_?: {
2523
+ signal: AbortSignal;
2524
+ }): Promise<string>;
2469
2525
  /**
2470
2526
  * Sync the onchain wallet with the blockchain
2471
2527
  * Returns the amount synced in satoshis
2472
2528
  */
2473
- sync(): bigint;
2529
+ sync(asyncOpts_?: {
2530
+ signal: AbortSignal;
2531
+ }): Promise</*u64*/ bigint>;
2474
2532
  }
2475
2533
  /**
2476
2534
  * Onchain Bitcoin wallet for boarding and exits
@@ -2498,25 +2556,35 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
2498
2556
  * The wallet uses BDK for onchain operations
2499
2557
  * and the same chain source configuration as the Bark wallet (esplora_address or bitcoind_*).
2500
2558
  */
2501
- static default_(mnemonic: string, config: Config, datadir: string): OnchainWalletInterface;
2559
+ static default_(mnemonic: string, config: Config, datadir: string, asyncOpts_?: {
2560
+ signal: AbortSignal;
2561
+ }): Promise<OnchainWalletInterface>;
2502
2562
  /**
2503
2563
  * Get the onchain wallet balance
2504
2564
  */
2505
- balance(): OnchainBalance;
2565
+ balance(asyncOpts_?: {
2566
+ signal: AbortSignal;
2567
+ }): Promise<OnchainBalance>;
2506
2568
  /**
2507
2569
  * Generate a new Bitcoin address
2508
2570
  */
2509
- newAddress(): string;
2571
+ newAddress(asyncOpts_?: {
2572
+ signal: AbortSignal;
2573
+ }): Promise<string>;
2510
2574
  /**
2511
2575
  * Send Bitcoin to an address
2512
2576
  * Returns the transaction ID
2513
2577
  */
2514
- send(address: string, amountSats: bigint, feeRateSatPerVb: bigint): string;
2578
+ send(address: string, amountSats: bigint, feeRateSatPerVb: bigint, asyncOpts_?: {
2579
+ signal: AbortSignal;
2580
+ }): Promise<string>;
2515
2581
  /**
2516
2582
  * Sync the onchain wallet with the blockchain
2517
2583
  * Returns the amount synced in satoshis
2518
2584
  */
2519
- sync(): bigint;
2585
+ sync(asyncOpts_?: {
2586
+ signal: AbortSignal;
2587
+ }): Promise</*u64*/ bigint>;
2520
2588
  /**
2521
2589
  * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2522
2590
  */
@@ -2532,25 +2600,39 @@ export interface WalletInterface {
2532
2600
  *
2533
2601
  * Returns null if no exits or any exit has undetermined claimability.
2534
2602
  */
2535
- allExitsClaimableAtHeight(): /*throws*/ /*u32*/ number | undefined;
2603
+ allExitsClaimableAtHeight(asyncOpts_?: {
2604
+ signal: AbortSignal;
2605
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
2536
2606
  /**
2537
2607
  * Get all VTXOs (including spent)
2538
2608
  */
2539
- allVtxos(): Array<Vtxo>;
2609
+ allVtxos(asyncOpts_?: {
2610
+ signal: AbortSignal;
2611
+ }): Promise<Array<Vtxo>>;
2540
2612
  /**
2541
2613
  * Get Ark server info (null if not connected)
2542
2614
  */
2543
- arkInfo(): ArkInfo | undefined;
2544
- balance(): Balance;
2615
+ arkInfo(asyncOpts_?: {
2616
+ signal: AbortSignal;
2617
+ }): Promise<ArkInfo | undefined>;
2618
+ balance(asyncOpts_?: {
2619
+ signal: AbortSignal;
2620
+ }): Promise<Balance>;
2545
2621
  /**
2546
2622
  * Board all funds from onchain wallet into Ark
2547
2623
  */
2548
- boardAll(onchainWallet: OnchainWalletInterface): PendingBoard;
2624
+ boardAll(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
2625
+ signal: AbortSignal;
2626
+ }): Promise<PendingBoard>;
2549
2627
  /**
2550
2628
  * Board a specific amount from onchain wallet into Ark
2551
2629
  */
2552
- boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint): PendingBoard;
2553
- bolt11Invoice(amountSats: bigint): LightningInvoice;
2630
+ boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint, asyncOpts_?: {
2631
+ signal: AbortSignal;
2632
+ }): Promise<PendingBoard>;
2633
+ bolt11Invoice(amountSats: bigint, asyncOpts_?: {
2634
+ signal: AbortSignal;
2635
+ }): Promise<LightningInvoice>;
2554
2636
  /**
2555
2637
  * Broadcast a signed transaction to the Bitcoin network
2556
2638
  *
@@ -2563,15 +2645,21 @@ export interface WalletInterface {
2563
2645
  *
2564
2646
  * Returns the transaction ID (txid) of the broadcasted transaction
2565
2647
  */
2566
- broadcastTx(txHex: string): string;
2648
+ broadcastTx(txHex: string, asyncOpts_?: {
2649
+ signal: AbortSignal;
2650
+ }): Promise<string>;
2567
2651
  /**
2568
2652
  * Cancel all pending rounds
2569
2653
  */
2570
- cancelAllPendingRounds(): void;
2654
+ cancelAllPendingRounds(asyncOpts_?: {
2655
+ signal: AbortSignal;
2656
+ }): Promise<void>;
2571
2657
  /**
2572
2658
  * Cancel a specific pending round
2573
2659
  */
2574
- cancelPendingRound(roundId: number): void;
2660
+ cancelPendingRound(roundId: number, asyncOpts_?: {
2661
+ signal: AbortSignal;
2662
+ }): Promise<void>;
2575
2663
  /**
2576
2664
  * Check lightning payment status by payment hash
2577
2665
  *
@@ -2582,15 +2670,21 @@ export interface WalletInterface {
2582
2670
  *
2583
2671
  * Returns the preimage if payment is successful, null if still pending
2584
2672
  */
2585
- checkLightningPayment(paymentHash: string, wait: boolean): /*throws*/ string | undefined;
2673
+ checkLightningPayment(paymentHash: string, wait: boolean, asyncOpts_?: {
2674
+ signal: AbortSignal;
2675
+ }): Promise<string | undefined>;
2586
2676
  /**
2587
2677
  * Get claimable lightning receive balance
2588
2678
  */
2589
- claimableLightningReceiveBalanceSats(): bigint;
2679
+ claimableLightningReceiveBalanceSats(asyncOpts_?: {
2680
+ signal: AbortSignal;
2681
+ }): Promise</*u64*/ bigint>;
2590
2682
  /**
2591
2683
  * Get wallet config
2592
2684
  */
2593
- config(): Config;
2685
+ config(asyncOpts_?: {
2686
+ signal: AbortSignal;
2687
+ }): Promise<Config>;
2594
2688
  /**
2595
2689
  * Drain claimable exits to an address
2596
2690
  *
@@ -2603,37 +2697,49 @@ export interface WalletInterface {
2603
2697
  * * `address` - Bitcoin address to send claimed funds to
2604
2698
  * * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
2605
2699
  */
2606
- drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined): ExitClaimTransaction;
2700
+ drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
2701
+ signal: AbortSignal;
2702
+ }): Promise<ExitClaimTransaction>;
2607
2703
  /**
2608
2704
  * Estimate the fee for a board operation
2609
2705
  *
2610
2706
  * # Arguments
2611
2707
  *
2612
2708
  * * `amount_sats` - Amount to board in sats
2613
- *
2614
- * Returns the estimated fee in sats
2615
2709
  */
2616
- estimateBoardFee(amountSats: bigint): bigint;
2710
+ estimateBoardFee(amountSats: bigint, asyncOpts_?: {
2711
+ signal: AbortSignal;
2712
+ }): Promise<FeeEstimate>;
2617
2713
  /**
2618
2714
  * Estimate the fee for a lightning receive
2619
2715
  *
2620
2716
  * # Arguments
2621
2717
  *
2622
2718
  * * `amount_sats` - Amount to receive in sats
2623
- *
2624
- * Returns the estimated fee in sats
2625
2719
  */
2626
- estimateLightningReceiveFee(amountSats: bigint): bigint;
2720
+ estimateLightningReceiveFee(amountSats: bigint, asyncOpts_?: {
2721
+ signal: AbortSignal;
2722
+ }): Promise<FeeEstimate>;
2627
2723
  /**
2628
2724
  * Estimate the fee for a lightning send
2629
2725
  *
2630
2726
  * # Arguments
2631
2727
  *
2632
2728
  * * `amount_sats` - Amount to send in sats
2729
+ */
2730
+ estimateLightningSendFee(amountSats: bigint, asyncOpts_?: {
2731
+ signal: AbortSignal;
2732
+ }): Promise<FeeEstimate>;
2733
+ /**
2734
+ * Estimate the fee for offboarding all spendable VTXOs
2633
2735
  *
2634
- * Returns the estimated fee in sats
2736
+ * # Arguments
2737
+ *
2738
+ * * `address` - Destination address for the offboard
2635
2739
  */
2636
- estimateLightningSendFee(amountSats: bigint): bigint;
2740
+ estimateOffboardAllFee(address: string, asyncOpts_?: {
2741
+ signal: AbortSignal;
2742
+ }): Promise<FeeEstimate>;
2637
2743
  /**
2638
2744
  * Estimate the fee for an offboard operation
2639
2745
  *
@@ -2641,20 +2747,20 @@ export interface WalletInterface {
2641
2747
  *
2642
2748
  * * `address` - Destination address for the offboard
2643
2749
  * * `vtxo_ids` - VTXOs to offboard
2644
- *
2645
- * Returns the estimated fee in sats
2646
2750
  */
2647
- estimateOffboardFee(address: string, vtxoIds: Array<string>): bigint;
2751
+ estimateOffboardFee(address: string, vtxoIds: Array<string>, asyncOpts_?: {
2752
+ signal: AbortSignal;
2753
+ }): Promise<FeeEstimate>;
2648
2754
  /**
2649
2755
  * Estimate the fee for a refresh operation
2650
2756
  *
2651
2757
  * # Arguments
2652
2758
  *
2653
2759
  * * `vtxo_ids` - VTXOs to refresh
2654
- *
2655
- * Returns the estimated fee in sats
2656
2760
  */
2657
- estimateRefreshFee(vtxoIds: Array<string>): bigint;
2761
+ estimateRefreshFee(vtxoIds: Array<string>, asyncOpts_?: {
2762
+ signal: AbortSignal;
2763
+ }): Promise<FeeEstimate>;
2658
2764
  /**
2659
2765
  * Estimate the fee for a send onchain operation
2660
2766
  *
@@ -2662,10 +2768,10 @@ export interface WalletInterface {
2662
2768
  *
2663
2769
  * * `address` - Destination address
2664
2770
  * * `amount_sats` - Amount to send in sats
2665
- *
2666
- * Returns the estimated fee in sats
2667
2771
  */
2668
- estimateSendOnchainFee(address: string, amountSats: bigint): bigint;
2772
+ estimateSendOnchainFee(address: string, amountSats: bigint, asyncOpts_?: {
2773
+ signal: AbortSignal;
2774
+ }): Promise<FeeEstimate>;
2669
2775
  /**
2670
2776
  * Get the wallet's BIP32 fingerprint
2671
2777
  */
@@ -2681,44 +2787,62 @@ export interface WalletInterface {
2681
2787
  * * `include_history` - Whether to include full state machine history
2682
2788
  * * `include_transactions` - Whether to include transaction details
2683
2789
  */
2684
- getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean): /*throws*/ ExitTransactionStatus | undefined;
2790
+ getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean, asyncOpts_?: {
2791
+ signal: AbortSignal;
2792
+ }): Promise<ExitTransactionStatus | undefined>;
2685
2793
  /**
2686
2794
  * Get all VTXOs currently in exit process
2687
2795
  */
2688
- getExitVtxos(): Array<ExitVtxo>;
2796
+ getExitVtxos(asyncOpts_?: {
2797
+ signal: AbortSignal;
2798
+ }): Promise<Array<ExitVtxo>>;
2689
2799
  /**
2690
2800
  * Get VTXOs expiring within threshold blocks
2691
2801
  */
2692
- getExpiringVtxos(thresholdBlocks: number): Array<Vtxo>;
2802
+ getExpiringVtxos(thresholdBlocks: number, asyncOpts_?: {
2803
+ signal: AbortSignal;
2804
+ }): Promise<Array<Vtxo>>;
2693
2805
  /**
2694
2806
  * Get the block height of the first expiring VTXO
2695
2807
  *
2696
2808
  * Returns null if there are no spendable VTXOs.
2697
2809
  */
2698
- getFirstExpiringVtxoBlockheight(): /*throws*/ /*u32*/ number | undefined;
2810
+ getFirstExpiringVtxoBlockheight(asyncOpts_?: {
2811
+ signal: AbortSignal;
2812
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
2699
2813
  /**
2700
2814
  * Get the next block height when a refresh should be performed
2701
2815
  *
2702
2816
  * This is calculated as the first expiring VTXO height minus the refresh threshold.
2703
2817
  * Returns null if there are no VTXOs to refresh.
2704
2818
  */
2705
- getNextRequiredRefreshBlockheight(): /*throws*/ /*u32*/ number | undefined;
2819
+ getNextRequiredRefreshBlockheight(asyncOpts_?: {
2820
+ signal: AbortSignal;
2821
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
2706
2822
  /**
2707
2823
  * Get a specific VTXO by ID
2708
2824
  */
2709
- getVtxoById(vtxoId: string): Vtxo;
2825
+ getVtxoById(vtxoId: string, asyncOpts_?: {
2826
+ signal: AbortSignal;
2827
+ }): Promise<Vtxo>;
2710
2828
  /**
2711
2829
  * Get VTXOs that should be refreshed
2712
2830
  */
2713
- getVtxosToRefresh(): Array<Vtxo>;
2831
+ getVtxosToRefresh(asyncOpts_?: {
2832
+ signal: AbortSignal;
2833
+ }): Promise<Array<Vtxo>>;
2714
2834
  /**
2715
2835
  * Check if any exits are pending
2716
2836
  */
2717
- hasPendingExits(): boolean;
2837
+ hasPendingExits(asyncOpts_?: {
2838
+ signal: AbortSignal;
2839
+ }): Promise<boolean>;
2718
2840
  /**
2719
2841
  * Get all wallet movements (transaction history)
2720
2842
  */
2721
- history(): Array<Movement>;
2843
+ history(asyncOpts_?: {
2844
+ signal: AbortSignal;
2845
+ }): Promise<Array<Movement>>;
2722
2846
  /**
2723
2847
  * Get wallet movements filtered by payment method
2724
2848
  *
@@ -2727,7 +2851,9 @@ export interface WalletInterface {
2727
2851
  * * `payment_method_type` - Type (e.g. "ark", "bitcoin", "invoice", "offer", "lightning_address", "custom")
2728
2852
  * * `payment_method_value` - Value (e.g. an address or invoice string)
2729
2853
  */
2730
- historyByPaymentMethod(paymentMethodType: string, paymentMethodValue: string): Array<Movement>;
2854
+ historyByPaymentMethod(paymentMethodType: string, paymentMethodValue: string, asyncOpts_?: {
2855
+ signal: AbortSignal;
2856
+ }): Promise<Array<Movement>>;
2731
2857
  /**
2732
2858
  * Import a serialized VTXO into the wallet
2733
2859
  *
@@ -2738,7 +2864,9 @@ export interface WalletInterface {
2738
2864
  *
2739
2865
  * * `vtxo_base64` - Base64-encoded serialized VTXO
2740
2866
  */
2741
- importVtxo(vtxoBase64: string): void;
2867
+ importVtxo(vtxoBase64: string, asyncOpts_?: {
2868
+ signal: AbortSignal;
2869
+ }): Promise<void>;
2742
2870
  /**
2743
2871
  * Get lightning receive status by payment hash
2744
2872
  *
@@ -2746,13 +2874,17 @@ export interface WalletInterface {
2746
2874
  *
2747
2875
  * * `payment_hash` - Payment hash as hex string
2748
2876
  */
2749
- lightningReceiveStatus(paymentHash: string): /*throws*/ LightningReceive | undefined;
2877
+ lightningReceiveStatus(paymentHash: string, asyncOpts_?: {
2878
+ signal: AbortSignal;
2879
+ }): Promise<LightningReceive | undefined>;
2750
2880
  /**
2751
2881
  * List all exits that are claimable
2752
2882
  *
2753
2883
  * Returns exits ready to be drained to onchain wallet.
2754
2884
  */
2755
- listClaimableExits(): Array<ExitVtxo>;
2885
+ listClaimableExits(asyncOpts_?: {
2886
+ signal: AbortSignal;
2887
+ }): Promise<Array<ExitVtxo>>;
2756
2888
  /**
2757
2889
  * Create a new authorization for your server mailbox
2758
2890
  *
@@ -2773,48 +2905,68 @@ export interface WalletInterface {
2773
2905
  * Returns the mailbox identifier as a hex-encoded public key.
2774
2906
  */
2775
2907
  mailboxIdentifier(): string;
2776
- maintenance(): void;
2908
+ maintenance(asyncOpts_?: {
2909
+ signal: AbortSignal;
2910
+ }): Promise<void>;
2777
2911
  /**
2778
2912
  * Perform maintenance in delegated (non-interactive) mode
2779
2913
  *
2780
2914
  * This schedules refresh operations but doesn't wait for completion.
2781
2915
  * Use this when you want to queue operations without blocking.
2782
2916
  */
2783
- maintenanceDelegated(): void;
2917
+ maintenanceDelegated(asyncOpts_?: {
2918
+ signal: AbortSignal;
2919
+ }): Promise<void>;
2784
2920
  /**
2785
2921
  * Perform maintenance refresh
2786
2922
  */
2787
- maintenanceRefresh(): /*throws*/ string | undefined;
2923
+ maintenanceRefresh(asyncOpts_?: {
2924
+ signal: AbortSignal;
2925
+ }): Promise<string | undefined>;
2788
2926
  /**
2789
2927
  * Full maintenance including onchain wallet sync
2790
2928
  *
2791
2929
  * More thorough than maintenance() - also syncs onchain wallet and exits.
2792
2930
  */
2793
- maintenanceWithOnchain(onchainWallet: OnchainWalletInterface): void;
2931
+ maintenanceWithOnchain(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
2932
+ signal: AbortSignal;
2933
+ }): Promise<void>;
2794
2934
  /**
2795
2935
  * Perform maintenance with onchain wallet in delegated mode
2796
2936
  */
2797
- maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface): void;
2937
+ maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
2938
+ signal: AbortSignal;
2939
+ }): Promise<void>;
2798
2940
  /**
2799
2941
  * Schedule a maintenance refresh if VTXOs need refreshing
2800
2942
  *
2801
2943
  * Returns the round ID if a refresh was scheduled, null otherwise.
2802
2944
  */
2803
- maybeScheduleMaintenanceRefresh(): /*throws*/ /*u32*/ number | undefined;
2945
+ maybeScheduleMaintenanceRefresh(asyncOpts_?: {
2946
+ signal: AbortSignal;
2947
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
2804
2948
  /**
2805
2949
  * Get the Bitcoin network this wallet is using
2806
2950
  */
2807
- network(): Network;
2808
- newAddress(): string;
2951
+ network(asyncOpts_?: {
2952
+ signal: AbortSignal;
2953
+ }): Promise<Network>;
2954
+ newAddress(asyncOpts_?: {
2955
+ signal: AbortSignal;
2956
+ }): Promise<string>;
2809
2957
  /**
2810
2958
  * Generate a new address and return it with its index
2811
2959
  */
2812
- newAddressWithIndex(): AddressWithIndex;
2960
+ newAddressWithIndex(asyncOpts_?: {
2961
+ signal: AbortSignal;
2962
+ }): Promise<AddressWithIndex>;
2813
2963
  /**
2814
2964
  * Get the timestamp when the next round will start (Unix timestamp in seconds)
2815
2965
  * Returns an error if the server hasn't provided round timing info
2816
2966
  */
2817
- nextRoundStartTime(): bigint;
2967
+ nextRoundStartTime(asyncOpts_?: {
2968
+ signal: AbortSignal;
2969
+ }): Promise</*u64*/ bigint>;
2818
2970
  /**
2819
2971
  * Get a pull-based notification holder for this wallet.
2820
2972
  *
@@ -2823,13 +2975,21 @@ export interface WalletInterface {
2823
2975
  * destroying the stream.
2824
2976
  */
2825
2977
  notifications(): NotificationHolderInterface;
2826
- offboardAll(bitcoinAddress: string): OffboardResult;
2978
+ offboardAll(bitcoinAddress: string, asyncOpts_?: {
2979
+ signal: AbortSignal;
2980
+ }): Promise<OffboardResult>;
2827
2981
  /**
2828
2982
  * Offboard specific VTXOs to a Bitcoin address
2829
2983
  */
2830
- offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string): string;
2831
- payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined): LightningSend;
2832
- payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
2984
+ offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string, asyncOpts_?: {
2985
+ signal: AbortSignal;
2986
+ }): Promise<string>;
2987
+ payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined, asyncOpts_?: {
2988
+ signal: AbortSignal;
2989
+ }): Promise<LightningSend>;
2990
+ payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
2991
+ signal: AbortSignal;
2992
+ }): Promise<LightningSend>;
2833
2993
  /**
2834
2994
  * Pay a BOLT12 lightning offer
2835
2995
  *
@@ -2838,47 +2998,69 @@ export interface WalletInterface {
2838
2998
  * * `offer` - BOLT12 offer string
2839
2999
  * * `amount_sats` - Optional amount in sats (required if offer doesn't specify amount)
2840
3000
  */
2841
- payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
3001
+ payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
3002
+ signal: AbortSignal;
3003
+ }): Promise<LightningSend>;
2842
3004
  /**
2843
3005
  * DEPRECATED: use `peek_address` instead
2844
3006
  */
2845
- peakAddress(index: number): string;
3007
+ peakAddress(index: number, asyncOpts_?: {
3008
+ signal: AbortSignal;
3009
+ }): Promise<string>;
2846
3010
  /**
2847
3011
  * Peek at an address at a specific index
2848
3012
  */
2849
- peekAddress(index: number): string;
3013
+ peekAddress(index: number, asyncOpts_?: {
3014
+ signal: AbortSignal;
3015
+ }): Promise<string>;
2850
3016
  /**
2851
3017
  * Get all VTXOs that are part of pending boards
2852
3018
  */
2853
- pendingBoardVtxos(): Array<Vtxo>;
3019
+ pendingBoardVtxos(asyncOpts_?: {
3020
+ signal: AbortSignal;
3021
+ }): Promise<Array<Vtxo>>;
2854
3022
  /**
2855
3023
  * Get all pending board operations
2856
3024
  */
2857
- pendingBoards(): Array<PendingBoard>;
3025
+ pendingBoards(asyncOpts_?: {
3026
+ signal: AbortSignal;
3027
+ }): Promise<Array<PendingBoard>>;
2858
3028
  /**
2859
3029
  * Get total amount in pending exits (sats)
2860
3030
  */
2861
- pendingExitsTotalSats(): bigint;
3031
+ pendingExitsTotalSats(asyncOpts_?: {
3032
+ signal: AbortSignal;
3033
+ }): Promise</*u64*/ bigint>;
2862
3034
  /**
2863
3035
  * Get all pending lightning receives
2864
3036
  */
2865
- pendingLightningReceives(): Array<LightningReceive>;
3037
+ pendingLightningReceives(asyncOpts_?: {
3038
+ signal: AbortSignal;
3039
+ }): Promise<Array<LightningReceive>>;
2866
3040
  /**
2867
3041
  * Get VTXOs locked in pending Lightning sends
2868
3042
  */
2869
- pendingLightningSendVtxos(): Array<Vtxo>;
3043
+ pendingLightningSendVtxos(asyncOpts_?: {
3044
+ signal: AbortSignal;
3045
+ }): Promise<Array<Vtxo>>;
2870
3046
  /**
2871
3047
  * Get all pending lightning sends
2872
3048
  */
2873
- pendingLightningSends(): Array<LightningSend>;
3049
+ pendingLightningSends(asyncOpts_?: {
3050
+ signal: AbortSignal;
3051
+ }): Promise<Array<LightningSend>>;
2874
3052
  /**
2875
3053
  * Get VTXOs being used as inputs in pending rounds
2876
3054
  */
2877
- pendingRoundInputVtxos(): Array<Vtxo>;
3055
+ pendingRoundInputVtxos(asyncOpts_?: {
3056
+ signal: AbortSignal;
3057
+ }): Promise<Array<Vtxo>>;
2878
3058
  /**
2879
3059
  * Get all pending round states
2880
3060
  */
2881
- pendingRoundStates(): Array<RoundState>;
3061
+ pendingRoundStates(asyncOpts_?: {
3062
+ signal: AbortSignal;
3063
+ }): Promise<Array<RoundState>>;
2882
3064
  /**
2883
3065
  * Progress unilateral exits (broadcast, fee bump, advance state machine)
2884
3066
  *
@@ -2890,35 +3072,51 @@ export interface WalletInterface {
2890
3072
  * * `onchain_wallet` - Onchain wallet for building exit transactions
2891
3073
  * * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
2892
3074
  */
2893
- progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined): Array<ExitProgressStatus>;
3075
+ progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
3076
+ signal: AbortSignal;
3077
+ }): Promise<Array<ExitProgressStatus>>;
2894
3078
  /**
2895
3079
  * Progress pending rounds
2896
3080
  *
2897
3081
  * Advances the state of all pending rounds. Call periodically.
2898
3082
  */
2899
- progressPendingRounds(): void;
3083
+ progressPendingRounds(asyncOpts_?: {
3084
+ signal: AbortSignal;
3085
+ }): Promise<void>;
2900
3086
  /**
2901
3087
  * Get wallet properties
2902
3088
  */
2903
- properties(): WalletProperties;
3089
+ properties(asyncOpts_?: {
3090
+ signal: AbortSignal;
3091
+ }): Promise<WalletProperties>;
2904
3092
  /**
2905
3093
  * Refresh the Ark server connection
2906
3094
  *
2907
3095
  * Re-establishes connection if it was lost.
2908
3096
  */
2909
- refreshServer(): void;
3097
+ refreshServer(asyncOpts_?: {
3098
+ signal: AbortSignal;
3099
+ }): Promise<void>;
2910
3100
  /**
2911
3101
  * Refresh specific VTXOs
2912
3102
  */
2913
- refreshVtxos(vtxoIds: Array<string>): /*throws*/ string | undefined;
3103
+ refreshVtxos(vtxoIds: Array<string>, asyncOpts_?: {
3104
+ signal: AbortSignal;
3105
+ }): Promise<string | undefined>;
2914
3106
  /**
2915
3107
  * Refresh VTXOs in delegated (non-interactive) mode
2916
3108
  *
2917
3109
  * Returns the round state if a refresh was scheduled, null otherwise.
2918
3110
  */
2919
- refreshVtxosDelegated(vtxoIds: Array<string>): /*throws*/ RoundState | undefined;
2920
- sendArkoorPayment(arkAddress: string, amountSats: bigint): string;
2921
- sendOnchain(address: string, amountSats: bigint): string;
3111
+ refreshVtxosDelegated(vtxoIds: Array<string>, asyncOpts_?: {
3112
+ signal: AbortSignal;
3113
+ }): Promise<RoundState | undefined>;
3114
+ sendArkoorPayment(arkAddress: string, amountSats: bigint, asyncOpts_?: {
3115
+ signal: AbortSignal;
3116
+ }): Promise<string>;
3117
+ sendOnchain(address: string, amountSats: bigint, asyncOpts_?: {
3118
+ signal: AbortSignal;
3119
+ }): Promise<string>;
2922
3120
  /**
2923
3121
  * Sign exit claim inputs in an external PSBT
2924
3122
  *
@@ -2931,36 +3129,52 @@ export interface WalletInterface {
2931
3129
  *
2932
3130
  * Returns the signed PSBT
2933
3131
  */
2934
- signExitClaimInputs(psbtBase64: string): string;
3132
+ signExitClaimInputs(psbtBase64: string, asyncOpts_?: {
3133
+ signal: AbortSignal;
3134
+ }): Promise<string>;
2935
3135
  /**
2936
3136
  * Get all spendable VTXOs
2937
3137
  */
2938
- spendableVtxos(): Array<Vtxo>;
3138
+ spendableVtxos(asyncOpts_?: {
3139
+ signal: AbortSignal;
3140
+ }): Promise<Array<Vtxo>>;
2939
3141
  /**
2940
3142
  * Start unilateral exit for the entire wallet
2941
3143
  */
2942
- startExitForEntireWallet(): void;
3144
+ startExitForEntireWallet(asyncOpts_?: {
3145
+ signal: AbortSignal;
3146
+ }): Promise<void>;
2943
3147
  /**
2944
3148
  * Start unilateral exit for specific VTXOs
2945
3149
  *
2946
3150
  * Marks specific VTXOs for exit. Call progress_exits() to actually advance them.
2947
3151
  */
2948
- startExitForVtxos(vtxoIds: Array<string>): void;
3152
+ startExitForVtxos(vtxoIds: Array<string>, asyncOpts_?: {
3153
+ signal: AbortSignal;
3154
+ }): Promise<void>;
2949
3155
  /**
2950
3156
  * Lightweight sync with Ark server and blockchain
2951
3157
  * Note: Bark's sync() handles errors internally with logging.
2952
3158
  * The Throws annotation is for forward compatibility only.
2953
3159
  */
2954
- sync(): void;
3160
+ sync(asyncOpts_?: {
3161
+ signal: AbortSignal;
3162
+ }): Promise<void>;
2955
3163
  /**
2956
3164
  * Sync exit state (checks status but doesn't progress)
2957
3165
  */
2958
- syncExits(onchainWallet: OnchainWalletInterface): void;
3166
+ syncExits(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3167
+ signal: AbortSignal;
3168
+ }): Promise<void>;
2959
3169
  /**
2960
3170
  * Sync pending board transactions
2961
3171
  */
2962
- syncPendingBoards(): void;
2963
- tryClaimAllLightningReceives(wait: boolean): Array<LightningReceive>;
3172
+ syncPendingBoards(asyncOpts_?: {
3173
+ signal: AbortSignal;
3174
+ }): Promise<void>;
3175
+ tryClaimAllLightningReceives(wait: boolean, asyncOpts_?: {
3176
+ signal: AbortSignal;
3177
+ }): Promise<Array<LightningReceive>>;
2964
3178
  /**
2965
3179
  * Try to claim a specific lightning receive by payment hash
2966
3180
  *
@@ -2969,7 +3183,9 @@ export interface WalletInterface {
2969
3183
  * * `payment_hash` - Payment hash as hex string
2970
3184
  * * `wait` - Whether to wait for claim to complete
2971
3185
  */
2972
- tryClaimLightningReceive(paymentHash: string, wait: boolean): void;
3186
+ tryClaimLightningReceive(paymentHash: string, wait: boolean, asyncOpts_?: {
3187
+ signal: AbortSignal;
3188
+ }): Promise<void>;
2973
3189
  /**
2974
3190
  * Validate an Ark address against the connected server
2975
3191
  *
@@ -2977,8 +3193,12 @@ export interface WalletInterface {
2977
3193
  * belongs to the currently connected Ark server.
2978
3194
  * For basic format validation only, use validate_ark_address() instead.
2979
3195
  */
2980
- validateArkoorAddress(address: string): boolean;
2981
- vtxos(): Array<Vtxo>;
3196
+ validateArkoorAddress(address: string, asyncOpts_?: {
3197
+ signal: AbortSignal;
3198
+ }): Promise<boolean>;
3199
+ vtxos(asyncOpts_?: {
3200
+ signal: AbortSignal;
3201
+ }): Promise<Array<Vtxo>>;
2982
3202
  }
2983
3203
  /**
2984
3204
  * The main Bark wallet interface for Ark operations
@@ -2991,43 +3211,65 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
2991
3211
  /**
2992
3212
  * Create a new Bark wallet
2993
3213
  */
2994
- static create(mnemonic: string, config: Config, datadir: string, forceRescan: boolean): WalletInterface;
3214
+ static create(mnemonic: string, config: Config, datadir: string, forceRescan: boolean, asyncOpts_?: {
3215
+ signal: AbortSignal;
3216
+ }): Promise<WalletInterface>;
2995
3217
  /**
2996
3218
  * Create a new Bark wallet WITH onchain capabilities
2997
3219
  */
2998
- static createWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, forceRescan: boolean): WalletInterface;
3220
+ static createWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, forceRescan: boolean, asyncOpts_?: {
3221
+ signal: AbortSignal;
3222
+ }): Promise<WalletInterface>;
2999
3223
  /**
3000
3224
  * Open an existing Bark wallet
3001
3225
  */
3002
- static open(mnemonic: string, config: Config, datadir: string): WalletInterface;
3226
+ static open(mnemonic: string, config: Config, datadir: string, asyncOpts_?: {
3227
+ signal: AbortSignal;
3228
+ }): Promise<WalletInterface>;
3003
3229
  /**
3004
3230
  * Open an existing Bark wallet WITH onchain capabilities
3005
3231
  */
3006
- static openWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface): WalletInterface;
3232
+ static openWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3233
+ signal: AbortSignal;
3234
+ }): Promise<WalletInterface>;
3007
3235
  /**
3008
3236
  * Get earliest block height when all exits will be claimable
3009
3237
  *
3010
3238
  * Returns null if no exits or any exit has undetermined claimability.
3011
3239
  */
3012
- allExitsClaimableAtHeight(): /*u32*/ number | undefined;
3240
+ allExitsClaimableAtHeight(asyncOpts_?: {
3241
+ signal: AbortSignal;
3242
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
3013
3243
  /**
3014
3244
  * Get all VTXOs (including spent)
3015
3245
  */
3016
- allVtxos(): Array<Vtxo>;
3246
+ allVtxos(asyncOpts_?: {
3247
+ signal: AbortSignal;
3248
+ }): Promise<Array<Vtxo>>;
3017
3249
  /**
3018
3250
  * Get Ark server info (null if not connected)
3019
3251
  */
3020
- arkInfo(): ArkInfo | undefined;
3021
- balance(): Balance;
3252
+ arkInfo(asyncOpts_?: {
3253
+ signal: AbortSignal;
3254
+ }): Promise<ArkInfo | undefined>;
3255
+ balance(asyncOpts_?: {
3256
+ signal: AbortSignal;
3257
+ }): Promise<Balance>;
3022
3258
  /**
3023
3259
  * Board all funds from onchain wallet into Ark
3024
3260
  */
3025
- boardAll(onchainWallet: OnchainWalletInterface): PendingBoard;
3261
+ boardAll(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3262
+ signal: AbortSignal;
3263
+ }): Promise<PendingBoard>;
3026
3264
  /**
3027
3265
  * Board a specific amount from onchain wallet into Ark
3028
3266
  */
3029
- boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint): PendingBoard;
3030
- bolt11Invoice(amountSats: bigint): LightningInvoice;
3267
+ boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint, asyncOpts_?: {
3268
+ signal: AbortSignal;
3269
+ }): Promise<PendingBoard>;
3270
+ bolt11Invoice(amountSats: bigint, asyncOpts_?: {
3271
+ signal: AbortSignal;
3272
+ }): Promise<LightningInvoice>;
3031
3273
  /**
3032
3274
  * Broadcast a signed transaction to the Bitcoin network
3033
3275
  *
@@ -3040,15 +3282,21 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3040
3282
  *
3041
3283
  * Returns the transaction ID (txid) of the broadcasted transaction
3042
3284
  */
3043
- broadcastTx(txHex: string): string;
3285
+ broadcastTx(txHex: string, asyncOpts_?: {
3286
+ signal: AbortSignal;
3287
+ }): Promise<string>;
3044
3288
  /**
3045
3289
  * Cancel all pending rounds
3046
3290
  */
3047
- cancelAllPendingRounds(): void;
3291
+ cancelAllPendingRounds(asyncOpts_?: {
3292
+ signal: AbortSignal;
3293
+ }): Promise<void>;
3048
3294
  /**
3049
3295
  * Cancel a specific pending round
3050
3296
  */
3051
- cancelPendingRound(roundId: number): void;
3297
+ cancelPendingRound(roundId: number, asyncOpts_?: {
3298
+ signal: AbortSignal;
3299
+ }): Promise<void>;
3052
3300
  /**
3053
3301
  * Check lightning payment status by payment hash
3054
3302
  *
@@ -3059,15 +3307,21 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3059
3307
  *
3060
3308
  * Returns the preimage if payment is successful, null if still pending
3061
3309
  */
3062
- checkLightningPayment(paymentHash: string, wait: boolean): string | undefined;
3310
+ checkLightningPayment(paymentHash: string, wait: boolean, asyncOpts_?: {
3311
+ signal: AbortSignal;
3312
+ }): Promise<string | undefined>;
3063
3313
  /**
3064
3314
  * Get claimable lightning receive balance
3065
3315
  */
3066
- claimableLightningReceiveBalanceSats(): bigint;
3316
+ claimableLightningReceiveBalanceSats(asyncOpts_?: {
3317
+ signal: AbortSignal;
3318
+ }): Promise</*u64*/ bigint>;
3067
3319
  /**
3068
3320
  * Get wallet config
3069
3321
  */
3070
- config(): Config;
3322
+ config(asyncOpts_?: {
3323
+ signal: AbortSignal;
3324
+ }): Promise<Config>;
3071
3325
  /**
3072
3326
  * Drain claimable exits to an address
3073
3327
  *
@@ -3080,37 +3334,49 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3080
3334
  * * `address` - Bitcoin address to send claimed funds to
3081
3335
  * * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
3082
3336
  */
3083
- drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined): ExitClaimTransaction;
3337
+ drainExits(vtxoIds: Array<string>, address: string, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
3338
+ signal: AbortSignal;
3339
+ }): Promise<ExitClaimTransaction>;
3084
3340
  /**
3085
3341
  * Estimate the fee for a board operation
3086
3342
  *
3087
3343
  * # Arguments
3088
3344
  *
3089
3345
  * * `amount_sats` - Amount to board in sats
3090
- *
3091
- * Returns the estimated fee in sats
3092
3346
  */
3093
- estimateBoardFee(amountSats: bigint): bigint;
3347
+ estimateBoardFee(amountSats: bigint, asyncOpts_?: {
3348
+ signal: AbortSignal;
3349
+ }): Promise<FeeEstimate>;
3094
3350
  /**
3095
3351
  * Estimate the fee for a lightning receive
3096
3352
  *
3097
3353
  * # Arguments
3098
3354
  *
3099
3355
  * * `amount_sats` - Amount to receive in sats
3100
- *
3101
- * Returns the estimated fee in sats
3102
3356
  */
3103
- estimateLightningReceiveFee(amountSats: bigint): bigint;
3357
+ estimateLightningReceiveFee(amountSats: bigint, asyncOpts_?: {
3358
+ signal: AbortSignal;
3359
+ }): Promise<FeeEstimate>;
3104
3360
  /**
3105
3361
  * Estimate the fee for a lightning send
3106
3362
  *
3107
3363
  * # Arguments
3108
3364
  *
3109
3365
  * * `amount_sats` - Amount to send in sats
3366
+ */
3367
+ estimateLightningSendFee(amountSats: bigint, asyncOpts_?: {
3368
+ signal: AbortSignal;
3369
+ }): Promise<FeeEstimate>;
3370
+ /**
3371
+ * Estimate the fee for offboarding all spendable VTXOs
3110
3372
  *
3111
- * Returns the estimated fee in sats
3373
+ * # Arguments
3374
+ *
3375
+ * * `address` - Destination address for the offboard
3112
3376
  */
3113
- estimateLightningSendFee(amountSats: bigint): bigint;
3377
+ estimateOffboardAllFee(address: string, asyncOpts_?: {
3378
+ signal: AbortSignal;
3379
+ }): Promise<FeeEstimate>;
3114
3380
  /**
3115
3381
  * Estimate the fee for an offboard operation
3116
3382
  *
@@ -3118,20 +3384,20 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3118
3384
  *
3119
3385
  * * `address` - Destination address for the offboard
3120
3386
  * * `vtxo_ids` - VTXOs to offboard
3121
- *
3122
- * Returns the estimated fee in sats
3123
3387
  */
3124
- estimateOffboardFee(address: string, vtxoIds: Array<string>): bigint;
3388
+ estimateOffboardFee(address: string, vtxoIds: Array<string>, asyncOpts_?: {
3389
+ signal: AbortSignal;
3390
+ }): Promise<FeeEstimate>;
3125
3391
  /**
3126
3392
  * Estimate the fee for a refresh operation
3127
3393
  *
3128
3394
  * # Arguments
3129
3395
  *
3130
3396
  * * `vtxo_ids` - VTXOs to refresh
3131
- *
3132
- * Returns the estimated fee in sats
3133
3397
  */
3134
- estimateRefreshFee(vtxoIds: Array<string>): bigint;
3398
+ estimateRefreshFee(vtxoIds: Array<string>, asyncOpts_?: {
3399
+ signal: AbortSignal;
3400
+ }): Promise<FeeEstimate>;
3135
3401
  /**
3136
3402
  * Estimate the fee for a send onchain operation
3137
3403
  *
@@ -3139,10 +3405,10 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3139
3405
  *
3140
3406
  * * `address` - Destination address
3141
3407
  * * `amount_sats` - Amount to send in sats
3142
- *
3143
- * Returns the estimated fee in sats
3144
3408
  */
3145
- estimateSendOnchainFee(address: string, amountSats: bigint): bigint;
3409
+ estimateSendOnchainFee(address: string, amountSats: bigint, asyncOpts_?: {
3410
+ signal: AbortSignal;
3411
+ }): Promise<FeeEstimate>;
3146
3412
  /**
3147
3413
  * Get the wallet's BIP32 fingerprint
3148
3414
  */
@@ -3158,44 +3424,62 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3158
3424
  * * `include_history` - Whether to include full state machine history
3159
3425
  * * `include_transactions` - Whether to include transaction details
3160
3426
  */
3161
- getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean): ExitTransactionStatus | undefined;
3427
+ getExitStatus(vtxoId: string, includeHistory: boolean, includeTransactions: boolean, asyncOpts_?: {
3428
+ signal: AbortSignal;
3429
+ }): Promise<ExitTransactionStatus | undefined>;
3162
3430
  /**
3163
3431
  * Get all VTXOs currently in exit process
3164
3432
  */
3165
- getExitVtxos(): Array<ExitVtxo>;
3433
+ getExitVtxos(asyncOpts_?: {
3434
+ signal: AbortSignal;
3435
+ }): Promise<Array<ExitVtxo>>;
3166
3436
  /**
3167
3437
  * Get VTXOs expiring within threshold blocks
3168
3438
  */
3169
- getExpiringVtxos(thresholdBlocks: number): Array<Vtxo>;
3439
+ getExpiringVtxos(thresholdBlocks: number, asyncOpts_?: {
3440
+ signal: AbortSignal;
3441
+ }): Promise<Array<Vtxo>>;
3170
3442
  /**
3171
3443
  * Get the block height of the first expiring VTXO
3172
3444
  *
3173
3445
  * Returns null if there are no spendable VTXOs.
3174
3446
  */
3175
- getFirstExpiringVtxoBlockheight(): /*u32*/ number | undefined;
3447
+ getFirstExpiringVtxoBlockheight(asyncOpts_?: {
3448
+ signal: AbortSignal;
3449
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
3176
3450
  /**
3177
3451
  * Get the next block height when a refresh should be performed
3178
3452
  *
3179
3453
  * This is calculated as the first expiring VTXO height minus the refresh threshold.
3180
3454
  * Returns null if there are no VTXOs to refresh.
3181
3455
  */
3182
- getNextRequiredRefreshBlockheight(): /*u32*/ number | undefined;
3456
+ getNextRequiredRefreshBlockheight(asyncOpts_?: {
3457
+ signal: AbortSignal;
3458
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
3183
3459
  /**
3184
3460
  * Get a specific VTXO by ID
3185
3461
  */
3186
- getVtxoById(vtxoId: string): Vtxo;
3462
+ getVtxoById(vtxoId: string, asyncOpts_?: {
3463
+ signal: AbortSignal;
3464
+ }): Promise<Vtxo>;
3187
3465
  /**
3188
3466
  * Get VTXOs that should be refreshed
3189
3467
  */
3190
- getVtxosToRefresh(): Array<Vtxo>;
3468
+ getVtxosToRefresh(asyncOpts_?: {
3469
+ signal: AbortSignal;
3470
+ }): Promise<Array<Vtxo>>;
3191
3471
  /**
3192
3472
  * Check if any exits are pending
3193
3473
  */
3194
- hasPendingExits(): boolean;
3474
+ hasPendingExits(asyncOpts_?: {
3475
+ signal: AbortSignal;
3476
+ }): Promise<boolean>;
3195
3477
  /**
3196
3478
  * Get all wallet movements (transaction history)
3197
3479
  */
3198
- history(): Array<Movement>;
3480
+ history(asyncOpts_?: {
3481
+ signal: AbortSignal;
3482
+ }): Promise<Array<Movement>>;
3199
3483
  /**
3200
3484
  * Get wallet movements filtered by payment method
3201
3485
  *
@@ -3204,7 +3488,9 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3204
3488
  * * `payment_method_type` - Type (e.g. "ark", "bitcoin", "invoice", "offer", "lightning_address", "custom")
3205
3489
  * * `payment_method_value` - Value (e.g. an address or invoice string)
3206
3490
  */
3207
- historyByPaymentMethod(paymentMethodType: string, paymentMethodValue: string): Array<Movement>;
3491
+ historyByPaymentMethod(paymentMethodType: string, paymentMethodValue: string, asyncOpts_?: {
3492
+ signal: AbortSignal;
3493
+ }): Promise<Array<Movement>>;
3208
3494
  /**
3209
3495
  * Import a serialized VTXO into the wallet
3210
3496
  *
@@ -3215,7 +3501,9 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3215
3501
  *
3216
3502
  * * `vtxo_base64` - Base64-encoded serialized VTXO
3217
3503
  */
3218
- importVtxo(vtxoBase64: string): void;
3504
+ importVtxo(vtxoBase64: string, asyncOpts_?: {
3505
+ signal: AbortSignal;
3506
+ }): Promise<void>;
3219
3507
  /**
3220
3508
  * Get lightning receive status by payment hash
3221
3509
  *
@@ -3223,13 +3511,17 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3223
3511
  *
3224
3512
  * * `payment_hash` - Payment hash as hex string
3225
3513
  */
3226
- lightningReceiveStatus(paymentHash: string): LightningReceive | undefined;
3514
+ lightningReceiveStatus(paymentHash: string, asyncOpts_?: {
3515
+ signal: AbortSignal;
3516
+ }): Promise<LightningReceive | undefined>;
3227
3517
  /**
3228
3518
  * List all exits that are claimable
3229
3519
  *
3230
3520
  * Returns exits ready to be drained to onchain wallet.
3231
3521
  */
3232
- listClaimableExits(): Array<ExitVtxo>;
3522
+ listClaimableExits(asyncOpts_?: {
3523
+ signal: AbortSignal;
3524
+ }): Promise<Array<ExitVtxo>>;
3233
3525
  /**
3234
3526
  * Create a new authorization for your server mailbox
3235
3527
  *
@@ -3250,48 +3542,68 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3250
3542
  * Returns the mailbox identifier as a hex-encoded public key.
3251
3543
  */
3252
3544
  mailboxIdentifier(): string;
3253
- maintenance(): void;
3545
+ maintenance(asyncOpts_?: {
3546
+ signal: AbortSignal;
3547
+ }): Promise<void>;
3254
3548
  /**
3255
3549
  * Perform maintenance in delegated (non-interactive) mode
3256
3550
  *
3257
3551
  * This schedules refresh operations but doesn't wait for completion.
3258
3552
  * Use this when you want to queue operations without blocking.
3259
3553
  */
3260
- maintenanceDelegated(): void;
3554
+ maintenanceDelegated(asyncOpts_?: {
3555
+ signal: AbortSignal;
3556
+ }): Promise<void>;
3261
3557
  /**
3262
3558
  * Perform maintenance refresh
3263
3559
  */
3264
- maintenanceRefresh(): string | undefined;
3560
+ maintenanceRefresh(asyncOpts_?: {
3561
+ signal: AbortSignal;
3562
+ }): Promise<string | undefined>;
3265
3563
  /**
3266
3564
  * Full maintenance including onchain wallet sync
3267
3565
  *
3268
3566
  * More thorough than maintenance() - also syncs onchain wallet and exits.
3269
3567
  */
3270
- maintenanceWithOnchain(onchainWallet: OnchainWalletInterface): void;
3568
+ maintenanceWithOnchain(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3569
+ signal: AbortSignal;
3570
+ }): Promise<void>;
3271
3571
  /**
3272
3572
  * Perform maintenance with onchain wallet in delegated mode
3273
3573
  */
3274
- maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface): void;
3574
+ maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3575
+ signal: AbortSignal;
3576
+ }): Promise<void>;
3275
3577
  /**
3276
3578
  * Schedule a maintenance refresh if VTXOs need refreshing
3277
3579
  *
3278
3580
  * Returns the round ID if a refresh was scheduled, null otherwise.
3279
3581
  */
3280
- maybeScheduleMaintenanceRefresh(): /*u32*/ number | undefined;
3582
+ maybeScheduleMaintenanceRefresh(asyncOpts_?: {
3583
+ signal: AbortSignal;
3584
+ }): Promise</*u32*/ /*u32*/ number | undefined>;
3281
3585
  /**
3282
3586
  * Get the Bitcoin network this wallet is using
3283
3587
  */
3284
- network(): Network;
3285
- newAddress(): string;
3588
+ network(asyncOpts_?: {
3589
+ signal: AbortSignal;
3590
+ }): Promise<Network>;
3591
+ newAddress(asyncOpts_?: {
3592
+ signal: AbortSignal;
3593
+ }): Promise<string>;
3286
3594
  /**
3287
3595
  * Generate a new address and return it with its index
3288
3596
  */
3289
- newAddressWithIndex(): AddressWithIndex;
3597
+ newAddressWithIndex(asyncOpts_?: {
3598
+ signal: AbortSignal;
3599
+ }): Promise<AddressWithIndex>;
3290
3600
  /**
3291
3601
  * Get the timestamp when the next round will start (Unix timestamp in seconds)
3292
3602
  * Returns an error if the server hasn't provided round timing info
3293
3603
  */
3294
- nextRoundStartTime(): bigint;
3604
+ nextRoundStartTime(asyncOpts_?: {
3605
+ signal: AbortSignal;
3606
+ }): Promise</*u64*/ bigint>;
3295
3607
  /**
3296
3608
  * Get a pull-based notification holder for this wallet.
3297
3609
  *
@@ -3300,13 +3612,21 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3300
3612
  * destroying the stream.
3301
3613
  */
3302
3614
  notifications(): NotificationHolderInterface;
3303
- offboardAll(bitcoinAddress: string): OffboardResult;
3615
+ offboardAll(bitcoinAddress: string, asyncOpts_?: {
3616
+ signal: AbortSignal;
3617
+ }): Promise<OffboardResult>;
3304
3618
  /**
3305
3619
  * Offboard specific VTXOs to a Bitcoin address
3306
3620
  */
3307
- offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string): string;
3308
- payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined): LightningSend;
3309
- payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
3621
+ offboardVtxos(vtxoIds: Array<string>, bitcoinAddress: string, asyncOpts_?: {
3622
+ signal: AbortSignal;
3623
+ }): Promise<string>;
3624
+ payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined, asyncOpts_?: {
3625
+ signal: AbortSignal;
3626
+ }): Promise<LightningSend>;
3627
+ payLightningInvoice(invoice: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
3628
+ signal: AbortSignal;
3629
+ }): Promise<LightningSend>;
3310
3630
  /**
3311
3631
  * Pay a BOLT12 lightning offer
3312
3632
  *
@@ -3315,47 +3635,69 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3315
3635
  * * `offer` - BOLT12 offer string
3316
3636
  * * `amount_sats` - Optional amount in sats (required if offer doesn't specify amount)
3317
3637
  */
3318
- payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined): LightningSend;
3638
+ payLightningOffer(offer: string, amountSats: /*u64*/ bigint | undefined, asyncOpts_?: {
3639
+ signal: AbortSignal;
3640
+ }): Promise<LightningSend>;
3319
3641
  /**
3320
3642
  * DEPRECATED: use `peek_address` instead
3321
3643
  */
3322
- peakAddress(index: number): string;
3644
+ peakAddress(index: number, asyncOpts_?: {
3645
+ signal: AbortSignal;
3646
+ }): Promise<string>;
3323
3647
  /**
3324
3648
  * Peek at an address at a specific index
3325
3649
  */
3326
- peekAddress(index: number): string;
3650
+ peekAddress(index: number, asyncOpts_?: {
3651
+ signal: AbortSignal;
3652
+ }): Promise<string>;
3327
3653
  /**
3328
3654
  * Get all VTXOs that are part of pending boards
3329
3655
  */
3330
- pendingBoardVtxos(): Array<Vtxo>;
3656
+ pendingBoardVtxos(asyncOpts_?: {
3657
+ signal: AbortSignal;
3658
+ }): Promise<Array<Vtxo>>;
3331
3659
  /**
3332
3660
  * Get all pending board operations
3333
3661
  */
3334
- pendingBoards(): Array<PendingBoard>;
3662
+ pendingBoards(asyncOpts_?: {
3663
+ signal: AbortSignal;
3664
+ }): Promise<Array<PendingBoard>>;
3335
3665
  /**
3336
3666
  * Get total amount in pending exits (sats)
3337
3667
  */
3338
- pendingExitsTotalSats(): bigint;
3668
+ pendingExitsTotalSats(asyncOpts_?: {
3669
+ signal: AbortSignal;
3670
+ }): Promise</*u64*/ bigint>;
3339
3671
  /**
3340
3672
  * Get all pending lightning receives
3341
3673
  */
3342
- pendingLightningReceives(): Array<LightningReceive>;
3674
+ pendingLightningReceives(asyncOpts_?: {
3675
+ signal: AbortSignal;
3676
+ }): Promise<Array<LightningReceive>>;
3343
3677
  /**
3344
3678
  * Get VTXOs locked in pending Lightning sends
3345
3679
  */
3346
- pendingLightningSendVtxos(): Array<Vtxo>;
3680
+ pendingLightningSendVtxos(asyncOpts_?: {
3681
+ signal: AbortSignal;
3682
+ }): Promise<Array<Vtxo>>;
3347
3683
  /**
3348
3684
  * Get all pending lightning sends
3349
3685
  */
3350
- pendingLightningSends(): Array<LightningSend>;
3686
+ pendingLightningSends(asyncOpts_?: {
3687
+ signal: AbortSignal;
3688
+ }): Promise<Array<LightningSend>>;
3351
3689
  /**
3352
3690
  * Get VTXOs being used as inputs in pending rounds
3353
3691
  */
3354
- pendingRoundInputVtxos(): Array<Vtxo>;
3692
+ pendingRoundInputVtxos(asyncOpts_?: {
3693
+ signal: AbortSignal;
3694
+ }): Promise<Array<Vtxo>>;
3355
3695
  /**
3356
3696
  * Get all pending round states
3357
3697
  */
3358
- pendingRoundStates(): Array<RoundState>;
3698
+ pendingRoundStates(asyncOpts_?: {
3699
+ signal: AbortSignal;
3700
+ }): Promise<Array<RoundState>>;
3359
3701
  /**
3360
3702
  * Progress unilateral exits (broadcast, fee bump, advance state machine)
3361
3703
  *
@@ -3367,35 +3709,51 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3367
3709
  * * `onchain_wallet` - Onchain wallet for building exit transactions
3368
3710
  * * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
3369
3711
  */
3370
- progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined): Array<ExitProgressStatus>;
3712
+ progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
3713
+ signal: AbortSignal;
3714
+ }): Promise<Array<ExitProgressStatus>>;
3371
3715
  /**
3372
3716
  * Progress pending rounds
3373
3717
  *
3374
3718
  * Advances the state of all pending rounds. Call periodically.
3375
3719
  */
3376
- progressPendingRounds(): void;
3720
+ progressPendingRounds(asyncOpts_?: {
3721
+ signal: AbortSignal;
3722
+ }): Promise<void>;
3377
3723
  /**
3378
3724
  * Get wallet properties
3379
3725
  */
3380
- properties(): WalletProperties;
3726
+ properties(asyncOpts_?: {
3727
+ signal: AbortSignal;
3728
+ }): Promise<WalletProperties>;
3381
3729
  /**
3382
3730
  * Refresh the Ark server connection
3383
3731
  *
3384
3732
  * Re-establishes connection if it was lost.
3385
3733
  */
3386
- refreshServer(): void;
3734
+ refreshServer(asyncOpts_?: {
3735
+ signal: AbortSignal;
3736
+ }): Promise<void>;
3387
3737
  /**
3388
3738
  * Refresh specific VTXOs
3389
3739
  */
3390
- refreshVtxos(vtxoIds: Array<string>): string | undefined;
3740
+ refreshVtxos(vtxoIds: Array<string>, asyncOpts_?: {
3741
+ signal: AbortSignal;
3742
+ }): Promise<string | undefined>;
3391
3743
  /**
3392
3744
  * Refresh VTXOs in delegated (non-interactive) mode
3393
3745
  *
3394
3746
  * Returns the round state if a refresh was scheduled, null otherwise.
3395
3747
  */
3396
- refreshVtxosDelegated(vtxoIds: Array<string>): RoundState | undefined;
3397
- sendArkoorPayment(arkAddress: string, amountSats: bigint): string;
3398
- sendOnchain(address: string, amountSats: bigint): string;
3748
+ refreshVtxosDelegated(vtxoIds: Array<string>, asyncOpts_?: {
3749
+ signal: AbortSignal;
3750
+ }): Promise<RoundState | undefined>;
3751
+ sendArkoorPayment(arkAddress: string, amountSats: bigint, asyncOpts_?: {
3752
+ signal: AbortSignal;
3753
+ }): Promise<string>;
3754
+ sendOnchain(address: string, amountSats: bigint, asyncOpts_?: {
3755
+ signal: AbortSignal;
3756
+ }): Promise<string>;
3399
3757
  /**
3400
3758
  * Sign exit claim inputs in an external PSBT
3401
3759
  *
@@ -3408,36 +3766,52 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3408
3766
  *
3409
3767
  * Returns the signed PSBT
3410
3768
  */
3411
- signExitClaimInputs(psbtBase64: string): string;
3769
+ signExitClaimInputs(psbtBase64: string, asyncOpts_?: {
3770
+ signal: AbortSignal;
3771
+ }): Promise<string>;
3412
3772
  /**
3413
3773
  * Get all spendable VTXOs
3414
3774
  */
3415
- spendableVtxos(): Array<Vtxo>;
3775
+ spendableVtxos(asyncOpts_?: {
3776
+ signal: AbortSignal;
3777
+ }): Promise<Array<Vtxo>>;
3416
3778
  /**
3417
3779
  * Start unilateral exit for the entire wallet
3418
3780
  */
3419
- startExitForEntireWallet(): void;
3781
+ startExitForEntireWallet(asyncOpts_?: {
3782
+ signal: AbortSignal;
3783
+ }): Promise<void>;
3420
3784
  /**
3421
3785
  * Start unilateral exit for specific VTXOs
3422
3786
  *
3423
3787
  * Marks specific VTXOs for exit. Call progress_exits() to actually advance them.
3424
3788
  */
3425
- startExitForVtxos(vtxoIds: Array<string>): void;
3789
+ startExitForVtxos(vtxoIds: Array<string>, asyncOpts_?: {
3790
+ signal: AbortSignal;
3791
+ }): Promise<void>;
3426
3792
  /**
3427
3793
  * Lightweight sync with Ark server and blockchain
3428
3794
  * Note: Bark's sync() handles errors internally with logging.
3429
3795
  * The Throws annotation is for forward compatibility only.
3430
3796
  */
3431
- sync(): void;
3797
+ sync(asyncOpts_?: {
3798
+ signal: AbortSignal;
3799
+ }): Promise<void>;
3432
3800
  /**
3433
3801
  * Sync exit state (checks status but doesn't progress)
3434
3802
  */
3435
- syncExits(onchainWallet: OnchainWalletInterface): void;
3803
+ syncExits(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3804
+ signal: AbortSignal;
3805
+ }): Promise<void>;
3436
3806
  /**
3437
3807
  * Sync pending board transactions
3438
3808
  */
3439
- syncPendingBoards(): void;
3440
- tryClaimAllLightningReceives(wait: boolean): Array<LightningReceive>;
3809
+ syncPendingBoards(asyncOpts_?: {
3810
+ signal: AbortSignal;
3811
+ }): Promise<void>;
3812
+ tryClaimAllLightningReceives(wait: boolean, asyncOpts_?: {
3813
+ signal: AbortSignal;
3814
+ }): Promise<Array<LightningReceive>>;
3441
3815
  /**
3442
3816
  * Try to claim a specific lightning receive by payment hash
3443
3817
  *
@@ -3446,7 +3820,9 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3446
3820
  * * `payment_hash` - Payment hash as hex string
3447
3821
  * * `wait` - Whether to wait for claim to complete
3448
3822
  */
3449
- tryClaimLightningReceive(paymentHash: string, wait: boolean): void;
3823
+ tryClaimLightningReceive(paymentHash: string, wait: boolean, asyncOpts_?: {
3824
+ signal: AbortSignal;
3825
+ }): Promise<void>;
3450
3826
  /**
3451
3827
  * Validate an Ark address against the connected server
3452
3828
  *
@@ -3454,8 +3830,12 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3454
3830
  * belongs to the currently connected Ark server.
3455
3831
  * For basic format validation only, use validate_ark_address() instead.
3456
3832
  */
3457
- validateArkoorAddress(address: string): boolean;
3458
- vtxos(): Array<Vtxo>;
3833
+ validateArkoorAddress(address: string, asyncOpts_?: {
3834
+ signal: AbortSignal;
3835
+ }): Promise<boolean>;
3836
+ vtxos(asyncOpts_?: {
3837
+ signal: AbortSignal;
3838
+ }): Promise<Array<Vtxo>>;
3459
3839
  /**
3460
3840
  * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3461
3841
  */
@@ -3560,6 +3940,13 @@ declare const _default: Readonly<{
3560
3940
  lift(value: Uint8Array): ExitVtxo;
3561
3941
  lower(value: ExitVtxo): Uint8Array;
3562
3942
  };
3943
+ FfiConverterTypeFeeEstimate: {
3944
+ read(from: RustBuffer): FeeEstimate;
3945
+ write(value: FeeEstimate, into: RustBuffer): void;
3946
+ allocationSize(value: FeeEstimate): number;
3947
+ lift(value: Uint8Array): FeeEstimate;
3948
+ lower(value: FeeEstimate): Uint8Array;
3949
+ };
3563
3950
  FfiConverterTypeLightningInvoice: {
3564
3951
  read(from: RustBuffer): LightningInvoice;
3565
3952
  write(value: LightningInvoice, into: RustBuffer): void;