@breeztech/breez-sdk-spark-react-native 0.8.2 → 0.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark-react-native",
3
- "version": "0.8.2",
3
+ "version": "0.9.1",
4
4
  "description": "React Native bindings for the Breez SDK - Nodeless (Spark Implementation)",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -197,7 +197,7 @@
197
197
  "version": "0.49.0"
198
198
  },
199
199
  "checksums": {
200
- "android": "21eda7d9ff9c87ee95966c1f49019511b908921a62ffd7bf9aa4b8dba13c93f5",
201
- "ios": "082484c7a57eb619abb795ee06912f76632e327c39fce41fb11b03ae37bbb742"
200
+ "android": "db63a1981bacf6ec143f5402ed2c8cae49a9ba70354eb8fc14419920809bbe45",
201
+ "ios": "8b93c7c568f5d2006f8a75082711440edfec999b46bf9bac6d6ed44e0038beae"
202
202
  }
203
203
  }
@@ -2063,6 +2063,19 @@ export type Config = {
2063
2063
  * More leaves allow payments to be made without needing a swap, reducing payment latency.
2064
2064
  */
2065
2065
  optimizationConfig: OptimizationConfig;
2066
+ /**
2067
+ * Configuration for automatic conversion of Bitcoin to stable tokens.
2068
+ *
2069
+ * When set, received sats will be automatically converted to the specified token
2070
+ * once the balance exceeds the threshold.
2071
+ */
2072
+ stableBalanceConfig: StableBalanceConfig | undefined;
2073
+ /**
2074
+ * Maximum number of concurrent transfer claims.
2075
+ *
2076
+ * Default is 4. Increase for server environments with high incoming payment volume.
2077
+ */
2078
+ maxConcurrentClaims: /*u32*/ number;
2066
2079
  };
2067
2080
 
2068
2081
  /**
@@ -2110,6 +2123,9 @@ const FfiConverterTypeConfig = (() => {
2110
2123
  realTimeSyncServerUrl: FfiConverterOptionalString.read(from),
2111
2124
  privateEnabledDefault: FfiConverterBool.read(from),
2112
2125
  optimizationConfig: FfiConverterTypeOptimizationConfig.read(from),
2126
+ stableBalanceConfig:
2127
+ FfiConverterOptionalTypeStableBalanceConfig.read(from),
2128
+ maxConcurrentClaims: FfiConverterUInt32.read(from),
2113
2129
  };
2114
2130
  }
2115
2131
  write(value: TypeName, into: RustBuffer): void {
@@ -2127,6 +2143,11 @@ const FfiConverterTypeConfig = (() => {
2127
2143
  FfiConverterOptionalString.write(value.realTimeSyncServerUrl, into);
2128
2144
  FfiConverterBool.write(value.privateEnabledDefault, into);
2129
2145
  FfiConverterTypeOptimizationConfig.write(value.optimizationConfig, into);
2146
+ FfiConverterOptionalTypeStableBalanceConfig.write(
2147
+ value.stableBalanceConfig,
2148
+ into
2149
+ );
2150
+ FfiConverterUInt32.write(value.maxConcurrentClaims, into);
2130
2151
  }
2131
2152
  allocationSize(value: TypeName): number {
2132
2153
  return (
@@ -2146,7 +2167,11 @@ const FfiConverterTypeConfig = (() => {
2146
2167
  FfiConverterBool.allocationSize(value.privateEnabledDefault) +
2147
2168
  FfiConverterTypeOptimizationConfig.allocationSize(
2148
2169
  value.optimizationConfig
2149
- )
2170
+ ) +
2171
+ FfiConverterOptionalTypeStableBalanceConfig.allocationSize(
2172
+ value.stableBalanceConfig
2173
+ ) +
2174
+ FfiConverterUInt32.allocationSize(value.maxConcurrentClaims)
2150
2175
  );
2151
2176
  }
2152
2177
  }
@@ -6814,11 +6839,15 @@ export type OptimizationConfig = {
6814
6839
  */
