@breeztech/breez-sdk-spark-react-native 0.18.0-dev4 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,6 +155,22 @@ typedef void (*UniffiCallbackInterfaceExternalBreezSignerMethod6)(
155
155
  uint64_t uniffi_handle, RustBuffer message, RustBuffer path,
156
156
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
157
157
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
158
+ typedef void (*UniffiCallbackInterfaceExternalSigningSignerMethod0)(
159
+ uint64_t uniffi_handle, RustBuffer path,
160
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
161
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
162
+ typedef void (*UniffiCallbackInterfaceExternalSigningSignerMethod1)(
163
+ uint64_t uniffi_handle, RustBuffer message, RustBuffer path,
164
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
165
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
166
+ typedef void (*UniffiCallbackInterfaceExternalSigningSignerMethod2)(
167
+ uint64_t uniffi_handle, RustBuffer message, RustBuffer path,
168
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
169
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
170
+ typedef void (*UniffiCallbackInterfaceExternalSigningSignerMethod3)(
171
+ uint64_t uniffi_handle, RustBuffer hash, RustBuffer path,
172
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
173
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
158
174
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod0)(
159
175
  uint64_t uniffi_handle,
160
176
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
@@ -164,23 +180,22 @@ typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod1)(
164
180
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
165
181
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
166
182
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod2)(
167
- uint64_t uniffi_handle, uint32_t index,
168
- UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
169
- uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
183
+ uint64_t uniffi_handle, int8_t *uniffi_out_return,
184
+ RustCallStatus *rust_call_status);
170
185
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod3)(
171
- uint64_t uniffi_handle, RustBuffer challenge,
186
+ uint64_t uniffi_handle, uint32_t index,
172
187
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
173
188
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
174
189
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod4)(
175
- uint64_t uniffi_handle, RustBuffer message,
190
+ uint64_t uniffi_handle, RustBuffer challenge,
176
191
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
177
192
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
178
193
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod5)(
179
- uint64_t uniffi_handle, RustBuffer jobs,
194
+ uint64_t uniffi_handle, RustBuffer message,
180
195
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
181
196
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
182
197
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod6)(
183
- uint64_t uniffi_handle, RustBuffer request,
198
+ uint64_t uniffi_handle, RustBuffer jobs,
184
199
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
185
200
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
186
201
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod7)(
@@ -215,6 +230,10 @@ typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod14)(
215
230
  uint64_t uniffi_handle, RustBuffer request,
216
231
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
217
232
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
233
+ typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod15)(
234
+ uint64_t uniffi_handle, RustBuffer request,
235
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
236
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
218
237
  typedef void (*UniffiCallbackInterfaceFiatServiceMethod0)(
219
238
  uint64_t uniffi_handle,
220
239
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
@@ -418,25 +437,33 @@ typedef struct UniffiVTableCallbackInterfaceExternalBreezSigner {
418
437
  UniffiCallbackInterfaceExternalBreezSignerMethod6 hmac_sha256;
419
438
  UniffiCallbackInterfaceFree uniffi_free;
420
439
  } UniffiVTableCallbackInterfaceExternalBreezSigner;
440
+ typedef struct UniffiVTableCallbackInterfaceExternalSigningSigner {
441
+ UniffiCallbackInterfaceExternalSigningSignerMethod0 derive_public_key;
442
+ UniffiCallbackInterfaceExternalSigningSignerMethod1 sign_ecdsa;
443
+ UniffiCallbackInterfaceExternalSigningSignerMethod2 sign_ecdsa_recoverable;
444
+ UniffiCallbackInterfaceExternalSigningSignerMethod3 sign_hash_schnorr;
445
+ UniffiCallbackInterfaceFree uniffi_free;
446
+ } UniffiVTableCallbackInterfaceExternalSigningSigner;
421
447
  typedef struct UniffiVTableCallbackInterfaceExternalSparkSigner {
422
448
  UniffiCallbackInterfaceExternalSparkSignerMethod0 get_identity_public_key;
423
449
  UniffiCallbackInterfaceExternalSparkSignerMethod1 get_public_key_for_leaf;
424
- UniffiCallbackInterfaceExternalSparkSignerMethod2
425
- get_static_deposit_public_key;
450
+ UniffiCallbackInterfaceExternalSparkSignerMethod2 is_remote;
426
451
  UniffiCallbackInterfaceExternalSparkSignerMethod3
452
+ get_static_deposit_public_key;
453
+ UniffiCallbackInterfaceExternalSparkSignerMethod4
427
454
  sign_authentication_challenge;
428
- UniffiCallbackInterfaceExternalSparkSignerMethod4 sign_message;
429
- UniffiCallbackInterfaceExternalSparkSignerMethod5 sign_frost;
430
- UniffiCallbackInterfaceExternalSparkSignerMethod6 prepare_transfer;
431
- UniffiCallbackInterfaceExternalSparkSignerMethod7 prepare_claim;
432
- UniffiCallbackInterfaceExternalSparkSignerMethod8 prepare_lightning_receive;
433
- UniffiCallbackInterfaceExternalSparkSignerMethod9 prepare_static_deposit;
434
- UniffiCallbackInterfaceExternalSparkSignerMethod10
455
+ UniffiCallbackInterfaceExternalSparkSignerMethod5 sign_message;
456
+ UniffiCallbackInterfaceExternalSparkSignerMethod6 sign_frost;
457
+ UniffiCallbackInterfaceExternalSparkSignerMethod7 prepare_transfer;
458
+ UniffiCallbackInterfaceExternalSparkSignerMethod8 prepare_claim;
459
+ UniffiCallbackInterfaceExternalSparkSignerMethod9 prepare_lightning_receive;
460
+ UniffiCallbackInterfaceExternalSparkSignerMethod10 prepare_static_deposit;
461
+ UniffiCallbackInterfaceExternalSparkSignerMethod11
435
462
  start_static_deposit_refund;
436
- UniffiCallbackInterfaceExternalSparkSignerMethod11 sign_static_deposit_refund;
437
- UniffiCallbackInterfaceExternalSparkSignerMethod12 sign_spark_invoice;
438
- UniffiCallbackInterfaceExternalSparkSignerMethod13 prepare_token_transaction;
439
- UniffiCallbackInterfaceExternalSparkSignerMethod14
463
+ UniffiCallbackInterfaceExternalSparkSignerMethod12 sign_static_deposit_refund;
464
+ UniffiCallbackInterfaceExternalSparkSignerMethod13 sign_spark_invoice;
465
+ UniffiCallbackInterfaceExternalSparkSignerMethod14 prepare_token_transaction;
466
+ UniffiCallbackInterfaceExternalSparkSignerMethod15
440
467
  prepare_static_deposit_claim;
441
468
  UniffiCallbackInterfaceFree uniffi_free;
442
469
  } UniffiVTableCallbackInterfaceExternalSparkSigner;
@@ -540,6 +567,12 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(void *ptr,
540
567
  uniffi_breez_sdk_spark_fn_method_breezsdk_authorize_lightning_address_transfer(
541
568
  void *ptr, RustBuffer request);
542
569
  /*handle*/ uint64_t
570
+ uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_pay_package(
571
+ void *ptr, RustBuffer request);
572
+ /*handle*/ uint64_t
573
+ uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_transfer_package(
574
+ void *ptr, RustBuffer request);
575
+ /*handle*/ uint64_t
543
576
  uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin(void *ptr,
544
577
  RustBuffer request);
545
578
  /*handle*/ uint64_t
@@ -621,6 +654,12 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(void *ptr,
621
654
  uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
622
655
  void *ptr, RustBuffer request);
623
656
  /*handle*/ uint64_t
657
+ uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_pay_package(
658
+ void *ptr, RustBuffer request);
659
+ /*handle*/ uint64_t
660
+ uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_transfer_package(
661
+ void *ptr, RustBuffer request);
662
+ /*handle*/ uint64_t
624
663
  uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(void *ptr,
625
664
  RustBuffer request);
626
665
  /*handle*/ uint64_t
@@ -684,6 +723,24 @@ uniffi_breez_sdk_spark_fn_method_externalbreezsigner_sign_hash_schnorr(
684
723
  /*handle*/ uint64_t
685
724
  uniffi_breez_sdk_spark_fn_method_externalbreezsigner_hmac_sha256(
686
725
  void *ptr, RustBuffer message, RustBuffer path);
726
+ void *uniffi_breez_sdk_spark_fn_clone_externalsigningsigner(
727
+ void *ptr, RustCallStatus *uniffi_out_err);
728
+ void uniffi_breez_sdk_spark_fn_free_externalsigningsigner(
729
+ void *ptr, RustCallStatus *uniffi_out_err);
730
+ void uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigningsigner(
731
+ UniffiVTableCallbackInterfaceExternalSigningSigner *vtable);
732
+ /*handle*/ uint64_t
733
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_derive_public_key(
734
+ void *ptr, RustBuffer path);
735
+ /*handle*/ uint64_t
736
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa(
737
+ void *ptr, RustBuffer message, RustBuffer path);
738
+ /*handle*/ uint64_t
739
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa_recoverable(
740
+ void *ptr, RustBuffer message, RustBuffer path);
741
+ /*handle*/ uint64_t
742
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_hash_schnorr(
743
+ void *ptr, RustBuffer hash, RustBuffer path);
687
744
  void *uniffi_breez_sdk_spark_fn_clone_externalsparksigner(
688
745
  void *ptr, RustCallStatus *uniffi_out_err);
689
746
  void uniffi_breez_sdk_spark_fn_free_externalsparksigner(
@@ -696,6 +753,8 @@ uniffi_breez_sdk_spark_fn_method_externalsparksigner_get_identity_public_key(
696
753
  /*handle*/ uint64_t
697
754
  uniffi_breez_sdk_spark_fn_method_externalsparksigner_get_public_key_for_leaf(
698
755
  void *ptr, RustBuffer leaf_id);
756
+ int8_t uniffi_breez_sdk_spark_fn_method_externalsparksigner_is_remote(
757
+ void *ptr, RustCallStatus *uniffi_out_err);
699
758
  /*handle*/ uint64_t
700
759
  uniffi_breez_sdk_spark_fn_method_externalsparksigner_get_static_deposit_public_key(
701
760
  void *ptr, uint32_t index);
@@ -835,6 +894,10 @@ void *uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new(
835
894
  void *uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new_with_signer(
836
895
  RustBuffer config, void *breez_signer, void *spark_signer,
837
896
  RustCallStatus *uniffi_out_err);
897
+ void *
898
+ uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new_with_signing_only_signer(
899
+ RustBuffer config, void *breez_signer, void *spark_signer,
900
+ RustCallStatus *uniffi_out_err);
838
901
  /*handle*/ uint64_t
839
902
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_build(void *ptr);
840
903
  /*handle*/ uint64_t
@@ -859,6 +922,9 @@ uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_payment_observer(
859
922
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
860
923
  void *ptr, RustBuffer url, RustBuffer api_type, RustBuffer credentials);
861
924
  /*handle*/ uint64_t
925
+ uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_session_store(
926
+ void *ptr, void *session_store);
927
+ /*handle*/ uint64_t
862
928
  uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_shared_context(void *ptr,
863
929
  void *context);
864
930
  /*handle*/ uint64_t
@@ -1013,7 +1079,13 @@ void uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
1013
1079
  /*handle*/ uint64_t
1014
1080
  uniffi_breez_sdk_spark_fn_func_connect_with_signer(RustBuffer request);
1015
1081
  /*handle*/ uint64_t
1082
+ uniffi_breez_sdk_spark_fn_func_connect_with_signing_only_signer(
1083
+ RustBuffer request);
1084
+ /*handle*/ uint64_t
1016
1085
  uniffi_breez_sdk_spark_fn_func_create_turnkey_signer(RustBuffer config);
1086
+ /*handle*/ uint64_t
1087
+ uniffi_breez_sdk_spark_fn_func_create_turnkey_signing_only_signer(
1088
+ RustBuffer config);
1017
1089
  void *
1018
1090
  uniffi_breez_sdk_spark_fn_func_custom_storage(void *storage,
1019
1091
  RustCallStatus *uniffi_out_err);
@@ -1025,6 +1097,8 @@ RustBuffer uniffi_breez_sdk_spark_fn_func_default_external_signers(
1025
1097
  RustBuffer account_number, RustCallStatus *uniffi_out_err);
1026
1098
  RustBuffer uniffi_breez_sdk_spark_fn_func_default_server_config(
1027
1099
  RustBuffer network, RustCallStatus *uniffi_out_err);
1100
+ /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_func_default_session_store(
1101
+ void *backend, RustBuffer network, RustBuffer identity);
1028
1102
  void *
1029
1103
  uniffi_breez_sdk_spark_fn_func_default_storage(RustBuffer storage_dir,
1030
1104
  RustCallStatus *uniffi_out_err);
@@ -1166,11 +1240,16 @@ void ffi_breez_sdk_spark_rust_future_complete_void(
1166
1240
  /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
1167
1241
  uint16_t uniffi_breez_sdk_spark_checksum_func_connect();
1168
1242
  uint16_t uniffi_breez_sdk_spark_checksum_func_connect_with_signer();
1243
+ uint16_t
1244
+ uniffi_breez_sdk_spark_checksum_func_connect_with_signing_only_signer();
1169
1245
  uint16_t uniffi_breez_sdk_spark_checksum_func_create_turnkey_signer();
1246
+ uint16_t
1247
+ uniffi_breez_sdk_spark_checksum_func_create_turnkey_signing_only_signer();
1170
1248
  uint16_t uniffi_breez_sdk_spark_checksum_func_custom_storage();
1171
1249
  uint16_t uniffi_breez_sdk_spark_checksum_func_default_config();
1172
1250
  uint16_t uniffi_breez_sdk_spark_checksum_func_default_external_signers();
1173
1251
  uint16_t uniffi_breez_sdk_spark_checksum_func_default_server_config();
1252
+ uint16_t uniffi_breez_sdk_spark_checksum_func_default_session_store();
1174
1253
  uint16_t uniffi_breez_sdk_spark_checksum_func_default_storage();
1175
1254
  uint16_t uniffi_breez_sdk_spark_checksum_func_get_spark_status();
1176
1255
  uint16_t uniffi_breez_sdk_spark_checksum_func_init_logging();
@@ -1190,6 +1269,10 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact();
1190
1269
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener();
1191
1270
  uint16_t
1192
1271
  uniffi_breez_sdk_spark_checksum_method_breezsdk_authorize_lightning_address_transfer();
1272
+ uint16_t
1273
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package();
1274
+ uint16_t
1275
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_transfer_package();
1193
1276
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin();
1194
1277
  uint16_t
1195
1278
  uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available();
@@ -1227,6 +1310,10 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_optimize_leaves();
1227
1310
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_parse();
1228
1311
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay();
1229
1312
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment();
1313
+ uint16_t
1314
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package();
1315
+ uint16_t
1316
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_transfer_package();
1230
1317
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment();
1231
1318
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees();
1232
1319
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit();
@@ -1258,9 +1345,18 @@ uniffi_breez_sdk_spark_checksum_method_externalbreezsigner_sign_hash_schnorr();
1258
1345
  uint16_t
1259
1346
  uniffi_breez_sdk_spark_checksum_method_externalbreezsigner_hmac_sha256();
1260
1347
  uint16_t
1348
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_derive_public_key();
1349
+ uint16_t
1350
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa();
1351
+ uint16_t
1352
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa_recoverable();
1353
+ uint16_t
1354
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_hash_schnorr();
1355
+ uint16_t
1261
1356
  uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_identity_public_key();
1262
1357
  uint16_t
1263
1358
  uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_public_key_for_leaf();
1359
+ uint16_t uniffi_breez_sdk_spark_checksum_method_externalsparksigner_is_remote();
1264
1360
  uint16_t
1265
1361
  uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_static_deposit_public_key();
1266
1362
  uint16_t
@@ -1321,6 +1417,7 @@ uint16_t
1321
1417
  uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer();
1322
1418
  uint16_t
1323
1419
  uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service();
1420
+ uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_store();
1324
1421
  uint16_t
1325
1422
  uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_shared_context();
1326
1423
  uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage();
@@ -1385,6 +1482,8 @@ uint16_t uniffi_breez_sdk_spark_checksum_constructor_passkeyclient_new();
1385
1482
  uint16_t uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new();
1386
1483
  uint16_t
1387
1484
  uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_with_signer();
1485
+ uint16_t
1486
+ uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_with_signing_only_signer();
1388
1487
  uint16_t uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event();
1389
1488
  uint16_t uniffi_breez_sdk_spark_checksum_method_logger_log();
1390
1489
  uint32_t ffi_breez_sdk_spark_uniffi_contract_version();
@@ -2305,6 +2404,119 @@ static void cleanup() {
2305
2404
  } // namespace
2306
2405
  // uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalbreezsigner::vtablecallbackinterfaceexternalbreezsigner::free
2307
2406
 
2407
+ // Callback function:
2408
+ // uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalsigningsigner::vtablecallbackinterfaceexternalsigningsigner::free::UniffiCallbackInterfaceFree
2409
+ //
2410
+ // We have the following constraints:
2411
+ // - we need to pass a function pointer to Rust.
2412
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
2413
+ // - function pointers can't store state, so we can't use a lamda.
2414
+ //
2415
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
2416
+ // function calls the lambda, which itself calls the `body` which then calls
2417
+ // into JS.
2418
+ //
2419
+ // We then give the `callback` function pointer to Rust which will call the
2420
+ // lambda sometime in the future.
2421
+ namespace uniffi::breez_sdk_spark::st::
2422
+ vtablecallbackinterfaceexternalsigningsigner::
2423
+ vtablecallbackinterfaceexternalsigningsigner::free {
2424
+ using namespace facebook;
2425
+
2426
+ // We need to store a lambda in a global so we can call it from
2427
+ // a function pointer. The function pointer is passed to Rust.
2428
+ static std::function<void(uint64_t)> rsLambda = nullptr;
2429
+
2430
+ // This is the main body of the callback. It's called from the lambda,
2431
+ // which itself is called from the callback function which is passed to Rust.
2432
+ static void body(jsi::Runtime &rt,
2433
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
2434
+ std::shared_ptr<jsi::Value> callbackValue,
2435
+ uint64_t rs_handle) {
2436
+
2437
+ // Convert the arguments from Rust, into jsi::Values.
2438
+ // We'll use the Bridging class to do this…
2439
+ auto js_handle =
2440
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
2441
+
2442
+ // Now we are ready to call the callback.
2443
+ // We are already on the JS thread, because this `body` function was
2444
+ // invoked from the CallInvoker.
2445
+ try {
2446
+ // Getting the callback function
2447
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
2448
+ auto uniffiResult = cb.call(rt, js_handle);
2449
+
2450
+ } catch (const jsi::JSError &error) {
2451
+ std::cout << "Error in callback UniffiCallbackInterfaceFree: "
2452
+ << error.what() << std::endl;
2453
+ throw error;
2454
+ }
2455
+ }
2456
+
2457
+ static void callback(uint64_t rs_handle) {
2458
+ // If the runtime has shutdown, then there is no point in trying to
2459
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
2460
+ //
2461
+ // Answer: the module destructor calls into callback `cleanup` method,
2462
+ // which nulls out the rsLamda.
2463
+ //
2464
+ // If rsLamda is null, then there is no runtime to call into.
2465
+ if (rsLambda == nullptr) {
2466
+ // This only occurs when destructors are calling into Rust free/drop,
2467
+ // which causes the JS callback to be dropped.
2468
+ return;
2469
+ }
2470
+
2471
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
2472
+ // are all in the lambda.
2473
+ rsLambda(rs_handle);
2474
+ }
2475
+
2476
+ static UniffiCallbackInterfaceFree
2477
+ makeCallbackFunction( // uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalsigningsigner::vtablecallbackinterfaceexternalsigningsigner::free
2478
+ jsi::Runtime &rt,
2479
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
2480
+ const jsi::Value &value) {
2481
+ if (rsLambda != nullptr) {
2482
+ // `makeCallbackFunction` is called in two circumstances:
2483
+ //
2484
+ // 1. at startup, when initializing callback interface vtables.
2485
+ // 2. when polling futures. This happens at least once per future that is
2486
+ // exposed to Javascript. We know that this is always the same function,
2487
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
2488
+ //
2489
+ // We can therefore return the callback function without making anything
2490
+ // new if we've been initialized already.
2491
+ return callback;
2492
+ }
2493
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
2494
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
2495
+ rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
2496
+ // We immediately make a lambda which will do the work of transforming the
2497
+ // arguments into JSI values and calling the callback.
2498
+ uniffi_runtime::UniffiCallFunc jsLambda =
2499
+ [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable {
2500
+ body(rt, callInvoker, callbackValue, rs_handle);
2501
+ };
2502
+ // We'll then call that lambda from the callInvoker which will
2503
+ // look after calling it on the correct thread.
2504
+
2505
+ callInvoker->invokeNonBlocking(rt, jsLambda);
2506
+ };
2507
+ return callback;
2508
+ }
2509
+
2510
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
2511
+ // happens when the jsi::Runtime is being destroyed.
2512
+ static void cleanup() {
2513
+ // The lambda holds a reference to the the Runtime, so when this is nulled
2514
+ // out, then the pointer will no longer be left dangling.
2515
+ rsLambda = nullptr;
2516
+ }
2517
+ } // namespace
2518
+ // uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalsigningsigner::vtablecallbackinterfaceexternalsigningsigner::free
2519
+
2308
2520
  // Callback function:
2309
2521
  // uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalsparksigner::vtablecallbackinterfaceexternalsparksigner::free::UniffiCallbackInterfaceFree
2310
2522
  //
@@ -6156,10 +6368,10 @@ static void cleanup() {
6156
6368
  } // namespace
6157
6369
  // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalbreezsignermethod6
6158
6370
  // Implementation of callback function calling from Rust to JS
6159
- // CallbackInterfaceExternalSparkSignerMethod0
6371
+ // CallbackInterfaceExternalSigningSignerMethod0
6160
6372
 
6161
6373
  // Callback function:
6162
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod0::UniffiCallbackInterfaceExternalSparkSignerMethod0
6374
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod0::UniffiCallbackInterfaceExternalSigningSignerMethod0
6163
6375
  //
6164
6376
  // We have the following constraints:
6165
6377
  // - we need to pass a function pointer to Rust.
@@ -6173,13 +6385,14 @@ static void cleanup() {
6173
6385
  // We then give the `callback` function pointer to Rust which will call the
6174
6386
  // lambda sometime in the future.
6175
6387
  namespace uniffi::breez_sdk_spark::cb::
6176
- callbackinterfaceexternalsparksignermethod0 {
6388
+ callbackinterfaceexternalsigningsignermethod0 {
6177
6389
  using namespace facebook;
6178
6390
 
6179
6391
  // We need to store a lambda in a global so we can call it from
6180
6392
  // a function pointer. The function pointer is passed to Rust.
6181
- static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
6182
- uint64_t, UniffiForeignFuture *)>
6393
+ static std::function<void(uint64_t, RustBuffer,
6394
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
6395
+ UniffiForeignFuture *)>
6183
6396
  rsLambda = nullptr;
6184
6397
 
6185
6398
  // This is the main body of the callback. It's called from the lambda,
@@ -6187,7 +6400,7 @@ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
6187
6400
  static void body(jsi::Runtime &rt,
6188
6401
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6189
6402
  std::shared_ptr<jsi::Value> callbackValue,
6190
- uint64_t rs_uniffiHandle,
6403
+ uint64_t rs_uniffiHandle, RustBuffer rs_path,
6191
6404
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6192
6405
  uint64_t rs_uniffiCallbackData,
6193
6406
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -6196,6 +6409,8 @@ static void body(jsi::Runtime &rt,
6196
6409
  // We'll use the Bridging class to do this…
6197
6410
  auto js_uniffiHandle =
6198
6411
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
6412
+ auto js_path = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6413
+ rt, callInvoker, rs_path);
6199
6414
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
6200
6415
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
6201
6416
  rs_uniffiFutureCallback);
@@ -6208,8 +6423,8 @@ static void body(jsi::Runtime &rt,
6208
6423
  try {
6209
6424
  // Getting the callback function
6210
6425
  auto cb = callbackValue->asObject(rt).asFunction(rt);
6211
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
6212
- js_uniffiCallbackData);
6426
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_path,
6427
+ js_uniffiFutureCallback, js_uniffiCallbackData);
6213
6428
 
6214
6429
  // return type is MutReference(Struct("ForeignFuture"))
6215
6430
  // Finally, we need to copy the return value back into the Rust pointer.
@@ -6218,14 +6433,14 @@ static void body(jsi::Runtime &rt,
6218
6433
  rt, callInvoker, uniffiResult);
6219
6434
  } catch (const jsi::JSError &error) {
6220
6435
  std::cout << "Error in callback "
6221
- "UniffiCallbackInterfaceExternalSparkSignerMethod0: "
6436
+ "UniffiCallbackInterfaceExternalSigningSignerMethod0: "
6222
6437
  << error.what() << std::endl;
6223
6438
  throw error;
6224
6439
  }
6225
6440
  }
6226
6441
 
6227
6442
  static void
6228
- callback(uint64_t rs_uniffiHandle,
6443
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_path,
6229
6444
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6230
6445
  uint64_t rs_uniffiCallbackData,
6231
6446
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -6244,12 +6459,12 @@ callback(uint64_t rs_uniffiHandle,
6244
6459
 
6245
6460
  // The runtime, the actual callback jsi::funtion, and the callInvoker
6246
6461
  // are all in the lambda.
6247
- rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
6248
- rs_uniffiOutReturn);
6462
+ rsLambda(rs_uniffiHandle, rs_path, rs_uniffiFutureCallback,
6463
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
6249
6464
  }
6250
6465
 
6251
- static UniffiCallbackInterfaceExternalSparkSignerMethod0
6252
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod0
6466
+ static UniffiCallbackInterfaceExternalSigningSignerMethod0
6467
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod0
6253
6468
  jsi::Runtime &rt,
6254
6469
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6255
6470
  const jsi::Value &value) {
@@ -6268,16 +6483,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternals
6268
6483
  auto callbackFunction = value.asObject(rt).asFunction(rt);
6269
6484
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
6270
6485
  rsLambda = [&rt, callInvoker, callbackValue](
6271
- uint64_t rs_uniffiHandle,
6486
+ uint64_t rs_uniffiHandle, RustBuffer rs_path,
6272
6487
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6273
6488
  uint64_t rs_uniffiCallbackData,
6274
6489
  UniffiForeignFuture *rs_uniffiOutReturn) {
6275
6490
  // We immediately make a lambda which will do the work of transforming the
6276
6491
  // arguments into JSI values and calling the callback.
6277
6492
  uniffi_runtime::UniffiCallFunc jsLambda =
6278
- [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
6279
- rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
6280
- body(rt, callInvoker, callbackValue, rs_uniffiHandle,
6493
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_path,
6494
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
6495
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
6496
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_path,
6281
6497
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
6282
6498
  rs_uniffiOutReturn);
6283
6499
  };
@@ -6296,12 +6512,12 @@ static void cleanup() {
6296
6512
  rsLambda = nullptr;
6297
6513
  }
6298
6514
  } // namespace
6299
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod0
6515
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod0
6300
6516
  // Implementation of callback function calling from Rust to JS
6301
- // CallbackInterfaceExternalSparkSignerMethod1
6517
+ // CallbackInterfaceExternalSigningSignerMethod1
6302
6518
 
6303
6519
  // Callback function:
6304
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod1::UniffiCallbackInterfaceExternalSparkSignerMethod1
6520
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod1::UniffiCallbackInterfaceExternalSigningSignerMethod1
6305
6521
  //
6306
6522
  // We have the following constraints:
6307
6523
  // - we need to pass a function pointer to Rust.
@@ -6315,12 +6531,12 @@ static void cleanup() {
6315
6531
  // We then give the `callback` function pointer to Rust which will call the
6316
6532
  // lambda sometime in the future.
6317
6533
  namespace uniffi::breez_sdk_spark::cb::
6318
- callbackinterfaceexternalsparksignermethod1 {
6534
+ callbackinterfaceexternalsigningsignermethod1 {
6319
6535
  using namespace facebook;
6320
6536
 
6321
6537
  // We need to store a lambda in a global so we can call it from
6322
6538
  // a function pointer. The function pointer is passed to Rust.
6323
- static std::function<void(uint64_t, RustBuffer,
6539
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
6324
6540
  UniffiForeignFutureCompleteRustBuffer, uint64_t,
6325
6541
  UniffiForeignFuture *)>
6326
6542
  rsLambda = nullptr;
@@ -6330,7 +6546,8 @@ static std::function<void(uint64_t, RustBuffer,
6330
6546
  static void body(jsi::Runtime &rt,
6331
6547
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6332
6548
  std::shared_ptr<jsi::Value> callbackValue,
6333
- uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
6549
+ uint64_t rs_uniffiHandle, RustBuffer rs_message,
6550
+ RustBuffer rs_path,
6334
6551
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6335
6552
  uint64_t rs_uniffiCallbackData,
6336
6553
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -6339,8 +6556,10 @@ static void body(jsi::Runtime &rt,
6339
6556
  // We'll use the Bridging class to do this…
6340
6557
  auto js_uniffiHandle =
6341
6558
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
6342
- auto js_leafId = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6343
- rt, callInvoker, rs_leafId);
6559
+ auto js_message = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6560
+ rt, callInvoker, rs_message);
6561
+ auto js_path = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6562
+ rt, callInvoker, rs_path);
6344
6563
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
6345
6564
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
6346
6565
  rs_uniffiFutureCallback);
@@ -6353,7 +6572,7 @@ static void body(jsi::Runtime &rt,
6353
6572
  try {
6354
6573
  // Getting the callback function
6355
6574
  auto cb = callbackValue->asObject(rt).asFunction(rt);
6356
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_leafId,
6575
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
6357
6576
  js_uniffiFutureCallback, js_uniffiCallbackData);
6358
6577
 
6359
6578
  // return type is MutReference(Struct("ForeignFuture"))
@@ -6363,14 +6582,14 @@ static void body(jsi::Runtime &rt,
6363
6582
  rt, callInvoker, uniffiResult);
6364
6583
  } catch (const jsi::JSError &error) {
6365
6584
  std::cout << "Error in callback "
6366
- "UniffiCallbackInterfaceExternalSparkSignerMethod1: "
6585
+ "UniffiCallbackInterfaceExternalSigningSignerMethod1: "
6367
6586
  << error.what() << std::endl;
6368
6587
  throw error;
6369
6588
  }
6370
6589
  }
6371
6590
 
6372
6591
  static void
6373
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
6592
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_message, RustBuffer rs_path,
6374
6593
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6375
6594
  uint64_t rs_uniffiCallbackData,
6376
6595
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -6389,12 +6608,12 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
6389
6608
 
6390
6609
  // The runtime, the actual callback jsi::funtion, and the callInvoker
6391
6610
  // are all in the lambda.
6392
- rsLambda(rs_uniffiHandle, rs_leafId, rs_uniffiFutureCallback,
6611
+ rsLambda(rs_uniffiHandle, rs_message, rs_path, rs_uniffiFutureCallback,
6393
6612
  rs_uniffiCallbackData, rs_uniffiOutReturn);
6394
6613
  }
6395
6614
 
6396
- static UniffiCallbackInterfaceExternalSparkSignerMethod1
6397
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod1
6615
+ static UniffiCallbackInterfaceExternalSigningSignerMethod1
6616
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod1
6398
6617
  jsi::Runtime &rt,
6399
6618
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6400
6619
  const jsi::Value &value) {
@@ -6413,18 +6632,19 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternals
6413
6632
  auto callbackFunction = value.asObject(rt).asFunction(rt);
6414
6633
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
6415
6634
  rsLambda = [&rt, callInvoker, callbackValue](
6416
- uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
6635
+ uint64_t rs_uniffiHandle, RustBuffer rs_message,
6636
+ RustBuffer rs_path,
6417
6637
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6418
6638
  uint64_t rs_uniffiCallbackData,
6419
6639
  UniffiForeignFuture *rs_uniffiOutReturn) {
6420
6640
  // We immediately make a lambda which will do the work of transforming the
6421
6641
  // arguments into JSI values and calling the callback.
6422
6642
  uniffi_runtime::UniffiCallFunc jsLambda =
6423
- [callInvoker, callbackValue, rs_uniffiHandle, rs_leafId,
6643
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_message, rs_path,
6424
6644
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
6425
6645
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
6426
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_leafId,
6427
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
6646
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_message,
6647
+ rs_path, rs_uniffiFutureCallback, rs_uniffiCallbackData,
6428
6648
  rs_uniffiOutReturn);
6429
6649
  };
6430
6650
  // We'll then call that lambda from the callInvoker which will
@@ -6442,12 +6662,12 @@ static void cleanup() {
6442
6662
  rsLambda = nullptr;
6443
6663
  }
6444
6664
  } // namespace
6445
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod1
6665
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod1
6446
6666
  // Implementation of callback function calling from Rust to JS
6447
- // CallbackInterfaceExternalSparkSignerMethod2
6667
+ // CallbackInterfaceExternalSigningSignerMethod2
6448
6668
 
6449
6669
  // Callback function:
6450
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod2::UniffiCallbackInterfaceExternalSparkSignerMethod2
6670
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod2::UniffiCallbackInterfaceExternalSigningSignerMethod2
6451
6671
  //
6452
6672
  // We have the following constraints:
6453
6673
  // - we need to pass a function pointer to Rust.
@@ -6461,12 +6681,12 @@ static void cleanup() {
6461
6681
  // We then give the `callback` function pointer to Rust which will call the
6462
6682
  // lambda sometime in the future.
6463
6683
  namespace uniffi::breez_sdk_spark::cb::
6464
- callbackinterfaceexternalsparksignermethod2 {
6684
+ callbackinterfaceexternalsigningsignermethod2 {
6465
6685
  using namespace facebook;
6466
6686
 
6467
6687
  // We need to store a lambda in a global so we can call it from
6468
6688
  // a function pointer. The function pointer is passed to Rust.
6469
- static std::function<void(uint64_t, uint32_t,
6689
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
6470
6690
  UniffiForeignFutureCompleteRustBuffer, uint64_t,
6471
6691
  UniffiForeignFuture *)>
6472
6692
  rsLambda = nullptr;
@@ -6476,7 +6696,8 @@ static std::function<void(uint64_t, uint32_t,
6476
6696
  static void body(jsi::Runtime &rt,
6477
6697
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6478
6698
  std::shared_ptr<jsi::Value> callbackValue,
6479
- uint64_t rs_uniffiHandle, uint32_t rs_index,
6699
+ uint64_t rs_uniffiHandle, RustBuffer rs_message,
6700
+ RustBuffer rs_path,
6480
6701
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6481
6702
  uint64_t rs_uniffiCallbackData,
6482
6703
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -6485,8 +6706,730 @@ static void body(jsi::Runtime &rt,
6485
6706
  // We'll use the Bridging class to do this…
6486
6707
  auto js_uniffiHandle =
6487
6708
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
6488
- auto js_index =
6489
- uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_index);
6709
+ auto js_message = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6710
+ rt, callInvoker, rs_message);
6711
+ auto js_path = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6712
+ rt, callInvoker, rs_path);
6713
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
6714
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
6715
+ rs_uniffiFutureCallback);
6716
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
6717
+ rt, callInvoker, rs_uniffiCallbackData);
6718
+
6719
+ // Now we are ready to call the callback.
6720
+ // We are already on the JS thread, because this `body` function was
6721
+ // invoked from the CallInvoker.
6722
+ try {
6723
+ // Getting the callback function
6724
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
6725
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
6726
+ js_uniffiFutureCallback, js_uniffiCallbackData);
6727
+
6728
+ // return type is MutReference(Struct("ForeignFuture"))
6729
+ // Finally, we need to copy the return value back into the Rust pointer.
6730
+ *rs_uniffiOutReturn =
6731
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6732
+ rt, callInvoker, uniffiResult);
6733
+ } catch (const jsi::JSError &error) {
6734
+ std::cout << "Error in callback "
6735
+ "UniffiCallbackInterfaceExternalSigningSignerMethod2: "
6736
+ << error.what() << std::endl;
6737
+ throw error;
6738
+ }
6739
+ }
6740
+
6741
+ static void
6742
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_message, RustBuffer rs_path,
6743
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6744
+ uint64_t rs_uniffiCallbackData,
6745
+ UniffiForeignFuture *rs_uniffiOutReturn) {
6746
+ // If the runtime has shutdown, then there is no point in trying to
6747
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
6748
+ //
6749
+ // Answer: the module destructor calls into callback `cleanup` method,
6750
+ // which nulls out the rsLamda.
6751
+ //
6752
+ // If rsLamda is null, then there is no runtime to call into.
6753
+ if (rsLambda == nullptr) {
6754
+ // This only occurs when destructors are calling into Rust free/drop,
6755
+ // which causes the JS callback to be dropped.
6756
+ return;
6757
+ }
6758
+
6759
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
6760
+ // are all in the lambda.
6761
+ rsLambda(rs_uniffiHandle, rs_message, rs_path, rs_uniffiFutureCallback,
6762
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
6763
+ }
6764
+
6765
+ static UniffiCallbackInterfaceExternalSigningSignerMethod2
6766
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod2
6767
+ jsi::Runtime &rt,
6768
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6769
+ const jsi::Value &value) {
6770
+ if (rsLambda != nullptr) {
6771
+ // `makeCallbackFunction` is called in two circumstances:
6772
+ //
6773
+ // 1. at startup, when initializing callback interface vtables.
6774
+ // 2. when polling futures. This happens at least once per future that is
6775
+ // exposed to Javascript. We know that this is always the same function,
6776
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
6777
+ //
6778
+ // We can therefore return the callback function without making anything
6779
+ // new if we've been initialized already.
6780
+ return callback;
6781
+ }
6782
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
6783
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
6784
+ rsLambda = [&rt, callInvoker, callbackValue](
6785
+ uint64_t rs_uniffiHandle, RustBuffer rs_message,
6786
+ RustBuffer rs_path,
6787
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6788
+ uint64_t rs_uniffiCallbackData,
6789
+ UniffiForeignFuture *rs_uniffiOutReturn) {
6790
+ // We immediately make a lambda which will do the work of transforming the
6791
+ // arguments into JSI values and calling the callback.
6792
+ uniffi_runtime::UniffiCallFunc jsLambda =
6793
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_message, rs_path,
6794
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
6795
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
6796
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_message,
6797
+ rs_path, rs_uniffiFutureCallback, rs_uniffiCallbackData,
6798
+ rs_uniffiOutReturn);
6799
+ };
6800
+ // We'll then call that lambda from the callInvoker which will
6801
+ // look after calling it on the correct thread.
6802
+ callInvoker->invokeBlocking(rt, jsLambda);
6803
+ };
6804
+ return callback;
6805
+ }
6806
+
6807
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
6808
+ // happens when the jsi::Runtime is being destroyed.
6809
+ static void cleanup() {
6810
+ // The lambda holds a reference to the the Runtime, so when this is nulled
6811
+ // out, then the pointer will no longer be left dangling.
6812
+ rsLambda = nullptr;
6813
+ }
6814
+ } // namespace
6815
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod2
6816
+ // Implementation of callback function calling from Rust to JS
6817
+ // CallbackInterfaceExternalSigningSignerMethod3
6818
+
6819
+ // Callback function:
6820
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod3::UniffiCallbackInterfaceExternalSigningSignerMethod3
6821
+ //
6822
+ // We have the following constraints:
6823
+ // - we need to pass a function pointer to Rust.
6824
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
6825
+ // - function pointers can't store state, so we can't use a lamda.
6826
+ //
6827
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
6828
+ // function calls the lambda, which itself calls the `body` which then calls
6829
+ // into JS.
6830
+ //
6831
+ // We then give the `callback` function pointer to Rust which will call the
6832
+ // lambda sometime in the future.
6833
+ namespace uniffi::breez_sdk_spark::cb::
6834
+ callbackinterfaceexternalsigningsignermethod3 {
6835
+ using namespace facebook;
6836
+
6837
+ // We need to store a lambda in a global so we can call it from
6838
+ // a function pointer. The function pointer is passed to Rust.
6839
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
6840
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
6841
+ UniffiForeignFuture *)>
6842
+ rsLambda = nullptr;
6843
+
6844
+ // This is the main body of the callback. It's called from the lambda,
6845
+ // which itself is called from the callback function which is passed to Rust.
6846
+ static void body(jsi::Runtime &rt,
6847
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6848
+ std::shared_ptr<jsi::Value> callbackValue,
6849
+ uint64_t rs_uniffiHandle, RustBuffer rs_hash,
6850
+ RustBuffer rs_path,
6851
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6852
+ uint64_t rs_uniffiCallbackData,
6853
+ UniffiForeignFuture *rs_uniffiOutReturn) {
6854
+
6855
+ // Convert the arguments from Rust, into jsi::Values.
6856
+ // We'll use the Bridging class to do this…
6857
+ auto js_uniffiHandle =
6858
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
6859
+ auto js_hash = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6860
+ rt, callInvoker, rs_hash);
6861
+ auto js_path = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
6862
+ rt, callInvoker, rs_path);
6863
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
6864
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
6865
+ rs_uniffiFutureCallback);
6866
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
6867
+ rt, callInvoker, rs_uniffiCallbackData);
6868
+
6869
+ // Now we are ready to call the callback.
6870
+ // We are already on the JS thread, because this `body` function was
6871
+ // invoked from the CallInvoker.
6872
+ try {
6873
+ // Getting the callback function
6874
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
6875
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_hash, js_path,
6876
+ js_uniffiFutureCallback, js_uniffiCallbackData);
6877
+
6878
+ // return type is MutReference(Struct("ForeignFuture"))
6879
+ // Finally, we need to copy the return value back into the Rust pointer.
6880
+ *rs_uniffiOutReturn =
6881
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
6882
+ rt, callInvoker, uniffiResult);
6883
+ } catch (const jsi::JSError &error) {
6884
+ std::cout << "Error in callback "
6885
+ "UniffiCallbackInterfaceExternalSigningSignerMethod3: "
6886
+ << error.what() << std::endl;
6887
+ throw error;
6888
+ }
6889
+ }
6890
+
6891
+ static void
6892
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_hash, RustBuffer rs_path,
6893
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6894
+ uint64_t rs_uniffiCallbackData,
6895
+ UniffiForeignFuture *rs_uniffiOutReturn) {
6896
+ // If the runtime has shutdown, then there is no point in trying to
6897
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
6898
+ //
6899
+ // Answer: the module destructor calls into callback `cleanup` method,
6900
+ // which nulls out the rsLamda.
6901
+ //
6902
+ // If rsLamda is null, then there is no runtime to call into.
6903
+ if (rsLambda == nullptr) {
6904
+ // This only occurs when destructors are calling into Rust free/drop,
6905
+ // which causes the JS callback to be dropped.
6906
+ return;
6907
+ }
6908
+
6909
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
6910
+ // are all in the lambda.
6911
+ rsLambda(rs_uniffiHandle, rs_hash, rs_path, rs_uniffiFutureCallback,
6912
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
6913
+ }
6914
+
6915
+ static UniffiCallbackInterfaceExternalSigningSignerMethod3
6916
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod3
6917
+ jsi::Runtime &rt,
6918
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6919
+ const jsi::Value &value) {
6920
+ if (rsLambda != nullptr) {
6921
+ // `makeCallbackFunction` is called in two circumstances:
6922
+ //
6923
+ // 1. at startup, when initializing callback interface vtables.
6924
+ // 2. when polling futures. This happens at least once per future that is
6925
+ // exposed to Javascript. We know that this is always the same function,
6926
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
6927
+ //
6928
+ // We can therefore return the callback function without making anything
6929
+ // new if we've been initialized already.
6930
+ return callback;
6931
+ }
6932
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
6933
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
6934
+ rsLambda = [&rt, callInvoker, callbackValue](
6935
+ uint64_t rs_uniffiHandle, RustBuffer rs_hash,
6936
+ RustBuffer rs_path,
6937
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
6938
+ uint64_t rs_uniffiCallbackData,
6939
+ UniffiForeignFuture *rs_uniffiOutReturn) {
6940
+ // We immediately make a lambda which will do the work of transforming the
6941
+ // arguments into JSI values and calling the callback.
6942
+ uniffi_runtime::UniffiCallFunc jsLambda =
6943
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_hash, rs_path,
6944
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
6945
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
6946
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_hash,
6947
+ rs_path, rs_uniffiFutureCallback, rs_uniffiCallbackData,
6948
+ rs_uniffiOutReturn);
6949
+ };
6950
+ // We'll then call that lambda from the callInvoker which will
6951
+ // look after calling it on the correct thread.
6952
+ callInvoker->invokeBlocking(rt, jsLambda);
6953
+ };
6954
+ return callback;
6955
+ }
6956
+
6957
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
6958
+ // happens when the jsi::Runtime is being destroyed.
6959
+ static void cleanup() {
6960
+ // The lambda holds a reference to the the Runtime, so when this is nulled
6961
+ // out, then the pointer will no longer be left dangling.
6962
+ rsLambda = nullptr;
6963
+ }
6964
+ } // namespace
6965
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod3
6966
+ // Implementation of callback function calling from Rust to JS
6967
+ // CallbackInterfaceExternalSparkSignerMethod0
6968
+
6969
+ // Callback function:
6970
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod0::UniffiCallbackInterfaceExternalSparkSignerMethod0
6971
+ //
6972
+ // We have the following constraints:
6973
+ // - we need to pass a function pointer to Rust.
6974
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
6975
+ // - function pointers can't store state, so we can't use a lamda.
6976
+ //
6977
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
6978
+ // function calls the lambda, which itself calls the `body` which then calls
6979
+ // into JS.
6980
+ //
6981
+ // We then give the `callback` function pointer to Rust which will call the
6982
+ // lambda sometime in the future.
6983
+ namespace uniffi::breez_sdk_spark::cb::
6984
+ callbackinterfaceexternalsparksignermethod0 {
6985
+ using namespace facebook;
6986
+
6987
+ // We need to store a lambda in a global so we can call it from
6988
+ // a function pointer. The function pointer is passed to Rust.
6989
+ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
6990
+ uint64_t, UniffiForeignFuture *)>
6991
+ rsLambda = nullptr;
6992
+
6993
+ // This is the main body of the callback. It's called from the lambda,
6994
+ // which itself is called from the callback function which is passed to Rust.
6995
+ static void body(jsi::Runtime &rt,
6996
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6997
+ std::shared_ptr<jsi::Value> callbackValue,
6998
+ uint64_t rs_uniffiHandle,
6999
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7000
+ uint64_t rs_uniffiCallbackData,
7001
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7002
+
7003
+ // Convert the arguments from Rust, into jsi::Values.
7004
+ // We'll use the Bridging class to do this…
7005
+ auto js_uniffiHandle =
7006
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
7007
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
7008
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
7009
+ rs_uniffiFutureCallback);
7010
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
7011
+ rt, callInvoker, rs_uniffiCallbackData);
7012
+
7013
+ // Now we are ready to call the callback.
7014
+ // We are already on the JS thread, because this `body` function was
7015
+ // invoked from the CallInvoker.
7016
+ try {
7017
+ // Getting the callback function
7018
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
7019
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
7020
+ js_uniffiCallbackData);
7021
+
7022
+ // return type is MutReference(Struct("ForeignFuture"))
7023
+ // Finally, we need to copy the return value back into the Rust pointer.
7024
+ *rs_uniffiOutReturn =
7025
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7026
+ rt, callInvoker, uniffiResult);
7027
+ } catch (const jsi::JSError &error) {
7028
+ std::cout << "Error in callback "
7029
+ "UniffiCallbackInterfaceExternalSparkSignerMethod0: "
7030
+ << error.what() << std::endl;
7031
+ throw error;
7032
+ }
7033
+ }
7034
+
7035
+ static void
7036
+ callback(uint64_t rs_uniffiHandle,
7037
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7038
+ uint64_t rs_uniffiCallbackData,
7039
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7040
+ // If the runtime has shutdown, then there is no point in trying to
7041
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
7042
+ //
7043
+ // Answer: the module destructor calls into callback `cleanup` method,
7044
+ // which nulls out the rsLamda.
7045
+ //
7046
+ // If rsLamda is null, then there is no runtime to call into.
7047
+ if (rsLambda == nullptr) {
7048
+ // This only occurs when destructors are calling into Rust free/drop,
7049
+ // which causes the JS callback to be dropped.
7050
+ return;
7051
+ }
7052
+
7053
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
7054
+ // are all in the lambda.
7055
+ rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
7056
+ rs_uniffiOutReturn);
7057
+ }
7058
+
7059
+ static UniffiCallbackInterfaceExternalSparkSignerMethod0
7060
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod0
7061
+ jsi::Runtime &rt,
7062
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7063
+ const jsi::Value &value) {
7064
+ if (rsLambda != nullptr) {
7065
+ // `makeCallbackFunction` is called in two circumstances:
7066
+ //
7067
+ // 1. at startup, when initializing callback interface vtables.
7068
+ // 2. when polling futures. This happens at least once per future that is
7069
+ // exposed to Javascript. We know that this is always the same function,
7070
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
7071
+ //
7072
+ // We can therefore return the callback function without making anything
7073
+ // new if we've been initialized already.
7074
+ return callback;
7075
+ }
7076
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
7077
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
7078
+ rsLambda = [&rt, callInvoker, callbackValue](
7079
+ uint64_t rs_uniffiHandle,
7080
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7081
+ uint64_t rs_uniffiCallbackData,
7082
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7083
+ // We immediately make a lambda which will do the work of transforming the
7084
+ // arguments into JSI values and calling the callback.
7085
+ uniffi_runtime::UniffiCallFunc jsLambda =
7086
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
7087
+ rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
7088
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle,
7089
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
7090
+ rs_uniffiOutReturn);
7091
+ };
7092
+ // We'll then call that lambda from the callInvoker which will
7093
+ // look after calling it on the correct thread.
7094
+ callInvoker->invokeBlocking(rt, jsLambda);
7095
+ };
7096
+ return callback;
7097
+ }
7098
+
7099
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
7100
+ // happens when the jsi::Runtime is being destroyed.
7101
+ static void cleanup() {
7102
+ // The lambda holds a reference to the the Runtime, so when this is nulled
7103
+ // out, then the pointer will no longer be left dangling.
7104
+ rsLambda = nullptr;
7105
+ }
7106
+ } // namespace
7107
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod0
7108
+ // Implementation of callback function calling from Rust to JS
7109
+ // CallbackInterfaceExternalSparkSignerMethod1
7110
+
7111
+ // Callback function:
7112
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod1::UniffiCallbackInterfaceExternalSparkSignerMethod1
7113
+ //
7114
+ // We have the following constraints:
7115
+ // - we need to pass a function pointer to Rust.
7116
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
7117
+ // - function pointers can't store state, so we can't use a lamda.
7118
+ //
7119
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
7120
+ // function calls the lambda, which itself calls the `body` which then calls
7121
+ // into JS.
7122
+ //
7123
+ // We then give the `callback` function pointer to Rust which will call the
7124
+ // lambda sometime in the future.
7125
+ namespace uniffi::breez_sdk_spark::cb::
7126
+ callbackinterfaceexternalsparksignermethod1 {
7127
+ using namespace facebook;
7128
+
7129
+ // We need to store a lambda in a global so we can call it from
7130
+ // a function pointer. The function pointer is passed to Rust.
7131
+ static std::function<void(uint64_t, RustBuffer,
7132
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
7133
+ UniffiForeignFuture *)>
7134
+ rsLambda = nullptr;
7135
+
7136
+ // This is the main body of the callback. It's called from the lambda,
7137
+ // which itself is called from the callback function which is passed to Rust.
7138
+ static void body(jsi::Runtime &rt,
7139
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7140
+ std::shared_ptr<jsi::Value> callbackValue,
7141
+ uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
7142
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7143
+ uint64_t rs_uniffiCallbackData,
7144
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7145
+
7146
+ // Convert the arguments from Rust, into jsi::Values.
7147
+ // We'll use the Bridging class to do this…
7148
+ auto js_uniffiHandle =
7149
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
7150
+ auto js_leafId = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
7151
+ rt, callInvoker, rs_leafId);
7152
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
7153
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
7154
+ rs_uniffiFutureCallback);
7155
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
7156
+ rt, callInvoker, rs_uniffiCallbackData);
7157
+
7158
+ // Now we are ready to call the callback.
7159
+ // We are already on the JS thread, because this `body` function was
7160
+ // invoked from the CallInvoker.
7161
+ try {
7162
+ // Getting the callback function
7163
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
7164
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_leafId,
7165
+ js_uniffiFutureCallback, js_uniffiCallbackData);
7166
+
7167
+ // return type is MutReference(Struct("ForeignFuture"))
7168
+ // Finally, we need to copy the return value back into the Rust pointer.
7169
+ *rs_uniffiOutReturn =
7170
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
7171
+ rt, callInvoker, uniffiResult);
7172
+ } catch (const jsi::JSError &error) {
7173
+ std::cout << "Error in callback "
7174
+ "UniffiCallbackInterfaceExternalSparkSignerMethod1: "
7175
+ << error.what() << std::endl;
7176
+ throw error;
7177
+ }
7178
+ }
7179
+
7180
+ static void
7181
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
7182
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7183
+ uint64_t rs_uniffiCallbackData,
7184
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7185
+ // If the runtime has shutdown, then there is no point in trying to
7186
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
7187
+ //
7188
+ // Answer: the module destructor calls into callback `cleanup` method,
7189
+ // which nulls out the rsLamda.
7190
+ //
7191
+ // If rsLamda is null, then there is no runtime to call into.
7192
+ if (rsLambda == nullptr) {
7193
+ // This only occurs when destructors are calling into Rust free/drop,
7194
+ // which causes the JS callback to be dropped.
7195
+ return;
7196
+ }
7197
+
7198
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
7199
+ // are all in the lambda.
7200
+ rsLambda(rs_uniffiHandle, rs_leafId, rs_uniffiFutureCallback,
7201
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
7202
+ }
7203
+
7204
+ static UniffiCallbackInterfaceExternalSparkSignerMethod1
7205
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod1
7206
+ jsi::Runtime &rt,
7207
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7208
+ const jsi::Value &value) {
7209
+ if (rsLambda != nullptr) {
7210
+ // `makeCallbackFunction` is called in two circumstances:
7211
+ //
7212
+ // 1. at startup, when initializing callback interface vtables.
7213
+ // 2. when polling futures. This happens at least once per future that is
7214
+ // exposed to Javascript. We know that this is always the same function,
7215
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
7216
+ //
7217
+ // We can therefore return the callback function without making anything
7218
+ // new if we've been initialized already.
7219
+ return callback;
7220
+ }
7221
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
7222
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
7223
+ rsLambda = [&rt, callInvoker, callbackValue](
7224
+ uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
7225
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7226
+ uint64_t rs_uniffiCallbackData,
7227
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7228
+ // We immediately make a lambda which will do the work of transforming the
7229
+ // arguments into JSI values and calling the callback.
7230
+ uniffi_runtime::UniffiCallFunc jsLambda =
7231
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_leafId,
7232
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
7233
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
7234
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_leafId,
7235
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
7236
+ rs_uniffiOutReturn);
7237
+ };
7238
+ // We'll then call that lambda from the callInvoker which will
7239
+ // look after calling it on the correct thread.
7240
+ callInvoker->invokeBlocking(rt, jsLambda);
7241
+ };
7242
+ return callback;
7243
+ }
7244
+
7245
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
7246
+ // happens when the jsi::Runtime is being destroyed.
7247
+ static void cleanup() {
7248
+ // The lambda holds a reference to the the Runtime, so when this is nulled
7249
+ // out, then the pointer will no longer be left dangling.
7250
+ rsLambda = nullptr;
7251
+ }
7252
+ } // namespace
7253
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod1
7254
+ // Implementation of callback function calling from Rust to JS
7255
+ // CallbackInterfaceExternalSparkSignerMethod2
7256
+
7257
+ // Callback function:
7258
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod2::UniffiCallbackInterfaceExternalSparkSignerMethod2
7259
+ //
7260
+ // We have the following constraints:
7261
+ // - we need to pass a function pointer to Rust.
7262
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
7263
+ // - function pointers can't store state, so we can't use a lamda.
7264
+ //
7265
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
7266
+ // function calls the lambda, which itself calls the `body` which then calls
7267
+ // into JS.
7268
+ //
7269
+ // We then give the `callback` function pointer to Rust which will call the
7270
+ // lambda sometime in the future.
7271
+ namespace uniffi::breez_sdk_spark::cb::
7272
+ callbackinterfaceexternalsparksignermethod2 {
7273
+ using namespace facebook;
7274
+
7275
+ // We need to store a lambda in a global so we can call it from
7276
+ // a function pointer. The function pointer is passed to Rust.
7277
+ static std::function<void(uint64_t, int8_t *, RustCallStatus *)> rsLambda =
7278
+ nullptr;
7279
+
7280
+ // This is the main body of the callback. It's called from the lambda,
7281
+ // which itself is called from the callback function which is passed to Rust.
7282
+ static void body(jsi::Runtime &rt,
7283
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7284
+ std::shared_ptr<jsi::Value> callbackValue,
7285
+ uint64_t rs_uniffiHandle, int8_t *rs_uniffiOutReturn,
7286
+ RustCallStatus *uniffi_call_status) {
7287
+
7288
+ // Convert the arguments from Rust, into jsi::Values.
7289
+ // We'll use the Bridging class to do this…
7290
+ auto js_uniffiHandle =
7291
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
7292
+
7293
+ // Now we are ready to call the callback.
7294
+ // We are already on the JS thread, because this `body` function was
7295
+ // invoked from the CallInvoker.
7296
+ try {
7297
+ // Getting the callback function
7298
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
7299
+ auto uniffiResult = cb.call(rt, js_uniffiHandle);
7300
+
7301
+ // Now copy the result back from JS into the RustCallStatus object.
7302
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyFromJs(
7303
+ rt, callInvoker, uniffiResult, uniffi_call_status);
7304
+
7305
+ if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) {
7306
+ // The JS callback finished abnormally, so we cannot retrieve the return
7307
+ // value.
7308
+ return;
7309
+ }
7310
+
7311
+ // return type is MutReference(Int8)
7312
+ // Finally, we need to copy the return value back into the Rust pointer.
7313
+ *rs_uniffiOutReturn = uniffi_jsi::Bridging<ReferenceHolder<int8_t>>::fromJs(
7314
+ rt, callInvoker, uniffiResult);
7315
+ } catch (const jsi::JSError &error) {
7316
+ std::cout << "Error in callback "
7317
+ "UniffiCallbackInterfaceExternalSparkSignerMethod2: "
7318
+ << error.what() << std::endl;
7319
+ throw error;
7320
+ }
7321
+ }
7322
+
7323
+ static void callback(uint64_t rs_uniffiHandle, int8_t *rs_uniffiOutReturn,
7324
+ RustCallStatus *uniffi_call_status) {
7325
+ // If the runtime has shutdown, then there is no point in trying to
7326
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
7327
+ //
7328
+ // Answer: the module destructor calls into callback `cleanup` method,
7329
+ // which nulls out the rsLamda.
7330
+ //
7331
+ // If rsLamda is null, then there is no runtime to call into.
7332
+ if (rsLambda == nullptr) {
7333
+ // This only occurs when destructors are calling into Rust free/drop,
7334
+ // which causes the JS callback to be dropped.
7335
+ return;
7336
+ }
7337
+
7338
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
7339
+ // are all in the lambda.
7340
+ rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status);
7341
+ }
7342
+
7343
+ static UniffiCallbackInterfaceExternalSparkSignerMethod2
7344
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod2
7345
+ jsi::Runtime &rt,
7346
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7347
+ const jsi::Value &value) {
7348
+ if (rsLambda != nullptr) {
7349
+ // `makeCallbackFunction` is called in two circumstances:
7350
+ //
7351
+ // 1. at startup, when initializing callback interface vtables.
7352
+ // 2. when polling futures. This happens at least once per future that is
7353
+ // exposed to Javascript. We know that this is always the same function,
7354
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
7355
+ //
7356
+ // We can therefore return the callback function without making anything
7357
+ // new if we've been initialized already.
7358
+ return callback;
7359
+ }
7360
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
7361
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
7362
+ rsLambda = [&rt, callInvoker, callbackValue](
7363
+ uint64_t rs_uniffiHandle, int8_t *rs_uniffiOutReturn,
7364
+ RustCallStatus *uniffi_call_status) {
7365
+ // We immediately make a lambda which will do the work of transforming the
7366
+ // arguments into JSI values and calling the callback.
7367
+ uniffi_runtime::UniffiCallFunc jsLambda =
7368
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiOutReturn,
7369
+ uniffi_call_status](jsi::Runtime &rt) mutable {
7370
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle,
7371
+ rs_uniffiOutReturn, uniffi_call_status);
7372
+ };
7373
+ // We'll then call that lambda from the callInvoker which will
7374
+ // look after calling it on the correct thread.
7375
+ callInvoker->invokeBlocking(rt, jsLambda);
7376
+ };
7377
+ return callback;
7378
+ }
7379
+
7380
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
7381
+ // happens when the jsi::Runtime is being destroyed.
7382
+ static void cleanup() {
7383
+ // The lambda holds a reference to the the Runtime, so when this is nulled
7384
+ // out, then the pointer will no longer be left dangling.
7385
+ rsLambda = nullptr;
7386
+ }
7387
+ } // namespace
7388
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod2
7389
+ // Implementation of callback function calling from Rust to JS
7390
+ // CallbackInterfaceExternalSparkSignerMethod3
7391
+
7392
+ // Callback function:
7393
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod3::UniffiCallbackInterfaceExternalSparkSignerMethod3
7394
+ //
7395
+ // We have the following constraints:
7396
+ // - we need to pass a function pointer to Rust.
7397
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
7398
+ // - function pointers can't store state, so we can't use a lamda.
7399
+ //
7400
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
7401
+ // function calls the lambda, which itself calls the `body` which then calls
7402
+ // into JS.
7403
+ //
7404
+ // We then give the `callback` function pointer to Rust which will call the
7405
+ // lambda sometime in the future.
7406
+ namespace uniffi::breez_sdk_spark::cb::
7407
+ callbackinterfaceexternalsparksignermethod3 {
7408
+ using namespace facebook;
7409
+
7410
+ // We need to store a lambda in a global so we can call it from
7411
+ // a function pointer. The function pointer is passed to Rust.
7412
+ static std::function<void(uint64_t, uint32_t,
7413
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
7414
+ UniffiForeignFuture *)>
7415
+ rsLambda = nullptr;
7416
+
7417
+ // This is the main body of the callback. It's called from the lambda,
7418
+ // which itself is called from the callback function which is passed to Rust.
7419
+ static void body(jsi::Runtime &rt,
7420
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7421
+ std::shared_ptr<jsi::Value> callbackValue,
7422
+ uint64_t rs_uniffiHandle, uint32_t rs_index,
7423
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7424
+ uint64_t rs_uniffiCallbackData,
7425
+ UniffiForeignFuture *rs_uniffiOutReturn) {
7426
+
7427
+ // Convert the arguments from Rust, into jsi::Values.
7428
+ // We'll use the Bridging class to do this…
7429
+ auto js_uniffiHandle =
7430
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
7431
+ auto js_index =
7432
+ uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_index);
6490
7433
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
6491
7434
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
6492
7435
  rs_uniffiFutureCallback);
