@secondts/bark-react-native 0.14.0 → 0.16.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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.WalletProperties = exports.WalletOpenArgs = exports.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.Vtxo = exports.RoundState = exports.RecoveryReport = exports.RecoveryBucket = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainBalance = exports.OffboardResult = exports.NotificationHolder = exports.Network = exports.Movement = exports.LogLevel = exports.LightningSendStatus_Tags = exports.LightningSendStatus = exports.LightningSend = exports.LightningReceive = exports.LightningInvoice = exports.FeeEstimate = exports.ExitVtxo = exports.ExitTransactionStatus = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.Exception_Tags = exports.Exception = exports.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BlockRef = exports.BarkLoggerImpl = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
6
+ exports.default = exports.WalletTransaction = exports.WalletProperties = exports.WalletOpenArgs = exports.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.VtxoState_Tags = exports.VtxoState = exports.VtxoLockHolder_Tags = exports.VtxoLockHolder = exports.Vtxo = exports.RoundState = exports.RefreshFees = exports.RecoveryReport = exports.RecoveryBucket = exports.PpmExpiryFeeEntry = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainUtxo_Tags = exports.OnchainUtxo = exports.OnchainBalance = exports.OffboardResult = exports.OffboardFees = exports.NotificationHolder = exports.Network = exports.Movement = exports.LogLevel = exports.LightningSendStatus_Tags = exports.LightningSendStatus = exports.LightningSendFees = exports.LightningSend = exports.LightningReceiveFees = exports.LightningReceive = exports.LightningInvoice = exports.FeeSchedule = exports.FeeRates = exports.FeeEstimate = exports.ExitVtxo = exports.ExitTxStatus_Tags = exports.ExitTxStatus = exports.ExitTxOrigin_Tags = exports.ExitTxOrigin = exports.ExitTx = exports.ExitTransactionStatus = exports.ExitState_Tags = exports.ExitState = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.Exception_Tags = exports.Exception = exports.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BoardFees = exports.BlockRef = exports.BarkLoggerImpl = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
7
7
  exports.extractTxFromPsbt = extractTxFromPsbt;
8
8
  exports.generateMnemonic = generateMnemonic;
9
9
  exports.initWallet = initWallet;
@@ -170,7 +170,7 @@ const FfiConverterTypeArkInfo = (() => {
170
170
  maxUserInvoiceCltvDelta: _uniffiBindgenReactNative.FfiConverterUInt16.read(from),
171
171
  minBoardAmountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
172
172
  lnReceiveAntiDosRequired: _uniffiBindgenReactNative.FfiConverterBool.read(from),
173
- feeScheduleJson: FfiConverterString.read(from),
173
+ feeSchedule: FfiConverterTypeFeeSchedule.read(from),
174
174
  maxVtxoExitDepth: _uniffiBindgenReactNative.FfiConverterUInt16.read(from)
175
175
  };
176
176
  }
@@ -188,11 +188,11 @@ const FfiConverterTypeArkInfo = (() => {
188
188
  _uniffiBindgenReactNative.FfiConverterUInt16.write(value.maxUserInvoiceCltvDelta, into);
189
189
  _uniffiBindgenReactNative.FfiConverterUInt64.write(value.minBoardAmountSats, into);
190
190
  _uniffiBindgenReactNative.FfiConverterBool.write(value.lnReceiveAntiDosRequired, into);
191
- FfiConverterString.write(value.feeScheduleJson, into);
191
+ FfiConverterTypeFeeSchedule.write(value.feeSchedule, into);
192
192
  _uniffiBindgenReactNative.FfiConverterUInt16.write(value.maxVtxoExitDepth, into);
193
193
  }
194
194
  allocationSize(value) {
195
- return FfiConverterTypeNetwork.allocationSize(value.network) + FfiConverterString.allocationSize(value.serverPubkey) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.roundIntervalSecs) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.nbRoundNonces) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vtxoExitDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcExpiryDelta) + FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations) + _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minBoardAmountSats) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired) + FfiConverterString.allocationSize(value.feeScheduleJson) + _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);
195
+ return FfiConverterTypeNetwork.allocationSize(value.network) + FfiConverterString.allocationSize(value.serverPubkey) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.roundIntervalSecs) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.nbRoundNonces) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vtxoExitDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcExpiryDelta) + FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations) + _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minBoardAmountSats) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired) + FfiConverterTypeFeeSchedule.allocationSize(value.feeSchedule) + _uniffiBindgenReactNative.FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);
196
196
  }
197
197
  }
198
198
  return new FFIConverter();
@@ -274,6 +274,45 @@ const FfiConverterTypeBlockRef = (() => {
274
274
  }
275
275
  return new FFIConverter();
276
276
  })();
277
+
278
+ /**
279
+ * Fees for boarding onchain funds into the Ark.
280
+ */
281
+
282
+ /**
283
+ * Generated factory for {@link BoardFees} record objects.
284
+ */
285
+ const BoardFees = exports.BoardFees = (() => {
286
+ const defaults = () => ({});
287
+ const create = (() => {
288
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
289
+ })();
290
+ return Object.freeze({
291
+ create,
292
+ new: create,
293
+ defaults: () => Object.freeze(defaults())
294
+ });
295
+ })();
296
+ const FfiConverterTypeBoardFees = (() => {
297
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
298
+ read(from) {
299
+ return {
300
+ minFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
301
+ baseFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
302
+ ppm: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
303
+ };
304
+ }
305
+ write(value, into) {
306
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.minFeeSats, into);
307
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.baseFeeSats, into);
308
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.ppm, into);
309
+ }
310
+ allocationSize(value) {
311
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minFeeSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.baseFeeSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.ppm);
312
+ }
313
+ }
314
+ return new FFIConverter();
315
+ })();
277
316
  /**
278
317
  * Generated factory for {@link Config} record objects.
279
318
  */
@@ -475,17 +514,17 @@ const FfiConverterTypeExitProgressStatus = (() => {
475
514
  read(from) {
476
515
  return {
477
516
  vtxoId: FfiConverterString.read(from),
478
- state: FfiConverterString.read(from),
517
+ state: FfiConverterTypeExitState.read(from),
479
518
  error: FfiConverterOptionalString.read(from)
480
519
  };
481
520
  }
482
521
  write(value, into) {
483
522
  FfiConverterString.write(value.vtxoId, into);
484
- FfiConverterString.write(value.state, into);
523
+ FfiConverterTypeExitState.write(value.state, into);
485
524
  FfiConverterOptionalString.write(value.error, into);
486
525
  }
487
526
  allocationSize(value) {
488
- return FfiConverterString.allocationSize(value.vtxoId) + FfiConverterString.allocationSize(value.state) + FfiConverterOptionalString.allocationSize(value.error);
527
+ return FfiConverterString.allocationSize(value.vtxoId) + FfiConverterTypeExitState.allocationSize(value.state) + FfiConverterOptionalString.allocationSize(value.error);
489
528
  }
490
529
  }
491
530
  return new FFIConverter();
@@ -514,19 +553,56 @@ const FfiConverterTypeExitTransactionStatus = (() => {
514
553
  read(from) {
515
554
  return {
516
555
  vtxoId: FfiConverterString.read(from),
517
- state: FfiConverterString.read(from),
518
- history: FfiConverterOptionalArrayString.read(from),
556
+ state: FfiConverterTypeExitState.read(from),
557
+ history: FfiConverterOptionalArrayTypeExitState.read(from),
519
558
  transactionCount: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
520
559
  };
521
560
  }
522
561
  write(value, into) {
523
562
  FfiConverterString.write(value.vtxoId, into);
524
- FfiConverterString.write(value.state, into);
525
- FfiConverterOptionalArrayString.write(value.history, into);
563
+ FfiConverterTypeExitState.write(value.state, into);
564
+ FfiConverterOptionalArrayTypeExitState.write(value.history, into);
526
565
  _uniffiBindgenReactNative.FfiConverterUInt32.write(value.transactionCount, into);
527
566
  }
528
567
  allocationSize(value) {
529
- return FfiConverterString.allocationSize(value.vtxoId) + FfiConverterString.allocationSize(value.state) + FfiConverterOptionalArrayString.allocationSize(value.history) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.transactionCount);
568
+ return FfiConverterString.allocationSize(value.vtxoId) + FfiConverterTypeExitState.allocationSize(value.state) + FfiConverterOptionalArrayTypeExitState.allocationSize(value.history) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.transactionCount);
569
+ }
570
+ }
571
+ return new FFIConverter();
572
+ })();
573
+
574
+ /**
575
+ * One transaction in an exit's unilateral broadcast chain.
576
+ */
577
+
578
+ /**
579
+ * Generated factory for {@link ExitTx} record objects.
580
+ */
581
+ const ExitTx = exports.ExitTx = (() => {
582
+ const defaults = () => ({});
583
+ const create = (() => {
584
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
585
+ })();
586
+ return Object.freeze({
587
+ create,
588
+ new: create,
589
+ defaults: () => Object.freeze(defaults())
590
+ });
591
+ })();
592
+ const FfiConverterTypeExitTx = (() => {
593
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
594
+ read(from) {
595
+ return {
596
+ txid: FfiConverterString.read(from),
597
+ status: FfiConverterTypeExitTxStatus.read(from)
598
+ };
599
+ }
600
+ write(value, into) {
601
+ FfiConverterString.write(value.txid, into);
602
+ FfiConverterTypeExitTxStatus.write(value.status, into);
603
+ }
604
+ allocationSize(value) {
605
+ return FfiConverterString.allocationSize(value.txid) + FfiConverterTypeExitTxStatus.allocationSize(value.status);
530
606
  }
531
607
  }
532
608
  return new FFIConverter();
@@ -556,18 +632,18 @@ const FfiConverterTypeExitVtxo = (() => {
556
632
  return {
557
633
  vtxoId: FfiConverterString.read(from),
558
634
  amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
559
- state: FfiConverterString.read(from),
635
+ state: FfiConverterTypeExitState.read(from),
560
636
  isClaimable: _uniffiBindgenReactNative.FfiConverterBool.read(from)
561
637
  };
562
638
  }
563
639
  write(value, into) {
564
640
  FfiConverterString.write(value.vtxoId, into);
565
641
  _uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
566
- FfiConverterString.write(value.state, into);
642
+ FfiConverterTypeExitState.write(value.state, into);
567
643
  _uniffiBindgenReactNative.FfiConverterBool.write(value.isClaimable, into);
568
644
  }
569
645
  allocationSize(value) {
570
- return FfiConverterString.allocationSize(value.vtxoId) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterString.allocationSize(value.state) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.isClaimable);
646
+ return FfiConverterString.allocationSize(value.vtxoId) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterTypeExitState.allocationSize(value.state) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.isClaimable);
571
647
  }
572
648
  }
573
649
  return new FFIConverter();
@@ -608,6 +684,91 @@ const FfiConverterTypeFeeEstimate = (() => {
608
684
  }
609
685
  return new FFIConverter();
610
686
  })();
687
+
688
+ /**
689
+ * Network fee rates by urgency, mirroring `bark::chain::FeeRates`.
690
+ *
691
+ * Rates are in sat/kwu (satoshis per 1000 weight units) — divide by 250 for
692
+ * sat/vB.
693
+ */
694
+
695
+ /**
696
+ * Generated factory for {@link FeeRates} record objects.
697
+ */
698
+ const FeeRates = exports.FeeRates = (() => {
699
+ const defaults = () => ({});
700
+ const create = (() => {
701
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
702
+ })();
703
+ return Object.freeze({
704
+ create,
705
+ new: create,
706
+ defaults: () => Object.freeze(defaults())
707
+ });
708
+ })();
709
+ const FfiConverterTypeFeeRates = (() => {
710
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
711
+ read(from) {
712
+ return {
713
+ fastSatPerKwu: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
714
+ regularSatPerKwu: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
715
+ slowSatPerKwu: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
716
+ };
717
+ }
718
+ write(value, into) {
719
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.fastSatPerKwu, into);
720
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.regularSatPerKwu, into);
721
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.slowSatPerKwu, into);
722
+ }
723
+ allocationSize(value) {
724
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.fastSatPerKwu) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.regularSatPerKwu) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.slowSatPerKwu);
725
+ }
726
+ }
727
+ return new FFIConverter();
728
+ })();
729
+
730
+ /**
731
+ * The Ark server's complete fee schedule, mirroring `ark::fees::FeeSchedule`.
732
+ */
733
+
734
+ /**
735
+ * Generated factory for {@link FeeSchedule} record objects.
736
+ */
737
+ const FeeSchedule = exports.FeeSchedule = (() => {
738
+ const defaults = () => ({});
739
+ const create = (() => {
740
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
741
+ })();
742
+ return Object.freeze({
743
+ create,
744
+ new: create,
745
+ defaults: () => Object.freeze(defaults())
746
+ });
747
+ })();
748
+ const FfiConverterTypeFeeSchedule = (() => {
749
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
750
+ read(from) {
751
+ return {
752
+ board: FfiConverterTypeBoardFees.read(from),
753
+ offboard: FfiConverterTypeOffboardFees.read(from),
754
+ refresh: FfiConverterTypeRefreshFees.read(from),
755
+ lightningReceive: FfiConverterTypeLightningReceiveFees.read(from),
756
+ lightningSend: FfiConverterTypeLightningSendFees.read(from)
757
+ };
758
+ }
759
+ write(value, into) {
760
+ FfiConverterTypeBoardFees.write(value.board, into);
761
+ FfiConverterTypeOffboardFees.write(value.offboard, into);
762
+ FfiConverterTypeRefreshFees.write(value.refresh, into);
763
+ FfiConverterTypeLightningReceiveFees.write(value.lightningReceive, into);
764
+ FfiConverterTypeLightningSendFees.write(value.lightningSend, into);
765
+ }
766
+ allocationSize(value) {
767
+ return FfiConverterTypeBoardFees.allocationSize(value.board) + FfiConverterTypeOffboardFees.allocationSize(value.offboard) + FfiConverterTypeRefreshFees.allocationSize(value.refresh) + FfiConverterTypeLightningReceiveFees.allocationSize(value.lightningReceive) + FfiConverterTypeLightningSendFees.allocationSize(value.lightningSend);
768
+ }
769
+ }
770
+ return new FFIConverter();
771
+ })();
611
772
  /**
612
773
  * Generated factory for {@link LightningInvoice} record objects.
613
774
  */
