@secondts/bark-react-native 0.1.2-beta.30 → 0.1.2-beta.32

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.
@@ -184,7 +184,8 @@ interface NativeModuleInterface {
184
184
  ): bigint;
185
185
  ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(
186
186
  ptr: bigint,
187
- amountSats: bigint,
187
+ address: Uint8Array,
188
+ vtxoIds: Uint8Array,
188
189
  uniffi_out_err: UniffiRustCallStatus
189
190
  ): bigint;
190
191
  ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_refresh_fee(
@@ -192,6 +193,12 @@ interface NativeModuleInterface {
192
193
  vtxoIds: Uint8Array,
193
194
  uniffi_out_err: UniffiRustCallStatus
194
195
  ): bigint;
196
+ ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(
197
+ ptr: bigint,
198
+ address: Uint8Array,
199
+ amountSats: bigint,
200
+ uniffi_out_err: UniffiRustCallStatus
201
+ ): bigint;
195
202
  ubrn_uniffi_bark_ffi_fn_method_wallet_fingerprint(
196
203
  ptr: bigint,
197
204
  uniffi_out_err: UniffiRustCallStatus
@@ -504,6 +511,7 @@ interface NativeModuleInterface {
504
511
  ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_send_fee(): number;
505
512
  ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee(): number;
506
513
  ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee(): number;
514
+ ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee(): number;
507
515
  ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint(): number;
508
516
  ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_status(): number;
509
517
  ubrn_uniffi_bark_ffi_checksum_method_wallet_get_exit_vtxos(): number;
@@ -3680,11 +3680,15 @@ export interface WalletInterface {
3680
3680
  *
3681
3681
  * # Arguments
3682
3682
  *
3683
- * * `amount_sats` - Amount to offboard in sats
3683
+ * * `address` - Destination address for the offboard
3684
+ * * `vtxo_ids` - VTXOs to offboard
3684
3685
  *
3685
3686
  * Returns the estimated fee in sats
3686
3687
  */
3687
- estimateOffboardFee(amountSats: /*u64*/ bigint): /*throws*/ /*u64*/ bigint;
3688
+ estimateOffboardFee(
3689
+ address: string,
3690
+ vtxoIds: Array<string>
3691
+ ): /*throws*/ /*u64*/ bigint;
3688
3692
  /**
3689
3693
  * Estimate the fee for a refresh operation
3690
3694
  *
@@ -3695,6 +3699,20 @@ export interface WalletInterface {
3695
3699
  * Returns the estimated fee in sats
3696
3700
  */
3697
3701
  estimateRefreshFee(vtxoIds: Array<string>): /*throws*/ /*u64*/ bigint;
3702
+ /**
3703
+ * Estimate the fee for a send onchain operation
3704
+ *
3705
+ * # Arguments
3706
+ *
3707
+ * * `address` - Destination address
3708
+ * * `amount_sats` - Amount to send in sats
3709
+ *
3710
+ * Returns the estimated fee in sats
3711
+ */
3712
+ estimateSendOnchainFee(
3713
+ address: string,
3714
+ amountSats: /*u64*/ bigint
3715
+ ): /*throws*/ /*u64*/ bigint;
3698
3716
  /**
3699
3717
  * Get the wallet's BIP32 fingerprint
3700
3718
  */
@@ -4548,11 +4566,15 @@ export class Wallet extends UniffiAbstractObject implements WalletInterface {
4548
4566
  *
4549
4567
  * # Arguments
4550
4568
  *
4551
- * * `amount_sats` - Amount to offboard in sats
4569
+ * * `address` - Destination address for the offboard
4570
+ * * `vtxo_ids` - VTXOs to offboard
4552
4571
  *
4553
4572
  * Returns the estimated fee in sats
4554
4573
  */
4555
- estimateOffboardFee(amountSats: /*u64*/ bigint): /*u64*/ bigint /*throws*/ {
4574
+ estimateOffboardFee(
4575
+ address: string,
4576
+ vtxoIds: Array<string>
4577
+ ): /*u64*/ bigint /*throws*/ {
4556
4578
  return FfiConverterUInt64.lift(
4557
4579
  uniffiCaller.rustCallWithError(
4558
4580
  /*liftError:*/ FfiConverterTypeBarkError.lift.bind(
@@ -4561,7 +4583,8 @@ export class Wallet extends UniffiAbstractObject implements WalletInterface {
4561
4583
  /*caller:*/ (callStatus) => {
4562
4584
  return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_offboard_fee(
4563
4585
  uniffiTypeWalletObjectFactory.clonePointer(this),
4564
- FfiConverterUInt64.lower(amountSats),
4586
+ FfiConverterString.lower(address),
4587
+ FfiConverterArrayString.lower(vtxoIds),
4565
4588
  callStatus
4566
4589
  );
4567
4590
  },
@@ -4597,6 +4620,38 @@ export class Wallet extends UniffiAbstractObject implements WalletInterface {
4597
4620
  );
4598
4621
  }
4599
4622
 
4623
+ /**
4624
+ * Estimate the fee for a send onchain operation
4625
+ *
4626
+ * # Arguments
4627
+ *
4628
+ * * `address` - Destination address
4629
+ * * `amount_sats` - Amount to send in sats
4630
+ *
4631
+ * Returns the estimated fee in sats
4632
+ */
4633
+ estimateSendOnchainFee(
4634
+ address: string,
4635
+ amountSats: /*u64*/ bigint
4636
+ ): /*u64*/ bigint /*throws*/ {
4637
+ return FfiConverterUInt64.lift(
4638
+ uniffiCaller.rustCallWithError(
4639
+ /*liftError:*/ FfiConverterTypeBarkError.lift.bind(
4640
+ FfiConverterTypeBarkError
4641
+ ),
4642
+ /*caller:*/ (callStatus) => {
4643
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_send_onchain_fee(
4644
+ uniffiTypeWalletObjectFactory.clonePointer(this),
4645
+ FfiConverterString.lower(address),
4646
+ FfiConverterUInt64.lower(amountSats),
4647
+ callStatus
4648
+ );
4649
+ },
4650
+ /*liftString:*/ FfiConverterString.lift
4651
+ )
4652
+ );
4653
+ }
4654
+
4600
4655
  /**
4601
4656
  * Get the wallet's BIP32 fingerprint
4602
4657
  */
@@ -6253,7 +6308,7 @@ function uniffiEnsureInitialized() {
6253
6308
  }
6254
6309
  if (
6255
6310
  nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee() !==
6256
- 40730
6311
+ 31248
6257
6312
  ) {
6258
6313
  throw new UniffiInternalError.ApiChecksumMismatch(
6259
6314
  "uniffi_bark_ffi_checksum_method_wallet_estimate_offboard_fee"
@@ -6267,6 +6322,14 @@ function uniffiEnsureInitialized() {
6267
6322
  "uniffi_bark_ffi_checksum_method_wallet_estimate_refresh_fee"
6268
6323
  );
6269
6324
  }
6325
+ if (
6326
+ nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee() !==
6327
+ 31326
6328
+ ) {
6329
+ throw new UniffiInternalError.ApiChecksumMismatch(
6330
+ "uniffi_bark_ffi_checksum_method_wallet_estimate_send_onchain_fee"
6331
+ );
6332
+ }
6270
6333
  if (
6271
6334
  nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_fingerprint() !==
6272
6335
  60041