@breeztech/breez-sdk-spark-react-native 0.11.0-dev2 → 0.11.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.
Files changed (42) hide show
  1. package/README.md +16 -0
  2. package/android/CMakeLists.txt +4 -3
  3. package/{BreezSdkSparkReactNative.podspec → breeztech-breez-sdk-spark-react-native.podspec} +2 -2
  4. package/cpp/generated/breez_sdk_spark.cpp +1464 -539
  5. package/cpp/generated/breez_sdk_spark.hpp +96 -25
  6. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
  7. package/lib/commonjs/generated/breez_sdk_spark.js +314 -85
  8. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
  9. package/lib/commonjs/generated/breez_sdk_spark_bindings.js +2 -4
  10. package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -1
  11. package/lib/commonjs/index.js +1 -11
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
  14. package/lib/module/generated/breez_sdk_spark.js +313 -84
  15. package/lib/module/generated/breez_sdk_spark.js.map +1 -1
  16. package/lib/module/generated/breez_sdk_spark_bindings.js +2 -4
  17. package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -1
  18. package/lib/module/index.js +0 -7
  19. package/lib/module/index.js.map +1 -1
  20. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +94 -66
  21. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  22. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +1446 -91
  23. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
  24. package/lib/typescript/commonjs/src/index.d.ts +0 -1
  25. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  26. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +94 -66
  27. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  28. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +1446 -91
  29. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
  30. package/lib/typescript/module/src/index.d.ts +0 -1
  31. package/lib/typescript/module/src/index.d.ts.map +1 -1
  32. package/package.json +4 -4
  33. package/plugin/build/index.d.ts +5 -0
  34. package/plugin/build/index.js +2 -2
  35. package/plugin/build/withBinaryArtifacts.d.ts +1 -1
  36. package/plugin/build/withBinaryArtifacts.js +5 -7
  37. package/plugin/build/withIOS.d.ts +5 -1
  38. package/plugin/build/withIOS.js +14 -4
  39. package/src/generated/breez_sdk_spark-ffi.ts +158 -82
  40. package/src/generated/breez_sdk_spark.ts +3008 -1245
  41. package/src/generated/breez_sdk_spark_bindings.ts +2 -2
  42. package/src/index.tsx +0 -7
