@breeztech/breez-sdk-spark-react-native 0.1.9-dev1 → 0.1.9-dev2

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.
@@ -240,7 +240,8 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits(
240
240
  uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay(void *ptr,
241
241
  RustBuffer request);
242
242
  void uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(
243
- void *ptr, RustBuffer payment_id, RustCallStatus *uniffi_out_err);
243
+ void *ptr, RustBuffer payment, RustBuffer ssp_id,
244
+ RustCallStatus *uniffi_out_err);
244
245
  /*handle*/ uint64_t
245
246
  uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(void *ptr,
246
247
  RustBuffer request);
@@ -281,6 +282,8 @@ uniffi_breez_sdk_spark_fn_method_sdkbuilder_build(void *ptr);
281
282
  /*handle*/ uint64_t
282
283
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service(
283
284
  void *ptr, void *chain_service);
285
+ /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
286
+ void *ptr, RustBuffer key_set_type, int8_t use_address_index);
284
287
  /*handle*/ uint64_t
285
288
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
286
289
  void *ptr, void *lnurl_client);
@@ -506,6 +509,7 @@ uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal();
506
509
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
507
510
  uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build();
508
511
  uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service();
512
+ uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set();
509
513
  uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client();
510
514
  uint16_t
511
515
  uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service();
@@ -5078,7 +5082,7 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
5078
5082
  rt,
5079
5083
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
5080
5084
  "breezsdk_poll_lightning_send_payment"),
5081
- 2,
5085
+ 3,
5082
5086
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
5083
5087
  const jsi::Value *args, size_t count) -> jsi::Value {
5084
5088
  return this
@@ -5265,6 +5269,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
5265
5269
  ->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service(
5266
5270
  rt, thisVal, args, count);
5267
5271
  });
5272
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set"] =
5273
+ jsi::Function::createFromHostFunction(
5274
+ rt,
5275
+ jsi::PropNameID::forAscii(
5276
+ rt,
5277
+ "ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set"),
5278
+ 3,
5279
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
5280
+ const jsi::Value *args, size_t count) -> jsi::Value {
5281
+ return this
5282
+ ->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
5283
+ rt, thisVal, args, count);
5284
+ });
5268
5285
  props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client"] =
5269
5286
  jsi::Function::createFromHostFunction(
5270
5287
  rt,
@@ -6469,6 +6486,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
6469
6486
  ->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service(
6470
6487
  rt, thisVal, args, count);
6471
6488
  });
6489
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set"] =
6490
+ jsi::Function::createFromHostFunction(
6491
+ rt,
6492
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
6493
+ "method_sdkbuilder_with_key_set"),
6494
+ 0,
6495
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
6496
+ const jsi::Value *args, size_t count) -> jsi::Value {
6497
+ return this
6498
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set(
6499
+ rt, thisVal, args, count);
6500
+ });
6472
6501
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_"
6473
6502
  "client"] = jsi::Function::createFromHostFunction(
6474
6503
  rt,
@@ -7180,6 +7209,8 @@ jsi::Value NativeBreezSdkSpark::
7180
7209
  uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
7181
7210
  uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
7182
7211
  args[1]),
7212
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
7213
+ args[2]),
7183
7214
  &status);
7184
7215
  uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
7185
7216
  rt, callInvoker, status, args[count - 1]);
@@ -7378,6 +7409,19 @@ jsi::Value NativeBreezSdkSpark::
7378
7409
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
7379
7410
  value);
7380
7411
  }
7412
+ jsi::Value NativeBreezSdkSpark::
7413
+ cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
7414
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
7415
+ size_t count) {
7416
+ auto value = uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
7417
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
7418
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
7419
+ args[1]),
7420
+ uniffi_jsi::Bridging<int8_t>::fromJs(rt, callInvoker, args[2]));
7421
+
7422
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
7423
+ value);
7424
+ }
7381
7425
  jsi::Value NativeBreezSdkSpark::
7382
7426
  cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
7383
7427
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -8527,6 +8571,14 @@ jsi::Value NativeBreezSdkSpark::
8527
8571
 
8528
8572
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
8529
8573
  }
8574
+ jsi::Value NativeBreezSdkSpark::
8575
+ cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set(
8576
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
8577
+ size_t count) {
8578
+ auto value = uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set();
8579
+
8580
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
8581
+ }
8530
8582
  jsi::Value NativeBreezSdkSpark::
