@breeztech/breez-sdk-spark-react-native 0.4.2 → 0.5.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.
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
15
15
  s.platforms = { :ios => min_ios_version_supported }
16
16
  s.source = { :git => "https://github.com/breez/spark-sdk.git", :tag => "#{s.version}" }
17
17
 
18
- s.source_files = "ios/**/*.{h,m,mm,swift}", "ios/generated/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}", "cpp/generated/**/*.{hpp,cpp,c,h}"
18
+ s.source_files = "ios/*.{h,m,mm,swift}", "ios/generated/**/*.{h}", "cpp/**/*.{hpp,cpp,c,h}", "cpp/generated/**/*.{hpp,cpp,c,h}"
19
19
  s.vendored_frameworks = "build/RnBreezSdkSpark.xcframework"
20
20
  s.dependency "uniffi-bindgen-react-native", "0.28.3-5"
21
21
 
@@ -123,6 +123,10 @@ typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod3)(
123
123
  uint64_t uniffi_handle, RustBuffer tx,
124
124
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
125
125
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
126
+ typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod4)(
127
+ uint64_t uniffi_handle,
128
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
129
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
126
130
  typedef void (*UniffiCallbackInterfaceFiatServiceMethod0)(
127
131
  uint64_t uniffi_handle,
128
132
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
@@ -249,6 +253,7 @@ typedef struct UniffiVTableCallbackInterfaceBitcoinChainService {
249
253
  UniffiCallbackInterfaceBitcoinChainServiceMethod1 get_transaction_status;
250
254
  UniffiCallbackInterfaceBitcoinChainServiceMethod2 get_transaction_hex;
251
255
  UniffiCallbackInterfaceBitcoinChainServiceMethod3 broadcast_transaction;
256
+ UniffiCallbackInterfaceBitcoinChainServiceMethod4 recommended_fees;
252
257
  UniffiCallbackInterfaceFree uniffi_free;
253
258
  } UniffiVTableCallbackInterfaceBitcoinChainService;
254
259
  typedef struct UniffiVTableCallbackInterfaceFiatService {
@@ -312,6 +317,9 @@ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_hex(
312
317
  /*handle*/ uint64_t
313
318
  uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(
314
319
  void *ptr, RustBuffer tx);
320
+ /*handle*/ uint64_t
321
+ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
322
+ void *ptr);
315
323
  void *uniffi_breez_sdk_spark_fn_clone_breezsdk(void *ptr,
316
324
  RustCallStatus *uniffi_out_err);
317
325
  void uniffi_breez_sdk_spark_fn_free_breezsdk(void *ptr,
@@ -329,6 +337,9 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(void *ptr,
329
337
  uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(void *ptr,
330
338
  RustBuffer request);
331
339
  /*handle*/ uint64_t
340
+ uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
341
+ void *ptr, RustBuffer request);
342
+ /*handle*/ uint64_t
332
343
  uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(void *ptr);
333
344
  /*handle*/ uint64_t
334
345
  uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(void *ptr);
@@ -375,6 +386,8 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
375
386
  uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(void *ptr,
376
387
  RustBuffer request);
377
388
  /*handle*/ uint64_t
389
+ uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(void *ptr);
390
+ /*handle*/ uint64_t
378
391
  uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(void *ptr,
379
392
  RustBuffer request);
380
393
  /*handle*/ uint64_t
@@ -395,9 +408,6 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(void *ptr,
395
408
  /*handle*/ uint64_t
396
409
  uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
397
410
  void *ptr, RustBuffer request);
398
- /*handle*/ uint64_t
399
- uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(void *ptr,
400
- RustBuffer request);
401
411
  void *
402
412
  uniffi_breez_sdk_spark_fn_clone_fiatservice(void *ptr,
403
413
  RustCallStatus *uniffi_out_err);
@@ -464,7 +474,7 @@ uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_real_time_sync_storage(
464
474
  void *ptr, void *storage);
465
475
  /*handle*/ uint64_t
466
476
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
467
- void *ptr, RustBuffer url, RustBuffer credentials);
477
+ void *ptr, RustBuffer url, RustBuffer api_type, RustBuffer credentials);
468
478
  /*handle*/ uint64_t
469
479
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_storage(void *ptr,
470
480
  void *storage);
@@ -716,11 +726,14 @@ uint16_t
716
726
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex();
717
727
  uint16_t
718
728
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction();
729
+ uint16_t
730
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees();
719
731
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener();
720
732
  uint16_t
721
733
  uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available();
722
734
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message();
723
735
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit();
736
+ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment();
724
737
  uint16_t
725
738
  uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address();
726
739
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect();
@@ -742,6 +755,7 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_parse();
742
755
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay();
743
756
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment();
744
757
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment();
758
+ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees();
745
759
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit();
746
760
  uint16_t
747
761
  uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address();
@@ -751,7 +765,6 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment();
751
765
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message();
752
766
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
753
767
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings();
754
- uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment();
755
768
  uint16_t
756
769
  uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies();
757
770
  uint16_t uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates();
@@ -3946,6 +3959,147 @@ static void cleanup() {
3946
3959
  } // namespace
3947
3960
  // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod3
3948
3961
  // Implementation of callback function calling from Rust to JS
3962
+ // CallbackInterfaceBitcoinChainServiceMethod4
3963
+
3964
+ // Callback function:
3965
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4::UniffiCallbackInterfaceBitcoinChainServiceMethod4
3966
+ //
3967
+ // We have the following constraints:
3968
+ // - we need to pass a function pointer to Rust.
3969
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
3970
+ // - function pointers can't store state, so we can't use a lamda.
3971
+ //
3972
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
3973
+ // function calls the lambda, which itself calls the `body` which then calls
3974
+ // into JS.
3975
+ //
3976
+ // We then give the `callback` function pointer to Rust which will call the
3977
+ // lambda sometime in the future.
3978
+ namespace uniffi::breez_sdk_spark::cb::
3979
+ callbackinterfacebitcoinchainservicemethod4 {
3980
+ using namespace facebook;
3981
+
3982
+ // We need to store a lambda in a global so we can call it from
3983
+ // a function pointer. The function pointer is passed to Rust.
3984
+ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
3985
+ uint64_t, UniffiForeignFuture *)>
3986
+ rsLambda = nullptr;
3987
+
3988
+ // This is the main body of the callback. It's called from the lambda,
3989
+ // which itself is called from the callback function which is passed to Rust.
3990
+ static void body(jsi::Runtime &rt,
3991
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
3992
+ std::shared_ptr<jsi::Value> callbackValue,
3993
+ uint64_t rs_uniffiHandle,
3994
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
3995
+ uint64_t rs_uniffiCallbackData,
3996
+ UniffiForeignFuture *rs_uniffiOutReturn) {
3997
+
3998
+ // Convert the arguments from Rust, into jsi::Values.
3999
+ // We'll use the Bridging class to do this…
4000
+ auto js_uniffiHandle =
4001
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
4002
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
4003
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
4004
+ rs_uniffiFutureCallback);
4005
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
4006
+ rt, callInvoker, rs_uniffiCallbackData);
4007
+
4008
+ // Now we are ready to call the callback.
4009
+ // We are already on the JS thread, because this `body` function was
4010
+ // invoked from the CallInvoker.
4011
+ try {
4012
+ // Getting the callback function
4013
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
4014
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
4015
+ js_uniffiCallbackData);
4016
+
4017
+ // Finally, we need to copy the return value back into the Rust pointer.
4018
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4019
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4020
+ uniffiResult);
4021
+ } catch (const jsi::JSError &error) {
4022
+ std::cout << "Error in callback "
4023
+ "UniffiCallbackInterfaceBitcoinChainServiceMethod4: "
4024
+ << error.what() << std::endl;
4025
+ throw error;
4026
+ }
4027
+ }
4028
+
4029
+ static void
4030
+ callback(uint64_t rs_uniffiHandle,
4031
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
4032
+ uint64_t rs_uniffiCallbackData,
4033
+ UniffiForeignFuture *rs_uniffiOutReturn) {
4034
+ // If the runtime has shutdown, then there is no point in trying to
4035
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
4036
+ //
4037
+ // Answer: the module destructor calls into callback `cleanup` method,
4038
+ // which nulls out the rsLamda.
4039
+ //
4040
+ // If rsLamda is null, then there is no runtime to call into.
4041
+ if (rsLambda == nullptr) {
4042
+ // This only occurs when destructors are calling into Rust free/drop,
4043
+ // which causes the JS callback to be dropped.
4044
+ return;
4045
+ }
4046
+
4047
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
4048
+ // are all in the lambda.
4049
+ rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
4050
+ rs_uniffiOutReturn);
4051
+ }
4052
+
4053
+ static UniffiCallbackInterfaceBitcoinChainServiceMethod4
4054
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4
4055
+ jsi::Runtime &rt,
4056
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
4057
+ const jsi::Value &value) {
4058
+ if (rsLambda != nullptr) {
4059
+ // `makeCallbackFunction` is called in two circumstances:
4060
+ //
4061
+ // 1. at startup, when initializing callback interface vtables.
4062
+ // 2. when polling futures. This happens at least once per future that is
4063
+ // exposed to Javascript. We know that this is always the same function,
4064
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
4065
+ //
4066
+ // We can therefore return the callback function without making anything
4067
+ // new if we've been initialized already.
4068
+ return callback;
4069
+ }
4070
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
4071
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
4072
+ rsLambda = [&rt, callInvoker, callbackValue](
4073
+ uint64_t rs_uniffiHandle,
4074
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
4075
+ uint64_t rs_uniffiCallbackData,
4076
+ UniffiForeignFuture *rs_uniffiOutReturn) {
4077
+ // We immediately make a lambda which will do the work of transforming the
4078
+ // arguments into JSI values and calling the callback.
4079
+ uniffi_runtime::UniffiCallFunc jsLambda =
4080
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
4081
+ rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
4082
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle,
4083
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
4084
+ rs_uniffiOutReturn);
4085
+ };
4086
+ // We'll then call that lambda from the callInvoker which will
4087
+ // look after calling it on the correct thread.
4088
+ callInvoker->invokeBlocking(rt, jsLambda);
4089
+ };
4090
+ return callback;
4091
+ }
4092
+
4093
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
4094
+ // happens when the jsi::Runtime is being destroyed.
4095
+ static void cleanup() {
4096
+ // The lambda holds a reference to the the Runtime, so when this is nulled
4097
+ // out, then the pointer will no longer be left dangling.
4098
+ rsLambda = nullptr;
4099
+ }
4100
+ } // namespace
4101
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4
4102
+ // Implementation of callback function calling from Rust to JS
3949
4103
  // CallbackInterfaceFiatServiceMethod0
