@secondts/bark-react-native 0.6.3 → 0.8.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.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.Vtxo = exports.RoundState = exports.PendingBoard = exports.OutPoint = exports.OnchainWallet = exports.OnchainBalance = exports.OffboardResult = exports.NotificationHolder = exports.Network = exports.Movement = exports.LogLevel = exports.LightningSend = exports.LightningReceive = exports.LightningInvoice = exports.FeeEstimate = exports.ExitVtxo = exports.ExitTransactionStatus = exports.ExitProgressStatus = exports.ExitClaimTransaction = exports.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BlockRef = exports.BarkLoggerImpl = exports.BarkError_Tags = exports.BarkError = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
6
+ exports.default = exports.WalletProperties = exports.WalletNotification_Tags = exports.WalletNotification = exports.Wallet = exports.Vtxo = exports.RoundState = 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.Destination = exports.CustomOnchainWalletCallbacksImpl = exports.CpfpParams = exports.Config = exports.BlockRef = exports.BarkLoggerImpl = exports.BarkError_Tags = exports.BarkError = exports.Balance = exports.ArkInfo = exports.AddressWithIndex = void 0;
7
7
  exports.extractTxFromPsbt = extractTxFromPsbt;
8
8
  exports.generateMnemonic = generateMnemonic;
9
9
  exports.setLogger = setLogger;
@@ -683,18 +683,20 @@ const FfiConverterTypeLightningSend = (() => {
683
683
  return {
684
684
  invoice: FfiConverterString.read(from),
685
685
  amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
686
+ feeSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
686
687
  htlcVtxoCount: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
687
- preimage: FfiConverterOptionalString.read(from)
688
+ hasFailedRevocation: _uniffiBindgenReactNative.FfiConverterBool.read(from)
688
689
  };
689
690
  }
690
691
  write(value, into) {
691
692
  FfiConverterString.write(value.invoice, into);
692
693
  _uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
694
+ _uniffiBindgenReactNative.FfiConverterUInt64.write(value.feeSats, into);
693
695
  _uniffiBindgenReactNative.FfiConverterUInt32.write(value.htlcVtxoCount, into);
694
- FfiConverterOptionalString.write(value.preimage, into);
696
+ _uniffiBindgenReactNative.FfiConverterBool.write(value.hasFailedRevocation, into);
695
697
  }
696
698
  allocationSize(value) {
697
- return FfiConverterString.allocationSize(value.invoice) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcVtxoCount) + FfiConverterOptionalString.allocationSize(value.preimage);
699
+ return FfiConverterString.allocationSize(value.invoice) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.feeSats) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.htlcVtxoCount) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.hasFailedRevocation);
698
700
  }
699
701
  }
700
702
  return new FFIConverter();
@@ -1677,6 +1679,179 @@ const FfiConverterTypeBarkError = (() => {
1677
1679
  return new FFIConverter();
1678
1680
  })();
1679
1681
 
