@breeztech/breez-sdk-spark-react-native 0.8.2 → 0.9.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.
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.0",
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": "5733f5e014bb2fa6f7604d62f42e263ba34d8cb8c6783303ccf82b7576ac3ba4",
201
+ "ios": "fc28008cb7995c273ffaebbbde96a7a120b6e54e223ea635c24d10fac445c233"
202
202
  }
203
203
  }
@@ -2063,6 +2063,13 @@ 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;
2066
2073
  };
2067
2074
 
2068
2075
  /**
@@ -2110,6 +2117,8 @@ const FfiConverterTypeConfig = (() => {
2110
2117
  realTimeSyncServerUrl: FfiConverterOptionalString.read(from),
2111
2118
  privateEnabledDefault: FfiConverterBool.read(from),
2112
2119
  optimizationConfig: FfiConverterTypeOptimizationConfig.read(from),
2120
+ stableBalanceConfig:
2121
+ FfiConverterOptionalTypeStableBalanceConfig.read(from),
2113
2122
  };
2114
2123
  }
2115
2124
  write(value: TypeName, into: RustBuffer): void {
@@ -2127,6 +2136,10 @@ const FfiConverterTypeConfig = (() => {
2127
2136
  FfiConverterOptionalString.write(value.realTimeSyncServerUrl, into);
2128
2137
  FfiConverterBool.write(value.privateEnabledDefault, into);
2129
2138
  FfiConverterTypeOptimizationConfig.write(value.optimizationConfig, into);
2139
+ FfiConverterOptionalTypeStableBalanceConfig.write(
2140
+ value.stableBalanceConfig,
2141
+ into
2142
+ );
2130
2143
  }
2131
2144
  allocationSize(value: TypeName): number {
2132
2145
  return (
@@ -2146,6 +2159,9 @@ const FfiConverterTypeConfig = (() => {
2146
2159
  FfiConverterBool.allocationSize(value.privateEnabledDefault) +
2147
2160
  FfiConverterTypeOptimizationConfig.allocationSize(
2148
2161
  value.optimizationConfig
2162
+ ) +
2163
+ FfiConverterOptionalTypeStableBalanceConfig.allocationSize(
2164
+ value.stableBalanceConfig
2149
2165
  )
2150
2166
  );
2151
2167
  }
@@ -9595,6 +9611,109 @@ const FfiConverterTypeSparkStatus = (() => {
9595
9611
  return new FFIConverter();
9596
9612
  })();
9597
9613
 
9614
+ /**
9615
+ * Configuration for automatic conversion of Bitcoin to stable tokens.
9616
+ *
9617
+ * When configured, the SDK automatically monitors the Bitcoin balance after each
9618
+ * wallet sync. When the balance exceeds the configured threshold plus the reserved
9619
+ * amount, the SDK automatically converts the excess balance (above the reserve)
9620
+ * to the specified stable token.
9621
+ *
9622
+ * When the balance is held in a stable token, Bitcoin payments can still be sent.
9623
+ * The SDK automatically detects when there's not enough Bitcoin balance to cover a
9624
+ * payment and auto-populates the token-to-Bitcoin conversion options to facilitate
9625
+ * the payment.
9626
+ */
9627
+ export type StableBalanceConfig = {
9628
+ /**
9629
+ * The token identifier to convert Bitcoin to (required).
9630
+ */
9631
+ tokenIdentifier: string;
9632
+ /**
9633
+ * The minimum sats balance that triggers auto-conversion.
9634
+ *
9635
+ * If not provided, uses the minimum from conversion limits.
9636
+ * If provided but less than the conversion limit minimum, the limit minimum is used.
9637
+ */
9638
+ thresholdSats: /*u64*/ bigint | undefined;
9639
+ /**
9640
+ * Maximum slippage in basis points (1/100 of a percent).
9641
+ *
9642
+ * Defaults to 50 bps (0.5%) if not set.
9643
+ */
9644
+ maxSlippageBps: /*u32*/ number | undefined;
9645
+ /**
9646
+ * Amount of sats to keep as Bitcoin and not convert to stable tokens.
9647
+ *
9648
+ * This reserve ensures you can send Bitcoin payments without hitting
9649
+ * the minimum conversion limit. Defaults to the conversion minimum if not set.
9650
+ */
9651
+ reservedSats: /*u64*/ bigint | undefined;
9652
+ };
9653
+
9654
+ /**
9655
+ * Generated factory for {@link StableBalanceConfig} record objects.
9656
+ */
9657
+ export const StableBalanceConfig = (() => {
9658
+ const defaults = () => ({
9659
+ thresholdSats: undefined,
9660
+ maxSlippageBps: undefined,
9661
+ reservedSats: undefined,
9662
+ });
9663
+ const create = (() => {
9664
+ return uniffiCreateRecord<StableBalanceConfig, ReturnType<typeof defaults>>(
9665
+ defaults
9666
+ );
9667
+ })();
9668
+ return Object.freeze({
9669
+ /**
9670
+ * Create a frozen instance of {@link StableBalanceConfig}, with defaults specified
9671
+ * in Rust, in the {@link breez_sdk_spark} crate.
9672
+ */
9673
+ create,
9674
+
9675
+ /**
9676
+ * Create a frozen instance of {@link StableBalanceConfig}, with defaults specified
9677
+ * in Rust, in the {@link breez_sdk_spark} crate.
9678
+ */
9679
+ new: create,
9680
+
9681
+ /**
9682
+ * Defaults specified in the {@link breez_sdk_spark} crate.
9683
+ */
9684
+ defaults: () => Object.freeze(defaults()) as Partial<StableBalanceConfig>,
9685
+ });
9686
+ })();
9687
+
9688
+ const FfiConverterTypeStableBalanceConfig = (() => {
9689
+ type TypeName = StableBalanceConfig;
9690
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
9691
+ read(from: RustBuffer): TypeName {
9692
+ return {
9693
+ tokenIdentifier: FfiConverterString.read(from),
9694
+ thresholdSats: FfiConverterOptionalUInt64.read(from),
9695
+ maxSlippageBps: FfiConverterOptionalUInt32.read(from),
9696
+ reservedSats: FfiConverterOptionalUInt64.read(from),
9697
+ };
9698
+ }
9699
+ write(value: TypeName, into: RustBuffer): void {
9700
+ FfiConverterString.write(value.tokenIdentifier, into);
9701
+ FfiConverterOptionalUInt64.write(value.thresholdSats, into);
9702
+ FfiConverterOptionalUInt32.write(value.maxSlippageBps, into);
9703
+ FfiConverterOptionalUInt64.write(value.reservedSats, into);
9704
+ }
9705
+ allocationSize(value: TypeName): number {
9706
+ return (
9707
+ FfiConverterString.allocationSize(value.tokenIdentifier) +
9708
+ FfiConverterOptionalUInt64.allocationSize(value.thresholdSats) +
9709
+ FfiConverterOptionalUInt32.allocationSize(value.maxSlippageBps) +
9710
+ FfiConverterOptionalUInt64.allocationSize(value.reservedSats)
9711
+ );
9712
+ }
9713
+ }
9714
+ return new FFIConverter();
9715
+ })();
9716
+
9598
9717
  /**
9599
9718
  * Settings for the symbol representation of a currency
9600
9719
  */