@@ -6509,7 +7452,7 @@ static void body(jsi::Runtime &rt,
6509
7452
  rt, callInvoker, uniffiResult);
6510
7453
  } catch (const jsi::JSError &error) {
6511
7454
  std::cout << "Error in callback "
6512
- "UniffiCallbackInterfaceExternalSparkSignerMethod2: "
7455
+ "UniffiCallbackInterfaceExternalSparkSignerMethod3: "
6513
7456
  << error.what() << std::endl;
6514
7457
  throw error;
6515
7458
  }
@@ -6539,8 +7482,8 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_index,
6539
7482
  rs_uniffiCallbackData, rs_uniffiOutReturn);
6540
7483
  }
6541
7484
 
6542
- static UniffiCallbackInterfaceExternalSparkSignerMethod2
6543
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod2
7485
+ static UniffiCallbackInterfaceExternalSparkSignerMethod3
7486
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod3
6544
7487
  jsi::Runtime &rt,
6545
7488
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6546
7489
  const jsi::Value &value) {
@@ -6588,12 +7531,12 @@ static void cleanup() {
6588
7531
  rsLambda = nullptr;
6589
7532
  }
6590
7533
  } // namespace
6591
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod2
7534
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod3
6592
7535
  // Implementation of callback function calling from Rust to JS