3950
4104
 
3951
4105
  // Callback function:
@@ -8027,6 +8181,9 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceBitcoinChainService> {
8027
8181
  rsObject.broadcast_transaction = uniffi::breez_sdk_spark::cb::
8028
8182
  callbackinterfacebitcoinchainservicemethod3::makeCallbackFunction(
8029
8183
  rt, callInvoker, jsObject.getProperty(rt, "broadcastTransaction"));
8184
+ rsObject.recommended_fees = uniffi::breez_sdk_spark::cb::
8185
+ callbackinterfacebitcoinchainservicemethod4::makeCallbackFunction(
8186
+ rt, callInvoker, jsObject.getProperty(rt, "recommendedFees"));
8030
8187
  rsObject.uniffi_free = uniffi::breez_sdk_spark::st::
8031
8188
  vtablecallbackinterfacebitcoinchainservice::
8032
8189
  vtablecallbackinterfacebitcoinchainservice::free::
@@ -8414,6 +8571,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
8414
8571
  ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(
8415
8572
  rt, thisVal, args, count);
8416
8573
  });
8574
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_"
8575
+ "fees"] = jsi::Function::createFromHostFunction(
8576
+ rt,
8577
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
8578
+ "bitcoinchainservice_recommended_fees"),
8579
+ 1,
8580
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
8581
+ const jsi::Value *args, size_t count) -> jsi::Value {
8582
+ return this
8583
+ ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
8584
+ rt, thisVal, args, count);
8585
+ });
8417
8586
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_breezsdk"] =
8418
8587
  jsi::Function::createFromHostFunction(
8419
8588
  rt,
@@ -8487,6 +8656,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
8487
8656
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(
8488
8657
  rt, thisVal, args, count);
8489
8658
  });