6815
6840
  autoEnabled: boolean;
6816
6841
  /**
6817
- * The desired multiplicity for the leaf set. Acceptable values are 0-5.
6842
+ * The desired multiplicity for the leaf set.
6818
6843
  *
6819
6844
  * Setting this to 0 will optimize for maximizing unilateral exit.
6820
6845
  * Higher values will optimize for minimizing transfer swaps, with higher values
6821
- * being more aggressive.
6846
+ * being more aggressive and allowing better TPS rates.
6847
+ *
6848
+ * For end-user wallets, values of 1-5 are recommended. Values above 5 are
6849
+ * intended for high-throughput server environments and are not recommended
6850
+ * for end-user wallets due to significantly higher unilateral exit costs.
6822
6851
  *
6823
6852
  * Default value is 1.
6824
6853
  */
@@ -9595,6 +9624,109 @@ const FfiConverterTypeSparkStatus = (() => {
9595
9624
  return new FFIConverter();
9596
9625
  })();
9597
9626
 
9627
+ /**
9628
+ * Configuration for automatic conversion of Bitcoin to stable tokens.
9629
+ *
9630
+ * When configured, the SDK automatically monitors the Bitcoin balance after each
9631
+ * wallet sync. When the balance exceeds the configured threshold plus the reserved
9632
+ * amount, the SDK automatically converts the excess balance (above the reserve)
9633
+ * to the specified stable token.
9634
+ *
9635
+ * When the balance is held in a stable token, Bitcoin payments can still be sent.
9636
+ * The SDK automatically detects when there's not enough Bitcoin balance to cover a
9637
+ * payment and auto-populates the token-to-Bitcoin conversion options to facilitate
9638
+ * the payment.
9639
+ */
9640
+ export type StableBalanceConfig = {
9641
+ /**
9642
+ * The token identifier to convert Bitcoin to (required).
9643
+ */
9644
+ tokenIdentifier: string;
9645
+ /**
9646
+ * The minimum sats balance that triggers auto-conversion.
9647
+ *
9648
+ * If not provided, uses the minimum from conversion limits.
9649
+ * If provided but less than the conversion limit minimum, the limit minimum is used.
9650
+ */
9651
+ thresholdSats: /*u64*/ bigint | undefined;
9652
+ /**
9653
+ * Maximum slippage in basis points (1/100 of a percent).
9654
+ *
9655
+ * Defaults to 50 bps (0.5%) if not set.
9656
+ */
9657
+ maxSlippageBps: /*u32*/ number | undefined;
9658
+ /**
9659
+ * Amount of sats to keep as Bitcoin and not convert to stable tokens.
9660
+ *
9661
+ * This reserve ensures you can send Bitcoin payments without hitting
9662
+ * the minimum conversion limit. Defaults to the conversion minimum if not set.
9663
+ */
9664
+ reservedSats: /*u64*/ bigint | undefined;
9665
+ };
9666
+
9667
+ /**
9668
+ * Generated factory for {@link StableBalanceConfig} record objects.
9669
+ */
9670
+ export const StableBalanceConfig = (() => {
9671
+ const defaults = () => ({
9672
+ thresholdSats: undefined,
9673
+ maxSlippageBps: undefined,
9674
+ reservedSats: undefined,
9675
+ });
9676
+ const create = (() => {
9677
+ return uniffiCreateRecord<StableBalanceConfig, ReturnType<typeof defaults>>(
9678
+ defaults
9679
+ );
9680
+ })();
9681
+ return Object.freeze({
9682
+ /**
9683
+ * Create a frozen instance of {@link StableBalanceConfig}, with defaults specified
9684
+ * in Rust, in the {@link breez_sdk_spark} crate.
9685
+ */
9686
+ create,
9687
+
9688
+ /**
9689
+ * Create a frozen instance of {@link StableBalanceConfig}, with defaults specified
9690
+ * in Rust, in the {@link breez_sdk_spark} crate.
9691
+ */
9692
+ new: create,
9693
+
9694
+ /**
9695
+ * Defaults specified in the {@link breez_sdk_spark} crate.
9696
+ */
9697
+ defaults: () => Object.freeze(defaults()) as Partial<StableBalanceConfig>,
9698
+ });
9699
+ })();
9700
+
9701
+ const FfiConverterTypeStableBalanceConfig = (() => {
9702
+ type TypeName = StableBalanceConfig;
9703
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
9704
+ read(from: RustBuffer): TypeName {
9705
+ return {
9706
+ tokenIdentifier: FfiConverterString.read(from),
9707
+ thresholdSats: FfiConverterOptionalUInt64.read(from),
9708
+ maxSlippageBps: FfiConverterOptionalUInt32.read(from),
9709
+ reservedSats: FfiConverterOptionalUInt64.read(from),
9710
+ };
9711
+ }
9712
+ write(value: TypeName, into: RustBuffer): void {
9713
+ FfiConverterString.write(value.tokenIdentifier, into);
9714
+ FfiConverterOptionalUInt64.write(value.thresholdSats, into);
9715
+ FfiConverterOptionalUInt32.write(value.maxSlippageBps, into);
9716
+ FfiConverterOptionalUInt64.write(value.reservedSats, into);
9717
+ }
9718
+ allocationSize(value: TypeName): number {
9719
+ return (
9720
+ FfiConverterString.allocationSize(value.tokenIdentifier) +
9721
+ FfiConverterOptionalUInt64.allocationSize(value.thresholdSats) +
9722
+ FfiConverterOptionalUInt32.allocationSize(value.maxSlippageBps) +
9723
+ FfiConverterOptionalUInt64.allocationSize(value.reservedSats)
9724
+ );
9725
+ }
9726
+ }
9727
+ return new FFIConverter();
9728
+ })();
9729
+
9598
9730
  /**
9599
9731
  * Settings for the symbol representation of a currency
9600
9732
  */