@@ -216,6 +216,14 @@ typedef void (*UniffiCallbackInterfaceFiatServiceMethod1)(
216
216
  uint64_t uniffi_handle,
217
217
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
218
218
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
219
+ typedef void (*UniffiCallbackInterfacePasskeyPrfProviderMethod0)(
220
+ uint64_t uniffi_handle, RustBuffer salt,
221
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
222
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
223
+ typedef void (*UniffiCallbackInterfacePasskeyPrfProviderMethod1)(
224
+ uint64_t uniffi_handle,
225
+ UniffiForeignFutureCompleteI8 uniffi_future_callback,
226
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
219
227
  typedef void (*UniffiCallbackInterfacePaymentObserverMethod0)(
220
228
  uint64_t uniffi_handle, RustBuffer payments,
221
229
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
@@ -386,6 +394,11 @@ typedef struct UniffiVTableCallbackInterfaceFiatService {
386
394
  UniffiCallbackInterfaceFiatServiceMethod1 fetch_fiat_rates;
387
395
  UniffiCallbackInterfaceFree uniffi_free;
388
396
  } UniffiVTableCallbackInterfaceFiatService;
397
+ typedef struct UniffiVTableCallbackInterfacePasskeyPrfProvider {
398
+ UniffiCallbackInterfacePasskeyPrfProviderMethod0 derive_prf_seed;
399
+ UniffiCallbackInterfacePasskeyPrfProviderMethod1 is_prf_available;
400
+ UniffiCallbackInterfaceFree uniffi_free;
401
+ } UniffiVTableCallbackInterfacePasskeyPrfProvider;
389
402
  typedef struct UniffiVTableCallbackInterfacePaymentObserver {
390
403
  UniffiCallbackInterfacePaymentObserverMethod0 before_send;
391
404
  UniffiCallbackInterfaceFree uniffi_free;
@@ -638,6 +651,33 @@ void uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
638
651
  uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(void *ptr);
639
652
  /*handle*/ uint64_t
640
653
  uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(void *ptr);
654
+ void *uniffi_breez_sdk_spark_fn_clone_passkey(void *ptr,
655
+ RustCallStatus *uniffi_out_err);
656
+ void uniffi_breez_sdk_spark_fn_free_passkey(void *ptr,
657
+ RustCallStatus *uniffi_out_err);
658
+ void *uniffi_breez_sdk_spark_fn_constructor_passkey_new(
659
+ void *prf_provider, RustBuffer relay_config,
660
+ RustCallStatus *uniffi_out_err);
661
+ /*handle*/ uint64_t
662
+ uniffi_breez_sdk_spark_fn_method_passkey_get_wallet(void *ptr,
663
+ RustBuffer wallet_name);
664
+ /*handle*/ uint64_t
665
+ uniffi_breez_sdk_spark_fn_method_passkey_is_available(void *ptr);
666
+ /*handle*/ uint64_t
667
+ uniffi_breez_sdk_spark_fn_method_passkey_list_wallet_names(void *ptr);
668
+ /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_passkey_store_wallet_name(
669
+ void *ptr, RustBuffer wallet_name);
670
+ void *uniffi_breez_sdk_spark_fn_clone_passkeyprfprovider(
671
+ void *ptr, RustCallStatus *uniffi_out_err);
672
+ void uniffi_breez_sdk_spark_fn_free_passkeyprfprovider(
673
+ void *ptr, RustCallStatus *uniffi_out_err);
674
+ void uniffi_breez_sdk_spark_fn_init_callback_vtable_passkeyprfprovider(
675
+ UniffiVTableCallbackInterfacePasskeyPrfProvider *vtable);
676
+ /*handle*/ uint64_t
677
+ uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_derive_prf_seed(
678
+ void *ptr, RustBuffer salt);
679
+ /*handle*/ uint64_t
680
+ uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_is_prf_available(void *ptr);
641
681
  void *
642
682
  uniffi_breez_sdk_spark_fn_clone_paymentobserver(void *ptr,
643
683
  RustCallStatus *uniffi_out_err);
@@ -1047,6 +1087,14 @@ uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost();
1047
1087
  uint16_t
1048
1088
  uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies();
1049
1089
  uint16_t uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates();
1090
+ uint16_t uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet();
1091
+ uint16_t uniffi_breez_sdk_spark_checksum_method_passkey_is_available();
1092
+ uint16_t uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_names();
1093
+ uint16_t uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_name();
1094
+ uint16_t
1095
+ uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_derive_prf_seed();
1096
+ uint16_t
1097
+ uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_is_prf_available();
1050
1098
  uint16_t uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send();
1051
1099
  uint16_t uniffi_breez_sdk_spark_checksum_method_restclient_get_request();
1052
1100
  uint16_t uniffi_breez_sdk_spark_checksum_method_restclient_post_request();
@@ -1111,6 +1159,7 @@ uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata();
1111
1159
  uint16_t uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token();
1112
1160
  uint16_t
1113
1161
  uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token();
1162
+ uint16_t uniffi_breez_sdk_spark_checksum_constructor_passkey_new();
1114
1163
  uint16_t uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new();
1115
1164
  uint16_t uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event();
1116
1165
  uint16_t uniffi_breez_sdk_spark_checksum_method_logger_log();
@@ -2143,6 +2192,119 @@ static void cleanup() {
2143
2192
  } // namespace
2144
2193
  // uniffi::breez_sdk_spark::st::vtablecallbackinterfacefiatservice::vtablecallbackinterfacefiatservice::free
2145
2194
 
2195
+ // Callback function:
2196
+ // uniffi::breez_sdk_spark::st::vtablecallbackinterfacepasskeyprfprovider::vtablecallbackinterfacepasskeyprfprovider::free::UniffiCallbackInterfaceFree
2197
+ //
2198
+ // We have the following constraints:
2199
+ // - we need to pass a function pointer to Rust.
2200
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
2201
+ // - function pointers can't store state, so we can't use a lamda.
2202
+ //
2203
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
2204
+ // function calls the lambda, which itself calls the `body` which then calls
2205
+ // into JS.
2206
+ //
2207
+ // We then give the `callback` function pointer to Rust which will call the
2208
+ // lambda sometime in the future.
2209
+ namespace uniffi::breez_sdk_spark::st::
2210
+ vtablecallbackinterfacepasskeyprfprovider::
2211
+ vtablecallbackinterfacepasskeyprfprovider::free {
2212
+ using namespace facebook;
2213
+
2214
+ // We need to store a lambda in a global so we can call it from
2215
+ // a function pointer. The function pointer is passed to Rust.
2216
+ static std::function<void(uint64_t)> rsLambda = nullptr;
2217
+
2218
+ // This is the main body of the callback. It's called from the lambda,
2219
+ // which itself is called from the callback function which is passed to Rust.
2220
+ static void body(jsi::Runtime &rt,
2221
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
2222
+ std::shared_ptr<jsi::Value> callbackValue,
2223
+ uint64_t rs_handle) {
2224
+
2225
+ // Convert the arguments from Rust, into jsi::Values.
2226
+ // We'll use the Bridging class to do this…
2227
+ auto js_handle =
2228
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
2229
+
2230
+ // Now we are ready to call the callback.
2231
+ // We are already on the JS thread, because this `body` function was
2232
+ // invoked from the CallInvoker.
2233
+ try {
2234
+ // Getting the callback function
2235
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
2236
+ auto uniffiResult = cb.call(rt, js_handle);
2237
+
2238
+ } catch (const jsi::JSError &error) {
2239
+ std::cout << "Error in callback UniffiCallbackInterfaceFree: "
2240
+ << error.what() << std::endl;
2241
+ throw error;
2242
+ }
2243
+ }
2244
+
2245
+ static void callback(uint64_t rs_handle) {
2246
+ // If the runtime has shutdown, then there is no point in trying to
2247
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
2248
+ //
2249
+ // Answer: the module destructor calls into callback `cleanup` method,
2250
+ // which nulls out the rsLamda.
2251
+ //
2252
+ // If rsLamda is null, then there is no runtime to call into.
2253
+ if (rsLambda == nullptr) {
2254
+ // This only occurs when destructors are calling into Rust free/drop,
2255
+ // which causes the JS callback to be dropped.
2256
+ return;
2257
+ }
2258
+
2259
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
2260
+ // are all in the lambda.
2261
+ rsLambda(rs_handle);
2262
+ }
2263
+
2264
+ static UniffiCallbackInterfaceFree
2265
+ makeCallbackFunction( // uniffi::breez_sdk_spark::st::vtablecallbackinterfacepasskeyprfprovider::vtablecallbackinterfacepasskeyprfprovider::free
2266
+ jsi::Runtime &rt,
2267
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
2268
+ const jsi::Value &value) {
2269
+ if (rsLambda != nullptr) {
2270
+ // `makeCallbackFunction` is called in two circumstances:
2271
+ //
2272
+ // 1. at startup, when initializing callback interface vtables.
2273
+ // 2. when polling futures. This happens at least once per future that is
2274
+ // exposed to Javascript. We know that this is always the same function,
2275
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
2276
+ //
2277
+ // We can therefore return the callback function without making anything
2278
+ // new if we've been initialized already.
2279
+ return callback;
2280
+ }
2281
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
2282
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
2283
+ rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
2284
+ // We immediately make a lambda which will do the work of transforming the
2285
+ // arguments into JSI values and calling the callback.
2286
+ uniffi_runtime::UniffiCallFunc jsLambda =
2287
+ [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable {
2288
+ body(rt, callInvoker, callbackValue, rs_handle);
2289
+ };
2290
+ // We'll then call that lambda from the callInvoker which will
2291
+ // look after calling it on the correct thread.
2292
+
2293
+ callInvoker->invokeNonBlocking(rt, jsLambda);
2294
+ };
2295
+ return callback;
2296
+ }
2297
+
2298
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
2299
+ // happens when the jsi::Runtime is being destroyed.
2300
+ static void cleanup() {
2301
+ // The lambda holds a reference to the the Runtime, so when this is nulled
2302
+ // out, then the pointer will no longer be left dangling.
2303
+ rsLambda = nullptr;
2304
+ }
2305
+ } // namespace
2306
+ // uniffi::breez_sdk_spark::st::vtablecallbackinterfacepasskeyprfprovider::vtablecallbackinterfacepasskeyprfprovider::free
2307
+
2146
2308
  // Callback function:
2147
2309
  // uniffi::breez_sdk_spark::st::vtablecallbackinterfacepaymentobserver::vtablecallbackinterfacepaymentobserver::free::UniffiCallbackInterfaceFree
2148
2310
  //
@@ -3445,11 +3607,10 @@ static void body(jsi::Runtime &rt,
3445
3607
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_event,
3446
3608
  js_uniffiFutureCallback, js_uniffiCallbackData);
3447
3609
 
3448
- // return type is MutReference(Struct("ForeignFuture"))
3449
3610
  // Finally, we need to copy the return value back into the Rust pointer.
3450
- *rs_uniffiOutReturn =
3451
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
3452
- rt, callInvoker, uniffiResult);
3611
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
3612
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
3613
+ uniffiResult);
3453
3614
  } catch (const jsi::JSError &error) {
3454
3615
  std::cout
3455
3616
  << "Error in callback UniffiCallbackInterfaceEventListenerMethod0: "
@@ -3721,11 +3882,10 @@ static void body(jsi::Runtime &rt,
3721
3882
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_address,
3722
3883
  js_uniffiFutureCallback, js_uniffiCallbackData);
3723
3884
 
3724
- // return type is MutReference(Struct("ForeignFuture"))
3725
3885
  // Finally, we need to copy the return value back into the Rust pointer.
3726
- *rs_uniffiOutReturn =
3727
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
3728
- rt, callInvoker, uniffiResult);
3886
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
3887
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
3888
+ uniffiResult);
3729
3889
  } catch (const jsi::JSError &error) {
3730
3890
  std::cout << "Error in callback "
3731
3891
  "UniffiCallbackInterfaceBitcoinChainServiceMethod0: "
@@ -3867,11 +4027,10 @@ static void body(jsi::Runtime &rt,
3867
4027
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid,
3868
4028
  js_uniffiFutureCallback, js_uniffiCallbackData);
3869
4029
 
3870
- // return type is MutReference(Struct("ForeignFuture"))
3871
4030
  // Finally, we need to copy the return value back into the Rust pointer.
3872
- *rs_uniffiOutReturn =
3873
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
3874
- rt, callInvoker, uniffiResult);
4031
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4032
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4033
+ uniffiResult);
3875
4034
  } catch (const jsi::JSError &error) {
3876
4035
  std::cout << "Error in callback "
3877
4036
  "UniffiCallbackInterfaceBitcoinChainServiceMethod1: "
@@ -4013,11 +4172,10 @@ static void body(jsi::Runtime &rt,
4013
4172
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid,
4014
4173
  js_uniffiFutureCallback, js_uniffiCallbackData);
4015
4174
 
4016
- // return type is MutReference(Struct("ForeignFuture"))
4017
4175
  // Finally, we need to copy the return value back into the Rust pointer.
4018
- *rs_uniffiOutReturn =
4019
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
4020
- rt, callInvoker, uniffiResult);
4176
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4177
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4178
+ uniffiResult);
4021
4179
  } catch (const jsi::JSError &error) {
4022
4180
  std::cout << "Error in callback "
4023
4181
  "UniffiCallbackInterfaceBitcoinChainServiceMethod2: "
@@ -4158,11 +4316,10 @@ static void body(jsi::Runtime &rt,
4158
4316
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_tx,
4159
4317
  js_uniffiFutureCallback, js_uniffiCallbackData);
4160
4318
 
4161
- // return type is MutReference(Struct("ForeignFuture"))
4162
4319
  // Finally, we need to copy the return value back into the Rust pointer.
4163
- *rs_uniffiOutReturn =
4164
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
4165
- rt, callInvoker, uniffiResult);
4320
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4321
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4322
+ uniffiResult);
4166
4323
  } catch (const jsi::JSError &error) {
4167
4324
  std::cout << "Error in callback "
4168
4325
  "UniffiCallbackInterfaceBitcoinChainServiceMethod3: "
@@ -4300,11 +4457,10 @@ static void body(jsi::Runtime &rt,
4300
4457
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
4301
4458
  js_uniffiCallbackData);
4302
4459
 
4303
- // return type is MutReference(Struct("ForeignFuture"))
4304
4460
  // Finally, we need to copy the return value back into the Rust pointer.
4305
- *rs_uniffiOutReturn =
4306
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
4307
- rt, callInvoker, uniffiResult);
4461
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4462
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4463
+ uniffiResult);
4308
4464
  } catch (const jsi::JSError &error) {
4309
4465
  std::cout << "Error in callback "
4310
4466
  "UniffiCallbackInterfaceBitcoinChainServiceMethod4: "
@@ -4442,9 +4598,7 @@ static void body(jsi::Runtime &rt,
4442
4598
  return;
4443
4599
  }
4444
4600
 
4445
- // return type is MutReference(RustBuffer(Some(ExternalFfiMetadata { name:
4446
- // "PublicKeyBytes", module_path: "breez_sdk_spark" }))) Finally, we need to
4447
- // copy the return value back into the Rust pointer.
4601
+ // Finally, we need to copy the return value back into the Rust pointer.
4448
4602
  *rs_uniffiOutReturn =
4449
4603
  uniffi::breez_sdk_spark::Bridging<ReferenceHolder<RustBuffer>>::fromJs(
4450
4604
  rt, callInvoker, uniffiResult);
@@ -4580,11 +4734,10 @@ static void body(jsi::Runtime &rt,
4580
4734
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_path,
4581
4735
  js_uniffiFutureCallback, js_uniffiCallbackData);
4582
4736
 
4583
- // return type is MutReference(Struct("ForeignFuture"))
4584
4737
  // Finally, we need to copy the return value back into the Rust pointer.
4585
- *rs_uniffiOutReturn =
4586
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
4587
- rt, callInvoker, uniffiResult);
4738
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4739
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4740
+ uniffiResult);
4588
4741
  } catch (const jsi::JSError &error) {
4589
4742
  std::cout
4590
4743
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod1: "
@@ -4728,11 +4881,10 @@ static void body(jsi::Runtime &rt,
4728
4881
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
4729
4882
  js_uniffiFutureCallback, js_uniffiCallbackData);
4730
4883
 
4731
- // return type is MutReference(Struct("ForeignFuture"))
4732
4884
  // Finally, we need to copy the return value back into the Rust pointer.
4733
- *rs_uniffiOutReturn =
4734
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
4735
- rt, callInvoker, uniffiResult);
4885
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
4886
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
4887
+ uniffiResult);
4736
4888
  } catch (const jsi::JSError &error) {
4737
4889
  std::cout
4738
4890
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod2: "
@@ -4877,11 +5029,10 @@ static void body(jsi::Runtime &rt,
4877
5029
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
4878
5030
  js_uniffiFutureCallback, js_uniffiCallbackData);
4879
5031
 
4880
- // return type is MutReference(Struct("ForeignFuture"))
4881
5032
  // Finally, we need to copy the return value back into the Rust pointer.
4882
- *rs_uniffiOutReturn =
4883
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
4884
- rt, callInvoker, uniffiResult);
5033
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
5034
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
5035
+ uniffiResult);
4885
5036
  } catch (const jsi::JSError &error) {
4886
5037
  std::cout
4887
5038
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod3: "
@@ -5026,11 +5177,10 @@ static void body(jsi::Runtime &rt,
5026
5177
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
5027
5178
  js_uniffiFutureCallback, js_uniffiCallbackData);
5028
5179
 
5029
- // return type is MutReference(Struct("ForeignFuture"))
5030
5180
  // Finally, we need to copy the return value back into the Rust pointer.
5031
- *rs_uniffiOutReturn =
5032
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5033
- rt, callInvoker, uniffiResult);
5181
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
5182
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
5183
+ uniffiResult);
5034
5184
  } catch (const jsi::JSError &error) {
5035
5185
  std::cout
5036
5186
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod4: "
@@ -5175,11 +5325,10 @@ static void body(jsi::Runtime &rt,
5175
5325
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
5176
5326
  js_uniffiFutureCallback, js_uniffiCallbackData);
5177
5327
 
5178
- // return type is MutReference(Struct("ForeignFuture"))
5179
5328
  // Finally, we need to copy the return value back into the Rust pointer.
5180
- *rs_uniffiOutReturn =
5181
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5182
- rt, callInvoker, uniffiResult);
5329
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
5330
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
5331
+ uniffiResult);
5183
5332
  } catch (const jsi::JSError &error) {
5184
5333
  std::cout
5185
5334
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod5: "
@@ -5324,11 +5473,10 @@ static void body(jsi::Runtime &rt,
5324
5473
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_hash, js_path,
5325
5474
  js_uniffiFutureCallback, js_uniffiCallbackData);
5326
5475
 
5327
- // return type is MutReference(Struct("ForeignFuture"))
5328
5476
  // Finally, we need to copy the return value back into the Rust pointer.
5329
- *rs_uniffiOutReturn =
5330
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5331
- rt, callInvoker, uniffiResult);
5477
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
5478
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
5479
+ uniffiResult);
5332
5480
  } catch (const jsi::JSError &error) {
5333
5481
  std::cout
5334
5482
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod6: "
@@ -5473,11 +5621,10 @@ static void body(jsi::Runtime &rt,
5473
5621
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
5474
5622
  js_uniffiFutureCallback, js_uniffiCallbackData);
5475
5623
 
5476
- // return type is MutReference(Struct("ForeignFuture"))
5477
5624
  // Finally, we need to copy the return value back into the Rust pointer.
5478
- *rs_uniffiOutReturn =
5479
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5480
- rt, callInvoker, uniffiResult);
5625
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
5626
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
5627
+ uniffiResult);
5481
5628
  } catch (const jsi::JSError &error) {
5482
5629
  std::cout
5483
5630
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod7: "
@@ -5616,11 +5763,10 @@ static void body(jsi::Runtime &rt,
5616
5763
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
5617
5764
  js_uniffiCallbackData);
5618
5765
 
5619
- // return type is MutReference(Struct("ForeignFuture"))
5620
5766
  // Finally, we need to copy the return value back into the Rust pointer.
5621
- *rs_uniffiOutReturn =
5622
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5623
- rt, callInvoker, uniffiResult);
5767
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
5768
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
5769
+ uniffiResult);
5624
5770
  } catch (const jsi::JSError &error) {
5625
5771
  std::cout
5626
5772
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod8: "
@@ -5760,11 +5906,10 @@ static void body(jsi::Runtime &rt,
5760
5906
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
5761
5907
  js_uniffiFutureCallback, js_uniffiCallbackData);
5762
5908
 
5763
- // return type is MutReference(Struct("ForeignFuture"))
5764
5909
  // Finally, we need to copy the return value back into the Rust pointer.
5765
- *rs_uniffiOutReturn =
5766
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5767
- rt, callInvoker, uniffiResult);
5910
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
5911
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
5912
+ uniffiResult);
5768
5913
  } catch (const jsi::JSError &error) {
5769
5914
  std::cout
5770
5915
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod9: "
@@ -5902,11 +6047,10 @@ static void body(jsi::Runtime &rt,
5902
6047
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
5903
6048
  js_uniffiCallbackData);
5904
6049
 
5905
- // return type is MutReference(Struct("ForeignFuture"))
5906
6050
  // Finally, we need to copy the return value back into the Rust pointer.
5907
- *rs_uniffiOutReturn =
5908
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5909
- rt, callInvoker, uniffiResult);
6051
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
6052
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
6053
+ uniffiResult);
5910
6054
  } catch (const jsi::JSError &error) {
5911
6055
  std::cout
5912
6056
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod10: "
@@ -6046,11 +6190,10 @@ static void body(jsi::Runtime &rt,
6046
6190
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_index,
6047
6191
  js_uniffiFutureCallback, js_uniffiCallbackData);
6048
6192
 
6049
- // return type is MutReference(Struct("ForeignFuture"))
6050
6193
  // Finally, we need to copy the return value back into the Rust pointer.
6051
- *rs_uniffiOutReturn =
6052
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6053
- rt, callInvoker, uniffiResult);
6194
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
6195
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
6196
+ uniffiResult);
6054
6197
  } catch (const jsi::JSError &error) {
6055
6198
  std::cout
6056
6199
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod11: "
@@ -6191,11 +6334,10 @@ static void body(jsi::Runtime &rt,
6191
6334
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_index,
6192
6335
  js_uniffiFutureCallback, js_uniffiCallbackData);
6193
6336
 
6194
- // return type is MutReference(Struct("ForeignFuture"))
6195
6337
  // Finally, we need to copy the return value back into the Rust pointer.
6196
- *rs_uniffiOutReturn =
6197
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6198
- rt, callInvoker, uniffiResult);
6338
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
6339
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
6340
+ uniffiResult);
6199
6341
  } catch (const jsi::JSError &error) {
6200
6342
  std::cout
6201
6343
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod12: "
@@ -6336,11 +6478,10 @@ static void body(jsi::Runtime &rt,
6336
6478
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_index,
6337
6479
  js_uniffiFutureCallback, js_uniffiCallbackData);
6338
6480
 
6339
- // return type is MutReference(Struct("ForeignFuture"))
6340
6481
  // Finally, we need to copy the return value back into the Rust pointer.
6341
- *rs_uniffiOutReturn =
6342
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6343
- rt, callInvoker, uniffiResult);
6482
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
6483
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
6484
+ uniffiResult);
6344
6485
  } catch (const jsi::JSError &error) {
6345
6486
  std::cout
6346
6487
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod13: "
@@ -6485,11 +6626,10 @@ static void body(jsi::Runtime &rt,
6485
6626
  cb.call(rt, js_uniffiHandle, js_signingKey, js_newSigningKey,
6486
6627
  js_uniffiFutureCallback, js_uniffiCallbackData);
6487
6628
 
6488
- // return type is MutReference(Struct("ForeignFuture"))
6489
6629
  // Finally, we need to copy the return value back into the Rust pointer.
6490
- *rs_uniffiOutReturn =
6491
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6492
- rt, callInvoker, uniffiResult);
6630
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
6631
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
6632
+ uniffiResult);
6493
6633
  } catch (const jsi::JSError &error) {
6494
6634
  std::cout
6495
6635
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod14: "
@@ -6638,11 +6778,10 @@ static void body(jsi::Runtime &rt,
6638
6778
  cb.call(rt, js_uniffiHandle, js_secret, js_threshold, js_numShares,
6639
6779
  js_uniffiFutureCallback, js_uniffiCallbackData);
6640
6780
 
6641
- // return type is MutReference(Struct("ForeignFuture"))
6642
6781
  // Finally, we need to copy the return value back into the Rust pointer.
6643
- *rs_uniffiOutReturn =
6644
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6645
- rt, callInvoker, uniffiResult);
6782
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
6783
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
6784
+ uniffiResult);
6646
6785
  } catch (const jsi::JSError &error) {
6647
6786
  std::cout
6648
6787
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod15: "
@@ -6790,11 +6929,10 @@ static void body(jsi::Runtime &rt,
6790
6929
  cb.call(rt, js_uniffiHandle, js_encryptedSecret, js_receiverPublicKey,
6791
6930
  js_uniffiFutureCallback, js_uniffiCallbackData);
6792
6931
 
6793
- // return type is MutReference(Struct("ForeignFuture"))
6794
6932
  // Finally, we need to copy the return value back into the Rust pointer.
6795
- *rs_uniffiOutReturn =
6796
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6797
- rt, callInvoker, uniffiResult);
6933
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
6934
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
6935
+ uniffiResult);
6798
6936
  } catch (const jsi::JSError &error) {
6799
6937
  std::cout
6800
6938
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod16: "
@@ -6938,11 +7076,10 @@ static void body(jsi::Runtime &rt,
6938
7076
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_secret,
6939
7077
  js_uniffiFutureCallback, js_uniffiCallbackData);
6940
7078
 
6941
- // return type is MutReference(Struct("ForeignFuture"))
6942
7079
  // Finally, we need to copy the return value back into the Rust pointer.
6943
- *rs_uniffiOutReturn =
6944
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6945
- rt, callInvoker, uniffiResult);
7080
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
7081
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
7082
+ uniffiResult);
6946
7083
  } catch (const jsi::JSError &error) {
6947
7084
  std::cout
6948
7085
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod17: "
@@ -7083,11 +7220,10 @@ static void body(jsi::Runtime &rt,
7083
7220
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
7084
7221
  js_uniffiFutureCallback, js_uniffiCallbackData);
7085
7222
 
7086
- // return type is MutReference(Struct("ForeignFuture"))
7087
7223
  // Finally, we need to copy the return value back into the Rust pointer.
7088
- *rs_uniffiOutReturn =
7089
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7090
- rt, callInvoker, uniffiResult);
7224
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
7225
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
7226
+ uniffiResult);
7091
7227
  } catch (const jsi::JSError &error) {
7092
7228
  std::cout
7093
7229
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod18: "
@@ -7228,11 +7364,10 @@ static void body(jsi::Runtime &rt,
7228
7364
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
7229
7365
  js_uniffiFutureCallback, js_uniffiCallbackData);
7230
7366
 
7231
- // return type is MutReference(Struct("ForeignFuture"))
7232
7367
  // Finally, we need to copy the return value back into the Rust pointer.
7233
- *rs_uniffiOutReturn =
7234
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7235
- rt, callInvoker, uniffiResult);
7368
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
7369
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
7370
+ uniffiResult);
7236
7371
  } catch (const jsi::JSError &error) {
7237
7372
  std::cout
7238
7373
  << "Error in callback UniffiCallbackInterfaceExternalSignerMethod19: "
@@ -7370,11 +7505,10 @@ static void body(jsi::Runtime &rt,
7370
7505
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
7371
7506
  js_uniffiCallbackData);
7372
7507
 
7373
- // return type is MutReference(Struct("ForeignFuture"))
7374
7508
  // Finally, we need to copy the return value back into the Rust pointer.
7375
- *rs_uniffiOutReturn =
7376
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7377
- rt, callInvoker, uniffiResult);
7509
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
7510
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
7511
+ uniffiResult);
7378
7512
  } catch (const jsi::JSError &error) {
7379
7513
  std::cout << "Error in callback UniffiCallbackInterfaceFiatServiceMethod0: "
7380
7514
  << error.what() << std::endl;
@@ -7509,11 +7643,10 @@ static void body(jsi::Runtime &rt,
7509
7643
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
7510
7644
  js_uniffiCallbackData);
7511
7645
 
7512
- // return type is MutReference(Struct("ForeignFuture"))
7513
7646
  // Finally, we need to copy the return value back into the Rust pointer.
7514
- *rs_uniffiOutReturn =
7515
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7516
- rt, callInvoker, uniffiResult);
7647
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
7648
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
7649
+ uniffiResult);
7517
7650
  } catch (const jsi::JSError &error) {
7518
7651
  std::cout << "Error in callback UniffiCallbackInterfaceFiatServiceMethod1: "
7519
7652
  << error.what() << std::endl;
@@ -7594,10 +7727,10 @@ static void cleanup() {
7594
7727
  }
7595
7728
  } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacefiatservicemethod1