6593
- // CallbackInterfaceExternalSparkSignerMethod3
7536
+ // CallbackInterfaceExternalSparkSignerMethod4
6594
7537
 
6595
7538
  // Callback function:
6596
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod3::UniffiCallbackInterfaceExternalSparkSignerMethod3
7539
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod4::UniffiCallbackInterfaceExternalSparkSignerMethod4
6597
7540
  //
6598
7541
  // We have the following constraints:
6599
7542
  // - we need to pass a function pointer to Rust.
@@ -6607,7 +7550,7 @@ static void cleanup() {
6607
7550
  // We then give the `callback` function pointer to Rust which will call the
6608
7551
  // lambda sometime in the future.
6609
7552
  namespace uniffi::breez_sdk_spark::cb::
6610
- callbackinterfaceexternalsparksignermethod3 {
7553
+ callbackinterfaceexternalsparksignermethod4 {
6611
7554
  using namespace facebook;
6612
7555
 
6613
7556
  // We need to store a lambda in a global so we can call it from
@@ -6655,7 +7598,7 @@ static void body(jsi::Runtime &rt,
6655
7598
  rt, callInvoker, uniffiResult);
6656
7599
  } catch (const jsi::JSError &error) {
6657
7600
  std::cout << "Error in callback "
6658
- "UniffiCallbackInterfaceExternalSparkSignerMethod3: "
7601
+ "UniffiCallbackInterfaceExternalSparkSignerMethod4: "
6659
7602
  << error.what() << std::endl;
6660
7603
  throw error;
6661
7604
  }
@@ -6685,8 +7628,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_challenge,
6685
7628
  rs_uniffiCallbackData, rs_uniffiOutReturn);
6686
7629
  }