1682
+ // Enum: LightningSendStatus
1683
+ let LightningSendStatus_Tags = exports.LightningSendStatus_Tags = /*#__PURE__*/function (LightningSendStatus_Tags) {
1684
+ LightningSendStatus_Tags["Unknown"] = "Unknown";
1685
+ LightningSendStatus_Tags["InProgress"] = "InProgress";
1686
+ LightningSendStatus_Tags["Paid"] = "Paid";
1687
+ return LightningSendStatus_Tags;
1688
+ }({});
1689
+ /**
1690
+ * Terminal/in-flight state of an outgoing lightning send.
1691
+ *
1692
+ * Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
1693
+ * `check_lightning_payment` now return this so callers can drive the
1694
+ * crash-safe send flow themselves (initiate with `wait = false`, then poll).
1695
+ */
1696
+ const LightningSendStatus = exports.LightningSendStatus = (() => {
1697
+ /**
1698
+ * No record of this payment (never started, or already pruned).
1699
+ */
1700
+ class Unknown_ extends _uniffiBindgenReactNative.UniffiEnum {
1701
+ /**
1702
+ * @private
1703
+ * This field is private and should not be used, use `tag` instead.
1704
+ */
1705
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
1706
+ tag = LightningSendStatus_Tags.Unknown;
1707
+ constructor() {
1708
+ super("LightningSendStatus", "Unknown");
1709
+ }
1710
+ static new() {
1711
+ return new Unknown_();
1712
+ }
1713
+ static instanceOf(obj) {
1714
+ return obj.tag === LightningSendStatus_Tags.Unknown;
1715
+ }
1716
+ }
1717
+ /**
1718
+ * Send is in flight; HTLC VTXOs are locked.
1719
+ */
1720
+ class InProgress_ extends _uniffiBindgenReactNative.UniffiEnum {
1721
+ /**
1722
+ * @private
1723
+ * This field is private and should not be used, use `tag` instead.
1724
+ */
1725
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
1726
+ tag = LightningSendStatus_Tags.InProgress;
1727
+ constructor(inner) {
1728
+ super("LightningSendStatus", "InProgress");
1729
+ this.inner = Object.freeze(inner);
1730
+ }
1731
+ static new(inner) {
1732
+ return new InProgress_(inner);
1733
+ }
1734
+ static instanceOf(obj) {
1735
+ return obj.tag === LightningSendStatus_Tags.InProgress;
1736
+ }
1737
+ }
1738
+ /**
1739
+ * Send has settled; the preimage proves payment.
1740
+ */
1741
+ class Paid_ extends _uniffiBindgenReactNative.UniffiEnum {
1742
+ /**
1743
+ * @private
1744
+ * This field is private and should not be used, use `tag` instead.
1745
+ */
1746
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "LightningSendStatus";
1747
+ tag = LightningSendStatus_Tags.Paid;
1748
+ constructor(inner) {
1749
+ super("LightningSendStatus", "Paid");
1750
+ this.inner = Object.freeze(inner);
1751
+ }
1752
+ static new(inner) {
1753
+ return new Paid_(inner);
1754
+ }
1755
+ static instanceOf(obj) {
1756
+ return obj.tag === LightningSendStatus_Tags.Paid;
1757
+ }
1758
+ }
1759
+ function instanceOf(obj) {
1760
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "LightningSendStatus";
1761
+ }
1762
+ return Object.freeze({
1763
+ instanceOf,
1764
+ Unknown: Unknown_,
1765
+ InProgress: InProgress_,
1766
+ Paid: Paid_
1767
+ });
1768
+ })();
1769
+
1770
+ /**
1771
+ * Terminal/in-flight state of an outgoing lightning send.
1772
+ *
1773
+ * Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
1774
+ * `check_lightning_payment` now return this so callers can drive the
1775
+ * crash-safe send flow themselves (initiate with `wait = false`, then poll).
1776
+ */
1777
+
1778
+ // FfiConverter for enum LightningSendStatus
1779
+ const FfiConverterTypeLightningSendStatus = (() => {
1780
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1781
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1782
+ read(from) {
1783
+ switch (ordinalConverter.read(from)) {
1784
+ case 1:
1785
+ return new LightningSendStatus.Unknown();
1786
+ case 2:
1787
+ return new LightningSendStatus.InProgress({
1788
+ send: FfiConverterTypeLightningSend.read(from)
1789
+ });
1790
+ case 3:
1791
+ return new LightningSendStatus.Paid({
1792
+ paymentHash: FfiConverterString.read(from),
1793
+ preimage: FfiConverterString.read(from)
1794
+ });
1795
+ default:
1796
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1797
+ }
1798
+ }
1799
+ write(value, into) {
1800
+ switch (value.tag) {
1801
+ case LightningSendStatus_Tags.Unknown:
1802
+ {
1803
+ ordinalConverter.write(1, into);
1804
+ return;
1805
+ }
1806
+ case LightningSendStatus_Tags.InProgress:
1807
+ {
1808
+ ordinalConverter.write(2, into);
1809
+ const inner = value.inner;
1810
+ FfiConverterTypeLightningSend.write(inner.send, into);
1811
+ return;
1812
+ }
1813
+ case LightningSendStatus_Tags.Paid:
1814
+ {
1815
+ ordinalConverter.write(3, into);
1816
+ const inner = value.inner;
1817
+ FfiConverterString.write(inner.paymentHash, into);
1818
+ FfiConverterString.write(inner.preimage, into);
1819
+ return;
1820
+ }
1821
+ default:
1822
+ // Throwing from here means that LightningSendStatus_Tags hasn't matched an ordinal.
1823
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1824
+ }
1825
+ }
1826
+ allocationSize(value) {
1827
+ switch (value.tag) {
1828
+ case LightningSendStatus_Tags.Unknown:
1829
+ {
1830
+ return ordinalConverter.allocationSize(1);
1831
+ }
1832
+ case LightningSendStatus_Tags.InProgress:
1833
+ {
1834
+ const inner = value.inner;
1835
+ let size = ordinalConverter.allocationSize(2);
1836
+ size += FfiConverterTypeLightningSend.allocationSize(inner.send);
1837
+ return size;
1838
+ }
1839
+ case LightningSendStatus_Tags.Paid:
1840
+ {
1841
+ const inner = value.inner;
1842
+ let size = ordinalConverter.allocationSize(3);
1843
+ size += FfiConverterString.allocationSize(inner.paymentHash);
1844
+ size += FfiConverterString.allocationSize(inner.preimage);
1845
+ return size;
1846
+ }
1847
+ default:
1848
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1849
+ }
1850
+ }
1851
+ }
1852
+ return new FFIConverter();
1853
+ })();
1854
+
1680
1855
  /**
1681
1856
  * Severity of a log record.
1682
1857
  */
