@breeztech/breez-sdk-spark-react-native 0.19.2 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/BreezSdkSparkReactNative.podspec +6 -0
  2. package/cpp/generated/breez_sdk_spark.cpp +1527 -125
  3. package/cpp/generated/breez_sdk_spark.hpp +84 -0
  4. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
  5. package/lib/commonjs/generated/breez_sdk_spark.js +554 -62
  6. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
  7. package/lib/commonjs/passkey-prf-provider.js +31 -11
  8. package/lib/commonjs/passkey-prf-provider.js.map +1 -1
  9. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
  10. package/lib/module/generated/breez_sdk_spark.js +553 -61
  11. package/lib/module/generated/breez_sdk_spark.js.map +1 -1
  12. package/lib/module/passkey-prf-provider.js +31 -11
  13. package/lib/module/passkey-prf-provider.js.map +1 -1
  14. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +56 -21
  15. package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  16. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +2251 -144
  17. package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
  18. package/lib/typescript/commonjs/src/passkey-prf-provider.d.ts +24 -6
  19. package/lib/typescript/commonjs/src/passkey-prf-provider.d.ts.map +1 -1
  20. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +56 -21
  21. package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
  22. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +2251 -144
  23. package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
  24. package/lib/typescript/module/src/passkey-prf-provider.d.ts +24 -6
  25. package/lib/typescript/module/src/passkey-prf-provider.d.ts.map +1 -1
  26. package/package.json +4 -4
  27. package/plugin/build/index.d.ts +1 -1
  28. package/plugin/build/index.js +3 -1
  29. package/plugin/build/withAndroid.d.ts +1 -1
  30. package/plugin/build/withAndroid.js +1 -1
  31. package/plugin/build/withBinaryArtifacts.d.ts +1 -1
  32. package/plugin/build/withBinaryArtifacts.js +1 -1
  33. package/plugin/build/withIOS.d.ts +1 -1
  34. package/plugin/build/withIOS.js +1 -1
  35. package/scripts/post-ubrn.js +42 -0
  36. package/src/generated/breez_sdk_spark-ffi.ts +122 -19
  37. package/src/generated/breez_sdk_spark.ts +3999 -77
  38. package/src/passkey-prf-provider.ts +41 -12
