@breeztech/breez-sdk-spark-react-native 0.11.0-dev2 → 0.12.1

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