@secondts/bark-react-native 0.11.3 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AAqwBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAChC,eAAeF,MAAM;;AAErB;;AA6KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AA2uBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAChC,eAAeF,MAAM;;AAErB;;AAwKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
@@ -650,23 +650,23 @@ const FfiConverterTypeLightningReceive = (() => {
650
650
  read(from) {
651
651
  return {
652
652
  paymentHash: FfiConverterString.read(from),
653
- paymentPreimage: FfiConverterString.read(from),
654
653
  invoice: FfiConverterString.read(from),
655
654
  amountSats: FfiConverterUInt64.read(from),
656
- hasHtlcVtxos: FfiConverterBool.read(from),
657
- preimageRevealed: FfiConverterBool.read(from)
655
+ state: FfiConverterString.read(from),
656
+ paymentPreimage: FfiConverterOptionalString.read(from),
657
+ settledAt: FfiConverterOptionalInt64.read(from)
658
658
  };
659
659
  }
660
660
  write(value, into) {
661
661
  FfiConverterString.write(value.paymentHash, into);
662
- FfiConverterString.write(value.paymentPreimage, into);
663
662
  FfiConverterString.write(value.invoice, into);
664
663
  FfiConverterUInt64.write(value.amountSats, into);
665
- FfiConverterBool.write(value.hasHtlcVtxos, into);
666
- FfiConverterBool.write(value.preimageRevealed, into);
664
+ FfiConverterString.write(value.state, into);
665
+ FfiConverterOptionalString.write(value.paymentPreimage, into);
666
+ FfiConverterOptionalInt64.write(value.settledAt, into);
667
667
  }
668
668
  allocationSize(value) {
669
- return FfiConverterString.allocationSize(value.paymentHash) + FfiConverterString.allocationSize(value.paymentPreimage) + FfiConverterString.allocationSize(value.invoice) + FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterBool.allocationSize(value.hasHtlcVtxos) + FfiConverterBool.allocationSize(value.preimageRevealed);
669
+ return FfiConverterString.allocationSize(value.paymentHash) + FfiConverterString.allocationSize(value.invoice) + FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterString.allocationSize(value.state) + FfiConverterOptionalString.allocationSize(value.paymentPreimage) + FfiConverterOptionalInt64.allocationSize(value.settledAt);
670
670
  }
671
671
  }
672
672
  return new FFIConverter();
@@ -1777,48 +1777,27 @@ export class CustomOnchainWalletCallbacksImpl extends UniffiAbstractObject {
1777
1777
  }
1778
1778
 
1779
1779
  /**
1780
- * Get a wallet transaction by txid
1781
- *
1782
- * # Arguments
1783
- * * `txid` - Transaction ID as hex string
1784
- *
1785
- * # Returns
1786
- * Hex-encoded transaction, or null if not found
1787
- */
1788
- getWalletTx(txid) /*throws*/{
1789
- return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError), /*caller:*/callStatus => {
1790
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_get_wallet_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
1791
- }, /*liftString:*/FfiConverterString.lift));
1792
- }
1793
-
1794
- /**
1795
- * Get the block hash where a transaction was confirmed
1780
+ * Whether a script pubkey belongs to the wallet's keychains
1796
1781
  *
1797
1782
  * # Arguments
1798
- * * `txid` - Transaction ID as hex string
1799
- *
1800
- * # Returns
1801
- * Block reference with height and hash, or null if unconfirmed
1783
+ * * `script_pubkey_hex` - Hex-encoded script pubkey
1802
1784
  */
1803
- getWalletTxConfirmedBlock(txid) /*throws*/{
1804
- return FfiConverterOptionalTypeBlockRef.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError), /*caller:*/callStatus => {
1805
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_get_wallet_tx_confirmed_block(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
1785
+ isMine(scriptPubkeyHex) /*throws*/{
1786
+ return FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError), /*caller:*/callStatus => {
1787
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_is_mine(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this), FfiConverterString.lower(scriptPubkeyHex), callStatus);
1806
1788
  }, /*liftString:*/FfiConverterString.lift));
1807
1789
  }
1808
1790
 
1809
1791
  /**
1810
- * Find transaction that spends a given output
1792
+ * Register an unconfirmed transaction relevant to the wallet
1811
1793
  *
1812
1794
  * # Arguments
1813
- * * `outpoint` - Transaction outpoint to check
1814
- *
1815
- * # Returns
1816
- * Hex-encoded spending transaction, or null if unspent
1795
+ * * `tx_hex` - Hex-encoded transaction
1817
1796
  */