@@ -112,7 +112,7 @@ typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod0)(
112
112
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
113
113
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
114
114
  typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod1)(
115
- uint64_t uniffi_handle, RustBuffer txid,
115
+ uint64_t uniffi_handle, RustBuffer address,
116
116
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
117
117
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
118
118
  typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod2)(
@@ -120,13 +120,25 @@ typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod2)(
120
120
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
121
121
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
122
122
  typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod3)(
123
+ uint64_t uniffi_handle, RustBuffer txid,
124
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
125
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
126
+ typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod4)(
127
+ uint64_t uniffi_handle, RustBuffer txid, uint32_t vout,
128
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
129
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
130
+ typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod5)(
123
131
  uint64_t uniffi_handle, RustBuffer tx,
124
132
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
125
133
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
126
- typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod4)(
134
+ typedef void (*UniffiCallbackInterfaceBitcoinChainServiceMethod6)(
127
135
  uint64_t uniffi_handle,
128
136
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
129
137
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
138
+ typedef void (*UniffiCallbackInterfaceCpfpSignerMethod0)(
139
+ uint64_t uniffi_handle, RustBuffer psbt_bytes,
140
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
141
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
130
142
  typedef void (*UniffiCallbackInterfaceExternalBreezSignerMethod0)(
131
143
  uint64_t uniffi_handle, RustBuffer path,
132
144
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
@@ -195,11 +207,11 @@ typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod5)(
195
207
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
196
208
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
197
209
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod6)(
198
- uint64_t uniffi_handle, RustBuffer jobs,
210
+ uint64_t uniffi_handle, RustBuffer leaf_id, RustBuffer sighash,
199
211
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
200
212
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
201
213
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod7)(
202
- uint64_t uniffi_handle, RustBuffer request,
214
+ uint64_t uniffi_handle, RustBuffer jobs,
203
215
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
204
216
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
205
217
  typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod8)(
@@ -234,6 +246,10 @@ typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod15)(
234
246
  uint64_t uniffi_handle, RustBuffer request,
235
247
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
236
248
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
249
+ typedef void (*UniffiCallbackInterfaceExternalSparkSignerMethod16)(
250
+ uint64_t uniffi_handle, RustBuffer request,
251
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
252
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
237
253
  typedef void (*UniffiCallbackInterfaceFiatServiceMethod0)(
238
254
  uint64_t uniffi_handle,
239
255
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
@@ -259,7 +275,7 @@ typedef void (*UniffiCallbackInterfacePrfProviderMethod1)(
259
275
  UniffiForeignFutureCompleteI8 uniffi_future_callback,
260
276
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
261
277
  typedef void (*UniffiCallbackInterfacePrfProviderMethod2)(
262
- uint64_t uniffi_handle, RustBuffer exclude_credentials,
278
+ uint64_t uniffi_handle, RustBuffer exclude_credentials, RustBuffer salts,
263
279
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
264
280
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
265
281
  typedef void (*UniffiCallbackInterfacePrfProviderMethod3)(
@@ -421,12 +437,18 @@ typedef struct UniffiVTableCallbackInterfaceLogger {
421
437
  } UniffiVTableCallbackInterfaceLogger;
422
438
  typedef struct UniffiVTableCallbackInterfaceBitcoinChainService {
423
439
  UniffiCallbackInterfaceBitcoinChainServiceMethod0 get_address_utxos;
424
- UniffiCallbackInterfaceBitcoinChainServiceMethod1 get_transaction_status;
425
- UniffiCallbackInterfaceBitcoinChainServiceMethod2 get_transaction_hex;
426
- UniffiCallbackInterfaceBitcoinChainServiceMethod3 broadcast_transaction;
427
- UniffiCallbackInterfaceBitcoinChainServiceMethod4 recommended_fees;
440
+ UniffiCallbackInterfaceBitcoinChainServiceMethod1 get_address_txos;
441
+ UniffiCallbackInterfaceBitcoinChainServiceMethod2 get_transaction_status;
442
+ UniffiCallbackInterfaceBitcoinChainServiceMethod3 get_transaction_hex;
443
+ UniffiCallbackInterfaceBitcoinChainServiceMethod4 get_outspend;
444
+ UniffiCallbackInterfaceBitcoinChainServiceMethod5 broadcast_transaction;
445
+ UniffiCallbackInterfaceBitcoinChainServiceMethod6 recommended_fees;
428
446
  UniffiCallbackInterfaceFree uniffi_free;
429
447
  } UniffiVTableCallbackInterfaceBitcoinChainService;
448
+ typedef struct UniffiVTableCallbackInterfaceCpfpSigner {
449
+ UniffiCallbackInterfaceCpfpSignerMethod0 sign_psbt;
450
+ UniffiCallbackInterfaceFree uniffi_free;
451
+ } UniffiVTableCallbackInterfaceCpfpSigner;
430
452
  typedef struct UniffiVTableCallbackInterfaceExternalBreezSigner {
431
453
  UniffiCallbackInterfaceExternalBreezSignerMethod0 derive_public_key;
432
454
  UniffiCallbackInterfaceExternalBreezSignerMethod1 sign_ecdsa;
@@ -453,17 +475,18 @@ typedef struct UniffiVTableCallbackInterfaceExternalSparkSigner {
453
475
  UniffiCallbackInterfaceExternalSparkSignerMethod4
454
476
  sign_authentication_challenge;
455
477
  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
478
+ UniffiCallbackInterfaceExternalSparkSignerMethod6 sign_leaf_refund_spend;
479
+ UniffiCallbackInterfaceExternalSparkSignerMethod7 sign_frost;
480
+ UniffiCallbackInterfaceExternalSparkSignerMethod8 prepare_transfer;
481
+ UniffiCallbackInterfaceExternalSparkSignerMethod9 prepare_claim;
482
+ UniffiCallbackInterfaceExternalSparkSignerMethod10 prepare_lightning_receive;
483
+ UniffiCallbackInterfaceExternalSparkSignerMethod11 prepare_static_deposit;
484
+ UniffiCallbackInterfaceExternalSparkSignerMethod12
462
485
  start_static_deposit_refund;
463
- UniffiCallbackInterfaceExternalSparkSignerMethod12 sign_static_deposit_refund;
464
- UniffiCallbackInterfaceExternalSparkSignerMethod13 sign_spark_invoice;
465
- UniffiCallbackInterfaceExternalSparkSignerMethod14 prepare_token_transaction;
466
- UniffiCallbackInterfaceExternalSparkSignerMethod15
486
+ UniffiCallbackInterfaceExternalSparkSignerMethod13 sign_static_deposit_refund;
487
+ UniffiCallbackInterfaceExternalSparkSignerMethod14 sign_spark_invoice;
488
+ UniffiCallbackInterfaceExternalSparkSignerMethod15 prepare_token_transaction;
489
+ UniffiCallbackInterfaceExternalSparkSignerMethod16
467
490
  prepare_static_deposit_claim;
468
491
  UniffiCallbackInterfaceFree uniffi_free;
469
492
  } UniffiVTableCallbackInterfaceExternalSparkSigner;
@@ -542,12 +565,18 @@ void uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
542
565
  uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_utxos(
543
566
  void *ptr, RustBuffer address);
544
567
  /*handle*/ uint64_t
568
+ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_txos(
569
+ void *ptr, RustBuffer address);
570
+ /*handle*/ uint64_t
545
571
  uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_status(
546
572
  void *ptr, RustBuffer txid);
547
573
  /*handle*/ uint64_t
548
574
  uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_hex(
549
575
  void *ptr, RustBuffer txid);
550
576
  /*handle*/ uint64_t
577
+ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_outspend(
578
+ void *ptr, RustBuffer txid, uint32_t vout);
579
+ /*handle*/ uint64_t
551
580
  uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(
552
581
  void *ptr, RustBuffer tx);
553
582
  /*handle*/ uint64_t
@@ -567,6 +596,9 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(void *ptr,
567
596
  uniffi_breez_sdk_spark_fn_method_breezsdk_authorize_lightning_address_transfer(
568
597
  void *ptr, RustBuffer request);
569
598
  /*handle*/ uint64_t
599
+ uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_batch_package(
600
+ void *ptr, RustBuffer request);
601
+ /*handle*/ uint64_t
570
602
  uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_pay_package(
571
603
  void *ptr, RustBuffer request);
572
604
  /*handle*/ uint64_t
@@ -651,9 +683,15 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_parse(void *ptr, RustBuffer input);
651
683
  uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(void *ptr,
652
684
  RustBuffer request);
653
685
  /*handle*/ uint64_t
686
+ uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_batch(
687
+ void *ptr, RustBuffer request);
688
+ /*handle*/ uint64_t
654
689
  uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
655
690
  void *ptr, RustBuffer request);
656
691
  /*handle*/ uint64_t
692
+ uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_unilateral_exit(
693
+ void *ptr, RustBuffer request);
694
+ /*handle*/ uint64_t
657
695
  uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_pay_package(
658
696
  void *ptr, RustBuffer request);
659
697
  /*handle*/ uint64_t
@@ -679,6 +717,9 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_register_webhook(void *ptr,
679
717
  uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(void *ptr,
680
718
  RustBuffer id);
681
719
  /*handle*/ uint64_t
720
+ uniffi_breez_sdk_spark_fn_method_breezsdk_send_batch(void *ptr,
721
+ RustBuffer request);
722
+ /*handle*/ uint64_t
682
723
  uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(void *ptr,
683
724
  RustBuffer request);
684
725
  /*handle*/ uint64_t
@@ -687,6 +728,8 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_sign_message(void *ptr,
687
728
  /*handle*/ uint64_t
688
729
  uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(void *ptr,
689
730
  RustBuffer request);
731
+ /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_breezsdk_unilateral_exit(
732
+ void *ptr, RustBuffer request, void *signer);
690
733
  /*handle*/ uint64_t
691
734
  uniffi_breez_sdk_spark_fn_method_breezsdk_unregister_webhook(
692
735
  void *ptr, RustBuffer request);
@@ -696,6 +739,16 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact(void *ptr,
696
739
  /*handle*/ uint64_t
697
740
  uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
698
741
  void *ptr, RustBuffer request);
742
+ void *
743
+ uniffi_breez_sdk_spark_fn_clone_cpfpsigner(void *ptr,
744
+ RustCallStatus *uniffi_out_err);
745
+ void uniffi_breez_sdk_spark_fn_free_cpfpsigner(void *ptr,
746
+ RustCallStatus *uniffi_out_err);
747
+ void uniffi_breez_sdk_spark_fn_init_callback_vtable_cpfpsigner(
748
+ UniffiVTableCallbackInterfaceCpfpSigner *vtable);
749
+ /*handle*/ uint64_t
750
+ uniffi_breez_sdk_spark_fn_method_cpfpsigner_sign_psbt(void *ptr,
751
+ RustBuffer psbt_bytes);
699
752
  void *uniffi_breez_sdk_spark_fn_clone_externalbreezsigner(
700
753
  void *ptr, RustCallStatus *uniffi_out_err);
701
754
  void uniffi_breez_sdk_spark_fn_free_externalbreezsigner(
@@ -765,6 +818,9 @@ uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_authentication_challen
765
818
  uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_message(
766
819
  void *ptr, RustBuffer message);
767
820
  /*handle*/ uint64_t
821
+ uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_leaf_refund_spend(
822
+ void *ptr, RustBuffer leaf_id, RustBuffer sighash);
823
+ /*handle*/ uint64_t
768
824
  uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_frost(
769
825
  void *ptr, RustBuffer jobs);
770
826
  /*handle*/ uint64_t
@@ -862,7 +918,7 @@ uniffi_breez_sdk_spark_fn_method_prfprovider_derive_seeds(void *ptr,
862
918
  /*handle*/ uint64_t
863
919
  uniffi_breez_sdk_spark_fn_method_prfprovider_is_supported(void *ptr);
864
920
  /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_prfprovider_create_passkey(
865
- void *ptr, RustBuffer exclude_credentials);
921
+ void *ptr, RustBuffer exclude_credentials, RustBuffer salts);
866
922
  /*handle*/ uint64_t
867
923
  uniffi_breez_sdk_spark_fn_method_prfprovider_check_domain_association(
868
924
  void *ptr);
@@ -1111,6 +1167,8 @@ void uniffi_breez_sdk_spark_fn_func_init_logging(
1111
1167
  RustBuffer credentials);
1112
1168
  /*handle*/ uint64_t
1113
1169
  uniffi_breez_sdk_spark_fn_func_new_shared_sdk_context(RustBuffer config);
1170
+ void *uniffi_breez_sdk_spark_fn_func_single_key_cpfp_signer(
1171
+ RustBuffer secret_key_bytes, RustCallStatus *uniffi_out_err);
1114
1172
  RustBuffer ffi_breez_sdk_spark_rustbuffer_alloc(uint64_t size,
1115
1173
  RustCallStatus *uniffi_out_err);
1116
1174
  RustBuffer
@@ -1255,13 +1313,18 @@ uint16_t uniffi_breez_sdk_spark_checksum_func_get_spark_status();
1255
1313
  uint16_t uniffi_breez_sdk_spark_checksum_func_init_logging();
1256
1314
  uint16_t uniffi_breez_sdk_spark_checksum_func_new_rest_chain_service();
1257
1315
  uint16_t uniffi_breez_sdk_spark_checksum_func_new_shared_sdk_context();
1316
+ uint16_t uniffi_breez_sdk_spark_checksum_func_single_key_cpfp_signer();
1258
1317
  uint16_t
1259
1318
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos();
1260
1319
  uint16_t
1320
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_txos();
1321
+ uint16_t
1261
1322
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status();
1262
1323
  uint16_t
1263
1324
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex();
1264
1325
  uint16_t
1326
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_outspend();
1327
+ uint16_t
1265
1328
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction();
1266
1329
  uint16_t
1267
1330
  uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees();
@@ -1270,6 +1333,8 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener();
1270
1333
  uint16_t
1271
1334
  uniffi_breez_sdk_spark_checksum_method_breezsdk_authorize_lightning_address_transfer();
1272
1335
  uint16_t
1336
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_batch_package();
1337
+ uint16_t
1273
1338
  uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package();
1274
1339
  uint16_t
1275
1340
  uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_transfer_package();
@@ -1309,8 +1374,11 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw();
1309
1374
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_optimize_leaves();
1310
1375
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_parse();
1311
1376
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay();
1377
+ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_batch();
1312
1378
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment();
1313
1379
  uint16_t
1380
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_unilateral_exit();
1381
+ uint16_t
1314
1382
  uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package();
1315
1383
  uint16_t
1316
1384
  uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_transfer_package();
@@ -1324,12 +1392,15 @@ uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address();
1324
1392
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_register_webhook();
1325
1393
  uint16_t
1326
1394
  uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener();
1395
+ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_batch();
1327
1396
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment();
1328
1397
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message();
1329
1398
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
1399
+ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_unilateral_exit();
1330
1400
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_unregister_webhook();
1331
1401
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact();
1332
1402
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings();
1403
+ uint16_t uniffi_breez_sdk_spark_checksum_method_cpfpsigner_sign_psbt();
1333
1404
  uint16_t
1334
1405
  uniffi_breez_sdk_spark_checksum_method_externalbreezsigner_derive_public_key();
1335
1406
  uint16_t
@@ -1364,6 +1435,8 @@ uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_authentication_c
1364
1435
  uint16_t
1365
1436
  uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_message();
1366
1437
  uint16_t
1438
+ uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_leaf_refund_spend();
1439
+ uint16_t
1367
1440
  uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_frost();
1368
1441
  uint16_t
1369
1442
  uniffi_breez_sdk_spark_checksum_method_externalsparksigner_prepare_transfer();
@@ -2291,6 +2364,118 @@ static void cleanup() {
2291
2364
  } // namespace
2292
2365
  // uniffi::breez_sdk_spark::st::vtablecallbackinterfacebitcoinchainservice::vtablecallbackinterfacebitcoinchainservice::free
2293
2366
 
2367
+ // Callback function:
2368
+ // uniffi::breez_sdk_spark::st::vtablecallbackinterfacecpfpsigner::vtablecallbackinterfacecpfpsigner::free::UniffiCallbackInterfaceFree
2369
+ //
2370
+ // We have the following constraints:
2371
+ // - we need to pass a function pointer to Rust.
2372
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
2373
+ // - function pointers can't store state, so we can't use a lamda.
2374
+ //
2375
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
2376
+ // function calls the lambda, which itself calls the `body` which then calls
2377
+ // into JS.
2378
+ //
2379
+ // We then give the `callback` function pointer to Rust which will call the
2380
+ // lambda sometime in the future.
2381
+ namespace uniffi::breez_sdk_spark::st::vtablecallbackinterfacecpfpsigner::
2382
+ vtablecallbackinterfacecpfpsigner::free {
2383
+ using namespace facebook;
2384
+
2385
+ // We need to store a lambda in a global so we can call it from
2386
+ // a function pointer. The function pointer is passed to Rust.
2387
+ static std::function<void(uint64_t)> rsLambda = nullptr;
2388
+
2389
+ // This is the main body of the callback. It's called from the lambda,
2390
+ // which itself is called from the callback function which is passed to Rust.
2391
+ static void body(jsi::Runtime &rt,
2392
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
2393
+ std::shared_ptr<jsi::Value> callbackValue,
2394
+ uint64_t rs_handle) {
2395
+
2396
+ // Convert the arguments from Rust, into jsi::Values.
2397
+ // We'll use the Bridging class to do this…
2398
+ auto js_handle =
2399
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
2400
+
2401
+ // Now we are ready to call the callback.
2402
+ // We are already on the JS thread, because this `body` function was
2403
+ // invoked from the CallInvoker.
2404
+ try {
2405
+ // Getting the callback function
2406
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
2407
+ auto uniffiResult = cb.call(rt, js_handle);
2408
+
2409
+ } catch (const jsi::JSError &error) {
2410
+ std::cout << "Error in callback UniffiCallbackInterfaceFree: "
2411
+ << error.what() << std::endl;
2412
+ throw error;
2413
+ }
2414
+ }
2415
+
2416
+ static void callback(uint64_t rs_handle) {
2417
+ // If the runtime has shutdown, then there is no point in trying to
2418
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
2419
+ //
2420
+ // Answer: the module destructor calls into callback `cleanup` method,
2421
+ // which nulls out the rsLamda.
2422
+ //
2423
+ // If rsLamda is null, then there is no runtime to call into.
2424
+ if (rsLambda == nullptr) {
2425
+ // This only occurs when destructors are calling into Rust free/drop,
2426
+ // which causes the JS callback to be dropped.
2427
+ return;
2428
+ }
2429
+
2430
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
2431
+ // are all in the lambda.
2432
+ rsLambda(rs_handle);
2433
+ }
2434
+
2435
+ static UniffiCallbackInterfaceFree
2436
+ makeCallbackFunction( // uniffi::breez_sdk_spark::st::vtablecallbackinterfacecpfpsigner::vtablecallbackinterfacecpfpsigner::free
2437
+ jsi::Runtime &rt,
2438
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
2439
+ const jsi::Value &value) {
2440
+ if (rsLambda != nullptr) {
2441
+ // `makeCallbackFunction` is called in two circumstances:
2442
+ //
2443
+ // 1. at startup, when initializing callback interface vtables.
2444
+ // 2. when polling futures. This happens at least once per future that is
2445
+ // exposed to Javascript. We know that this is always the same function,
2446
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
2447
+ //
2448
+ // We can therefore return the callback function without making anything
2449
+ // new if we've been initialized already.
2450
+ return callback;
2451
+ }
2452
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
2453
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
2454
+ rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
2455
+ // We immediately make a lambda which will do the work of transforming the
2456
+ // arguments into JSI values and calling the callback.
2457
+ uniffi_runtime::UniffiCallFunc jsLambda =
2458
+ [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable {
2459
+ body(rt, callInvoker, callbackValue, rs_handle);
2460
+ };
2461
+ // We'll then call that lambda from the callInvoker which will
2462
+ // look after calling it on the correct thread.
2463
+
2464
+ callInvoker->invokeNonBlocking(rt, jsLambda);
2465
+ };
2466
+ return callback;
2467
+ }
2468
+
2469
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
2470
+ // happens when the jsi::Runtime is being destroyed.
2471
+ static void cleanup() {
2472
+ // The lambda holds a reference to the the Runtime, so when this is nulled
2473
+ // out, then the pointer will no longer be left dangling.
2474
+ rsLambda = nullptr;
2475
+ }
2476
+ } // namespace
2477
+ // uniffi::breez_sdk_spark::st::vtablecallbackinterfacecpfpsigner::vtablecallbackinterfacecpfpsigner::free
2478
+
2294
2479
  // Callback function:
2295
2480
  // uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalbreezsigner::vtablecallbackinterfaceexternalbreezsigner::free::UniffiCallbackInterfaceFree
2296
2481
  //
@@ -4776,7 +4961,7 @@ static std::function<void(uint64_t, RustBuffer,
4776
4961
  static void body(jsi::Runtime &rt,
4777
4962
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
4778
4963
  std::shared_ptr<jsi::Value> callbackValue,
4779
- uint64_t rs_uniffiHandle, RustBuffer rs_txid,
4964
+ uint64_t rs_uniffiHandle, RustBuffer rs_address,
4780
4965
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
4781
4966
  uint64_t rs_uniffiCallbackData,
4782
4967
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -4785,8 +4970,8 @@ static void body(jsi::Runtime &rt,
4785
4970
  // We'll use the Bridging class to do this…
4786
4971
  auto js_uniffiHandle =
4787
4972
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
4788
- auto js_txid = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
4789
- rt, callInvoker, rs_txid);
4973
+ auto js_address = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
4974
+ rt, callInvoker, rs_address);
4790
4975
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
4791
4976
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
4792
4977
  rs_uniffiFutureCallback);
@@ -4799,7 +4984,7 @@ static void body(jsi::Runtime &rt,
4799
4984
  try {
4800
4985
  // Getting the callback function
4801
4986
  auto cb = callbackValue->asObject(rt).asFunction(rt);
4802
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid,
4987
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_address,
4803
4988
  js_uniffiFutureCallback, js_uniffiCallbackData);
4804
4989
 
4805
4990
  // return type is MutReference(Struct("ForeignFuture"))
@@ -4816,7 +5001,7 @@ static void body(jsi::Runtime &rt,
4816
5001
  }
4817
5002
 
4818
5003
  static void
4819
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
5004
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_address,
4820
5005
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
4821
5006
  uint64_t rs_uniffiCallbackData,
4822
5007
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -4835,7 +5020,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
4835
5020
 
4836
5021
  // The runtime, the actual callback jsi::funtion, and the callInvoker
4837
5022
  // are all in the lambda.
4838
- rsLambda(rs_uniffiHandle, rs_txid, rs_uniffiFutureCallback,
5023
+ rsLambda(rs_uniffiHandle, rs_address, rs_uniffiFutureCallback,
4839
5024
  rs_uniffiCallbackData, rs_uniffiOutReturn);
4840
5025
  }
4841
5026
 
@@ -4859,17 +5044,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinch
4859
5044
  auto callbackFunction = value.asObject(rt).asFunction(rt);
4860
5045
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
4861
5046
  rsLambda = [&rt, callInvoker, callbackValue](
4862
- uint64_t rs_uniffiHandle, RustBuffer rs_txid,
5047
+ uint64_t rs_uniffiHandle, RustBuffer rs_address,
4863
5048
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
4864
5049
  uint64_t rs_uniffiCallbackData,
4865
5050
  UniffiForeignFuture *rs_uniffiOutReturn) {
4866
5051
  // We immediately make a lambda which will do the work of transforming the
4867
5052
  // arguments into JSI values and calling the callback.
4868
5053
  uniffi_runtime::UniffiCallFunc jsLambda =
4869
- [callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
5054
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_address,
4870
5055
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
4871
5056
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
4872
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
5057
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_address,
4873
5058
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
4874
5059
  rs_uniffiOutReturn);
4875
5060
  };
@@ -5058,8 +5243,9 @@ using namespace facebook;
5058
5243
 
5059
5244
  // We need to store a lambda in a global so we can call it from
5060
5245
  // a function pointer. The function pointer is passed to Rust.
5061
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
5062
- uint64_t, UniffiForeignFuture *)>
5246
+ static std::function<void(uint64_t, RustBuffer,
5247
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
5248
+ UniffiForeignFuture *)>
5063
5249
  rsLambda = nullptr;
5064
5250
 
5065
5251
  // This is the main body of the callback. It's called from the lambda,
@@ -5067,8 +5253,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
5067
5253
  static void body(jsi::Runtime &rt,
5068
5254
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5069
5255
  std::shared_ptr<jsi::Value> callbackValue,
5070
- uint64_t rs_uniffiHandle, RustBuffer rs_tx,
5071
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
5256
+ uint64_t rs_uniffiHandle, RustBuffer rs_txid,
5257
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5072
5258
  uint64_t rs_uniffiCallbackData,
5073
5259
  UniffiForeignFuture *rs_uniffiOutReturn) {
5074
5260
 
@@ -5076,11 +5262,11 @@ static void body(jsi::Runtime &rt,
5076
5262
  // We'll use the Bridging class to do this…
5077
5263
  auto js_uniffiHandle =
5078
5264
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
5079
- auto js_tx = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
5080
- rt, callInvoker, rs_tx);
5081
- auto js_uniffiFutureCallback =
5082
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
5083
- rt, callInvoker, rs_uniffiFutureCallback);
5265
+ auto js_txid = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
5266
+ rt, callInvoker, rs_txid);
5267
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
5268
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
5269
+ rs_uniffiFutureCallback);
5084
5270
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
5085
5271
  rt, callInvoker, rs_uniffiCallbackData);
5086
5272
 
@@ -5090,7 +5276,7 @@ static void body(jsi::Runtime &rt,
5090
5276
  try {
5091
5277
  // Getting the callback function
5092
5278
  auto cb = callbackValue->asObject(rt).asFunction(rt);
5093
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_tx,
5279
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid,
5094
5280
  js_uniffiFutureCallback, js_uniffiCallbackData);
5095
5281
 
5096
5282
  // return type is MutReference(Struct("ForeignFuture"))
@@ -5106,10 +5292,11 @@ static void body(jsi::Runtime &rt,
5106
5292
  }
5107
5293
  }
5108
5294
 
5109
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_tx,
5110
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
5111
- uint64_t rs_uniffiCallbackData,
5112
- UniffiForeignFuture *rs_uniffiOutReturn) {
5295
+ static void
5296
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
5297
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5298
+ uint64_t rs_uniffiCallbackData,
5299
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5113
5300
  // If the runtime has shutdown, then there is no point in trying to
5114
5301
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
5115
5302
  //
@@ -5125,7 +5312,7 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_tx,
5125
5312
 
5126
5313
  // The runtime, the actual callback jsi::funtion, and the callInvoker
5127
5314
  // are all in the lambda.
5128
- rsLambda(rs_uniffiHandle, rs_tx, rs_uniffiFutureCallback,
5315
+ rsLambda(rs_uniffiHandle, rs_txid, rs_uniffiFutureCallback,
5129
5316
  rs_uniffiCallbackData, rs_uniffiOutReturn);
5130
5317
  }
5131
5318
 
@@ -5149,17 +5336,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinch
5149
5336
  auto callbackFunction = value.asObject(rt).asFunction(rt);
5150
5337
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
5151
5338
  rsLambda = [&rt, callInvoker, callbackValue](
5152
- uint64_t rs_uniffiHandle, RustBuffer rs_tx,
5153
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
5339
+ uint64_t rs_uniffiHandle, RustBuffer rs_txid,
5340
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5154
5341
  uint64_t rs_uniffiCallbackData,
5155
5342
  UniffiForeignFuture *rs_uniffiOutReturn) {
5156
5343
  // We immediately make a lambda which will do the work of transforming the
5157
5344
  // arguments into JSI values and calling the callback.
5158
5345
  uniffi_runtime::UniffiCallFunc jsLambda =
5159
- [callInvoker, callbackValue, rs_uniffiHandle, rs_tx,
5346
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
5160
5347
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
5161
5348
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
5162
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_tx,
5349
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
5163
5350
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
5164
5351
  rs_uniffiOutReturn);
5165
5352
  };
@@ -5202,8 +5389,9 @@ using namespace facebook;
5202
5389
 
5203
5390
  // We need to store a lambda in a global so we can call it from
5204
5391
  // a function pointer. The function pointer is passed to Rust.
5205
- static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
5206
- uint64_t, UniffiForeignFuture *)>
5392
+ static std::function<void(uint64_t, RustBuffer, uint32_t,
5393
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
5394
+ UniffiForeignFuture *)>
5207
5395
  rsLambda = nullptr;
5208
5396
 
5209
5397
  // This is the main body of the callback. It's called from the lambda,
@@ -5211,7 +5399,7 @@ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
5211
5399
  static void body(jsi::Runtime &rt,
5212
5400
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5213
5401
  std::shared_ptr<jsi::Value> callbackValue,
5214
- uint64_t rs_uniffiHandle,
5402
+ uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
5215
5403
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5216
5404
  uint64_t rs_uniffiCallbackData,
5217
5405
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -5220,6 +5408,9 @@ static void body(jsi::Runtime &rt,
5220
5408
  // We'll use the Bridging class to do this…
5221
5409
  auto js_uniffiHandle =
5222
5410
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
5411
+ auto js_txid = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
5412
+ rt, callInvoker, rs_txid);
5413
+ auto js_vout = uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_vout);
5223
5414
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
5224
5415
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
5225
5416
  rs_uniffiFutureCallback);
@@ -5232,8 +5423,8 @@ static void body(jsi::Runtime &rt,
5232
5423
  try {
5233
5424
  // Getting the callback function
5234
5425
  auto cb = callbackValue->asObject(rt).asFunction(rt);
5235
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
5236
- js_uniffiCallbackData);
5426
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid, js_vout,
5427
+ js_uniffiFutureCallback, js_uniffiCallbackData);
5237
5428
 
5238
5429
  // return type is MutReference(Struct("ForeignFuture"))
5239
5430
  // Finally, we need to copy the return value back into the Rust pointer.
@@ -5249,7 +5440,7 @@ static void body(jsi::Runtime &rt,
5249
5440
  }
5250
5441
 
5251
5442
  static void
5252
- callback(uint64_t rs_uniffiHandle,
5443
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
5253
5444
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5254
5445
  uint64_t rs_uniffiCallbackData,
5255
5446
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -5268,8 +5459,8 @@ callback(uint64_t rs_uniffiHandle,
5268
5459
 
5269
5460
  // The runtime, the actual callback jsi::funtion, and the callInvoker
5270
5461
  // are all in the lambda.
5271
- rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
5272
- rs_uniffiOutReturn);
5462
+ rsLambda(rs_uniffiHandle, rs_txid, rs_vout, rs_uniffiFutureCallback,
5463
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
5273
5464
  }
5274
5465
 
5275
5466
  static UniffiCallbackInterfaceBitcoinChainServiceMethod4
@@ -5292,17 +5483,18 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinch
5292
5483
  auto callbackFunction = value.asObject(rt).asFunction(rt);
5293
5484
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
5294
5485
  rsLambda = [&rt, callInvoker, callbackValue](
5295
- uint64_t rs_uniffiHandle,
5486
+ uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
5296
5487
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5297
5488
  uint64_t rs_uniffiCallbackData,
5298
5489
  UniffiForeignFuture *rs_uniffiOutReturn) {
5299
5490
  // We immediately make a lambda which will do the work of transforming the
5300
5491
  // arguments into JSI values and calling the callback.
5301
5492
  uniffi_runtime::UniffiCallFunc jsLambda =
5302
- [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
5303
- rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
5304
- body(rt, callInvoker, callbackValue, rs_uniffiHandle,
5305
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
5493
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_txid, rs_vout,
5494
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
5495
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
5496
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
5497
+ rs_vout, rs_uniffiFutureCallback, rs_uniffiCallbackData,
5306
5498
  rs_uniffiOutReturn);
5307
5499
  };
5308
5500
  // We'll then call that lambda from the callInvoker which will
@@ -5322,10 +5514,10 @@ static void cleanup() {
5322
5514
  } // namespace
5323
5515
  // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4
5324
5516
  // Implementation of callback function calling from Rust to JS
5325
- // CallbackInterfaceExternalBreezSignerMethod0
5517
+ // CallbackInterfaceBitcoinChainServiceMethod5
5326
5518
 
5327
5519
  // Callback function:
5328
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalbreezsignermethod0::UniffiCallbackInterfaceExternalBreezSignerMethod0
5520
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod5::UniffiCallbackInterfaceBitcoinChainServiceMethod5
5329
5521
  //
5330
5522
  // We have the following constraints:
5331
5523
  // - we need to pass a function pointer to Rust.
@@ -5339,14 +5531,13 @@ static void cleanup() {
5339
5531
  // We then give the `callback` function pointer to Rust which will call the
5340
5532
  // lambda sometime in the future.
5341
5533
  namespace uniffi::breez_sdk_spark::cb::
5342
- callbackinterfaceexternalbreezsignermethod0 {
5534
+ callbackinterfacebitcoinchainservicemethod5 {
5343
5535
  using namespace facebook;
5344
5536
 
5345
5537
  // We need to store a lambda in a global so we can call it from
5346
5538
  // a function pointer. The function pointer is passed to Rust.
5347
- static std::function<void(uint64_t, RustBuffer,
5348
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
5349
- UniffiForeignFuture *)>
5539
+ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
5540
+ uint64_t, UniffiForeignFuture *)>
5350
5541
  rsLambda = nullptr;
5351
5542
 
5352
5543
  // This is the main body of the callback. It's called from the lambda,
@@ -5354,8 +5545,8 @@ static std::function<void(uint64_t, RustBuffer,
5354
5545
  static void body(jsi::Runtime &rt,
5355
5546
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5356
5547
  std::shared_ptr<jsi::Value> callbackValue,
5357
- uint64_t rs_uniffiHandle, RustBuffer rs_path,
5358
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5548
+ uint64_t rs_uniffiHandle, RustBuffer rs_tx,
5549
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
5359
5550
  uint64_t rs_uniffiCallbackData,
5360
5551
  UniffiForeignFuture *rs_uniffiOutReturn) {
5361
5552
 
@@ -5363,15 +5554,445 @@ static void body(jsi::Runtime &rt,
5363
5554
  // We'll use the Bridging class to do this…
5364
5555
  auto js_uniffiHandle =
5365
5556
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
5366
- auto js_path = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
5367
- rt, callInvoker, rs_path);
5368
- auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
5369
- UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
5370
- rs_uniffiFutureCallback);
5371
- auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
5372
- rt, callInvoker, rs_uniffiCallbackData);
5373
-
5374
- // Now we are ready to call the callback.
5557
+ auto js_tx = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
5558
+ rt, callInvoker, rs_tx);
5559
+ auto js_uniffiFutureCallback =
5560
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
5561
+ rt, callInvoker, rs_uniffiFutureCallback);
5562
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
5563
+ rt, callInvoker, rs_uniffiCallbackData);
5564
+
5565
+ // Now we are ready to call the callback.
5566
+ // We are already on the JS thread, because this `body` function was
5567
+ // invoked from the CallInvoker.
5568
+ try {
5569
+ // Getting the callback function
5570
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
5571
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_tx,
5572
+ js_uniffiFutureCallback, js_uniffiCallbackData);
5573
+
5574
+ // return type is MutReference(Struct("ForeignFuture"))
5575
+ // Finally, we need to copy the return value back into the Rust pointer.
5576
+ *rs_uniffiOutReturn =
5577
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5578
+ rt, callInvoker, uniffiResult);
5579
+ } catch (const jsi::JSError &error) {
5580
+ std::cout << "Error in callback "
5581
+ "UniffiCallbackInterfaceBitcoinChainServiceMethod5: "
5582
+ << error.what() << std::endl;
5583
+ throw error;
5584
+ }
5585
+ }
5586
+
5587
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_tx,
5588
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
5589
+ uint64_t rs_uniffiCallbackData,
5590
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5591
+ // If the runtime has shutdown, then there is no point in trying to
5592
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
5593
+ //
5594
+ // Answer: the module destructor calls into callback `cleanup` method,
5595
+ // which nulls out the rsLamda.
5596
+ //
5597
+ // If rsLamda is null, then there is no runtime to call into.
5598
+ if (rsLambda == nullptr) {
5599
+ // This only occurs when destructors are calling into Rust free/drop,
5600
+ // which causes the JS callback to be dropped.
5601
+ return;
5602
+ }
5603
+
5604
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
5605
+ // are all in the lambda.
5606
+ rsLambda(rs_uniffiHandle, rs_tx, rs_uniffiFutureCallback,
5607
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
5608
+ }
5609
+
5610
+ static UniffiCallbackInterfaceBitcoinChainServiceMethod5
5611
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod5
5612
+ jsi::Runtime &rt,
5613
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5614
+ const jsi::Value &value) {
5615
+ if (rsLambda != nullptr) {
5616
+ // `makeCallbackFunction` is called in two circumstances:
5617
+ //
5618
+ // 1. at startup, when initializing callback interface vtables.
5619
+ // 2. when polling futures. This happens at least once per future that is
5620
+ // exposed to Javascript. We know that this is always the same function,
5621
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
5622
+ //
5623
+ // We can therefore return the callback function without making anything
5624
+ // new if we've been initialized already.
5625
+ return callback;
5626
+ }
5627
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
5628
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
5629
+ rsLambda = [&rt, callInvoker, callbackValue](
5630
+ uint64_t rs_uniffiHandle, RustBuffer rs_tx,
5631
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
5632
+ uint64_t rs_uniffiCallbackData,
5633
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5634
+ // We immediately make a lambda which will do the work of transforming the
5635
+ // arguments into JSI values and calling the callback.
5636
+ uniffi_runtime::UniffiCallFunc jsLambda =
5637
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_tx,
5638
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
5639
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
5640
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_tx,
5641
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
5642
+ rs_uniffiOutReturn);
5643
+ };
5644
+ // We'll then call that lambda from the callInvoker which will
5645
+ // look after calling it on the correct thread.
5646
+ callInvoker->invokeBlocking(rt, jsLambda);
5647
+ };
5648
+ return callback;
5649
+ }
5650
+
5651
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
5652
+ // happens when the jsi::Runtime is being destroyed.
5653
+ static void cleanup() {
5654
+ // The lambda holds a reference to the the Runtime, so when this is nulled
5655
+ // out, then the pointer will no longer be left dangling.
5656
+ rsLambda = nullptr;
5657
+ }
5658
+ } // namespace
5659
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod5
5660
+ // Implementation of callback function calling from Rust to JS
5661
+ // CallbackInterfaceBitcoinChainServiceMethod6
5662
+
5663
+ // Callback function:
5664
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod6::UniffiCallbackInterfaceBitcoinChainServiceMethod6
5665
+ //
5666
+ // We have the following constraints:
5667
+ // - we need to pass a function pointer to Rust.
5668
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
5669
+ // - function pointers can't store state, so we can't use a lamda.
5670
+ //
5671
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
5672
+ // function calls the lambda, which itself calls the `body` which then calls
5673
+ // into JS.
5674
+ //
5675
+ // We then give the `callback` function pointer to Rust which will call the
5676
+ // lambda sometime in the future.
5677
+ namespace uniffi::breez_sdk_spark::cb::
5678
+ callbackinterfacebitcoinchainservicemethod6 {
5679
+ using namespace facebook;
5680
+
5681
+ // We need to store a lambda in a global so we can call it from
5682
+ // a function pointer. The function pointer is passed to Rust.
5683
+ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
5684
+ uint64_t, UniffiForeignFuture *)>
5685
+ rsLambda = nullptr;
5686
+
5687
+ // This is the main body of the callback. It's called from the lambda,
5688
+ // which itself is called from the callback function which is passed to Rust.
5689
+ static void body(jsi::Runtime &rt,
5690
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5691
+ std::shared_ptr<jsi::Value> callbackValue,
5692
+ uint64_t rs_uniffiHandle,
5693
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5694
+ uint64_t rs_uniffiCallbackData,
5695
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5696
+
5697
+ // Convert the arguments from Rust, into jsi::Values.
5698
+ // We'll use the Bridging class to do this…
5699
+ auto js_uniffiHandle =
5700
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
5701
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
5702
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
5703
+ rs_uniffiFutureCallback);
5704
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
5705
+ rt, callInvoker, rs_uniffiCallbackData);
5706
+
5707
+ // Now we are ready to call the callback.
5708
+ // We are already on the JS thread, because this `body` function was
5709
+ // invoked from the CallInvoker.
5710
+ try {
5711
+ // Getting the callback function
5712
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
5713
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
5714
+ js_uniffiCallbackData);
5715
+
5716
+ // return type is MutReference(Struct("ForeignFuture"))
5717
+ // Finally, we need to copy the return value back into the Rust pointer.
5718
+ *rs_uniffiOutReturn =
5719
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5720
+ rt, callInvoker, uniffiResult);
5721
+ } catch (const jsi::JSError &error) {
5722
+ std::cout << "Error in callback "
5723
+ "UniffiCallbackInterfaceBitcoinChainServiceMethod6: "
5724
+ << error.what() << std::endl;
5725
+ throw error;
5726
+ }
5727
+ }
5728
+
5729
+ static void
5730
+ callback(uint64_t rs_uniffiHandle,
5731
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5732
+ uint64_t rs_uniffiCallbackData,
5733
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5734
+ // If the runtime has shutdown, then there is no point in trying to
5735
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
5736
+ //
5737
+ // Answer: the module destructor calls into callback `cleanup` method,
5738
+ // which nulls out the rsLamda.
5739
+ //
5740
+ // If rsLamda is null, then there is no runtime to call into.
5741
+ if (rsLambda == nullptr) {
5742
+ // This only occurs when destructors are calling into Rust free/drop,
5743
+ // which causes the JS callback to be dropped.
5744
+ return;
5745
+ }
5746
+
5747
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
5748
+ // are all in the lambda.
5749
+ rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
5750
+ rs_uniffiOutReturn);
5751
+ }
5752
+
5753
+ static UniffiCallbackInterfaceBitcoinChainServiceMethod6
5754
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod6
5755
+ jsi::Runtime &rt,
5756
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5757
+ const jsi::Value &value) {
5758
+ if (rsLambda != nullptr) {
5759
+ // `makeCallbackFunction` is called in two circumstances:
5760
+ //
5761
+ // 1. at startup, when initializing callback interface vtables.
5762
+ // 2. when polling futures. This happens at least once per future that is
5763
+ // exposed to Javascript. We know that this is always the same function,
5764
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
5765
+ //
5766
+ // We can therefore return the callback function without making anything
5767
+ // new if we've been initialized already.
5768
+ return callback;
5769
+ }
5770
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
5771
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
5772
+ rsLambda = [&rt, callInvoker, callbackValue](
5773
+ uint64_t rs_uniffiHandle,
5774
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5775
+ uint64_t rs_uniffiCallbackData,
5776
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5777
+ // We immediately make a lambda which will do the work of transforming the
5778
+ // arguments into JSI values and calling the callback.
5779
+ uniffi_runtime::UniffiCallFunc jsLambda =
5780
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
5781
+ rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
5782
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle,
5783
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
5784
+ rs_uniffiOutReturn);
5785
+ };
5786
+ // We'll then call that lambda from the callInvoker which will
5787
+ // look after calling it on the correct thread.
5788
+ callInvoker->invokeBlocking(rt, jsLambda);
5789
+ };
5790
+ return callback;
5791
+ }
5792
+
5793
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
5794
+ // happens when the jsi::Runtime is being destroyed.
5795
+ static void cleanup() {
5796
+ // The lambda holds a reference to the the Runtime, so when this is nulled
5797
+ // out, then the pointer will no longer be left dangling.
5798
+ rsLambda = nullptr;
5799
+ }
5800
+ } // namespace
5801
+ // uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod6
5802
+ // Implementation of callback function calling from Rust to JS
5803
+ // CallbackInterfaceCpfpSignerMethod0
5804
+
5805
+ // Callback function:
5806
+ // uniffi::breez_sdk_spark::cb::callbackinterfacecpfpsignermethod0::UniffiCallbackInterfaceCpfpSignerMethod0
5807
+ //
5808
+ // We have the following constraints:
5809
+ // - we need to pass a function pointer to Rust.
5810
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
5811
+ // - function pointers can't store state, so we can't use a lamda.
5812
+ //
5813
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
5814
+ // function calls the lambda, which itself calls the `body` which then calls
5815
+ // into JS.
5816
+ //
5817
+ // We then give the `callback` function pointer to Rust which will call the
5818
+ // lambda sometime in the future.
5819
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacecpfpsignermethod0 {
5820
+ using namespace facebook;
5821
+
5822
+ // We need to store a lambda in a global so we can call it from
5823
+ // a function pointer. The function pointer is passed to Rust.
5824
+ static std::function<void(uint64_t, RustBuffer,
5825
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
5826
+ UniffiForeignFuture *)>
5827
+ rsLambda = nullptr;
5828
+
5829
+ // This is the main body of the callback. It's called from the lambda,
5830
+ // which itself is called from the callback function which is passed to Rust.
5831
+ static void body(jsi::Runtime &rt,
5832
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5833
+ std::shared_ptr<jsi::Value> callbackValue,
5834
+ uint64_t rs_uniffiHandle, RustBuffer rs_psbtBytes,
5835
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5836
+ uint64_t rs_uniffiCallbackData,
5837
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5838
+
5839
+ // Convert the arguments from Rust, into jsi::Values.
5840
+ // We'll use the Bridging class to do this…
5841
+ auto js_uniffiHandle =
5842
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
5843
+ auto js_psbtBytes = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
5844
+ rt, callInvoker, rs_psbtBytes);
5845
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
5846
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
5847
+ rs_uniffiFutureCallback);
5848
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
5849
+ rt, callInvoker, rs_uniffiCallbackData);
5850
+
5851
+ // Now we are ready to call the callback.
5852
+ // We are already on the JS thread, because this `body` function was
5853
+ // invoked from the CallInvoker.
5854
+ try {
5855
+ // Getting the callback function
5856
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
5857
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_psbtBytes,
5858
+ js_uniffiFutureCallback, js_uniffiCallbackData);
5859
+
5860
+ // return type is MutReference(Struct("ForeignFuture"))
5861
+ // Finally, we need to copy the return value back into the Rust pointer.
5862
+ *rs_uniffiOutReturn =
5863
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
5864
+ rt, callInvoker, uniffiResult);
5865
+ } catch (const jsi::JSError &error) {
5866
+ std::cout << "Error in callback UniffiCallbackInterfaceCpfpSignerMethod0: "
5867
+ << error.what() << std::endl;
5868
+ throw error;
5869
+ }
5870
+ }
5871
+
5872
+ static void
5873
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_psbtBytes,
5874
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5875
+ uint64_t rs_uniffiCallbackData,
5876
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5877
+ // If the runtime has shutdown, then there is no point in trying to
5878
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
5879
+ //
5880
+ // Answer: the module destructor calls into callback `cleanup` method,
5881
+ // which nulls out the rsLamda.
5882
+ //
5883
+ // If rsLamda is null, then there is no runtime to call into.
5884
+ if (rsLambda == nullptr) {
5885
+ // This only occurs when destructors are calling into Rust free/drop,
5886
+ // which causes the JS callback to be dropped.
5887
+ return;
5888
+ }
5889
+
5890
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
5891
+ // are all in the lambda.
5892
+ rsLambda(rs_uniffiHandle, rs_psbtBytes, rs_uniffiFutureCallback,
5893
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
5894
+ }
5895
+
5896
+ static UniffiCallbackInterfaceCpfpSignerMethod0
5897
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacecpfpsignermethod0
5898
+ jsi::Runtime &rt,
5899
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5900
+ const jsi::Value &value) {
5901
+ if (rsLambda != nullptr) {
5902
+ // `makeCallbackFunction` is called in two circumstances:
5903
+ //
5904
+ // 1. at startup, when initializing callback interface vtables.
5905
+ // 2. when polling futures. This happens at least once per future that is
5906
+ // exposed to Javascript. We know that this is always the same function,
5907
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
5908
+ //
5909
+ // We can therefore return the callback function without making anything
5910
+ // new if we've been initialized already.
5911
+ return callback;
5912
+ }
5913
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
5914
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
5915
+ rsLambda = [&rt, callInvoker, callbackValue](
5916
+ uint64_t rs_uniffiHandle, RustBuffer rs_psbtBytes,
5917
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5918
+ uint64_t rs_uniffiCallbackData,
5919
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5920
+ // We immediately make a lambda which will do the work of transforming the
5921
+ // arguments into JSI values and calling the callback.
5922
+ uniffi_runtime::UniffiCallFunc jsLambda =
5923
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_psbtBytes,
5924
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
5925
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
5926
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_psbtBytes,
5927
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
5928
+ rs_uniffiOutReturn);
5929
+ };
5930
+ // We'll then call that lambda from the callInvoker which will
5931
+ // look after calling it on the correct thread.
5932
+ callInvoker->invokeBlocking(rt, jsLambda);
5933
+ };
5934
+ return callback;
5935
+ }
5936
+
5937
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
5938
+ // happens when the jsi::Runtime is being destroyed.
5939
+ static void cleanup() {
5940
+ // The lambda holds a reference to the the Runtime, so when this is nulled
5941
+ // out, then the pointer will no longer be left dangling.
5942
+ rsLambda = nullptr;
5943
+ }
5944
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacecpfpsignermethod0
5945
+ // Implementation of callback function calling from Rust to JS
5946
+ // CallbackInterfaceExternalBreezSignerMethod0
5947
+
5948
+ // Callback function:
5949
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalbreezsignermethod0::UniffiCallbackInterfaceExternalBreezSignerMethod0
5950
+ //
5951
+ // We have the following constraints:
5952
+ // - we need to pass a function pointer to Rust.
5953
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
5954
+ // - function pointers can't store state, so we can't use a lamda.
5955
+ //
5956
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
5957
+ // function calls the lambda, which itself calls the `body` which then calls
5958
+ // into JS.
5959
+ //
5960
+ // We then give the `callback` function pointer to Rust which will call the
5961
+ // lambda sometime in the future.
5962
+ namespace uniffi::breez_sdk_spark::cb::
5963
+ callbackinterfaceexternalbreezsignermethod0 {
5964
+ using namespace facebook;
5965
+
5966
+ // We need to store a lambda in a global so we can call it from
5967
+ // a function pointer. The function pointer is passed to Rust.
5968
+ static std::function<void(uint64_t, RustBuffer,
5969
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
5970
+ UniffiForeignFuture *)>
5971
+ rsLambda = nullptr;
5972
+
5973
+ // This is the main body of the callback. It's called from the lambda,
5974
+ // which itself is called from the callback function which is passed to Rust.
5975
+ static void body(jsi::Runtime &rt,
5976
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
5977
+ std::shared_ptr<jsi::Value> callbackValue,
5978
+ uint64_t rs_uniffiHandle, RustBuffer rs_path,
5979
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
5980
+ uint64_t rs_uniffiCallbackData,
5981
+ UniffiForeignFuture *rs_uniffiOutReturn) {
5982
+
5983
+ // Convert the arguments from Rust, into jsi::Values.
5984
+ // We'll use the Bridging class to do this…
5985
+ auto js_uniffiHandle =
5986
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
5987
+ auto js_path = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
5988
+ rt, callInvoker, rs_path);
5989
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
5990
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
5991
+ rs_uniffiFutureCallback);
5992
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
5993
+ rt, callInvoker, rs_uniffiCallbackData);
5994
+
5995
+ // Now we are ready to call the callback.
5375
5996
  // We are already on the JS thread, because this `body` function was