7596
7729
  // Implementation of callback function calling from Rust to JS
7597
- // CallbackInterfacePaymentObserverMethod0
7730
+ // CallbackInterfacePasskeyPrfProviderMethod0
7598
7731
 
7599
7732
  // Callback function:
7600
- // uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0::UniffiCallbackInterfacePaymentObserverMethod0
7733
+ // uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod0::UniffiCallbackInterfacePasskeyPrfProviderMethod0
7601
7734
  //
7602
7735
  // We have the following constraints:
7603
7736
  // - we need to pass a function pointer to Rust.
@@ -7610,13 +7743,15 @@ static void cleanup() {
7610
7743
  //
7611
7744
  // We then give the `callback` function pointer to Rust which will call the
7612
7745
  // lambda sometime in the future.
7613
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0 {
7746
+ namespace uniffi::breez_sdk_spark::cb::
7747
+ callbackinterfacepasskeyprfprovidermethod0 {
7614
7748
  using namespace facebook;
7615
7749
 
7616
7750
  // We need to store a lambda in a global so we can call it from
7617
7751
  // a function pointer. The function pointer is passed to Rust.
7618
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
7619
- uint64_t, UniffiForeignFuture *)>
7752
+ static std::function<void(uint64_t, RustBuffer,
7753
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
7754
+ UniffiForeignFuture *)>
7620
7755
  rsLambda = nullptr;
7621
7756
 
7622
7757
  // This is the main body of the callback. It's called from the lambda,
@@ -7624,8 +7759,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
7624
7759
  static void body(jsi::Runtime &rt,
7625
7760
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7626
7761
  std::shared_ptr<jsi::Value> callbackValue,
7627
- uint64_t rs_uniffiHandle, RustBuffer rs_payments,
7628
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
7762
+ uint64_t rs_uniffiHandle, RustBuffer rs_salt,
7763
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7629
7764
  uint64_t rs_uniffiCallbackData,
7630
7765
  UniffiForeignFuture *rs_uniffiOutReturn) {
7631
7766
 
@@ -7633,11 +7768,11 @@ static void body(jsi::Runtime &rt,
7633
7768
  // We'll use the Bridging class to do this…
7634
7769
  auto js_uniffiHandle =
7635
7770
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
7636
- auto js_payments = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
7637
- rt, callInvoker, rs_payments);
7638
- auto js_uniffiFutureCallback =
7639
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
7640
- rt, callInvoker, rs_uniffiFutureCallback);
7771
+ auto js_salt = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
7772
+ rt, callInvoker, rs_salt);
7773
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
7774
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
7775
+ rs_uniffiFutureCallback);
7641
7776
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
7642
7777
  rt, callInvoker, rs_uniffiCallbackData);
7643
7778
 
@@ -7647,26 +7782,26 @@ static void body(jsi::Runtime &rt,
7647
7782
  try {
7648
7783
  // Getting the callback function
7649
7784
  auto cb = callbackValue->asObject(rt).asFunction(rt);
7650
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_payments,
7785
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_salt,
7651
7786
  js_uniffiFutureCallback, js_uniffiCallbackData);
7652
7787
 
7653
- // return type is MutReference(Struct("ForeignFuture"))
7654
7788
  // Finally, we need to copy the return value back into the Rust pointer.
7655
- *rs_uniffiOutReturn =
7656
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7657
- rt, callInvoker, uniffiResult);
7789
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
7790
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
7791
+ uniffiResult);
7658
7792
  } catch (const jsi::JSError &error) {
7659
- std::cout
7660
- << "Error in callback UniffiCallbackInterfacePaymentObserverMethod0: "
7661
- << error.what() << std::endl;
7793
+ std::cout << "Error in callback "
7794
+ "UniffiCallbackInterfacePasskeyPrfProviderMethod0: "
7795
+ << error.what() << std::endl;
7662
7796
  throw error;
7663
7797
  }
7664
7798
  }
7665
7799
 
7666
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_payments,
7667
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
7668
- uint64_t rs_uniffiCallbackData,
7669
- UniffiForeignFuture *rs_uniffiOutReturn) {
7800
+ static void
7801
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_salt,
7802
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7803
+ uint64_t rs_uniffiCallbackData,
7804
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7670
7805
  // If the runtime has shutdown, then there is no point in trying to
7671
7806
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
7672
7807
  //
@@ -7682,12 +7817,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_payments,
7682
7817
 
7683
7818
  // The runtime, the actual callback jsi::funtion, and the callInvoker
7684
7819
  // are all in the lambda.
7685
- rsLambda(rs_uniffiHandle, rs_payments, rs_uniffiFutureCallback,
7820
+ rsLambda(rs_uniffiHandle, rs_salt, rs_uniffiFutureCallback,
7686
7821
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7687
7822
  }
7688
7823
 
7689
- static UniffiCallbackInterfacePaymentObserverMethod0
7690
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0
7824
+ static UniffiCallbackInterfacePasskeyPrfProviderMethod0
7825
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod0
7691
7826
  jsi::Runtime &rt,
7692
7827
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7693
7828
  const jsi::Value &value) {
@@ -7706,17 +7841,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacepaymentob
7706
7841
  auto callbackFunction = value.asObject(rt).asFunction(rt);
7707
7842
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
7708
7843
  rsLambda = [&rt, callInvoker, callbackValue](
7709
- uint64_t rs_uniffiHandle, RustBuffer rs_payments,
7710
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
7844
+ uint64_t rs_uniffiHandle, RustBuffer rs_salt,
7845
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7711
7846
  uint64_t rs_uniffiCallbackData,
7712
7847
  UniffiForeignFuture *rs_uniffiOutReturn) {
7713
7848
  // We immediately make a lambda which will do the work of transforming the
7714
7849
  // arguments into JSI values and calling the callback.
7715
7850
  uniffi_runtime::UniffiCallFunc jsLambda =
7716
- [callInvoker, callbackValue, rs_uniffiHandle, rs_payments,
7851
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_salt,
7717
7852
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
7718
7853
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
7719
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_payments,
7854
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_salt,
7720
7855
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
7721
7856
  rs_uniffiOutReturn);
7722
7857
  };
@@ -7735,12 +7870,12 @@ static void cleanup() {
7735
7870
  rsLambda = nullptr;
7736
7871
  }
7737
7872
  } // namespace
7738
- // uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0
7873
+ // uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod0
7739
7874
  // Implementation of callback function calling from Rust to JS
7740
- // CallbackInterfaceRestClientMethod0
7875
+ // CallbackInterfacePasskeyPrfProviderMethod1
7741
7876
 
7742
7877
  // Callback function:
7743
- // uniffi::breez_sdk_spark::cb::callbackinterfacerestclientmethod0::UniffiCallbackInterfaceRestClientMethod0
7878
+ // uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod1::UniffiCallbackInterfacePasskeyPrfProviderMethod1
7744
7879
  //
7745
7880
  // We have the following constraints:
7746
7881
  // - we need to pass a function pointer to Rust.
@@ -7753,13 +7888,13 @@ static void cleanup() {
7753
7888
  //
7754
7889
  // We then give the `callback` function pointer to Rust which will call the
7755
7890
  // lambda sometime in the future.
7756
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacerestclientmethod0 {
7891
+ namespace uniffi::breez_sdk_spark::cb::
7892
+ callbackinterfacepasskeyprfprovidermethod1 {
7757
7893
  using namespace facebook;
7758
7894
 
7759
7895
  // We need to store a lambda in a global so we can call it from
7760
7896
  // a function pointer. The function pointer is passed to Rust.
7761
- static std::function<void(uint64_t, RustBuffer, RustBuffer,
7762
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
7897
+ static std::function<void(uint64_t, UniffiForeignFutureCompleteI8, uint64_t,
7763
7898
  UniffiForeignFuture *)>
7764
7899
  rsLambda = nullptr;
7765
7900
 
@@ -7768,9 +7903,8 @@ static std::function<void(uint64_t, RustBuffer, RustBuffer,
7768
7903
  static void body(jsi::Runtime &rt,
7769
7904
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7770
7905
  std::shared_ptr<jsi::Value> callbackValue,
7771
- uint64_t rs_uniffiHandle, RustBuffer rs_url,
7772
- RustBuffer rs_headers,
7773
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7906
+ uint64_t rs_uniffiHandle,
7907
+ UniffiForeignFutureCompleteI8 rs_uniffiFutureCallback,
7774
7908
  uint64_t rs_uniffiCallbackData,
7775
7909
  UniffiForeignFuture *rs_uniffiOutReturn) {
7776
7910
 
@@ -7778,13 +7912,9 @@ static void body(jsi::Runtime &rt,
7778
7912
  // We'll use the Bridging class to do this…
7779
7913
  auto js_uniffiHandle =
7780
7914
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
7781
- auto js_url = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
7782
- rt, callInvoker, rs_url);
7783
- auto js_headers = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
7784
- rt, callInvoker, rs_headers);
7785
- auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
7786
- UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
7787
- rs_uniffiFutureCallback);
7915
+ auto js_uniffiFutureCallback =
7916
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteI8>::toJs(
7917
+ rt, callInvoker, rs_uniffiFutureCallback);
7788
7918
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
7789
7919
  rt, callInvoker, rs_uniffiCallbackData);
7790
7920
 
@@ -7794,25 +7924,311 @@ static void body(jsi::Runtime &rt,
7794
7924
  try {
7795
7925
  // Getting the callback function
7796
7926
  auto cb = callbackValue->asObject(rt).asFunction(rt);
7797
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_url, js_headers,
7798
- js_uniffiFutureCallback, js_uniffiCallbackData);
7927
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
7928
+ js_uniffiCallbackData);
7799
7929
 
7800
- // return type is MutReference(Struct("ForeignFuture"))
7801
7930
  // Finally, we need to copy the return value back into the Rust pointer.
7802
- *rs_uniffiOutReturn =
7803
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7804
- rt, callInvoker, uniffiResult);
7931
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
7932
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
7933
+ uniffiResult);
7805
7934
  } catch (const jsi::JSError &error) {
7806
- std::cout << "Error in callback UniffiCallbackInterfaceRestClientMethod0: "
7935
+ std::cout << "Error in callback "
7936
+ "UniffiCallbackInterfacePasskeyPrfProviderMethod1: "
7807
7937
  << error.what() << std::endl;
7808
7938
  throw error;
7809
7939
  }
7810
7940
  }
7811
7941
 