8531
8583
  cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client(
8532
8584
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -142,6 +142,9 @@ protected:
142
142
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service(
143
143
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
144
144
  size_t count);
145
+ jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
146
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
147
+ size_t count);
145
148
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
146
149
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
147
150
  size_t count);
@@ -473,6 +476,9 @@ protected:
473
476
  cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service(
474
477
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
475
478
  size_t count);
479
+ jsi::Value cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set(
480
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
481
+ size_t count);
476
482
  jsi::Value
477
483
  cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client(
478
484
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -1 +1 @@
1
- {"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAmdA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAC3BL,MAAM,EAErB;AAkPA;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,MAAMM,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AA0dA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAC3BL,MAAM,EAErB;AAkPA;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,MAAMM,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Utxo = exports.UpdateDepositPayload_Tags = exports.UpdateDepositPayload = exports.TxStatus = exports.SyncWalletResponse = exports.SyncWalletRequest = exports.StorageImpl = exports.StorageError_Tags = exports.StorageError = exports.SendPaymentResponse = exports.SendPaymentRequest = exports.SendPaymentOptions_Tags = exports.SendPaymentOptions = exports.SendPaymentMethod_Tags = exports.SendPaymentMethod = exports.SendOnchainSpeedFeeQuote = exports.SendOnchainFeeQuote = exports.SdkEvent_Tags = exports.SdkEvent = exports.SdkError_Tags = exports.SdkError = exports.SdkBuilder = exports.RegisterLightningAddressRequest = exports.RefundDepositResponse = exports.RefundDepositRequest = exports.ReceivePaymentResponse = exports.ReceivePaymentRequest = exports.ReceivePaymentMethod_Tags = exports.ReceivePaymentMethod = exports.PrepareSendPaymentResponse = exports.PrepareSendPaymentRequest = exports.PrepareLnurlPayResponse = exports.PrepareLnurlPayRequest = exports.PaymentType = exports.PaymentStatus = exports.PaymentMethod = exports.PaymentMetadata = exports.PaymentDetails_Tags = exports.PaymentDetails = exports.Payment = exports.OnchainConfirmationSpeed = exports.Network = exports.LogEntry = exports.LnurlPayResponse = exports.LnurlPayRequest = exports.LnurlPayInfo = exports.ListUnclaimedDepositsResponse = exports.ListUnclaimedDepositsRequest = exports.ListPaymentsResponse = exports.ListPaymentsRequest = exports.LightningAddressInfo = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.Fee_Tags = exports.Fee = exports.DepositInfo = exports.DepositClaimError_Tags = exports.DepositClaimError = exports.Credentials = exports.ConnectRequest = exports.Config = exports.ClaimDepositResponse = exports.ClaimDepositRequest = exports.CheckLightningAddressRequest = exports.ChainServiceError_Tags = exports.ChainServiceError = exports.BreezSdk = exports.BitcoinChainServiceImpl = void 0;
6
+ exports.Utxo = exports.UpdateDepositPayload_Tags = exports.UpdateDepositPayload = exports.TxStatus = exports.SyncWalletResponse = exports.SyncWalletRequest = exports.StorageImpl = exports.StorageError_Tags = exports.StorageError = exports.SendPaymentResponse = exports.SendPaymentRequest = exports.SendPaymentOptions_Tags = exports.SendPaymentOptions = exports.SendPaymentMethod_Tags = exports.SendPaymentMethod = exports.SendOnchainSpeedFeeQuote = exports.SendOnchainFeeQuote = exports.SdkEvent_Tags = exports.SdkEvent = exports.SdkError_Tags = exports.SdkError = exports.SdkBuilder = exports.RegisterLightningAddressRequest = exports.RefundDepositResponse = exports.RefundDepositRequest = exports.ReceivePaymentResponse = exports.ReceivePaymentRequest = exports.ReceivePaymentMethod_Tags = exports.ReceivePaymentMethod = exports.PrepareSendPaymentResponse = exports.PrepareSendPaymentRequest = exports.PrepareLnurlPayResponse = exports.PrepareLnurlPayRequest = exports.PaymentType = exports.PaymentStatus = exports.PaymentMethod = exports.PaymentMetadata = exports.PaymentDetails_Tags = exports.PaymentDetails = exports.Payment = exports.OnchainConfirmationSpeed = exports.Network = exports.LogEntry = exports.LnurlPayResponse = exports.LnurlPayRequest = exports.LnurlPayInfo = exports.ListUnclaimedDepositsResponse = exports.ListUnclaimedDepositsRequest = exports.ListPaymentsResponse = exports.ListPaymentsRequest = exports.LightningAddressInfo = exports.KeySetType = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.Fee_Tags = exports.Fee = exports.DepositInfo = exports.DepositClaimError_Tags = exports.DepositClaimError = exports.Credentials = exports.ConnectRequest = exports.Config = exports.ClaimDepositResponse = exports.ClaimDepositRequest = exports.CheckLightningAddressRequest = exports.ChainServiceError_Tags = exports.ChainServiceError = exports.BreezSdk = exports.BitcoinChainServiceImpl = void 0;
7
7
  exports.connect = connect;
8
8
  exports.default = void 0;
9
9
  exports.defaultConfig = defaultConfig;
@@ -315,7 +315,8 @@ const FfiConverterTypeConfig = (() => {
315
315
  network: FfiConverterTypeNetwork.read(from),
316
316
  syncIntervalSecs: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
317
317
  maxDepositClaimFee: FfiConverterOptionalTypeFee.read(from),
318
- lnurlDomain: FfiConverterOptionalString.read(from)
318
+ lnurlDomain: FfiConverterOptionalString.read(from),
319
+ preferSparkOverLightning: _uniffiBindgenReactNative.FfiConverterBool.read(from)
319
320
  };
320
321
  }
321
322
  write(value, into) {
@@ -324,9 +325,10 @@ const FfiConverterTypeConfig = (() => {
324
325
  _uniffiBindgenReactNative.FfiConverterUInt32.write(value.syncIntervalSecs, into);
325
326
  FfiConverterOptionalTypeFee.write(value.maxDepositClaimFee, into);
326
327
  FfiConverterOptionalString.write(value.lnurlDomain, into);
328
+ _uniffiBindgenReactNative.FfiConverterBool.write(value.preferSparkOverLightning, into);
327
329
  }
328
330
  allocationSize(value) {
329
- return FfiConverterOptionalString.allocationSize(value.apiKey) + FfiConverterTypeNetwork.allocationSize(value.network) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.syncIntervalSecs) + FfiConverterOptionalTypeFee.allocationSize(value.maxDepositClaimFee) + FfiConverterOptionalString.allocationSize(value.lnurlDomain);
331
+ return FfiConverterOptionalString.allocationSize(value.apiKey) + FfiConverterTypeNetwork.allocationSize(value.network) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.syncIntervalSecs) + FfiConverterOptionalTypeFee.allocationSize(value.maxDepositClaimFee) + FfiConverterOptionalString.allocationSize(value.lnurlDomain) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.preferSparkOverLightning);
330
332
  }
331
333
  }