5376
5997
  // invoked from the CallInvoker.
5377
5998
  try {
@@ -7847,7 +8468,7 @@ using namespace facebook;
7847
8468
 
7848
8469
  // We need to store a lambda in a global so we can call it from
7849
8470
  // a function pointer. The function pointer is passed to Rust.
7850
- static std::function<void(uint64_t, RustBuffer,
8471
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
7851
8472
  UniffiForeignFutureCompleteRustBuffer, uint64_t,
7852
8473
  UniffiForeignFuture *)>
7853
8474
  rsLambda = nullptr;
@@ -7857,7 +8478,8 @@ static std::function<void(uint64_t, RustBuffer,
7857
8478
  static void body(jsi::Runtime &rt,
7858
8479
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
7859
8480
  std::shared_ptr<jsi::Value> callbackValue,
7860
- uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
8481
+ uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
8482
+ RustBuffer rs_sighash,
7861
8483
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7862
8484
  uint64_t rs_uniffiCallbackData,
7863
8485
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -7866,8 +8488,10 @@ static void body(jsi::Runtime &rt,
7866
8488
  // We'll use the Bridging class to do this…
7867
8489
  auto js_uniffiHandle =
7868
8490
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
7869
- auto js_jobs = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
7870
- rt, callInvoker, rs_jobs);
8491
+ auto js_leafId = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
8492
+ rt, callInvoker, rs_leafId);
8493
+ auto js_sighash = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
8494
+ rt, callInvoker, rs_sighash);
7871
8495
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
7872
8496
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
7873
8497
  rs_uniffiFutureCallback);