7812
- static void
7813
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_url, RustBuffer rs_headers,
7814
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7815
- uint64_t rs_uniffiCallbackData,
7942
+ static void callback(uint64_t rs_uniffiHandle,
7943
+ UniffiForeignFutureCompleteI8 rs_uniffiFutureCallback,
7944
+ uint64_t rs_uniffiCallbackData,
7945
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7946
+ // If the runtime has shutdown, then there is no point in trying to
7947
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
7948
+ //
7949
+ // Answer: the module destructor calls into callback `cleanup` method,
7950
+ // which nulls out the rsLamda.
7951
+ //
7952
+ // If rsLamda is null, then there is no runtime to call into.
7953
+ if (rsLambda == nullptr) {
7954
+ // This only occurs when destructors are calling into Rust free/drop,
7955
+ // which causes the JS callback to be dropped.
7956
+ return;
7957
+ }
7958
+
7959
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
7960
+ // are all in the lambda.
7961
+ rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
7962
+ rs_uniffiOutReturn);
7963
+ }
7964
+
7965
+ static UniffiCallbackInterfacePasskeyPrfProviderMethod1
7966
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod1
7967
+ jsi::Runtime &rt,
7968
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7969
+ const jsi::Value &value) {
7970
+ if (rsLambda != nullptr) {
7971
+ // `makeCallbackFunction` is called in two circumstances:
7972
+ //
7973
+ // 1. at startup, when initializing callback interface vtables.
7974
+ // 2. when polling futures. This happens at least once per future that is
7975
+ // exposed to Javascript. We know that this is always the same function,
7976
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
7977
+ //
7978
+ // We can therefore return the callback function without making anything
7979
+ // new if we've been initialized already.
7980
+ return callback;
7981
+ }
7982
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
7983
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
7984
+ rsLambda = [&rt, callInvoker, callbackValue](
7985
+ uint64_t rs_uniffiHandle,
7986
+ UniffiForeignFutureCompleteI8 rs_uniffiFutureCallback,
7987
+ uint64_t rs_uniffiCallbackData,
7988
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7989
+ // We immediately make a lambda which will do the work of transforming the
7990
+ // arguments into JSI values and calling the callback.
7991
+ uniffi_runtime::UniffiCallFunc jsLambda =
7992
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
7993
+ rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
7994
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle,
7995
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
7996
+ rs_uniffiOutReturn);
7997
+ };
7998
+ // We'll then call that lambda from the callInvoker which will
7999
+ // look after calling it on the correct thread.
8000
+ callInvoker->invokeBlocking(rt, jsLambda);
8001
+ };
8002
+ return callback;
8003
+ }
8004
+
8005
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
8006
+ // happens when the jsi::Runtime is being destroyed.
8007
+ static void cleanup() {
8008
+ // The lambda holds a reference to the the Runtime, so when this is nulled
8009
+ // out, then the pointer will no longer be left dangling.
8010
+ rsLambda = nullptr;
8011
+ }
8012
+ } // namespace
8013
+ // uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod1
8014
+ // Implementation of callback function calling from Rust to JS
8015
+ // CallbackInterfacePaymentObserverMethod0
8016
+
8017
+ // Callback function:
8018
+ // uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0::UniffiCallbackInterfacePaymentObserverMethod0
8019
+ //
8020
+ // We have the following constraints:
8021
+ // - we need to pass a function pointer to Rust.
8022
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
8023
+ // - function pointers can't store state, so we can't use a lamda.
8024
+ //
8025
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
8026
+ // function calls the lambda, which itself calls the `body` which then calls
8027
+ // into JS.
8028
+ //
8029
+ // We then give the `callback` function pointer to Rust which will call the
8030
+ // lambda sometime in the future.
8031
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0 {
8032
+ using namespace facebook;
8033
+
8034
+ // We need to store a lambda in a global so we can call it from
8035
+ // a function pointer. The function pointer is passed to Rust.
8036
+ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
8037
+ uint64_t, UniffiForeignFuture *)>
8038
+ rsLambda = nullptr;
8039
+
8040
+ // This is the main body of the callback. It's called from the lambda,
8041
+ // which itself is called from the callback function which is passed to Rust.
8042
+ static void body(jsi::Runtime &rt,
8043
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
8044
+ std::shared_ptr<jsi::Value> callbackValue,
8045
+ uint64_t rs_uniffiHandle, RustBuffer rs_payments,
8046
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
8047
+ uint64_t rs_uniffiCallbackData,
8048
+ UniffiForeignFuture *rs_uniffiOutReturn) {
8049
+
8050
+ // Convert the arguments from Rust, into jsi::Values.
8051
+ // We'll use the Bridging class to do this…
8052
+ auto js_uniffiHandle =
8053
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
8054
+ auto js_payments = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
8055
+ rt, callInvoker, rs_payments);
8056
+ auto js_uniffiFutureCallback =
8057
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
8058
+ rt, callInvoker, rs_uniffiFutureCallback);
8059
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
8060
+ rt, callInvoker, rs_uniffiCallbackData);
8061
+
8062
+ // Now we are ready to call the callback.
8063
+ // We are already on the JS thread, because this `body` function was
8064
+ // invoked from the CallInvoker.
8065
+ try {
8066
+ // Getting the callback function
8067
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
8068
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_payments,
8069
+ js_uniffiFutureCallback, js_uniffiCallbackData);
8070
+
8071
+ // Finally, we need to copy the return value back into the Rust pointer.
8072
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
8073
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
8074
+ uniffiResult);
8075
+ } catch (const jsi::JSError &error) {
8076
+ std::cout
8077
+ << "Error in callback UniffiCallbackInterfacePaymentObserverMethod0: "
8078
+ << error.what() << std::endl;
8079
+ throw error;
8080
+ }
8081
+ }
8082
+
8083
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_payments,
8084
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
8085
+ uint64_t rs_uniffiCallbackData,
8086
+ UniffiForeignFuture *rs_uniffiOutReturn) {
8087
+ // If the runtime has shutdown, then there is no point in trying to
8088
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
8089
+ //
8090
+ // Answer: the module destructor calls into callback `cleanup` method,
8091
+ // which nulls out the rsLamda.
8092
+ //
8093
+ // If rsLamda is null, then there is no runtime to call into.
8094
+ if (rsLambda == nullptr) {
8095
+ // This only occurs when destructors are calling into Rust free/drop,
8096
+ // which causes the JS callback to be dropped.
8097
+ return;
8098
+ }
8099
+
8100
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
8101
+ // are all in the lambda.
8102
+ rsLambda(rs_uniffiHandle, rs_payments, rs_uniffiFutureCallback,
8103
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
8104
+ }
8105
+
8106
+ static UniffiCallbackInterfacePaymentObserverMethod0
8107
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0
8108
+ jsi::Runtime &rt,
8109
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
8110
+ const jsi::Value &value) {
8111
+ if (rsLambda != nullptr) {
8112
+ // `makeCallbackFunction` is called in two circumstances:
8113
+ //
8114
+ // 1. at startup, when initializing callback interface vtables.
8115
+ // 2. when polling futures. This happens at least once per future that is
8116
+ // exposed to Javascript. We know that this is always the same function,
8117
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
8118
+ //
8119
+ // We can therefore return the callback function without making anything
8120
+ // new if we've been initialized already.
8121
+ return callback;
8122
+ }
8123
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
8124
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
8125
+ rsLambda = [&rt, callInvoker, callbackValue](
8126
+ uint64_t rs_uniffiHandle, RustBuffer rs_payments,
8127
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
8128
+ uint64_t rs_uniffiCallbackData,
8129
+ UniffiForeignFuture *rs_uniffiOutReturn) {
8130
+ // We immediately make a lambda which will do the work of transforming the
8131
+ // arguments into JSI values and calling the callback.
8132
+ uniffi_runtime::UniffiCallFunc jsLambda =
8133
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_payments,
8134
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
8135
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
8136
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_payments,
8137
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
8138
+ rs_uniffiOutReturn);
8139
+ };
8140
+ // We'll then call that lambda from the callInvoker which will
8141
+ // look after calling it on the correct thread.
8142
+ callInvoker->invokeBlocking(rt, jsLambda);
8143
+ };
8144
+ return callback;
8145
+ }
8146
+
8147
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
8148
+ // happens when the jsi::Runtime is being destroyed.
8149
+ static void cleanup() {
8150
+ // The lambda holds a reference to the the Runtime, so when this is nulled
8151
+ // out, then the pointer will no longer be left dangling.
8152
+ rsLambda = nullptr;
8153
+ }
8154
+ } // namespace
8155
+ // uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0
8156
+ // Implementation of callback function calling from Rust to JS
8157
+ // CallbackInterfaceRestClientMethod0
8158
+
8159
+ // Callback function:
8160
+ // uniffi::breez_sdk_spark::cb::callbackinterfacerestclientmethod0::UniffiCallbackInterfaceRestClientMethod0
8161
+ //
8162
+ // We have the following constraints:
8163
+ // - we need to pass a function pointer to Rust.
8164
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
8165
+ // - function pointers can't store state, so we can't use a lamda.
8166
+ //
8167
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
8168
+ // function calls the lambda, which itself calls the `body` which then calls
8169
+ // into JS.
8170
+ //
8171
+ // We then give the `callback` function pointer to Rust which will call the
8172
+ // lambda sometime in the future.
8173
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacerestclientmethod0 {
8174
+ using namespace facebook;
8175
+
8176
+ // We need to store a lambda in a global so we can call it from
8177
+ // a function pointer. The function pointer is passed to Rust.
8178
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
8179
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
8180
+ UniffiForeignFuture *)>
8181
+ rsLambda = nullptr;
8182
+
8183
+ // This is the main body of the callback. It's called from the lambda,
8184
+ // which itself is called from the callback function which is passed to Rust.
8185
+ static void body(jsi::Runtime &rt,
8186
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
8187
+ std::shared_ptr<jsi::Value> callbackValue,
8188
+ uint64_t rs_uniffiHandle, RustBuffer rs_url,
8189
+ RustBuffer rs_headers,
8190
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
8191
+ uint64_t rs_uniffiCallbackData,
8192
+ UniffiForeignFuture *rs_uniffiOutReturn) {
8193
+
8194
+ // Convert the arguments from Rust, into jsi::Values.
8195
+ // We'll use the Bridging class to do this…
8196
+ auto js_uniffiHandle =
8197
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
8198
+ auto js_url = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
8199
+ rt, callInvoker, rs_url);
8200
+ auto js_headers = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
8201
+ rt, callInvoker, rs_headers);
8202
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
8203
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
8204
+ rs_uniffiFutureCallback);
8205
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
8206
+ rt, callInvoker, rs_uniffiCallbackData);
8207
+
8208
+ // Now we are ready to call the callback.
8209
+ // We are already on the JS thread, because this `body` function was
8210
+ // invoked from the CallInvoker.
8211
+ try {
8212
+ // Getting the callback function
8213
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
8214
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_url, js_headers,
8215
+ js_uniffiFutureCallback, js_uniffiCallbackData);
8216
+
8217
+ // Finally, we need to copy the return value back into the Rust pointer.
8218
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
8219
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
8220
+ uniffiResult);
8221
+ } catch (const jsi::JSError &error) {
8222
+ std::cout << "Error in callback UniffiCallbackInterfaceRestClientMethod0: "
8223
+ << error.what() << std::endl;
8224
+ throw error;
8225
+ }
8226
+ }
8227
+
8228
+ static void
8229
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_url, RustBuffer rs_headers,
8230
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
8231
+ uint64_t rs_uniffiCallbackData,
7816
8232
  UniffiForeignFuture *rs_uniffiOutReturn) {
7817
8233
  // If the runtime has shutdown, then there is no point in trying to
7818
8234
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
@@ -7947,11 +8363,10 @@ static void body(jsi::Runtime &rt,
7947
8363
  cb.call(rt, js_uniffiHandle, js_url, js_headers, js_body,
7948
8364
  js_uniffiFutureCallback, js_uniffiCallbackData);
7949
8365
 
7950
- // return type is MutReference(Struct("ForeignFuture"))
7951
8366
  // Finally, we need to copy the return value back into the Rust pointer.
7952
- *rs_uniffiOutReturn =
7953
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7954
- rt, callInvoker, uniffiResult);
8367
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
8368
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
8369
+ uniffiResult);
7955
8370
  } catch (const jsi::JSError &error) {
7956
8371
  std::cout << "Error in callback UniffiCallbackInterfaceRestClientMethod1: "
7957
8372
  << error.what() << std::endl;
@@ -8098,11 +8513,10 @@ static void body(jsi::Runtime &rt,
8098
8513
  cb.call(rt, js_uniffiHandle, js_url, js_headers, js_body,
8099
8514
  js_uniffiFutureCallback, js_uniffiCallbackData);
8100
8515
 
8101
- // return type is MutReference(Struct("ForeignFuture"))
8102
8516
  // Finally, we need to copy the return value back into the Rust pointer.
8103
- *rs_uniffiOutReturn =
8104
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
8105
- rt, callInvoker, uniffiResult);
8517
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
8518
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
8519
+ uniffiResult);
8106
8520
  } catch (const jsi::JSError &error) {
8107
8521
  std::cout << "Error in callback UniffiCallbackInterfaceRestClientMethod2: "
8108
8522
  << error.what() << std::endl;
@@ -8242,11 +8656,10 @@ static void body(jsi::Runtime &rt,
8242
8656
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_key,
8243
8657
  js_uniffiFutureCallback, js_uniffiCallbackData);
8244
8658
 
8245
- // return type is MutReference(Struct("ForeignFuture"))
8246
8659
  // Finally, we need to copy the return value back into the Rust pointer.
8247
- *rs_uniffiOutReturn =
8248
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
8249
- rt, callInvoker, uniffiResult);
8660
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
8661
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
8662
+ uniffiResult);
8250
8663
  } catch (const jsi::JSError &error) {
8251
8664
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod0: "
8252
8665
  << error.what() << std::endl;
@@ -8384,11 +8797,10 @@ static void body(jsi::Runtime &rt,
8384
8797
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_key,
8385
8798
  js_uniffiFutureCallback, js_uniffiCallbackData);
8386
8799
 
8387
- // return type is MutReference(Struct("ForeignFuture"))
8388
8800
  // Finally, we need to copy the return value back into the Rust pointer.
8389
- *rs_uniffiOutReturn =
8390
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
8391
- rt, callInvoker, uniffiResult);
8801
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
8802
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
8803
+ uniffiResult);
8392
8804
  } catch (const jsi::JSError &error) {
8393
8805
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod1: "
8394
8806
  << error.what() << std::endl;
@@ -8530,11 +8942,10 @@ static void body(jsi::Runtime &rt,
8530
8942
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_key, js_value,
8531
8943
  js_uniffiFutureCallback, js_uniffiCallbackData);
8532
8944
 
8533
- // return type is MutReference(Struct("ForeignFuture"))
8534
8945
  // Finally, we need to copy the return value back into the Rust pointer.
8535
- *rs_uniffiOutReturn =
8536
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
8537
- rt, callInvoker, uniffiResult);
8946
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
8947
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
8948
+ uniffiResult);
8538
8949
  } catch (const jsi::JSError &error) {
8539
8950
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod2: "
8540
8951
  << error.what() << std::endl;
@@ -8674,11 +9085,10 @@ static void body(jsi::Runtime &rt,
8674
9085
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
8675
9086
  js_uniffiFutureCallback, js_uniffiCallbackData);
8676
9087
 
8677
- // return type is MutReference(Struct("ForeignFuture"))
8678
9088
  // Finally, we need to copy the return value back into the Rust pointer.
8679
- *rs_uniffiOutReturn =
8680
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
8681
- rt, callInvoker, uniffiResult);
9089
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
9090
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
9091
+ uniffiResult);
8682
9092
  } catch (const jsi::JSError &error) {
8683
9093
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod3: "
8684
9094
  << error.what() << std::endl;
@@ -8816,11 +9226,10 @@ static void body(jsi::Runtime &rt,
8816
9226
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_payment,
8817
9227
  js_uniffiFutureCallback, js_uniffiCallbackData);
8818
9228
 
8819
- // return type is MutReference(Struct("ForeignFuture"))
8820
9229
  // Finally, we need to copy the return value back into the Rust pointer.
8821
- *rs_uniffiOutReturn =
8822
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
8823
- rt, callInvoker, uniffiResult);
9230
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
9231
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
9232
+ uniffiResult);
8824
9233
  } catch (const jsi::JSError &error) {
8825
9234
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod4: "
8826
9235
  << error.what() << std::endl;
@@ -8961,11 +9370,10 @@ static void body(jsi::Runtime &rt,
8961
9370
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_paymentId, js_metadata,
8962
9371
  js_uniffiFutureCallback, js_uniffiCallbackData);
8963
9372
 
8964
- // return type is MutReference(Struct("ForeignFuture"))
8965
9373
  // Finally, we need to copy the return value back into the Rust pointer.
8966
- *rs_uniffiOutReturn =
8967
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
8968
- rt, callInvoker, uniffiResult);
9374
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
9375
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
9376
+ uniffiResult);
8969
9377
  } catch (const jsi::JSError &error) {
8970
9378
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod5: "
8971
9379
  << error.what() << std::endl;
@@ -9105,11 +9513,10 @@ static void body(jsi::Runtime &rt,
9105
9513
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
9106
9514
  js_uniffiFutureCallback, js_uniffiCallbackData);
9107
9515
 
9108
- // return type is MutReference(Struct("ForeignFuture"))
9109
9516
  // Finally, we need to copy the return value back into the Rust pointer.
9110
- *rs_uniffiOutReturn =
9111
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9112
- rt, callInvoker, uniffiResult);
9517
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
9518
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
9519
+ uniffiResult);
9113
9520
  } catch (const jsi::JSError &error) {
9114
9521
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod6: "
9115
9522
  << error.what() << std::endl;
@@ -9248,11 +9655,10 @@ static void body(jsi::Runtime &rt,
9248
9655
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_invoice,
9249
9656
  js_uniffiFutureCallback, js_uniffiCallbackData);
9250
9657
 
9251
- // return type is MutReference(Struct("ForeignFuture"))
9252
9658
  // Finally, we need to copy the return value back into the Rust pointer.
9253
- *rs_uniffiOutReturn =
9254
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9255
- rt, callInvoker, uniffiResult);
9659
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
9660
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
9661
+ uniffiResult);
9256
9662
  } catch (const jsi::JSError &error) {
9257
9663
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod7: "
9258
9664
  << error.what() << std::endl;
@@ -9392,11 +9798,10 @@ static void body(jsi::Runtime &rt,
9392
9798
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_parentPaymentIds,
9393
9799
  js_uniffiFutureCallback, js_uniffiCallbackData);
9394
9800
 
9395
- // return type is MutReference(Struct("ForeignFuture"))
9396
9801
  // Finally, we need to copy the return value back into the Rust pointer.
9397
- *rs_uniffiOutReturn =
9398
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9399
- rt, callInvoker, uniffiResult);
9802
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
9803
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
9804
+ uniffiResult);
9400
9805
  } catch (const jsi::JSError &error) {
9401
9806
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod8: "
9402
9807
  << error.what() << std::endl;
@@ -9540,11 +9945,10 @@ static void body(jsi::Runtime &rt,
9540
9945
  cb.call(rt, js_uniffiHandle, js_txid, js_vout, js_amountSats,
9541
9946
  js_uniffiFutureCallback, js_uniffiCallbackData);
9542
9947
 
9543
- // return type is MutReference(Struct("ForeignFuture"))
9544
9948
  // Finally, we need to copy the return value back into the Rust pointer.
9545
- *rs_uniffiOutReturn =
9546
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9547
- rt, callInvoker, uniffiResult);
9949
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
9950
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
9951
+ uniffiResult);
9548
9952
  } catch (const jsi::JSError &error) {
9549
9953
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod9: "
9550
9954
  << error.what() << std::endl;
@@ -9685,11 +10089,10 @@ static void body(jsi::Runtime &rt,
9685
10089
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid, js_vout,
9686
10090
  js_uniffiFutureCallback, js_uniffiCallbackData);
9687
10091
 
9688
- // return type is MutReference(Struct("ForeignFuture"))
9689
10092
  // Finally, we need to copy the return value back into the Rust pointer.
9690
- *rs_uniffiOutReturn =
9691
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9692
- rt, callInvoker, uniffiResult);
10093
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
10094
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
10095
+ uniffiResult);
9693
10096
  } catch (const jsi::JSError &error) {
9694
10097
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod10: "
9695
10098
  << error.what() << std::endl;
@@ -9825,11 +10228,10 @@ static void body(jsi::Runtime &rt,
9825
10228
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
9826
10229
  js_uniffiCallbackData);
9827
10230
 
9828
- // return type is MutReference(Struct("ForeignFuture"))
9829
10231
  // Finally, we need to copy the return value back into the Rust pointer.
9830
- *rs_uniffiOutReturn =
9831
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9832
- rt, callInvoker, uniffiResult);
10232
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
10233
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
10234
+ uniffiResult);
9833
10235
  } catch (const jsi::JSError &error) {
9834
10236
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod11: "
9835
10237
  << error.what() << std::endl;
@@ -9972,11 +10374,10 @@ static void body(jsi::Runtime &rt,
9972
10374
  cb.call(rt, js_uniffiHandle, js_txid, js_vout, js_payload,
9973
10375
  js_uniffiFutureCallback, js_uniffiCallbackData);
9974
10376
 
9975
- // return type is MutReference(Struct("ForeignFuture"))
9976
10377
  // Finally, we need to copy the return value back into the Rust pointer.
9977
- *rs_uniffiOutReturn =
9978
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9979
- rt, callInvoker, uniffiResult);
10378
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
10379
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
10380
+ uniffiResult);
9980
10381
  } catch (const jsi::JSError &error) {
9981
10382
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod12: "
9982
10383
  << error.what() << std::endl;
@@ -10115,11 +10516,10 @@ static void body(jsi::Runtime &rt,
10115
10516
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_metadata,
10116
10517
  js_uniffiFutureCallback, js_uniffiCallbackData);
10117
10518
 
10118
- // return type is MutReference(Struct("ForeignFuture"))
10119
10519
  // Finally, we need to copy the return value back into the Rust pointer.
10120
- *rs_uniffiOutReturn =
10121
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
10122
- rt, callInvoker, uniffiResult);
10520
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
10521
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
10522
+ uniffiResult);
10123
10523
  } catch (const jsi::JSError &error) {
10124
10524
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod13: "
10125
10525
  << error.what() << std::endl;
@@ -10257,11 +10657,10 @@ static void body(jsi::Runtime &rt,
10257
10657
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
10258
10658
  js_uniffiFutureCallback, js_uniffiCallbackData);
10259
10659
 
10260
- // return type is MutReference(Struct("ForeignFuture"))
10261
10660
  // Finally, we need to copy the return value back into the Rust pointer.
10262
- *rs_uniffiOutReturn =
10263
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
10264
- rt, callInvoker, uniffiResult);
10661
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
10662
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
10663
+ uniffiResult);
10265
10664
  } catch (const jsi::JSError &error) {
10266
10665
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod14: "
10267
10666
  << error.what() << std::endl;
@@ -10400,11 +10799,10 @@ static void body(jsi::Runtime &rt,
10400
10799
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
10401
10800
  js_uniffiFutureCallback, js_uniffiCallbackData);
10402
10801
 
10403
- // return type is MutReference(Struct("ForeignFuture"))
10404
10802
  // Finally, we need to copy the return value back into the Rust pointer.
10405
- *rs_uniffiOutReturn =
10406
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
10407
- rt, callInvoker, uniffiResult);
10803
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
10804
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
10805
+ uniffiResult);
10408
10806
  } catch (const jsi::JSError &error) {
10409
10807
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod15: "
10410
10808
  << error.what() << std::endl;
@@ -10542,11 +10940,10 @@ static void body(jsi::Runtime &rt,
10542
10940
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_contact,
10543
10941
  js_uniffiFutureCallback, js_uniffiCallbackData);
10544
10942
 
10545
- // return type is MutReference(Struct("ForeignFuture"))
10546
10943
  // Finally, we need to copy the return value back into the Rust pointer.
10547
- *rs_uniffiOutReturn =
10548
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
10549
- rt, callInvoker, uniffiResult);
10944
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
10945
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
10946
+ uniffiResult);
10550
10947
  } catch (const jsi::JSError &error) {
10551
10948
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod16: "
10552
10949
  << error.what() << std::endl;
@@ -10683,11 +11080,10 @@ static void body(jsi::Runtime &rt,
10683
11080
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
10684
11081
  js_uniffiFutureCallback, js_uniffiCallbackData);
10685
11082
 
10686
- // return type is MutReference(Struct("ForeignFuture"))
10687
11083
  // Finally, we need to copy the return value back into the Rust pointer.
10688
- *rs_uniffiOutReturn =
10689
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
10690
- rt, callInvoker, uniffiResult);
11084
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
11085
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
11086
+ uniffiResult);
10691
11087
  } catch (const jsi::JSError &error) {
10692
11088
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod17: "
10693
11089
  << error.what() << std::endl;
@@ -10824,11 +11220,10 @@ static void body(jsi::Runtime &rt,
10824
11220
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_record,
10825
11221
  js_uniffiFutureCallback, js_uniffiCallbackData);
10826
11222
 
10827
- // return type is MutReference(Struct("ForeignFuture"))
10828
11223
  // Finally, we need to copy the return value back into the Rust pointer.
10829
- *rs_uniffiOutReturn =
10830
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
10831
- rt, callInvoker, uniffiResult);
11224
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
11225
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
11226
+ uniffiResult);
10832
11227
  } catch (const jsi::JSError &error) {
10833
11228
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod18: "
10834
11229
  << error.what() << std::endl;
@@ -10970,11 +11365,10 @@ static void body(jsi::Runtime &rt,
10970
11365
  cb.call(rt, js_uniffiHandle, js_record, js_localRevision,
10971
11366
  js_uniffiFutureCallback, js_uniffiCallbackData);
10972
11367
 
10973
- // return type is MutReference(Struct("ForeignFuture"))
10974
11368
  // Finally, we need to copy the return value back into the Rust pointer.
10975
- *rs_uniffiOutReturn =
10976
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
10977
- rt, callInvoker, uniffiResult);
11369
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
11370
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
11371
+ uniffiResult);
10978
11372
  } catch (const jsi::JSError &error) {
10979
11373
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod19: "
10980
11374
  << error.what() << std::endl;
@@ -11114,11 +11508,10 @@ static void body(jsi::Runtime &rt,
11114
11508
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_limit,
11115
11509
  js_uniffiFutureCallback, js_uniffiCallbackData);
11116
11510
 
11117
- // return type is MutReference(Struct("ForeignFuture"))
11118
11511
  // Finally, we need to copy the return value back into the Rust pointer.
11119
- *rs_uniffiOutReturn =
11120
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
11121
- rt, callInvoker, uniffiResult);
11512
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
11513
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
11514
+ uniffiResult);
11122
11515
  } catch (const jsi::JSError &error) {
11123
11516
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod20: "
11124
11517
  << error.what() << std::endl;
@@ -11254,11 +11647,10 @@ static void body(jsi::Runtime &rt,
11254
11647
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
11255
11648
  js_uniffiCallbackData);
11256
11649
 
11257
- // return type is MutReference(Struct("ForeignFuture"))
11258
11650
  // Finally, we need to copy the return value back into the Rust pointer.
11259
- *rs_uniffiOutReturn =
11260
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
11261
- rt, callInvoker, uniffiResult);
11651
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
11652
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
11653
+ uniffiResult);
11262
11654
  } catch (const jsi::JSError &error) {
11263
11655
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod21: "
11264
11656
  << error.what() << std::endl;
@@ -11394,11 +11786,10 @@ static void body(jsi::Runtime &rt,
11394
11786
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_records,
11395
11787
  js_uniffiFutureCallback, js_uniffiCallbackData);
11396
11788
 
11397
- // return type is MutReference(Struct("ForeignFuture"))
11398
11789
  // Finally, we need to copy the return value back into the Rust pointer.
11399
- *rs_uniffiOutReturn =
11400
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
11401
- rt, callInvoker, uniffiResult);
11790
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
11791
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
11792
+ uniffiResult);
11402
11793
  } catch (const jsi::JSError &error) {
11403
11794
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod22: "
11404
11795
  << error.what() << std::endl;
@@ -11535,11 +11926,10 @@ static void body(jsi::Runtime &rt,
11535
11926
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_record,
11536
11927
  js_uniffiFutureCallback, js_uniffiCallbackData);
11537
11928
 
11538
- // return type is MutReference(Struct("ForeignFuture"))
11539
11929
  // Finally, we need to copy the return value back into the Rust pointer.
11540
- *rs_uniffiOutReturn =
11541
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
11542
- rt, callInvoker, uniffiResult);
11930
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
11931
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
11932
+ uniffiResult);
11543
11933
  } catch (const jsi::JSError &error) {
11544
11934
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod23: "
11545
11935
  << error.what() << std::endl;
@@ -11677,11 +12067,10 @@ static void body(jsi::Runtime &rt,
11677
12067
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_limit,
11678
12068
  js_uniffiFutureCallback, js_uniffiCallbackData);
11679
12069
 
11680
- // return type is MutReference(Struct("ForeignFuture"))
11681
12070
  // Finally, we need to copy the return value back into the Rust pointer.
11682
- *rs_uniffiOutReturn =
11683
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
11684
- rt, callInvoker, uniffiResult);
12071
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
12072
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
12073
+ uniffiResult);
11685
12074
  } catch (const jsi::JSError &error) {
11686
12075
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod24: "
11687
12076
  << error.what() << std::endl;
@@ -11817,11 +12206,10 @@ static void body(jsi::Runtime &rt,
11817
12206
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
11818
12207
  js_uniffiCallbackData);
11819
12208
 
11820
- // return type is MutReference(Struct("ForeignFuture"))
11821
12209
  // Finally, we need to copy the return value back into the Rust pointer.
11822
- *rs_uniffiOutReturn =
11823
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
11824
- rt, callInvoker, uniffiResult);
12210
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
12211
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
12212
+ uniffiResult);
11825
12213
  } catch (const jsi::JSError &error) {
11826
12214
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod25: "
11827
12215
  << error.what() << std::endl;
@@ -11958,11 +12346,10 @@ static void body(jsi::Runtime &rt,
11958
12346
  auto uniffiResult = cb.call(rt, js_uniffiHandle, js_record,
11959
12347
  js_uniffiFutureCallback, js_uniffiCallbackData);
11960
12348
 
11961
- // return type is MutReference(Struct("ForeignFuture"))
11962
12349
  // Finally, we need to copy the return value back into the Rust pointer.
11963
- *rs_uniffiOutReturn =
11964
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
11965
- rt, callInvoker, uniffiResult);
12350
+ *rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
12351
+ ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
12352
+ uniffiResult);
11966
12353
  } catch (const jsi::JSError &error) {
11967
12354
  std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod26: "
11968
12355
  << error.what() << std::endl;
@@ -12296,6 +12683,44 @@ namespace uniffi::breez_sdk_spark {
12296
12683
  using namespace facebook;
12297
12684
  using CallInvoker = uniffi_runtime::UniffiCallInvoker;
12298
12685
 
12686
+ template <> struct Bridging<UniffiVTableCallbackInterfacePasskeyPrfProvider> {
12687
+ static UniffiVTableCallbackInterfacePasskeyPrfProvider
12688
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
12689
+ const jsi::Value &jsValue) {
12690
+ // Check if the input is an object
12691
+ if (!jsValue.isObject()) {
12692
+ throw jsi::JSError(rt, "Expected an object for "
12693
+ "UniffiVTableCallbackInterfacePasskeyPrfProvider");
12694
+ }
12695
+
12696
+ // Get the object from the jsi::Value
12697
+ auto jsObject = jsValue.getObject(rt);
12698
+
12699
+ // Create the vtable struct
12700
+ UniffiVTableCallbackInterfacePasskeyPrfProvider rsObject;
12701
+
12702
+ // Create the vtable from the js callbacks.
12703
+ rsObject.derive_prf_seed = uniffi::breez_sdk_spark::cb::
12704
+ callbackinterfacepasskeyprfprovidermethod0::makeCallbackFunction(
12705
+ rt, callInvoker, jsObject.getProperty(rt, "derivePrfSeed"));
12706
+ rsObject.is_prf_available = uniffi::breez_sdk_spark::cb::
12707
+ callbackinterfacepasskeyprfprovidermethod1::makeCallbackFunction(
12708
+ rt, callInvoker, jsObject.getProperty(rt, "isPrfAvailable"));
12709
+ rsObject.uniffi_free =
12710
+ uniffi::breez_sdk_spark::st::vtablecallbackinterfacepasskeyprfprovider::
12711
+ vtablecallbackinterfacepasskeyprfprovider::free::
12712
+ makeCallbackFunction(rt, callInvoker,
12713
+ jsObject.getProperty(rt, "uniffiFree"));
12714
+
12715
+ return rsObject;
12716
+ }
12717
+ };
12718
+
12719
+ } // namespace uniffi::breez_sdk_spark
12720
+ namespace uniffi::breez_sdk_spark {
12721
+ using namespace facebook;
12722
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
12723
+
12299
12724
  template <> struct Bridging<UniffiVTableCallbackInterfacePaymentObserver> {
12300
12725
  static UniffiVTableCallbackInterfacePaymentObserver
12301
12726
  fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
@@ -12563,18 +12988,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
12563
12988
  return this->cpp_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
12564
12989
  rt, thisVal, args, count);
12565
12990
  });