6687
7630
 
6688
- static UniffiCallbackInterfaceExternalSparkSignerMethod3
6689
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod3
7631
+ static UniffiCallbackInterfaceExternalSparkSignerMethod4
7632
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod4
6690
7633
  jsi::Runtime &rt,
6691
7634
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6692
7635
  const jsi::Value &value) {
@@ -6734,12 +7677,12 @@ static void cleanup() {
6734
7677
  rsLambda = nullptr;
6735
7678
  }
6736
7679
  } // namespace
6737
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod3
7680
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod4
6738
7681
  // Implementation of callback function calling from Rust to JS
6739
- // CallbackInterfaceExternalSparkSignerMethod4
7682
+ // CallbackInterfaceExternalSparkSignerMethod5
6740
7683
 
6741
7684
  // Callback function:
6742
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod4::UniffiCallbackInterfaceExternalSparkSignerMethod4
7685
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod5::UniffiCallbackInterfaceExternalSparkSignerMethod5
6743
7686
  //
6744
7687
  // We have the following constraints:
6745
7688
  // - we need to pass a function pointer to Rust.
@@ -6753,7 +7696,7 @@ static void cleanup() {
6753
7696
  // We then give the `callback` function pointer to Rust which will call the
6754
7697
  // lambda sometime in the future.
6755
7698
  namespace uniffi::breez_sdk_spark::cb::
6756
- callbackinterfaceexternalsparksignermethod4 {
7699
+ callbackinterfaceexternalsparksignermethod5 {
6757
7700
  using namespace facebook;
6758
7701
 
6759
7702
  // We need to store a lambda in a global so we can call it from
@@ -6801,7 +7744,7 @@ static void body(jsi::Runtime &rt,
6801
7744
  rt, callInvoker, uniffiResult);
6802
7745
  } catch (const jsi::JSError &error) {
6803
7746
  std::cout << "Error in callback "
6804
- "UniffiCallbackInterfaceExternalSparkSignerMethod4: "
7747
+ "UniffiCallbackInterfaceExternalSparkSignerMethod5: "
6805
7748
  << error.what() << std::endl;
6806
7749
  throw error;
6807
7750
  }
@@ -6831,8 +7774,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_message,
6831
7774
  rs_uniffiCallbackData, rs_uniffiOutReturn);
6832
7775
  }
6833
7776
 
6834
- static UniffiCallbackInterfaceExternalSparkSignerMethod4
6835
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod4
7777
+ static UniffiCallbackInterfaceExternalSparkSignerMethod5
7778
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod5
6836
7779
  jsi::Runtime &rt,
6837
7780
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6838
7781
  const jsi::Value &value) {
@@ -6880,12 +7823,12 @@ static void cleanup() {
6880
7823
  rsLambda = nullptr;
6881
7824
  }
6882
7825
  } // namespace
6883
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod4
7826
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod5
6884
7827
  // Implementation of callback function calling from Rust to JS
6885
- // CallbackInterfaceExternalSparkSignerMethod5
7828
+ // CallbackInterfaceExternalSparkSignerMethod6
6886
7829
 
6887
7830
  // Callback function:
6888
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod5::UniffiCallbackInterfaceExternalSparkSignerMethod5
7831
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod6::UniffiCallbackInterfaceExternalSparkSignerMethod6
6889
7832
  //
6890
7833
  // We have the following constraints:
6891
7834
  // - we need to pass a function pointer to Rust.
@@ -6899,7 +7842,7 @@ static void cleanup() {
6899
7842
  // We then give the `callback` function pointer to Rust which will call the
6900
7843
  // lambda sometime in the future.
6901
7844
  namespace uniffi::breez_sdk_spark::cb::
6902
- callbackinterfaceexternalsparksignermethod5 {
7845
+ callbackinterfaceexternalsparksignermethod6 {
6903
7846
  using namespace facebook;
6904
7847
 
6905
7848
  // We need to store a lambda in a global so we can call it from
@@ -6947,7 +7890,7 @@ static void body(jsi::Runtime &rt,
6947
7890
  rt, callInvoker, uniffiResult);
6948
7891
  } catch (const jsi::JSError &error) {
6949
7892
  std::cout << "Error in callback "
6950
- "UniffiCallbackInterfaceExternalSparkSignerMethod5: "
7893
+ "UniffiCallbackInterfaceExternalSparkSignerMethod6: "
6951
7894
  << error.what() << std::endl;
6952
7895
  throw error;
6953
7896
  }
@@ -6977,8 +7920,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
6977
7920
  rs_uniffiCallbackData, rs_uniffiOutReturn);
6978
7921
  }
