@secondts/bark-react-native 0.19.0 → 0.20.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;;AAwyBA;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;;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":[]}
@@ -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();
@@ -4347,6 +4349,28 @@ export class OnchainWallet extends UniffiAbstractObject {
4347
4349
  throw __error;
4348
4350
  }
4349
4351
  }
4352
+
4353
+ /**
4354
+ * Discover the wallet's pre-existing on-chain history. Run once after
4355
+ * restoring a wallet from a mnemonic: `sync` only covers addresses this
4356
+ * wallet instance has already revealed, so it never finds transactions
4357
+ * made by a previous incarnation. Gap-limited full scan on esplora
4358
+ * (`birthday_height` is ignored there), block scan from `birthday_height`
4359
+ * on bitcoind. Returns the total balance in sats afterwards.
4360
+ */
4361
+ async initialScan(birthdayHeight, asyncOpts_) /*throws*/{
4362
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4363
+ try {
4364
+ return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4365
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_initial_scan(uniffiTypeOnchainWalletObjectFactory.clonePointer(this), FfiConverterOptionalUInt32.lower(birthdayHeight));
4366
+ }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_u64, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_u64, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_u64, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_u64, /*liftFunc:*/FfiConverterUInt64.lift.bind(FfiConverterUInt64), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
4367
+ } catch (__error) {
4368
+ if (uniffiIsDebug && __error instanceof Error) {
4369
+ __error.stack = __stack;
4370
+ }
4371
+ throw __error;
4372
+ }
4373
+ }
4350
4374
  async newAddress(asyncOpts_) /*throws*/{
4351
4375
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
4352
4376
  try {
@@ -6095,6 +6119,9 @@ function uniffiEnsureInitialized() {
6095
6119
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates() !== 30741) {
6096
6120
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");
6097
6121
  }
6122
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan() !== 19010) {
6123
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_initial_scan");
6124
+ }
6098
6125
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_new_address() !== 7405) {
6099
6126
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_new_address");
6100
6127
  }