@secondts/bark-react-native 0.17.0 → 0.19.0

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.
@@ -760,6 +760,61 @@ const FfiConverterTypeDestination = (() => {
760
760
  return new FFIConverter();
761
761
  })();
762
762
 
763
+ /**
764
+ * Outcome of a cancellation request.
765
+ *
766
+ * `canceled` is `true` when the exit is now canceled — including when it was
767
+ * already canceled by an earlier call, since cancellation is idempotent.
768
+ * When `false`, `reason` says why.
769
+ */
770
+ export type ExitCancelResult = {
771
+ canceled: boolean;
772
+ /**
773
+ * Present exactly when `canceled` is `false`.
774
+ */
775
+ reason?: ExitCancelFailure;
776
+ };
777
+
778
+ /**
779
+ * Generated factory for {@link ExitCancelResult} record objects.
780
+ */
781
+ export const ExitCancelResult = (() => {
782
+ const defaults = () => ({});
783
+ const create = (() => {
784
+ return uniffiCreateRecord<ExitCancelResult, ReturnType<typeof defaults>>(
785
+ defaults
786
+ );
787
+ })();
788
+ return Object.freeze({
789
+ create,
790
+ new: create,
791
+ defaults: () => Object.freeze(defaults()) as Partial<ExitCancelResult>,
792
+ });
793
+ })();
794
+
795
+ const FfiConverterTypeExitCancelResult = (() => {
796
+ type TypeName = ExitCancelResult;
797
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
798
+ read(from: RustBuffer): TypeName {
799
+ return {
800
+ canceled: FfiConverterBool.read(from),
801
+ reason: FfiConverterOptionalTypeExitCancelFailure.read(from),
802
+ };
803
+ }
804
+ write(value: TypeName, into: RustBuffer): void {
805
+ FfiConverterBool.write(value.canceled, into);
806
+ FfiConverterOptionalTypeExitCancelFailure.write(value.reason, into);
807
+ }
808
+ allocationSize(value: TypeName): number {
809
+ return (
810
+ FfiConverterBool.allocationSize(value.canceled) +
811
+ FfiConverterOptionalTypeExitCancelFailure.allocationSize(value.reason)
812
+ );
813
+ }
814
+ }
815
+ return new FFIConverter();
816
+ })();
817
+
763
818
  /**
764
819
  * Claim transaction for exited funds
765
820
  */
@@ -2575,6 +2630,207 @@ const FfiConverterTypeError = (() => {
2575
2630
  return new FfiConverter();
2576
2631
  })();
2577
2632
 
