@secondts/bark-react-native 0.20.0 → 0.21.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.
@@ -1 +1 @@
1
- {"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AA6yBA;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":[]}
1
+ {"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AAwzBA;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":[]}
@@ -151,6 +151,7 @@ const FfiConverterTypeArkInfo = (() => {
151
151
  roundIntervalSecs: FfiConverterUInt64.read(from),
152
152
  nbRoundNonces: FfiConverterUInt32.read(from),
153
153
  vtxoExitDelta: FfiConverterUInt32.read(from),
154
+ vtxoLifetime: FfiConverterUInt32.read(from),
154
155
  vtxoExpiryDelta: FfiConverterUInt32.read(from),
155
156
  htlcSendExpiryDelta: FfiConverterUInt32.read(from),
156
157
  htlcExpiryDelta: FfiConverterUInt32.read(from),
@@ -169,6 +170,7 @@ const FfiConverterTypeArkInfo = (() => {
169
170
  FfiConverterUInt64.write(value.roundIntervalSecs, into);
170
171
  FfiConverterUInt32.write(value.nbRoundNonces, into);
171
172
  FfiConverterUInt32.write(value.vtxoExitDelta, into);
173
+ FfiConverterUInt32.write(value.vtxoLifetime, into);
172
174
  FfiConverterUInt32.write(value.vtxoExpiryDelta, into);
173
175
  FfiConverterUInt32.write(value.htlcSendExpiryDelta, into);
174
176
  FfiConverterUInt32.write(value.htlcExpiryDelta, into);
@@ -181,7 +183,7 @@ const FfiConverterTypeArkInfo = (() => {
181
183
  FfiConverterUInt16.write(value.maxVtxoExitDepth, into);
182
184
  }
183
185
  allocationSize(value) {
184
- return FfiConverterTypeNetwork.allocationSize(value.network) + FfiConverterString.allocationSize(value.serverPubkey) + FfiConverterUInt64.allocationSize(value.roundIntervalSecs) + FfiConverterUInt32.allocationSize(value.nbRoundNonces) + FfiConverterUInt32.allocationSize(value.vtxoExitDelta) + FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta) + FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta) + FfiConverterUInt32.allocationSize(value.htlcExpiryDelta) + FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats) + FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations) + FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta) + FfiConverterUInt64.allocationSize(value.minBoardAmountSats) + FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired) + FfiConverterTypeFeeSchedule.allocationSize(value.feeSchedule) + FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);
186
+ return FfiConverterTypeNetwork.allocationSize(value.network) + FfiConverterString.allocationSize(value.serverPubkey) + FfiConverterUInt64.allocationSize(value.roundIntervalSecs) + FfiConverterUInt32.allocationSize(value.nbRoundNonces) + FfiConverterUInt32.allocationSize(value.vtxoExitDelta) + FfiConverterUInt32.allocationSize(value.vtxoLifetime) + FfiConverterUInt32.allocationSize(value.vtxoExpiryDelta) + FfiConverterUInt32.allocationSize(value.htlcSendExpiryDelta) + FfiConverterUInt32.allocationSize(value.htlcExpiryDelta) + FfiConverterOptionalUInt64.allocationSize(value.maxVtxoAmountSats) + FfiConverterUInt32.allocationSize(value.requiredBoardConfirmations) + FfiConverterUInt16.allocationSize(value.maxUserInvoiceCltvDelta) + FfiConverterUInt64.allocationSize(value.minBoardAmountSats) + FfiConverterBool.allocationSize(value.lnReceiveAntiDosRequired) + FfiConverterTypeFeeSchedule.allocationSize(value.feeSchedule) + FfiConverterUInt16.allocationSize(value.maxVtxoExitDepth);
185
187
  }
186
188
  }
187
189
  return new FFIConverter();
@@ -302,6 +304,50 @@ const FfiConverterTypeBoardFees = (() => {
302
304
  }
303
305
  return new FFIConverter();
304
306
  })();