@@ -7880,7 +8504,7 @@ static void body(jsi::Runtime &rt,
7880
8504
  try {
7881
8505
  // Getting the callback function
7882
8506
  auto cb = callbackValue->asObject(rt).asFunction(rt);
7883
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_jobs,
8507
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_leafId, js_sighash,
7884
8508
  js_uniffiFutureCallback, js_uniffiCallbackData);
7885
8509
 
7886
8510
  // return type is MutReference(Struct("ForeignFuture"))
@@ -7897,7 +8521,7 @@ static void body(jsi::Runtime &rt,
7897
8521
  }
7898
8522
 
7899
8523
  static void
7900
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
8524
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_leafId, RustBuffer rs_sighash,
7901
8525
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7902
8526
  uint64_t rs_uniffiCallbackData,
7903
8527
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -7916,7 +8540,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
7916
8540
 
7917
8541
  // The runtime, the actual callback jsi::funtion, and the callInvoker
7918
8542
  // are all in the lambda.
7919
- rsLambda(rs_uniffiHandle, rs_jobs, rs_uniffiFutureCallback,
8543
+ rsLambda(rs_uniffiHandle, rs_leafId, rs_sighash, rs_uniffiFutureCallback,
7920
8544
  rs_uniffiCallbackData, rs_uniffiOutReturn);
7921
8545
  }
7922
8546
 
@@ -7940,18 +8564,19 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternals
7940
8564
  auto callbackFunction = value.asObject(rt).asFunction(rt);
7941
8565
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
7942
8566
  rsLambda = [&rt, callInvoker, callbackValue](
7943
- uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
8567
+ uint64_t rs_uniffiHandle, RustBuffer rs_leafId,
8568
+ RustBuffer rs_sighash,
7944
8569
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
7945
8570
  uint64_t rs_uniffiCallbackData,
7946
8571
  UniffiForeignFuture *rs_uniffiOutReturn) {
7947
8572
  // We immediately make a lambda which will do the work of transforming the
7948
8573
  // arguments into JSI values and calling the callback.
7949
8574
  uniffi_runtime::UniffiCallFunc jsLambda =
7950
- [callInvoker, callbackValue, rs_uniffiHandle, rs_jobs,
8575
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_leafId, rs_sighash,
7951
8576
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
7952
8577
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
7953
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_jobs,
7954
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
8578
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_leafId,
8579
+ rs_sighash, rs_uniffiFutureCallback, rs_uniffiCallbackData,
7955
8580
  rs_uniffiOutReturn);
7956
8581
  };
7957
8582
  // We'll then call that lambda from the callInvoker which will
@@ -8003,7 +8628,7 @@ static std::function<void(uint64_t, RustBuffer,
8003
8628
  static void body(jsi::Runtime &rt,
8004
8629
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
8005
8630
  std::shared_ptr<jsi::Value> callbackValue,
8006
- uint64_t rs_uniffiHandle, RustBuffer rs_request,
8631
+ uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
8007
8632
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
8008
8633
  uint64_t rs_uniffiCallbackData,
8009
8634
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -8012,8 +8637,8 @@ static void body(jsi::Runtime &rt,
8012
8637
  // We'll use the Bridging class to do this…
8013
8638
  auto js_uniffiHandle =
8014
8639
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
8015
- auto js_request = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
8016
- rt, callInvoker, rs_request);
8640
+ auto js_jobs = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
8641
+ rt, callInvoker, rs_jobs);
8017
8642
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
8018
8643
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
8019
8644
  rs_uniffiFutureCallback);
@@ -8026,7 +8651,7 @@ static void body(jsi::Runtime &rt,
8026
8651
  try {
8027
8652
  // Getting the callback function
8028
8653
  auto cb = callbackValue->asObject(rt).asFunction(rt);
8029
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
8654
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_jobs,
8030
8655
  js_uniffiFutureCallback, js_uniffiCallbackData);
8031
8656
 
8032
8657
  // return type is MutReference(Struct("ForeignFuture"))
@@ -8043,7 +8668,7 @@ static void body(jsi::Runtime &rt,
8043
8668
  }
8044
8669
 
8045
8670
  static void
8046
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
8671
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
8047
8672
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
8048
8673
  uint64_t rs_uniffiCallbackData,
8049
8674
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -8062,7 +8687,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
8062
8687
 
8063
8688
  // The runtime, the actual callback jsi::funtion, and the callInvoker
8064
8689
  // are all in the lambda.
8065
- rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
8690
+ rsLambda(rs_uniffiHandle, rs_jobs, rs_uniffiFutureCallback,
8066
8691
  rs_uniffiCallbackData, rs_uniffiOutReturn);
8067
8692
  }
8068
8693
 
@@ -8086,17 +8711,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternals
8086
8711
  auto callbackFunction = value.asObject(rt).asFunction(rt);
8087
8712
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
8088
8713
  rsLambda = [&rt, callInvoker, callbackValue](
8089
- uint64_t rs_uniffiHandle, RustBuffer rs_request,
8714
+ uint64_t rs_uniffiHandle, RustBuffer rs_jobs,
8090
8715
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
8091
8716
  uint64_t rs_uniffiCallbackData,
8092
8717
  UniffiForeignFuture *rs_uniffiOutReturn) {
8093
8718
  // We immediately make a lambda which will do the work of transforming the
8094
8719
  // arguments into JSI values and calling the callback.
8095
8720
  uniffi_runtime::UniffiCallFunc jsLambda =
8096
- [callInvoker, callbackValue, rs_uniffiHandle, rs_request,
8721
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_jobs,
8097
8722
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
8098
8723
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
8099
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
8724
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_jobs,
8100
8725
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
8101
8726
  rs_uniffiOutReturn);
8102
8727
  };
@@ -9204,7 +9829,153 @@ static void body(jsi::Runtime &rt,
9204
9829
  rt, callInvoker, uniffiResult);
9205
9830
  } catch (const jsi::JSError &error) {
9206
9831
  std::cout << "Error in callback "
9207
- "UniffiCallbackInterfaceExternalSparkSignerMethod15: "
9832
+ "UniffiCallbackInterfaceExternalSparkSignerMethod15: "
9833
+ << error.what() << std::endl;
9834
+ throw error;
9835
+ }
9836
+ }
9837
+
9838
+ static void
9839
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
9840
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
9841
+ uint64_t rs_uniffiCallbackData,
9842
+ UniffiForeignFuture *rs_uniffiOutReturn) {
9843
+ // If the runtime has shutdown, then there is no point in trying to
9844
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
9845
+ //
9846
+ // Answer: the module destructor calls into callback `cleanup` method,
9847
+ // which nulls out the rsLamda.
9848
+ //
9849
+ // If rsLamda is null, then there is no runtime to call into.
9850
+ if (rsLambda == nullptr) {
9851
+ // This only occurs when destructors are calling into Rust free/drop,
9852
+ // which causes the JS callback to be dropped.
9853
+ return;
9854
+ }
9855
+
9856
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
9857
+ // are all in the lambda.
9858
+ rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
9859
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
9860
+ }
9861
+
9862
+ static UniffiCallbackInterfaceExternalSparkSignerMethod15
9863
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15
9864
+ jsi::Runtime &rt,
9865
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
9866
+ const jsi::Value &value) {
9867
+ if (rsLambda != nullptr) {
9868
+ // `makeCallbackFunction` is called in two circumstances:
9869
+ //
9870
+ // 1. at startup, when initializing callback interface vtables.
9871
+ // 2. when polling futures. This happens at least once per future that is
9872
+ // exposed to Javascript. We know that this is always the same function,
9873
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
9874
+ //
9875
+ // We can therefore return the callback function without making anything
9876
+ // new if we've been initialized already.
9877
+ return callback;
9878
+ }
9879
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
9880
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
9881
+ rsLambda = [&rt, callInvoker, callbackValue](
9882
+ uint64_t rs_uniffiHandle, RustBuffer rs_request,
9883
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
9884
+ uint64_t rs_uniffiCallbackData,
9885
+ UniffiForeignFuture *rs_uniffiOutReturn) {
9886
+ // We immediately make a lambda which will do the work of transforming the
9887
+ // arguments into JSI values and calling the callback.
9888
+ uniffi_runtime::UniffiCallFunc jsLambda =
9889
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_request,
9890
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
9891
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
9892
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
9893
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
9894
+ rs_uniffiOutReturn);
9895
+ };
9896
+ // We'll then call that lambda from the callInvoker which will
9897
+ // look after calling it on the correct thread.
9898
+ callInvoker->invokeBlocking(rt, jsLambda);
9899
+ };
9900
+ return callback;
9901
+ }
9902
+
9903
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
9904
+ // happens when the jsi::Runtime is being destroyed.
9905
+ static void cleanup() {
9906
+ // The lambda holds a reference to the the Runtime, so when this is nulled
9907
+ // out, then the pointer will no longer be left dangling.
9908
+ rsLambda = nullptr;
9909
+ }
9910
+ } // namespace
9911
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15
9912
+ // Implementation of callback function calling from Rust to JS
9913
+ // CallbackInterfaceExternalSparkSignerMethod16
9914
+
9915
+ // Callback function:
9916
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod16::UniffiCallbackInterfaceExternalSparkSignerMethod16
9917
+ //
9918
+ // We have the following constraints:
9919
+ // - we need to pass a function pointer to Rust.
9920
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
9921
+ // - function pointers can't store state, so we can't use a lamda.
9922
+ //
9923
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
9924
+ // function calls the lambda, which itself calls the `body` which then calls
9925
+ // into JS.
9926
+ //
9927
+ // We then give the `callback` function pointer to Rust which will call the
9928
+ // lambda sometime in the future.
9929
+ namespace uniffi::breez_sdk_spark::cb::
9930
+ callbackinterfaceexternalsparksignermethod16 {
9931
+ using namespace facebook;
9932
+
9933
+ // We need to store a lambda in a global so we can call it from
9934
+ // a function pointer. The function pointer is passed to Rust.
9935
+ static std::function<void(uint64_t, RustBuffer,
9936
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
9937
+ UniffiForeignFuture *)>
9938
+ rsLambda = nullptr;
9939
+
9940
+ // This is the main body of the callback. It's called from the lambda,
9941
+ // which itself is called from the callback function which is passed to Rust.
9942
+ static void body(jsi::Runtime &rt,
9943
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
9944
+ std::shared_ptr<jsi::Value> callbackValue,
9945
+ uint64_t rs_uniffiHandle, RustBuffer rs_request,
9946
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
9947
+ uint64_t rs_uniffiCallbackData,
9948
+ UniffiForeignFuture *rs_uniffiOutReturn) {
9949
+
9950
+ // Convert the arguments from Rust, into jsi::Values.
9951
+ // We'll use the Bridging class to do this…
9952
+ auto js_uniffiHandle =
9953
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
9954
+ auto js_request = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
9955
+ rt, callInvoker, rs_request);
9956
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
9957
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
9958
+ rs_uniffiFutureCallback);
9959
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
9960
+ rt, callInvoker, rs_uniffiCallbackData);
9961
+
9962
+ // Now we are ready to call the callback.
9963
+ // We are already on the JS thread, because this `body` function was
9964
+ // invoked from the CallInvoker.
9965
+ try {
9966
+ // Getting the callback function
9967
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
9968
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
9969
+ js_uniffiFutureCallback, js_uniffiCallbackData);
9970
+
9971
+ // return type is MutReference(Struct("ForeignFuture"))
9972
+ // Finally, we need to copy the return value back into the Rust pointer.
9973
+ *rs_uniffiOutReturn =
9974
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
9975
+ rt, callInvoker, uniffiResult);
9976
+ } catch (const jsi::JSError &error) {
9977
+ std::cout << "Error in callback "
9978
+ "UniffiCallbackInterfaceExternalSparkSignerMethod16: "
9208
9979
  << error.what() << std::endl;
9209
9980
  throw error;
9210
9981
  }