@@ -11195,6 +11314,7 @@ const FfiConverterTypeChainServiceError = (() => {
11195
11314
  export enum ConversionPurpose_Tags {
11196
11315
  OngoingPayment = 'OngoingPayment',
11197
11316
  SelfTransfer = 'SelfTransfer',
11317
+ AutoConversion = 'AutoConversion',
11198
11318
  }
11199
11319
  /**
11200
11320
  * The purpose of the conversion, which is used to provide context for the conversion
@@ -11269,6 +11389,36 @@ export const ConversionPurpose = (() => {
11269
11389
  }
11270
11390
  }
11271
11391
 
11392
+ type AutoConversion__interface = {
11393
+ tag: ConversionPurpose_Tags.AutoConversion;
11394
+ };
11395
+
11396
+ /**
11397
+ * Conversion triggered automatically
11398
+ */
11399
+ class AutoConversion_
11400
+ extends UniffiEnum
11401
+ implements AutoConversion__interface
11402
+ {
11403
+ /**
11404
+ * @private
11405
+ * This field is private and should not be used, use `tag` instead.
11406
+ */
11407
+ readonly [uniffiTypeNameSymbol] = 'ConversionPurpose';
11408
+ readonly tag = ConversionPurpose_Tags.AutoConversion;
11409
+ constructor() {
11410
+ super('ConversionPurpose', 'AutoConversion');
11411
+ }
11412
+
11413
+ static new(): AutoConversion_ {
11414
+ return new AutoConversion_();
11415
+ }
11416
+
11417
+ static instanceOf(obj: any): obj is AutoConversion_ {
11418
+ return obj.tag === ConversionPurpose_Tags.AutoConversion;
11419
+ }
11420
+ }
11421
+
11272
11422
  function instanceOf(obj: any): obj is ConversionPurpose {
11273
11423
  return obj[uniffiTypeNameSymbol] === 'ConversionPurpose';
11274
11424
  }
@@ -11277,6 +11427,7 @@ export const ConversionPurpose = (() => {
11277
11427
  instanceOf,
11278
11428
  OngoingPayment: OngoingPayment_,
11279
11429
  SelfTransfer: SelfTransfer_,
11430
+ AutoConversion: AutoConversion_,
11280
11431
  });
11281
11432
  })();
