@breeztech/breez-sdk-spark-react-native 0.4.2-dev1 → 0.4.3-dev1

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.
@@ -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,
@@ -375,6 +383,8 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
375
383
  uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(void *ptr,
376
384
  RustBuffer request);
377
385
  /*handle*/ uint64_t
386
+ uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(void *ptr);
387
+ /*handle*/ uint64_t
378
388
  uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(void *ptr,
379
389
  RustBuffer request);
380
390
  /*handle*/ uint64_t
@@ -395,9 +405,6 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(void *ptr,
395
405
  /*handle*/ uint64_t
396
406
  uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
397
407
  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
408
  void *
402
409
  uniffi_breez_sdk_spark_fn_clone_fiatservice(void *ptr,
403
410
  RustCallStatus *uniffi_out_err);
@@ -464,7 +471,7 @@ uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_real_time_sync_storage(
464
471
  void *ptr, void *storage);
465
472
  /*handle*/ uint64_t
466
473
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
467
- void *ptr, RustBuffer url, RustBuffer credentials);
474
+ void *ptr, RustBuffer url, RustBuffer api_type, RustBuffer credentials);
468
475
  /*handle*/ uint64_t
469
476
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_storage(void *ptr,
470
477
  void *storage);
@@ -716,6 +723,8 @@ uint16_t
716
723
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex();
717
724
  uint16_t
718
725
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction();
726
+ uint16_t
727
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees();
719
728
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener();
720
729
  uint16_t
721
730
  uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available();
@@ -742,6 +751,7 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_parse();
742
751
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay();
743
752
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment();
744
753
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment();
754
+ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees();
745
755
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit();
746
756
  uint16_t
747
757
  uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address();
@@ -751,7 +761,6 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment();
751
761
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message();
752
762
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
753
763
  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
764
  uint16_t
756
765
  uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies();
757
766
  uint16_t uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates();
@@ -3946,6 +3955,147 @@ static void cleanup() {
3946
3955
  } // namespace
3947
3956
  // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod3
3948
3957
  // Implementation of callback function calling from Rust to JS