@@ -9234,8 +10005,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
9234
10005
  rs_uniffiCallbackData, rs_uniffiOutReturn);
9235
10006
  }
9236
10007
 
9237
- static UniffiCallbackInterfaceExternalSparkSignerMethod15
9238
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15
10008
+ static UniffiCallbackInterfaceExternalSparkSignerMethod16
10009
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod16
9239
10010
  jsi::Runtime &rt,
9240
10011
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
9241
10012
  const jsi::Value &value) {
@@ -9283,7 +10054,7 @@ static void cleanup() {
9283
10054
  rsLambda = nullptr;
9284
10055
  }
9285
10056
  } // namespace
9286
- // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15
10057
+ // uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod16
9287
10058
  // Implementation of callback function calling from Rust to JS
9288
10059
  // CallbackInterfaceFiatServiceMethod0
9289
10060
 
@@ -10151,7 +10922,7 @@ using namespace facebook;
10151
10922
 
10152
10923
  // We need to store a lambda in a global so we can call it from
10153
10924
  // a function pointer. The function pointer is passed to Rust.
10154
- static std::function<void(uint64_t, RustBuffer,
10925
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
10155
10926
  UniffiForeignFutureCompleteRustBuffer, uint64_t,
10156
10927
  UniffiForeignFuture *)>
10157
10928
  rsLambda = nullptr;
@@ -10162,6 +10933,7 @@ static void body(jsi::Runtime &rt,
10162
10933
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
10163
10934
  std::shared_ptr<jsi::Value> callbackValue,
10164
10935
  uint64_t rs_uniffiHandle, RustBuffer rs_excludeCredentials,
10936
+ RustBuffer rs_salts,
10165
10937
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
10166
10938
  uint64_t rs_uniffiCallbackData,
10167
10939
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -10173,6 +10945,8 @@ static void body(jsi::Runtime &rt,
10173
10945
  auto js_excludeCredentials =
10174
10946
  uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
10175
10947
  rt, callInvoker, rs_excludeCredentials);
10948
+ auto js_salts = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
10949
+ rt, callInvoker, rs_salts);
10176
10950
  auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
10177
10951
  UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
10178
10952
  rs_uniffiFutureCallback);