@@ -2824,6 +2999,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
2824
2999
  throw __error;
2825
3000
  }
2826
3001
  }
3002
+ async allowLightningSendToExit(paymentHash, asyncOpts_) /*throws*/{
3003
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3004
+ try {
3005
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3006
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_allow_lightning_send_to_exit(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
3007
+ }, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3008
+ } catch (__error) {
3009
+ if (uniffiIsDebug && __error instanceof Error) {
3010
+ __error.stack = __stack;
3011
+ }
3012
+ throw __error;
3013
+ }
3014
+ }
2827
3015
  async arkInfo(asyncOpts_) {
2828
3016
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2829
3017
  try {
@@ -2837,6 +3025,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
2837
3025
  throw __error;
2838
3026
  }
2839
3027
  }
3028
+ async attemptLightningReceiveExit(paymentHash, asyncOpts_) /*throws*/{
3029
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3030
+ try {
3031
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3032
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_attempt_lightning_receive_exit(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
3033
+ }, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3034
+ } catch (__error) {
3035
+ if (uniffiIsDebug && __error instanceof Error) {
3036
+ __error.stack = __stack;
3037
+ }
3038
+ throw __error;
3039
+ }
3040
+ }
2840
3041
  async balance(asyncOpts_) /*throws*/{
2841
3042
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2842
3043
  try {
@@ -2946,7 +3147,7 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
2946
3147
  try {
2947
3148
  return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
2948
3149
  return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_check_lightning_payment(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash), _uniffiBindgenReactNative.FfiConverterBool.lower(wait));
2949
- }, /*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:*/FfiConverterOptionalString.lift.bind(FfiConverterOptionalString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3150
+ }, /*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:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
2950
3151
  } catch (__error) {
2951
3152
  if (uniffiIsDebug && __error instanceof Error) {
2952
3153
  __error.stack = __stack;
@@ -3245,6 +3446,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3245
3446
  throw __error;
3246
3447
  }
3247
3448
  }
3449
+ async isInvoicePaid(paymentHash, asyncOpts_) /*throws*/{
3450
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3451
+ try {
3452
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3453
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
3454
+ }, /*pollFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_poll_i8, /*cancelFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_cancel_i8, /*completeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_complete_i8, /*freeFunc:*/(0, _barkFfi.default)().ubrn_ffi_bark_ffi_rust_future_free_i8, /*liftFunc:*/_uniffiBindgenReactNative.FfiConverterBool.lift.bind(_uniffiBindgenReactNative.FfiConverterBool), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3455
+ } catch (__error) {
3456
+ if (uniffiIsDebug && __error instanceof Error) {
3457
+ __error.stack = __stack;
3458
+ }
3459
+ throw __error;
3460
+ }
3461
+ }
3248
3462
  async lightningReceiveStatus(paymentHash, asyncOpts_) /*throws*/{
3249
3463
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3250
3464
  try {
@@ -3258,6 +3472,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3258
3472
  throw __error;
3259
3473
  }
3260
3474
  }