@@ -684,6 +845,43 @@ const FfiConverterTypeLightningReceive = (() => {
684
845
  }
685
846
  return new FFIConverter();
686
847
  })();
848
+
849
+ /**
850
+ * Fees for receiving over lightning.
851
+ */
852
+
853
+ /**
854
+ * Generated factory for {@link LightningReceiveFees} record objects.
855
+ */
856
+ const LightningReceiveFees = exports.LightningReceiveFees = (() => {
857
+ const defaults = () => ({});
858
+ const create = (() => {
859
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
860
+ })();
861
+ return Object.freeze({
862
+ create,
863
+ new: create,
864
+ defaults: () => Object.freeze(defaults())
865
+ });
866
+ })();
867
+ const FfiConverterTypeLightningReceiveFees = (() => {
868
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
869
+ read(from) {
870
+ return {
871
+ baseFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
872
+ ppm: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
873
+ };
874
+ }
875
+ write(value, into) {
876
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.baseFeeSats, into);
877
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.ppm, into);
878
+ }
879
+ allocationSize(value) {
880
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.baseFeeSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.ppm);
881
+ }
882
+ }
883
+ return new FFIConverter();
884
+ })();
687
885
  /**
688
886
  * Generated factory for {@link LightningSend} record objects.
689
887
  */
@@ -722,6 +920,45 @@ const FfiConverterTypeLightningSend = (() => {
722
920
  }
723
921
  return new FFIConverter();
724
922
  })();
923
+
924
+ /**
925
+ * Fees for sending over lightning.
926
+ */
927
+
928
+ /**
929
+ * Generated factory for {@link LightningSendFees} record objects.
930
+ */
931
+ const LightningSendFees = exports.LightningSendFees = (() => {
932
+ const defaults = () => ({});
933
+ const create = (() => {
934
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
935
+ })();
936
+ return Object.freeze({
937
+ create,
938
+ new: create,
939
+ defaults: () => Object.freeze(defaults())
940
+ });
941
+ })();
942
+ const FfiConverterTypeLightningSendFees = (() => {
943
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
944
+ read(from) {
945
+ return {
946
+ minFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
947
+ baseFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
948
+ ppmExpiryTable: FfiConverterArrayTypePpmExpiryFeeEntry.read(from)
949
+ };
950
+ }
951
+ write(value, into) {
952
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.minFeeSats, into);
953
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.baseFeeSats, into);
954
+ FfiConverterArrayTypePpmExpiryFeeEntry.write(value.ppmExpiryTable, into);
955
+ }
956
+ allocationSize(value) {
957
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.minFeeSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.baseFeeSats) + FfiConverterArrayTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);
958
+ }
959
+ }
960
+ return new FFIConverter();
961
+ })();
725
962
  /**
726
963
  * Generated factory for {@link Movement} record objects.
727
964
  */
@@ -788,6 +1025,45 @@ const FfiConverterTypeMovement = (() => {
788
1025
  }
789
1026
  return new FFIConverter();
790
1027
  })();
1028
+
1029
+ /**
1030
+ * Fees for offboarding VTXOs to an onchain address.
1031
+ */
1032
+
1033
+ /**
1034
+ * Generated factory for {@link OffboardFees} record objects.
1035
+ */
1036
+ const OffboardFees = exports.OffboardFees = (() => {
1037
+ const defaults = () => ({});
1038
+ const create = (() => {
1039
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
1040
+ })();
1041
+ return Object.freeze({
1042
+ create,
1043
+ new: create,
1044
+ defaults: () => Object.freeze(defaults())
1045
+ });
1046
+ })();
1047
+ const FfiConverterTypeOffboardFees = (() => {
1048
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1049
+ read(from) {
1050
+ return {
1051
+ baseFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
1052
+ fixedAdditionalVb: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
1053
+ ppmExpiryTable: FfiConverterArrayTypePpmExpiryFeeEntry.read(from)
1054
+ };
1055
+ }
1056
+ write(value, into) {
1057
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.baseFeeSats, into);
1058
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.fixedAdditionalVb, into);
1059
+ FfiConverterArrayTypePpmExpiryFeeEntry.write(value.ppmExpiryTable, into);
1060
+ }
1061
+ allocationSize(value) {
1062
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.baseFeeSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.fixedAdditionalVb) + FfiConverterArrayTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);
1063
+ }
1064
+ }
1065
+ return new FFIConverter();
1066
+ })();
791
1067
  /**
792
1068
  * Generated factory for {@link OffboardResult} record objects.
793
1069
  */
@@ -924,6 +1200,47 @@ const FfiConverterTypePendingBoard = (() => {
924
1200
  return new FFIConverter();
925
1201
  })();
926
1202
 
1203
+ /**
1204
+ * One tier of a PPM-by-expiry fee table.
1205
+ *
1206
+ * The entry applies when a VTXO expires in at most `expiry_blocks_threshold`
1207
+ * blocks and no other entry has a threshold between this one and the VTXO's
1208
+ * actual expiry distance. Tables are sorted ascending by threshold.
1209
+ */
1210
+
1211
+ /**
1212
+ * Generated factory for {@link PpmExpiryFeeEntry} record objects.
1213
+ */
1214
+ const PpmExpiryFeeEntry = exports.PpmExpiryFeeEntry = (() => {
1215
+ const defaults = () => ({});
1216
+ const create = (() => {
1217
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
1218
+ })();
1219
+ return Object.freeze({
1220
+ create,
1221
+ new: create,
1222
+ defaults: () => Object.freeze(defaults())
1223
+ });
1224
+ })();
1225
+ const FfiConverterTypePpmExpiryFeeEntry = (() => {
1226
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1227
+ read(from) {
1228
+ return {
1229
+ expiryBlocksThreshold: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1230
+ ppm: _uniffiBindgenReactNative.FfiConverterUInt64.read(from)
1231
+ };
1232
+ }
1233
+ write(value, into) {
1234
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.expiryBlocksThreshold, into);
1235
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.ppm, into);
1236
+ }
1237
+ allocationSize(value) {
1238
+ return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.expiryBlocksThreshold) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.ppm);
1239
+ }
1240
+ }
1241
+ return new FFIConverter();
1242
+ })();
1243
+
927
1244
  /**
928
1245
  * One bucket of a [`RecoveryReport`].
929
1246
  *
@@ -1018,13 +1335,13 @@ const FfiConverterTypeRecoveryReport = (() => {
1018
1335
  })();
1019
1336
 
1020
1337
  /**
1021
- * A pending round state
1338
+ * Fees for refreshing VTXOs in a round.
1022
1339
  */
1023
1340
 
1024
1341
  /**
1025
- * Generated factory for {@link RoundState} record objects.
1342
+ * Generated factory for {@link RefreshFees} record objects.
1026
1343
  */
1027
- const RoundState = exports.RoundState = (() => {
1344
+ const RefreshFees = exports.RefreshFees = (() => {
1028
1345
  const defaults = () => ({});
1029
1346
  const create = (() => {
1030
1347
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
@@ -1035,28 +1352,33 @@ const RoundState = exports.RoundState = (() => {
1035
1352
  defaults: () => Object.freeze(defaults())
1036
1353
  });
1037
1354
  })();
1038
- const FfiConverterTypeRoundState = (() => {
1355
+ const FfiConverterTypeRefreshFees = (() => {
1039
1356
  class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1040
1357
  read(from) {
1041
1358
  return {
1042
- id: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1043
- ongoing: _uniffiBindgenReactNative.FfiConverterBool.read(from)
1359
+ baseFeeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
1360
+ ppmExpiryTable: FfiConverterArrayTypePpmExpiryFeeEntry.read(from)
1044
1361
  };
1045
1362
  }
1046
1363
  write(value, into) {
1047
- _uniffiBindgenReactNative.FfiConverterUInt32.write(value.id, into);
1048
- _uniffiBindgenReactNative.FfiConverterBool.write(value.ongoing, into);
1364
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.baseFeeSats, into);
1365
+ FfiConverterArrayTypePpmExpiryFeeEntry.write(value.ppmExpiryTable, into);
1049
1366
  }
1050
1367
  allocationSize(value) {
1051
- return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.id) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.ongoing);
1368
+ return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.baseFeeSats) + FfiConverterArrayTypePpmExpiryFeeEntry.allocationSize(value.ppmExpiryTable);
1052
1369
  }
1053
1370
  }
1054
1371
  return new FFIConverter();
1055
1372
  })();
1373
+
1056
1374
  /**
1057
- * Generated factory for {@link Vtxo} record objects.
1375
+ * A pending round state
1058
1376
  */
1059
- const Vtxo = exports.Vtxo = (() => {
1377
+
1378
+ /**
1379
+ * Generated factory for {@link RoundState} record objects.
1380
+ */
1381
+ const RoundState = exports.RoundState = (() => {
1060
1382
  const defaults = () => ({});
1061
1383
  const create = (() => {
1062
1384
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
@@ -1067,15 +1389,47 @@ const Vtxo = exports.Vtxo = (() => {
1067
1389
  defaults: () => Object.freeze(defaults())
1068
1390
  });
1069
1391
  })();
1070
- const FfiConverterTypeVtxo = (() => {
1392
+ const FfiConverterTypeRoundState = (() => {
1071
1393
  class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1072
1394
  read(from) {
1073
1395
  return {
1074
- id: FfiConverterString.read(from),
1075
- amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
1396
+ id: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1397
+ ongoing: _uniffiBindgenReactNative.FfiConverterBool.read(from)
1398
+ };
1399
+ }
1400
+ write(value, into) {
1401
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(value.id, into);
1402
+ _uniffiBindgenReactNative.FfiConverterBool.write(value.ongoing, into);
1403
+ }
1404
+ allocationSize(value) {
1405
+ return _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.id) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.ongoing);
1406
+ }
1407
+ }
1408
+ return new FFIConverter();
1409
+ })();
1410
+ /**
1411
+ * Generated factory for {@link Vtxo} record objects.
1412
+ */
1413
+ const Vtxo = exports.Vtxo = (() => {
1414
+ const defaults = () => ({});
1415
+ const create = (() => {
1416
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
1417
+ })();
1418
+ return Object.freeze({
1419
+ create,
1420
+ new: create,
1421
+ defaults: () => Object.freeze(defaults())
1422
+ });
1423
+ })();
1424
+ const FfiConverterTypeVtxo = (() => {
1425
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1426
+ read(from) {
1427
+ return {
1428
+ id: FfiConverterString.read(from),
1429
+ amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
1076
1430
  expiryHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1077
1431
  kind: FfiConverterString.read(from),
1078
- state: FfiConverterString.read(from),
1432
+ state: FfiConverterTypeVtxoState.read(from),
1079
1433
  exitDepth: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1080
1434
  exitTxWeightWu: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
1081
1435
  registered: _uniffiBindgenReactNative.FfiConverterBool.read(from)
@@ -1086,13 +1440,13 @@ const FfiConverterTypeVtxo = (() => {
1086
1440
  _uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
1087
1441
  _uniffiBindgenReactNative.FfiConverterUInt32.write(value.expiryHeight, into);
1088
1442
  FfiConverterString.write(value.kind, into);
1089
- FfiConverterString.write(value.state, into);
1443
+ FfiConverterTypeVtxoState.write(value.state, into);
1090
1444
  _uniffiBindgenReactNative.FfiConverterUInt32.write(value.exitDepth, into);
1091
1445
  _uniffiBindgenReactNative.FfiConverterUInt64.write(value.exitTxWeightWu, into);
1092
1446
  _uniffiBindgenReactNative.FfiConverterBool.write(value.registered, into);
1093
1447
  }
1094
1448
  allocationSize(value) {
1095
- return FfiConverterString.allocationSize(value.id) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.expiryHeight) + FfiConverterString.allocationSize(value.kind) + FfiConverterString.allocationSize(value.state) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.exitDepth) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.exitTxWeightWu) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.registered);
1449
+ return FfiConverterString.allocationSize(value.id) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.expiryHeight) + FfiConverterString.allocationSize(value.kind) + FfiConverterTypeVtxoState.allocationSize(value.state) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.exitDepth) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.exitTxWeightWu) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.registered);
1096
1450
  }
1097
1451
  }
1098
1452
  return new FFIConverter();
@@ -1182,6 +1536,52 @@ const FfiConverterTypeWalletProperties = (() => {
1182
1536
  }
1183
1537
  return new FFIConverter();
1184
1538
  })();