8659
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment"] =
8660
+ jsi::Function::createFromHostFunction(
8661
+ rt,
8662
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
8663
+ "breezsdk_claim_htlc_payment"),
8664
+ 2,
8665
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
8666
+ const jsi::Value *args, size_t count) -> jsi::Value {
8667
+ return this
8668
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
8669
+ rt, thisVal, args, count);
8670
+ });
8490
8671
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_"
8491
8672
  "address"] = jsi::Function::createFromHostFunction(
8492
8673
  rt,
@@ -8705,6 +8886,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
8705
8886
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(
8706
8887
  rt, thisVal, args, count);
8707
8888
  });
8889
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees"] =
8890
+ jsi::Function::createFromHostFunction(
8891
+ rt,
8892
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
8893
+ "breezsdk_recommended_fees"),
8894
+ 1,
8895
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
8896
+ const jsi::Value *args, size_t count) -> jsi::Value {
8897
+ return this
8898
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
8899
+ rt, thisVal, args, count);
8900
+ });
8708
8901
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit"] =
8709
8902
  jsi::Function::createFromHostFunction(
8710
8903
  rt,
@@ -8792,18 +8985,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
8792
8985
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
8793
8986
  rt, thisVal, args, count);
8794
8987
  });
8795
- props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment"] =
8796
- jsi::Function::createFromHostFunction(
8797
- rt,
8798
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
8799
- "breezsdk_wait_for_payment"),
8800
- 2,
8801
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
8802
- const jsi::Value *args, size_t count) -> jsi::Value {
8803
- return this
8804
- ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
8805
- rt, thisVal, args, count);
8806
- });
8807
8988
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice"] =
8808
8989
  jsi::Function::createFromHostFunction(
8809
8990
  rt,
@@ -9079,7 +9260,7 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
9079
9260
  rt,
9080
9261
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
9081
9262
  "sdkbuilder_with_rest_chain_service"),