6979
7922
 
6980
- static UniffiCallbackInterfaceExternalSparkSignerMethod5
6981
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod5
7923
+ static UniffiCallbackInterfaceExternalSparkSignerMethod6
7924
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod6
6982
7925
  jsi::Runtime &rt,
6983
7926
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
6984
7927
  const jsi::Value &value) {
@@ -7026,12 +7969,12 @@ static void cleanup() {
7026
7969
  rsLambda = nullptr;
7027
7970
  }
7028
7971
  } // namespace
7029
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod5
7972
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod6
7030
7973
  // Implementation of callback function calling from Rust to JS
7031
- // CallbackInterfaceExternalSparkSignerMethod6
7974
+ // CallbackInterfaceExternalSparkSignerMethod7
7032
7975
 
7033
7976
  // Callback function:
7034
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod6::UniffiCallbackInterfaceExternalSparkSignerMethod6
7977
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod7::UniffiCallbackInterfaceExternalSparkSignerMethod7
7035
7978
  //
7036
7979
  // We have the following constraints:
7037
7980
  // - we need to pass a function pointer to Rust.
@@ -7045,7 +7988,7 @@ static void cleanup() {
7045
7988
  // We then give the `callback` function pointer to Rust which will call the
7046
7989
  // lambda sometime in the future.
7047
7990
  namespace uniffi::breez_sdk_spark::cb::
7048
- callbackinterfaceexternalsparksignermethod6 {
7991
+ callbackinterfaceexternalsparksignermethod7 {
7049
7992
  using namespace facebook;
7050
7993
 
7051
7994
  // We need to store a lambda in a global so we can call it from
@@ -7093,7 +8036,7 @@ static void body(jsi::Runtime &rt,
7093
8036
  rt, callInvoker, uniffiResult);
7094
8037
  } catch (const jsi::JSError &error) {
7095
8038
  std::cout << "Error in callback "
7096
- "UniffiCallbackInterfaceExternalSparkSignerMethod6: "
8039
+ "UniffiCallbackInterfaceExternalSparkSignerMethod7: "
7097
8040
  << error.what() << std::endl;
7098
8041
  throw error;
7099
8042
  }
@@ -7123,8 +8066,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
7123
8066
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7124
8067
  }
7125
8068
 
7126
- static UniffiCallbackInterfaceExternalSparkSignerMethod6
7127
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod6
8069
+ static UniffiCallbackInterfaceExternalSparkSignerMethod7
8070
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod7
7128
8071
  jsi::Runtime &rt,
7129
8072
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7130
8073
  const jsi::Value &value) {
@@ -7172,12 +8115,12 @@ static void cleanup() {
7172
8115
  rsLambda = nullptr;
7173
8116
  }
7174
8117
  } // namespace
7175
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod6
8118
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod7
7176
8119
  // Implementation of callback function calling from Rust to JS
7177
- // CallbackInterfaceExternalSparkSignerMethod7
8120
+ // CallbackInterfaceExternalSparkSignerMethod8
7178
8121
 
7179
8122
  // Callback function:
7180
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod7::UniffiCallbackInterfaceExternalSparkSignerMethod7
8123
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod8::UniffiCallbackInterfaceExternalSparkSignerMethod8
7181
8124
  //
7182
8125
  // We have the following constraints:
7183
8126
  // - we need to pass a function pointer to Rust.
@@ -7191,7 +8134,7 @@ static void cleanup() {
7191
8134
  // We then give the `callback` function pointer to Rust which will call the
7192
8135
  // lambda sometime in the future.
7193
8136
  namespace uniffi::breez_sdk_spark::cb::
7194
- callbackinterfaceexternalsparksignermethod7 {
8137
+ callbackinterfaceexternalsparksignermethod8 {
7195
8138
  using namespace facebook;
7196
8139
 
7197
8140
  // We need to store a lambda in a global so we can call it from
@@ -7239,7 +8182,7 @@ static void body(jsi::Runtime &rt,
7239
8182
  rt, callInvoker, uniffiResult);
7240
8183
  } catch (const jsi::JSError &error) {
7241
8184
  std::cout << "Error in callback "
7242
- "UniffiCallbackInterfaceExternalSparkSignerMethod7: "
8185
+ "UniffiCallbackInterfaceExternalSparkSignerMethod8: "
7243
8186
  << error.what() << std::endl;
7244
8187
  throw error;
7245
8188
  }
@@ -7269,8 +8212,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
7269
8212
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7270
8213
  }
7271
8214
 
7272
- static UniffiCallbackInterfaceExternalSparkSignerMethod7
7273
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod7
8215
+ static UniffiCallbackInterfaceExternalSparkSignerMethod8
8216
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod8
7274
8217
  jsi::Runtime &rt,
7275
8218
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7276
8219
  const jsi::Value &value) {
@@ -7318,12 +8261,12 @@ static void cleanup() {
7318
8261
  rsLambda = nullptr;
7319
8262
  }
7320
8263
  } // namespace
7321
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod7
8264
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod8
7322
8265
  // Implementation of callback function calling from Rust to JS
7323
- // CallbackInterfaceExternalSparkSignerMethod8
8266
+ // CallbackInterfaceExternalSparkSignerMethod9
7324
8267
 
7325
8268
  // Callback function:
7326
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod8::UniffiCallbackInterfaceExternalSparkSignerMethod8
8269
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod9::UniffiCallbackInterfaceExternalSparkSignerMethod9
7327
8270
  //
7328
8271
  // We have the following constraints:
7329
8272
  // - we need to pass a function pointer to Rust.
@@ -7337,7 +8280,7 @@ static void cleanup() {
7337
8280
  // We then give the `callback` function pointer to Rust which will call the
7338
8281
  // lambda sometime in the future.
7339
8282
  namespace uniffi::breez_sdk_spark::cb::
7340
- callbackinterfaceexternalsparksignermethod8 {
8283
+ callbackinterfaceexternalsparksignermethod9 {
7341
8284
  using namespace facebook;
7342
8285
 
7343
8286
  // We need to store a lambda in a global so we can call it from
@@ -7385,7 +8328,7 @@ static void body(jsi::Runtime &rt,
7385
8328
  rt, callInvoker, uniffiResult);
7386
8329
  } catch (const jsi::JSError &error) {
7387
8330
  std::cout << "Error in callback "
7388
- "UniffiCallbackInterfaceExternalSparkSignerMethod8: "
8331
+ "UniffiCallbackInterfaceExternalSparkSignerMethod9: "
7389
8332
  << error.what() << std::endl;
7390
8333
  throw error;
7391
8334
  }
@@ -7415,8 +8358,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
7415
8358
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7416
8359
  }
7417
8360
 
7418
- static UniffiCallbackInterfaceExternalSparkSignerMethod8
7419
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod8
8361
+ static UniffiCallbackInterfaceExternalSparkSignerMethod9
8362
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod9
7420
8363
  jsi::Runtime &rt,
7421
8364
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7422
8365
  const jsi::Value &value) {
@@ -7464,12 +8407,12 @@ static void cleanup() {
7464
8407
  rsLambda = nullptr;
7465
8408
  }
7466
8409
  } // namespace
7467
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod8
8410
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod9
7468
8411
  // Implementation of callback function calling from Rust to JS
7469
- // CallbackInterfaceExternalSparkSignerMethod9
8412
+ // CallbackInterfaceExternalSparkSignerMethod10
7470
8413
 
7471
8414
  // Callback function:
7472
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod9::UniffiCallbackInterfaceExternalSparkSignerMethod9
8415
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod10::UniffiCallbackInterfaceExternalSparkSignerMethod10
7473
8416
  //
7474
8417
  // We have the following constraints:
7475
8418
  // - we need to pass a function pointer to Rust.
@@ -7483,7 +8426,7 @@ static void cleanup() {
7483
8426
  // We then give the `callback` function pointer to Rust which will call the
7484
8427
  // lambda sometime in the future.
7485
8428
  namespace uniffi::breez_sdk_spark::cb::
7486
- callbackinterfaceexternalsparksignermethod9 {
8429
+ callbackinterfaceexternalsparksignermethod10 {
7487
8430
  using namespace facebook;
7488
8431
 
7489
8432
  // We need to store a lambda in a global so we can call it from
@@ -7531,7 +8474,7 @@ static void body(jsi::Runtime &rt,
7531
8474
  rt, callInvoker, uniffiResult);
7532
8475
  } catch (const jsi::JSError &error) {
7533
8476
  std::cout << "Error in callback "
7534
- "UniffiCallbackInterfaceExternalSparkSignerMethod9: "
8477
+ "UniffiCallbackInterfaceExternalSparkSignerMethod10: "
7535
8478
  << error.what() << std::endl;
7536
8479
  throw error;
7537
8480
  }
@@ -7561,8 +8504,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
7561
8504
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7562
8505
  }
7563
8506
 
7564
- static UniffiCallbackInterfaceExternalSparkSignerMethod9
7565
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod9
8507
+ static UniffiCallbackInterfaceExternalSparkSignerMethod10
8508
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod10
7566
8509
  jsi::Runtime &rt,
7567
8510
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7568
8511
  const jsi::Value &value) {
@@ -7610,12 +8553,12 @@ static void cleanup() {
7610
8553
  rsLambda = nullptr;
7611
8554
  }
7612
8555
  } // namespace
7613
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod9
8556
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod10
7614
8557
  // Implementation of callback function calling from Rust to JS
7615
- // CallbackInterfaceExternalSparkSignerMethod10
8558
+ // CallbackInterfaceExternalSparkSignerMethod11
7616
8559
 
7617
8560
  // Callback function:
7618
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod10::UniffiCallbackInterfaceExternalSparkSignerMethod10
8561
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod11::UniffiCallbackInterfaceExternalSparkSignerMethod11
7619
8562
  //
7620
8563
  // We have the following constraints:
7621
8564
  // - we need to pass a function pointer to Rust.
@@ -7629,7 +8572,7 @@ static void cleanup() {
7629
8572
  // We then give the `callback` function pointer to Rust which will call the
7630
8573
  // lambda sometime in the future.
7631
8574
  namespace uniffi::breez_sdk_spark::cb::
7632
- callbackinterfaceexternalsparksignermethod10 {
8575
+ callbackinterfaceexternalsparksignermethod11 {
7633
8576
  using namespace facebook;
7634
8577
 
7635
8578
  // We need to store a lambda in a global so we can call it from
@@ -7677,7 +8620,7 @@ static void body(jsi::Runtime &rt,
7677
8620
  rt, callInvoker, uniffiResult);
7678
8621
  } catch (const jsi::JSError &error) {
7679
8622
  std::cout << "Error in callback "
7680
- "UniffiCallbackInterfaceExternalSparkSignerMethod10: "
8623
+ "UniffiCallbackInterfaceExternalSparkSignerMethod11: "
7681
8624
  << error.what() << std::endl;
7682
8625
  throw error;
7683
8626
  }
@@ -7707,8 +8650,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
7707
8650
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7708
8651
  }
7709
8652
 
7710
- static UniffiCallbackInterfaceExternalSparkSignerMethod10
7711
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod10
8653
+ static UniffiCallbackInterfaceExternalSparkSignerMethod11
8654
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod11
7712
8655
  jsi::Runtime &rt,
7713
8656
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7714
8657
  const jsi::Value &value) {
@@ -7756,12 +8699,12 @@ static void cleanup() {
7756
8699
  rsLambda = nullptr;
7757
8700
  }
7758
8701
  } // namespace
7759
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod10
8702
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod11
7760
8703
  // Implementation of callback function calling from Rust to JS
7761
- // CallbackInterfaceExternalSparkSignerMethod11
8704
+ // CallbackInterfaceExternalSparkSignerMethod12
7762
8705
 
7763
8706
  // Callback function:
7764
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod11::UniffiCallbackInterfaceExternalSparkSignerMethod11
8707
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod12::UniffiCallbackInterfaceExternalSparkSignerMethod12
7765
8708
  //
7766
8709
  // We have the following constraints:
7767
8710
  // - we need to pass a function pointer to Rust.
@@ -7775,7 +8718,7 @@ static void cleanup() {
7775
8718
  // We then give the `callback` function pointer to Rust which will call the
7776
8719
  // lambda sometime in the future.
7777
8720
  namespace uniffi::breez_sdk_spark::cb::
7778
- callbackinterfaceexternalsparksignermethod11 {
8721
+ callbackinterfaceexternalsparksignermethod12 {
7779
8722
  using namespace facebook;
7780
8723
 
7781
8724
  // We need to store a lambda in a global so we can call it from
@@ -7823,7 +8766,7 @@ static void body(jsi::Runtime &rt,
7823
8766
  rt, callInvoker, uniffiResult);
7824
8767
  } catch (const jsi::JSError &error) {
7825
8768
  std::cout << "Error in callback "
7826
- "UniffiCallbackInterfaceExternalSparkSignerMethod11: "
8769
+ "UniffiCallbackInterfaceExternalSparkSignerMethod12: "
7827
8770
  << error.what() << std::endl;
7828
8771
  throw error;
7829
8772
  }
@@ -7853,8 +8796,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
7853
8796
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7854
8797
  }
7855
8798
 
7856
- static UniffiCallbackInterfaceExternalSparkSignerMethod11
7857
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod11
8799
+ static UniffiCallbackInterfaceExternalSparkSignerMethod12
8800
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod12
7858
8801
  jsi::Runtime &rt,
7859
8802
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7860
8803
  const jsi::Value &value) {
@@ -7902,12 +8845,12 @@ static void cleanup() {
7902
8845
  rsLambda = nullptr;
7903
8846
  }
7904
8847
  } // namespace
7905
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod11
8848
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod12
7906
8849
  // Implementation of callback function calling from Rust to JS
7907
- // CallbackInterfaceExternalSparkSignerMethod12
8850
+ // CallbackInterfaceExternalSparkSignerMethod13
7908
8851
 
7909
8852
  // Callback function:
7910
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod12::UniffiCallbackInterfaceExternalSparkSignerMethod12
8853
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod13::UniffiCallbackInterfaceExternalSparkSignerMethod13
7911
8854
  //
7912
8855
  // We have the following constraints:
7913
8856
  // - we need to pass a function pointer to Rust.
@@ -7921,7 +8864,7 @@ static void cleanup() {
7921
8864
  // We then give the `callback` function pointer to Rust which will call the
7922
8865
  // lambda sometime in the future.
7923
8866
  namespace uniffi::breez_sdk_spark::cb::
7924
- callbackinterfaceexternalsparksignermethod12 {
8867
+ callbackinterfaceexternalsparksignermethod13 {
7925
8868
  using namespace facebook;
7926
8869
 
7927
8870
  // We need to store a lambda in a global so we can call it from
@@ -7969,7 +8912,7 @@ static void body(jsi::Runtime &rt,
7969
8912
  rt, callInvoker, uniffiResult);
7970
8913
  } catch (const jsi::JSError &error) {
7971
8914
  std::cout << "Error in callback "
7972
- "UniffiCallbackInterfaceExternalSparkSignerMethod12: "
8915
+ "UniffiCallbackInterfaceExternalSparkSignerMethod13: "
7973
8916
  << error.what() << std::endl;
7974
8917
  throw error;
7975
8918
  }
@@ -7999,8 +8942,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
7999
8942
  rs_uniffiCallbackData, rs_uniffiOutReturn);
8000
8943
  }
8001
8944
 
8002
- static UniffiCallbackInterfaceExternalSparkSignerMethod12
8003
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod12
8945
+ static UniffiCallbackInterfaceExternalSparkSignerMethod13
8946
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod13
8004
8947
  jsi::Runtime &rt,
8005
8948
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
8006
8949
  const jsi::Value &value) {
@@ -8048,12 +8991,12 @@ static void cleanup() {
8048
8991
  rsLambda = nullptr;
8049
8992
  }
8050
8993
  } // namespace
8051
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod12
8994
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod13
8052
8995
  // Implementation of callback function calling from Rust to JS
8053
- // CallbackInterfaceExternalSparkSignerMethod13
8996
+ // CallbackInterfaceExternalSparkSignerMethod14
8054
8997
 
8055
8998
  // Callback function:
8056
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod13::UniffiCallbackInterfaceExternalSparkSignerMethod13
8999
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod14::UniffiCallbackInterfaceExternalSparkSignerMethod14
8057
9000
  //
8058
9001
  // We have the following constraints:
8059
9002
  // - we need to pass a function pointer to Rust.
@@ -8067,7 +9010,7 @@ static void cleanup() {
8067
9010
  // We then give the `callback` function pointer to Rust which will call the
8068
9011
  // lambda sometime in the future.
8069
9012
  namespace uniffi::breez_sdk_spark::cb::
8070
- callbackinterfaceexternalsparksignermethod13 {
9013
+ callbackinterfaceexternalsparksignermethod14 {
8071
9014
  using namespace facebook;
8072
9015
 
8073
9016
  // We need to store a lambda in a global so we can call it from
@@ -8115,7 +9058,7 @@ static void body(jsi::Runtime &rt,
8115
9058
  rt, callInvoker, uniffiResult);
8116
9059
  } catch (const jsi::JSError &error) {
8117
9060
  std::cout << "Error in callback "
8118
- "UniffiCallbackInterfaceExternalSparkSignerMethod13: "
9061
+ "UniffiCallbackInterfaceExternalSparkSignerMethod14: "
8119
9062
  << error.what() << std::endl;
8120
9063
  throw error;
8121
9064
  }
@@ -8145,8 +9088,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
8145
9088
  rs_uniffiCallbackData, rs_uniffiOutReturn);
8146
9089
  }
8147
9090
 
8148
- static UniffiCallbackInterfaceExternalSparkSignerMethod13
8149
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod13
9091
+ static UniffiCallbackInterfaceExternalSparkSignerMethod14
9092
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod14
8150
9093
  jsi::Runtime &rt,