332
334
  return new FFIConverter();
@@ -2364,6 +2366,53 @@ const FfiConverterTypeFee = (() => {
2364
2366
  }
2365
2367
  return new FFIConverter();
2366
2368
  })();
2369
+ let KeySetType = exports.KeySetType = /*#__PURE__*/function (KeySetType) {
2370
+ KeySetType[KeySetType["Default"] = 0] = "Default";
2371
+ KeySetType[KeySetType["Taproot"] = 1] = "Taproot";
2372
+ KeySetType[KeySetType["NativeSegwit"] = 2] = "NativeSegwit";
2373
+ KeySetType[KeySetType["WrappedSegwit"] = 3] = "WrappedSegwit";
2374
+ KeySetType[KeySetType["Legacy"] = 4] = "Legacy";
2375
+ return KeySetType;
2376
+ }({});
2377
+ const FfiConverterTypeKeySetType = (() => {
2378
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
2379
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
2380
+ read(from) {
2381
+ switch (ordinalConverter.read(from)) {
2382
+ case 1:
2383
+ return KeySetType.Default;
2384
+ case 2:
2385
+ return KeySetType.Taproot;
2386
+ case 3:
2387
+ return KeySetType.NativeSegwit;
2388
+ case 4:
2389
+ return KeySetType.WrappedSegwit;
2390
+ case 5:
2391
+ return KeySetType.Legacy;
2392
+ default:
2393
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2394
+ }
2395
+ }
2396
+ write(value, into) {
2397
+ switch (value) {
2398
+ case KeySetType.Default:
2399
+ return ordinalConverter.write(1, into);
2400
+ case KeySetType.Taproot:
2401
+ return ordinalConverter.write(2, into);
2402
+ case KeySetType.NativeSegwit:
2403
+ return ordinalConverter.write(3, into);
2404
+ case KeySetType.WrappedSegwit:
2405
+ return ordinalConverter.write(4, into);
2406
+ case KeySetType.Legacy:
2407
+ return ordinalConverter.write(5, into);
2408
+ }
2409
+ }
2410
+ allocationSize(value) {
2411
+ return ordinalConverter.allocationSize(0);
2412
+ }
2413
+ }
2414
+ return new FFIConverter();
2415
+ })();
2367
2416
  let Network = exports.Network = /*#__PURE__*/function (Network) {
2368
2417
  Network[Network["Mainnet"] = 0] = "Mainnet";
2369
2418
  Network[Network["Regtest"] = 1] = "Regtest";
@@ -3411,6 +3460,7 @@ let SdkEvent_Tags = exports.SdkEvent_Tags = /*#__PURE__*/function (SdkEvent_Tags
3411
3460
  SdkEvent_Tags["ClaimDepositsFailed"] = "ClaimDepositsFailed";
3412
3461
  SdkEvent_Tags["ClaimDepositsSucceeded"] = "ClaimDepositsSucceeded";
3413
3462
  SdkEvent_Tags["PaymentSucceeded"] = "PaymentSucceeded";
3463
+ SdkEvent_Tags["PaymentFailed"] = "PaymentFailed";
3414
3464
  return SdkEvent_Tags;
3415
3465
  }({});
3416
3466
  /**
@@ -3494,6 +3544,24 @@ const SdkEvent = exports.SdkEvent = (() => {
3494
3544
  return obj.tag === SdkEvent_Tags.PaymentSucceeded;
3495
3545
  }
3496
3546
  }
3547
+ class PaymentFailed_ extends _uniffiBindgenReactNative.UniffiEnum {
3548
+ /**
3549
+ * @private
3550
+ * This field is private and should not be used, use `tag` instead.
3551
+ */
3552
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SdkEvent';
3553
+ tag = SdkEvent_Tags.PaymentFailed;
3554
+ constructor(inner) {
3555
+ super('SdkEvent', 'PaymentFailed');
3556
+ this.inner = Object.freeze(inner);
3557
+ }
3558
+ static new(inner) {
3559
+ return new PaymentFailed_(inner);
3560
+ }
3561
+ static instanceOf(obj) {
3562
+ return obj.tag === SdkEvent_Tags.PaymentFailed;
3563
+ }
3564
+ }
3497
3565
  function instanceOf(obj) {
3498
3566
  return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'SdkEvent';
3499
3567
  }