3958
+ // CallbackInterfaceBitcoinChainServiceMethod4
3959
+
3960
+ // Callback function:
3961
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4::UniffiCallbackInterfaceBitcoinChainServiceMethod4
3962
+ //
3963
+ // We have the following constraints:
3964
+ // - we need to pass a function pointer to Rust.
3965
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
3966
+ // - function pointers can't store state, so we can't use a lamda.
3967
+ //
3968
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
3969
+ // function calls the lambda, which itself calls the `body` which then calls
3970
+ // into JS.
3971
+ //
3972
+ // We then give the `callback` function pointer to Rust which will call the
3973
+ // lambda sometime in the future.
3974
+ namespace uniffi::breez_sdk_spark::cb::
3975
+ callbackinterfacebitcoinchainservicemethod4 {
3976
+ using namespace facebook;
3977
+
3978
+ // We need to store a lambda in a global so we can call it from
3979
+ // a function pointer. The function pointer is passed to Rust.
3980
+ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
3981
+ uint64_t, UniffiForeignFuture *)>
3982
+ rsLambda = nullptr;
3983
+
3984
+ // This is the main body of the callback. It's called from the lambda,
3985
+ // which itself is called from the callback function which is passed to Rust.
3986
+ static void body(jsi::Runtime &rt,
3987
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
3988
+ std::shared_ptr<jsi::Value> callbackValue,
3989
+ uint64_t rs_uniffiHandle,
3990
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
3991
+ uint64_t rs_uniffiCallbackData,
3992
+ UniffiForeignFuture *rs_uniffiOutReturn) {
3993
+
3994
+ // Convert the arguments from Rust, into jsi::Values.
3995
+ // We'll use the Bridging class to do this…
3996
+ auto js_uniffiHandle =
3997
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
3998
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
3999
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
4000
+ rs_uniffiFutureCallback);
4001
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
4002
+ rt, callInvoker, rs_uniffiCallbackData);
4003
+
4004
+ // Now we are ready to call the callback.
4005
+ // We are already on the JS thread, because this `body` function was
4006
+ // invoked from the CallInvoker.
4007
+ try {
4008
+ // Getting the callback function
4009
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
4010
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
4011
+ js_uniffiCallbackData);
4012
+
4013
+ // Finally, we need to copy the return value back into the Rust pointer.
4014
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4015
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4016
+ uniffiResult);
4017
+ } catch (const jsi::JSError &error) {
4018
+ std::cout << "Error in callback "
4019
+ "UniffiCallbackInterfaceBitcoinChainServiceMethod4: "
4020
+ << error.what() << std::endl;
4021
+ throw error;
4022
+ }
4023
+ }
4024
+
4025
+ static void
4026
+ callback(uint64_t rs_uniffiHandle,
4027
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
4028
+ uint64_t rs_uniffiCallbackData,
4029
+ UniffiForeignFuture *rs_uniffiOutReturn) {
4030
+ // If the runtime has shutdown, then there is no point in trying to
4031
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
4032
+ //
4033
+ // Answer: the module destructor calls into callback `cleanup` method,
4034
+ // which nulls out the rsLamda.
4035
+ //
4036
+ // If rsLamda is null, then there is no runtime to call into.
4037
+ if (rsLambda == nullptr) {
4038
+ // This only occurs when destructors are calling into Rust free/drop,
4039
+ // which causes the JS callback to be dropped.
4040
+ return;
4041
+ }
4042
+
4043
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
4044
+ // are all in the lambda.
4045
+ rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
4046
+ rs_uniffiOutReturn);
4047
+ }
4048
+
4049
+ static UniffiCallbackInterfaceBitcoinChainServiceMethod4
4050
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4
4051
+ jsi::Runtime &rt,
4052
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
4053
+ const jsi::Value &value) {
4054
+ if (rsLambda != nullptr) {
4055
+ // `makeCallbackFunction` is called in two circumstances:
4056
+ //
4057
+ // 1. at startup, when initializing callback interface vtables.
4058
+ // 2. when polling futures. This happens at least once per future that is
4059
+ // exposed to Javascript. We know that this is always the same function,
4060
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
4061
+ //
4062
+ // We can therefore return the callback function without making anything
4063
+ // new if we've been initialized already.
4064
+ return callback;
4065
+ }
4066
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
4067
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
4068
+ rsLambda = [&rt, callInvoker, callbackValue](
4069
+ uint64_t rs_uniffiHandle,
4070
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
4071
+ uint64_t rs_uniffiCallbackData,
4072
+ UniffiForeignFuture *rs_uniffiOutReturn) {
4073
+ // We immediately make a lambda which will do the work of transforming the
4074
+ // arguments into JSI values and calling the callback.
4075
+ uniffi_runtime::UniffiCallFunc jsLambda =
4076
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
4077
+ rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
4078
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle,
4079
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
4080
+ rs_uniffiOutReturn);
4081
+ };
4082
+ // We'll then call that lambda from the callInvoker which will
4083
+ // look after calling it on the correct thread.
4084
+ callInvoker->invokeBlocking(rt, jsLambda);
4085
+ };
4086
+ return callback;
4087
+ }
4088
+
4089
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
4090
+ // happens when the jsi::Runtime is being destroyed.
4091
+ static void cleanup() {
4092
+ // The lambda holds a reference to the the Runtime, so when this is nulled
4093
+ // out, then the pointer will no longer be left dangling.
4094
+ rsLambda = nullptr;
4095
+ }
4096
+ } // namespace
4097
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4
4098
+ // Implementation of callback function calling from Rust to JS
3949
4099
  // CallbackInterfaceFiatServiceMethod0
3950
4100
 
3951
4101
  // Callback function:
@@ -8027,6 +8177,9 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceBitcoinChainService> {
8027
8177
  rsObject.broadcast_transaction = uniffi::breez_sdk_spark::cb::
8028
8178
  callbackinterfacebitcoinchainservicemethod3::makeCallbackFunction(
8029
8179
  rt, callInvoker, jsObject.getProperty(rt, "broadcastTransaction"));
8180
+ rsObject.recommended_fees = uniffi::breez_sdk_spark::cb::
8181
+ callbackinterfacebitcoinchainservicemethod4::makeCallbackFunction(
8182
+ rt, callInvoker, jsObject.getProperty(rt, "recommendedFees"));
8030
8183
  rsObject.uniffi_free = uniffi::breez_sdk_spark::st::
8031
8184
  vtablecallbackinterfacebitcoinchainservice::
8032
8185
  vtablecallbackinterfacebitcoinchainservice::free::
@@ -8414,6 +8567,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
8414
8567
  ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(
8415
8568
  rt, thisVal, args, count);
8416
8569
  });