12566
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_"
12567
- "bitcoinchainservice"] = jsi::Function::createFromHostFunction(
12568
- rt,
12569
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
12570
- "callback_vtable_bitcoinchainservice"),
12571
- 1,
12572
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
12573
- const jsi::Value *args, size_t count) -> jsi::Value {
12574
- return this
12575
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
12576
- rt, thisVal, args, count);
12577
- });
12578
12991
  props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_"
12579
12992
  "utxos"] = jsi::Function::createFromHostFunction(
12580
12993
  rt,
@@ -13184,18 +13597,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
13184
13597
  return this->cpp_uniffi_breez_sdk_spark_fn_free_externalsigner(
13185
13598
  rt, thisVal, args, count);
13186
13599
  });
13187
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner"] =
13188
- jsi::Function::createFromHostFunction(
13189
- rt,
13190
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
13191
- "callback_vtable_externalsigner"),
13192
- 1,
13193
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13194
- const jsi::Value *args, size_t count) -> jsi::Value {
13195
- return this
13196
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
13197
- rt, thisVal, args, count);
13198
- });
13199
13600
  props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_identity_public_"
13200
13601
  "key"] = jsi::Function::createFromHostFunction(
13201
13602
  rt,
@@ -13443,61 +13844,176 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
13443
13844
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice"] =
13444
13845
  jsi::Function::createFromHostFunction(
13445
13846
  rt,
13446
- jsi::PropNameID::forAscii(
13447
- rt, "ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice"),
13448
- 1,
13847
+ jsi::PropNameID::forAscii(
13848
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_clone_fiatservice"),
13849
+ 1,
13850
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13851
+ const jsi::Value *args, size_t count) -> jsi::Value {
13852
+ return this->cpp_uniffi_breez_sdk_spark_fn_clone_fiatservice(
13853
+ rt, thisVal, args, count);
13854
+ });
13855
+ props["ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice"] =
13856
+ jsi::Function::createFromHostFunction(
13857
+ rt,
13858
+ jsi::PropNameID::forAscii(
13859
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice"),
13860
+ 1,
13861
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13862
+ const jsi::Value *args, size_t count) -> jsi::Value {
13863
+ return this->cpp_uniffi_breez_sdk_spark_fn_free_fiatservice(
13864
+ rt, thisVal, args, count);
13865
+ });
13866
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_"
13867
+ "currencies"] = jsi::Function::createFromHostFunction(
13868
+ rt,
13869
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
13870
+ "fiatservice_fetch_fiat_currencies"),
13871
+ 1,
13872
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13873
+ const jsi::Value *args, size_t count) -> jsi::Value {
13874
+ return this
13875
+ ->cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(
13876
+ rt, thisVal, args, count);
13877
+ });
13878
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates"] =
13879
+ jsi::Function::createFromHostFunction(
13880
+ rt,
13881
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
13882
+ "fiatservice_fetch_fiat_rates"),
13883
+ 1,
13884
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13885
+ const jsi::Value *args, size_t count) -> jsi::Value {
13886
+ return this
13887
+ ->cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(
13888
+ rt, thisVal, args, count);
13889
+ });
13890
+ props["ubrn_uniffi_breez_sdk_spark_fn_clone_passkey"] =
13891
+ jsi::Function::createFromHostFunction(
13892
+ rt,
13893
+ jsi::PropNameID::forAscii(
13894
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_clone_passkey"),
13895
+ 1,
13896
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13897
+ const jsi::Value *args, size_t count) -> jsi::Value {
13898
+ return this->cpp_uniffi_breez_sdk_spark_fn_clone_passkey(
13899
+ rt, thisVal, args, count);
13900
+ });
13901
+ props["ubrn_uniffi_breez_sdk_spark_fn_free_passkey"] =
13902
+ jsi::Function::createFromHostFunction(
13903
+ rt,
13904
+ jsi::PropNameID::forAscii(
13905
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_free_passkey"),
13906
+ 1,
13907
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13908
+ const jsi::Value *args, size_t count) -> jsi::Value {
13909
+ return this->cpp_uniffi_breez_sdk_spark_fn_free_passkey(
13910
+ rt, thisVal, args, count);
13911
+ });
13912
+ props["ubrn_uniffi_breez_sdk_spark_fn_constructor_passkey_new"] =
13913
+ jsi::Function::createFromHostFunction(
13914
+ rt,
13915
+ jsi::PropNameID::forAscii(
13916
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_constructor_passkey_new"),
13917
+ 2,
13918
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13919
+ const jsi::Value *args, size_t count) -> jsi::Value {
13920
+ return this->cpp_uniffi_breez_sdk_spark_fn_constructor_passkey_new(
13921
+ rt, thisVal, args, count);
13922
+ });
13923
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_passkey_get_wallet"] =
13924
+ jsi::Function::createFromHostFunction(
13925
+ rt,
13926
+ jsi::PropNameID::forAscii(
13927
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_method_passkey_get_wallet"),
13928
+ 2,
13929
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13930
+ const jsi::Value *args, size_t count) -> jsi::Value {
13931
+ return this
13932
+ ->cpp_uniffi_breez_sdk_spark_fn_method_passkey_get_wallet(
13933
+ rt, thisVal, args, count);
13934
+ });
13935
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_passkey_is_available"] =
13936
+ jsi::Function::createFromHostFunction(
13937
+ rt,
13938
+ jsi::PropNameID::forAscii(
13939
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_method_passkey_is_available"),
13940
+ 1,
13941
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13942
+ const jsi::Value *args, size_t count) -> jsi::Value {
13943
+ return this
13944
+ ->cpp_uniffi_breez_sdk_spark_fn_method_passkey_is_available(
13945
+ rt, thisVal, args, count);
13946
+ });
13947
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_passkey_list_wallet_names"] =
13948
+ jsi::Function::createFromHostFunction(
13949
+ rt,
13950
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
13951
+ "passkey_list_wallet_names"),
13952
+ 1,
13953
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13954
+ const jsi::Value *args, size_t count) -> jsi::Value {
13955
+ return this
13956
+ ->cpp_uniffi_breez_sdk_spark_fn_method_passkey_list_wallet_names(
13957
+ rt, thisVal, args, count);
13958
+ });
13959
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_passkey_store_wallet_name"] =
13960
+ jsi::Function::createFromHostFunction(
13961
+ rt,
13962
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
13963
+ "passkey_store_wallet_name"),
13964
+ 2,
13449
13965
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13450
13966
  const jsi::Value *args, size_t count) -> jsi::Value {
13451
- return this->cpp_uniffi_breez_sdk_spark_fn_clone_fiatservice(
13452
- rt, thisVal, args, count);
13967
+ return this
13968
+ ->cpp_uniffi_breez_sdk_spark_fn_method_passkey_store_wallet_name(
13969
+ rt, thisVal, args, count);
13453
13970
  });