8151
9094
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
8152
9095
  const jsi::Value &value) {
@@ -8194,12 +9137,12 @@ static void cleanup() {
8194
9137
  rsLambda = nullptr;
8195
9138
  }
8196
9139
  } // namespace
8197
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod13
9140
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod14
8198
9141
  // Implementation of callback function calling from Rust to JS
8199
- // CallbackInterfaceExternalSparkSignerMethod14
9142
+ // CallbackInterfaceExternalSparkSignerMethod15
8200
9143
 
8201
9144
  // Callback function:
8202
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod14::UniffiCallbackInterfaceExternalSparkSignerMethod14
9145
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15::UniffiCallbackInterfaceExternalSparkSignerMethod15
8203
9146
  //
8204
9147
  // We have the following constraints:
8205
9148
  // - we need to pass a function pointer to Rust.
@@ -8213,7 +9156,7 @@ static void cleanup() {
8213
9156
  // We then give the `callback` function pointer to Rust which will call the
8214
9157
  // lambda sometime in the future.
8215
9158
  namespace uniffi::breez_sdk_spark::cb::
8216
- callbackinterfaceexternalsparksignermethod14 {
9159
+ callbackinterfaceexternalsparksignermethod15 {
8217
9160
  using namespace facebook;
8218
9161
 
8219
9162
  // We need to store a lambda in a global so we can call it from
@@ -8261,7 +9204,7 @@ static void body(jsi::Runtime &rt,
8261
9204
  rt, callInvoker, uniffiResult);
8262
9205
  } catch (const jsi::JSError &error) {
8263
9206
  std::cout << "Error in callback "
8264
- "UniffiCallbackInterfaceExternalSparkSignerMethod14: "
9207
+ "UniffiCallbackInterfaceExternalSparkSignerMethod15: "
8265
9208
  << error.what() << std::endl;
8266
9209
  throw error;
8267
9210
  }
@@ -8291,8 +9234,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
8291
9234
  rs_uniffiCallbackData, rs_uniffiOutReturn);
8292
9235
  }
8293
9236
 
8294
- static UniffiCallbackInterfaceExternalSparkSignerMethod14
8295
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod14
9237
+ static UniffiCallbackInterfaceExternalSparkSignerMethod15
9238
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15
8296
9239
  jsi::Runtime &rt,
8297
9240
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
8298
9241
  const jsi::Value &value) {
@@ -8340,7 +9283,7 @@ static void cleanup() {
8340
9283
  rsLambda = nullptr;
8341
9284
  }
8342
9285
  } // namespace
8343
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod14
9286
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15
8344
9287
  // Implementation of callback function calling from Rust to JS
8345
9288
  // CallbackInterfaceFiatServiceMethod0
8346
9289
 
@@ -14827,6 +15770,52 @@ namespace uniffi::breez_sdk_spark {
14827
15770
  using namespace facebook;
14828
15771
  using CallInvoker = uniffi_runtime::UniffiCallInvoker;
14829
15772
 
15773
+ template <>
15774
+ struct Bridging<UniffiVTableCallbackInterfaceExternalSigningSigner> {
15775
+ static UniffiVTableCallbackInterfaceExternalSigningSigner
15776
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
15777
+ const jsi::Value &jsValue) {
15778
+ // Check if the input is an object
15779
+ if (!jsValue.isObject()) {
15780
+ throw jsi::JSError(rt,
15781
+ "Expected an object for "
15782
+ "UniffiVTableCallbackInterfaceExternalSigningSigner");
15783
+ }
15784
+
15785
+ // Get the object from the jsi::Value
15786
+ auto jsObject = jsValue.getObject(rt);
15787
+
15788
+ // Create the vtable struct
15789
+ UniffiVTableCallbackInterfaceExternalSigningSigner rsObject;
15790
+
15791
+ // Create the vtable from the js callbacks.
15792
+ rsObject.derive_public_key = uniffi::breez_sdk_spark::cb::
15793
+ callbackinterfaceexternalsigningsignermethod0::makeCallbackFunction(
15794
+ rt, callInvoker, jsObject.getProperty(rt, "derivePublicKey"));
15795
+ rsObject.sign_ecdsa = uniffi::breez_sdk_spark::cb::
15796
+ callbackinterfaceexternalsigningsignermethod1::makeCallbackFunction(
15797
+ rt, callInvoker, jsObject.getProperty(rt, "signEcdsa"));
15798
+ rsObject.sign_ecdsa_recoverable = uniffi::breez_sdk_spark::cb::
15799
+ callbackinterfaceexternalsigningsignermethod2::makeCallbackFunction(
15800
+ rt, callInvoker, jsObject.getProperty(rt, "signEcdsaRecoverable"));
15801
+ rsObject.sign_hash_schnorr = uniffi::breez_sdk_spark::cb::
15802
+ callbackinterfaceexternalsigningsignermethod3::makeCallbackFunction(
15803
+ rt, callInvoker, jsObject.getProperty(rt, "signHashSchnorr"));
15804
+ rsObject.uniffi_free = uniffi::breez_sdk_spark::st::
15805
+ vtablecallbackinterfaceexternalsigningsigner::
15806
+ vtablecallbackinterfaceexternalsigningsigner::free::
15807
+ makeCallbackFunction(rt, callInvoker,
15808
+ jsObject.getProperty(rt, "uniffiFree"));
15809
+
15810
+ return rsObject;
15811
+ }
15812
+ };
15813
+
15814
+ } // namespace uniffi::breez_sdk_spark
15815
+ namespace uniffi::breez_sdk_spark {
15816
+ using namespace facebook;
15817
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
15818
+
14830
15819
  template <> struct Bridging<UniffiVTableCallbackInterfaceExternalSparkSigner> {
14831
15820
  static UniffiVTableCallbackInterfaceExternalSparkSigner
14832
15821
  fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
@@ -14851,50 +15840,53 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceExternalSparkSigner> {
14851
15840
  rsObject.get_public_key_for_leaf = uniffi::breez_sdk_spark::cb::
14852
15841
  callbackinterfaceexternalsparksignermethod1::makeCallbackFunction(
14853
15842
  rt, callInvoker, jsObject.getProperty(rt, "getPublicKeyForLeaf"));
14854
- rsObject.get_static_deposit_public_key = uniffi::breez_sdk_spark::cb::
15843
+ rsObject.is_remote = uniffi::breez_sdk_spark::cb::
14855
15844
  callbackinterfaceexternalsparksignermethod2::makeCallbackFunction(
15845
+ rt, callInvoker, jsObject.getProperty(rt, "isRemote"));
15846
+ rsObject.get_static_deposit_public_key = uniffi::breez_sdk_spark::cb::
15847
+ callbackinterfaceexternalsparksignermethod3::makeCallbackFunction(
14856
15848
  rt, callInvoker,
14857
15849
  jsObject.getProperty(rt, "getStaticDepositPublicKey"));
14858
15850
  rsObject.sign_authentication_challenge = uniffi::breez_sdk_spark::cb::
14859
- callbackinterfaceexternalsparksignermethod3::makeCallbackFunction(
15851
+ callbackinterfaceexternalsparksignermethod4::makeCallbackFunction(
14860
15852
  rt, callInvoker,
14861
15853
  jsObject.getProperty(rt, "signAuthenticationChallenge"));
14862
15854
  rsObject.sign_message = uniffi::breez_sdk_spark::cb::
14863
- callbackinterfaceexternalsparksignermethod4::makeCallbackFunction(
15855
+ callbackinterfaceexternalsparksignermethod5::makeCallbackFunction(
14864
15856
  rt, callInvoker, jsObject.getProperty(rt, "signMessage"));
14865
15857
  rsObject.sign_frost = uniffi::breez_sdk_spark::cb::
14866
- callbackinterfaceexternalsparksignermethod5::makeCallbackFunction(
15858
+ callbackinterfaceexternalsparksignermethod6::makeCallbackFunction(
14867
15859
  rt, callInvoker, jsObject.getProperty(rt, "signFrost"));
14868
15860
  rsObject.prepare_transfer = uniffi::breez_sdk_spark::cb::
14869
- callbackinterfaceexternalsparksignermethod6::makeCallbackFunction(
15861
+ callbackinterfaceexternalsparksignermethod7::makeCallbackFunction(
14870
15862
  rt, callInvoker, jsObject.getProperty(rt, "prepareTransfer"));
14871
15863
  rsObject.prepare_claim = uniffi::breez_sdk_spark::cb::
14872
- callbackinterfaceexternalsparksignermethod7::makeCallbackFunction(
15864
+ callbackinterfaceexternalsparksignermethod8::makeCallbackFunction(
14873
15865
  rt, callInvoker, jsObject.getProperty(rt, "prepareClaim"));
14874
15866
  rsObject.prepare_lightning_receive = uniffi::breez_sdk_spark::cb::
14875
- callbackinterfaceexternalsparksignermethod8::makeCallbackFunction(
15867
+ callbackinterfaceexternalsparksignermethod9::makeCallbackFunction(
14876
15868
  rt, callInvoker,
14877
15869
  jsObject.getProperty(rt, "prepareLightningReceive"));
14878
15870
  rsObject.prepare_static_deposit = uniffi::breez_sdk_spark::cb::
14879
- callbackinterfaceexternalsparksignermethod9::makeCallbackFunction(
15871
+ callbackinterfaceexternalsparksignermethod10::makeCallbackFunction(
14880
15872
  rt, callInvoker, jsObject.getProperty(rt, "prepareStaticDeposit"));
14881
15873
  rsObject.start_static_deposit_refund = uniffi::breez_sdk_spark::cb::
14882
- callbackinterfaceexternalsparksignermethod10::makeCallbackFunction(
15874
+ callbackinterfaceexternalsparksignermethod11::makeCallbackFunction(
14883
15875
  rt, callInvoker,
14884
15876
  jsObject.getProperty(rt, "startStaticDepositRefund"));
14885
15877
  rsObject.sign_static_deposit_refund = uniffi::breez_sdk_spark::cb::
14886
- callbackinterfaceexternalsparksignermethod11::makeCallbackFunction(
15878
+ callbackinterfaceexternalsparksignermethod12::makeCallbackFunction(
14887
15879
  rt, callInvoker,
14888
15880
  jsObject.getProperty(rt, "signStaticDepositRefund"));
14889
15881
  rsObject.sign_spark_invoice = uniffi::breez_sdk_spark::cb::
14890
- callbackinterfaceexternalsparksignermethod12::makeCallbackFunction(
15882
+ callbackinterfaceexternalsparksignermethod13::makeCallbackFunction(
14891
15883
  rt, callInvoker, jsObject.getProperty(rt, "signSparkInvoice"));
14892
15884
  rsObject.prepare_token_transaction = uniffi::breez_sdk_spark::cb::
14893
- callbackinterfaceexternalsparksignermethod13::makeCallbackFunction(
15885
+ callbackinterfaceexternalsparksignermethod14::makeCallbackFunction(
14894
15886
  rt, callInvoker,
14895
15887
  jsObject.getProperty(rt, "prepareTokenTransaction"));
14896
15888
  rsObject.prepare_static_deposit_claim = uniffi::breez_sdk_spark::cb::
14897
- callbackinterfaceexternalsparksignermethod14::makeCallbackFunction(
15889
+ callbackinterfaceexternalsparksignermethod15::makeCallbackFunction(
14898
15890
  rt, callInvoker,
14899
15891
  jsObject.getProperty(rt, "prepareStaticDepositClaim"));
14900
15892
  rsObject.uniffi_free = uniffi::breez_sdk_spark::st::
@@ -15481,6 +16473,31 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
15481
16473
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_authorize_lightning_address_transfer(
15482
16474
  rt, thisVal, args, count);
15483
16475
  });
16476
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_"
16477
+ "pay_package"] = jsi::Function::createFromHostFunction(
16478
+ rt,
16479
+ jsi::PropNameID::forAscii(rt,
16480
+ "ubrn_uniffi_breez_sdk_spark_fn_method_"
16481
+ "breezsdk_build_unsigned_lnurl_pay_package"),
16482
+ 2,
16483
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16484
+ const jsi::Value *args, size_t count) -> jsi::Value {
16485
+ return this
16486
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_pay_package(
16487
+ rt, thisVal, args, count);
16488
+ });
16489
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_"
16490
+ "transfer_package"] = jsi::Function::createFromHostFunction(
16491
+ rt,
16492
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
16493
+ "breezsdk_build_unsigned_transfer_package"),
16494
+ 2,
16495
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16496
+ const jsi::Value *args, size_t count) -> jsi::Value {
16497
+ return this
16498
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_transfer_package(
16499
+ rt, thisVal, args, count);
16500
+ });
15484
16501
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin"] =
15485
16502
  jsi::Function::createFromHostFunction(
15486
16503
  rt,
@@ -15850,6 +16867,31 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
15850
16867
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
15851
16868
  rt, thisVal, args, count);
15852
16869
  });
16870
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_"
16871
+ "pay_package"] = jsi::Function::createFromHostFunction(
16872
+ rt,
16873
+ jsi::PropNameID::forAscii(rt,
16874
+ "ubrn_uniffi_breez_sdk_spark_fn_method_"
16875
+ "breezsdk_publish_signed_lnurl_pay_package"),
16876
+ 2,
16877
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16878
+ const jsi::Value *args, size_t count) -> jsi::Value {
16879
+ return this
16880
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_pay_package(
16881
+ rt, thisVal, args, count);
16882
+ });
16883
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_"
16884
+ "transfer_package"] = jsi::Function::createFromHostFunction(
16885
+ rt,
16886
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
16887
+ "breezsdk_publish_signed_transfer_package"),
16888
+ 2,
16889
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16890
+ const jsi::Value *args, size_t count) -> jsi::Value {
16891
+ return this
16892
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_transfer_package(
16893
+ rt, thisVal, args, count);
16894
+ });
15853
16895
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment"] =
15854
16896
  jsi::Function::createFromHostFunction(
15855
16897
  rt,
@@ -16099,36 +17141,121 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16099
17141
  "ecies"] = jsi::Function::createFromHostFunction(
16100
17142
  rt,
16101
17143
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
16102
- "externalbreezsigner_decrypt_ecies"),
17144
+ "externalbreezsigner_decrypt_ecies"),
17145
+ 3,
17146
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17147
+ const jsi::Value *args, size_t count) -> jsi::Value {
17148
+ return this
17149
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_decrypt_ecies(
17150
+ rt, thisVal, args, count);
17151
+ });
17152
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_sign_hash_"
17153
+ "schnorr"] = jsi::Function::createFromHostFunction(
17154
+ rt,
17155
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17156
+ "externalbreezsigner_sign_hash_schnorr"),
17157
+ 3,
17158
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17159
+ const jsi::Value *args, size_t count) -> jsi::Value {
17160
+ return this
17161
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_sign_hash_schnorr(
17162
+ rt, thisVal, args, count);
17163
+ });
17164
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_hmac_"
17165
+ "sha256"] = jsi::Function::createFromHostFunction(
17166
+ rt,
17167
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17168
+ "externalbreezsigner_hmac_sha256"),
17169
+ 3,
17170
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17171
+ const jsi::Value *args, size_t count) -> jsi::Value {
17172
+ return this
17173
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_hmac_sha256(
17174
+ rt, thisVal, args, count);
17175
+ });
17176
+ props["ubrn_uniffi_breez_sdk_spark_fn_clone_externalsigningsigner"] =
17177
+ jsi::Function::createFromHostFunction(
17178
+ rt,
17179
+ jsi::PropNameID::forAscii(
17180
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_clone_externalsigningsigner"),
17181
+ 1,
17182
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17183
+ const jsi::Value *args, size_t count) -> jsi::Value {
17184
+ return this
17185
+ ->cpp_uniffi_breez_sdk_spark_fn_clone_externalsigningsigner(
17186
+ rt, thisVal, args, count);
17187
+ });
17188
+ props["ubrn_uniffi_breez_sdk_spark_fn_free_externalsigningsigner"] =
17189
+ jsi::Function::createFromHostFunction(
17190
+ rt,
17191
+ jsi::PropNameID::forAscii(
17192
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_free_externalsigningsigner"),
17193
+ 1,
17194
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17195
+ const jsi::Value *args, size_t count) -> jsi::Value {
17196
+ return this
17197
+ ->cpp_uniffi_breez_sdk_spark_fn_free_externalsigningsigner(
17198
+ rt, thisVal, args, count);
17199
+ });
17200
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_"
17201
+ "externalsigningsigner"] = jsi::Function::createFromHostFunction(
17202
+ rt,
17203
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
17204
+ "callback_vtable_externalsigningsigner"),
17205
+ 1,
17206
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17207
+ const jsi::Value *args, size_t count) -> jsi::Value {
17208
+ return this
17209
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigningsigner(
17210
+ rt, thisVal, args, count);
17211
+ });
17212
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_derive_"
17213
+ "public_key"] = jsi::Function::createFromHostFunction(
17214
+ rt,
17215
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17216
+ "externalsigningsigner_derive_public_key"),
17217
+ 2,
17218
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17219
+ const jsi::Value *args, size_t count) -> jsi::Value {
17220
+ return this
17221
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_derive_public_key(
17222
+ rt, thisVal, args, count);
17223
+ });
17224
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_"
17225
+ "ecdsa"] = jsi::Function::createFromHostFunction(
17226
+ rt,
17227
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17228
+ "externalsigningsigner_sign_ecdsa"),
16103
17229
  3,
16104
17230
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16105
17231
  const jsi::Value *args, size_t count) -> jsi::Value {
16106
17232
  return this
16107
- ->cpp_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_decrypt_ecies(
17233
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa(
16108
17234
  rt, thisVal, args, count);
16109
17235
  });