@@ -11195,6 +11327,7 @@ const FfiConverterTypeChainServiceError = (() => {
11195
11327
  export enum ConversionPurpose_Tags {
11196
11328
  OngoingPayment = 'OngoingPayment',
11197
11329
  SelfTransfer = 'SelfTransfer',
11330
+ AutoConversion = 'AutoConversion',
11198
11331
  }
11199
11332
  /**
11200
11333
  * The purpose of the conversion, which is used to provide context for the conversion
@@ -11269,6 +11402,36 @@ export const ConversionPurpose = (() => {
11269
11402
  }
11270
11403
  }
11271
11404
 
11405
+ type AutoConversion__interface = {
11406
+ tag: ConversionPurpose_Tags.AutoConversion;
11407
+ };
11408
+
11409
+ /**
11410
+ * Conversion triggered automatically
11411
+ */
11412
+ class AutoConversion_
11413
+ extends UniffiEnum
11414
+ implements AutoConversion__interface
11415
+ {
11416
+ /**
11417
+ * @private
11418
+ * This field is private and should not be used, use `tag` instead.
11419
+ */
11420
+ readonly [uniffiTypeNameSymbol] = 'ConversionPurpose';
11421
+ readonly tag = ConversionPurpose_Tags.AutoConversion;
11422
+ constructor() {
11423
+ super('ConversionPurpose', 'AutoConversion');
11424
+ }
11425
+
11426
+ static new(): AutoConversion_ {
11427
+ return new AutoConversion_();
11428
+ }
11429
+
11430
+ static instanceOf(obj: any): obj is AutoConversion_ {
11431
+ return obj.tag === ConversionPurpose_Tags.AutoConversion;
11432
+ }
11433
+ }
11434
+
11272
11435
  function instanceOf(obj: any): obj is ConversionPurpose {
11273
11436
  return obj[uniffiTypeNameSymbol] === 'ConversionPurpose';
11274
11437
  }
@@ -11277,6 +11440,7 @@ export const ConversionPurpose = (() => {
11277
11440
  instanceOf,
11278
11441
  OngoingPayment: OngoingPayment_,
11279
11442
  SelfTransfer: SelfTransfer_,
11443
+ AutoConversion: AutoConversion_,
11280
11444
  });
11281
11445
  })();