9082
- 3,
9263
+ 4,
9083
9264
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
9084
9265
  const jsi::Value *args, size_t count) -> jsi::Value {
9085
9266
  return this
@@ -10213,6 +10394,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
10213
10394
  ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction(
10214
10395
  rt, thisVal, args, count);
10215
10396
  });
10397
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_"
10398
+ "recommended_fees"] = jsi::Function::createFromHostFunction(
10399
+ rt,
10400
+ jsi::PropNameID::forAscii(rt,
10401
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
10402
+ "bitcoinchainservice_recommended_fees"),
10403
+ 0,
10404
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
10405
+ const jsi::Value *args, size_t count) -> jsi::Value {
10406
+ return this
10407
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees(
10408
+ rt, thisVal, args, count);
10409
+ });
10216
10410
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_"
10217
10411
  "listener"] = jsi::Function::createFromHostFunction(
10218
10412
  rt,
@@ -10262,6 +10456,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
10262
10456
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit(
10263
10457
  rt, thisVal, args, count);
10264
10458
  });
10459
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_"
10460
+ "payment"] = jsi::Function::createFromHostFunction(
10461
+ rt,
10462
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
10463
+ "method_breezsdk_claim_htlc_payment"),
10464
+ 0,
10465
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
10466
+ const jsi::Value *args, size_t count) -> jsi::Value {
10467
+ return this
10468
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment(
10469
+ rt, thisVal, args, count);
10470
+ });
10265
10471
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_"
10266
10472
  "address"] = jsi::Function::createFromHostFunction(
10267
10473
  rt,
@@ -10480,6 +10686,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
10480
10686
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment(
10481
10687
  rt, thisVal, args, count);
10482
10688
  });