8570
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_"
8571
+ "fees"] = jsi::Function::createFromHostFunction(
8572
+ rt,
8573
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
8574
+ "bitcoinchainservice_recommended_fees"),
8575
+ 1,
8576
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
8577
+ const jsi::Value *args, size_t count) -> jsi::Value {
8578
+ return this
8579
+ ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
8580
+ rt, thisVal, args, count);
8581
+ });
8417
8582
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_breezsdk"] =
8418
8583
  jsi::Function::createFromHostFunction(
8419
8584
  rt,
@@ -8705,6 +8870,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
8705
8870
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(
8706
8871
  rt, thisVal, args, count);
8707
8872
  });
8873
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees"] =
8874
+ jsi::Function::createFromHostFunction(
8875
+ rt,
8876
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
8877
+ "breezsdk_recommended_fees"),
8878
+ 1,
8879
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
8880
+ const jsi::Value *args, size_t count) -> jsi::Value {
8881
+ return this
8882
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
8883
+ rt, thisVal, args, count);
8884
+ });
8708
8885
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit"] =
8709
8886
  jsi::Function::createFromHostFunction(
8710
8887
  rt,
@@ -8792,18 +8969,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
8792
8969
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
8793
8970
  rt, thisVal, args, count);
8794
8971
  });
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
8972
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice"] =
8808
8973
  jsi::Function::createFromHostFunction(
8809
8974
  rt,
@@ -9079,7 +9244,7 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
9079
9244
  rt,
9080
9245
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
9081
9246
  "sdkbuilder_with_rest_chain_service"),
9082
- 3,
9247
+ 4,
9083
9248
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
9084
9249
  const jsi::Value *args, size_t count) -> jsi::Value {
9085
9250
  return this
@@ -10213,6 +10378,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
10213
10378
  ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction(
10214
10379
  rt, thisVal, args, count);
10215
10380
  });
10381
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_"
10382
+ "recommended_fees"] = jsi::Function::createFromHostFunction(
10383
+ rt,
10384
+ jsi::PropNameID::forAscii(rt,
10385
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
10386
+ "bitcoinchainservice_recommended_fees"),
10387
+ 0,
10388
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
10389
+ const jsi::Value *args, size_t count) -> jsi::Value {
10390
+ return this
10391
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees(
10392
+ rt, thisVal, args, count);
10393
+ });
10216
10394
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_"
10217
10395
  "listener"] = jsi::Function::createFromHostFunction(
10218
10396
  rt,
@@ -10480,6 +10658,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
10480
10658
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment(
10481
10659
  rt, thisVal, args, count);
10482
10660
  });
10661
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_"
10662
+ "fees"] = jsi::Function::createFromHostFunction(
10663
+ rt,
10664
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
10665
+ "method_breezsdk_recommended_fees"),
10666
+ 0,
10667
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
10668
+ const jsi::Value *args, size_t count) -> jsi::Value {
10669
+ return this
10670
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees(
10671
+ rt, thisVal, args, count);
10672
+ });
10483
10673
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit"] =
10484
10674
  jsi::Function::createFromHostFunction(
10485
10675
  rt,
@@ -10565,18 +10755,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
10565
10755
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings(
10566
10756
  rt, thisVal, args, count);
10567
10757
  });
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
10758
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_"
10581
10759
  "currencies"] = jsi::Function::createFromHostFunction(
10582
10760
  rt,
@@ -11461,6 +11639,9 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
11461
11639
  // Cleanup for callback function CallbackInterfaceBitcoinChainServiceMethod3
11462
11640
  uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod3::
11463
11641
  cleanup();
11642
+ // Cleanup for callback function CallbackInterfaceBitcoinChainServiceMethod4
11643
+ uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4::
11644
+ cleanup();
11464
11645
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod0
11465
11646
  uniffi::breez_sdk_spark::cb::callbackinterfacefiatservicemethod0::cleanup();
11466
11647
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod1
@@ -11765,6 +11946,17 @@ jsi::Value NativeBreezSdkSpark::
11765
11946
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
11766
11947
  value);