13454
- props["ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice"] =
13971
+ props["ubrn_uniffi_breez_sdk_spark_fn_clone_passkeyprfprovider"] =
13455
13972
  jsi::Function::createFromHostFunction(
13456
13973
  rt,
13457
13974
  jsi::PropNameID::forAscii(
13458
- rt, "ubrn_uniffi_breez_sdk_spark_fn_free_fiatservice"),
13975
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_clone_passkeyprfprovider"),
13459
13976
  1,
13460
13977
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13461
13978
  const jsi::Value *args, size_t count) -> jsi::Value {
13462
- return this->cpp_uniffi_breez_sdk_spark_fn_free_fiatservice(
13979
+ return this->cpp_uniffi_breez_sdk_spark_fn_clone_passkeyprfprovider(
13463
13980
  rt, thisVal, args, count);
13464
13981
  });
13465
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice"] =
13982
+ props["ubrn_uniffi_breez_sdk_spark_fn_free_passkeyprfprovider"] =
13466
13983
  jsi::Function::createFromHostFunction(
13467
13984
  rt,
13468
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
13469
- "callback_vtable_fiatservice"),
13985
+ jsi::PropNameID::forAscii(
13986
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_free_passkeyprfprovider"),
13470
13987
  1,
13471
13988
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13472
13989
  const jsi::Value *args, size_t count) -> jsi::Value {
13473
- return this
13474
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
13475
- rt, thisVal, args, count);
13990
+ return this->cpp_uniffi_breez_sdk_spark_fn_free_passkeyprfprovider(
13991
+ rt, thisVal, args, count);
13476
13992
  });
13477
- props["ubrn_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_"
13478
- "currencies"] = jsi::Function::createFromHostFunction(
13993
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_derive_prf_"
13994
+ "seed"] = jsi::Function::createFromHostFunction(
13479
13995
  rt,
13480
13996
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
13481
- "fiatservice_fetch_fiat_currencies"),
13997
+ "passkeyprfprovider_derive_prf_seed"),
13998
+ 2,
13999
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
14000
+ const jsi::Value *args, size_t count) -> jsi::Value {
14001
+ return this
14002
+ ->cpp_uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_derive_prf_seed(
14003
+ rt, thisVal, args, count);
14004
+ });
14005
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_is_prf_"
14006
+ "available"] = jsi::Function::createFromHostFunction(
14007
+ rt,
14008
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
14009
+ "passkeyprfprovider_is_prf_available"),
13482
14010
  1,
13483
14011
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13484
14012
  const jsi::Value *args, size_t count) -> jsi::Value {
13485
14013
  return this
13486
- ->cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(
14014
+ ->cpp_uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_is_prf_available(
13487
14015
  rt, thisVal, args, count);
13488
14016
  });
13489
- props["ubrn_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates"] =
13490
- jsi::Function::createFromHostFunction(
13491
- rt,
13492
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
13493
- "fiatservice_fetch_fiat_rates"),
13494
- 1,
13495
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13496
- const jsi::Value *args, size_t count) -> jsi::Value {
13497
- return this
13498
- ->cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(
13499
- rt, thisVal, args, count);
13500
- });
13501
14017
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_paymentobserver"] =
13502
14018
  jsi::Function::createFromHostFunction(
13503
14019
  rt,
@@ -13520,18 +14036,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
13520
14036
  return this->cpp_uniffi_breez_sdk_spark_fn_free_paymentobserver(
13521
14037
  rt, thisVal, args, count);
13522
14038
  });
13523
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver"] =
13524
- jsi::Function::createFromHostFunction(
13525
- rt,
13526
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
13527
- "callback_vtable_paymentobserver"),
13528
- 1,
13529
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13530
- const jsi::Value *args, size_t count) -> jsi::Value {
13531
- return this
13532
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
13533
- rt, thisVal, args, count);
13534
- });
13535
14039
  props["ubrn_uniffi_breez_sdk_spark_fn_method_paymentobserver_before_send"] =
13536
14040
  jsi::Function::createFromHostFunction(
13537
14041
  rt,
@@ -13566,19 +14070,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
13566
14070
  return this->cpp_uniffi_breez_sdk_spark_fn_free_restclient(
13567
14071
  rt, thisVal, args, count);
13568
14072
  });
13569
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"] =
13570
- jsi::Function::createFromHostFunction(
13571
- rt,
13572
- jsi::PropNameID::forAscii(
13573
- rt,
13574
- "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"),
13575
- 1,
13576
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13577
- const jsi::Value *args, size_t count) -> jsi::Value {
13578
- return this
13579
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
13580
- rt, thisVal, args, count);
13581
- });
13582
14073
  props["ubrn_uniffi_breez_sdk_spark_fn_method_restclient_get_request"] =
13583
14074
  jsi::Function::createFromHostFunction(
13584
14075
  rt,
@@ -13782,19 +14273,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
13782
14273
  return this->cpp_uniffi_breez_sdk_spark_fn_free_storage(
13783
14274
  rt, thisVal, args, count);
13784
14275
  });
13785
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"] =
13786
- jsi::Function::createFromHostFunction(
13787
- rt,
13788
- jsi::PropNameID::forAscii(
13789
- rt,
13790
- "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"),
13791
- 1,
13792
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
13793
- const jsi::Value *args, size_t count) -> jsi::Value {
13794
- return this
13795
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
13796
- rt, thisVal, args, count);
13797
- });
13798
14276
  props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_cached_item"] =
13799
14277
  jsi::Function::createFromHostFunction(
13800
14278
  rt,
@@ -14235,30 +14713,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
14235
14713
  ->cpp_uniffi_breez_sdk_spark_fn_method_tokenissuer_unfreeze_issuer_token(
14236
14714
  rt, thisVal, args, count);
14237
14715
  });
14238
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener"] =
14239
- jsi::Function::createFromHostFunction(
14240
- rt,
14241
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
14242
- "callback_vtable_eventlistener"),
14243
- 1,
14244
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
14245
- const jsi::Value *args, size_t count) -> jsi::Value {
14246
- return this
14247
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
14248
- rt, thisVal, args, count);
14249
- });
14250
- props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"] =
14251
- jsi::Function::createFromHostFunction(
14252
- rt,
14253
- jsi::PropNameID::forAscii(
14254
- rt, "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"),
14255
- 1,
14256
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
14257
- const jsi::Value *args, size_t count) -> jsi::Value {
14258
- return this
14259
- ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
14260
- rt, thisVal, args, count);
14261
- });
14262
14716
  props["ubrn_uniffi_breez_sdk_spark_fn_func_connect"] =
14263
14717
  jsi::Function::createFromHostFunction(
14264
14718
  rt,
@@ -15808,6 +16262,81 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
15808
16262
  ->cpp_uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates(
15809
16263
  rt, thisVal, args, count);
15810
16264
  });
16265
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet"] =
16266
+ jsi::Function::createFromHostFunction(
16267
+ rt,
16268
+ jsi::PropNameID::forAscii(
16269
+ rt,
16270
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet"),
16271
+ 0,
16272
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16273
+ const jsi::Value *args, size_t count) -> jsi::Value {
16274
+ return this
16275
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet(
16276
+ rt, thisVal, args, count);
16277
+ });
16278
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_is_available"] =
16279
+ jsi::Function::createFromHostFunction(
16280
+ rt,
16281
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
16282
+ "method_passkey_is_available"),
16283
+ 0,
16284
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16285
+ const jsi::Value *args, size_t count) -> jsi::Value {
16286
+ return this
16287
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_passkey_is_available(
16288
+ rt, thisVal, args, count);
16289
+ });
16290
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_"
16291
+ "names"] = jsi::Function::createFromHostFunction(
16292
+ rt,
16293
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
16294
+ "method_passkey_list_wallet_names"),
16295
+ 0,
16296
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16297
+ const jsi::Value *args, size_t count) -> jsi::Value {
16298
+ return this
16299
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_names(
16300
+ rt, thisVal, args, count);
16301
+ });
16302
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_"
16303
+ "name"] = jsi::Function::createFromHostFunction(
16304
+ rt,
16305
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
16306
+ "method_passkey_store_wallet_name"),
16307
+ 0,
16308
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16309
+ const jsi::Value *args, size_t count) -> jsi::Value {
16310
+ return this
16311
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_name(
16312
+ rt, thisVal, args, count);
16313
+ });
16314
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_derive_"
16315
+ "prf_seed"] = jsi::Function::createFromHostFunction(
16316
+ rt,
16317
+ jsi::PropNameID::forAscii(rt,
16318
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
16319
+ "passkeyprfprovider_derive_prf_seed"),
16320
+ 0,
16321
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16322
+ const jsi::Value *args, size_t count) -> jsi::Value {
16323
+ return this
16324
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_derive_prf_seed(
16325
+ rt, thisVal, args, count);
16326
+ });
16327
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_is_prf_"
16328
+ "available"] = jsi::Function::createFromHostFunction(
16329
+ rt,
16330
+ jsi::PropNameID::forAscii(rt,
16331
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
16332
+ "passkeyprfprovider_is_prf_available"),
16333
+ 0,
16334
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16335
+ const jsi::Value *args, size_t count) -> jsi::Value {
16336
+ return this
16337
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_is_prf_available(
16338
+ rt, thisVal, args, count);
16339
+ });
15811
16340
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_"
15812
16341
  "send"] = jsi::Function::createFromHostFunction(
15813
16342
  rt,
@@ -16380,51 +16909,174 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16380
16909
  ->cpp_uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token(
16381
16910
  rt, thisVal, args, count);
16382
16911
  });
16912
+ props["ubrn_uniffi_breez_sdk_spark_checksum_constructor_passkey_new"] =
16913
+ jsi::Function::createFromHostFunction(
16914
+ rt,
16915
+ jsi::PropNameID::forAscii(
16916
+ rt,
16917
+ "ubrn_uniffi_breez_sdk_spark_checksum_constructor_passkey_new"),
16918
+ 0,
16919
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16920
+ const jsi::Value *args, size_t count) -> jsi::Value {
16921
+ return this
16922
+ ->cpp_uniffi_breez_sdk_spark_checksum_constructor_passkey_new(
16923
+ rt, thisVal, args, count);
16924
+ });
16383
16925
  props["ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new"] =