@@ -10185,8 +10959,9 @@ static void body(jsi::Runtime &rt,
10185
10959
  try {
10186
10960
  // Getting the callback function
10187
10961
  auto cb = callbackValue->asObject(rt).asFunction(rt);
10188
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_excludeCredentials,
10189
- js_uniffiFutureCallback, js_uniffiCallbackData);
10962
+ auto uniffiResult =
10963
+ cb.call(rt, js_uniffiHandle, js_excludeCredentials, js_salts,
10964
+ js_uniffiFutureCallback, js_uniffiCallbackData);
10190
10965
 
10191
10966
  // return type is MutReference(Struct("ForeignFuture"))
10192
10967
  // Finally, we need to copy the return value back into the Rust pointer.
@@ -10202,6 +10977,7 @@ static void body(jsi::Runtime &rt,
10202
10977
 
10203
10978
  static void
10204
10979
  callback(uint64_t rs_uniffiHandle, RustBuffer rs_excludeCredentials,
10980
+ RustBuffer rs_salts,
10205
10981
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
10206
10982
  uint64_t rs_uniffiCallbackData,
10207
10983
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -10220,8 +10996,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_excludeCredentials,
10220
10996
 
10221
10997
  // The runtime, the actual callback jsi::funtion, and the callInvoker
10222
10998
  // are all in the lambda.
10223
- rsLambda(rs_uniffiHandle, rs_excludeCredentials, rs_uniffiFutureCallback,
10224
- rs_uniffiCallbackData, rs_uniffiOutReturn);
10999
+ rsLambda(rs_uniffiHandle, rs_excludeCredentials, rs_salts,
11000
+ rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
10225
11001
  }
10226
11002
 
10227
11003
  static UniffiCallbackInterfacePrfProviderMethod2
@@ -10245,6 +11021,7 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceprfprovid
10245
11021
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
10246
11022
  rsLambda = [&rt, callInvoker, callbackValue](
10247
11023
  uint64_t rs_uniffiHandle, RustBuffer rs_excludeCredentials,
11024
+ RustBuffer rs_salts,
10248
11025
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
10249
11026
  uint64_t rs_uniffiCallbackData,
10250
11027
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -10252,10 +11029,10 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceprfprovid
10252
11029
  // arguments into JSI values and calling the callback.
10253
11030
  uniffi_runtime::UniffiCallFunc jsLambda =
10254
11031
  [callInvoker, callbackValue, rs_uniffiHandle, rs_excludeCredentials,
10255
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
11032
+ rs_salts, rs_uniffiFutureCallback, rs_uniffiCallbackData,
10256
11033
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
10257
11034
  body(rt, callInvoker, callbackValue, rs_uniffiHandle,
10258
- rs_excludeCredentials, rs_uniffiFutureCallback,
11035
+ rs_excludeCredentials, rs_salts, rs_uniffiFutureCallback,
10259
11036
  rs_uniffiCallbackData, rs_uniffiOutReturn);
10260
11037
  };
10261
11038
  // We'll then call that lambda from the callInvoker which will
@@ -15689,17 +16466,23 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceBitcoinChainService> {
15689
16466
  rsObject.get_address_utxos = uniffi::breez_sdk_spark::cb::
15690
16467
  callbackinterfacebitcoinchainservicemethod0::makeCallbackFunction(
15691
16468
  rt, callInvoker, jsObject.getProperty(rt, "getAddressUtxos"));
15692
- rsObject.get_transaction_status = uniffi::breez_sdk_spark::cb::
16469
+ rsObject.get_address_txos = uniffi::breez_sdk_spark::cb::
15693
16470
  callbackinterfacebitcoinchainservicemethod1::makeCallbackFunction(
16471
+ rt, callInvoker, jsObject.getProperty(rt, "getAddressTxos"));
16472
+ rsObject.get_transaction_status = uniffi::breez_sdk_spark::cb::
16473
+ callbackinterfacebitcoinchainservicemethod2::makeCallbackFunction(
15694
16474
  rt, callInvoker, jsObject.getProperty(rt, "getTransactionStatus"));
15695
16475
  rsObject.get_transaction_hex = uniffi::breez_sdk_spark::cb::
15696
- callbackinterfacebitcoinchainservicemethod2::makeCallbackFunction(
16476
+ callbackinterfacebitcoinchainservicemethod3::makeCallbackFunction(
15697
16477
  rt, callInvoker, jsObject.getProperty(rt, "getTransactionHex"));
16478
+ rsObject.get_outspend = uniffi::breez_sdk_spark::cb::
16479
+ callbackinterfacebitcoinchainservicemethod4::makeCallbackFunction(
16480
+ rt, callInvoker, jsObject.getProperty(rt, "getOutspend"));
15698
16481
  rsObject.broadcast_transaction = uniffi::breez_sdk_spark::cb::
15699
- callbackinterfacebitcoinchainservicemethod3::makeCallbackFunction(
16482
+ callbackinterfacebitcoinchainservicemethod5::makeCallbackFunction(
15700
16483
  rt, callInvoker, jsObject.getProperty(rt, "broadcastTransaction"));
15701
16484
  rsObject.recommended_fees = uniffi::breez_sdk_spark::cb::
15702
- callbackinterfacebitcoinchainservicemethod4::makeCallbackFunction(
16485
+ callbackinterfacebitcoinchainservicemethod6::makeCallbackFunction(
15703
16486
  rt, callInvoker, jsObject.getProperty(rt, "recommendedFees"));
15704
16487
  rsObject.uniffi_free = uniffi::breez_sdk_spark::st::
15705
16488
  vtablecallbackinterfacebitcoinchainservice::
@@ -15716,6 +16499,40 @@ namespace uniffi::breez_sdk_spark {
15716
16499
  using namespace facebook;
15717
16500
  using CallInvoker = uniffi_runtime::UniffiCallInvoker;
15718
16501
 
16502
+ template <> struct Bridging<UniffiVTableCallbackInterfaceCpfpSigner> {
16503
+ static UniffiVTableCallbackInterfaceCpfpSigner
16504
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
16505
+ const jsi::Value &jsValue) {
16506
+ // Check if the input is an object
16507
+ if (!jsValue.isObject()) {
16508
+ throw jsi::JSError(
16509
+ rt, "Expected an object for UniffiVTableCallbackInterfaceCpfpSigner");
16510
+ }
16511
+
16512
+ // Get the object from the jsi::Value
16513
+ auto jsObject = jsValue.getObject(rt);
16514
+
16515
+ // Create the vtable struct
16516
+ UniffiVTableCallbackInterfaceCpfpSigner rsObject;
16517
+
16518
+ // Create the vtable from the js callbacks.
16519
+ rsObject.sign_psbt = uniffi::breez_sdk_spark::cb::
16520
+ callbackinterfacecpfpsignermethod0::makeCallbackFunction(
16521
+ rt, callInvoker, jsObject.getProperty(rt, "signPsbt"));
16522
+ rsObject.uniffi_free =
16523
+ uniffi::breez_sdk_spark::st::vtablecallbackinterfacecpfpsigner::
16524
+ vtablecallbackinterfacecpfpsigner::free::makeCallbackFunction(
16525
+ rt, callInvoker, jsObject.getProperty(rt, "uniffiFree"));
16526
+
16527
+ return rsObject;
16528
+ }
16529
+ };
16530
+
16531
+ } // namespace uniffi::breez_sdk_spark
16532
+ namespace uniffi::breez_sdk_spark {
16533
+ using namespace facebook;
16534
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
16535
+
15719
16536
  template <> struct Bridging<UniffiVTableCallbackInterfaceExternalBreezSigner> {
15720
16537
  static UniffiVTableCallbackInterfaceExternalBreezSigner
15721
16538
  fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
@@ -15854,39 +16671,42 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceExternalSparkSigner> {
15854
16671
  rsObject.sign_message = uniffi::breez_sdk_spark::cb::
15855
16672
  callbackinterfaceexternalsparksignermethod5::makeCallbackFunction(
15856
16673
  rt, callInvoker, jsObject.getProperty(rt, "signMessage"));
15857
- rsObject.sign_frost = uniffi::breez_sdk_spark::cb::
16674
+ rsObject.sign_leaf_refund_spend = uniffi::breez_sdk_spark::cb::
15858
16675
  callbackinterfaceexternalsparksignermethod6::makeCallbackFunction(
16676
+ rt, callInvoker, jsObject.getProperty(rt, "signLeafRefundSpend"));
16677
+ rsObject.sign_frost = uniffi::breez_sdk_spark::cb::
16678
+ callbackinterfaceexternalsparksignermethod7::makeCallbackFunction(
15859
16679
  rt, callInvoker, jsObject.getProperty(rt, "signFrost"));
15860
16680
  rsObject.prepare_transfer = uniffi::breez_sdk_spark::cb::
15861
- callbackinterfaceexternalsparksignermethod7::makeCallbackFunction(
16681
+ callbackinterfaceexternalsparksignermethod8::makeCallbackFunction(
15862
16682
  rt, callInvoker, jsObject.getProperty(rt, "prepareTransfer"));
15863
16683
  rsObject.prepare_claim = uniffi::breez_sdk_spark::cb::
15864
- callbackinterfaceexternalsparksignermethod8::makeCallbackFunction(
16684
+ callbackinterfaceexternalsparksignermethod9::makeCallbackFunction(
15865
16685
  rt, callInvoker, jsObject.getProperty(rt, "prepareClaim"));
15866
16686
  rsObject.prepare_lightning_receive = uniffi::breez_sdk_spark::cb::
15867
- callbackinterfaceexternalsparksignermethod9::makeCallbackFunction(
16687
+ callbackinterfaceexternalsparksignermethod10::makeCallbackFunction(
15868
16688
  rt, callInvoker,
15869
16689
  jsObject.getProperty(rt, "prepareLightningReceive"));
15870
16690
  rsObject.prepare_static_deposit = uniffi::breez_sdk_spark::cb::
15871
- callbackinterfaceexternalsparksignermethod10::makeCallbackFunction(
16691
+ callbackinterfaceexternalsparksignermethod11::makeCallbackFunction(
15872
16692
  rt, callInvoker, jsObject.getProperty(rt, "prepareStaticDeposit"));
15873
16693
  rsObject.start_static_deposit_refund = uniffi::breez_sdk_spark::cb::
15874
- callbackinterfaceexternalsparksignermethod11::makeCallbackFunction(
16694
+ callbackinterfaceexternalsparksignermethod12::makeCallbackFunction(
15875
16695
  rt, callInvoker,
15876
16696
  jsObject.getProperty(rt, "startStaticDepositRefund"));
15877
16697
  rsObject.sign_static_deposit_refund = uniffi::breez_sdk_spark::cb::
15878
- callbackinterfaceexternalsparksignermethod12::makeCallbackFunction(
16698
+ callbackinterfaceexternalsparksignermethod13::makeCallbackFunction(
15879
16699
  rt, callInvoker,
15880
16700
  jsObject.getProperty(rt, "signStaticDepositRefund"));
15881
16701
  rsObject.sign_spark_invoice = uniffi::breez_sdk_spark::cb::
15882
- callbackinterfaceexternalsparksignermethod13::makeCallbackFunction(
16702
+ callbackinterfaceexternalsparksignermethod14::makeCallbackFunction(
15883
16703
  rt, callInvoker, jsObject.getProperty(rt, "signSparkInvoice"));
15884
16704
  rsObject.prepare_token_transaction = uniffi::breez_sdk_spark::cb::
15885
- callbackinterfaceexternalsparksignermethod14::makeCallbackFunction(
16705
+ callbackinterfaceexternalsparksignermethod15::makeCallbackFunction(
15886
16706
  rt, callInvoker,
15887
16707
  jsObject.getProperty(rt, "prepareTokenTransaction"));
15888
16708
  rsObject.prepare_static_deposit_claim = uniffi::breez_sdk_spark::cb::
15889
- callbackinterfaceexternalsparksignermethod15::makeCallbackFunction(
16709
+ callbackinterfaceexternalsparksignermethod16::makeCallbackFunction(
15890
16710
  rt, callInvoker,
15891
16711
  jsObject.getProperty(rt, "prepareStaticDepositClaim"));
15892
16712
  rsObject.uniffi_free = uniffi::breez_sdk_spark::st::
@@ -16364,6 +17184,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16364
17184
  ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_utxos(
16365
17185
  rt, thisVal, args, count);
16366
17186
  });
17187
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_"
17188
+ "txos"] = jsi::Function::createFromHostFunction(
17189
+ rt,
17190
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17191
+ "bitcoinchainservice_get_address_txos"),
17192
+ 2,
17193
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17194
+ const jsi::Value *args, size_t count) -> jsi::Value {
17195
+ return this
17196
+ ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_txos(
17197
+ rt, thisVal, args, count);
17198
+ });
16367
17199
  props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_"
16368
17200
  "transaction_status"] = jsi::Function::createFromHostFunction(
16369
17201
  rt,
@@ -16389,6 +17221,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16389
17221
  ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_hex(
16390
17222
  rt, thisVal, args, count);
16391
17223
  });
17224
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_"
17225
+ "outspend"] = jsi::Function::createFromHostFunction(
17226
+ rt,
17227
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17228
+ "bitcoinchainservice_get_outspend"),
17229
+ 3,
17230
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17231
+ const jsi::Value *args, size_t count) -> jsi::Value {
17232
+ return this
17233
+ ->cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_outspend(
17234
+ rt, thisVal, args, count);
17235
+ });
16392
17236
  props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_"
16393
17237
  "transaction"] = jsi::Function::createFromHostFunction(
16394
17238
  rt,
@@ -16473,6 +17317,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16473
17317
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_authorize_lightning_address_transfer(
16474
17318
  rt, thisVal, args, count);
16475
17319
  });
17320
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_batch_"
17321
+ "package"] = jsi::Function::createFromHostFunction(
17322
+ rt,
17323
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17324
+ "breezsdk_build_unsigned_batch_package"),
17325
+ 2,
17326
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17327
+ const jsi::Value *args, size_t count) -> jsi::Value {
17328
+ return this
17329
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_batch_package(
17330
+ rt, thisVal, args, count);
17331
+ });
16476
17332
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_"
16477
17333
  "pay_package"] = jsi::Function::createFromHostFunction(
16478
17334
  rt,
@@ -16855,6 +17711,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16855
17711
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(
16856
17712
  rt, thisVal, args, count);
16857
17713
  });
17714
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_batch"] =
17715
+ jsi::Function::createFromHostFunction(
17716
+ rt,
17717
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17718
+ "breezsdk_prepare_send_batch"),
17719
+ 2,
17720
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17721
+ const jsi::Value *args, size_t count) -> jsi::Value {
17722
+ return this
17723
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_batch(
17724
+ rt, thisVal, args, count);
17725
+ });
16858
17726
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment"] =
16859
17727
  jsi::Function::createFromHostFunction(
16860
17728
  rt,
@@ -16867,6 +17735,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16867
17735
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
16868
17736
  rt, thisVal, args, count);
16869
17737
  });
17738
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_unilateral_"
17739
+ "exit"] = jsi::Function::createFromHostFunction(
17740
+ rt,
17741
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17742
+ "breezsdk_prepare_unilateral_exit"),
17743
+ 2,
17744
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17745
+ const jsi::Value *args, size_t count) -> jsi::Value {
17746
+ return this
17747
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_unilateral_exit(
17748
+ rt, thisVal, args, count);
17749
+ });
16870
17750
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_"
16871
17751
  "pay_package"] = jsi::Function::createFromHostFunction(
16872
17752
  rt,
@@ -16978,6 +17858,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
16978
17858
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
16979
17859
  rt, thisVal, args, count);
16980
17860
  });
17861
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_batch"] =
17862
+ jsi::Function::createFromHostFunction(
17863
+ rt,
17864
+ jsi::PropNameID::forAscii(
17865
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_batch"),
17866
+ 2,
17867
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17868
+ const jsi::Value *args, size_t count) -> jsi::Value {
17869
+ return this
17870
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_batch(
17871
+ rt, thisVal, args, count);
17872
+ });
16981
17873
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment"] =
16982
17874
  jsi::Function::createFromHostFunction(
16983
17875
  rt,
@@ -17016,6 +17908,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17016
17908
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
17017
17909
  rt, thisVal, args, count);
17018
17910
  });
17911
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_unilateral_exit"] =
17912
+ jsi::Function::createFromHostFunction(
17913
+ rt,
17914
+ jsi::PropNameID::forAscii(
17915
+ rt,
17916
+ "ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_unilateral_exit"),
17917
+ 3,
17918
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17919
+ const jsi::Value *args, size_t count) -> jsi::Value {
17920
+ return this
17921
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_unilateral_exit(
17922
+ rt, thisVal, args, count);
17923
+ });
17019
17924
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_unregister_webhook"] =
17020
17925
  jsi::Function::createFromHostFunction(
17021
17926
  rt,
@@ -17053,6 +17958,53 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17053
17958
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
17054
17959
  rt, thisVal, args, count);
17055
17960
  });