3475
+ async lightningSendState(paymentHash, asyncOpts_) /*throws*/{
3476
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3477
+ try {
3478
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3479
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_send_state(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
3480
+ }, /*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:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3481
+ } catch (__error) {
3482
+ if (uniffiIsDebug && __error instanceof Error) {
3483
+ __error.stack = __stack;
3484
+ }
3485
+ throw __error;
3486
+ }
3487
+ }
3261
3488
  async listClaimableExits(asyncOpts_) /*throws*/{
3262
3489
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3263
3490
  try {
@@ -3446,12 +3673,12 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3446
3673
  /**
3447
3674
  * Pay to a Lightning Address (LNURL). UniFFI-only — lnurl-rs is not wasm-compatible.
3448
3675
  */
3449
- async payLightningAddress(lightningAddress, amountSats, comment, asyncOpts_) /*throws*/{
3676
+ async payLightningAddress(lightningAddress, amountSats, comment, wait, asyncOpts_) /*throws*/{
3450
3677
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3451
3678
  try {
3452
3679
  return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3453
- return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(lightningAddress), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), FfiConverterOptionalString.lower(comment));
3454
- }, /*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:*/FfiConverterTypeLightningSend.lift.bind(FfiConverterTypeLightningSend), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3680
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(lightningAddress), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), FfiConverterOptionalString.lower(comment), _uniffiBindgenReactNative.FfiConverterBool.lower(wait));
3681
+ }, /*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:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3455
3682
  } catch (__error) {
3456
3683
  if (uniffiIsDebug && __error instanceof Error) {
3457
3684
  __error.stack = __stack;
@@ -3459,12 +3686,12 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3459
3686
  throw __error;
3460
3687
  }
3461
3688
  }
3462
- async payLightningInvoice(invoice, amountSats, asyncOpts_) /*throws*/{
3689
+ async payLightningInvoice(invoice, amountSats, wait, asyncOpts_) /*throws*/{
3463
3690
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3464
3691
  try {
3465
3692
  return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3466
- return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(invoice), FfiConverterOptionalUInt64.lower(amountSats));
3467
- }, /*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:*/FfiConverterTypeLightningSend.lift.bind(FfiConverterTypeLightningSend), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3693
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(invoice), FfiConverterOptionalUInt64.lower(amountSats), _uniffiBindgenReactNative.FfiConverterBool.lower(wait));
3694
+ }, /*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:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3468
3695
  } catch (__error) {
3469
3696
  if (uniffiIsDebug && __error instanceof Error) {
3470
3697
  __error.stack = __stack;
@@ -3472,12 +3699,12 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3472
3699
  throw __error;
3473
3700
  }
3474
3701
  }
3475
- async payLightningOffer(offer, amountSats, asyncOpts_) /*throws*/{
3702
+ async payLightningOffer(offer, amountSats, wait, asyncOpts_) /*throws*/{
3476
3703
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3477
3704
  try {
3478
3705
  return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3479
- return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(offer), FfiConverterOptionalUInt64.lower(amountSats));
3480
- }, /*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:*/FfiConverterTypeLightningSend.lift.bind(FfiConverterTypeLightningSend), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3706
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(offer), FfiConverterOptionalUInt64.lower(amountSats), _uniffiBindgenReactNative.FfiConverterBool.lower(wait));
3707
+ }, /*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:*/FfiConverterTypeLightningSendStatus.lift.bind(FfiConverterTypeLightningSendStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
3481
3708
  } catch (__error) {
3482
3709
  if (uniffiIsDebug && __error instanceof Error) {
3483
3710
  __error.stack = __stack;
@@ -3784,6 +4011,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3784
4011
  throw __error;
3785
4012
  }
3786
4013
  }