307
+
308
+ /**
309
+ * Destination for an externally funded board (e.g. a payjoin receive).
310
+ *
311
+ * The funding script commits to the derived keypair and expiry height, so
312
+ * `keypair_index` and `expiry_height` must be passed back unchanged to
313
+ * `board_psbt` once the funding PSBT is available — including on retries
314
+ * after the sender changes the transaction.
315
+ */
316
+
317
+ /**
318
+ * Generated factory for {@link BoardFundingInfo} record objects.
319
+ */
320
+ export const BoardFundingInfo = (() => {
321
+ const defaults = () => ({});
322
+ const create = (() => {
323
+ return uniffiCreateRecord(defaults);
324
+ })();
325
+ return Object.freeze({
326
+ create,
327
+ new: create,
328
+ defaults: () => Object.freeze(defaults())
329
+ });
330
+ })();
331
+ const FfiConverterTypeBoardFundingInfo = (() => {
332
+ class FFIConverter extends AbstractFfiConverterByteArray {
333
+ read(from) {
334
+ return {
335
+ address: FfiConverterString.read(from),
336
+ expiryHeight: FfiConverterUInt32.read(from),
337
+ keypairIndex: FfiConverterUInt32.read(from)
338
+ };
339
+ }
340
+ write(value, into) {
341
+ FfiConverterString.write(value.address, into);
342
+ FfiConverterUInt32.write(value.expiryHeight, into);
343
+ FfiConverterUInt32.write(value.keypairIndex, into);
344
+ }
345
+ allocationSize(value) {
346
+ return FfiConverterString.allocationSize(value.address) + FfiConverterUInt32.allocationSize(value.expiryHeight) + FfiConverterUInt32.allocationSize(value.keypairIndex);
347
+ }
348
+ }
349
+ return new FFIConverter();
350
+ })();
305
351
  /**
306
352
  * Generated factory for {@link Config} record objects.
307
353
  */
@@ -4675,6 +4721,32 @@ export class Wallet extends UniffiAbstractObject {
4675
4721
  throw __error;
4676
4722
  }
4677
4723
  }
4724
+ async boardFundingAddress(asyncOpts_) /*throws*/{
4725
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4726
+ try {
4727
+ return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4728
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_board_funding_address(uniffiTypeWalletObjectFactory.clonePointer(this));
4729
+ }, /*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:*/FfiConverterTypeBoardFundingInfo.lift.bind(FfiConverterTypeBoardFundingInfo), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
4730
+ } catch (__error) {
4731
+ if (uniffiIsDebug && __error instanceof Error) {
4732
+ __error.stack = __stack;
4733
+ }
4734
+ throw __error;
4735
+ }
4736
+ }
4737
+ async boardPsbt(psbtBase64, keypairIndex, expiryHeight, asyncOpts_) /*throws*/{
4738
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4739
+ try {
4740
+ return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4741
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_board_psbt(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(psbtBase64), FfiConverterUInt32.lower(keypairIndex), FfiConverterUInt32.lower(expiryHeight));
4742
+ }, /*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));
4743
+ } catch (__error) {
4744
+ if (uniffiIsDebug && __error instanceof Error) {
4745
+ __error.stack = __stack;
4746
+ }
4747
+ throw __error;
4748
+ }
4749
+ }
4678
4750
  async bolt11Invoice(amountSats, description, token = undefined, asyncOpts_) /*throws*/{
4679
4751
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
4680
4752
  try {
@@ -6162,6 +6234,12 @@ function uniffiEnsureInitialized() {
6162
6234
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_amount() !== 54692) {
6163
6235
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_amount");
6164
6236
  }
6237
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_funding_address() !== 8961) {
6238
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_funding_address");
6239
+ }
6240
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_board_psbt() !== 28300) {
6241
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_board_psbt");
6242
+ }
6165
6243
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice() !== 54959) {
6166
6244
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_bolt11_invoice");
6167
6245
  }
@@ -6453,6 +6531,7 @@ export default Object.freeze({
6453
6531
  FfiConverterTypeBarkLogger,
6454
6532
  FfiConverterTypeBlockRef,
6455
6533
  FfiConverterTypeBoardFees,
6534
+ FfiConverterTypeBoardFundingInfo,
6456
6535
  FfiConverterTypeConfig,
6457
6536
  FfiConverterTypeCpfpParams,
6458
6537
  FfiConverterTypeCustomOnchainWalletCallbacks,