17961
+ props["ubrn_uniffi_breez_sdk_spark_fn_clone_cpfpsigner"] =
17962
+ jsi::Function::createFromHostFunction(
17963
+ rt,
17964
+ jsi::PropNameID::forAscii(
17965
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_clone_cpfpsigner"),
17966
+ 1,
17967
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17968
+ const jsi::Value *args, size_t count) -> jsi::Value {
17969
+ return this->cpp_uniffi_breez_sdk_spark_fn_clone_cpfpsigner(
17970
+ rt, thisVal, args, count);
17971
+ });
17972
+ props["ubrn_uniffi_breez_sdk_spark_fn_free_cpfpsigner"] =
17973
+ jsi::Function::createFromHostFunction(
17974
+ rt,
17975
+ jsi::PropNameID::forAscii(
17976
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_free_cpfpsigner"),
17977
+ 1,
17978
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17979
+ const jsi::Value *args, size_t count) -> jsi::Value {
17980
+ return this->cpp_uniffi_breez_sdk_spark_fn_free_cpfpsigner(
17981
+ rt, thisVal, args, count);
17982
+ });
17983
+ props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_cpfpsigner"] =
17984
+ jsi::Function::createFromHostFunction(
17985
+ rt,
17986
+ jsi::PropNameID::forAscii(
17987
+ rt,
17988
+ "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_cpfpsigner"),
17989
+ 1,
17990
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17991
+ const jsi::Value *args, size_t count) -> jsi::Value {
17992
+ return this
17993
+ ->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_cpfpsigner(
17994
+ rt, thisVal, args, count);
17995
+ });
17996
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_cpfpsigner_sign_psbt"] =
17997
+ jsi::Function::createFromHostFunction(
17998
+ rt,
17999
+ jsi::PropNameID::forAscii(
18000
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_method_cpfpsigner_sign_psbt"),
18001
+ 2,
18002
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
18003
+ const jsi::Value *args, size_t count) -> jsi::Value {
18004
+ return this
18005
+ ->cpp_uniffi_breez_sdk_spark_fn_method_cpfpsigner_sign_psbt(
18006
+ rt, thisVal, args, count);
18007
+ });
17056
18008
  props["ubrn_uniffi_breez_sdk_spark_fn_clone_externalbreezsigner"] =
17057
18009
  jsi::Function::createFromHostFunction(
17058
18010
  rt,
@@ -17369,6 +18321,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17369
18321
  ->cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_message(
17370
18322
  rt, thisVal, args, count);
17371
18323
  });
18324
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_leaf_"
18325
+ "refund_spend"] = jsi::Function::createFromHostFunction(
18326
+ rt,
18327
+ jsi::PropNameID::forAscii(rt,
18328
+ "ubrn_uniffi_breez_sdk_spark_fn_method_"
18329
+ "externalsparksigner_sign_leaf_refund_spend"),
18330
+ 3,
18331
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
18332
+ const jsi::Value *args, size_t count) -> jsi::Value {
18333
+ return this
18334
+ ->cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_leaf_refund_spend(
18335
+ rt, thisVal, args, count);
18336
+ });
17372
18337
  props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_"
17373
18338
  "frost"] = jsi::Function::createFromHostFunction(
17374
18339
  rt,
@@ -17819,7 +18784,7 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17819
18784
  rt,
17820
18785
  jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17821
18786
  "prfprovider_create_passkey"),
17822
- 2,
18787
+ 3,
17823
18788
  [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17824
18789
  const jsi::Value *args, size_t count) -> jsi::Value {
17825
18790
  return this
@@ -18960,6 +19925,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
18960
19925
  ->cpp_uniffi_breez_sdk_spark_fn_func_new_shared_sdk_context(
18961
19926
  rt, thisVal, args, count);
18962
19927
  });
19928
+ props["ubrn_uniffi_breez_sdk_spark_fn_func_single_key_cpfp_signer"] =
19929
+ jsi::Function::createFromHostFunction(
19930
+ rt,
19931
+ jsi::PropNameID::forAscii(
19932
+ rt, "ubrn_uniffi_breez_sdk_spark_fn_func_single_key_cpfp_signer"),
19933
+ 1,
19934
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19935
+ const jsi::Value *args, size_t count) -> jsi::Value {
19936
+ return this
19937
+ ->cpp_uniffi_breez_sdk_spark_fn_func_single_key_cpfp_signer(
19938
+ rt, thisVal, args, count);
19939
+ });
18963
19940
  props["ubrn_ffi_breez_sdk_spark_rust_future_poll_u8"] =
18964
19941
  jsi::Function::createFromHostFunction(
18965
19942
  rt,
@@ -19712,6 +20689,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19712
20689
  ->cpp_uniffi_breez_sdk_spark_checksum_func_new_shared_sdk_context(
19713
20690
  rt, thisVal, args, count);
19714
20691
  });
20692
+ props["ubrn_uniffi_breez_sdk_spark_checksum_func_single_key_cpfp_signer"] =
20693
+ jsi::Function::createFromHostFunction(
20694
+ rt,
20695
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
20696
+ "func_single_key_cpfp_signer"),
20697
+ 0,
20698
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20699
+ const jsi::Value *args, size_t count) -> jsi::Value {
20700
+ return this
20701
+ ->cpp_uniffi_breez_sdk_spark_checksum_func_single_key_cpfp_signer(
20702
+ rt, thisVal, args, count);
20703
+ });
19715
20704
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_"
19716
20705
  "address_utxos"] = jsi::Function::createFromHostFunction(
19717
20706
  rt,
@@ -19725,6 +20714,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19725
20714
  ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos(
19726
20715
  rt, thisVal, args, count);
19727
20716
  });
20717
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_"
20718
+ "address_txos"] = jsi::Function::createFromHostFunction(
20719
+ rt,
20720
+ jsi::PropNameID::forAscii(rt,
20721
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
20722
+ "bitcoinchainservice_get_address_txos"),
20723
+ 0,
20724
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20725
+ const jsi::Value *args, size_t count) -> jsi::Value {
20726
+ return this
20727
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_txos(
20728
+ rt, thisVal, args, count);
20729
+ });
19728
20730
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_"
19729
20731
  "transaction_status"] = jsi::Function::createFromHostFunction(
19730
20732
  rt,
@@ -19751,6 +20753,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19751
20753
  ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex(
19752
20754
  rt, thisVal, args, count);
19753
20755
  });
20756
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_"
20757
+ "outspend"] = jsi::Function::createFromHostFunction(
20758
+ rt,
20759
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
20760
+ "method_bitcoinchainservice_get_outspend"),
20761
+ 0,
20762
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20763
+ const jsi::Value *args, size_t count) -> jsi::Value {
20764
+ return this
20765
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_outspend(
20766
+ rt, thisVal, args, count);
20767
+ });
19754
20768
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_"
19755
20769
  "broadcast_transaction"] = jsi::Function::createFromHostFunction(
19756
20770
  rt,
@@ -19814,6 +20828,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19814
20828
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_authorize_lightning_address_transfer(
19815
20829
  rt, thisVal, args, count);
19816
20830
  });
20831
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_"
20832
+ "batch_package"] = jsi::Function::createFromHostFunction(
20833
+ rt,
20834
+ jsi::PropNameID::forAscii(rt,
20835
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
20836
+ "breezsdk_build_unsigned_batch_package"),
20837
+ 0,
20838
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
20839
+ const jsi::Value *args, size_t count) -> jsi::Value {
20840
+ return this
20841
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_batch_package(
20842
+ rt, thisVal, args, count);
20843
+ });
19817
20844
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_"
19818
20845
  "lnurl_pay_package"] = jsi::Function::createFromHostFunction(
19819
20846
  rt,
@@ -20192,6 +21219,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20192
21219
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay(
20193
21220
  rt, thisVal, args, count);
20194
21221
  });
21222
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_"
21223
+ "batch"] = jsi::Function::createFromHostFunction(
21224
+ rt,
21225
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
21226
+ "method_breezsdk_prepare_send_batch"),
21227
+ 0,
21228
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21229
+ const jsi::Value *args, size_t count) -> jsi::Value {
21230
+ return this
21231
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_batch(
21232
+ rt, thisVal, args, count);
21233
+ });
20195
21234
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_"
20196
21235
  "payment"] = jsi::Function::createFromHostFunction(
20197
21236
  rt,
@@ -20204,6 +21243,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20204
21243
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment(
20205
21244
  rt, thisVal, args, count);
20206
21245
  });
21246
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_"
21247
+ "unilateral_exit"] = jsi::Function::createFromHostFunction(
21248
+ rt,
21249
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
21250
+ "method_breezsdk_prepare_unilateral_exit"),
21251
+ 0,
21252
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21253
+ const jsi::Value *args, size_t count) -> jsi::Value {
21254
+ return this
21255
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_unilateral_exit(
21256
+ rt, thisVal, args, count);
21257
+ });
20207
21258
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_"
20208
21259
  "lnurl_pay_package"] = jsi::Function::createFromHostFunction(
20209
21260
  rt,
@@ -20316,6 +21367,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20316
21367
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener(
20317
21368
  rt, thisVal, args, count);
20318
21369
  });
21370
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_batch"] =
21371
+ jsi::Function::createFromHostFunction(
21372
+ rt,
21373
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
21374
+ "method_breezsdk_send_batch"),
21375
+ 0,
21376
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21377
+ const jsi::Value *args, size_t count) -> jsi::Value {
21378
+ return this
21379
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_batch(
21380
+ rt, thisVal, args, count);
21381
+ });
20319
21382
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment"] =
20320
21383
  jsi::Function::createFromHostFunction(
20321
21384
  rt,
@@ -20352,6 +21415,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20352
21415
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
20353
21416
  rt, thisVal, args, count);
20354
21417
  });
21418
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_unilateral_"
21419
+ "exit"] = jsi::Function::createFromHostFunction(
21420
+ rt,
21421
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
21422
+ "method_breezsdk_unilateral_exit"),
21423
+ 0,
21424
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21425
+ const jsi::Value *args, size_t count) -> jsi::Value {
21426
+ return this
21427
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_unilateral_exit(
21428
+ rt, thisVal, args, count);
21429
+ });
20355
21430
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_unregister_"
20356
21431
  "webhook"] = jsi::Function::createFromHostFunction(
20357
21432
  rt,
@@ -20388,6 +21463,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20388
21463
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings(
20389
21464
  rt, thisVal, args, count);
20390
21465
  });
21466
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_cpfpsigner_sign_psbt"] =
21467
+ jsi::Function::createFromHostFunction(
21468
+ rt,
21469
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
21470
+ "method_cpfpsigner_sign_psbt"),
21471
+ 0,
21472
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21473
+ const jsi::Value *args, size_t count) -> jsi::Value {
21474
+ return this
21475
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_cpfpsigner_sign_psbt(
21476
+ rt, thisVal, args, count);
21477
+ });
20391
21478
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalbreezsigner_"
20392
21479
  "derive_public_key"] = jsi::Function::createFromHostFunction(
20393
21480
  rt,
@@ -20602,6 +21689,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
20602
21689
  ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_message(
20603
21690
  rt, thisVal, args, count);
20604
21691
  });
21692
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_"
21693
+ "leaf_refund_spend"] = jsi::Function::createFromHostFunction(
21694
+ rt,
21695
+ jsi::PropNameID::forAscii(rt,
21696
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
21697
+ "externalsparksigner_sign_leaf_refund_spend"),
21698
+ 0,
21699
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21700
+ const jsi::Value *args, size_t count) -> jsi::Value {
21701
+ return this
21702
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_leaf_refund_spend(
21703
+ rt, thisVal, args, count);
21704
+ });
20605
21705
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_"
20606
21706
  "frost"] = jsi::Function::createFromHostFunction(
20607
21707
  rt,
@@ -21689,6 +22789,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
21689
22789
  ->cpp_uniffi_internal_fn_method_breezsdk_ffi__bless_pointer(
21690
22790
  rt, thisVal, args, count);
21691
22791
  });
22792
+ props["ubrn_uniffi_internal_fn_method_cpfpsigner_ffi__bless_pointer"] =
22793
+ jsi::Function::createFromHostFunction(
22794
+ rt,
22795
+ jsi::PropNameID::forAscii(
22796
+ rt,
22797
+ "ubrn_uniffi_internal_fn_method_cpfpsigner_ffi__bless_pointer"),
22798
+ 1,
22799
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
22800
+ const jsi::Value *args, size_t count) -> jsi::Value {
22801
+ return this
22802
+ ->cpp_uniffi_internal_fn_method_cpfpsigner_ffi__bless_pointer(
22803
+ rt, thisVal, args, count);
22804
+ });
21692
22805
  props["ubrn_uniffi_internal_fn_method_externalbreezsigner_ffi__bless_"
21693
22806
  "pointer"] = jsi::Function::createFromHostFunction(
21694
22807
  rt,
@@ -21937,6 +23050,8 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
21937
23050
  vtablecallbackinterfacelogger::free::cleanup();
21938
23051
  uniffi::breez_sdk_spark::st::vtablecallbackinterfacebitcoinchainservice::
21939
23052
  vtablecallbackinterfacebitcoinchainservice::free::cleanup();
23053
+ uniffi::breez_sdk_spark::st::vtablecallbackinterfacecpfpsigner::
23054
+ vtablecallbackinterfacecpfpsigner::free::cleanup();
21940
23055
  uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalbreezsigner::
21941
23056
  vtablecallbackinterfaceexternalbreezsigner::free::cleanup();
21942
23057
  uniffi::breez_sdk_spark::st::vtablecallbackinterfaceexternalsigningsigner::
@@ -21976,6 +23091,14 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
21976
23091
  // Cleanup for callback function CallbackInterfaceBitcoinChainServiceMethod4
21977
23092
  uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod4::
21978
23093
  cleanup();
23094
+ // Cleanup for callback function CallbackInterfaceBitcoinChainServiceMethod5
23095
+ uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod5::
23096
+ cleanup();
23097
+ // Cleanup for callback function CallbackInterfaceBitcoinChainServiceMethod6
23098
+ uniffi::breez_sdk_spark::cb::callbackinterfacebitcoinchainservicemethod6::
23099
+ cleanup();
23100
+ // Cleanup for callback function CallbackInterfaceCpfpSignerMethod0
23101
+ uniffi::breez_sdk_spark::cb::callbackinterfacecpfpsignermethod0::cleanup();
21979
23102
  // Cleanup for callback function CallbackInterfaceExternalBreezSignerMethod0
21980
23103
  uniffi::breez_sdk_spark::cb::callbackinterfaceexternalbreezsignermethod0::
21981
23104
  cleanup();
@@ -22057,6 +23180,9 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
22057
23180
  // Cleanup for callback function CallbackInterfaceExternalSparkSignerMethod15
22058
23181
  uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod15::
22059
23182
  cleanup();
23183
+ // Cleanup for callback function CallbackInterfaceExternalSparkSignerMethod16
23184
+ uniffi::breez_sdk_spark::cb::callbackinterfaceexternalsparksignermethod16::
23185
+ cleanup();
22060
23186
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod0
22061
23187
  uniffi::breez_sdk_spark::cb::callbackinterfacefiatservicemethod0::cleanup();
22062
23188
  // Cleanup for callback function CallbackInterfaceFiatServiceMethod1
@@ -22203,6 +23329,22 @@ NativeBreezSdkSpark::cpp_uniffi_internal_fn_method_breezsdk_ffi__bless_pointer(
22203
23329
  auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
22204
23330
  return jsi::Value(rt, obj);
22205
23331
  }
23332
+ jsi::Value NativeBreezSdkSpark::
23333
+ cpp_uniffi_internal_fn_method_cpfpsigner_ffi__bless_pointer(
23334
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23335
+ size_t count) {
23336
+ auto pointer =
23337
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
23338
+ auto static destructor = [](uint64_t p) {
23339
+ auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
23340
+ RustCallStatus status = {0};
23341
+ uniffi_breez_sdk_spark_fn_free_cpfpsigner(pointer, &status);
23342
+ };
23343
+ auto ptrObj =
23344
+ std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
23345
+ auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
23346
+ return jsi::Value(rt, obj);
23347
+ }
22206
23348
  jsi::Value NativeBreezSdkSpark::
22207
23349
  cpp_uniffi_internal_fn_method_externalbreezsigner_ffi__bless_pointer(
22208
23350
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -22515,6 +23657,19 @@ jsi::Value NativeBreezSdkSpark::
22515
23657
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
22516
23658
  value);
22517
23659
  }