10689
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_"
10690
+ "fees"] = jsi::Function::createFromHostFunction(
10691
+ rt,
10692
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
10693
+ "method_breezsdk_recommended_fees"),
10694
+ 0,
10695
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
10696
+ const jsi::Value *args, size_t count) -> jsi::Value {
10697
+ return this
10698
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees(
10699
+ rt, thisVal, args, count);
10700
+ });
10483
10701
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit"] =
10484
10702
  jsi::Function::createFromHostFunction(
10485
10703
  rt,
@@ -10565,18 +10783,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
10565
10783
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings(
10566
10784
  rt, thisVal, args, count);
10567
10785
  });
10568
- props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_"
10569
- "payment"] = jsi::Function::createFromHostFunction(
10570
- rt,
10571
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
10572
- "method_breezsdk_wait_for_payment"),
10573
- 0,
10574
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
10575
- const jsi::Value *args, size_t count) -> jsi::Value {
10576
- return this
10577
- ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(
10578
- rt, thisVal, args, count);
10579
- });
10580
10786
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_"
10581
10787
  "currencies"] = jsi::Function::createFromHostFunction(
10582
10788
  rt,
@@ -11461,6 +11667,9 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
11461
11667
  // Cleanup for callback function CallbackInterfaceBitcoinChainServiceMethod3
11462
11668
  uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod3::
11463
11669
  cleanup();
11670
+ // Cleanup for callback function CallbackInterfaceBitcoinChainServiceMethod4
11671
+ uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4::
11672
+ cleanup();
11464
11673
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod0
11465
11674
  uniffi::breez_sdk_spark::cb::callbackinterfacefiatservicemethod0::cleanup();
11466
11675
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod1
@@ -11765,6 +11974,17 @@ jsi::Value NativeBreezSdkSpark::
11765
11974
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
11766
11975
  value);
11767
11976
  }
11977
+ jsi::Value NativeBreezSdkSpark::
11978
+ cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
11979
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
11980
+ size_t count) {
11981
+ auto value =
11982
+ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
11983
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
11984
+
11985
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
11986
+ value);
11987
+ }
11768
11988
  jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_breezsdk(
11769
11989
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
11770
11990
  size_t count) {
@@ -11837,6 +12057,18 @@ jsi::Value NativeBreezSdkSpark::
11837
12057
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
11838
12058
  value);
11839
12059
  }
12060
+ jsi::Value NativeBreezSdkSpark::
12061
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
12062
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
12063
+ size_t count) {
12064
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
12065
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
12066
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12067
+ args[1]));
12068
+
12069
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12070
+ value);
12071
+ }
11840
12072
  jsi::Value NativeBreezSdkSpark::
11841
12073
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(
11842
12074
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -12044,6 +12276,16 @@ jsi::Value NativeBreezSdkSpark::
12044
12276
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12045
12277
  value);
12046
12278
  }
12279
+ jsi::Value NativeBreezSdkSpark::
12280
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
12281
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
12282
+ size_t count) {
12283
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
12284
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
12285
+
12286
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12287
+ value);
12288
+ }
12047
12289
  jsi::Value NativeBreezSdkSpark::
12048
12290
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(
12049
12291
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -12129,18 +12371,6 @@ jsi::Value NativeBreezSdkSpark::
12129
12371
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12130
12372
  value);
12131
12373
  }
12132
- jsi::Value NativeBreezSdkSpark::
12133
- cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
12134
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
12135
- size_t count) {
12136
- auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
12137
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
12138
- uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12139
- args[1]));
12140
-
12141
- return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12142
- value);
12143
- }
12144
12374
  jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_fiatservice(
12145
12375
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
12146
12376
  size_t count) {
@@ -12439,7 +12669,9 @@ jsi::Value NativeBreezSdkSpark::
12439
12669
  uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12440
12670
  args[1]),
12441
12671
  uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12442
- args[2]));
12672
+ args[2]),
12673
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12674
+ args[3]));
12443
12675
 
12444
12676
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12445
12677
  value);
@@ -13603,6 +13835,15 @@ jsi::Value NativeBreezSdkSpark::
13603
13835
 