2633
+ // Enum: ExitCancelFailure
2634
+ export enum ExitCancelFailure_Tags {
2635
+ NotExiting = "NotExiting",
2636
+ TooLate = "TooLate",
2637
+ AlreadyBroadcast = "AlreadyBroadcast",
2638
+ }
2639
+ /**
2640
+ * Why a [`Wallet::cancel_exit`](crate::core::Wallet::cancel_exit) did not
2641
+ * cancel the exit.
2642
+ *
2643
+ * These are the *expected* negative outcomes of asking to cancel, not faults:
2644
+ * each is a normal state the exit can legitimately be in. Genuine failures
2645
+ * (database, chain source unreachable) still surface as `Err`.
2646
+ */
2647
+ export const ExitCancelFailure = (() => {
2648
+ type NotExiting__interface = {
2649
+ tag: ExitCancelFailure_Tags.NotExiting;
2650
+ };
2651
+
2652
+ /**
2653
+ * No exit was ever started for this VTXO.
2654
+ */
2655
+ class NotExiting_ extends UniffiEnum implements NotExiting__interface {
2656
+ /**
2657
+ * @private
2658
+ * This field is private and should not be used, use `tag` instead.
2659
+ */
2660
+ readonly [uniffiTypeNameSymbol] = "ExitCancelFailure";
2661
+ readonly tag = ExitCancelFailure_Tags.NotExiting;
2662
+ constructor() {
2663
+ super("ExitCancelFailure", "NotExiting");
2664
+ }
2665
+
2666
+ static new(): NotExiting_ {
2667
+ return new NotExiting_();
2668
+ }
2669
+
2670
+ static instanceOf(obj: any): obj is NotExiting_ {
2671
+ return obj.tag === ExitCancelFailure_Tags.NotExiting;
2672
+ }
2673
+ }
2674
+
2675
+ type TooLate__interface = {
2676
+ tag: ExitCancelFailure_Tags.TooLate;
2677
+ inner: Readonly<{ state: ExitStateKind }>;
2678
+ };
2679
+
2680
+ /**
2681
+ * The exit has progressed past its abortable window. `state` is the
2682
+ * state that blocked the cancellation.
2683
+ */
2684
+ class TooLate_ extends UniffiEnum implements TooLate__interface {
2685
+ /**
2686
+ * @private
2687
+ * This field is private and should not be used, use `tag` instead.
2688
+ */
2689
+ readonly [uniffiTypeNameSymbol] = "ExitCancelFailure";
2690
+ readonly tag = ExitCancelFailure_Tags.TooLate;
2691
+ readonly inner: Readonly<{ state: ExitStateKind }>;
2692
+ constructor(inner: { state: ExitStateKind }) {
2693
+ super("ExitCancelFailure", "TooLate");
2694
+ this.inner = Object.freeze(inner);
2695
+ }
2696
+
2697
+ static new(inner: { state: ExitStateKind }): TooLate_ {
2698
+ return new TooLate_(inner);
2699
+ }
2700
+
2701
+ static instanceOf(obj: any): obj is TooLate_ {
2702
+ return obj.tag === ExitCancelFailure_Tags.TooLate;
2703
+ }
2704
+ }
2705
+
2706
+ type AlreadyBroadcast__interface = {
2707
+ tag: ExitCancelFailure_Tags.AlreadyBroadcast;
2708
+ inner: Readonly<{ txid: string }>;
2709
+ };
2710
+
2711
+ /**
2712
+ * The final exit transaction is already in the mempool or a block, so
2713
+ * the exit can no longer be called off.
2714
+ */
2715
+ class AlreadyBroadcast_
2716
+ extends UniffiEnum
2717
+ implements AlreadyBroadcast__interface
2718
+ {
2719
+ /**
2720
+ * @private
2721
+ * This field is private and should not be used, use `tag` instead.
2722
+ */
2723
+ readonly [uniffiTypeNameSymbol] = "ExitCancelFailure";
2724
+ readonly tag = ExitCancelFailure_Tags.AlreadyBroadcast;
2725
+ readonly inner: Readonly<{ txid: string }>;
2726
+ constructor(inner: { txid: string }) {
2727
+ super("ExitCancelFailure", "AlreadyBroadcast");
2728
+ this.inner = Object.freeze(inner);
2729
+ }
2730
+
2731
+ static new(inner: { txid: string }): AlreadyBroadcast_ {
2732
+ return new AlreadyBroadcast_(inner);
2733
+ }
2734
+
2735
+ static instanceOf(obj: any): obj is AlreadyBroadcast_ {
2736
+ return obj.tag === ExitCancelFailure_Tags.AlreadyBroadcast;
2737
+ }
2738
+ }
2739
+
2740
+ function instanceOf(obj: any): obj is ExitCancelFailure {
2741
+ return obj[uniffiTypeNameSymbol] === "ExitCancelFailure";
2742
+ }
2743
+
2744
+ return Object.freeze({
2745
+ instanceOf,
2746
+ NotExiting: NotExiting_,
2747
+ TooLate: TooLate_,
2748
+ AlreadyBroadcast: AlreadyBroadcast_,
2749
+ });
2750
+ })();
2751
+
2752
+ /**
2753
+ * Why a [`Wallet::cancel_exit`](crate::core::Wallet::cancel_exit) did not
2754
+ * cancel the exit.
2755
+ *
2756
+ * These are the *expected* negative outcomes of asking to cancel, not faults:
2757
+ * each is a normal state the exit can legitimately be in. Genuine failures
2758
+ * (database, chain source unreachable) still surface as `Err`.
2759
+ */
2760
+
2761
+ export type ExitCancelFailure = InstanceType<
2762
+ (typeof ExitCancelFailure)[keyof Omit<typeof ExitCancelFailure, "instanceOf">]
2763
+ >;
2764
+
2765
+ // FfiConverter for enum ExitCancelFailure
2766
+ const FfiConverterTypeExitCancelFailure = (() => {
2767
+ const ordinalConverter = FfiConverterInt32;
2768
+ type TypeName = ExitCancelFailure;
2769
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
2770
+ read(from: RustBuffer): TypeName {
2771
+ switch (ordinalConverter.read(from)) {
2772
+ case 1:
2773
+ return new ExitCancelFailure.NotExiting();
2774
+ case 2:
2775
+ return new ExitCancelFailure.TooLate({
2776
+ state: FfiConverterTypeExitStateKind.read(from),
2777
+ });
2778
+ case 3:
2779
+ return new ExitCancelFailure.AlreadyBroadcast({
2780
+ txid: FfiConverterString.read(from),
2781
+ });
2782
+ default:
2783
+ throw new UniffiInternalError.UnexpectedEnumCase();
2784
+ }
2785
+ }
2786
+ write(value: TypeName, into: RustBuffer): void {
2787
+ switch (value.tag) {
2788
+ case ExitCancelFailure_Tags.NotExiting: {
2789
+ ordinalConverter.write(1, into);
2790
+ return;
2791
+ }
2792
+ case ExitCancelFailure_Tags.TooLate: {
2793
+ ordinalConverter.write(2, into);
2794
+ const inner = value.inner;
2795
+ FfiConverterTypeExitStateKind.write(inner.state, into);
2796
+ return;
2797
+ }
2798
+ case ExitCancelFailure_Tags.AlreadyBroadcast: {
2799
+ ordinalConverter.write(3, into);
2800
+ const inner = value.inner;
2801
+ FfiConverterString.write(inner.txid, into);
2802
+ return;
2803
+ }
2804
+ default:
2805
+ // Throwing from here means that ExitCancelFailure_Tags hasn't matched an ordinal.
2806
+ throw new UniffiInternalError.UnexpectedEnumCase();
2807
+ }
2808
+ }
2809
+ allocationSize(value: TypeName): number {
2810
+ switch (value.tag) {
2811
+ case ExitCancelFailure_Tags.NotExiting: {
2812
+ return ordinalConverter.allocationSize(1);
2813
+ }
2814
+ case ExitCancelFailure_Tags.TooLate: {
2815
+ const inner = value.inner;
2816
+ let size = ordinalConverter.allocationSize(2);
2817
+ size += FfiConverterTypeExitStateKind.allocationSize(inner.state);
2818
+ return size;
2819
+ }
2820
+ case ExitCancelFailure_Tags.AlreadyBroadcast: {
2821
+ const inner = value.inner;
2822
+ let size = ordinalConverter.allocationSize(3);
2823
+ size += FfiConverterString.allocationSize(inner.txid);
2824
+ return size;
2825
+ }
2826
+ default:
2827
+ throw new UniffiInternalError.UnexpectedEnumCase();
2828
+ }
2829
+ }
2830
+ }
2831
+ return new FFIConverter();
2832
+ })();
2833
+
2578
2834
  // Enum: ExitState