11282
11446
 
@@ -11302,6 +11466,8 @@ const FfiConverterTypeConversionPurpose = (() => {
11302
11466
  });
11303
11467
  case 2:
11304
11468
  return new ConversionPurpose.SelfTransfer();
11469
+ case 3:
11470
+ return new ConversionPurpose.AutoConversion();
11305
11471
  default:
11306
11472
  throw new UniffiInternalError.UnexpectedEnumCase();
11307
11473
  }
@@ -11318,6 +11484,10 @@ const FfiConverterTypeConversionPurpose = (() => {
11318
11484
  ordinalConverter.write(2, into);
11319
11485
  return;
11320
11486
  }
11487
+ case ConversionPurpose_Tags.AutoConversion: {
11488
+ ordinalConverter.write(3, into);
11489
+ return;
11490
+ }
11321
11491
  default:
11322
11492
  // Throwing from here means that ConversionPurpose_Tags hasn't matched an ordinal.
11323
11493
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -11334,6 +11504,9 @@ const FfiConverterTypeConversionPurpose = (() => {
11334
11504
  case ConversionPurpose_Tags.SelfTransfer: {
11335
11505
  return ordinalConverter.allocationSize(2);
11336
11506
  }
11507
+ case ConversionPurpose_Tags.AutoConversion: {
11508
+ return ordinalConverter.allocationSize(3);
11509
+ }
11337
11510
  default:
11338
11511
  throw new UniffiInternalError.UnexpectedEnumCase();
11339
11512
  }
@@ -13826,10 +13999,9 @@ export const PaymentDetails = (() => {
13826
13999
  tag: PaymentDetails_Tags.Lightning;
13827
14000
  inner: Readonly<{
13828
14001
  description: string | undefined;
13829
- preimage: string | undefined;
13830
14002
  invoice: string;
13831
- paymentHash: string;
13832
14003
  destinationPubkey: string;
14004
+ htlcDetails: SparkHtlcDetails;
13833
14005
  lnurlPayInfo: LnurlPayInfo | undefined;
13834
14006
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
13835
14007
  lnurlReceiveMetadata: LnurlReceiveMetadata | undefined;
@@ -13845,10 +14017,9 @@ export const PaymentDetails = (() => {
13845
14017
  readonly tag = PaymentDetails_Tags.Lightning;
13846
14018
  readonly inner: Readonly<{
13847
14019
  description: string | undefined;
13848
- preimage: string | undefined;
13849
14020
  invoice: string;
13850
- paymentHash: string;
13851
14021
  destinationPubkey: string;
14022
+ htlcDetails: SparkHtlcDetails;
13852
14023
  lnurlPayInfo: LnurlPayInfo | undefined;
13853
14024
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
13854
14025
  lnurlReceiveMetadata: LnurlReceiveMetadata | undefined;
@@ -13857,20 +14028,17 @@ export const PaymentDetails = (() => {
13857
14028
  /**
13858
14029
  * Represents the invoice description
13859
14030
  */ description: string | undefined;
13860
- /**
13861
- * The preimage of the paid invoice (proof of payment).
13862
- */ preimage: string | undefined;
13863
14031
  /**
13864
14032
  * Represents the Bolt11/Bolt12 invoice associated with a payment
13865
14033
  * In the case of a Send payment, this is the invoice paid by the user
13866
14034
  * In the case of a Receive payment, this is the invoice paid to the user
13867
14035
  */ invoice: string;
13868
- /**
13869
- * The payment hash of the invoice
13870
- */ paymentHash: string;
13871
14036
  /**
13872
14037
  * The invoice destination/payee pubkey
13873
14038
  */ destinationPubkey: string;
14039
+ /**
14040
+ * The HTLC transfer details
14041
+ */ htlcDetails: SparkHtlcDetails;
13874
14042
  /**
13875
14043
  * Lnurl payment information if this was an lnurl payment.
13876
14044
  */ lnurlPayInfo: LnurlPayInfo | undefined;
@@ -13889,20 +14057,17 @@ export const PaymentDetails = (() => {
13889
14057
  /**
13890
14058
  * Represents the invoice description
13891
14059
  */ description: string | undefined;
13892
- /**
13893
- * The preimage of the paid invoice (proof of payment).
13894
- */ preimage: string | undefined;
13895
14060
  /**
13896
14061
  * Represents the Bolt11/Bolt12 invoice associated with a payment
13897
14062
  * In the case of a Send payment, this is the invoice paid by the user
13898
14063
  * In the case of a Receive payment, this is the invoice paid to the user
13899
14064
  */ invoice: string;
13900
- /**
13901
- * The payment hash of the invoice
13902
- */ paymentHash: string;
13903
14065
  /**
13904
14066
  * The invoice destination/payee pubkey
13905
14067
  */ destinationPubkey: string;
14068
+ /**
14069
+ * The HTLC transfer details
14070
+ */ htlcDetails: SparkHtlcDetails;
13906
14071
  /**
13907
14072
  * Lnurl payment information if this was an lnurl payment.
13908
14073
  */ lnurlPayInfo: LnurlPayInfo | undefined;
@@ -14019,10 +14184,9 @@ const FfiConverterTypePaymentDetails = (() => {
14019
14184
  case 3:
14020
14185
  return new PaymentDetails.Lightning({
14021
14186
  description: FfiConverterOptionalString.read(from),
14022
- preimage: FfiConverterOptionalString.read(from),
14023
14187
  invoice: FfiConverterString.read(from),
14024
- paymentHash: FfiConverterString.read(from),
14025
14188
  destinationPubkey: FfiConverterString.read(from),
14189
+ htlcDetails: FfiConverterTypeSparkHtlcDetails.read(from),
14026
14190
  lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
14027
14191
  lnurlWithdrawInfo:
14028
14192
  FfiConverterOptionalTypeLnurlWithdrawInfo.read(from),
@@ -14080,10 +14244,9 @@ const FfiConverterTypePaymentDetails = (() => {
14080
14244
  ordinalConverter.write(3, into);
14081
14245
  const inner = value.inner;
14082
14246
  FfiConverterOptionalString.write(inner.description, into);
14083
- FfiConverterOptionalString.write(inner.preimage, into);
14084
14247
  FfiConverterString.write(inner.invoice, into);
14085
- FfiConverterString.write(inner.paymentHash, into);
14086
14248
  FfiConverterString.write(inner.destinationPubkey, into);
14249
+ FfiConverterTypeSparkHtlcDetails.write(inner.htlcDetails, into);
14087
14250
  FfiConverterOptionalTypeLnurlPayInfo.write(inner.lnurlPayInfo, into);
14088
14251
  FfiConverterOptionalTypeLnurlWithdrawInfo.write(
14089
14252
  inner.lnurlWithdrawInfo,
@@ -14150,10 +14313,11 @@ const FfiConverterTypePaymentDetails = (() => {
14150
14313
  const inner = value.inner;
14151
14314
  let size = ordinalConverter.allocationSize(3);
14152
14315
  size += FfiConverterOptionalString.allocationSize(inner.description);
14153
- size += FfiConverterOptionalString.allocationSize(inner.preimage);
14154
14316
  size += FfiConverterString.allocationSize(inner.invoice);
14155
- size += FfiConverterString.allocationSize(inner.paymentHash);
14156
14317
  size += FfiConverterString.allocationSize(inner.destinationPubkey);
14318
+ size += FfiConverterTypeSparkHtlcDetails.allocationSize(
14319
+ inner.htlcDetails
14320
+ );
14157
14321
  size += FfiConverterOptionalTypeLnurlPayInfo.allocationSize(
14158
14322
  inner.lnurlPayInfo
14159
14323
  );
@@ -14189,6 +14353,7 @@ const FfiConverterTypePaymentDetails = (() => {
14189
14353
  export enum PaymentDetailsFilter_Tags {
14190
14354
  Spark = 'Spark',
14191
14355
  Token = 'Token',
14356
+ Lightning = 'Lightning',
14192
14357
  }
14193
14358
  export const PaymentDetailsFilter = (() => {
14194
14359
  type Spark__interface = {
@@ -14293,6 +14458,43 @@ export const PaymentDetailsFilter = (() => {
14293
14458
  }
14294
14459
  }
14295
14460
 
14461
+ type Lightning__interface = {
14462
+ tag: PaymentDetailsFilter_Tags.Lightning;
14463
+ inner: Readonly<{ htlcStatus: Array<SparkHtlcStatus> | undefined }>;
14464
+ };
14465
+
14466
+ class Lightning_ extends UniffiEnum implements Lightning__interface {
14467
+ /**
14468
+ * @private
14469
+ * This field is private and should not be used, use `tag` instead.
14470
+ */
14471
+ readonly [uniffiTypeNameSymbol] = 'PaymentDetailsFilter';
14472
+ readonly tag = PaymentDetailsFilter_Tags.Lightning;
14473
+ readonly inner: Readonly<{
14474
+ htlcStatus: Array<SparkHtlcStatus> | undefined;
14475
+ }>;
14476
+ constructor(inner: {
14477
+ /**
14478
+ * Filter specific Spark HTLC statuses
14479
+ */ htlcStatus: Array<SparkHtlcStatus> | undefined;
14480
+ }) {
14481
+ super('PaymentDetailsFilter', 'Lightning');
14482
+ this.inner = Object.freeze(inner);
14483
+ }
14484
+
14485
+ static new(inner: {
14486
+ /**
14487
+ * Filter specific Spark HTLC statuses
14488
+ */ htlcStatus: Array<SparkHtlcStatus> | undefined;
14489
+ }): Lightning_ {
14490
+ return new Lightning_(inner);
14491
+ }
14492
+
14493
+ static instanceOf(obj: any): obj is Lightning_ {
14494
+ return obj.tag === PaymentDetailsFilter_Tags.Lightning;
14495
+ }
14496
+ }
14497
+
14296
14498
  function instanceOf(obj: any): obj is PaymentDetailsFilter {
14297
14499
  return obj[uniffiTypeNameSymbol] === 'PaymentDetailsFilter';
14298
14500
  }
@@ -14301,6 +14503,7 @@ export const PaymentDetailsFilter = (() => {
14301
14503
  instanceOf,
14302
14504
  Spark: Spark_,
14303
14505
  Token: Token_,
14506
+ Lightning: Lightning_,
14304
14507
  });
14305
14508
  })();
14306
14509
 
@@ -14329,6 +14532,10 @@ const FfiConverterTypePaymentDetailsFilter = (() => {
14329
14532
  txHash: FfiConverterOptionalString.read(from),
14330
14533
  txType: FfiConverterOptionalTypeTokenTransactionType.read(from),
14331
14534
  });
14535
+ case 3:
14536
+ return new PaymentDetailsFilter.Lightning({
14537
+ htlcStatus: FfiConverterOptionalArrayTypeSparkHtlcStatus.read(from),
14538
+ });
14332
14539
  default:
14333
14540
  throw new UniffiInternalError.UnexpectedEnumCase();
14334
14541
  }
@@ -14356,6 +14563,15 @@ const FfiConverterTypePaymentDetailsFilter = (() => {
14356
14563
  );
14357
14564
  return;
14358
14565
  }
14566
+ case PaymentDetailsFilter_Tags.Lightning: {
14567
+ ordinalConverter.write(3, into);
14568
+ const inner = value.inner;
14569
+ FfiConverterOptionalArrayTypeSparkHtlcStatus.write(
14570
+ inner.htlcStatus,
14571
+ into
14572
+ );
14573
+ return;
14574
+ }
14359
14575
  default:
14360
14576
  // Throwing from here means that PaymentDetailsFilter_Tags hasn't matched an ordinal.
14361
14577
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -14386,6 +14602,14 @@ const FfiConverterTypePaymentDetailsFilter = (() => {
14386
14602
  );
14387
14603
  return size;
14388
14604
  }
14605
+ case PaymentDetailsFilter_Tags.Lightning: {
14606
+ const inner = value.inner;
14607
+ let size = ordinalConverter.allocationSize(3);
14608
+ size += FfiConverterOptionalArrayTypeSparkHtlcStatus.allocationSize(
14609
+ inner.htlcStatus
14610
+ );
14611
+ return size;
14612
+ }
14389
14613
  default:
14390
14614
  throw new UniffiInternalError.UnexpectedEnumCase();
14391
14615
  }
@@ -15108,6 +15332,7 @@ export const ReceivePaymentMethod = (() => {
15108
15332
  description: string;
15109
15333
  amountSats: /*u64*/ bigint | undefined;
15110
15334
  expirySecs: /*u32*/ number | undefined;
15335
+ paymentHash: string | undefined;
15111
15336
  }>;
15112
15337
  };
15113
15338
 
@@ -15122,6 +15347,7 @@ export const ReceivePaymentMethod = (() => {
15122
15347
  description: string;
15123
15348
  amountSats: /*u64*/ bigint | undefined;
15124
15349
  expirySecs: /*u32*/ number | undefined;
15350
+ paymentHash: string | undefined;
15125
15351
  }>;
15126
15352
  constructor(inner: {
15127
15353
  description: string;
@@ -15129,6 +15355,11 @@ export const ReceivePaymentMethod = (() => {
15129
15355
  /**
15130
15356
  * The expiry of the invoice as a duration in seconds
15131
15357
  */ expirySecs: /*u32*/ number | undefined;
15358
+ /**
15359
+ * If set, creates a HODL invoice with this payment hash (hex-encoded).
15360
+ * The payer's HTLC will be held until the preimage is provided via
15361
+ * `claim_htlc_payment` or the HTLC expires.
15362
+ */ paymentHash: string | undefined;
15132
15363
  }) {
15133
15364
  super('ReceivePaymentMethod', 'Bolt11Invoice');
15134
15365
  this.inner = Object.freeze(inner);
@@ -15140,6 +15371,11 @@ export const ReceivePaymentMethod = (() => {
15140
15371
  /**
15141
15372
  * The expiry of the invoice as a duration in seconds
15142
15373
  */ expirySecs: /*u32*/ number | undefined;
15374
+ /**
15375
+ * If set, creates a HODL invoice with this payment hash (hex-encoded).
15376
+ * The payer's HTLC will be held until the preimage is provided via
15377
+ * `claim_htlc_payment` or the HTLC expires.
15378
+ */ paymentHash: string | undefined;
15143
15379
  }): Bolt11Invoice_ {
15144
15380
  return new Bolt11Invoice_(inner);
15145
15381
  }
@@ -15193,6 +15429,7 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
15193
15429
  description: FfiConverterString.read(from),
15194
15430
  amountSats: FfiConverterOptionalUInt64.read(from),
15195
15431
  expirySecs: FfiConverterOptionalUInt32.read(from),
15432
+ paymentHash: FfiConverterOptionalString.read(from),
15196
15433
  });
15197
15434
  default:
15198
15435
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -15224,6 +15461,7 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
15224
15461
  FfiConverterString.write(inner.description, into);
15225
15462
  FfiConverterOptionalUInt64.write(inner.amountSats, into);
15226
15463
  FfiConverterOptionalUInt32.write(inner.expirySecs, into);
15464
+ FfiConverterOptionalString.write(inner.paymentHash, into);
15227
15465
  return;
15228
15466
  }
15229
15467
  default:
@@ -15259,6 +15497,7 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
15259
15497
  size += FfiConverterString.allocationSize(inner.description);
15260
15498
  size += FfiConverterOptionalUInt64.allocationSize(inner.amountSats);
15261
15499
  size += FfiConverterOptionalUInt32.allocationSize(inner.expirySecs);
15500
+ size += FfiConverterOptionalString.allocationSize(inner.paymentHash);
15262
15501
  return size;
15263
15502
  }
15264
15503
  default:
@@ -24506,6 +24745,13 @@ const uniffiCallbackInterfacePaymentObserver: {
24506
24745
  },
24507
24746
  };
24508
24747
 
24748
+ /**
24749
+ * REST client trait for making HTTP requests.
24750
+ *
24751
+ * This trait provides a way for users to supply their own HTTP client implementation
24752
+ * for use with the SDK. The SDK will use this client for all HTTP operations including
24753
+ * LNURL flows and chain service requests.
24754
+ */
24509
24755
  export interface RestClient {
24510
24756
  /**
24511
24757
  * Makes a GET request and logs on DEBUG.
@@ -24546,6 +24792,13 @@ export interface RestClient {
24546
24792
  ): /*throws*/ Promise<RestResponse>;
24547
24793
  }
24548
24794
 
24795
+ /**
24796
+ * REST client trait for making HTTP requests.
24797
+ *
24798
+ * This trait provides a way for users to supply their own HTTP client implementation
24799
+ * for use with the SDK. The SDK will use this client for all HTTP operations including
24800
+ * LNURL flows and chain service requests.
24801
+ */
24549
24802
  export class RestClientImpl extends UniffiAbstractObject implements RestClient {
24550
24803
  readonly [uniffiTypeNameSymbol] = 'RestClientImpl';
24551
24804
  readonly [destructorGuardSymbol]: UniffiRustArcPtr;
@@ -28545,6 +28798,11 @@ const FfiConverterOptionalTypeSparkHtlcOptions = new FfiConverterOptional(
28545
28798
  const FfiConverterOptionalTypeSparkInvoicePaymentDetails =
28546
28799
  new FfiConverterOptional(FfiConverterTypeSparkInvoicePaymentDetails);
28547
28800
 
28801
+ // FfiConverter for StableBalanceConfig | undefined
28802
+ const FfiConverterOptionalTypeStableBalanceConfig = new FfiConverterOptional(
28803
+ FfiConverterTypeStableBalanceConfig
28804
+ );
28805
+
28548
28806
  // FfiConverter for Symbol | undefined
28549
28807
  const FfiConverterOptionalTypeSymbol = new FfiConverterOptional(
28550
28808
  FfiConverterTypeSymbol
@@ -29938,6 +30196,7 @@ export default Object.freeze({
29938
30196
  FfiConverterTypeSparkInvoiceDetails,
29939
30197
  FfiConverterTypeSparkInvoicePaymentDetails,
29940
30198
  FfiConverterTypeSparkStatus,
30199
+ FfiConverterTypeStableBalanceConfig,
29941
30200
  FfiConverterTypeStorage,
29942
30201
  FfiConverterTypeSuccessAction,
29943
30202
  FfiConverterTypeSuccessActionProcessed,