1818
- getSpendingTx(outpoint) /*throws*/{
1819
- return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError), /*caller:*/callStatus => {
1820
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_get_spending_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
1821
- }, /*liftString:*/FfiConverterString.lift));
1797
+ registerTx(txHex) /*throws*/{
1798
+ uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError), /*caller:*/callStatus => {
1799
+ nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_register_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
1800
+ }, /*liftString:*/FfiConverterString.lift);
1822
1801
  }
1823
1802
 
1824
1803
  /**
@@ -1981,14 +1960,14 @@ const uniffiCallbackInterfaceCustomOnchainWalletCallbacks = {
1981
1960
  uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/Exception.instanceOf, /*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError), /*lowerString:*/FfiConverterString.lower);
1982
1961
  return uniffiResult;
1983
1962
  },
1984
- getWalletTx: (uniffiHandle, txid) => {
1963
+ isMine: (uniffiHandle, scriptPubkeyHex) => {
1985
1964
  const uniffiMakeCall = () => {
1986
1965
  const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
1987
- return jsCallback.getWalletTx(FfiConverterString.lift(txid));
1966
+ return jsCallback.isMine(FfiConverterString.lift(scriptPubkeyHex));
1988
1967
  };
1989
1968
  const uniffiResult = UniffiResult.ready();
1990
1969
  const uniffiHandleSuccess = obj => {
1991
- UniffiResult.writeSuccess(uniffiResult, FfiConverterOptionalString.lower(obj));
1970
+ UniffiResult.writeSuccess(uniffiResult, FfiConverterBool.lower(obj));
1992
1971
  };
1993
1972
  const uniffiHandleError = (code, errBuf) => {
1994
1973
  UniffiResult.writeError(uniffiResult, code, errBuf);
@@ -1996,30 +1975,13 @@ const uniffiCallbackInterfaceCustomOnchainWalletCallbacks = {
1996
1975
  uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/Exception.instanceOf, /*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError), /*lowerString:*/FfiConverterString.lower);
1997
1976
  return uniffiResult;
1998
1977
  },
1999
- getWalletTxConfirmedBlock: (uniffiHandle, txid) => {
1978
+ registerTx: (uniffiHandle, txHex) => {
2000
1979
  const uniffiMakeCall = () => {
2001
1980
  const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
2002
- return jsCallback.getWalletTxConfirmedBlock(FfiConverterString.lift(txid));
1981
+ return jsCallback.registerTx(FfiConverterString.lift(txHex));
2003
1982
  };
2004
1983
  const uniffiResult = UniffiResult.ready();
2005
- const uniffiHandleSuccess = obj => {
2006
- UniffiResult.writeSuccess(uniffiResult, FfiConverterOptionalTypeBlockRef.lower(obj));
2007
- };
2008
- const uniffiHandleError = (code, errBuf) => {
2009
- UniffiResult.writeError(uniffiResult, code, errBuf);
2010
- };
2011
- uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/Exception.instanceOf, /*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError), /*lowerString:*/FfiConverterString.lower);
2012
- return uniffiResult;
2013
- },
2014
- getSpendingTx: (uniffiHandle, outpoint) => {
2015
- const uniffiMakeCall = () => {
2016
- const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
2017
- return jsCallback.getSpendingTx(FfiConverterTypeOutPoint.lift(outpoint));
2018
- };
2019
- const uniffiResult = UniffiResult.ready();
2020
- const uniffiHandleSuccess = obj => {
2021
- UniffiResult.writeSuccess(uniffiResult, FfiConverterOptionalString.lower(obj));
2022
- };
1984
+ const uniffiHandleSuccess = obj => {};
2023
1985
  const uniffiHandleError = (code, errBuf) => {
2024
1986
  UniffiResult.writeError(uniffiResult, code, errBuf);
2025
1987
  };
@@ -2507,11 +2469,11 @@ export class Wallet extends UniffiAbstractObject {
2507
2469
  throw __error;
2508
2470
  }
2509
2471
  }
2510
- async boardAll(onchainWallet, asyncOpts_) /*throws*/{
2472
+ async boardAll(asyncOpts_) /*throws*/{
2511
2473
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2512
2474
  try {
2513
2475
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
2514
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_board_all(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet));
2476
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_board_all(uniffiTypeWalletObjectFactory.clonePointer(this));
2515
2477
  }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypePendingBoard.lift.bind(FfiConverterTypePendingBoard), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
2516
2478
  } catch (__error) {
2517
2479
  if (uniffiIsDebug && __error instanceof Error) {
@@ -2520,11 +2482,11 @@ export class Wallet extends UniffiAbstractObject {
2520
2482
  throw __error;
2521
2483
  }
2522
2484
  }
2523
- async boardAmount(onchainWallet, amountSats, asyncOpts_) /*throws*/{
2485
+ async boardAmount(amountSats, asyncOpts_) /*throws*/{
2524
2486
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2525
2487
  try {
2526
2488
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
2527
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_board_amount(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet), FfiConverterUInt64.lower(amountSats));
2489
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_board_amount(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterUInt64.lower(amountSats));
2528
2490
  }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypePendingBoard.lift.bind(FfiConverterTypePendingBoard), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
2529
2491
  } catch (__error) {
2530
2492
  if (uniffiIsDebug && __error instanceof Error) {
@@ -2533,11 +2495,11 @@ export class Wallet extends UniffiAbstractObject {
2533
2495
  throw __error;
2534
2496
  }
2535
2497
  }
2536
- async bolt11Invoice(amountSats, description, asyncOpts_) /*throws*/{
2498
+ async bolt11Invoice(amountSats, description, token = undefined, asyncOpts_) /*throws*/{
2537
2499
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2538
2500
  try {
2539
2501
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
2540
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_bolt11_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterUInt64.lower(amountSats), FfiConverterOptionalString.lower(description));
2502
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_bolt11_invoice(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterUInt64.lower(amountSats), FfiConverterOptionalString.lower(description), FfiConverterOptionalString.lower(token));
2541
2503
  }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningInvoice.lift.bind(FfiConverterTypeLightningInvoice), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
2542
2504
  } catch (__error) {
2543
2505
  if (uniffiIsDebug && __error instanceof Error) {
@@ -2915,12 +2877,17 @@ export class Wallet extends UniffiAbstractObject {
2915
2877
  throw __error;
2916
2878
  }
2917
2879
  }
2918
- async lightningReceiveStatus(paymentHash, asyncOpts_) /*throws*/{
2880
+
2881
+ /**
2882
+ * Triage a payment hash: settled or in-progress. Errors if no lightning
2883
+ * receive is known for this payment hash.
2884
+ */
2885
+ async lightningReceiveState(paymentHash, asyncOpts_) /*throws*/{
2919
2886
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
2920
2887
  try {
2921
2888
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
2922
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_receive_status(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
2923
- }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterOptionalTypeLightningReceive.lift.bind(FfiConverterOptionalTypeLightningReceive), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
2889
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_receive_state(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash));
2890
+ }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningReceive.lift.bind(FfiConverterTypeLightningReceive), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
2924
2891
  } catch (__error) {
2925
2892
  if (uniffiIsDebug && __error instanceof Error) {
2926
2893
  __error.stack = __stack;
@@ -3003,32 +2970,6 @@ export class Wallet extends UniffiAbstractObject {
3003
2970
  throw __error;
3004
2971
  }
3005
2972
  }
3006
- async maintenanceWithOnchain(onchainWallet, asyncOpts_) /*throws*/{
3007
- const __stack = uniffiIsDebug ? new Error().stack : undefined;
3008
- try {
3009
- return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3010
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_with_onchain(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet));
3011
- }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3012
- } catch (__error) {
3013
- if (uniffiIsDebug && __error instanceof Error) {
3014
- __error.stack = __stack;
3015
- }
3016
- throw __error;
3017
- }
3018
- }
3019
- async maintenanceWithOnchainDelegated(onchainWallet, asyncOpts_) /*throws*/{
3020
- const __stack = uniffiIsDebug ? new Error().stack : undefined;
3021
- try {
3022
- return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3023
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_maintenance_with_onchain_delegated(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet));
3024
- }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3025
- } catch (__error) {
3026
- if (uniffiIsDebug && __error instanceof Error) {
3027
- __error.stack = __stack;
3028
- }
3029
- throw __error;
3030
- }
3031
- }
3032
2973
  async network(asyncOpts_) /*throws*/{
3033
2974
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3034
2975
  try {
@@ -3292,11 +3233,11 @@ export class Wallet extends UniffiAbstractObject {
3292
3233
  throw __error;
3293
3234
  }
3294
3235
  }
3295
- async progressExits(onchainWallet, feeRateSatPerVb, asyncOpts_) /*throws*/{
3236
+ async progressExits(feeRateSatPerVb, asyncOpts_) /*throws*/{
3296
3237
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3297
3238
  try {
3298
3239
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3299
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_progress_exits(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet), FfiConverterOptionalUInt64.lower(feeRateSatPerVb));
3240
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_progress_exits(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterOptionalUInt64.lower(feeRateSatPerVb));
3300
3241
  }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterArrayTypeExitProgressStatus.lift.bind(FfiConverterArrayTypeExitProgressStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3301
3242
  } catch (__error) {
3302
3243
  if (uniffiIsDebug && __error instanceof Error) {
@@ -3370,11 +3311,16 @@ export class Wallet extends UniffiAbstractObject {
3370
3311
  throw __error;
3371
3312
  }
3372
3313
  }
3373
- async runDaemon(onchainWallet, asyncOpts_) /*throws*/{
3314
+
3315
+ /**
3316
+ * Start the background daemon. The onchain wallet used by the daemon is
3317
+ * the one supplied to `Wallet::open` (see `WalletOpenArgs.onchain`).
3318
+ */
3319
+ async runDaemon(asyncOpts_) /*throws*/{
3374
3320
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3375
3321
  try {
3376
3322
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3377
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_run_daemon(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterOptionalTypeOnchainWallet.lower(onchainWallet));
3323
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_run_daemon(uniffiTypeWalletObjectFactory.clonePointer(this));
3378
3324
  }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3379
3325
  } catch (__error) {
3380
3326
  if (uniffiIsDebug && __error instanceof Error) {
@@ -3500,11 +3446,11 @@ export class Wallet extends UniffiAbstractObject {
3500
3446
  throw __error;
3501
3447
  }
3502
3448
  }
3503
- async syncExits(onchainWallet, asyncOpts_) /*throws*/{
3449
+ async syncExits(asyncOpts_) /*throws*/{
3504
3450
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3505
3451
  try {
3506
3452
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3507
- return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_exits(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOnchainWallet.lower(onchainWallet));
3453
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_sync_exits(uniffiTypeWalletObjectFactory.clonePointer(this));
3508
3454
  }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3509
3455
  } catch (__error) {
3510
3456
  if (uniffiIsDebug && __error instanceof Error) {
@@ -3565,7 +3511,7 @@ export class Wallet extends UniffiAbstractObject {
3565
3511
  try {
3566
3512
  return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3567
3513
  return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_try_claim_lightning_receive(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(paymentHash), FfiConverterBool.lower(wait));
3568
- }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3514
+ }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLightningReceive.lift.bind(FfiConverterTypeLightningReceive), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
3569
3515
  } catch (__error) {
3570
3516
  if (uniffiIsDebug && __error instanceof Error) {
3571
3517
  __error.stack = __stack;
@@ -3655,18 +3601,15 @@ const FfiConverterTypeWallet = new FfiConverterObject(uniffiTypeWalletObjectFact
3655
3601
  // FfiConverter for boolean | undefined
3656
3602
  const FfiConverterOptionalBool = new FfiConverterOptional(FfiConverterBool);
3657
3603
 
3604
+ // FfiConverter for /*i64*/bigint | undefined
3605
+ const FfiConverterOptionalInt64 = new FfiConverterOptional(FfiConverterInt64);
3606
+
3658
3607
  // FfiConverter for ArkInfo | undefined
3659
3608
  const FfiConverterOptionalTypeArkInfo = new FfiConverterOptional(FfiConverterTypeArkInfo);
3660
3609
 
3661
- // FfiConverter for BlockRef | undefined
3662
- const FfiConverterOptionalTypeBlockRef = new FfiConverterOptional(FfiConverterTypeBlockRef);
3663
-
3664
3610
  // FfiConverter for ExitTransactionStatus | undefined
3665
3611
  const FfiConverterOptionalTypeExitTransactionStatus = new FfiConverterOptional(FfiConverterTypeExitTransactionStatus);
3666
3612
 
3667
- // FfiConverter for LightningReceive | undefined
3668
- const FfiConverterOptionalTypeLightningReceive = new FfiConverterOptional(FfiConverterTypeLightningReceive);
3669
-
3670
3613
  // FfiConverter for RoundState | undefined
3671
3614
  const FfiConverterOptionalTypeRoundState = new FfiConverterOptional(FfiConverterTypeRoundState);
3672
3615
 
@@ -3778,22 +3721,19 @@ function uniffiEnsureInitialized() {
3778
3721
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_finish_psbt() !== 39878) {
3779
3722
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_finish_psbt");
3780
3723
  }
3781
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx() !== 40848) {
3782
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx");
3783
- }
3784
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx_confirmed_block() !== 20505) {
3785
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_wallet_tx_confirmed_block");
3724
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine() !== 18867) {
3725
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_is_mine");
3786
3726
  }
3787
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_spending_tx() !== 24154) {
3788
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_get_spending_tx");
3727
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx() !== 17970) {
3728
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx");
3789
3729
  }
3790
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp() !== 58200) {
3730
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp() !== 62938) {
3791
3731
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");
3792
3732
  }
3793
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp() !== 64815) {
3733
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp() !== 47426) {
3794
3734
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");
3795
3735
  }
3796
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync() !== 29018) {
3736
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync() !== 12900) {
3797
3737
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync");
3798
3738
  }
3799
3739
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_barklogger_log() !== 30279) {
@@ -3829,13 +3769,13 @@ function uniffiEnsureInitialized() {
3829
3769
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_balance() !== 37345) {
3830
3770
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_balance");
3831
3771
  }
3832
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_all() !== 58611) {
3772
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_all() !== 5667) {
3833
3773
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_all");
3834
3774
  }
3835
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount() !== 51838) {
3775
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount() !== 54692) {
3836
3776
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_amount");
3837
3777
  }
3838
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice() !== 43491) {
3778
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice() !== 54959) {
3839
3779
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice");
3840
3780
  }
3841
3781
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_broadcast_tx() !== 46367) {
@@ -3925,8 +3865,8 @@ function uniffiEnsureInitialized() {
3925
3865
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid() !== 31079) {
3926
3866
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid");
3927
3867
  }
3928
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status() !== 27695) {
3929
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status");
3868
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state() !== 27834) {
3869
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_receive_state");
3930
3870
  }
3931
3871
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state() !== 5687) {
3932
3872
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_lightning_send_state");
@@ -3949,12 +3889,6 @@ function uniffiEnsureInitialized() {
3949
3889
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh() !== 34548) {
3950
3890
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_refresh");
3951
3891
  }
3952
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_with_onchain() !== 16119) {
3953
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_with_onchain");
3954
- }
3955
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_maintenance_with_onchain_delegated() !== 40766) {
3956
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_maintenance_with_onchain_delegated");
3957
- }
3958
3892
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_network() !== 2007) {
3959
3893
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_network");
3960
3894
  }