23660
+ jsi::Value NativeBreezSdkSpark::
23661
+ cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_txos(
23662
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23663
+ size_t count) {
23664
+ auto value =
23665
+ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_txos(
23666
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23667
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23668
+ args[1]));
23669
+
23670
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23671
+ value);
23672
+ }
22518
23673
  jsi::Value NativeBreezSdkSpark::
22519
23674
  cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_status(
22520
23675
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -22541,6 +23696,20 @@ jsi::Value NativeBreezSdkSpark::
22541
23696
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
22542
23697
  value);
22543
23698
  }
23699
+ jsi::Value NativeBreezSdkSpark::
23700
+ cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_outspend(
23701
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23702
+ size_t count) {
23703
+ auto value =
23704
+ uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_outspend(
23705
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23706
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23707
+ args[1]),
23708
+ uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[2]));
23709
+
23710
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23711
+ value);
23712
+ }
22544
23713
  jsi::Value NativeBreezSdkSpark::
22545
23714
  cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(
22546
23715
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -22625,6 +23794,19 @@ jsi::Value NativeBreezSdkSpark::
22625
23794
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
22626
23795
  value);
22627
23796
  }
23797
+ jsi::Value NativeBreezSdkSpark::
23798
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_batch_package(
23799
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23800
+ size_t count) {
23801
+ auto value =
23802
+ uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_batch_package(
23803
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
23804
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
23805
+ args[1]));
23806
+
23807
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23808
+ value);
23809
+ }
22628
23810
  jsi::Value NativeBreezSdkSpark::
22629
23811
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_build_unsigned_lnurl_pay_package(
22630
23812
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -22991,6 +24173,18 @@ jsi::Value NativeBreezSdkSpark::
22991
24173
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
22992
24174
  value);
22993
24175
  }
24176
+ jsi::Value NativeBreezSdkSpark::
24177
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_batch(
24178
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24179
+ size_t count) {
24180
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_batch(
24181
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24182
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24183
+ args[1]));
24184
+
24185
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24186
+ value);
24187
+ }
22994
24188
  jsi::Value NativeBreezSdkSpark::
22995
24189
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
22996
24190
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -23003,6 +24197,19 @@ jsi::Value NativeBreezSdkSpark::
23003
24197
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23004
24198
  value);
23005
24199
  }
24200
+ jsi::Value NativeBreezSdkSpark::
24201
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_unilateral_exit(
24202
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24203
+ size_t count) {
24204
+ auto value =
24205
+ uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_unilateral_exit(
24206
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24207
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24208
+ args[1]));
24209
+
24210
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24211
+ value);
24212
+ }
23006
24213
  jsi::Value NativeBreezSdkSpark::
23007
24214
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_publish_signed_lnurl_pay_package(
23008
24215
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -23112,6 +24319,18 @@ jsi::Value NativeBreezSdkSpark::
23112
24319
  value);
23113
24320
  }
23114
24321
  jsi::Value
24322
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_batch(
24323
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24324
+ size_t count) {
24325
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_send_batch(
24326
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24327
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24328
+ args[1]));
24329
+
24330
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24331
+ value);
24332
+ }
24333
+ jsi::Value
23115
24334
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(
23116
24335
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
23117
24336
  size_t count) {
@@ -23147,6 +24366,19 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
23147
24366
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23148
24367
  value);
23149
24368
  }
24369
+ jsi::Value NativeBreezSdkSpark::
24370
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_unilateral_exit(
24371
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24372
+ size_t count) {
24373
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_unilateral_exit(
24374
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24375
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24376
+ args[1]),
24377
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[2]));
24378
+
24379
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24380
+ value);
24381
+ }
23150
24382
  jsi::Value NativeBreezSdkSpark::
23151
24383
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_unregister_webhook(
23152
24384
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -23183,6 +24415,57 @@ jsi::Value NativeBreezSdkSpark::
23183
24415
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23184
24416
  value);
23185
24417
  }
24418
+ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_cpfpsigner(
24419
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24420
+ size_t count) {
24421
+ RustCallStatus status =
24422
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
24423
+ auto value = uniffi_breez_sdk_spark_fn_clone_cpfpsigner(
24424
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
24425
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
24426
+ rt, callInvoker, status, args[count - 1]);
24427
+
24428
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
24429
+ }
24430
+ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_cpfpsigner(
24431
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24432
+ size_t count) {
24433
+ RustCallStatus status =
24434
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
24435
+ uniffi_breez_sdk_spark_fn_free_cpfpsigner(
24436
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
24437
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
24438
+ rt, callInvoker, status, args[count - 1]);
24439
+
24440
+ return jsi::Value::undefined();
24441
+ }
24442
+ jsi::Value NativeBreezSdkSpark::
24443
+ cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_cpfpsigner(
24444
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24445
+ size_t count) {
24446
+ auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
24447
+ UniffiVTableCallbackInterfaceCpfpSigner>::fromJs(rt, callInvoker,
24448
+ args[0]);
24449
+
24450
+ std::lock_guard<std::mutex> lock(
24451
+ uniffi::breez_sdk_spark::registry::vtableMutex);
24452
+ uniffi_breez_sdk_spark_fn_init_callback_vtable_cpfpsigner(
24453
+ uniffi::breez_sdk_spark::registry::putTable(
24454
+ "UniffiVTableCallbackInterfaceCpfpSigner", vtableInstance));
24455
+ return jsi::Value::undefined();
24456
+ }
24457
+ jsi::Value
24458
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_cpfpsigner_sign_psbt(
24459
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24460
+ size_t count) {
24461
+ auto value = uniffi_breez_sdk_spark_fn_method_cpfpsigner_sign_psbt(
24462
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24463
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24464
+ args[1]));
24465
+
24466
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24467
+ value);
24468
+ }
23186
24469
  jsi::Value
23187
24470
  NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_externalbreezsigner(
23188
24471
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -23542,6 +24825,21 @@ jsi::Value NativeBreezSdkSpark::
23542
24825
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
23543
24826
  value);
23544
24827
  }
24828
+ jsi::Value NativeBreezSdkSpark::
24829
+ cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_leaf_refund_spend(
24830
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24831
+ size_t count) {
24832
+ auto value =
24833
+ uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_leaf_refund_spend(
24834
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24835
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24836
+ args[1]),
24837
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24838
+ args[2]));
24839
+
24840
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24841
+ value);
24842
+ }
23545
24843
  jsi::Value NativeBreezSdkSpark::
23546
24844
  cpp_uniffi_breez_sdk_spark_fn_method_externalsparksigner_sign_frost(
23547
24845
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -24017,7 +25315,9 @@ jsi::Value NativeBreezSdkSpark::
24017
25315
  auto value = uniffi_breez_sdk_spark_fn_method_prfprovider_create_passkey(
24018
25316
  uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24019
25317
  uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24020
- args[1]));
25318
+ args[1]),
25319
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
25320
+ args[2]));
24021
25321
 
24022
25322
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24023
25323
  value);
@@ -25239,6 +26539,21 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_new_shared_sdk_context(
25239
26539
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
25240
26540
  value);
25241
26541
  }
26542
+ jsi::Value
26543
+ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_single_key_cpfp_signer(
26544
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26545
+ size_t count) {
26546
+ RustCallStatus status =
26547
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
26548
+ auto value = uniffi_breez_sdk_spark_fn_func_single_key_cpfp_signer(
26549
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
26550
+ args[0]),
26551
+ &status);
26552
+ uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
26553
+ rt, callInvoker, status, args[count - 1]);
26554
+
26555
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
26556
+ }
25242
26557
  jsi::Value NativeBreezSdkSpark::cpp_ffi_breez_sdk_spark_rust_future_poll_u8(
25243
26558
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
25244
26559
  size_t count) {
@@ -25977,6 +27292,14 @@ jsi::Value NativeBreezSdkSpark::
25977
27292
 
25978
27293
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
25979
27294
  }
27295
+ jsi::Value NativeBreezSdkSpark::
27296
+ cpp_uniffi_breez_sdk_spark_checksum_func_single_key_cpfp_signer(
27297
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27298
+ size_t count) {
27299
+ auto value = uniffi_breez_sdk_spark_checksum_func_single_key_cpfp_signer();
27300
+
27301
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27302
+ }
25980
27303
  jsi::Value NativeBreezSdkSpark::
25981
27304
  cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos(
25982
27305
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -25986,6 +27309,15 @@ jsi::Value NativeBreezSdkSpark::
25986
27309
 
25987
27310
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
25988
27311
  }
27312
+ jsi::Value NativeBreezSdkSpark::
27313
+ cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_txos(
27314
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27315
+ size_t count) {
27316
+ auto value =
27317
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_txos();
27318
+
27319
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27320
+ }
25989
27321
  jsi::Value NativeBreezSdkSpark::
25990
27322
  cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status(
25991
27323
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26004,6 +27336,15 @@ jsi::Value NativeBreezSdkSpark::
26004
27336
 
26005
27337
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26006
27338
  }
27339
+ jsi::Value NativeBreezSdkSpark::
27340
+ cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_outspend(
27341
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27342
+ size_t count) {
27343
+ auto value =
27344
+ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_outspend();
27345
+
27346
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27347
+ }
26007
27348
  jsi::Value NativeBreezSdkSpark::
26008
27349
  cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction(
26009
27350
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26048,6 +27389,15 @@ jsi::Value NativeBreezSdkSpark::
26048
27389
 
26049
27390
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26050
27391
  }
27392
+ jsi::Value NativeBreezSdkSpark::
27393
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_batch_package(
27394
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27395
+ size_t count) {
27396
+ auto value =
27397
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_batch_package();
27398
+
27399
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27400
+ }
26051
27401
  jsi::Value NativeBreezSdkSpark::
26052
27402
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_build_unsigned_lnurl_pay_package(
26053
27403
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26313,6 +27663,15 @@ jsi::Value NativeBreezSdkSpark::
26313
27663
 
26314
27664
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26315
27665
  }
27666
+ jsi::Value NativeBreezSdkSpark::
27667
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_batch(
27668
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27669
+ size_t count) {
27670
+ auto value =
27671
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_batch();
27672
+
27673
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27674
+ }
26316
27675
  jsi::Value NativeBreezSdkSpark::
26317
27676
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment(
26318
27677
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26322,6 +27681,15 @@ jsi::Value NativeBreezSdkSpark::
26322
27681
 
26323
27682
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26324
27683
  }
27684
+ jsi::Value NativeBreezSdkSpark::
27685
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_unilateral_exit(
27686
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27687
+ size_t count) {
27688
+ auto value =
27689
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_unilateral_exit();
27690
+
27691
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27692
+ }
26325
27693
  jsi::Value NativeBreezSdkSpark::
26326
27694
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_publish_signed_lnurl_pay_package(
26327
27695
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26402,6 +27770,14 @@ jsi::Value NativeBreezSdkSpark::
26402
27770
 
26403
27771
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26404
27772
  }
27773
+ jsi::Value NativeBreezSdkSpark::
27774
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_batch(
27775
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27776
+ size_t count) {
27777
+ auto value = uniffi_breez_sdk_spark_checksum_method_breezsdk_send_batch();
27778
+
27779
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27780
+ }
26405
27781
  jsi::Value NativeBreezSdkSpark::
26406
27782
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment(
26407
27783
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26426,6 +27802,15 @@ jsi::Value NativeBreezSdkSpark::
26426
27802
 
26427
27803
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26428
27804
  }
27805
+ jsi::Value NativeBreezSdkSpark::
27806
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_unilateral_exit(
27807
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27808
+ size_t count) {
27809
+ auto value =
27810
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_unilateral_exit();
27811
+
27812
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27813
+ }
26429
27814
  jsi::Value NativeBreezSdkSpark::
26430
27815
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_unregister_webhook(
26431
27816
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26452,6 +27837,14 @@ jsi::Value NativeBreezSdkSpark::
26452
27837
 
26453
27838
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26454
27839
  }
27840
+ jsi::Value NativeBreezSdkSpark::
27841
+ cpp_uniffi_breez_sdk_spark_checksum_method_cpfpsigner_sign_psbt(
27842
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
27843
+ size_t count) {
27844
+ auto value = uniffi_breez_sdk_spark_checksum_method_cpfpsigner_sign_psbt();
27845
+
27846
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27847
+ }
26455
27848
  jsi::Value NativeBreezSdkSpark::
26456
27849
  cpp_uniffi_breez_sdk_spark_checksum_method_externalbreezsigner_derive_public_key(
26457
27850
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26605,6 +27998,15 @@ jsi::Value NativeBreezSdkSpark::
26605
27998
 
26606
27999
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
26607
28000
  }
28001
+ jsi::Value NativeBreezSdkSpark::
28002
+ cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_leaf_refund_spend(
28003
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
28004
+ size_t count) {
28005
+ auto value =
28006
+ uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_leaf_refund_spend();
28007
+
28008
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
28009
+ }
26608
28010
  jsi::Value NativeBreezSdkSpark::
26609
28011
  cpp_uniffi_breez_sdk_spark_checksum_method_externalsparksigner_sign_frost(
26610
28012
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,