16110
- props["ubrn_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_sign_hash_"
16111
- "schnorr"] = jsi::Function::createFromHostFunction(
17236
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_"
17237
+ "ecdsa_recoverable"] = jsi::Function::createFromHostFunction(
16112
17238
  rt,
16113
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
16114
- "externalbreezsigner_sign_hash_schnorr"),
17239
+ jsi::PropNameID::forAscii(rt,
17240
+ "ubrn_uniffi_breez_sdk_spark_fn_method_"
17241
+ "externalsigningsigner_sign_ecdsa_recoverable"),
16115
17242
  3,
16116
17243
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16117
17244
  const jsi::Value *args, size_t count) -> jsi::Value {
16118
17245
  return this
16119
- ->cpp_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_sign_hash_schnorr(
17246
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa_recoverable(
16120
17247
  rt, thisVal, args, count);
16121
17248
  });
16122
- props["ubrn_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_hmac_"
16123
- "sha256"] = jsi::Function::createFromHostFunction(
17249
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_hash_"
17250
+ "schnorr"] = jsi::Function::createFromHostFunction(
16124
17251
  rt,
16125
17252
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
16126
- "externalbreezsigner_hmac_sha256"),
17253
+ "externalsigningsigner_sign_hash_schnorr"),
16127
17254
  3,
16128
17255
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
16129
17256
  const jsi::Value *args, size_t count) -> jsi::Value {
16130
17257
  return this
16131
- ->cpp_uniffi_breez_sdk_spark_fn_method_externalbreezsigner_hmac_sha256(
17258
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_hash_schnorr(
16132
17259
  rt, thisVal, args, count);
16133
17260
  });
16134
17261
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_externalsparksigner"] =
@@ -16192,6 +17319,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16192
17319
  ->cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_get_public_key_for_leaf(
16193
17320
  rt, thisVal, args, count);
16194
17321
  });
17322
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsparksigner_is_remote"] =
17323
+ jsi::Function::createFromHostFunction(
17324
+ rt,
17325
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17326
+ "externalsparksigner_is_remote"),
17327
+ 1,
17328
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17329
+ const jsi::Value *args, size_t count) -> jsi::Value {
17330
+ return this
17331
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_is_remote(
17332
+ rt, thisVal, args, count);
17333
+ });
16195
17334
  props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsparksigner_get_static_"
16196
17335
  "deposit_public_key"] = jsi::Function::createFromHostFunction(
16197
17336
  rt,
@@ -16840,6 +17979,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16840
17979
  ->cpp_uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new_with_signer(
16841
17980
  rt, thisVal, args, count);
16842
17981
  });
17982
+ props["ubrn_uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new_with_"
17983
+ "signing_only_signer"] = jsi::Function::createFromHostFunction(
17984
+ rt,
17985
+ jsi::PropNameID::forAscii(rt,
17986
+ "ubrn_uniffi_breez_sdk_spark_fn_constructor_"
17987
+ "sdkbuilder_new_with_signing_only_signer"),
17988
+ 3,
17989
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17990
+ const jsi::Value *args, size_t count) -> jsi::Value {
17991
+ return this
17992
+ ->cpp_uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new_with_signing_only_signer(
17993
+ rt, thisVal, args, count);
17994
+ });
16843
17995
  props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_build"] =
16844
17996
  jsi::Function::createFromHostFunction(
16845
17997
  rt,
@@ -16935,6 +18087,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16935
18087
  ->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
16936
18088
  rt, thisVal, args, count);
16937
18089
  });
18090
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_session_store"] =
18091
+ jsi::Function::createFromHostFunction(
18092
+ rt,
18093
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
18094
+ "sdkbuilder_with_session_store"),
18095
+ 2,
18096
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
18097
+ const jsi::Value *args, size_t count) -> jsi::Value {
18098
+ return this
18099
+ ->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_session_store(
18100
+ rt, thisVal, args, count);
18101
+ });
16938
18102
  props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_shared_"
16939
18103
  "context"] = jsi::Function::createFromHostFunction(
16940
18104
  rt,
@@ -17644,6 +18808,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17644
18808
  return this->cpp_uniffi_breez_sdk_spark_fn_func_connect_with_signer(
17645
18809
  rt, thisVal, args, count);
17646
18810
  });
18811
+ props["ubrn_uniffi_breez_sdk_spark_fn_func_connect_with_signing_only_"
18812
+ "signer"] = jsi::Function::createFromHostFunction(
18813
+ rt,
18814
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_func_"
18815
+ "connect_with_signing_only_signer"),
18816
+ 1,
18817
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
18818
+ const jsi::Value *args, size_t count) -> jsi::Value {
18819
+ return this
18820
+ ->cpp_uniffi_breez_sdk_spark_fn_func_connect_with_signing_only_signer(
18821
+ rt, thisVal, args, count);
18822
+ });
17647
18823
  props["ubrn_uniffi_breez_sdk_spark_fn_func_create_turnkey_signer"] =
17648
18824
  jsi::Function::createFromHostFunction(
17649
18825
  rt,
@@ -17656,6 +18832,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17656
18832
  ->cpp_uniffi_breez_sdk_spark_fn_func_create_turnkey_signer(
17657
18833
  rt, thisVal, args, count);
17658
18834
  });
18835
+ props["ubrn_uniffi_breez_sdk_spark_fn_func_create_turnkey_signing_only_"
18836
+ "signer"] = jsi::Function::createFromHostFunction(
18837
+ rt,
18838
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_func_"
18839
+ "create_turnkey_signing_only_signer"),
18840
+ 1,
18841
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
18842
+ const jsi::Value *args, size_t count) -> jsi::Value {
18843
+ return this
18844
+ ->cpp_uniffi_breez_sdk_spark_fn_func_create_turnkey_signing_only_signer(
18845
+ rt, thisVal, args, count);
18846
+ });
17659
18847
  props["ubrn_uniffi_breez_sdk_spark_fn_func_custom_storage"] =
17660
18848
  jsi::Function::createFromHostFunction(
17661
18849
  rt,
@@ -17703,6 +18891,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17703
18891
  ->cpp_uniffi_breez_sdk_spark_fn_func_default_server_config(
17704
18892
  rt, thisVal, args, count);
17705
18893
  });
18894
+ props["ubrn_uniffi_breez_sdk_spark_fn_func_default_session_store"] =
18895
+ jsi::Function::createFromHostFunction(
18896
+ rt,
18897
+ jsi::PropNameID::forAscii(
18898
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_func_default_session_store"),
18899
+ 3,
18900
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
18901
+ const jsi::Value *args, size_t count) -> jsi::Value {
18902
+ return this
18903
+ ->cpp_uniffi_breez_sdk_spark_fn_func_default_session_store(
18904
+ rt, thisVal, args, count);
18905
+ });
17706
18906
  props["ubrn_uniffi_breez_sdk_spark_fn_func_default_storage"] =
17707
18907
  jsi::Function::createFromHostFunction(
17708
18908
  rt,
@@ -18357,6 +19557,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
18357
19557
  ->cpp_uniffi_breez_sdk_spark_checksum_func_connect_with_signer(
18358
19558
  rt, thisVal, args, count);
18359
19559
  });
19560
+ props["ubrn_uniffi_breez_sdk_spark_checksum_func_connect_with_signing_only_"
19561
+ "signer"] = jsi::Function::createFromHostFunction(
19562
+ rt,
19563
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_func_"
19564
+ "connect_with_signing_only_signer"),
19565
+ 0,
19566
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19567
+ const jsi::Value *args, size_t count) -> jsi::Value {
19568
+ return this
19569
+ ->cpp_uniffi_breez_sdk_spark_checksum_func_connect_with_signing_only_signer(
19570
+ rt, thisVal, args, count);
19571
+ });
18360
19572
  props["ubrn_uniffi_breez_sdk_spark_checksum_func_create_turnkey_signer"] =
18361
19573
  jsi::Function::createFromHostFunction(
18362
19574
  rt,
@@ -18369,6 +19581,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
18369
19581
  ->cpp_uniffi_breez_sdk_spark_checksum_func_create_turnkey_signer(
18370
19582
  rt, thisVal, args, count);
18371
19583
  });
19584
+ props["ubrn_uniffi_breez_sdk_spark_checksum_func_create_turnkey_signing_only_"
19585
+ "signer"] = jsi::Function::createFromHostFunction(
19586
+ rt,
19587
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_func_"
19588
+ "create_turnkey_signing_only_signer"),
19589
+ 0,
19590
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19591
+ const jsi::Value *args, size_t count) -> jsi::Value {
19592
+ return this
19593
+ ->cpp_uniffi_breez_sdk_spark_checksum_func_create_turnkey_signing_only_signer(
19594
+ rt, thisVal, args, count);
19595
+ });
18372
19596
  props["ubrn_uniffi_breez_sdk_spark_checksum_func_custom_storage"] =
18373
19597
  jsi::Function::createFromHostFunction(
18374
19598
  rt,
@@ -18417,6 +19641,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
18417
19641
  ->cpp_uniffi_breez_sdk_spark_checksum_func_default_server_config(
18418
19642
  rt, thisVal, args, count);
18419
19643
  });
19644
+ props["ubrn_uniffi_breez_sdk_spark_checksum_func_default_session_store"] =
19645
+ jsi::Function::createFromHostFunction(
19646
+ rt,
19647
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
19648
+ "func_default_session_store"),
19649
+ 0,
19650
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19651
+ const jsi::Value *args, size_t count) -> jsi::Value {
19652
+ return this
19653
+ ->cpp_uniffi_breez_sdk_spark_checksum_func_default_session_store(
19654
+ rt, thisVal, args, count);
19655
+ });
18420
19656
  props["ubrn_uniffi_breez_sdk_spark_checksum_func_default_storage"] =
18421
19657
  jsi::Function::createFromHostFunction(
18422
19658
  rt,
@@ -18578,6 +19814,32 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
18578
19814
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_authorize_lightning_address_transfer(
18579
19815
  rt, thisVal, args, count);
18580
19816
  });
19817
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_"
19818
+ "lnurl_pay_package"] = jsi::Function::createFromHostFunction(
19819
+ rt,
19820
+ jsi::PropNameID::forAscii(rt,
19821
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
19822
+ "breezsdk_build_unsigned_lnurl_pay_package"),
19823
+ 0,
19824
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19825
+ const jsi::Value *args, size_t count) -> jsi::Value {
19826
+ return this
19827
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package(
19828
+ rt, thisVal, args, count);
19829
+ });
19830
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_"
19831
+ "transfer_package"] = jsi::Function::createFromHostFunction(
19832
+ rt,
19833
+ jsi::PropNameID::forAscii(rt,
19834
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
19835
+ "breezsdk_build_unsigned_transfer_package"),
19836
+ 0,
19837
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19838
+ const jsi::Value *args, size_t count) -> jsi::Value {
19839
+ return this
19840
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_transfer_package(
19841
+ rt, thisVal, args, count);
19842
+ });
18581
19843
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin"] =
18582
19844
  jsi::Function::createFromHostFunction(
18583
19845
  rt,
@@ -18942,6 +20204,32 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
18942
20204
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment(
18943
20205
  rt, thisVal, args, count);
18944
20206
  });
20207
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_"
20208
+ "lnurl_pay_package"] = jsi::Function::createFromHostFunction(
20209
+ rt,
20210
+ jsi::PropNameID::forAscii(rt,
20211
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
20212
+ "breezsdk_publish_signed_lnurl_pay_package"),
20213
+ 0,
20214
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20215
+ const jsi::Value *args, size_t count) -> jsi::Value {
20216
+ return this
20217
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package(
20218
+ rt, thisVal, args, count);
20219
+ });
20220
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_"
20221
+ "transfer_package"] = jsi::Function::createFromHostFunction(
20222
+ rt,
20223
+ jsi::PropNameID::forAscii(rt,
20224
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
20225
+ "breezsdk_publish_signed_transfer_package"),
20226
+ 0,
20227
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20228
+ const jsi::Value *args, size_t count) -> jsi::Value {
20229
+ return this
20230
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_transfer_package(
20231
+ rt, thisVal, args, count);
20232
+ });
18945
20233
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_"
18946
20234
  "payment"] = jsi::Function::createFromHostFunction(
18947
20235
  rt,
@@ -19187,6 +20475,57 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19187
20475
  ->cpp_uniffi_breez_sdk_spark_checksum_method_externalbreezsigner_hmac_sha256(
19188
20476
  rt, thisVal, args, count);
19189
20477
  });
20478
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_"
20479
+ "derive_public_key"] = jsi::Function::createFromHostFunction(
20480
+ rt,
20481
+ jsi::PropNameID::forAscii(rt,
20482
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
20483
+ "externalsigningsigner_derive_public_key"),
20484
+ 0,
20485
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20486
+ const jsi::Value *args, size_t count) -> jsi::Value {
20487
+ return this
20488
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_derive_public_key(
20489
+ rt, thisVal, args, count);
20490
+ });
20491
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_"
20492
+ "sign_ecdsa"] = jsi::Function::createFromHostFunction(
20493
+ rt,
20494
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
20495
+ "method_externalsigningsigner_sign_ecdsa"),
20496
+ 0,
20497
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20498
+ const jsi::Value *args, size_t count) -> jsi::Value {
20499
+ return this
20500
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa(
20501
+ rt, thisVal, args, count);
20502
+ });
20503
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_"
20504
+ "sign_ecdsa_recoverable"] = jsi::Function::createFromHostFunction(
20505
+ rt,
20506
+ jsi::PropNameID::forAscii(rt,
20507
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
20508
+ "externalsigningsigner_sign_ecdsa_recoverable"),
20509
+ 0,
20510
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20511
+ const jsi::Value *args, size_t count) -> jsi::Value {
20512
+ return this
20513
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa_recoverable(
20514
+ rt, thisVal, args, count);
20515
+ });
20516
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_"
20517
+ "sign_hash_schnorr"] = jsi::Function::createFromHostFunction(
20518
+ rt,
20519
+ jsi::PropNameID::forAscii(rt,
20520
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
20521
+ "externalsigningsigner_sign_hash_schnorr"),
20522
+ 0,
20523
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20524
+ const jsi::Value *args, size_t count) -> jsi::Value {
20525
+ return this
20526
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_hash_schnorr(
20527
+ rt, thisVal, args, count);
20528
+ });
19190
20529
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_"
19191
20530
  "identity_public_key"] = jsi::Function::createFromHostFunction(
19192
20531
  rt,
@@ -19213,6 +20552,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19213
20552
  ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_public_key_for_leaf(
19214
20553
  rt, thisVal, args, count);
19215
20554
  });
20555
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_is_"
20556
+ "remote"] = jsi::Function::createFromHostFunction(
20557
+ rt,
20558
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
20559
+ "method_externalsparksigner_is_remote"),
20560
+ 0,
20561
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20562
+ const jsi::Value *args, size_t count) -> jsi::Value {
20563
+ return this
20564
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_is_remote(
20565
+ rt, thisVal, args, count);
20566
+ });
19216
20567
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_"
19217
20568
  "static_deposit_public_key"] = jsi::Function::createFromHostFunction(
19218
20569
  rt,
@@ -19696,6 +21047,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19696
21047
  ->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service(
19697
21048
  rt, thisVal, args, count);
19698
21049
  });
21050
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_"
21051
+ "store"] = jsi::Function::createFromHostFunction(
21052
+ rt,
21053
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
21054
+ "method_sdkbuilder_with_session_store"),
21055
+ 0,
21056
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21057
+ const jsi::Value *args, size_t count) -> jsi::Value {
21058
+ return this
21059
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_store(
21060
+ rt, thisVal, args, count);
21061
+ });
19699
21062
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_shared_"
19700
21063
  "context"] = jsi::Function::createFromHostFunction(
19701
21064
  rt,
@@ -20255,6 +21618,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20255
21618
  ->cpp_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_with_signer(
20256
21619
  rt, thisVal, args, count);
20257
21620
  });
21621
+ props["ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_with_"
21622
+ "signing_only_signer"] = jsi::Function::createFromHostFunction(
21623
+ rt,
21624
+ jsi::PropNameID::forAscii(
21625
+ rt, "ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_"
21626
+ "with_signing_only_signer"),
21627
+ 0,
21628
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21629
+ const jsi::Value *args, size_t count) -> jsi::Value {
21630
+ return this
21631
+ ->cpp_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_with_signing_only_signer(
21632
+ rt, thisVal, args, count);
21633
+ });
20258
21634
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event"] =
20259
21635
  jsi::Function::createFromHostFunction(
20260
21636
  rt,
@@ -20325,6 +21701,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20325
21701
  ->cpp_uniffi_internal_fn_method_externalbreezsigner_ffi__bless_pointer(
20326
21702
  rt, thisVal, args, count);
20327
21703
  });