11767
11948
  }
11949
+ jsi::Value NativeBreezSdkSpark::
11950
+ cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
11951
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
11952
+ size_t count) {
11953
+ auto value =
11954
+ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
11955
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
11956
+
11957
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
11958
+ value);
11959
+ }
11768
11960
  jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_breezsdk(
11769
11961
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
11770
11962
  size_t count) {
@@ -12044,6 +12236,16 @@ jsi::Value NativeBreezSdkSpark::
12044
12236
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12045
12237
  value);
12046
12238
  }
12239
+ jsi::Value NativeBreezSdkSpark::
12240
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
12241
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
12242
+ size_t count) {
12243
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
12244
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
12245
+
12246
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12247
+ value);
12248
+ }
12047
12249
  jsi::Value NativeBreezSdkSpark::
12048
12250
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(
12049
12251
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -12129,18 +12331,6 @@ jsi::Value NativeBreezSdkSpark::
12129
12331
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12130
12332
  value);
12131
12333
  }
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
12334
  jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_fiatservice(
12145
12335
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
12146
12336
  size_t count) {
@@ -12439,7 +12629,9 @@ jsi::Value NativeBreezSdkSpark::
12439
12629
  uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12440
12630
  args[1]),
12441
12631
  uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12442
- args[2]));
12632
+ args[2]),
12633
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
12634
+ args[3]));
12443
12635
 
12444
12636
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
12445
12637
  value);
@@ -13603,6 +13795,15 @@ jsi::Value NativeBreezSdkSpark::
13603
13795
 
13604
13796
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13605
13797
  }
13798
+ jsi::Value NativeBreezSdkSpark::
13799
+ cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees(
13800
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
13801
+ size_t count) {
13802
+ auto value =
13803
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees();
13804
+
13805
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13806
+ }
13606
13807
  jsi::Value NativeBreezSdkSpark::
13607
13808
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(
13608
13809
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -13792,6 +13993,15 @@ jsi::Value NativeBreezSdkSpark::
13792
13993
 
13793
13994
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13794
13995
  }
13996
+ jsi::Value NativeBreezSdkSpark::
13997
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees(
13998
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
13999
+ size_t count) {
14000
+ auto value =
14001
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees();
14002
+
14003
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
14004
+ }
13795
14005
  jsi::Value NativeBreezSdkSpark::
13796
14006
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit(
13797
14007
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -13851,15 +14061,6 @@ jsi::Value NativeBreezSdkSpark::
13851
14061
 
13852
14062
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
13853
14063
  }
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
14064
  jsi::Value NativeBreezSdkSpark::
13864
14065
  cpp_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies(
13865
14066
  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);
@@ -126,6 +130,9 @@ protected:
126
130
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(
127
131
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
128
132
  size_t count);
133
+ jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
134
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
135
+ size_t count);
129
136
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(
130
137
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
131
138
  size_t count);
@@ -149,9 +156,6 @@ protected:
149
156
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
150
157
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
151
158
  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
159
  jsi::Value cpp_uniffi_breez_sdk_spark_fn_clone_fiatservice(
156
160
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
157
161
  size_t count);
@@ -543,6 +547,10 @@ protected:
543
547
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
544
548
  size_t count);
545
549
  jsi::Value
550
+ cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees(
551
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
552
+ size_t count);
553
+ jsi::Value
546
554
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(
547
555
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
548
556
  size_t count);
@@ -621,6 +629,10 @@ protected:
621
629
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment(
622
630
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
623
631
  size_t count);
632
+ jsi::Value
633
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees(
634
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
635
+ size_t count);
624
636
  jsi::Value cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit(
625
637
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
626
638
  size_t count);
@@ -646,10 +658,6 @@ protected:
646
658
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
647
659
  size_t count);
648
660
  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
661
  cpp_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies(
654
662
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
655
663
  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;;AAktBA;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":[]}