16384
16926
  jsi::Function::createFromHostFunction(
16385
16927
  rt,
16386
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
16387
- "constructor_sdkbuilder_new"),
16388
- 0,
16928
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
16929
+ "constructor_sdkbuilder_new"),
16930
+ 0,
16931
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16932
+ const jsi::Value *args, size_t count) -> jsi::Value {
16933
+ return this
16934
+ ->cpp_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new(
16935
+ rt, thisVal, args, count);
16936
+ });
16937
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event"] =
16938
+ jsi::Function::createFromHostFunction(
16939
+ rt,
16940
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
16941
+ "method_eventlistener_on_event"),
16942
+ 0,
16943
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16944
+ const jsi::Value *args, size_t count) -> jsi::Value {
16945
+ return this
16946
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event(
16947
+ rt, thisVal, args, count);
16948
+ });
16949
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_logger_log"] =
16950
+ jsi::Function::createFromHostFunction(
16951
+ rt,
16952
+ jsi::PropNameID::forAscii(
16953
+ rt, "ubrn_uniffi_breez_sdk_spark_checksum_method_logger_log"),
16954
+ 0,
16955
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16956
+ const jsi::Value *args, size_t count) -> jsi::Value {
16957
+ return this->cpp_uniffi_breez_sdk_spark_checksum_method_logger_log(
16958
+ rt, thisVal, args, count);
16959
+ });
16960
+ props["ubrn_ffi_breez_sdk_spark_uniffi_contract_version"] =
16961
+ jsi::Function::createFromHostFunction(
16962
+ rt,
16963
+ jsi::PropNameID::forAscii(
16964
+ rt, "ubrn_ffi_breez_sdk_spark_uniffi_contract_version"),
16965
+ 0,
16966
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16967
+ const jsi::Value *args, size_t count) -> jsi::Value {
16968
+ return this->cpp_ffi_breez_sdk_spark_uniffi_contract_version(
16969
+ rt, thisVal, args, count);
16970
+ });
16971
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener"] =
16972
+ jsi::Function::createFromHostFunction(
16973
+ rt,
16974
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
16975
+ "callback_vtable_eventlistener"),
16976
+ 1,
16977
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16978
+ const jsi::Value *args, size_t count) -> jsi::Value {
16979
+ return this
16980
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
16981
+ rt, thisVal, args, count);
16982
+ });
16983
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"] =
16984
+ jsi::Function::createFromHostFunction(
16985
+ rt,
16986
+ jsi::PropNameID::forAscii(
16987
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"),
16988
+ 1,
16989
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16990
+ const jsi::Value *args, size_t count) -> jsi::Value {
16991
+ return this
16992
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
16993
+ rt, thisVal, args, count);
16994
+ });
16995
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_"
16996
+ "bitcoinchainservice"] = jsi::Function::createFromHostFunction(
16997
+ rt,
16998
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
16999
+ "callback_vtable_bitcoinchainservice"),
17000
+ 1,
17001
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17002
+ const jsi::Value *args, size_t count) -> jsi::Value {
17003
+ return this
17004
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
17005
+ rt, thisVal, args, count);
17006
+ });
17007
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner"] =
17008
+ jsi::Function::createFromHostFunction(
17009
+ rt,
17010
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
17011
+ "callback_vtable_externalsigner"),
17012
+ 1,
17013
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17014
+ const jsi::Value *args, size_t count) -> jsi::Value {
17015
+ return this
17016
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
17017
+ rt, thisVal, args, count);
17018
+ });
17019
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice"] =
17020
+ jsi::Function::createFromHostFunction(
17021
+ rt,
17022
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
17023
+ "callback_vtable_fiatservice"),
17024
+ 1,
16389
17025
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16390
17026
  const jsi::Value *args, size_t count) -> jsi::Value {
16391
17027
  return this
16392
- ->cpp_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new(
17028
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
16393
17029
  rt, thisVal, args, count);
16394
17030
  });
16395
- props["ubrn_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event"] =
17031
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_"
17032
+ "passkeyprfprovider"] = jsi::Function::createFromHostFunction(
17033
+ rt,
17034
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
17035
+ "callback_vtable_passkeyprfprovider"),
17036
+ 1,
17037
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17038
+ const jsi::Value *args, size_t count) -> jsi::Value {
17039
+ return this
17040
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_passkeyprfprovider(
17041
+ rt, thisVal, args, count);
17042
+ });
17043
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver"] =
16396
17044
  jsi::Function::createFromHostFunction(
16397
17045
  rt,
16398
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
16399
- "method_eventlistener_on_event"),
16400
- 0,
17046
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
17047
+ "callback_vtable_paymentobserver"),
17048
+ 1,
16401
17049
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16402
17050
  const jsi::Value *args, size_t count) -> jsi::Value {
16403
17051
  return this
16404
- ->cpp_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event(
17052
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
16405
17053
  rt, thisVal, args, count);
16406
17054
  });
16407
- props["ubrn_uniffi_breez_sdk_spark_checksum_method_logger_log"] =
17055
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"] =
16408
17056
  jsi::Function::createFromHostFunction(
16409
17057
  rt,
16410
17058
  jsi::PropNameID::forAscii(
16411
- rt, "ubrn_uniffi_breez_sdk_spark_checksum_method_logger_log"),
16412
- 0,
17059
+ rt,
17060
+ "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"),
17061
+ 1,
16413
17062
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16414
17063
  const jsi::Value *args, size_t count) -> jsi::Value {
16415
- return this->cpp_uniffi_breez_sdk_spark_checksum_method_logger_log(
16416
- rt, thisVal, args, count);
17064
+ return this
17065
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
17066
+ rt, thisVal, args, count);
16417
17067
  });
16418
- props["ubrn_ffi_breez_sdk_spark_uniffi_contract_version"] =
17068
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"] =
16419
17069
  jsi::Function::createFromHostFunction(
16420
17070
  rt,
16421
17071
  jsi::PropNameID::forAscii(
16422
- rt, "ubrn_ffi_breez_sdk_spark_uniffi_contract_version"),
16423
- 0,
17072
+ rt,
17073
+ "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"),
17074
+ 1,
16424
17075
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16425
17076
  const jsi::Value *args, size_t count) -> jsi::Value {
16426
- return this->cpp_ffi_breez_sdk_spark_uniffi_contract_version(
16427
- rt, thisVal, args, count);
17077
+ return this
17078
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
17079
+ rt, thisVal, args, count);
16428
17080
  });
16429
17081
  props["ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_"
16430
17082
  "pointer"] = jsi::Function::createFromHostFunction(
@@ -16475,6 +17127,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16475
17127
  ->cpp_uniffi_internal_fn_method_fiatservice_ffi__bless_pointer(
16476
17128
  rt, thisVal, args, count);
16477
17129
  });
17130
+ props["ubrn_uniffi_internal_fn_method_passkey_ffi__bless_pointer"] =
17131
+ jsi::Function::createFromHostFunction(
17132
+ rt,
17133
+ jsi::PropNameID::forAscii(
17134
+ rt, "ubrn_uniffi_internal_fn_method_passkey_ffi__bless_pointer"),
17135
+ 1,
17136
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17137
+ const jsi::Value *args, size_t count) -> jsi::Value {
17138
+ return this
17139
+ ->cpp_uniffi_internal_fn_method_passkey_ffi__bless_pointer(
17140
+ rt, thisVal, args, count);
17141
+ });
17142
+ props["ubrn_uniffi_internal_fn_method_passkeyprfprovider_ffi__bless_"
17143
+ "pointer"] = jsi::Function::createFromHostFunction(
17144
+ rt,
17145
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_"
17146
+ "passkeyprfprovider_ffi__bless_pointer"),
17147
+ 1,
17148
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17149
+ const jsi::Value *args, size_t count) -> jsi::Value {
17150
+ return this
17151
+ ->cpp_uniffi_internal_fn_method_passkeyprfprovider_ffi__bless_pointer(
17152
+ rt, thisVal, args, count);
17153
+ });
16478
17154
  props["ubrn_uniffi_internal_fn_method_paymentobserver_ffi__bless_pointer"] =
16479
17155
  jsi::Function::createFromHostFunction(
16480
17156
  rt,
@@ -16591,6 +17267,8 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
16591
17267
  vtablecallbackinterfaceexternalsigner::free::cleanup();
16592
17268
  uniffi::breez_sdk_spark::st::vtablecallbackinterfacefiatservice::
16593
17269
  vtablecallbackinterfacefiatservice::free::cleanup();
17270
+ uniffi::breez_sdk_spark::st::vtablecallbackinterfacepasskeyprfprovider::
17271
+ vtablecallbackinterfacepasskeyprfprovider::free::cleanup();
16594
17272
  uniffi::breez_sdk_spark::st::vtablecallbackinterfacepaymentobserver::
16595
17273
  vtablecallbackinterfacepaymentobserver::free::cleanup();
16596
17274
  uniffi::breez_sdk_spark::st::vtablecallbackinterfacerestclient::
@@ -16680,6 +17358,12 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
16680
17358
  uniffi::breez_sdk_spark::cb::callbackinterfacefiatservicemethod0::cleanup();
16681
17359
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod1
16682
17360
  uniffi::breez_sdk_spark::cb::callbackinterfacefiatservicemethod1::cleanup();
17361
+ // Cleanup for callback function CallbackInterfacePasskeyPrfProviderMethod0
17362
+ uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod0::
17363
+ cleanup();
17364
+ // Cleanup for callback function CallbackInterfacePasskeyPrfProviderMethod1
17365
+ uniffi::breez_sdk_spark::cb::callbackinterfacepasskeyprfprovidermethod1::
17366
+ cleanup();
16683
17367
  // Cleanup for callback function CallbackInterfacePaymentObserverMethod0
16684
17368
  uniffi::breez_sdk_spark::cb::callbackinterfacepaymentobservermethod0::
16685
17369
  cleanup();
@@ -16830,6 +17514,38 @@ jsi::Value NativeBreezSdkSpark::
16830
17514
  auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
16831
17515
  return jsi::Value(rt, obj);
16832
17516
  }
17517
+ jsi::Value
17518
+ NativeBreezSdkSpark::cpp_uniffi_internal_fn_method_passkey_ffi__bless_pointer(
17519
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17520
+ size_t count) {
17521
+ auto pointer =
17522
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
17523
+ auto static destructor = [](uint64_t p) {
17524
+ auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
17525
+ RustCallStatus status = {0};
17526
+ uniffi_breez_sdk_spark_fn_free_passkey(pointer, &status);
17527
+ };
17528
+ auto ptrObj =
17529
+ std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
17530
+ auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
17531
+ return jsi::Value(rt, obj);
17532
+ }
17533
+ jsi::Value NativeBreezSdkSpark::
17534
+ cpp_uniffi_internal_fn_method_passkeyprfprovider_ffi__bless_pointer(
17535
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17536
+ size_t count) {
17537
+ auto pointer =
17538
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
17539
+ auto static destructor = [](uint64_t p) {
17540
+ auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
17541
+ RustCallStatus status = {0};
17542
+ uniffi_breez_sdk_spark_fn_free_passkeyprfprovider(pointer, &status);
17543
+ };
17544
+ auto ptrObj =
17545
+ std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
17546
+ auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
17547
+ return jsi::Value(rt, obj);
17548
+ }
16833
17549
  jsi::Value NativeBreezSdkSpark::
16834
17550
  cpp_uniffi_internal_fn_method_paymentobserver_ffi__bless_pointer(
16835
17551
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -16938,21 +17654,6 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
16938
17654
 
16939
17655
  return jsi::Value::undefined();
16940
17656
  }
16941
- jsi::Value NativeBreezSdkSpark::
16942
- cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
16943
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
16944
- size_t count) {
16945
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
16946
- UniffiVTableCallbackInterfaceBitcoinChainService>::fromJs(rt, callInvoker,
16947
- args[0]);
16948
-
16949
- std::lock_guard<std::mutex> lock(
16950
- uniffi::breez_sdk_spark::registry::vtableMutex);
16951
- uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
16952
- uniffi::breez_sdk_spark::registry::putTable(
16953
- "UniffiVTableCallbackInterfaceBitcoinChainService", vtableInstance));
16954
- return jsi::Value::undefined();
16955
- }
16956
17657
  jsi::Value NativeBreezSdkSpark::
16957
17658
  cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_utxos(
16958
17659
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -17553,21 +18254,6 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_externalsigner(
17553
18254
 
17554
18255
  return jsi::Value::undefined();
17555
18256
  }
17556
- jsi::Value NativeBreezSdkSpark::
17557
- cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
17558
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17559
- size_t count) {
17560
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
17561
- UniffiVTableCallbackInterfaceExternalSigner>::fromJs(rt, callInvoker,
17562
- args[0]);
17563
-
17564
- std::lock_guard<std::mutex> lock(
17565
- uniffi::breez_sdk_spark::registry::vtableMutex);
17566
- uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
17567
- uniffi::breez_sdk_spark::registry::putTable(
17568
- "UniffiVTableCallbackInterfaceExternalSigner", vtableInstance));
17569
- return jsi::Value::undefined();
17570
- }
17571
18257
  jsi::Value NativeBreezSdkSpark::
17572
18258
  cpp_uniffi_breez_sdk_spark_fn_method_externalsigner_identity_public_key(
17573
18259
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -17860,37 +18546,156 @@ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_fiatservice(
17860
18546
  return jsi::Value::undefined();
17861
18547
  }
17862
18548
  jsi::Value NativeBreezSdkSpark::
17863
- cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
18549
+ cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(
17864
18550
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17865
18551
  size_t count) {
17866
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
17867
- UniffiVTableCallbackInterfaceFiatService>::fromJs(rt, callInvoker,
17868
- args[0]);
18552
+ auto value =
18553
+ uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(
18554
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
18555
+
18556
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
18557
+ value);
18558
+ }
18559
+ jsi::Value NativeBreezSdkSpark::
18560
+ cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(
18561
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18562
+ size_t count) {
18563
+ auto value = uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(
18564
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
18565
+
18566
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
18567
+ value);
18568
+ }
18569
+ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_passkey(
18570
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18571
+ size_t count) {
18572
+ RustCallStatus status =
18573
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
18574
+ auto value = uniffi_breez_sdk_spark_fn_clone_passkey(
18575
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
18576
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
18577
+ rt, callInvoker, status, args[count - 1]);
18578
+
18579
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
18580
+ }
18581
+ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_passkey(
18582
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18583
+ size_t count) {
18584
+ RustCallStatus status =
18585
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
18586
+ uniffi_breez_sdk_spark_fn_free_passkey(
18587
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
18588
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
18589
+ rt, callInvoker, status, args[count - 1]);
18590
+
18591
+ return jsi::Value::undefined();
18592
+ }
18593
+ jsi::Value
18594
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_constructor_passkey_new(
18595
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18596
+ size_t count) {
18597
+ RustCallStatus status =
18598
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
18599
+ auto value = uniffi_breez_sdk_spark_fn_constructor_passkey_new(
18600
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
18601
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
18602
+ args[1]),
18603
+ &status);
18604
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
18605
+ rt, callInvoker, status, args[count - 1]);
18606
+
18607
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
18608
+ }
18609
+ jsi::Value
18610
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_passkey_get_wallet(
18611
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18612
+ size_t count) {
18613
+ auto value = uniffi_breez_sdk_spark_fn_method_passkey_get_wallet(
18614
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
18615
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
18616
+ args[1]));
18617
+
18618
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
18619
+ value);
18620
+ }
18621
+ jsi::Value
18622
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_passkey_is_available(
18623
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18624
+ size_t count) {
18625
+ auto value = uniffi_breez_sdk_spark_fn_method_passkey_is_available(
18626
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
18627
+
18628
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
18629
+ value);
18630
+ }
18631
+ jsi::Value NativeBreezSdkSpark::
18632
+ cpp_uniffi_breez_sdk_spark_fn_method_passkey_list_wallet_names(
18633
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18634
+ size_t count) {
18635
+ auto value = uniffi_breez_sdk_spark_fn_method_passkey_list_wallet_names(
18636
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
18637
+
18638
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
18639
+ value);
18640
+ }
18641
+ jsi::Value NativeBreezSdkSpark::
18642
+ cpp_uniffi_breez_sdk_spark_fn_method_passkey_store_wallet_name(
18643
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18644
+ size_t count) {
18645
+ auto value = uniffi_breez_sdk_spark_fn_method_passkey_store_wallet_name(
18646
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
18647
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
18648
+ args[1]));
18649
+
18650
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
18651
+ value);
18652
+ }
18653
+ jsi::Value
18654
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_passkeyprfprovider(
18655
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18656
+ size_t count) {
18657
+ RustCallStatus status =
18658
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
18659
+ auto value = uniffi_breez_sdk_spark_fn_clone_passkeyprfprovider(
18660
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
18661
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
18662
+ rt, callInvoker, status, args[count - 1]);
18663
+
18664
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
18665
+ }
18666
+ jsi::Value
18667
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_passkeyprfprovider(
18668
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18669
+ size_t count) {
18670
+ RustCallStatus status =
18671
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
18672
+ uniffi_breez_sdk_spark_fn_free_passkeyprfprovider(
18673
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
18674
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
18675
+ rt, callInvoker, status, args[count - 1]);
17869
18676
 
17870
- std::lock_guard<std::mutex> lock(
17871
- uniffi::breez_sdk_spark::registry::vtableMutex);
17872
- uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
17873
- uniffi::breez_sdk_spark::registry::putTable(
17874
- "UniffiVTableCallbackInterfaceFiatService", vtableInstance));
17875
18677
  return jsi::Value::undefined();