@@ -3502,7 +3570,8 @@ const SdkEvent = exports.SdkEvent = (() => {
3502
3570
  Synced: Synced_,
3503
3571
  ClaimDepositsFailed: ClaimDepositsFailed_,
3504
3572
  ClaimDepositsSucceeded: ClaimDepositsSucceeded_,
3505
- PaymentSucceeded: PaymentSucceeded_
3573
+ PaymentSucceeded: PaymentSucceeded_,
3574
+ PaymentFailed: PaymentFailed_
3506
3575
  });
3507
3576
  })();
3508
3577
 
@@ -3530,6 +3599,10 @@ const FfiConverterTypeSdkEvent = (() => {
3530
3599
  return new SdkEvent.PaymentSucceeded({
3531
3600
  payment: FfiConverterTypePayment.read(from)
3532
3601
  });
3602
+ case 5:
3603
+ return new SdkEvent.PaymentFailed({
3604
+ payment: FfiConverterTypePayment.read(from)
3605
+ });
3533
3606
  default:
3534
3607
  throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
3535
3608
  }
@@ -3562,6 +3635,13 @@ const FfiConverterTypeSdkEvent = (() => {
3562
3635
  FfiConverterTypePayment.write(inner.payment, into);
3563
3636
  return;
3564
3637
  }
3638
+ case SdkEvent_Tags.PaymentFailed:
3639
+ {
3640
+ ordinalConverter.write(5, into);
3641
+ const inner = value.inner;
3642
+ FfiConverterTypePayment.write(inner.payment, into);
3643
+ return;
3644
+ }
3565
3645
  default:
3566
3646
  // Throwing from here means that SdkEvent_Tags hasn't matched an ordinal.
3567
3647
  throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
@@ -3594,6 +3674,13 @@ const FfiConverterTypeSdkEvent = (() => {
3594
3674
  size += FfiConverterTypePayment.allocationSize(inner.payment);
3595
3675
  return size;
3596
3676
  }
3677
+ case SdkEvent_Tags.PaymentFailed:
3678
+ {
3679
+ const inner = value.inner;
3680
+ let size = ordinalConverter.allocationSize(5);
3681
+ size += FfiConverterTypePayment.allocationSize(inner.payment);
3682
+ return size;
3683
+ }
3597
3684
  default:
3598
3685
  throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
3599
3686
  }
@@ -4556,9 +4643,9 @@ class BreezSdk extends _uniffiBindgenReactNative.UniffiAbstractObject {
4556
4643
  throw __error;
4557
4644
  }
4558
4645
  }
4559
- pollLightningSendPayment(paymentId) {
4646
+ pollLightningSendPayment(payment, sspId) {
4560
4647
  uniffiCaller.rustCall(/*caller:*/callStatus => {
4561
- (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterString.lower(paymentId), callStatus);
4648
+ (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterTypePayment.lower(payment), FfiConverterString.lower(sspId), callStatus);
4562
4649
  }, /*liftString:*/FfiConverterString.lift);
4563
4650
  }
4564
4651
  async prepareLnurlPay(request, asyncOpts_) /*throws*/{
@@ -4807,6 +4894,26 @@ class SdkBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
4807
4894
  throw __error;
4808
4895
  }
4809
4896
  }
4897
+
4898
+ /**
4899
+ * Sets the key set type to be used by the SDK.
4900
+ * Arguments:
4901
+ * - `key_set_type`: The key set type which determines the derivation path.
4902
+ * - `use_address_index`: Controls the structure of the BIP derivation path.
4903
+ */
4904
+ async withKeySet(keySetType, useAddressIndex, asyncOpts_) {
4905
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4906
+ try {
4907
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4908
+ return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(uniffiTypeSdkBuilderObjectFactory.clonePointer(this), FfiConverterTypeKeySetType.lower(keySetType), _uniffiBindgenReactNative.FfiConverterBool.lower(useAddressIndex));
4909
+ }, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_void, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_void, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_);
4910
+ } catch (__error) {
4911
+ if (uniffiIsDebug && __error instanceof Error) {
4912
+ __error.stack = __stack;
4913
+ }
4914
+ throw __error;
4915
+ }
4916
+ }
4810
4917
  async withLnurlClient(lnurlClient, asyncOpts_) {
4811
4918
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
4812
4919
  try {
@@ -5611,7 +5718,7 @@ function uniffiEnsureInitialized() {
5611
5718
  if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay() !== 10147) {
5612
5719
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay');
5613
5720
  }
5614
- if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment() !== 5478) {
5721
+ if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment() !== 57601) {
5615
5722
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment');
5616
5723
  }
5617
5724
  if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay() !== 37691) {
@@ -5650,6 +5757,9 @@ function uniffiEnsureInitialized() {
5650
5757
  if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service() !== 2848) {
5651
5758
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service');
5652
5759
  }
5760
+ if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set() !== 55523) {
5761
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set');
5762
+ }
5653
5763
  if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client() !== 61720) {
5654
5764
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client');
5655
5765
  }
@@ -5721,6 +5831,7 @@ var _default = exports.default = Object.freeze({
5721
5831
  FfiConverterTypeGetInfoResponse,
5722
5832
  FfiConverterTypeGetPaymentRequest,
5723
5833
  FfiConverterTypeGetPaymentResponse,
5834
+ FfiConverterTypeKeySetType,
5724
5835
  FfiConverterTypeLightningAddressInfo,
5725
5836
  FfiConverterTypeListPaymentsRequest,
5726
5837
  FfiConverterTypeListPaymentsResponse,