1539
+
1540
+ /**
1541
+ * Summary of one onchain wallet transaction, mirroring
1542
+ * `bark::onchain::WalletTxInfo`.
1543
+ */
1544
+
1545
+ /**
1546
+ * Generated factory for {@link WalletTransaction} record objects.
1547
+ */
1548
+ const WalletTransaction = exports.WalletTransaction = (() => {
1549
+ const defaults = () => ({});
1550
+ const create = (() => {
1551
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
1552
+ })();
1553
+ return Object.freeze({
1554
+ create,
1555
+ new: create,
1556
+ defaults: () => Object.freeze(defaults())
1557
+ });
1558
+ })();
1559
+ const FfiConverterTypeWalletTransaction = (() => {
1560
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1561
+ read(from) {
1562
+ return {
1563
+ txid: FfiConverterString.read(from),
1564
+ txHex: FfiConverterString.read(from),
1565
+ onchainFeeSats: FfiConverterOptionalUInt64.read(from),
1566
+ balanceChangeSats: _uniffiBindgenReactNative.FfiConverterInt64.read(from),
1567
+ confirmation: FfiConverterOptionalTypeBlockRef.read(from),
1568
+ isCpfp: _uniffiBindgenReactNative.FfiConverterBool.read(from)
1569
+ };
1570
+ }
1571
+ write(value, into) {
1572
+ FfiConverterString.write(value.txid, into);
1573
+ FfiConverterString.write(value.txHex, into);
1574
+ FfiConverterOptionalUInt64.write(value.onchainFeeSats, into);
1575
+ _uniffiBindgenReactNative.FfiConverterInt64.write(value.balanceChangeSats, into);
1576
+ FfiConverterOptionalTypeBlockRef.write(value.confirmation, into);
1577
+ _uniffiBindgenReactNative.FfiConverterBool.write(value.isCpfp, into);
1578
+ }
1579
+ allocationSize(value) {
1580
+ return FfiConverterString.allocationSize(value.txid) + FfiConverterString.allocationSize(value.txHex) + FfiConverterOptionalUInt64.allocationSize(value.onchainFeeSats) + _uniffiBindgenReactNative.FfiConverterInt64.allocationSize(value.balanceChangeSats) + FfiConverterOptionalTypeBlockRef.allocationSize(value.confirmation) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.isCpfp);
1581
+ }
1582
+ }
1583
+ return new FFIConverter();
1584
+ })();
1185
1585
  const stringConverter = {
1186
1586
  stringToBytes: s => uniffiCaller.rustCall(status => (0, _barkFfi.default)().ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(s, status)),
1187
1587
  bytesToString: ab => uniffiCaller.rustCall(status => (0, _barkFfi.default)().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(ab, status)),
@@ -1266,173 +1666,1569 @@ const FfiConverterTypeError = (() => {
1266
1666
  return intConverter.allocationSize(0);
1267
1667
  }
1268
1668
  }
1269
- return new FfiConverter();
1669
+ return new FfiConverter();
1670
+ })();
1671
+
1672
+ // Enum: ExitState
1673
+ let ExitState_Tags = exports.ExitState_Tags = /*#__PURE__*/function (ExitState_Tags) {
1674
+ ExitState_Tags["Start"] = "Start";
1675
+ ExitState_Tags["Processing"] = "Processing";
1676
+ ExitState_Tags["AwaitingDelta"] = "AwaitingDelta";
1677
+ ExitState_Tags["Claimable"] = "Claimable";
1678
+ ExitState_Tags["ClaimInProgress"] = "ClaimInProgress";
1679
+ ExitState_Tags["Claimed"] = "Claimed";
1680
+ ExitState_Tags["VtxoAlreadySpent"] = "VtxoAlreadySpent";
1681
+ ExitState_Tags["Canceled"] = "Canceled";
1682
+ return ExitState_Tags;
1683
+ }({});
1684
+ /**
1685
+ * State of a unilateral exit, mirroring `bark::exit::ExitState`.
1686
+ *
1687
+ * Serde/TS tags match upstream's kebab-case serialization (`"start"`,
1688
+ * `"processing"`, `"awaiting-delta"`, `"claimable"`, `"claim-in-progress"`,
1689
+ * `"claimed"`, `"vtxo-already-spent"`, `"canceled"`), with camelCase fields.
1690
+ */
1691
+ const ExitState = exports.ExitState = (() => {
1692
+ /**
1693
+ * The exit was requested at the given tip.
1694
+ */
1695
+ class Start_ extends _uniffiBindgenReactNative.UniffiEnum {
1696
+ /**
1697
+ * @private
1698
+ * This field is private and should not be used, use `tag` instead.
1699
+ */
1700
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1701
+ tag = ExitState_Tags.Start;
1702
+ constructor(inner) {
1703
+ super("ExitState", "Start");
1704
+ this.inner = Object.freeze(inner);
1705
+ }
1706
+ static new(inner) {
1707
+ return new Start_(inner);
1708
+ }
1709
+ static instanceOf(obj) {
1710
+ return obj.tag === ExitState_Tags.Start;
1711
+ }
1712
+ }
1713
+ /**
1714
+ * The exit transaction chain is being broadcast and confirmed.
1715
+ */
1716
+ class Processing_ extends _uniffiBindgenReactNative.UniffiEnum {
1717
+ /**
1718
+ * @private
1719
+ * This field is private and should not be used, use `tag` instead.
1720
+ */
1721
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1722
+ tag = ExitState_Tags.Processing;
1723
+ constructor(inner) {
1724
+ super("ExitState", "Processing");
1725
+ this.inner = Object.freeze(inner);
1726
+ }
1727
+ static new(inner) {
1728
+ return new Processing_(inner);
1729
+ }
1730
+ static instanceOf(obj) {
1731
+ return obj.tag === ExitState_Tags.Processing;
1732
+ }
1733
+ }
1734
+ /**
1735
+ * Fully confirmed; waiting out the exit delta until claimable.
1736
+ */
1737
+ class AwaitingDelta_ extends _uniffiBindgenReactNative.UniffiEnum {
1738
+ /**
1739
+ * @private
1740
+ * This field is private and should not be used, use `tag` instead.
1741
+ */
1742
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1743
+ tag = ExitState_Tags.AwaitingDelta;
1744
+ constructor(inner) {
1745
+ super("ExitState", "AwaitingDelta");
1746
+ this.inner = Object.freeze(inner);
1747
+ }
1748
+ static new(inner) {
1749
+ return new AwaitingDelta_(inner);
1750
+ }
1751
+ static instanceOf(obj) {
1752
+ return obj.tag === ExitState_Tags.AwaitingDelta;
1753
+ }
1754
+ }
1755
+ /**
1756
+ * The exit output can be claimed.
1757
+ */
1758
+ class Claimable_ extends _uniffiBindgenReactNative.UniffiEnum {
1759
+ /**
1760
+ * @private
1761
+ * This field is private and should not be used, use `tag` instead.
1762
+ */
1763
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1764
+ tag = ExitState_Tags.Claimable;
1765
+ constructor(inner) {
1766
+ super("ExitState", "Claimable");
1767
+ this.inner = Object.freeze(inner);
1768
+ }
1769
+ static new(inner) {
1770
+ return new Claimable_(inner);
1771
+ }
1772
+ static instanceOf(obj) {
1773
+ return obj.tag === ExitState_Tags.Claimable;
1774
+ }
1775
+ }
1776
+ /**
1777
+ * A claim transaction has been broadcast.
1778
+ */
1779
+ class ClaimInProgress_ extends _uniffiBindgenReactNative.UniffiEnum {
1780
+ /**
1781
+ * @private
1782
+ * This field is private and should not be used, use `tag` instead.
1783
+ */
1784
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1785
+ tag = ExitState_Tags.ClaimInProgress;
1786
+ constructor(inner) {
1787
+ super("ExitState", "ClaimInProgress");
1788
+ this.inner = Object.freeze(inner);
1789
+ }
1790
+ static new(inner) {
1791
+ return new ClaimInProgress_(inner);
1792
+ }
1793
+ static instanceOf(obj) {
1794
+ return obj.tag === ExitState_Tags.ClaimInProgress;
1795
+ }
1796
+ }
1797
+ /**
1798
+ * Terminal: the exit output was claimed (or spent deeper in the tree).
1799
+ */
1800
+ class Claimed_ extends _uniffiBindgenReactNative.UniffiEnum {
1801
+ /**
1802
+ * @private
1803
+ * This field is private and should not be used, use `tag` instead.
1804
+ */
1805
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1806
+ tag = ExitState_Tags.Claimed;
1807
+ constructor(inner) {
1808
+ super("ExitState", "Claimed");
1809
+ this.inner = Object.freeze(inner);
1810
+ }
1811
+ static new(inner) {
1812
+ return new Claimed_(inner);
1813
+ }
1814
+ static instanceOf(obj) {
1815
+ return obj.tag === ExitState_Tags.Claimed;
1816
+ }
1817
+ }
1818
+ /**
1819
+ * Terminal: the VTXO was already spent offchain, so the exit cannot
1820
+ * proceed.
1821
+ */
1822
+ class VtxoAlreadySpent_ extends _uniffiBindgenReactNative.UniffiEnum {
1823
+ /**
1824
+ * @private
1825
+ * This field is private and should not be used, use `tag` instead.
1826
+ */
1827
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1828
+ tag = ExitState_Tags.VtxoAlreadySpent;
1829
+ constructor(inner) {
1830
+ super("ExitState", "VtxoAlreadySpent");
1831
+ this.inner = Object.freeze(inner);
1832
+ }
1833
+ static new(inner) {
1834
+ return new VtxoAlreadySpent_(inner);
1835
+ }
1836
+ static instanceOf(obj) {
1837
+ return obj.tag === ExitState_Tags.VtxoAlreadySpent;
1838
+ }
1839
+ }
1840
+ /**
1841
+ * Resumable: the user canceled the exit before its final transaction
1842
+ * was broadcast. The VTXO stays spendable.
1843
+ */
1844
+ class Canceled_ extends _uniffiBindgenReactNative.UniffiEnum {
1845
+ /**
1846
+ * @private
1847
+ * This field is private and should not be used, use `tag` instead.
1848
+ */
1849
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitState";
1850
+ tag = ExitState_Tags.Canceled;
1851
+ constructor(inner) {
1852
+ super("ExitState", "Canceled");
1853
+ this.inner = Object.freeze(inner);
1854
+ }
1855
+ static new(inner) {
1856
+ return new Canceled_(inner);
1857
+ }
1858
+ static instanceOf(obj) {
1859
+ return obj.tag === ExitState_Tags.Canceled;
1860
+ }
1861
+ }
1862
+ function instanceOf(obj) {
1863
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "ExitState";
1864
+ }
1865
+ return Object.freeze({
1866
+ instanceOf,
1867
+ Start: Start_,
1868
+ Processing: Processing_,
1869
+ AwaitingDelta: AwaitingDelta_,
1870
+ Claimable: Claimable_,
1871
+ ClaimInProgress: ClaimInProgress_,
1872
+ Claimed: Claimed_,
1873
+ VtxoAlreadySpent: VtxoAlreadySpent_,
1874
+ Canceled: Canceled_
1875
+ });
1876
+ })();
1877
+
1878
+ /**
1879
+ * State of a unilateral exit, mirroring `bark::exit::ExitState`.
1880
+ *
1881
+ * Serde/TS tags match upstream's kebab-case serialization (`"start"`,
1882
+ * `"processing"`, `"awaiting-delta"`, `"claimable"`, `"claim-in-progress"`,
1883
+ * `"claimed"`, `"vtxo-already-spent"`, `"canceled"`), with camelCase fields.
1884
+ */
1885
+
1886
+ // FfiConverter for enum ExitState
1887
+ const FfiConverterTypeExitState = (() => {
1888
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1889
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1890
+ read(from) {
1891
+ switch (ordinalConverter.read(from)) {
1892
+ case 1:
1893
+ return new ExitState.Start({
1894
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
1895
+ });
1896
+ case 2:
1897
+ return new ExitState.Processing({
1898
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1899
+ transactions: FfiConverterArrayTypeExitTx.read(from)
1900
+ });
1901
+ case 3:
1902
+ return new ExitState.AwaitingDelta({
1903
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1904
+ confirmedBlock: FfiConverterTypeBlockRef.read(from),
1905
+ claimableHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
1906
+ });
1907
+ case 4:
1908
+ return new ExitState.Claimable({
1909
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1910
+ claimableSince: FfiConverterTypeBlockRef.read(from),
1911
+ lastScannedBlock: FfiConverterOptionalTypeBlockRef.read(from)
1912
+ });
1913
+ case 5:
1914
+ return new ExitState.ClaimInProgress({
1915
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1916
+ claimableSince: FfiConverterTypeBlockRef.read(from),
1917
+ claimTxid: FfiConverterString.read(from)
1918
+ });
1919
+ case 6:
1920
+ return new ExitState.Claimed({
1921
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
1922
+ txid: FfiConverterString.read(from),
1923
+ block: FfiConverterTypeBlockRef.read(from)
1924
+ });
1925
+ case 7:
1926
+ return new ExitState.VtxoAlreadySpent({
1927
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
1928
+ });
1929
+ case 8:
1930
+ return new ExitState.Canceled({
1931
+ tipHeight: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
1932
+ });
1933
+ default:
1934
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1935
+ }
1936
+ }
1937
+ write(value, into) {
1938
+ switch (value.tag) {
1939
+ case ExitState_Tags.Start:
1940
+ {
1941
+ ordinalConverter.write(1, into);
1942
+ const inner = value.inner;
1943
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
1944
+ return;
1945
+ }
1946
+ case ExitState_Tags.Processing:
1947
+ {
1948
+ ordinalConverter.write(2, into);
1949
+ const inner = value.inner;
1950
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
1951
+ FfiConverterArrayTypeExitTx.write(inner.transactions, into);
1952
+ return;
1953
+ }
1954
+ case ExitState_Tags.AwaitingDelta:
1955
+ {
1956
+ ordinalConverter.write(3, into);
1957
+ const inner = value.inner;
1958
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
1959
+ FfiConverterTypeBlockRef.write(inner.confirmedBlock, into);
1960
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.claimableHeight, into);
1961
+ return;
1962
+ }
1963
+ case ExitState_Tags.Claimable:
1964
+ {
1965
+ ordinalConverter.write(4, into);
1966
+ const inner = value.inner;
1967
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
1968
+ FfiConverterTypeBlockRef.write(inner.claimableSince, into);
1969
+ FfiConverterOptionalTypeBlockRef.write(inner.lastScannedBlock, into);
1970
+ return;
1971
+ }
1972
+ case ExitState_Tags.ClaimInProgress:
1973
+ {
1974
+ ordinalConverter.write(5, into);
1975
+ const inner = value.inner;
1976
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
1977
+ FfiConverterTypeBlockRef.write(inner.claimableSince, into);
1978
+ FfiConverterString.write(inner.claimTxid, into);
1979
+ return;
1980
+ }
1981
+ case ExitState_Tags.Claimed:
1982
+ {
1983
+ ordinalConverter.write(6, into);
1984
+ const inner = value.inner;
1985
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
1986
+ FfiConverterString.write(inner.txid, into);
1987
+ FfiConverterTypeBlockRef.write(inner.block, into);
1988
+ return;
1989
+ }
1990
+ case ExitState_Tags.VtxoAlreadySpent:
1991
+ {
1992
+ ordinalConverter.write(7, into);
1993
+ const inner = value.inner;
1994
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
1995
+ return;
1996
+ }
1997
+ case ExitState_Tags.Canceled:
1998
+ {
1999
+ ordinalConverter.write(8, into);
2000
+ const inner = value.inner;
2001
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.tipHeight, into);
2002
+ return;
2003
+ }
2004
+ default:
2005
+ // Throwing from here means that ExitState_Tags hasn't matched an ordinal.
2006
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2007
+ }
2008
+ }
2009
+ allocationSize(value) {
2010
+ switch (value.tag) {
2011
+ case ExitState_Tags.Start:
2012
+ {
2013
+ const inner = value.inner;
2014
+ let size = ordinalConverter.allocationSize(1);
2015
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2016
+ return size;
2017
+ }
2018
+ case ExitState_Tags.Processing:
2019
+ {
2020
+ const inner = value.inner;
2021
+ let size = ordinalConverter.allocationSize(2);
2022
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2023
+ size += FfiConverterArrayTypeExitTx.allocationSize(inner.transactions);
2024
+ return size;
2025
+ }
2026
+ case ExitState_Tags.AwaitingDelta:
2027
+ {
2028
+ const inner = value.inner;
2029
+ let size = ordinalConverter.allocationSize(3);
2030
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2031
+ size += FfiConverterTypeBlockRef.allocationSize(inner.confirmedBlock);
2032
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.claimableHeight);
2033
+ return size;
2034
+ }
2035
+ case ExitState_Tags.Claimable:
2036
+ {
2037
+ const inner = value.inner;
2038
+ let size = ordinalConverter.allocationSize(4);
2039
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2040
+ size += FfiConverterTypeBlockRef.allocationSize(inner.claimableSince);
2041
+ size += FfiConverterOptionalTypeBlockRef.allocationSize(inner.lastScannedBlock);
2042
+ return size;
2043
+ }
2044
+ case ExitState_Tags.ClaimInProgress:
2045
+ {
2046
+ const inner = value.inner;
2047
+ let size = ordinalConverter.allocationSize(5);
2048
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2049
+ size += FfiConverterTypeBlockRef.allocationSize(inner.claimableSince);
2050
+ size += FfiConverterString.allocationSize(inner.claimTxid);
2051
+ return size;
2052
+ }
2053
+ case ExitState_Tags.Claimed:
2054
+ {
2055
+ const inner = value.inner;
2056
+ let size = ordinalConverter.allocationSize(6);
2057
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2058
+ size += FfiConverterString.allocationSize(inner.txid);
2059
+ size += FfiConverterTypeBlockRef.allocationSize(inner.block);
2060
+ return size;
2061
+ }
2062
+ case ExitState_Tags.VtxoAlreadySpent:
2063
+ {
2064
+ const inner = value.inner;
2065
+ let size = ordinalConverter.allocationSize(7);
2066
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2067
+ return size;
2068
+ }
2069
+ case ExitState_Tags.Canceled:
2070
+ {
2071
+ const inner = value.inner;
2072
+ let size = ordinalConverter.allocationSize(8);
2073
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.tipHeight);
2074
+ return size;
2075
+ }
2076
+ default:
2077
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2078
+ }
2079
+ }
2080
+ }
2081
+ return new FFIConverter();
2082
+ })();
2083
+
2084
+ // Enum: ExitTxOrigin
2085
+ let ExitTxOrigin_Tags = exports.ExitTxOrigin_Tags = /*#__PURE__*/function (ExitTxOrigin_Tags) {
2086
+ ExitTxOrigin_Tags["Wallet"] = "Wallet";
2087
+ ExitTxOrigin_Tags["Mempool"] = "Mempool";
2088
+ ExitTxOrigin_Tags["Block"] = "Block";
2089
+ return ExitTxOrigin_Tags;
2090
+ }({});
2091
+ /**
2092
+ * Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
2093
+ */
2094
+ const ExitTxOrigin = exports.ExitTxOrigin = (() => {
2095
+ /**
2096
+ * Broadcast by this wallet.
2097
+ */
2098
+ class Wallet_ extends _uniffiBindgenReactNative.UniffiEnum {
2099
+ /**
2100
+ * @private
2101
+ * This field is private and should not be used, use `tag` instead.
2102
+ */
2103
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxOrigin";
2104
+ tag = ExitTxOrigin_Tags.Wallet;
2105
+ constructor(inner) {
2106
+ super("ExitTxOrigin", "Wallet");
2107
+ this.inner = Object.freeze(inner);
2108
+ }
2109
+ static new(inner) {
2110
+ return new Wallet_(inner);
2111
+ }
2112
+ static instanceOf(obj) {
2113
+ return obj.tag === ExitTxOrigin_Tags.Wallet;
2114
+ }
2115
+ }
2116
+ /**
2117
+ * Seen in the mempool.
2118
+ */
2119
+ class Mempool_ extends _uniffiBindgenReactNative.UniffiEnum {
2120
+ /**
2121
+ * @private
2122
+ * This field is private and should not be used, use `tag` instead.
2123
+ */
2124
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxOrigin";
2125
+ tag = ExitTxOrigin_Tags.Mempool;
2126
+ constructor() {
2127
+ super("ExitTxOrigin", "Mempool");
2128
+ }
2129
+ static new() {
2130
+ return new Mempool_();
2131
+ }
2132
+ static instanceOf(obj) {
2133
+ return obj.tag === ExitTxOrigin_Tags.Mempool;
2134
+ }
2135
+ }
2136
+ /**
2137
+ * Seen confirmed in a block.
2138
+ */
2139
+ class Block_ extends _uniffiBindgenReactNative.UniffiEnum {
2140
+ /**
2141
+ * @private
2142
+ * This field is private and should not be used, use `tag` instead.
2143
+ */
2144
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxOrigin";
2145
+ tag = ExitTxOrigin_Tags.Block;
2146
+ constructor(inner) {
2147
+ super("ExitTxOrigin", "Block");
2148
+ this.inner = Object.freeze(inner);
2149
+ }
2150
+ static new(inner) {
2151
+ return new Block_(inner);
2152
+ }
2153
+ static instanceOf(obj) {
2154
+ return obj.tag === ExitTxOrigin_Tags.Block;
2155
+ }
2156
+ }
2157
+ function instanceOf(obj) {
2158
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "ExitTxOrigin";
2159
+ }
2160
+ return Object.freeze({
2161
+ instanceOf,
2162
+ Wallet: Wallet_,
2163
+ Mempool: Mempool_,
2164
+ Block: Block_
2165
+ });
2166
+ })();
2167
+
2168
+ /**
2169
+ * Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
2170
+ */
2171
+
2172
+ // FfiConverter for enum ExitTxOrigin
2173
+ const FfiConverterTypeExitTxOrigin = (() => {
2174
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2175
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2176
+ read(from) {
2177
+ switch (ordinalConverter.read(from)) {
2178
+ case 1:
2179
+ return new ExitTxOrigin.Wallet({
2180
+ confirmedIn: FfiConverterOptionalTypeBlockRef.read(from)
2181
+ });
2182
+ case 2:
2183
+ return new ExitTxOrigin.Mempool();
2184
+ case 3:
2185
+ return new ExitTxOrigin.Block({
2186
+ confirmedIn: FfiConverterTypeBlockRef.read(from)
2187
+ });
2188
+ default:
2189
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2190
+ }
2191
+ }
2192
+ write(value, into) {
2193
+ switch (value.tag) {
2194
+ case ExitTxOrigin_Tags.Wallet:
2195
+ {
2196
+ ordinalConverter.write(1, into);
2197
+ const inner = value.inner;
2198
+ FfiConverterOptionalTypeBlockRef.write(inner.confirmedIn, into);
2199
+ return;
2200
+ }
2201
+ case ExitTxOrigin_Tags.Mempool:
2202
+ {
2203
+ ordinalConverter.write(2, into);
2204
+ return;
2205
+ }
2206
+ case ExitTxOrigin_Tags.Block:
2207
+ {
2208
+ ordinalConverter.write(3, into);
2209
+ const inner = value.inner;
2210
+ FfiConverterTypeBlockRef.write(inner.confirmedIn, into);
2211
+ return;
2212
+ }
2213
+ default:
2214
+ // Throwing from here means that ExitTxOrigin_Tags hasn't matched an ordinal.
2215
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2216
+ }
2217
+ }
2218
+ allocationSize(value) {
2219
+ switch (value.tag) {
2220
+ case ExitTxOrigin_Tags.Wallet:
2221
+ {
2222
+ const inner = value.inner;
2223
+ let size = ordinalConverter.allocationSize(1);
2224
+ size += FfiConverterOptionalTypeBlockRef.allocationSize(inner.confirmedIn);
2225
+ return size;
2226
+ }
2227
+ case ExitTxOrigin_Tags.Mempool:
2228
+ {
2229
+ return ordinalConverter.allocationSize(2);
2230
+ }
2231
+ case ExitTxOrigin_Tags.Block:
2232
+ {
2233
+ const inner = value.inner;
2234
+ let size = ordinalConverter.allocationSize(3);
2235
+ size += FfiConverterTypeBlockRef.allocationSize(inner.confirmedIn);
2236
+ return size;
2237
+ }
2238
+ default:
2239
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2240
+ }
2241
+ }
2242
+ }
2243
+ return new FFIConverter();
2244
+ })();
2245
+
2246
+ // Enum: ExitTxStatus
2247
+ let ExitTxStatus_Tags = exports.ExitTxStatus_Tags = /*#__PURE__*/function (ExitTxStatus_Tags) {
2248
+ ExitTxStatus_Tags["VerifyInputs"] = "VerifyInputs";
2249
+ ExitTxStatus_Tags["AwaitingInputConfirmation"] = "AwaitingInputConfirmation";
2250
+ ExitTxStatus_Tags["AwaitingCpfpBroadcast"] = "AwaitingCpfpBroadcast";
2251
+ ExitTxStatus_Tags["AwaitingConfirmation"] = "AwaitingConfirmation";
2252
+ ExitTxStatus_Tags["Confirmed"] = "Confirmed";
2253
+ return ExitTxStatus_Tags;
2254
+ }({});
2255
+ /**
2256
+ * Broadcast/confirmation status of one transaction in an exit chain,
2257
+ * mirroring `bark::exit::ExitTxStatus`.
2258
+ */
2259
+ const ExitTxStatus = exports.ExitTxStatus = (() => {
2260
+ /**
2261
+ * Inputs are still being verified.
2262
+ */
2263
+ class VerifyInputs_ extends _uniffiBindgenReactNative.UniffiEnum {
2264
+ /**
2265
+ * @private
2266
+ * This field is private and should not be used, use `tag` instead.
2267
+ */
2268
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxStatus";
2269
+ tag = ExitTxStatus_Tags.VerifyInputs;
2270
+ constructor() {
2271
+ super("ExitTxStatus", "VerifyInputs");
2272
+ }
2273
+ static new() {
2274
+ return new VerifyInputs_();
2275
+ }
2276
+ static instanceOf(obj) {
2277
+ return obj.tag === ExitTxStatus_Tags.VerifyInputs;
2278
+ }
2279
+ }
2280
+ /**
2281
+ * Waiting for the given input txids to confirm. Sorted for a stable
2282
+ * order (upstream keeps them in a set).
2283
+ */
2284
+ class AwaitingInputConfirmation_ extends _uniffiBindgenReactNative.UniffiEnum {
2285
+ /**
2286
+ * @private
2287
+ * This field is private and should not be used, use `tag` instead.
2288
+ */
2289
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxStatus";
2290
+ tag = ExitTxStatus_Tags.AwaitingInputConfirmation;
2291
+ constructor(inner) {
2292
+ super("ExitTxStatus", "AwaitingInputConfirmation");
2293
+ this.inner = Object.freeze(inner);
2294
+ }
2295
+ static new(inner) {
2296
+ return new AwaitingInputConfirmation_(inner);
2297
+ }
2298
+ static instanceOf(obj) {
2299
+ return obj.tag === ExitTxStatus_Tags.AwaitingInputConfirmation;
2300
+ }
2301
+ }
2302
+ /**
2303
+ * Ready for its CPFP child to be broadcast.
2304
+ */
2305
+ class AwaitingCpfpBroadcast_ extends _uniffiBindgenReactNative.UniffiEnum {
2306
+ /**
2307
+ * @private
2308
+ * This field is private and should not be used, use `tag` instead.
2309
+ */
2310
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxStatus";
2311
+ tag = ExitTxStatus_Tags.AwaitingCpfpBroadcast;
2312
+ constructor() {
2313
+ super("ExitTxStatus", "AwaitingCpfpBroadcast");
2314
+ }
2315
+ static new() {
2316
+ return new AwaitingCpfpBroadcast_();
2317
+ }
2318
+ static instanceOf(obj) {
2319
+ return obj.tag === ExitTxStatus_Tags.AwaitingCpfpBroadcast;
2320
+ }
2321
+ }
2322
+ /**
2323
+ * CPFP child broadcast; waiting for confirmation.
2324
+ */
2325
+ class AwaitingConfirmation_ extends _uniffiBindgenReactNative.UniffiEnum {
2326
+ /**
2327
+ * @private
2328
+ * This field is private and should not be used, use `tag` instead.
2329
+ */
2330
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxStatus";
2331
+ tag = ExitTxStatus_Tags.AwaitingConfirmation;
2332
+ constructor(inner) {
2333
+ super("ExitTxStatus", "AwaitingConfirmation");
2334
+ this.inner = Object.freeze(inner);
2335
+ }
2336
+ static new(inner) {
2337
+ return new AwaitingConfirmation_(inner);
2338
+ }
2339
+ static instanceOf(obj) {
2340
+ return obj.tag === ExitTxStatus_Tags.AwaitingConfirmation;
2341
+ }
2342
+ }
2343
+ /**
2344
+ * Confirmed in a block.
2345
+ */
2346
+ class Confirmed_ extends _uniffiBindgenReactNative.UniffiEnum {
2347
+ /**
2348
+ * @private
2349
+ * This field is private and should not be used, use `tag` instead.
2350
+ */
2351
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ExitTxStatus";
2352
+ tag = ExitTxStatus_Tags.Confirmed;
2353
+ constructor(inner) {
2354
+ super("ExitTxStatus", "Confirmed");
2355
+ this.inner = Object.freeze(inner);
2356
+ }
2357
+ static new(inner) {
2358
+ return new Confirmed_(inner);
2359
+ }
2360
+ static instanceOf(obj) {
2361
+ return obj.tag === ExitTxStatus_Tags.Confirmed;
2362
+ }
2363
+ }
2364
+ function instanceOf(obj) {
2365
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "ExitTxStatus";
2366
+ }
2367
+ return Object.freeze({
2368
+ instanceOf,
2369
+ VerifyInputs: VerifyInputs_,
2370
+ AwaitingInputConfirmation: AwaitingInputConfirmation_,
2371
+ AwaitingCpfpBroadcast: AwaitingCpfpBroadcast_,
2372
+ AwaitingConfirmation: AwaitingConfirmation_,
2373
+ Confirmed: Confirmed_
2374
+ });
2375
+ })();
2376
+
2377
+ /**
2378
+ * Broadcast/confirmation status of one transaction in an exit chain,
2379
+ * mirroring `bark::exit::ExitTxStatus`.
2380
+ */
2381
+
2382
+ // FfiConverter for enum ExitTxStatus
2383
+ const FfiConverterTypeExitTxStatus = (() => {
2384
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2385
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2386
+ read(from) {
2387
+ switch (ordinalConverter.read(from)) {
2388
+ case 1:
2389
+ return new ExitTxStatus.VerifyInputs();
2390
+ case 2:
2391
+ return new ExitTxStatus.AwaitingInputConfirmation({
2392
+ txids: FfiConverterArrayString.read(from)
2393
+ });
2394
+ case 3:
2395
+ return new ExitTxStatus.AwaitingCpfpBroadcast();
2396
+ case 4:
2397
+ return new ExitTxStatus.AwaitingConfirmation({
2398
+ childTxid: FfiConverterString.read(from),
2399
+ origin: FfiConverterTypeExitTxOrigin.read(from)
2400
+ });
2401
+ case 5:
2402
+ return new ExitTxStatus.Confirmed({
2403
+ childTxid: FfiConverterString.read(from),
2404
+ block: FfiConverterTypeBlockRef.read(from),
2405
+ origin: FfiConverterTypeExitTxOrigin.read(from)
2406
+ });
2407
+ default:
2408
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2409
+ }
2410
+ }
2411
+ write(value, into) {
2412
+ switch (value.tag) {
2413
+ case ExitTxStatus_Tags.VerifyInputs:
2414
+ {
2415
+ ordinalConverter.write(1, into);
2416
+ return;
2417
+ }
2418
+ case ExitTxStatus_Tags.AwaitingInputConfirmation:
2419
+ {
2420
+ ordinalConverter.write(2, into);
2421
+ const inner = value.inner;
2422
+ FfiConverterArrayString.write(inner.txids, into);
2423
+ return;
2424
+ }
2425
+ case ExitTxStatus_Tags.AwaitingCpfpBroadcast:
2426
+ {
2427
+ ordinalConverter.write(3, into);
2428
+ return;
2429
+ }
2430
+ case ExitTxStatus_Tags.AwaitingConfirmation:
2431
+ {
2432
+ ordinalConverter.write(4, into);
2433
+ const inner = value.inner;
2434
+ FfiConverterString.write(inner.childTxid, into);
2435
+ FfiConverterTypeExitTxOrigin.write(inner.origin, into);
2436
+ return;
2437
+ }
2438
+ case ExitTxStatus_Tags.Confirmed:
2439
+ {
2440
+ ordinalConverter.write(5, into);
2441
+ const inner = value.inner;
2442
+ FfiConverterString.write(inner.childTxid, into);
2443
+ FfiConverterTypeBlockRef.write(inner.block, into);
2444
+ FfiConverterTypeExitTxOrigin.write(inner.origin, into);
2445
+ return;
2446
+ }
2447
+ default:
2448
+ // Throwing from here means that ExitTxStatus_Tags hasn't matched an ordinal.
2449
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2450
+ }
2451
+ }
2452
+ allocationSize(value) {
2453
+ switch (value.tag) {
2454
+ case ExitTxStatus_Tags.VerifyInputs:
2455
+ {
2456
+ return ordinalConverter.allocationSize(1);
2457
+ }
2458
+ case ExitTxStatus_Tags.AwaitingInputConfirmation:
2459
+ {
2460
+ const inner = value.inner;
2461
+ let size = ordinalConverter.allocationSize(2);
2462
+ size += FfiConverterArrayString.allocationSize(inner.txids);
2463
+ return size;
2464
+ }
2465
+ case ExitTxStatus_Tags.AwaitingCpfpBroadcast:
2466
+ {
2467
+ return ordinalConverter.allocationSize(3);
2468
+ }
2469
+ case ExitTxStatus_Tags.AwaitingConfirmation:
2470
+ {
2471
+ const inner = value.inner;
2472
+ let size = ordinalConverter.allocationSize(4);
2473
+ size += FfiConverterString.allocationSize(inner.childTxid);
2474
+ size += FfiConverterTypeExitTxOrigin.allocationSize(inner.origin);
2475
+ return size;
2476
+ }
2477
+ case ExitTxStatus_Tags.Confirmed:
2478
+ {
2479
+ const inner = value.inner;
2480
+ let size = ordinalConverter.allocationSize(5);
2481
+ size += FfiConverterString.allocationSize(inner.childTxid);
2482
+ size += FfiConverterTypeBlockRef.allocationSize(inner.block);
2483
+ size += FfiConverterTypeExitTxOrigin.allocationSize(inner.origin);
2484
+ return size;
2485
+ }
2486
+ default:
2487
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2488
+ }
2489
+ }
2490
+ }
2491
+ return new FFIConverter();
2492
+ })();
2493
+
2494
+ // Enum: LightningSendStatus
2495
+ let LightningSendStatus_Tags = exports.LightningSendStatus_Tags = /*#__PURE__*/function (LightningSendStatus_Tags) {
2496
+ LightningSendStatus_Tags["Unknown"] = "Unknown";
2497
+ LightningSendStatus_Tags["InProgress"] = "InProgress";
2498
+ LightningSendStatus_Tags["Paid"] = "Paid";
2499
+ return LightningSendStatus_Tags;
2500
+ }({});
2501
+ /**
2502
+ * Terminal/in-flight state of an outgoing lightning send.
2503
+ *
2504
+ * Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
2505
+ * `check_lightning_payment` now return this so callers can drive the
2506
+ * crash-safe send flow themselves (initiate with `wait = false`, then poll).
2507
+ */
2508
+ const LightningSendStatus = exports.LightningSendStatus = (() => {
2509
+ /**
2510
+ * No record of this payment (never started, or already pruned).
2511
+ */
2512
+ class Unknown_ extends _uniffiBindgenReactNative.UniffiEnum {
2513
+ /**
2514
+ * @private
2515
+ * This field is private and should not be used, use `tag` instead.
2516
+ */
2517
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
2518
+ tag = LightningSendStatus_Tags.Unknown;
2519
+ constructor() {
2520
+ super("LightningSendStatus", "Unknown");
2521
+ }
2522
+ static new() {
2523
+ return new Unknown_();
2524
+ }
2525
+ static instanceOf(obj) {
2526
+ return obj.tag === LightningSendStatus_Tags.Unknown;
2527
+ }
2528
+ }
2529
+ /**
2530
+ * Send is in flight; HTLC VTXOs are locked.
2531
+ */
2532
+ class InProgress_ extends _uniffiBindgenReactNative.UniffiEnum {
2533
+ /**
2534
+ * @private
2535
+ * This field is private and should not be used, use `tag` instead.
2536
+ */
2537
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
2538
+ tag = LightningSendStatus_Tags.InProgress;
2539
+ constructor(inner) {
2540
+ super("LightningSendStatus", "InProgress");
2541
+ this.inner = Object.freeze(inner);
2542
+ }
2543
+ static new(inner) {
2544
+ return new InProgress_(inner);
2545
+ }
2546
+ static instanceOf(obj) {
2547
+ return obj.tag === LightningSendStatus_Tags.InProgress;
2548
+ }
2549
+ }
2550
+ /**
2551
+ * Send has settled; the preimage proves payment.
2552
+ */
2553
+ class Paid_ extends _uniffiBindgenReactNative.UniffiEnum {
2554
+ /**
2555
+ * @private
2556
+ * This field is private and should not be used, use `tag` instead.
2557
+ */
2558
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
2559
+ tag = LightningSendStatus_Tags.Paid;
2560
+ constructor(inner) {
2561
+ super("LightningSendStatus", "Paid");
2562
+ this.inner = Object.freeze(inner);
2563
+ }
2564
+ static new(inner) {
2565
+ return new Paid_(inner);
2566
+ }
2567
+ static instanceOf(obj) {
2568
+ return obj.tag === LightningSendStatus_Tags.Paid;
2569
+ }
2570
+ }
2571
+ function instanceOf(obj) {
2572
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "LightningSendStatus";
2573
+ }
2574
+ return Object.freeze({
2575
+ instanceOf,
2576
+ Unknown: Unknown_,
2577
+ InProgress: InProgress_,
2578
+ Paid: Paid_
2579
+ });
2580
+ })();
2581
+
2582
+ /**
2583
+ * Terminal/in-flight state of an outgoing lightning send.
2584
+ *
2585
+ * Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
2586
+ * `check_lightning_payment` now return this so callers can drive the
2587
+ * crash-safe send flow themselves (initiate with `wait = false`, then poll).
2588
+ */
2589
+
2590
+ // FfiConverter for enum LightningSendStatus
2591
+ const FfiConverterTypeLightningSendStatus = (() => {
2592
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2593
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2594
+ read(from) {
2595
+ switch (ordinalConverter.read(from)) {
2596
+ case 1:
2597
+ return new LightningSendStatus.Unknown();
2598
+ case 2:
2599
+ return new LightningSendStatus.InProgress({
2600
+ send: FfiConverterTypeLightningSend.read(from)
2601
+ });
2602
+ case 3:
2603
+ return new LightningSendStatus.Paid({
2604
+ paymentHash: FfiConverterString.read(from),
2605
+ preimage: FfiConverterString.read(from)
2606
+ });
2607
+ default:
2608
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2609
+ }
2610
+ }
2611
+ write(value, into) {
2612
+ switch (value.tag) {
2613
+ case LightningSendStatus_Tags.Unknown:
2614
+ {
2615
+ ordinalConverter.write(1, into);
2616
+ return;
2617
+ }
2618
+ case LightningSendStatus_Tags.InProgress:
2619
+ {
2620
+ ordinalConverter.write(2, into);
2621
+ const inner = value.inner;
2622
+ FfiConverterTypeLightningSend.write(inner.send, into);
2623
+ return;
2624
+ }
2625
+ case LightningSendStatus_Tags.Paid:
2626
+ {
2627
+ ordinalConverter.write(3, into);
2628
+ const inner = value.inner;
2629
+ FfiConverterString.write(inner.paymentHash, into);
2630
+ FfiConverterString.write(inner.preimage, into);
2631
+ return;
2632
+ }
2633
+ default:
2634
+ // Throwing from here means that LightningSendStatus_Tags hasn't matched an ordinal.
2635
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2636
+ }
2637
+ }
2638
+ allocationSize(value) {
2639
+ switch (value.tag) {
2640
+ case LightningSendStatus_Tags.Unknown:
2641
+ {
2642
+ return ordinalConverter.allocationSize(1);
2643
+ }
2644
+ case LightningSendStatus_Tags.InProgress:
2645
+ {
2646
+ const inner = value.inner;
2647
+ let size = ordinalConverter.allocationSize(2);
2648
+ size += FfiConverterTypeLightningSend.allocationSize(inner.send);
2649
+ return size;
2650
+ }
2651
+ case LightningSendStatus_Tags.Paid:
2652
+ {
2653
+ const inner = value.inner;
2654
+ let size = ordinalConverter.allocationSize(3);
2655
+ size += FfiConverterString.allocationSize(inner.paymentHash);
2656
+ size += FfiConverterString.allocationSize(inner.preimage);
2657
+ return size;
2658
+ }
2659
+ default:
2660
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2661
+ }
2662
+ }
2663
+ }
2664
+ return new FFIConverter();
2665
+ })();
2666
+
2667
+ /**
2668
+ * Severity of a log record.
2669
+ */
2670
+ let LogLevel = exports.LogLevel = /*#__PURE__*/function (LogLevel) {
2671
+ LogLevel[LogLevel["Error"] = 0] = "Error";
2672
+ LogLevel[LogLevel["Warn"] = 1] = "Warn";
2673
+ LogLevel[LogLevel["Info"] = 2] = "Info";
2674
+ LogLevel[LogLevel["Debug"] = 3] = "Debug";
2675
+ LogLevel[LogLevel["Trace"] = 4] = "Trace";
2676
+ return LogLevel;
2677
+ }({});
2678
+ const FfiConverterTypeLogLevel = (() => {
2679
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2680
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2681
+ read(from) {
2682
+ switch (ordinalConverter.read(from)) {
2683
+ case 1:
2684
+ return LogLevel.Error;
2685
+ case 2:
2686
+ return LogLevel.Warn;
2687
+ case 3:
2688
+ return LogLevel.Info;
2689
+ case 4:
2690
+ return LogLevel.Debug;
2691
+ case 5:
2692
+ return LogLevel.Trace;
2693
+ default:
2694
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2695
+ }
2696
+ }
2697
+ write(value, into) {
2698
+ switch (value) {
2699
+ case LogLevel.Error:
2700
+ return ordinalConverter.write(1, into);
2701
+ case LogLevel.Warn:
2702
+ return ordinalConverter.write(2, into);
2703
+ case LogLevel.Info:
2704
+ return ordinalConverter.write(3, into);
2705
+ case LogLevel.Debug:
2706
+ return ordinalConverter.write(4, into);
2707
+ case LogLevel.Trace:
2708
+ return ordinalConverter.write(5, into);
2709
+ }
2710
+ }
2711
+ allocationSize(value) {
2712
+ return ordinalConverter.allocationSize(0);
2713
+ }
2714
+ }
2715
+ return new FFIConverter();
2716
+ })();
2717
+ let Network = exports.Network = /*#__PURE__*/function (Network) {
2718
+ Network[Network["Bitcoin"] = 0] = "Bitcoin";
2719
+ Network[Network["Testnet"] = 1] = "Testnet";
2720
+ Network[Network["Signet"] = 2] = "Signet";
2721
+ Network[Network["Regtest"] = 3] = "Regtest";
2722
+ return Network;
2723
+ }({});
2724
+ const FfiConverterTypeNetwork = (() => {
2725
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2726
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2727
+ read(from) {
2728
+ switch (ordinalConverter.read(from)) {
2729
+ case 1:
2730
+ return Network.Bitcoin;
2731
+ case 2:
2732
+ return Network.Testnet;
2733
+ case 3:
2734
+ return Network.Signet;
2735
+ case 4:
2736
+ return Network.Regtest;
2737
+ default:
2738
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2739
+ }
2740
+ }
2741
+ write(value, into) {
2742
+ switch (value) {
2743
+ case Network.Bitcoin:
2744
+ return ordinalConverter.write(1, into);
2745
+ case Network.Testnet:
2746
+ return ordinalConverter.write(2, into);
2747
+ case Network.Signet:
2748
+ return ordinalConverter.write(3, into);
2749
+ case Network.Regtest:
2750
+ return ordinalConverter.write(4, into);
2751
+ }
2752
+ }
2753
+ allocationSize(value) {
2754
+ return ordinalConverter.allocationSize(0);
2755
+ }
2756
+ }
2757
+ return new FFIConverter();
2758
+ })();
2759
+
2760
+ // Enum: OnchainUtxo
2761
+ let OnchainUtxo_Tags = exports.OnchainUtxo_Tags = /*#__PURE__*/function (OnchainUtxo_Tags) {
2762
+ OnchainUtxo_Tags["Local"] = "Local";
2763
+ OnchainUtxo_Tags["Exit"] = "Exit";
2764
+ return OnchainUtxo_Tags;
2765
+ }({});
2766
+ /**
2767
+ * An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
2768
+ */
2769
+ const OnchainUtxo = exports.OnchainUtxo = (() => {
2770
+ /**
2771
+ * A standard wallet UTXO.
2772
+ */
2773
+ class Local_ extends _uniffiBindgenReactNative.UniffiEnum {
2774
+ /**
2775
+ * @private
2776
+ * This field is private and should not be used, use `tag` instead.
2777
+ */
2778
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "OnchainUtxo";
2779
+ tag = OnchainUtxo_Tags.Local;
2780
+ constructor(inner) {
2781
+ super("OnchainUtxo", "Local");
2782
+ this.inner = Object.freeze(inner);
2783
+ }
2784
+ static new(inner) {
2785
+ return new Local_(inner);
2786
+ }
2787
+ static instanceOf(obj) {
2788
+ return obj.tag === OnchainUtxo_Tags.Local;
2789
+ }
2790
+ }
2791
+ /**
2792
+ * A spendable unilateral-exit output claimed from a VTXO.
2793
+ */
2794
+ class Exit_ extends _uniffiBindgenReactNative.UniffiEnum {
2795
+ /**
2796
+ * @private
2797
+ * This field is private and should not be used, use `tag` instead.
2798
+ */
2799
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "OnchainUtxo";
2800
+ tag = OnchainUtxo_Tags.Exit;
2801
+ constructor(inner) {
2802
+ super("OnchainUtxo", "Exit");
2803
+ this.inner = Object.freeze(inner);
2804
+ }
2805
+ static new(inner) {
2806
+ return new Exit_(inner);
2807
+ }
2808
+ static instanceOf(obj) {
2809
+ return obj.tag === OnchainUtxo_Tags.Exit;
2810
+ }
2811
+ }
2812
+ function instanceOf(obj) {
2813
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "OnchainUtxo";
2814
+ }
2815
+ return Object.freeze({
2816
+ instanceOf,
2817
+ Local: Local_,
2818
+ Exit: Exit_
2819
+ });
2820
+ })();
2821
+
2822
+ /**
2823
+ * An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
2824
+ */
2825
+
2826
+ // FfiConverter for enum OnchainUtxo
2827
+ const FfiConverterTypeOnchainUtxo = (() => {
2828
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2829
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2830
+ read(from) {
2831
+ switch (ordinalConverter.read(from)) {
2832
+ case 1:
2833
+ return new OnchainUtxo.Local({
2834
+ outpoint: FfiConverterTypeOutPoint.read(from),
2835
+ amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
2836
+ confirmationHeight: FfiConverterOptionalUInt32.read(from)
2837
+ });
2838
+ case 2:
2839
+ return new OnchainUtxo.Exit({
2840
+ vtxoId: FfiConverterString.read(from),
2841
+ amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
2842
+ height: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
2843
+ });
2844
+ default:
2845
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2846
+ }
2847
+ }
2848
+ write(value, into) {
2849
+ switch (value.tag) {
2850
+ case OnchainUtxo_Tags.Local:
2851
+ {
2852
+ ordinalConverter.write(1, into);
2853
+ const inner = value.inner;
2854
+ FfiConverterTypeOutPoint.write(inner.outpoint, into);
2855
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(inner.amountSats, into);
2856
+ FfiConverterOptionalUInt32.write(inner.confirmationHeight, into);
2857
+ return;
2858
+ }
2859
+ case OnchainUtxo_Tags.Exit:
2860
+ {
2861
+ ordinalConverter.write(2, into);
2862
+ const inner = value.inner;
2863
+ FfiConverterString.write(inner.vtxoId, into);
2864
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(inner.amountSats, into);
2865
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.height, into);
2866
+ return;
2867
+ }
2868
+ default:
2869
+ // Throwing from here means that OnchainUtxo_Tags hasn't matched an ordinal.
2870
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2871
+ }
2872
+ }
2873
+ allocationSize(value) {
2874
+ switch (value.tag) {
2875
+ case OnchainUtxo_Tags.Local:
2876
+ {
2877
+ const inner = value.inner;
2878
+ let size = ordinalConverter.allocationSize(1);
2879
+ size += FfiConverterTypeOutPoint.allocationSize(inner.outpoint);
2880
+ size += _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(inner.amountSats);
2881
+ size += FfiConverterOptionalUInt32.allocationSize(inner.confirmationHeight);
2882
+ return size;
2883
+ }
2884
+ case OnchainUtxo_Tags.Exit:
2885
+ {
2886
+ const inner = value.inner;
2887
+ let size = ordinalConverter.allocationSize(2);
2888
+ size += FfiConverterString.allocationSize(inner.vtxoId);
2889
+ size += _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(inner.amountSats);
2890
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.height);
2891
+ return size;
2892
+ }
2893
+ default:
2894
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2895
+ }
2896
+ }
2897
+ }
2898
+ return new FFIConverter();
2899
+ })();
2900
+
2901
+ // Enum: VtxoLockHolder
2902
+ let VtxoLockHolder_Tags = exports.VtxoLockHolder_Tags = /*#__PURE__*/function (VtxoLockHolder_Tags) {
2903
+ VtxoLockHolder_Tags["Action"] = "Action";
2904
+ VtxoLockHolder_Tags["Movement"] = "Movement";
2905
+ return VtxoLockHolder_Tags;
2906
+ }({});
2907
+ /**
2908
+ * Who holds the lock on a [`VtxoState::Locked`] VTXO.
2909
+ *
2910
+ * Mirrors `bark::vtxo::VtxoLockHolder`. Action-based subsystems lock with
2911
+ * `Action`; pre-action subsystems (round, offboard, board, lightning
2912
+ * receive) lock with `Movement`. As upstream converts subsystems to
2913
+ * actions, new locks migrate from `Movement` to `Action` per-subsystem.
2914
+ *
2915
+ * Serde/TS tags match upstream's serialization: `"action"` / `"movement"`.
2916
+ */
2917
+ const VtxoLockHolder = exports.VtxoLockHolder = (() => {
2918
+ /**
2919
+ * A wallet action checkpoint. `id` is upstream's `WalletActionId`
2920
+ * (an opaque string).
2921
+ */
2922
+ class Action_ extends _uniffiBindgenReactNative.UniffiEnum {
2923
+ /**
2924
+ * @private
2925
+ * This field is private and should not be used, use `tag` instead.
2926
+ */
2927
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "VtxoLockHolder";
2928
+ tag = VtxoLockHolder_Tags.Action;
2929
+ constructor(inner) {
2930
+ super("VtxoLockHolder", "Action");
2931
+ this.inner = Object.freeze(inner);
2932
+ }
2933
+ static new(inner) {
2934
+ return new Action_(inner);
2935
+ }
2936
+ static instanceOf(obj) {
2937
+ return obj.tag === VtxoLockHolder_Tags.Action;
2938
+ }
2939
+ }
2940
+ /**
2941
+ * A pre-action subsystem, keyed by its movement.
2942
+ */
2943
+ class Movement_ extends _uniffiBindgenReactNative.UniffiEnum {
2944
+ /**
2945
+ * @private
2946
+ * This field is private and should not be used, use `tag` instead.
2947
+ */
2948
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "VtxoLockHolder";
2949
+ tag = VtxoLockHolder_Tags.Movement;
2950
+ constructor(inner) {
2951
+ super("VtxoLockHolder", "Movement");
2952
+ this.inner = Object.freeze(inner);
2953
+ }
2954
+ static new(inner) {
2955
+ return new Movement_(inner);
2956
+ }
2957
+ static instanceOf(obj) {
2958
+ return obj.tag === VtxoLockHolder_Tags.Movement;
2959
+ }
2960
+ }
2961
+ function instanceOf(obj) {
2962
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "VtxoLockHolder";
2963
+ }
2964
+ return Object.freeze({
2965
+ instanceOf,
2966
+ Action: Action_,
2967
+ Movement: Movement_
2968
+ });
2969
+ })();
2970
+
2971
+ /**
2972
+ * Who holds the lock on a [`VtxoState::Locked`] VTXO.
2973
+ *
2974
+ * Mirrors `bark::vtxo::VtxoLockHolder`. Action-based subsystems lock with
2975
+ * `Action`; pre-action subsystems (round, offboard, board, lightning
2976
+ * receive) lock with `Movement`. As upstream converts subsystems to
2977
+ * actions, new locks migrate from `Movement` to `Action` per-subsystem.
2978
+ *
2979
+ * Serde/TS tags match upstream's serialization: `"action"` / `"movement"`.
2980
+ */
2981
+
2982
+ // FfiConverter for enum VtxoLockHolder
2983
+ const FfiConverterTypeVtxoLockHolder = (() => {
2984
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2985
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2986
+ read(from) {
2987
+ switch (ordinalConverter.read(from)) {
2988
+ case 1:
2989
+ return new VtxoLockHolder.Action({
2990
+ id: FfiConverterString.read(from)
2991
+ });
2992
+ case 2:
2993
+ return new VtxoLockHolder.Movement({
2994
+ id: _uniffiBindgenReactNative.FfiConverterUInt32.read(from)
2995
+ });
2996
+ default:
2997
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2998
+ }
2999
+ }
3000
+ write(value, into) {
3001
+ switch (value.tag) {
3002
+ case VtxoLockHolder_Tags.Action:
3003
+ {
3004
+ ordinalConverter.write(1, into);
3005
+ const inner = value.inner;
3006
+ FfiConverterString.write(inner.id, into);
3007
+ return;
3008
+ }
3009
+ case VtxoLockHolder_Tags.Movement:
3010
+ {
3011
+ ordinalConverter.write(2, into);
3012
+ const inner = value.inner;
3013
+ _uniffiBindgenReactNative.FfiConverterUInt32.write(inner.id, into);
3014
+ return;
3015
+ }
3016
+ default:
3017
+ // Throwing from here means that VtxoLockHolder_Tags hasn't matched an ordinal.
3018
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
3019
+ }
3020
+ }
3021
+ allocationSize(value) {
3022
+ switch (value.tag) {
3023
+ case VtxoLockHolder_Tags.Action:
3024
+ {
3025
+ const inner = value.inner;
3026
+ let size = ordinalConverter.allocationSize(1);
3027
+ size += FfiConverterString.allocationSize(inner.id);
3028
+ return size;
3029
+ }
3030
+ case VtxoLockHolder_Tags.Movement:
3031
+ {
3032
+ const inner = value.inner;
3033
+ let size = ordinalConverter.allocationSize(2);
3034
+ size += _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(inner.id);
3035
+ return size;
3036
+ }
3037
+ default:
3038
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
3039
+ }
3040
+ }
3041
+ }
3042
+ return new FFIConverter();
1270
3043
  })();