2579
2835
  export enum ExitState_Tags {
2580
2836
  Start = "Start",
@@ -3131,6 +3387,78 @@ const FfiConverterTypeExitState = (() => {
3131
3387
  return new FFIConverter();
3132
3388
  })();
3133
3389
 
3390
+ /**
3391
+ * Lightweight discriminator for [`ExitState`], mirroring
3392
+ * `bark::exit::ExitStateKind`.
3393
+ *
3394
+ * Carries no payload — use it where only the variant matters (e.g. reporting
3395
+ * which state blocked a cancellation). Serde/TS tags match upstream's
3396
+ * kebab-case serialization.
3397
+ */
3398
+ export enum ExitStateKind {
3399
+ Start,
3400
+ Processing,
3401
+ AwaitingDelta,
3402
+ Claimable,
3403
+ ClaimInProgress,
3404
+ Claimed,
3405
+ VtxoAlreadySpent,
3406
+ Canceled,
3407
+ }
3408
+
3409
+ const FfiConverterTypeExitStateKind = (() => {
3410
+ const ordinalConverter = FfiConverterInt32;
3411
+ type TypeName = ExitStateKind;
3412
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
3413
+ read(from: RustBuffer): TypeName {
3414
+ switch (ordinalConverter.read(from)) {
3415
+ case 1:
3416
+ return ExitStateKind.Start;
3417
+ case 2:
3418
+ return ExitStateKind.Processing;
3419
+ case 3:
3420
+ return ExitStateKind.AwaitingDelta;
3421
+ case 4:
3422
+ return ExitStateKind.Claimable;
3423
+ case 5:
3424
+ return ExitStateKind.ClaimInProgress;
3425
+ case 6:
3426
+ return ExitStateKind.Claimed;
3427
+ case 7:
3428
+ return ExitStateKind.VtxoAlreadySpent;
3429
+ case 8:
3430
+ return ExitStateKind.Canceled;
3431
+ default:
3432
+ throw new UniffiInternalError.UnexpectedEnumCase();
3433
+ }
3434
+ }
3435
+ write(value: TypeName, into: RustBuffer): void {
3436
+ switch (value) {
3437
+ case ExitStateKind.Start:
3438
+ return ordinalConverter.write(1, into);
3439
+ case ExitStateKind.Processing:
3440
+ return ordinalConverter.write(2, into);
3441
+ case ExitStateKind.AwaitingDelta:
3442
+ return ordinalConverter.write(3, into);
3443
+ case ExitStateKind.Claimable:
3444
+ return ordinalConverter.write(4, into);
3445
+ case ExitStateKind.ClaimInProgress:
3446
+ return ordinalConverter.write(5, into);
3447
+ case ExitStateKind.Claimed:
3448
+ return ordinalConverter.write(6, into);
3449
+ case ExitStateKind.VtxoAlreadySpent:
3450
+ return ordinalConverter.write(7, into);
3451
+ case ExitStateKind.Canceled:
3452
+ return ordinalConverter.write(8, into);
3453
+ }
3454
+ }
3455
+ allocationSize(value: TypeName): number {
3456
+ return ordinalConverter.allocationSize(0);
3457
+ }
3458
+ }
3459
+ return new FFIConverter();
3460
+ })();
3461
+
3134
3462
  // Enum: ExitTxOrigin