@@ -4015,7 +3949,7 @@ function uniffiEnsureInitialized() {
4015
3949
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pending_round_states() !== 11480) {
4016
3950
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_pending_round_states");
4017
3951
  }
4018
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_exits() !== 7089) {
3952
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_exits() !== 6255) {
4019
3953
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_progress_exits");
4020
3954
  }
4021
3955
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_progress_pending_rounds() !== 43537) {
@@ -4033,7 +3967,7 @@ function uniffiEnsureInitialized() {
4033
3967
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated() !== 61476) {
4034
3968
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_vtxos_delegated");
4035
3969
  }
4036
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_run_daemon() !== 3475) {
3970
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_run_daemon() !== 9520) {
4037
3971
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_run_daemon");
4038
3972
  }
4039
3973
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_send_arkoor_payment() !== 46166) {
@@ -4063,7 +3997,7 @@ function uniffiEnsureInitialized() {
4063
3997
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync() !== 2151) {
4064
3998
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync");
4065
3999
  }
4066
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_exits() !== 22078) {
4000
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_exits() !== 12141) {
4067
4001
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_sync_exits");
4068
4002
  }
4069
4003
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_sync_force_exited_vtxos() !== 25363) {
@@ -4075,7 +4009,7 @@ function uniffiEnsureInitialized() {
4075
4009
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives() !== 14560) {
4076
4010
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_all_lightning_receives");
4077
4011
  }
4078
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive() !== 45229) {
4012
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive() !== 43209) {
4079
4013
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_try_claim_lightning_receive");
4080
4014
  }
4081
4015
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !== 10861) {