13604
13836
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13605
13837
  }
13838
+ jsi::Value NativeBreezSdkSpark::
13839
+ cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees(
13840
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
13841
+ size_t count) {
13842
+ auto value =
13843
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees();
13844
+
13845
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13846
+ }
13606
13847
  jsi::Value NativeBreezSdkSpark::
13607
13848
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(
13608
13849
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -13637,6 +13878,15 @@ jsi::Value NativeBreezSdkSpark::
13637
13878
 
13638
13879
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13639
13880
  }
13881
+ jsi::Value NativeBreezSdkSpark::
13882
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment(
13883
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
13884
+ size_t count) {
13885
+ auto value =
13886
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment();
13887
+
13888
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13889
+ }
13640
13890
  jsi::Value NativeBreezSdkSpark::
13641
13891
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address(
13642
13892
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -13792,6 +14042,15 @@ jsi::Value NativeBreezSdkSpark::
13792
14042
 
13793
14043
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13794
14044
  }
14045
+ jsi::Value NativeBreezSdkSpark::
14046
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees(
14047
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
14048
+ size_t count) {
14049
+ auto value =
14050
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees();
14051
+
14052
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
14053
+ }
13795
14054
  jsi::Value NativeBreezSdkSpark::
13796
14055
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit(
13797
14056
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -13851,15 +14110,6 @@ jsi::Value NativeBreezSdkSpark::
13851
14110
 
13852
14111
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13853
14112
  }
13854
- jsi::Value NativeBreezSdkSpark::
13855
- cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(
13856
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
13857
- size_t count) {
13858
- auto value =
13859
- uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment();
13860
-
13861
- return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13862
- }
13863
14113
  jsi::Value NativeBreezSdkSpark::
13864
14114
  cpp_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies(
13865
14115
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -50,6 +50,10 @@ protected:
50
50
  cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(
51
51
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
52
52
  size_t count);
53
+ jsi::Value
54
+ cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
55
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
56
+ size_t count);
53
57
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_clone_breezsdk(
54
58
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
55
59
  size_t count);
@@ -69,6 +73,9 @@ protected:
69
73
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(
70
74
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
71
75
  size_t count);
76
+ jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
77
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
78
+ size_t count);
72
79
  jsi::Value
73
80
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(
74
81
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -126,6 +133,9 @@ protected:
126
133
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(
127
134
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
128
135
  size_t count);
136
+ jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
137
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
138
+ size_t count);
129
139
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(
130
140
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
131
141
  size_t count);
@@ -149,9 +159,6 @@ protected:
149
159
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
150
160
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
151
161
  size_t count);
152
- jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
153
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
154
- size_t count);
155
162
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_clone_fiatservice(
156
163
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
157
164
  size_t count);
@@ -543,6 +550,10 @@ protected:
543
550
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
544
551
  size_t count);
545
552
  jsi::Value
553
+ cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees(
554
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
555
+ size_t count);
556
+ jsi::Value
546
557
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(
547
558
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
548
559
  size_t count);
@@ -557,6 +568,10 @@ protected:
557
568
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
558
569
  size_t count);
559
570
  jsi::Value
571
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment(
572
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
573
+ size_t count);
574
+ jsi::Value
560
575
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address(
561
576
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
562
577
  size_t count);
@@ -621,6 +636,10 @@ protected:
621
636
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment(
622
637
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
623
638
  size_t count);
639
+ jsi::Value
640
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees(
641
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
642
+ size_t count);
624
643
  jsi::Value cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit(
625
644
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
626
645
  size_t count);
@@ -646,10 +665,6 @@ protected:
646
665
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
647
666
  size_t count);
648
667
  jsi::Value
649
- cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(
650
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
651
- size_t count);
652
- jsi::Value
653
668
  cpp_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies(
654
669
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
655
670
  size_t count);
@@ -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;;AA8sBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAC3BL,MAAM,EAErB;AA8XA;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;;AAutBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAC3BL,MAAM,EAErB;AAoYA;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":[]}