4014
+ async stuckFailedLightningSends(asyncOpts_) /*throws*/{
4015
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4016
+ try {
4017
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4018
+ return (0, _barkFfi.default)().ubrn_uniffi_bark_ffi_fn_method_wallet_stuck_failed_lightning_sends(uniffiTypeWalletObjectFactory.clonePointer(this));
4019
+ }, /*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:*/FfiConverterArrayTypeLightningSend.lift.bind(FfiConverterArrayTypeLightningSend), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBarkError.lift.bind(FfiConverterTypeBarkError));
4020
+ } catch (__error) {
4021
+ if (uniffiIsDebug && __error instanceof Error) {
4022
+ __error.stack = __stack;
4023
+ }
4024
+ throw __error;
4025
+ }
4026
+ }
3787
4027
  async sync(asyncOpts_) /*throws*/{
3788
4028
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3789
4029
  try {
@@ -4088,9 +4328,15 @@ function uniffiEnsureInitialized() {
4088
4328
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_all_vtxos() !== 38449) {
4089
4329
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_all_vtxos");
4090
4330
  }
4331
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit() !== 44140) {
4332
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_allow_lightning_send_to_exit");
4333
+ }
4091
4334
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_ark_info() !== 37357) {
4092
4335
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_ark_info");
4093
4336
  }
4337
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit() !== 32877) {
4338
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_attempt_lightning_receive_exit");
4339
+ }
4094
4340
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance() !== 26361) {
4095
4341
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");
4096
4342
  }
@@ -4115,7 +4361,7 @@ function uniffiEnsureInitialized() {
4115
4361
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round() !== 21817) {
4116
4362
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_cancel_pending_round");
4117
4363
  }
4118
- if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment() !== 2315) {
4364
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment() !== 33087) {
4119
4365
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment");
4120
4366
  }
4121
4367
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_claimable_lightning_receive_balance_sats() !== 57824) {
@@ -4187,9 +4433,15 @@ function uniffiEnsureInitialized() {
4187
4433
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_import_vtxo() !== 58528) {
4188
4434
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_import_vtxo");
4189
4435
  }
4436
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid() !== 43344) {
4437
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");
4438
+ }
4190
4439
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status() !== 37213) {
4191
4440
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status");
4192
4441
  }
4442
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state() !== 37487) {
4443
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_send_state");
4444
+ }
4193
4445
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits() !== 46928) {
4194
4446
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits");
4195
4447
  }
@@ -4238,13 +4490,13 @@ function uniffiEnsureInitialized() {
4238
4490
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos() !== 45323) {
4239
4491
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_offboard_vtxos");
4240
4492
  }
4241
- if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !== 48668) {
4493
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !== 2440) {
4242
4494
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address");
4243
4495
  }
4244
- if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice() !== 64416) {
4496
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice() !== 18714) {
4245
4497
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice");
4246
4498
  }
4247
- if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer() !== 7458) {
4499
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer() !== 31129) {
4248
4500
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer");
4249
4501
  }
4250
4502
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_peek_address() !== 55042) {
@@ -4316,6 +4568,9 @@ function uniffiEnsureInitialized() {
4316
4568
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon() !== 27848) {
4317
4569
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");
4318
4570
  }
4571
+ if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends() !== 51351) {
4572
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");
4573
+ }
4319
4574
  if ((0, _barkFfi.default)().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync() !== 38360) {
4320
4575
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");
4321
4576
  }
@@ -4382,6 +4637,7 @@ var _default = exports.default = Object.freeze({
4382
4637
  FfiConverterTypeLightningInvoice,
4383
4638
  FfiConverterTypeLightningReceive,
4384
4639
  FfiConverterTypeLightningSend,
4640
+ FfiConverterTypeLightningSendStatus,
4385
4641
  FfiConverterTypeLogLevel,
4386
4642
  FfiConverterTypeMovement,
4387
4643
  FfiConverterTypeNetwork,