11282
11433
 
@@ -11302,6 +11453,8 @@ const FfiConverterTypeConversionPurpose = (() => {
11302
11453
  });
11303
11454
  case 2:
11304
11455
  return new ConversionPurpose.SelfTransfer();
11456
+ case 3:
11457
+ return new ConversionPurpose.AutoConversion();
11305
11458
  default:
11306
11459
  throw new UniffiInternalError.UnexpectedEnumCase();
11307
11460
  }
@@ -11318,6 +11471,10 @@ const FfiConverterTypeConversionPurpose = (() => {
11318
11471
  ordinalConverter.write(2, into);
11319
11472
  return;
11320
11473
  }
11474
+ case ConversionPurpose_Tags.AutoConversion: {
11475
+ ordinalConverter.write(3, into);
11476
+ return;
11477
+ }
11321
11478
  default:
11322
11479
  // Throwing from here means that ConversionPurpose_Tags hasn't matched an ordinal.
11323
11480
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -11334,6 +11491,9 @@ const FfiConverterTypeConversionPurpose = (() => {
11334
11491
  case ConversionPurpose_Tags.SelfTransfer: {
11335
11492
  return ordinalConverter.allocationSize(2);
11336
11493
  }
11494
+ case ConversionPurpose_Tags.AutoConversion: {
11495
+ return ordinalConverter.allocationSize(3);
11496
+ }
11337
11497
  default:
11338
11498
  throw new UniffiInternalError.UnexpectedEnumCase();
11339
11499
  }
@@ -13826,10 +13986,9 @@ export const PaymentDetails = (() => {
13826
13986
  tag: PaymentDetails_Tags.Lightning;
13827
13987
  inner: Readonly<{
13828
13988
  description: string | undefined;
13829
- preimage: string | undefined;
13830
13989
  invoice: string;
13831
- paymentHash: string;
13832
13990
  destinationPubkey: string;
13991
+ htlcDetails: SparkHtlcDetails;
13833
13992
  lnurlPayInfo: LnurlPayInfo | undefined;
13834
13993
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
13835
13994
  lnurlReceiveMetadata: LnurlReceiveMetadata | undefined;
@@ -13845,10 +14004,9 @@ export const PaymentDetails = (() => {
13845
14004
  readonly tag = PaymentDetails_Tags.Lightning;
13846
14005
  readonly inner: Readonly<{
13847
14006
  description: string | undefined;
13848
- preimage: string | undefined;
13849
14007
  invoice: string;
13850
- paymentHash: string;
13851
14008
  destinationPubkey: string;
14009
+ htlcDetails: SparkHtlcDetails;
13852
14010
  lnurlPayInfo: LnurlPayInfo | undefined;
13853
14011
  lnurlWithdrawInfo: LnurlWithdrawInfo | undefined;
13854
14012
  lnurlReceiveMetadata: LnurlReceiveMetadata | undefined;
@@ -13857,20 +14015,17 @@ export const PaymentDetails = (() => {
13857
14015
  /**
13858
14016
  * Represents the invoice description
13859
14017
  */ description: string | undefined;
13860
- /**
13861
- * The preimage of the paid invoice (proof of payment).
13862
- */ preimage: string | undefined;
13863
14018
  /**
13864
14019
  * Represents the Bolt11/Bolt12 invoice associated with a payment
13865
14020
  * In the case of a Send payment, this is the invoice paid by the user
13866
14021
  * In the case of a Receive payment, this is the invoice paid to the user
13867
14022
  */ invoice: string;
13868
- /**
13869
- * The payment hash of the invoice
13870
- */ paymentHash: string;
13871
14023
  /**
13872
14024
  * The invoice destination/payee pubkey
13873
14025
  */ destinationPubkey: string;
14026
+ /**
14027
+ * The HTLC transfer details
14028
+ */ htlcDetails: SparkHtlcDetails;
13874
14029
  /**
13875
14030
  * Lnurl payment information if this was an lnurl payment.
13876
14031
  */ lnurlPayInfo: LnurlPayInfo | undefined;
@@ -13889,20 +14044,17 @@ export const PaymentDetails = (() => {
13889
14044
  /**
13890
14045
  * Represents the invoice description
13891
14046
  */ description: string | undefined;
13892
- /**
13893
- * The preimage of the paid invoice (proof of payment).
13894
- */ preimage: string | undefined;
13895
14047
  /**
13896
14048
  * Represents the Bolt11/Bolt12 invoice associated with a payment
13897
14049
  * In the case of a Send payment, this is the invoice paid by the user
13898
14050
  * In the case of a Receive payment, this is the invoice paid to the user
13899
14051
  */ invoice: string;
13900
- /**
13901
- * The payment hash of the invoice
13902
- */ paymentHash: string;
13903
14052
  /**
13904
14053
  * The invoice destination/payee pubkey
13905
14054
  */ destinationPubkey: string;
14055
+ /**
14056
+ * The HTLC transfer details
14057
+ */ htlcDetails: SparkHtlcDetails;
13906
14058
  /**
13907
14059
  * Lnurl payment information if this was an lnurl payment.
13908
14060
  */ lnurlPayInfo: LnurlPayInfo | undefined;
@@ -14019,10 +14171,9 @@ const FfiConverterTypePaymentDetails = (() => {
14019
14171
  case 3:
14020
14172
  return new PaymentDetails.Lightning({
14021
14173
  description: FfiConverterOptionalString.read(from),
14022
- preimage: FfiConverterOptionalString.read(from),
14023
14174
  invoice: FfiConverterString.read(from),
14024
- paymentHash: FfiConverterString.read(from),
14025
14175
  destinationPubkey: FfiConverterString.read(from),
14176
+ htlcDetails: FfiConverterTypeSparkHtlcDetails.read(from),
14026
14177
  lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
14027
14178
  lnurlWithdrawInfo:
14028
14179
  FfiConverterOptionalTypeLnurlWithdrawInfo.read(from),
@@ -14080,10 +14231,9 @@ const FfiConverterTypePaymentDetails = (() => {
14080
14231
  ordinalConverter.write(3, into);
14081
14232
  const inner = value.inner;
14082
14233
  FfiConverterOptionalString.write(inner.description, into);
14083
- FfiConverterOptionalString.write(inner.preimage, into);
14084
14234
  FfiConverterString.write(inner.invoice, into);
14085
- FfiConverterString.write(inner.paymentHash, into);
14086
14235
  FfiConverterString.write(inner.destinationPubkey, into);
14236
+ FfiConverterTypeSparkHtlcDetails.write(inner.htlcDetails, into);
14087
14237
  FfiConverterOptionalTypeLnurlPayInfo.write(inner.lnurlPayInfo, into);
14088
14238
  FfiConverterOptionalTypeLnurlWithdrawInfo.write(
14089
14239
  inner.lnurlWithdrawInfo,
@@ -14150,10 +14300,11 @@ const FfiConverterTypePaymentDetails = (() => {
14150
14300
  const inner = value.inner;
14151
14301
  let size = ordinalConverter.allocationSize(3);
14152
14302
  size += FfiConverterOptionalString.allocationSize(inner.description);
14153
- size += FfiConverterOptionalString.allocationSize(inner.preimage);
14154
14303
  size += FfiConverterString.allocationSize(inner.invoice);
14155
- size += FfiConverterString.allocationSize(inner.paymentHash);
14156
14304
  size += FfiConverterString.allocationSize(inner.destinationPubkey);
14305
+ size += FfiConverterTypeSparkHtlcDetails.allocationSize(
14306
+ inner.htlcDetails
14307
+ );
14157
14308
  size += FfiConverterOptionalTypeLnurlPayInfo.allocationSize(
14158
14309
  inner.lnurlPayInfo
14159
14310
  );
@@ -14189,6 +14340,7 @@ const FfiConverterTypePaymentDetails = (() => {
14189
14340
  export enum PaymentDetailsFilter_Tags {
14190
14341
  Spark = 'Spark',
14191
14342
  Token = 'Token',
14343
+ Lightning = 'Lightning',
14192
14344
  }
14193
14345
  export const PaymentDetailsFilter = (() => {
14194
14346
  type Spark__interface = {
@@ -14293,6 +14445,43 @@ export const PaymentDetailsFilter = (() => {
14293
14445
  }
14294
14446
  }
14295
14447
 
14448
+ type Lightning__interface = {
14449
+ tag: PaymentDetailsFilter_Tags.Lightning;
14450
+ inner: Readonly<{ htlcStatus: Array<SparkHtlcStatus> | undefined }>;
14451
+ };
14452
+
14453
+ class Lightning_ extends UniffiEnum implements Lightning__interface {
14454
+ /**
14455
+ * @private
14456
+ * This field is private and should not be used, use `tag` instead.
14457
+ */
14458
+ readonly [uniffiTypeNameSymbol] = 'PaymentDetailsFilter';
14459
+ readonly tag = PaymentDetailsFilter_Tags.Lightning;
14460
+ readonly inner: Readonly<{
14461
+ htlcStatus: Array<SparkHtlcStatus> | undefined;
14462
+ }>;
14463
+ constructor(inner: {
14464
+ /**
14465
+ * Filter specific Spark HTLC statuses
14466
+ */ htlcStatus: Array<SparkHtlcStatus> | undefined;
14467
+ }) {
14468
+ super('PaymentDetailsFilter', 'Lightning');
14469
+ this.inner = Object.freeze(inner);
14470
+ }
14471
+
14472
+ static new(inner: {
14473
+ /**
14474
+ * Filter specific Spark HTLC statuses
14475
+ */ htlcStatus: Array<SparkHtlcStatus> | undefined;
14476
+ }): Lightning_ {
14477
+ return new Lightning_(inner);
14478
+ }
14479
+
14480
+ static instanceOf(obj: any): obj is Lightning_ {
14481
+ return obj.tag === PaymentDetailsFilter_Tags.Lightning;
14482
+ }
14483
+ }
14484
+
14296
14485
  function instanceOf(obj: any): obj is PaymentDetailsFilter {
14297
14486
  return obj[uniffiTypeNameSymbol] === 'PaymentDetailsFilter';
14298
14487
  }
@@ -14301,6 +14490,7 @@ export const PaymentDetailsFilter = (() => {
14301
14490
  instanceOf,
14302
14491
  Spark: Spark_,
14303
14492
  Token: Token_,
14493
+ Lightning: Lightning_,
14304
14494
  });
14305
14495
  })();
14306
14496
 
@@ -14329,6 +14519,10 @@ const FfiConverterTypePaymentDetailsFilter = (() => {
14329
14519
  txHash: FfiConverterOptionalString.read(from),
14330
14520
  txType: FfiConverterOptionalTypeTokenTransactionType.read(from),
14331
14521
  });
14522
+ case 3:
14523
+ return new PaymentDetailsFilter.Lightning({
14524
+ htlcStatus: FfiConverterOptionalArrayTypeSparkHtlcStatus.read(from),
14525
+ });
14332
14526
  default:
14333
14527
  throw new UniffiInternalError.UnexpectedEnumCase();
14334
14528
  }
@@ -14356,6 +14550,15 @@ const FfiConverterTypePaymentDetailsFilter = (() => {
14356
14550
  );
14357
14551
  return;
14358
14552
  }
14553
+ case PaymentDetailsFilter_Tags.Lightning: {
14554
+ ordinalConverter.write(3, into);
14555
+ const inner = value.inner;
14556
+ FfiConverterOptionalArrayTypeSparkHtlcStatus.write(
14557
+ inner.htlcStatus,
14558
+ into
14559
+ );
14560
+ return;
14561
+ }
14359
14562
  default:
14360
14563
  // Throwing from here means that PaymentDetailsFilter_Tags hasn't matched an ordinal.
14361
14564
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -14386,6 +14589,14 @@ const FfiConverterTypePaymentDetailsFilter = (() => {
14386
14589
  );
14387
14590
  return size;
14388
14591
  }
14592
+ case PaymentDetailsFilter_Tags.Lightning: {
14593
+ const inner = value.inner;
14594
+ let size = ordinalConverter.allocationSize(3);
14595
+ size += FfiConverterOptionalArrayTypeSparkHtlcStatus.allocationSize(
14596
+ inner.htlcStatus
14597
+ );
14598
+ return size;
14599
+ }
14389
14600
  default:
14390
14601
  throw new UniffiInternalError.UnexpectedEnumCase();
14391
14602
  }
@@ -15108,6 +15319,7 @@ export const ReceivePaymentMethod = (() => {
15108
15319
  description: string;
15109
15320
  amountSats: /*u64*/ bigint | undefined;
15110
15321
  expirySecs: /*u32*/ number | undefined;
15322
+ paymentHash: string | undefined;
15111
15323
  }>;
15112
15324
  };
15113
15325
 
@@ -15122,6 +15334,7 @@ export const ReceivePaymentMethod = (() => {
15122
15334
  description: string;
15123
15335
  amountSats: /*u64*/ bigint | undefined;
15124
15336
  expirySecs: /*u32*/ number | undefined;
15337
+ paymentHash: string | undefined;
15125
15338
  }>;
15126
15339
  constructor(inner: {
15127
15340
  description: string;
@@ -15129,6 +15342,11 @@ export const ReceivePaymentMethod = (() => {
15129
15342
  /**
15130
15343
  * The expiry of the invoice as a duration in seconds
15131
15344
  */ expirySecs: /*u32*/ number | undefined;
15345
+ /**
15346
+ * If set, creates a HODL invoice with this payment hash (hex-encoded).
15347
+ * The payer's HTLC will be held until the preimage is provided via
15348
+ * `claim_htlc_payment` or the HTLC expires.
15349
+ */ paymentHash: string | undefined;
15132
15350
  }) {
15133
15351
  super('ReceivePaymentMethod', 'Bolt11Invoice');
15134
15352
  this.inner = Object.freeze(inner);
@@ -15140,6 +15358,11 @@ export const ReceivePaymentMethod = (() => {
15140
15358
  /**
15141
15359
  * The expiry of the invoice as a duration in seconds
15142
15360
  */ expirySecs: /*u32*/ number | undefined;
15361
+ /**
15362
+ * If set, creates a HODL invoice with this payment hash (hex-encoded).
15363
+ * The payer's HTLC will be held until the preimage is provided via
15364
+ * `claim_htlc_payment` or the HTLC expires.
15365
+ */ paymentHash: string | undefined;
15143
15366
  }): Bolt11Invoice_ {
15144
15367
  return new Bolt11Invoice_(inner);
15145
15368
  }
@@ -15193,6 +15416,7 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
15193
15416
  description: FfiConverterString.read(from),
15194
15417
  amountSats: FfiConverterOptionalUInt64.read(from),
15195
15418
  expirySecs: FfiConverterOptionalUInt32.read(from),
15419
+ paymentHash: FfiConverterOptionalString.read(from),
15196
15420
  });
15197
15421
  default:
15198
15422
  throw new UniffiInternalError.UnexpectedEnumCase();
@@ -15224,6 +15448,7 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
15224
15448
  FfiConverterString.write(inner.description, into);
15225
15449
  FfiConverterOptionalUInt64.write(inner.amountSats, into);
15226
15450
  FfiConverterOptionalUInt32.write(inner.expirySecs, into);
15451
+ FfiConverterOptionalString.write(inner.paymentHash, into);
15227
15452
  return;
15228
15453
  }
15229
15454
  default:
@@ -15259,6 +15484,7 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
15259
15484
  size += FfiConverterString.allocationSize(inner.description);
15260
15485
  size += FfiConverterOptionalUInt64.allocationSize(inner.amountSats);
15261
15486
  size += FfiConverterOptionalUInt32.allocationSize(inner.expirySecs);
15487
+ size += FfiConverterOptionalString.allocationSize(inner.paymentHash);
15262
15488
  return size;
15263
15489
  }
15264
15490
  default:
@@ -24506,6 +24732,13 @@ const uniffiCallbackInterfacePaymentObserver: {
24506
24732
  },
24507
24733
  };
24508
24734
 
24735
+ /**
24736
+ * REST client trait for making HTTP requests.
24737
+ *
24738
+ * This trait provides a way for users to supply their own HTTP client implementation
24739
+ * for use with the SDK. The SDK will use this client for all HTTP operations including
24740
+ * LNURL flows and chain service requests.
24741
+ */
24509
24742
  export interface RestClient {
24510
24743
  /**
24511
24744
  * Makes a GET request and logs on DEBUG.
@@ -24546,6 +24779,13 @@ export interface RestClient {
24546
24779
  ): /*throws*/ Promise<RestResponse>;
24547
24780
  }
24548
24781
 
24782
+ /**
24783
+ * REST client trait for making HTTP requests.
24784
+ *
24785
+ * This trait provides a way for users to supply their own HTTP client implementation
24786
+ * for use with the SDK. The SDK will use this client for all HTTP operations including
24787
+ * LNURL flows and chain service requests.
24788
+ */
24549
24789
  export class RestClientImpl extends UniffiAbstractObject implements RestClient {
24550
24790
  readonly [uniffiTypeNameSymbol] = 'RestClientImpl';
24551
24791
  readonly [destructorGuardSymbol]: UniffiRustArcPtr;
@@ -28545,6 +28785,11 @@ const FfiConverterOptionalTypeSparkHtlcOptions = new FfiConverterOptional(
28545
28785
  const FfiConverterOptionalTypeSparkInvoicePaymentDetails =
28546
28786
  new FfiConverterOptional(FfiConverterTypeSparkInvoicePaymentDetails);
28547
28787
 
28788
+ // FfiConverter for StableBalanceConfig | undefined
28789
+ const FfiConverterOptionalTypeStableBalanceConfig = new FfiConverterOptional(
28790
+ FfiConverterTypeStableBalanceConfig
28791
+ );
28792
+
28548
28793
  // FfiConverter for Symbol | undefined
28549
28794
  const FfiConverterOptionalTypeSymbol = new FfiConverterOptional(
28550
28795
  FfiConverterTypeSymbol
@@ -29938,6 +30183,7 @@ export default Object.freeze({
29938
30183
  FfiConverterTypeSparkInvoiceDetails,
29939
30184
  FfiConverterTypeSparkInvoicePaymentDetails,
29940
30185
  FfiConverterTypeSparkStatus,
30186
+ FfiConverterTypeStableBalanceConfig,
29941
30187
  FfiConverterTypeStorage,
29942
30188
  FfiConverterTypeSuccessAction,
29943
30189
  FfiConverterTypeSuccessActionProcessed,