3135
3463
  export enum ExitTxOrigin_Tags {
3136
3464
  Wallet = "Wallet",
@@ -6316,7 +6644,7 @@ const FfiConverterTypeOnchainWallet = new FfiConverterObject(
6316
6644
  *
6317
6645
  * Wraps `core::Wallet` and adds:
6318
6646
  * - `run_async` runtime offload on every entry point
6319
- * - mailbox processor task + cancellation on drop
6647
+ * - daemon shutdown on drop
6320
6648
  * - LNURL `pay_lightning_address`
6321
6649
  * - Daemon control methods
6322
6650
  * - Notification holder
@@ -6382,6 +6710,10 @@ export interface WalletLike {
6382
6710
  cancelAllPendingRounds(asyncOpts_?: {
6383
6711
  signal: AbortSignal;
6384
6712
  }): /*throws*/ Promise<void>;
6713
+ cancelExit(
6714
+ vtxoId: string,
6715
+ asyncOpts_?: { signal: AbortSignal }
6716
+ ): /*throws*/ Promise<ExitCancelResult>;
6385
6717
  cancelLightningReceive(
6386
6718
  paymentHash: string,
6387
6719
  asyncOpts_?: { signal: AbortSignal }
@@ -6507,6 +6839,11 @@ export interface WalletLike {
6507
6839
  listClaimableExits(asyncOpts_?: {
6508
6840
  signal: AbortSignal;
6509
6841
  }): /*throws*/ Promise<Array<ExitVtxo>>;
6842
+ lockVtxos(
6843
+ vtxoIds: Array<string>,
6844
+ holder: VtxoLockHolder | undefined,
6845
+ asyncOpts_?: { signal: AbortSignal }
6846
+ ): /*throws*/ Promise<void>;
6510
6847
  mailboxAuthorization(): /*throws*/ string;
6511
6848
  mailboxIdentifier(): /*throws*/ string;
6512
6849
  maintenance(asyncOpts_?: { signal: AbortSignal }): /*throws*/ Promise<void>;
@@ -6677,6 +7014,10 @@ export interface WalletLike {
6677
7014
  vtxoIds: Array<string>,
6678
7015
  asyncOpts_?: { signal: AbortSignal }
6679
7016
  ): /*throws*/ Promise<void>;
7017
+ startExitForVtxosIncludingNonStandard(
7018
+ vtxoIds: Array<string>,
7019
+ asyncOpts_?: { signal: AbortSignal }
7020
+ ): /*throws*/ Promise<void>;
6680
7021
  stopDaemon(asyncOpts_?: { signal: AbortSignal }): /*throws*/ Promise<void>;
6681
7022
  stuckFailedLightningSends(asyncOpts_?: {
6682
7023
  signal: AbortSignal;
@@ -6705,6 +7046,11 @@ export interface WalletLike {
6705
7046
  wait: boolean,
6706
7047
  asyncOpts_?: { signal: AbortSignal }
6707
7048
  ): /*throws*/ Promise<LightningReceive>;
7049
+ unlockVtxos(
7050
+ vtxoIds: Array<string>,
7051
+ expectedHolder: VtxoLockHolder | undefined,
7052
+ asyncOpts_?: { signal: AbortSignal }
7053
+ ): /*throws*/ Promise<void>;
6708
7054
  validateArkoorAddress(
6709
7055
  address: string,
6710
7056
  asyncOpts_?: { signal: AbortSignal }
@@ -6730,7 +7076,7 @@ export type WalletInterface = WalletLike;
6730
7076
  *
6731
7077
  * Wraps `core::Wallet` and adds:
6732
7078
  * - `run_async` runtime offload on every entry point
6733
- * - mailbox processor task + cancellation on drop
7079
+ * - daemon shutdown on drop
6734
7080
  * - LNURL `pay_lightning_address`
6735
7081
  * - Daemon control methods
6736
7082
  * - Notification holder
@@ -7236,6 +7582,43 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
7236
7582
  }
7237
7583
  }
7238
7584
 
7585
+ async cancelExit(
7586
+ vtxoId: string,
7587
+ asyncOpts_?: { signal: AbortSignal }
7588
+ ): Promise<ExitCancelResult> /*throws*/ {
7589
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
7590
+ try {
7591
+ return await uniffiRustCallAsync(
7592
+ /*rustCaller:*/ uniffiCaller,
7593
+ /*rustFutureFunc:*/ () => {
7594
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_cancel_exit(
7595
+ uniffiTypeWalletObjectFactory.clonePointer(this),
7596
+ FfiConverterString.lower(vtxoId)
7597
+ );
7598
+ },
7599
+ /*pollFunc:*/ nativeModule()
7600
+ .ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,
7601
+ /*cancelFunc:*/ nativeModule()
7602
+ .ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,
7603
+ /*completeFunc:*/ nativeModule()
7604
+ .ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,
7605
+ /*freeFunc:*/ nativeModule()
7606
+ .ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,
7607
+ /*liftFunc:*/ FfiConverterTypeExitCancelResult.lift.bind(
7608
+ FfiConverterTypeExitCancelResult
7609
+ ),
7610
+ /*liftString:*/ FfiConverterString.lift,
7611
+ /*asyncOpts:*/ asyncOpts_,
7612
+ /*errorHandler:*/ FfiConverterTypeError.lift.bind(FfiConverterTypeError)
7613
+ );
7614
+ } catch (__error: any) {
7615
+ if (uniffiIsDebug && __error instanceof Error) {
7616
+ __error.stack = __stack;
7617
+ }
7618
+ throw __error;
7619
+ }
7620
+ }
7621
+
7239
7622
  async cancelLightningReceive(
7240
7623
  paymentHash: string,
7241
7624
  asyncOpts_?: { signal: AbortSignal }
@@ -8298,6 +8681,41 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
8298
8681
  }
8299
8682
  }
8300
8683
 
8684
+ async lockVtxos(
8685
+ vtxoIds: Array<string>,
8686
+ holder: VtxoLockHolder | undefined,
8687
+ asyncOpts_?: { signal: AbortSignal }
8688
+ ): Promise<void> /*throws*/ {
8689
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
8690
+ try {
8691
+ return await uniffiRustCallAsync(
8692
+ /*rustCaller:*/ uniffiCaller,
8693
+ /*rustFutureFunc:*/ () => {
8694
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lock_vtxos(
8695
+ uniffiTypeWalletObjectFactory.clonePointer(this),
8696
+ FfiConverterArrayString.lower(vtxoIds),
8697
+ FfiConverterOptionalTypeVtxoLockHolder.lower(holder)
8698
+ );
8699
+ },
8700
+ /*pollFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,
8701
+ /*cancelFunc:*/ nativeModule()
8702
+ .ubrn_ffi_bark_ffi_rust_future_cancel_void,
8703
+ /*completeFunc:*/ nativeModule()
8704
+ .ubrn_ffi_bark_ffi_rust_future_complete_void,
8705
+ /*freeFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void,
8706
+ /*liftFunc:*/ (_v) => {},
8707
+ /*liftString:*/ FfiConverterString.lift,
8708
+ /*asyncOpts:*/ asyncOpts_,
8709
+ /*errorHandler:*/ FfiConverterTypeError.lift.bind(FfiConverterTypeError)
8710
+ );
8711
+ } catch (__error: any) {
8712
+ if (uniffiIsDebug && __error instanceof Error) {
8713
+ __error.stack = __stack;
8714
+ }
8715
+ throw __error;
8716
+ }
8717
+ }
8718
+
8301
8719
  mailboxAuthorization(): string /*throws*/ {
8302
8720
  return FfiConverterString.lift(
8303
8721
  uniffiCaller.rustCallWithError(
@@ -9696,6 +10114,39 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
9696
10114
  }
9697
10115
  }
9698
10116
 
10117
+ async startExitForVtxosIncludingNonStandard(
10118
+ vtxoIds: Array<string>,
10119
+ asyncOpts_?: { signal: AbortSignal }
10120
+ ): Promise<void> /*throws*/ {
10121
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
10122
+ try {
10123
+ return await uniffiRustCallAsync(
10124
+ /*rustCaller:*/ uniffiCaller,
10125
+ /*rustFutureFunc:*/ () => {
10126
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_start_exit_for_vtxos_including_non_standard(
10127
+ uniffiTypeWalletObjectFactory.clonePointer(this),
10128
+ FfiConverterArrayString.lower(vtxoIds)
10129
+ );
10130
+ },
10131
+ /*pollFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,
10132
+ /*cancelFunc:*/ nativeModule()
10133
+ .ubrn_ffi_bark_ffi_rust_future_cancel_void,
10134
+ /*completeFunc:*/ nativeModule()
10135
+ .ubrn_ffi_bark_ffi_rust_future_complete_void,
10136
+ /*freeFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void,
10137
+ /*liftFunc:*/ (_v) => {},
10138
+ /*liftString:*/ FfiConverterString.lift,
10139
+ /*asyncOpts:*/ asyncOpts_,
10140
+ /*errorHandler:*/ FfiConverterTypeError.lift.bind(FfiConverterTypeError)
10141
+ );
10142
+ } catch (__error: any) {
10143
+ if (uniffiIsDebug && __error instanceof Error) {
10144
+ __error.stack = __stack;
10145
+ }
10146
+ throw __error;
10147
+ }
10148
+ }
10149
+
9699
10150
  async stopDaemon(asyncOpts_?: {
9700
10151
  signal: AbortSignal;
9701
10152
  }): Promise<void> /*throws*/ {
@@ -9967,6 +10418,41 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
9967
10418
  }
9968
10419
  }
9969
10420
 
10421
+ async unlockVtxos(
10422
+ vtxoIds: Array<string>,
10423
+ expectedHolder: VtxoLockHolder | undefined,
10424
+ asyncOpts_?: { signal: AbortSignal }
10425
+ ): Promise<void> /*throws*/ {
10426
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
10427
+ try {
10428
+ return await uniffiRustCallAsync(
10429
+ /*rustCaller:*/ uniffiCaller,
10430
+ /*rustFutureFunc:*/ () => {
10431
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_unlock_vtxos(
10432
+ uniffiTypeWalletObjectFactory.clonePointer(this),
10433
+ FfiConverterArrayString.lower(vtxoIds),
10434
+ FfiConverterOptionalTypeVtxoLockHolder.lower(expectedHolder)
10435
+ );
10436
+ },
10437
+ /*pollFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void,
10438
+ /*cancelFunc:*/ nativeModule()
10439
+ .ubrn_ffi_bark_ffi_rust_future_cancel_void,
10440
+ /*completeFunc:*/ nativeModule()
10441
+ .ubrn_ffi_bark_ffi_rust_future_complete_void,
10442
+ /*freeFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void,
10443
+ /*liftFunc:*/ (_v) => {},
10444
+ /*liftString:*/ FfiConverterString.lift,
10445
+ /*asyncOpts:*/ asyncOpts_,
10446
+ /*errorHandler:*/ FfiConverterTypeError.lift.bind(FfiConverterTypeError)
10447
+ );
10448
+ } catch (__error: any) {
10449
+ if (uniffiIsDebug && __error instanceof Error) {
10450
+ __error.stack = __stack;
10451
+ }
10452
+ throw __error;
10453
+ }
10454
+ }
10455
+
9970
10456
  async validateArkoorAddress(
9971
10457
  address: string,
9972
10458
  asyncOpts_?: { signal: AbortSignal }
@@ -10266,6 +10752,11 @@ const FfiConverterArrayTypeWalletTransaction = new FfiConverterArray(
10266
10752
  // FfiConverter for Array<string>
10267
10753
  const FfiConverterArrayString = new FfiConverterArray(FfiConverterString);
10268
10754
 
10755
+ // FfiConverter for ExitCancelFailure | undefined
10756
+ const FfiConverterOptionalTypeExitCancelFailure = new FfiConverterOptional(
10757
+ FfiConverterTypeExitCancelFailure
10758
+ );
10759
+
10269
10760
  // FfiConverter for VtxoLockHolder | undefined
10270
10761
  const FfiConverterOptionalTypeVtxoLockHolder = new FfiConverterOptional(
10271
10762
  FfiConverterTypeVtxoLockHolder
@@ -10620,6 +11111,14 @@ function uniffiEnsureInitialized() {
10620
11111
  "uniffi_bark_ffi_checksum_method_wallet_cancel_all_pending_rounds"
10621
11112
  );
10622
11113
  }
11114
+ if (
11115
+ nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_exit() !==
11116
+ 1772
11117
+ ) {
11118
+ throw new UniffiInternalError.ApiChecksumMismatch(
11119
+ "uniffi_bark_ffi_checksum_method_wallet_cancel_exit"
11120
+ );
11121
+ }
10623
11122
  if (
10624
11123
  nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_lightning_receive() !==
10625
11124
  49444
@@ -10860,6 +11359,14 @@ function uniffiEnsureInitialized() {
10860
11359
  "uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits"
10861
11360
  );
10862
11361
  }
11362
+ if (
11363
+ nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lock_vtxos() !==
11364
+ 25205
11365
+ ) {
11366
+ throw new UniffiInternalError.ApiChecksumMismatch(
11367
+ "uniffi_bark_ffi_checksum_method_wallet_lock_vtxos"
11368
+ );
11369
+ }
10863
11370
  if (
10864
11371
  nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_mailbox_authorization() !==
10865
11372
  52372
@@ -11188,6 +11695,14 @@ function uniffiEnsureInitialized() {
11188
11695
  "uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos"
11189
11696
  );
11190
11697
  }
11698
+ if (
11699
+ nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard() !==
11700
+ 29239
11701
+ ) {
11702
+ throw new UniffiInternalError.ApiChecksumMismatch(
11703
+ "uniffi_bark_ffi_checksum_method_wallet_start_exit_for_vtxos_including_non_standard"
11704
+ );
11705
+ }
11191
11706
  if (
11192
11707
  nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon() !==
11193
11708
  7109
@@ -11251,6 +11766,14 @@ function uniffiEnsureInitialized() {
11251
11766
  "uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive"
11252
11767
  );
11253
11768
  }
11769
+ if (
11770
+ nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos() !==
11771
+ 42168
11772
+ ) {
11773
+ throw new UniffiInternalError.ApiChecksumMismatch(
11774
+ "uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos"
11775
+ );
11776
+ }
11254
11777
  if (
11255
11778
  nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !==
11256
11779
  10861
@@ -11317,9 +11840,12 @@ export default Object.freeze({
11317
11840
  FfiConverterTypeCustomOnchainWalletCallbacks,
11318
11841
  FfiConverterTypeDestination,
11319
11842
  FfiConverterTypeError,
11843
+ FfiConverterTypeExitCancelFailure,
11844
+ FfiConverterTypeExitCancelResult,
11320
11845
  FfiConverterTypeExitClaimTransaction,
11321
11846
  FfiConverterTypeExitProgressStatus,
11322
11847
  FfiConverterTypeExitState,
11848
+ FfiConverterTypeExitStateKind,
11323
11849
  FfiConverterTypeExitTransactionStatus,
11324
11850
  FfiConverterTypeExitTx,
11325
11851
  FfiConverterTypeExitTxOrigin,