21704
+ props["ubrn_uniffi_internal_fn_method_externalsigningsigner_ffi__bless_"
21705
+ "pointer"] = jsi::Function::createFromHostFunction(
21706
+ rt,
21707
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_"
21708
+ "externalsigningsigner_ffi__bless_pointer"),
21709
+ 1,
21710
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21711
+ const jsi::Value *args, size_t count) -> jsi::Value {
21712
+ return this
21713
+ ->cpp_uniffi_internal_fn_method_externalsigningsigner_ffi__bless_pointer(
21714
+ rt, thisVal, args, count);
21715
+ });
20328
21716
  props["ubrn_uniffi_internal_fn_method_externalsparksigner_ffi__bless_"
20329
21717
  "pointer"] = jsi::Function::createFromHostFunction(
20330
21718
  rt,
@@ -20551,6 +21939,8 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
20551
21939
  vtablecallbackinterfacebitcoinchainservice::free::cleanup();
20552
21940
  uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalbreezsigner::
20553
21941
  vtablecallbackinterfaceexternalbreezsigner::free::cleanup();
21942
+ uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalsigningsigner::
21943
+ vtablecallbackinterfaceexternalsigningsigner::free::cleanup();
20554
21944
  uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalsparksigner::
20555
21945
  vtablecallbackinterfaceexternalsparksigner::free::cleanup();
20556
21946
  uniffi::breez_sdk_spark::st::vtablecallbackinterfacefiatservice::
@@ -20607,6 +21997,18 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
20607
21997
  // Cleanup for callback function CallbackInterfaceExternalBreezSignerMethod6
20608
21998
  uniffi::breez_sdk_spark::cb::callbackinterfaceexternalbreezsignermethod6::
20609
21999
  cleanup();
22000
+ // Cleanup for callback function CallbackInterfaceExternalSigningSignerMethod0
22001
+ uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod0::
22002
+ cleanup();
22003
+ // Cleanup for callback function CallbackInterfaceExternalSigningSignerMethod1
22004
+ uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod1::
22005
+ cleanup();
22006
+ // Cleanup for callback function CallbackInterfaceExternalSigningSignerMethod2
22007
+ uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod2::
22008
+ cleanup();
22009
+ // Cleanup for callback function CallbackInterfaceExternalSigningSignerMethod3
22010
+ uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsigningsignermethod3::
22011
+ cleanup();
20610
22012
  // Cleanup for callback function CallbackInterfaceExternalSparkSignerMethod0
20611
22013
  uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod0::
20612
22014
  cleanup();
@@ -20652,6 +22054,9 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
20652
22054
  // Cleanup for callback function CallbackInterfaceExternalSparkSignerMethod14
20653
22055
  uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod14::
20654
22056
  cleanup();
22057
+ // Cleanup for callback function CallbackInterfaceExternalSparkSignerMethod15
22058
+ uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15::
22059
+ cleanup();
20655
22060
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod0
20656
22061
  uniffi::breez_sdk_spark::cb::callbackinterfacefiatservicemethod0::cleanup();
20657
22062
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod1
@@ -20814,6 +22219,22 @@ jsi::Value NativeBreezSdkSpark::
20814
22219
  auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
20815
22220
  return jsi::Value(rt, obj);
20816
22221
  }
22222
+ jsi::Value NativeBreezSdkSpark::
22223
+ cpp_uniffi_internal_fn_method_externalsigningsigner_ffi__bless_pointer(
22224
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
22225
+ size_t count) {
22226
+ auto pointer =
22227
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
22228
+ auto static destructor = [](uint64_t p) {
22229
+ auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
22230
+ RustCallStatus status = {0};
22231
+ uniffi_breez_sdk_spark_fn_free_externalsigningsigner(pointer, &status);
22232
+ };
22233
+ auto ptrObj =
22234
+ std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
22235
+ auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
22236
+ return jsi::Value(rt, obj);
22237
+ }
20817
22238
  jsi::Value NativeBreezSdkSpark::
20818
22239
  cpp_uniffi_internal_fn_method_externalsparksigner_ffi__bless_pointer(
20819
22240
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -21204,6 +22625,32 @@ jsi::Value NativeBreezSdkSpark::
21204
22625
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
21205
22626
  value);
21206
22627
  }
22628
+ jsi::Value NativeBreezSdkSpark::
22629
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_pay_package(
22630
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
22631
+ size_t count) {
22632
+ auto value =
22633
+ uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_pay_package(
22634
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
22635
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
22636
+ args[1]));
22637
+
22638
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
22639
+ value);
22640
+ }
22641
+ jsi::Value NativeBreezSdkSpark::
22642
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_transfer_package(
22643
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
22644
+ size_t count) {
22645
+ auto value =
22646
+ uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_transfer_package(
22647
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
22648
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
22649
+ args[1]));
22650
+
22651
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
22652
+ value);
22653
+ }
21207
22654
  jsi::Value
21208
22655
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin(
21209
22656
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -21545,13 +22992,39 @@ jsi::Value NativeBreezSdkSpark::
21545
22992
  value);
21546
22993
  }
21547
22994
  jsi::Value NativeBreezSdkSpark::
21548
- cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
22995
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
22996
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
22997
+ size_t count) {
22998
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
22999
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23000
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23001
+ args[1]));
23002
+
23003
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23004
+ value);
23005
+ }
23006
+ jsi::Value NativeBreezSdkSpark::
23007
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_pay_package(
23008
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23009
+ size_t count) {
23010
+ auto value =
23011
+ uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_pay_package(
23012
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23013
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23014
+ args[1]));
23015
+
23016
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23017
+ value);
23018
+ }
23019
+ jsi::Value NativeBreezSdkSpark::
23020
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_transfer_package(
21549
23021
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21550
23022
  size_t count) {
21551
- auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
21552
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
21553
- uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
21554
- args[1]));
23023
+ auto value =
23024
+ uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_transfer_package(
23025
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23026
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23027
+ args[1]));
21555
23028
 
21556
23029
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
21557
23030
  value);
@@ -21853,6 +23326,107 @@ jsi::Value NativeBreezSdkSpark::
21853
23326
  value);
21854
23327
  }
21855
23328
  jsi::Value
23329
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_externalsigningsigner(
23330
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23331
+ size_t count) {
23332
+ RustCallStatus status =
23333
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
23334
+ auto value = uniffi_breez_sdk_spark_fn_clone_externalsigningsigner(
23335
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
23336
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
23337
+ rt, callInvoker, status, args[count - 1]);
23338
+
23339
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
23340
+ }
23341
+ jsi::Value
23342
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_externalsigningsigner(
23343
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23344
+ size_t count) {
23345
+ RustCallStatus status =
23346
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
23347
+ uniffi_breez_sdk_spark_fn_free_externalsigningsigner(
23348
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
23349
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
23350
+ rt, callInvoker, status, args[count - 1]);
23351
+
23352
+ return jsi::Value::undefined();
23353
+ }
23354
+ jsi::Value NativeBreezSdkSpark::
23355
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigningsigner(
23356
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23357
+ size_t count) {
23358
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
23359
+ UniffiVTableCallbackInterfaceExternalSigningSigner>::fromJs(rt,
23360
+ callInvoker,
23361
+ args[0]);
23362
+
23363
+ std::lock_guard<std::mutex> lock(
23364
+ uniffi::breez_sdk_spark::registry::vtableMutex);
23365
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigningsigner(
23366
+ uniffi::breez_sdk_spark::registry::putTable(
23367
+ "UniffiVTableCallbackInterfaceExternalSigningSigner",
23368
+ vtableInstance));
23369
+ return jsi::Value::undefined();
23370
+ }
23371
+ jsi::Value NativeBreezSdkSpark::
23372
+ cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_derive_public_key(
23373
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23374
+ size_t count) {
23375
+ auto value =
23376
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_derive_public_key(
23377
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23378
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23379
+ args[1]));
23380
+
23381
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23382
+ value);
23383
+ }
23384
+ jsi::Value NativeBreezSdkSpark::
23385
+ cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa(
23386
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23387
+ size_t count) {
23388
+ auto value =
23389
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa(
23390
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23391
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23392
+ args[1]),
23393
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23394
+ args[2]));
23395
+
23396
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23397
+ value);
23398
+ }
23399
+ jsi::Value NativeBreezSdkSpark::
23400
+ cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa_recoverable(
23401
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23402
+ size_t count) {
23403
+ auto value =
23404
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_ecdsa_recoverable(
23405
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23406
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23407
+ args[1]),
23408
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23409
+ args[2]));
23410
+
23411
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23412
+ value);
23413
+ }
23414
+ jsi::Value NativeBreezSdkSpark::
23415
+ cpp_uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_hash_schnorr(
23416
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23417
+ size_t count) {
23418
+ auto value =
23419
+ uniffi_breez_sdk_spark_fn_method_externalsigningsigner_sign_hash_schnorr(
23420
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23421
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23422
+ args[1]),
23423
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23424
+ args[2]));
23425
+
23426
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23427
+ value);
23428
+ }
23429
+ jsi::Value
21856
23430
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_externalsparksigner(
21857
23431
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
21858
23432
  size_t count) {
@@ -21917,6 +23491,19 @@ jsi::Value NativeBreezSdkSpark::
21917
23491
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
21918
23492
  value);
21919
23493
  }
23494
+ jsi::Value NativeBreezSdkSpark::
23495
+ cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_is_remote(
23496
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23497
+ size_t count) {
23498
+ RustCallStatus status =
23499
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
23500
+ auto value = uniffi_breez_sdk_spark_fn_method_externalsparksigner_is_remote(
23501
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
23502
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
23503
+ rt, callInvoker, status, args[count - 1]);
23504
+
23505
+ return uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, value);
23506
+ }
21920
23507
  jsi::Value NativeBreezSdkSpark::
21921
23508
  cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_get_static_deposit_public_key(
21922
23509
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -22614,6 +24201,24 @@ jsi::Value NativeBreezSdkSpark::
22614
24201
 
22615
24202
  return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
22616
24203
  }
24204
+ jsi::Value NativeBreezSdkSpark::
24205
+ cpp_uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new_with_signing_only_signer(
24206
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24207
+ size_t count) {
24208
+ RustCallStatus status =
24209
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
24210
+ auto value =
24211
+ uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new_with_signing_only_signer(
24212
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24213
+ args[0]),
24214
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[1]),
24215
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[2]),
24216
+ &status);
24217
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
24218
+ rt, callInvoker, status, args[count - 1]);
24219
+
24220
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
24221
+ }
22617
24222
  jsi::Value
22618
24223
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_build(
22619
24224
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -22709,6 +24314,17 @@ jsi::Value NativeBreezSdkSpark::
22709
24314
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
22710
24315
  value);
22711
24316
  }
24317
+ jsi::Value NativeBreezSdkSpark::
24318
+ cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_session_store(
24319
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24320
+ size_t count) {
24321
+ auto value = uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_session_store(
24322
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24323
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[1]));
24324
+
24325
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24326
+ value);
24327
+ }
22712
24328
  jsi::Value NativeBreezSdkSpark::
22713
24329
  cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_shared_context(
22714
24330
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -23438,6 +25054,17 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_connect_with_signer(
23438
25054
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23439
25055
  value);
23440
25056
  }
25057
+ jsi::Value NativeBreezSdkSpark::
25058
+ cpp_uniffi_breez_sdk_spark_fn_func_connect_with_signing_only_signer(
25059
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
25060
+ size_t count) {
25061
+ auto value = uniffi_breez_sdk_spark_fn_func_connect_with_signing_only_signer(
25062
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
25063
+ args[0]));
25064
+
25065
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
25066
+ value);
25067
+ }
23441
25068
  jsi::Value
23442
25069
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_create_turnkey_signer(
23443
25070
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -23449,6 +25076,18 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_create_turnkey_signer(
23449
25076
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23450
25077
  value);
23451
25078
  }
25079
+ jsi::Value NativeBreezSdkSpark::
25080
+ cpp_uniffi_breez_sdk_spark_fn_func_create_turnkey_signing_only_signer(
25081
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
25082
+ size_t count) {
25083
+ auto value =
25084
+ uniffi_breez_sdk_spark_fn_func_create_turnkey_signing_only_signer(
25085
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
25086
+ args[0]));
25087
+
25088
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
25089
+ value);
25090
+ }
23452
25091
  jsi::Value
23453
25092
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_custom_storage(
23454
25093
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -23517,6 +25156,20 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_default_server_config(
23517
25156
  value);
23518
25157
  }
23519
25158
  jsi::Value
25159
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_default_session_store(
25160
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
25161
+ size_t count) {
25162
+ auto value = uniffi_breez_sdk_spark_fn_func_default_session_store(
25163
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
25164
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
25165
+ args[1]),
25166
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
25167
+ args[2]));
25168
+
25169
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
25170
+ value);
25171
+ }
25172
+ jsi::Value
23520
25173
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_default_storage(
23521
25174
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23522
25175
  size_t count) {
@@ -24218,6 +25871,15 @@ jsi::Value NativeBreezSdkSpark::
24218
25871
 
24219
25872
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
24220
25873
  }
25874
+ jsi::Value NativeBreezSdkSpark::
25875
+ cpp_uniffi_breez_sdk_spark_checksum_func_connect_with_signing_only_signer(
25876
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
25877
+ size_t count) {
25878
+ auto value =
25879
+ uniffi_breez_sdk_spark_checksum_func_connect_with_signing_only_signer();
25880
+
25881
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
25882
+ }
24221
25883
  jsi::Value NativeBreezSdkSpark::
24222
25884
  cpp_uniffi_breez_sdk_spark_checksum_func_create_turnkey_signer(
24223
25885
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -24226,6 +25888,15 @@ jsi::Value NativeBreezSdkSpark::
24226
25888
 
24227
25889
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
24228
25890
  }
25891
+ jsi::Value NativeBreezSdkSpark::
25892
+ cpp_uniffi_breez_sdk_spark_checksum_func_create_turnkey_signing_only_signer(
25893
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
25894
+ size_t count) {
25895
+ auto value =
25896
+ uniffi_breez_sdk_spark_checksum_func_create_turnkey_signing_only_signer();
25897
+
25898
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
25899
+ }
24229
25900
  jsi::Value
24230
25901
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_checksum_func_custom_storage(
24231
25902
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -24258,6 +25929,14 @@ jsi::Value NativeBreezSdkSpark::
24258
25929
 
24259
25930
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
24260
25931
  }
25932
+ jsi::Value NativeBreezSdkSpark::
25933
+ cpp_uniffi_breez_sdk_spark_checksum_func_default_session_store(
25934
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
25935
+ size_t count) {
25936
+ auto value = uniffi_breez_sdk_spark_checksum_func_default_session_store();
25937
+
25938
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
25939
+ }
24261
25940
  jsi::Value
24262
25941
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_checksum_func_default_storage(
24263
25942
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -24369,6 +26048,24 @@ jsi::Value NativeBreezSdkSpark::
24369
26048
 
24370
26049
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
24371
26050
  }
26051
+ jsi::Value NativeBreezSdkSpark::
26052
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package(
26053
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26054
+ size_t count) {
26055
+ auto value =
26056
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package();
26057
+
26058
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26059
+ }
26060
+ jsi::Value NativeBreezSdkSpark::
26061
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_transfer_package(
26062
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26063
+ size_t count) {
26064
+ auto value =
26065
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_transfer_package();
26066
+
26067
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26068
+ }
24372
26069
  jsi::Value NativeBreezSdkSpark::
24373
26070
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin(
24374
26071
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -24625,6 +26322,24 @@ jsi::Value NativeBreezSdkSpark::
24625
26322
 
24626
26323
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
24627
26324
  }
26325
+ jsi::Value NativeBreezSdkSpark::
26326
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package(
26327
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26328
+ size_t count) {
26329
+ auto value =
26330
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package();
26331
+
26332
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26333
+ }
26334
+ jsi::Value NativeBreezSdkSpark::
26335
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_transfer_package(
26336
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26337
+ size_t count) {
26338
+ auto value =
26339
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_transfer_package();
26340
+
26341
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26342
+ }
24628
26343
  jsi::Value NativeBreezSdkSpark::
24629
26344
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment(
24630
26345
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -24800,6 +26515,42 @@ jsi::Value NativeBreezSdkSpark::
24800
26515
 
24801
26516
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
24802
26517
  }
26518
+ jsi::Value NativeBreezSdkSpark::
26519
+ cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_derive_public_key(
26520
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26521
+ size_t count) {
26522
+ auto value =
26523
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_derive_public_key();
26524
+
26525
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26526
+ }
26527
+ jsi::Value NativeBreezSdkSpark::
26528
+ cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa(
26529
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26530
+ size_t count) {
26531
+ auto value =
26532
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa();
26533
+
26534
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26535
+ }
26536
+ jsi::Value NativeBreezSdkSpark::
26537
+ cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa_recoverable(
26538
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26539
+ size_t count) {
26540
+ auto value =
26541
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_ecdsa_recoverable();
26542
+
26543
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26544
+ }
26545
+ jsi::Value NativeBreezSdkSpark::
26546
+ cpp_uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_hash_schnorr(
26547
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26548
+ size_t count) {
26549
+ auto value =
26550
+ uniffi_breez_sdk_spark_checksum_method_externalsigningsigner_sign_hash_schnorr();
26551
+
26552
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26553
+ }
24803
26554
  jsi::Value NativeBreezSdkSpark::
24804
26555
  cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_identity_public_key(
24805
26556
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -24818,6 +26569,15 @@ jsi::Value NativeBreezSdkSpark::
24818
26569
 
24819
26570
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
24820
26571
  }
26572
+ jsi::Value NativeBreezSdkSpark::
26573
+ cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_is_remote(
26574
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26575
+ size_t count) {
26576
+ auto value =
26577
+ uniffi_breez_sdk_spark_checksum_method_externalsparksigner_is_remote();
26578
+
26579
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26580
+ }
24821
26581
  jsi::Value NativeBreezSdkSpark::
24822
26582
  cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_get_static_deposit_public_key(
24823
26583
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -25161,6 +26921,15 @@ jsi::Value NativeBreezSdkSpark::
25161
26921
 
25162
26922
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
25163
26923
  }
26924
+ jsi::Value NativeBreezSdkSpark::
26925
+ cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_store(
26926
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26927
+ size_t count) {
26928
+ auto value =
26929
+ uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_session_store();
26930
+
26931
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26932
+ }
25164
26933
  jsi::Value NativeBreezSdkSpark::
25165
26934
  cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_shared_context(
25166
26935
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -25561,6 +27330,15 @@ jsi::Value NativeBreezSdkSpark::
25561
27330
 
25562
27331
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
25563
27332
  }
27333
+ jsi::Value NativeBreezSdkSpark::
27334
+ cpp_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_with_signing_only_signer(
27335
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27336
+ size_t count) {
27337
+ auto value =
27338
+ uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new_with_signing_only_signer();
27339
+
27340
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27341
+ }
25564
27342
  jsi::Value NativeBreezSdkSpark::
25565
27343
  cpp_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event(
25566
27344
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,