17876
18678
  }
17877
18679
  jsi::Value NativeBreezSdkSpark::
17878
- cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(
18680
+ cpp_uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_derive_prf_seed(
17879
18681
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17880
18682
  size_t count) {
17881
- auto value =
17882
- uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(
17883
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
18683
+ auto value =
18684
+ uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_derive_prf_seed(
18685
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
18686
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
18687
+ args[1]));
17884
18688
 
17885
18689
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
17886
18690
  value);
17887
18691
  }
17888
18692
  jsi::Value NativeBreezSdkSpark::
17889
- cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(
18693
+ cpp_uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_is_prf_available(
17890
18694
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17891
18695
  size_t count) {
17892
- auto value = uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_rates(
17893
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
18696
+ auto value =
18697
+ uniffi_breez_sdk_spark_fn_method_passkeyprfprovider_is_prf_available(
18698
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
17894
18699
 
17895
18700
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
17896
18701
  value);
@@ -17921,21 +18726,6 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_paymentobserver(
17921
18726
 
17922
18727
  return jsi::Value::undefined();
17923
18728
  }
17924
- jsi::Value NativeBreezSdkSpark::
17925
- cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
17926
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17927
- size_t count) {
17928
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
17929
- UniffiVTableCallbackInterfacePaymentObserver>::fromJs(rt, callInvoker,
17930
- args[0]);
17931
-
17932
- std::lock_guard<std::mutex> lock(
17933
- uniffi::breez_sdk_spark::registry::vtableMutex);
17934
- uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
17935
- uniffi::breez_sdk_spark::registry::putTable(
17936
- "UniffiVTableCallbackInterfacePaymentObserver", vtableInstance));
17937
- return jsi::Value::undefined();
17938
- }
17939
18729
  jsi::Value NativeBreezSdkSpark::
17940
18730
  cpp_uniffi_breez_sdk_spark_fn_method_paymentobserver_before_send(
17941
18731
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -17972,21 +18762,6 @@ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_restclient(
17972
18762
 
17973
18763
  return jsi::Value::undefined();
17974
18764
  }
17975
- jsi::Value NativeBreezSdkSpark::
17976
- cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
17977
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
17978
- size_t count) {
17979
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
17980
- UniffiVTableCallbackInterfaceRestClient>::fromJs(rt, callInvoker,
17981
- args[0]);
17982
-
17983
- std::lock_guard<std::mutex> lock(
17984
- uniffi::breez_sdk_spark::registry::vtableMutex);
17985
- uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
17986
- uniffi::breez_sdk_spark::registry::putTable(
17987
- "UniffiVTableCallbackInterfaceRestClient", vtableInstance));
17988
- return jsi::Value::undefined();
17989
- }
17990
18765
  jsi::Value NativeBreezSdkSpark::
17991
18766
  cpp_uniffi_breez_sdk_spark_fn_method_restclient_get_request(
17992
18767
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -18205,20 +18980,6 @@ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_storage(
18205
18980
 
18206
18981
  return jsi::Value::undefined();
18207
18982
  }
18208
- jsi::Value
18209
- NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
18210
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18211
- size_t count) {
18212
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
18213
- UniffiVTableCallbackInterfaceStorage>::fromJs(rt, callInvoker, args[0]);
18214
-
18215
- std::lock_guard<std::mutex> lock(
18216
- uniffi::breez_sdk_spark::registry::vtableMutex);
18217
- uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
18218
- uniffi::breez_sdk_spark::registry::putTable(
18219
- "UniffiVTableCallbackInterfaceStorage", vtableInstance));
18220
- return jsi::Value::undefined();
18221
- }
18222
18983
  jsi::Value NativeBreezSdkSpark::
18223
18984
  cpp_uniffi_breez_sdk_spark_fn_method_storage_delete_cached_item(
18224
18985
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -18657,35 +19418,6 @@ jsi::Value NativeBreezSdkSpark::
18657
19418
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
18658
19419
  value);
18659
19420
  }
18660
- jsi::Value NativeBreezSdkSpark::
18661
- cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
18662
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18663
- size_t count) {
18664
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
18665
- UniffiVTableCallbackInterfaceEventListener>::fromJs(rt, callInvoker,
18666
- args[0]);
18667
-
18668
- std::lock_guard<std::mutex> lock(
18669
- uniffi::breez_sdk_spark::registry::vtableMutex);
18670
- uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
18671
- uniffi::breez_sdk_spark::registry::putTable(
18672
- "UniffiVTableCallbackInterfaceEventListener", vtableInstance));
18673
- return jsi::Value::undefined();
18674
- }
18675
- jsi::Value
18676
- NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
18677
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18678
- size_t count) {
18679
- auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
18680
- UniffiVTableCallbackInterfaceLogger>::fromJs(rt, callInvoker, args[0]);
18681
-
18682
- std::lock_guard<std::mutex> lock(
18683
- uniffi::breez_sdk_spark::registry::vtableMutex);
18684
- uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
18685
- uniffi::breez_sdk_spark::registry::putTable(
18686
- "UniffiVTableCallbackInterfaceLogger", vtableInstance));
18687
- return jsi::Value::undefined();
18688
- }
18689
19421
  jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_connect(
18690
19422
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
18691
19423
  size_t count) {
@@ -20028,6 +20760,58 @@ jsi::Value NativeBreezSdkSpark::
20028
20760
 
20029
20761
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20030
20762
  }
20763
+ jsi::Value NativeBreezSdkSpark::
20764
+ cpp_uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet(
20765
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
20766
+ size_t count) {
20767
+ auto value = uniffi_breez_sdk_spark_checksum_method_passkey_get_wallet();
20768
+
20769
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20770
+ }
20771
+ jsi::Value NativeBreezSdkSpark::
20772
+ cpp_uniffi_breez_sdk_spark_checksum_method_passkey_is_available(
20773
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
20774
+ size_t count) {
20775
+ auto value = uniffi_breez_sdk_spark_checksum_method_passkey_is_available();
20776
+
20777
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20778
+ }
20779
+ jsi::Value NativeBreezSdkSpark::
20780
+ cpp_uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_names(
20781
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
20782
+ size_t count) {
20783
+ auto value =
20784
+ uniffi_breez_sdk_spark_checksum_method_passkey_list_wallet_names();
20785
+
20786
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20787
+ }
20788
+ jsi::Value NativeBreezSdkSpark::
20789
+ cpp_uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_name(
20790
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
20791
+ size_t count) {
20792
+ auto value =
20793
+ uniffi_breez_sdk_spark_checksum_method_passkey_store_wallet_name();
20794
+
20795
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20796
+ }
20797
+ jsi::Value NativeBreezSdkSpark::
20798
+ cpp_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_derive_prf_seed(
20799
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
20800
+ size_t count) {
20801
+ auto value =
20802
+ uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_derive_prf_seed();
20803
+
20804
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20805
+ }
20806
+ jsi::Value NativeBreezSdkSpark::
20807
+ cpp_uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_is_prf_available(
20808
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
20809
+ size_t count) {
20810
+ auto value =
20811
+ uniffi_breez_sdk_spark_checksum_method_passkeyprfprovider_is_prf_available();
20812
+
20813
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20814
+ }
20031
20815
  jsi::Value NativeBreezSdkSpark::
20032
20816
  cpp_uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send(
20033
20817
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -20434,6 +21218,14 @@ jsi::Value NativeBreezSdkSpark::
20434
21218
 
20435
21219
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
20436
21220
  }
21221
+ jsi::Value NativeBreezSdkSpark::
21222
+ cpp_uniffi_breez_sdk_spark_checksum_constructor_passkey_new(
21223
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21224
+ size_t count) {
21225
+ auto value = uniffi_breez_sdk_spark_checksum_constructor_passkey_new();
21226
+
21227
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
21228
+ }
20437
21229
  jsi::Value NativeBreezSdkSpark::
20438
21230
  cpp_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new(
20439
21231
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -20464,4 +21256,137 @@ jsi::Value NativeBreezSdkSpark::cpp_ffi_breez_sdk_spark_uniffi_contract_version(
20464
21256
  auto value = ffi_breez_sdk_spark_uniffi_contract_version();
20465
21257
 
20466
21258
  return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
21259
+ }
21260
+ jsi::Value NativeBreezSdkSpark::
21261
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
21262
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21263
+ size_t count) {
21264
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21265
+ UniffiVTableCallbackInterfaceEventListener>::fromJs(rt, callInvoker,
21266
+ args[0]);
21267
+
21268
+ std::lock_guard<std::mutex> lock(
21269
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21270
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
21271
+ uniffi::breez_sdk_spark::registry::putTable(
21272
+ "UniffiVTableCallbackInterfaceEventListener", vtableInstance));
21273
+ return jsi::Value::undefined();
21274
+ }
21275
+ jsi::Value
21276
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
21277
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21278
+ size_t count) {
21279
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21280
+ UniffiVTableCallbackInterfaceLogger>::fromJs(rt, callInvoker, args[0]);
21281
+
21282
+ std::lock_guard<std::mutex> lock(
21283
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21284
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
21285
+ uniffi::breez_sdk_spark::registry::putTable(
21286
+ "UniffiVTableCallbackInterfaceLogger", vtableInstance));
21287
+ return jsi::Value::undefined();
21288
+ }
21289
+ jsi::Value NativeBreezSdkSpark::
21290
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
21291
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21292
+ size_t count) {
21293
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21294
+ UniffiVTableCallbackInterfaceBitcoinChainService>::fromJs(rt, callInvoker,
21295
+ args[0]);
21296
+
21297
+ std::lock_guard<std::mutex> lock(
21298
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21299
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
21300
+ uniffi::breez_sdk_spark::registry::putTable(
21301
+ "UniffiVTableCallbackInterfaceBitcoinChainService", vtableInstance));
21302
+ return jsi::Value::undefined();
21303
+ }
21304
+ jsi::Value NativeBreezSdkSpark::
21305
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
21306
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21307
+ size_t count) {
21308
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21309
+ UniffiVTableCallbackInterfaceExternalSigner>::fromJs(rt, callInvoker,
21310
+ args[0]);
21311
+
21312
+ std::lock_guard<std::mutex> lock(
21313
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21314
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
21315
+ uniffi::breez_sdk_spark::registry::putTable(
21316
+ "UniffiVTableCallbackInterfaceExternalSigner", vtableInstance));
21317
+ return jsi::Value::undefined();
21318
+ }
21319
+ jsi::Value NativeBreezSdkSpark::
21320
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
21321
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21322
+ size_t count) {
21323
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21324
+ UniffiVTableCallbackInterfaceFiatService>::fromJs(rt, callInvoker,
21325
+ args[0]);
21326
+
21327
+ std::lock_guard<std::mutex> lock(
21328
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21329
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
21330
+ uniffi::breez_sdk_spark::registry::putTable(
21331
+ "UniffiVTableCallbackInterfaceFiatService", vtableInstance));
21332
+ return jsi::Value::undefined();
21333
+ }
21334
+ jsi::Value NativeBreezSdkSpark::
21335
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_passkeyprfprovider(
21336
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21337
+ size_t count) {
21338
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21339
+ UniffiVTableCallbackInterfacePasskeyPrfProvider>::fromJs(rt, callInvoker,
21340
+ args[0]);
21341
+
21342
+ std::lock_guard<std::mutex> lock(
21343
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21344
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_passkeyprfprovider(
21345
+ uniffi::breez_sdk_spark::registry::putTable(
21346
+ "UniffiVTableCallbackInterfacePasskeyPrfProvider", vtableInstance));
21347
+ return jsi::Value::undefined();
21348
+ }
21349
+ jsi::Value NativeBreezSdkSpark::
21350
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
21351
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21352
+ size_t count) {
21353
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21354
+ UniffiVTableCallbackInterfacePaymentObserver>::fromJs(rt, callInvoker,
21355
+ args[0]);
21356
+
21357
+ std::lock_guard<std::mutex> lock(
21358
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21359
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
21360
+ uniffi::breez_sdk_spark::registry::putTable(
21361
+ "UniffiVTableCallbackInterfacePaymentObserver", vtableInstance));
21362
+ return jsi::Value::undefined();
21363
+ }
21364
+ jsi::Value NativeBreezSdkSpark::
21365
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
21366
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21367
+ size_t count) {
21368
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21369
+ UniffiVTableCallbackInterfaceRestClient>::fromJs(rt, callInvoker,
21370
+ args[0]);
21371
+
21372
+ std::lock_guard<std::mutex> lock(
21373
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21374
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
21375
+ uniffi::breez_sdk_spark::registry::putTable(
21376
+ "UniffiVTableCallbackInterfaceRestClient", vtableInstance));
21377
+ return jsi::Value::undefined();
21378
+ }
21379
+ jsi::Value
21380
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
21381
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21382
+ size_t count) {
21383
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
21384
+ UniffiVTableCallbackInterfaceStorage>::fromJs(rt, callInvoker, args[0]);
21385
+
21386
+ std::lock_guard<std::mutex> lock(
21387
+ uniffi::breez_sdk_spark::registry::vtableMutex);
21388
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
21389
+ uniffi::breez_sdk_spark::registry::putTable(
21390
+ "UniffiVTableCallbackInterfaceStorage", vtableInstance));
21391
+ return jsi::Value::undefined();
20467
21392
  }