1271
3044
 
1272
- // Enum: LightningSendStatus
1273
- let LightningSendStatus_Tags = exports.LightningSendStatus_Tags = /*#__PURE__*/function (LightningSendStatus_Tags) {
1274
- LightningSendStatus_Tags["Unknown"] = "Unknown";
1275
- LightningSendStatus_Tags["InProgress"] = "InProgress";
1276
- LightningSendStatus_Tags["Paid"] = "Paid";
1277
- return LightningSendStatus_Tags;
3045
+ // Enum: VtxoState
3046
+ let VtxoState_Tags = exports.VtxoState_Tags = /*#__PURE__*/function (VtxoState_Tags) {
3047
+ VtxoState_Tags["Spendable"] = "Spendable";
3048
+ VtxoState_Tags["Locked"] = "Locked";
3049
+ VtxoState_Tags["Spent"] = "Spent";
3050
+ VtxoState_Tags["Exited"] = "Exited";
3051
+ return VtxoState_Tags;
1278
3052
  }({});
1279
3053
  /**
1280
- * Terminal/in-flight state of an outgoing lightning send.
3054
+ * Rich VTXO state, mirroring `bark::vtxo::VtxoState`.
1281
3055
  *
1282
- * Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
1283
- * `check_lightning_payment` now return this so callers can drive the
1284
- * crash-safe send flow themselves (initiate with `wait = false`, then poll).
3056
+ * Serde/TS tags match upstream's kebab-case serialization:
3057
+ * `"spendable"` | `"locked"` | `"spent"` | `"exited"`.
1285
3058
  */
1286
- const LightningSendStatus = exports.LightningSendStatus = (() => {
3059
+ const VtxoState = exports.VtxoState = (() => {
1287
3060
  /**
1288
- * No record of this payment (never started, or already pruned).
3061
+ * Available; can be spent in a future round.
1289
3062
  */
1290
- class Unknown_ extends _uniffiBindgenReactNative.UniffiEnum {
3063
+ class Spendable_ extends _uniffiBindgenReactNative.UniffiEnum {
1291
3064
  /**
1292
3065
  * @private
1293
3066
  * This field is private and should not be used, use `tag` instead.
1294
3067
  */
1295
- [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
1296
- tag = LightningSendStatus_Tags.Unknown;
3068
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "VtxoState";
3069
+ tag = VtxoState_Tags.Spendable;
1297
3070
  constructor() {
1298
- super("LightningSendStatus", "Unknown");
3071
+ super("VtxoState", "Spendable");
1299
3072
  }
1300
3073
  static new() {
1301
- return new Unknown_();
3074
+ return new Spendable_();
1302
3075
  }
1303
3076
  static instanceOf(obj) {
1304
- return obj.tag === LightningSendStatus_Tags.Unknown;
3077
+ return obj.tag === VtxoState_Tags.Spendable;
1305
3078
  }
1306
3079
  }
1307
3080
  /**
1308
- * Send is in flight; HTLC VTXOs are locked.
3081
+ * Locked by an operation. `holder` is `None` only for the narrow
3082
+ * window between creating a fresh locked VTXO and pinning it to a
3083
+ * specific operation, so a locked VTXO can legitimately carry no
3084
+ * lock reason yet.
1309
3085
  */
1310
- class InProgress_ extends _uniffiBindgenReactNative.UniffiEnum {
3086
+ class Locked_ extends _uniffiBindgenReactNative.UniffiEnum {
1311
3087
  /**
1312
3088
  * @private
1313
3089
  * This field is private and should not be used, use `tag` instead.
1314
3090
  */
1315
- [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
1316
- tag = LightningSendStatus_Tags.InProgress;
3091
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "VtxoState";
3092
+ tag = VtxoState_Tags.Locked;
1317
3093
  constructor(inner) {
1318
- super("LightningSendStatus", "InProgress");
3094
+ super("VtxoState", "Locked");
1319
3095
  this.inner = Object.freeze(inner);
1320
3096
  }
1321
3097
  static new(inner) {
1322
- return new InProgress_(inner);
3098
+ return new Locked_(inner);
1323
3099
  }
1324
3100
  static instanceOf(obj) {
1325
- return obj.tag === LightningSendStatus_Tags.InProgress;
3101
+ return obj.tag === VtxoState_Tags.Locked;
1326
3102
  }
1327
3103
  }
1328
3104
  /**
1329
- * Send has settled; the preimage proves payment.
3105
+ * Consumed.
1330
3106
  */
1331
- class Paid_ extends _uniffiBindgenReactNative.UniffiEnum {
3107
+ class Spent_ extends _uniffiBindgenReactNative.UniffiEnum {
1332
3108
  /**
1333
3109
  * @private
1334
3110
  * This field is private and should not be used, use `tag` instead.
1335
3111
  */
1336
- [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
1337
- tag = LightningSendStatus_Tags.Paid;
1338
- constructor(inner) {
1339
- super("LightningSendStatus", "Paid");
1340
- this.inner = Object.freeze(inner);
3112
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "VtxoState";
3113
+ tag = VtxoState_Tags.Spent;
3114
+ constructor() {
3115
+ super("VtxoState", "Spent");
1341
3116
  }
1342
- static new(inner) {
1343
- return new Paid_(inner);
3117
+ static new() {
3118
+ return new Spent_();
1344
3119
  }
1345
3120
  static instanceOf(obj) {
1346
- return obj.tag === LightningSendStatus_Tags.Paid;
3121
+ return obj.tag === VtxoState_Tags.Spent;
3122
+ }
3123
+ }
3124
+ /**
3125
+ * In (or completed) a unilateral exit.
3126
+ */
3127
+ class Exited_ extends _uniffiBindgenReactNative.UniffiEnum {
3128
+ /**
3129
+ * @private
3130
+ * This field is private and should not be used, use `tag` instead.
3131
+ */
3132
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "VtxoState";
3133
+ tag = VtxoState_Tags.Exited;
3134
+ constructor() {
3135
+ super("VtxoState", "Exited");
3136
+ }
3137
+ static new() {
3138
+ return new Exited_();
3139
+ }
3140
+ static instanceOf(obj) {
3141
+ return obj.tag === VtxoState_Tags.Exited;
1347
3142
  }
1348
3143
  }
1349
3144
  function instanceOf(obj) {
1350
- return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "LightningSendStatus";
3145
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "VtxoState";
1351
3146
  }
1352
3147
  return Object.freeze({
1353
3148
  instanceOf,
1354
- Unknown: Unknown_,
1355
- InProgress: InProgress_,
1356
- Paid: Paid_
3149
+ Spendable: Spendable_,
3150
+ Locked: Locked_,
3151
+ Spent: Spent_,
3152
+ Exited: Exited_
1357
3153
  });
1358
3154
  })();
1359
3155
 
1360
3156
  /**
1361
- * Terminal/in-flight state of an outgoing lightning send.
3157
+ * Rich VTXO state, mirroring `bark::vtxo::VtxoState`.
1362
3158
  *
1363
- * Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
1364
- * `check_lightning_payment` now return this so callers can drive the
1365
- * crash-safe send flow themselves (initiate with `wait = false`, then poll).
3159
+ * Serde/TS tags match upstream's kebab-case serialization:
3160
+ * `"spendable"` | `"locked"` | `"spent"` | `"exited"`.
1366
3161
  */
1367
3162
 
1368
- // FfiConverter for enum LightningSendStatus
1369
- const FfiConverterTypeLightningSendStatus = (() => {
3163
+ // FfiConverter for enum VtxoState
3164
+ const FfiConverterTypeVtxoState = (() => {
1370
3165
  const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1371
3166
  class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1372
3167
  read(from) {
1373
3168
  switch (ordinalConverter.read(from)) {
1374
3169
  case 1:
1375
- return new LightningSendStatus.Unknown();
3170
+ return new VtxoState.Spendable();
1376
3171
  case 2:
1377
- return new LightningSendStatus.InProgress({
1378
- send: FfiConverterTypeLightningSend.read(from)
3172
+ return new VtxoState.Locked({
3173
+ holder: FfiConverterOptionalTypeVtxoLockHolder.read(from)
1379
3174
  });
1380
3175
  case 3:
1381
- return new LightningSendStatus.Paid({
1382
- paymentHash: FfiConverterString.read(from),
1383
- preimage: FfiConverterString.read(from)
1384
- });
3176
+ return new VtxoState.Spent();
3177
+ case 4:
3178
+ return new VtxoState.Exited();
1385
3179
  default:
1386
3180
  throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1387
3181
  }
1388
3182
  }
1389
3183
  write(value, into) {
1390
3184
  switch (value.tag) {
1391
- case LightningSendStatus_Tags.Unknown:
3185
+ case VtxoState_Tags.Spendable:
1392
3186
  {
1393
3187
  ordinalConverter.write(1, into);
1394
3188
  return;
1395
3189
  }
1396
- case LightningSendStatus_Tags.InProgress:
3190
+ case VtxoState_Tags.Locked:
1397
3191
  {
1398
3192
  ordinalConverter.write(2, into);
1399
3193
  const inner = value.inner;
1400
- FfiConverterTypeLightningSend.write(inner.send, into);
3194
+ FfiConverterOptionalTypeVtxoLockHolder.write(inner.holder, into);
1401
3195
  return;
1402
3196
  }
1403
- case LightningSendStatus_Tags.Paid:
3197
+ case VtxoState_Tags.Spent:
1404
3198
  {
1405
3199
  ordinalConverter.write(3, into);
1406
- const inner = value.inner;
1407
- FfiConverterString.write(inner.paymentHash, into);
1408
- FfiConverterString.write(inner.preimage, into);
3200
+ return;
3201
+ }
3202
+ case VtxoState_Tags.Exited:
3203
+ {
3204
+ ordinalConverter.write(4, into);
1409
3205
  return;
1410
3206
  }
1411
3207
  default:
1412
- // Throwing from here means that LightningSendStatus_Tags hasn't matched an ordinal.
3208
+ // Throwing from here means that VtxoState_Tags hasn't matched an ordinal.
1413
3209
  throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1414
3210
  }
1415
3211
  }
1416
3212
  allocationSize(value) {
1417
3213
  switch (value.tag) {
1418
- case LightningSendStatus_Tags.Unknown:
3214
+ case VtxoState_Tags.Spendable:
1419
3215
  {
1420
3216
  return ordinalConverter.allocationSize(1);
1421
3217
  }
1422
- case LightningSendStatus_Tags.InProgress:
3218
+ case VtxoState_Tags.Locked:
1423
3219
  {
1424
3220
  const inner = value.inner;
1425
3221
  let size = ordinalConverter.allocationSize(2);
1426
- size += FfiConverterTypeLightningSend.allocationSize(inner.send);
3222
+ size += FfiConverterOptionalTypeVtxoLockHolder.allocationSize(inner.holder);
1427
3223
  return size;
1428
3224
  }
1429
- case LightningSendStatus_Tags.Paid:
3225
+ case VtxoState_Tags.Spent:
1430
3226
  {
1431
- const inner = value.inner;
1432
- let size = ordinalConverter.allocationSize(3);
1433
- size += FfiConverterString.allocationSize(inner.paymentHash);
1434
- size += FfiConverterString.allocationSize(inner.preimage);
1435
- return size;
3227
+ return ordinalConverter.allocationSize(3);
3228
+ }
3229
+ case VtxoState_Tags.Exited:
3230
+ {
3231
+ return ordinalConverter.allocationSize(4);
1436
3232
  }
1437
3233
  default:
1438
3234
  throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
@@ -1442,99 +3238,6 @@ const FfiConverterTypeLightningSendStatus = (() => {
1442
3238
  return new FFIConverter();
1443
3239
  })();
1444
3240
 
1445
- /**
1446
- * Severity of a log record.
1447
- */
1448
- let LogLevel = exports.LogLevel = /*#__PURE__*/function (LogLevel) {
1449
- LogLevel[LogLevel["Error"] = 0] = "Error";
1450
- LogLevel[LogLevel["Warn"] = 1] = "Warn";
1451
- LogLevel[LogLevel["Info"] = 2] = "Info";
1452
- LogLevel[LogLevel["Debug"] = 3] = "Debug";
1453
- LogLevel[LogLevel["Trace"] = 4] = "Trace";
1454
- return LogLevel;
1455
- }({});
1456
- const FfiConverterTypeLogLevel = (() => {
1457
- const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1458
- class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1459
- read(from) {
1460
- switch (ordinalConverter.read(from)) {
1461
- case 1:
1462
- return LogLevel.Error;
1463
- case 2:
1464
- return LogLevel.Warn;
1465
- case 3:
1466
- return LogLevel.Info;
1467
- case 4:
1468
- return LogLevel.Debug;
1469
- case 5:
1470
- return LogLevel.Trace;
1471
- default:
1472
- throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1473
- }
1474
- }
1475
- write(value, into) {
1476
- switch (value) {
1477
- case LogLevel.Error:
1478
- return ordinalConverter.write(1, into);
1479
- case LogLevel.Warn:
1480
- return ordinalConverter.write(2, into);
1481
- case LogLevel.Info:
1482
- return ordinalConverter.write(3, into);
1483
- case LogLevel.Debug:
1484
- return ordinalConverter.write(4, into);
1485
- case LogLevel.Trace:
1486
- return ordinalConverter.write(5, into);
1487
- }
1488
- }
1489
- allocationSize(value) {
1490
- return ordinalConverter.allocationSize(0);
1491
- }
1492
- }
1493
- return new FFIConverter();
1494
- })();
1495
- let Network = exports.Network = /*#__PURE__*/function (Network) {
1496
- Network[Network["Bitcoin"] = 0] = "Bitcoin";
1497
- Network[Network["Testnet"] = 1] = "Testnet";
1498
- Network[Network["Signet"] = 2] = "Signet";
1499
- Network[Network["Regtest"] = 3] = "Regtest";
1500
- return Network;
1501
- }({});
1502
- const FfiConverterTypeNetwork = (() => {
1503
- const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1504
- class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1505
- read(from) {
1506
- switch (ordinalConverter.read(from)) {
1507
- case 1:
1508
- return Network.Bitcoin;
1509
- case 2:
1510
- return Network.Testnet;
1511
- case 3:
1512
- return Network.Signet;
1513
- case 4:
1514
- return Network.Regtest;
1515
- default:
1516
- throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1517
- }
1518
- }
1519
- write(value, into) {
1520
- switch (value) {
1521
- case Network.Bitcoin:
1522
- return ordinalConverter.write(1, into);
1523
- case Network.Testnet:
1524
- return ordinalConverter.write(2, into);
1525
- case Network.Signet:
1526
- return ordinalConverter.write(3, into);
1527
- case Network.Regtest:
1528
- return ordinalConverter.write(4, into);
1529
- }
1530
- }
1531
- allocationSize(value) {
1532
- return ordinalConverter.allocationSize(0);
1533
- }
1534
- }
1535
- return new FFIConverter();
1536
- })();
1537
-
1538
3241
  // Enum: WalletNotification
1539
3242
  let WalletNotification_Tags = exports.WalletNotification_Tags = /*#__PURE__*/function (WalletNotification_Tags) {
1540
3243
  WalletNotification_Tags["MovementCreated"] = "MovementCreated";
@@ -2355,6 +4058,23 @@ class OnchainWallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
2355
4058
  throw __error;
2356
4059
  }
2357
4060
  }
4061
+
4062
+ /**
4063
+ * Cached network fee-rate estimates from the wallet's chain source.
4064
+ */
4065
+ async feeRates(asyncOpts_) /*throws*/{
4066
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4067
+ try {
4068
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4069
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_fee_rates(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));
4070
+ }, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeFeeRates.lift.bind(FfiConverterTypeFeeRates), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
4071
+ } catch (__error) {
4072
+ if (uniffiIsDebug && __error instanceof Error) {
4073
+ __error.stack = __stack;
4074
+ }
4075
+ throw __error;
4076
+ }
4077
+ }
2358
4078
  async newAddress(asyncOpts_) /*throws*/{
2359
4079
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2360
4080
  try {
@@ -2395,6 +4115,58 @@ class OnchainWallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
2395
4115
  }
2396
4116
  }
2397
4117
 
4118
+ /**
4119
+ * Current chain tip height from the wallet's chain source.
4120
+ */
4121
+ async tipHeight(asyncOpts_) /*throws*/{
4122
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4123
+ try {
4124
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4125
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_tip_height(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));
4126
+ }, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_u32, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_u32, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_u32, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_u32, /*liftFunc:*/_uniffiBindgenReactNative.FfiConverterUInt32.lift.bind(_uniffiBindgenReactNative.FfiConverterUInt32), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
4127
+ } catch (__error) {
4128
+ if (uniffiIsDebug && __error instanceof Error) {
4129
+ __error.stack = __stack;
4130
+ }
4131
+ throw __error;
4132
+ }
4133
+ }
4134
+
4135
+ /**
4136
+ * Every wallet transaction with fee, balance change, confirmation and
4137
+ * CPFP flag. Requires a prior `sync` to be meaningful.
4138
+ */
4139
+ async transactions(asyncOpts_) /*throws*/{
4140
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4141
+ try {
4142
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4143
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_transactions(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));
4144
+ }, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterArrayTypeWalletTransaction.lift.bind(FfiConverterArrayTypeWalletTransaction), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
4145
+ } catch (__error) {
4146
+ if (uniffiIsDebug && __error instanceof Error) {
4147
+ __error.stack = __stack;
4148
+ }
4149
+ throw __error;
4150
+ }
4151
+ }
4152
+
4153
+ /**
4154
+ * The wallet's unspent outputs. Requires a prior `sync` to be meaningful.
4155
+ */
4156
+ async utxos(asyncOpts_) /*throws*/{
4157
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4158
+ try {
4159
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4160
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_utxos(uniffiTypeOnchainWalletObjectFactory.clonePointer(this));
4161
+ }, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterArrayTypeOnchainUtxo.lift.bind(FfiConverterArrayTypeOnchainUtxo), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
4162
+ } catch (__error) {
4163
+ if (uniffiIsDebug && __error instanceof Error) {
4164
+ __error.stack = __stack;
4165
+ }
4166
+ throw __error;
4167
+ }
4168
+ }
4169
+
2398
4170
  /**
2399
4171
  * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2400
4172
  */
@@ -3208,7 +4980,7 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3208
4980
  }
3209
4981
 
3210
4982
  /**
3211
- * Pay to a Lightning Address (LNURL). UniFFI-only — lnurl-rs is not wasm-compatible.
4983
+ * Pay to a Lightning Address (`user@domain`), resolved via LNURL-pay.
3212
4984
  */
3213
4985
  async payLightningAddress(lightningAddress, amountSats, comment, wait = false, asyncOpts_) /*throws*/{
3214
4986
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
@@ -3251,7 +5023,7 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3251
5023
  }
3252
5024
 
3253
5025
  /**
3254
- * Pay a raw LNURL-pay link (`lnurl1…`). UniFFI-only — lnurl-rs is not wasm-compatible.
5026
+ * Pay a raw LNURL-pay link (`lnurl1…`).
3255
5027
  *
3256
5028
  * Resolves the LNURL-pay endpoint to a BOLT11 invoice and pays it. Errors
3257
5029
  * if the link decodes to a non-pay LNURL (auth, withdraw, channel).
@@ -3836,6 +5608,9 @@ const FfiConverterOptionalInt64 = new _uniffiBindgenReactNative.FfiConverterOpti
3836
5608
  // FfiConverter for ArkInfo | undefined
3837
5609
  const FfiConverterOptionalTypeArkInfo = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeArkInfo);
3838
5610
 
5611
+ // FfiConverter for BlockRef | undefined
5612
+ const FfiConverterOptionalTypeBlockRef = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeBlockRef);
5613
+
3839
5614
  // FfiConverter for ExitTransactionStatus | undefined
3840
5615
  const FfiConverterOptionalTypeExitTransactionStatus = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeExitTransactionStatus);
3841
5616
 
@@ -3866,6 +5641,9 @@ const FfiConverterArrayTypeDestination = new _uniffiBindgenReactNative.FfiConver
3866
5641
  // FfiConverter for Array<ExitProgressStatus>
3867
5642
  const FfiConverterArrayTypeExitProgressStatus = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeExitProgressStatus);
3868
5643
 
5644
+ // FfiConverter for Array<ExitTx>
5645
+ const FfiConverterArrayTypeExitTx = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeExitTx);
5646
+
3869
5647
  // FfiConverter for Array<ExitVtxo>
3870
5648
  const FfiConverterArrayTypeExitVtxo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeExitVtxo);
3871
5649
 
@@ -3881,23 +5659,38 @@ const FfiConverterArrayTypeMovement = new _uniffiBindgenReactNative.FfiConverter
3881
5659
  // FfiConverter for Array<PendingBoard>
3882
5660
  const FfiConverterArrayTypePendingBoard = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypePendingBoard);
3883
5661
 
5662
+ // FfiConverter for Array<PpmExpiryFeeEntry>
5663
+ const FfiConverterArrayTypePpmExpiryFeeEntry = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypePpmExpiryFeeEntry);
5664
+
3884
5665
  // FfiConverter for Array<RoundState>
3885
5666
  const FfiConverterArrayTypeRoundState = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeRoundState);
3886
5667
 
3887
5668
  // FfiConverter for Array<Vtxo>
3888
5669
  const FfiConverterArrayTypeVtxo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeVtxo);
3889
5670
 
5671
+ // FfiConverter for Array<WalletTransaction>
5672
+ const FfiConverterArrayTypeWalletTransaction = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeWalletTransaction);
5673
+
3890
5674
  // FfiConverter for Array<string>
3891
5675
  const FfiConverterArrayString = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterString);
3892
5676
 
5677
+ // FfiConverter for VtxoLockHolder | undefined
5678
+ const FfiConverterOptionalTypeVtxoLockHolder = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeVtxoLockHolder);
5679
+
3893
5680
  // FfiConverter for WalletNotification | undefined
3894
5681
  const FfiConverterOptionalTypeWalletNotification = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeWalletNotification);
3895
5682
 
3896
5683
  // FfiConverter for OnchainWalletLike | undefined
3897
5684
  const FfiConverterOptionalTypeOnchainWallet = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeOnchainWallet);
3898
5685
 
3899
- // FfiConverter for Array<string> | undefined
3900
- const FfiConverterOptionalArrayString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterArrayString);
5686
+ // FfiConverter for Array<ExitState>
5687
+ const FfiConverterArrayTypeExitState = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeExitState);
5688
+
5689
+ // FfiConverter for Array<OnchainUtxo>
5690
+ const FfiConverterArrayTypeOnchainUtxo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeOnchainUtxo);
5691
+
5692
+ // FfiConverter for Array<ExitState> | undefined
5693
+ const FfiConverterOptionalArrayTypeExitState = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterArrayTypeExitState);
3901
5694
 
3902
5695
  /**
3903
5696
  * This should be called before anything else.
@@ -3974,6 +5767,9 @@ function uniffiEnsureInitialized() {
3974
5767
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance() !== 39213) {
3975
5768
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");
3976
5769
  }
5770
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates() !== 30741) {
5771
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");
5772
+ }
3977
5773
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_new_address() !== 7405) {
3978
5774
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_new_address");
3979
5775
  }
@@ -3983,6 +5779,15 @@ function uniffiEnsureInitialized() {
3983
5779
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_sync() !== 4373) {
3984
5780
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_sync");
3985
5781
  }
5782
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_tip_height() !== 12254) {
5783
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_tip_height");
5784
+ }
5785
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_transactions() !== 566) {
5786
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_transactions");
5787
+ }
5788
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_utxos() !== 44926) {
5789
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_utxos");
5790
+ }
3986
5791
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height() !== 59034) {
3987
5792
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_exits_claimable_at_height");
3988
5793
  }
@@ -4145,7 +5950,7 @@ function uniffiEnsureInitialized() {
4145
5950
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos() !== 26775) {
4146
5951
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");
4147
5952
  }
4148
- if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !== 19392) {
5953
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !== 43061) {
4149
5954
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");
4150
5955
  }
4151
5956
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice() !== 26921) {
@@ -4154,7 +5959,7 @@ function uniffiEnsureInitialized() {
4154
5959
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer() !== 25462) {
4155
5960
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");
4156
5961
  }
4157
- if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lnurl() !== 25859) {
5962
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lnurl() !== 1459) {
4158
5963
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lnurl");
4159
5964
  }
4160
5965
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_peek_address() !== 31847) {
@@ -4285,6 +6090,7 @@ var _default = exports.default = Object.freeze({
4285
6090
  FfiConverterTypeBalance,
4286
6091
  FfiConverterTypeBarkLogger,
4287
6092
  FfiConverterTypeBlockRef,
6093
+ FfiConverterTypeBoardFees,
4288
6094
  FfiConverterTypeConfig,
4289
6095
  FfiConverterTypeCpfpParams,
4290
6096
  FfiConverterTypeCustomOnchainWalletCallbacks,
@@ -4292,30 +6098,45 @@ var _default = exports.default = Object.freeze({
4292
6098
  FfiConverterTypeError,
4293
6099
  FfiConverterTypeExitClaimTransaction,
4294
6100
  FfiConverterTypeExitProgressStatus,
6101
+ FfiConverterTypeExitState,
4295
6102
  FfiConverterTypeExitTransactionStatus,
6103
+ FfiConverterTypeExitTx,
6104
+ FfiConverterTypeExitTxOrigin,
6105
+ FfiConverterTypeExitTxStatus,
4296
6106
  FfiConverterTypeExitVtxo,
4297
6107
  FfiConverterTypeFeeEstimate,
6108
+ FfiConverterTypeFeeRates,
6109
+ FfiConverterTypeFeeSchedule,
4298
6110
  FfiConverterTypeLightningInvoice,
4299
6111
  FfiConverterTypeLightningReceive,
6112
+ FfiConverterTypeLightningReceiveFees,
4300
6113
  FfiConverterTypeLightningSend,
6114
+ FfiConverterTypeLightningSendFees,
4301
6115
  FfiConverterTypeLightningSendStatus,
4302
6116
  FfiConverterTypeLogLevel,
4303
6117
  FfiConverterTypeMovement,
4304
6118
  FfiConverterTypeNetwork,
4305
6119
  FfiConverterTypeNotificationHolder,
6120
+ FfiConverterTypeOffboardFees,
4306
6121
  FfiConverterTypeOffboardResult,
4307
6122
  FfiConverterTypeOnchainBalance,
6123
+ FfiConverterTypeOnchainUtxo,
4308
6124
  FfiConverterTypeOnchainWallet,
4309
6125
  FfiConverterTypeOutPoint,
4310
6126
  FfiConverterTypePendingBoard,
6127
+ FfiConverterTypePpmExpiryFeeEntry,
4311
6128
  FfiConverterTypeRecoveryBucket,
4312
6129
  FfiConverterTypeRecoveryReport,
6130
+ FfiConverterTypeRefreshFees,
4313
6131
  FfiConverterTypeRoundState,
4314
6132
  FfiConverterTypeVtxo,
6133
+ FfiConverterTypeVtxoLockHolder,
6134
+ FfiConverterTypeVtxoState,
4315
6135
  FfiConverterTypeWallet,
4316
6136
  FfiConverterTypeWalletNotification,
4317
6137
  FfiConverterTypeWalletOpenArgs,
4318
- FfiConverterTypeWalletProperties
6138
+ FfiConverterTypeWalletProperties,
6139
+ FfiConverterTypeWalletTransaction
4319
6140
  }
4320
6141
  });
4321
6142
  //# sourceMappingURL=bark.js.map