@breeztech/breez-sdk-spark-react-native 0.7.21 → 0.9.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.
- package/cpp/generated/breez_sdk_spark.cpp +681 -898
- package/cpp/generated/breez_sdk_spark.hpp +41 -50
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +260 -156
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +259 -155
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +57 -62
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +883 -554
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +57 -62
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +883 -554
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/generated/breez_sdk_spark-ffi.ts +70 -84
- package/src/generated/breez_sdk_spark.ts +2202 -1502
|
@@ -265,63 +265,63 @@ typedef void (*UniffiCallbackInterfaceStorageMethod7)(
|
|
|
265
265
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
266
266
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
267
267
|
typedef void (*UniffiCallbackInterfaceStorageMethod8)(
|
|
268
|
+
uint64_t uniffi_handle, RustBuffer parent_payment_ids,
|
|
269
|
+
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
270
|
+
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
271
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod9)(
|
|
268
272
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout,
|
|
269
273
|
uint64_t amount_sats,
|
|
270
274
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
271
275
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
272
|
-
typedef void (*
|
|
276
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod10)(
|
|
273
277
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout,
|
|
274
278
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
275
279
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
276
|
-
typedef void (*
|
|
280
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod11)(
|
|
277
281
|
uint64_t uniffi_handle,
|
|
278
282
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
279
283
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
280
|
-
typedef void (*
|
|
284
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod12)(
|
|
281
285
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout, RustBuffer payload,
|
|
282
286
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
283
287
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
284
|
-
typedef void (*
|
|
288
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod13)(
|
|
285
289
|
uint64_t uniffi_handle, RustBuffer metadata,
|
|
286
290
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
287
291
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
288
|
-
typedef void (*
|
|
292
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod14)(
|
|
289
293
|
uint64_t uniffi_handle, RustBuffer record,
|
|
290
294
|
UniffiForeignFutureCompleteU64 uniffi_future_callback,
|
|
291
295
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
292
|
-
typedef void (*
|
|
293
|
-
uint64_t uniffi_handle, RustBuffer record,
|
|
296
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod15)(
|
|
297
|
+
uint64_t uniffi_handle, RustBuffer record, uint64_t local_revision,
|
|
294
298
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
295
299
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
296
|
-
typedef void (*
|
|
300
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod16)(
|
|
297
301
|
uint64_t uniffi_handle, uint32_t limit,
|
|
298
302
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
299
303
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
300
|
-
typedef void (*
|
|
304
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod17)(
|
|
301
305
|
uint64_t uniffi_handle,
|
|
302
306
|
UniffiForeignFutureCompleteU64 uniffi_future_callback,
|
|
303
307
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
304
|
-
typedef void (*
|
|
308
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod18)(
|
|
305
309
|
uint64_t uniffi_handle, RustBuffer records,
|
|
306
310
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
307
311
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
308
|
-
typedef void (*
|
|
312
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod19)(
|
|
309
313
|
uint64_t uniffi_handle, RustBuffer record,
|
|
310
314
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
311
315
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
312
|
-
typedef void (*
|
|
313
|
-
uint64_t uniffi_handle, uint64_t revision,
|
|
314
|
-
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
315
|
-
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
316
|
-
typedef void (*UniffiCallbackInterfaceSyncStorageMethod7)(
|
|
316
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod20)(
|
|
317
317
|
uint64_t uniffi_handle, uint32_t limit,
|
|
318
318
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
319
319
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
320
|
-
typedef void (*
|
|
320
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod21)(
|
|
321
321
|
uint64_t uniffi_handle,
|
|
322
322
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
323
323
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
324
|
-
typedef void (*
|
|
324
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod22)(
|
|
325
325
|
uint64_t uniffi_handle, RustBuffer record,
|
|
326
326
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
327
327
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
@@ -386,29 +386,26 @@ typedef struct UniffiVTableCallbackInterfaceStorage {
|
|
|
386
386
|
UniffiCallbackInterfaceStorageMethod2 set_cached_item;
|
|
387
387
|
UniffiCallbackInterfaceStorageMethod3 list_payments;
|
|
388
388
|
UniffiCallbackInterfaceStorageMethod4 insert_payment;
|
|
389
|
-
UniffiCallbackInterfaceStorageMethod5
|
|
389
|
+
UniffiCallbackInterfaceStorageMethod5 insert_payment_metadata;
|
|
390
390
|
UniffiCallbackInterfaceStorageMethod6 get_payment_by_id;
|
|
391
391
|
UniffiCallbackInterfaceStorageMethod7 get_payment_by_invoice;
|
|
392
|
-
UniffiCallbackInterfaceStorageMethod8
|
|
393
|
-
UniffiCallbackInterfaceStorageMethod9
|
|
394
|
-
UniffiCallbackInterfaceStorageMethod10
|
|
395
|
-
UniffiCallbackInterfaceStorageMethod11
|
|
396
|
-
UniffiCallbackInterfaceStorageMethod12
|
|
392
|
+
UniffiCallbackInterfaceStorageMethod8 get_payments_by_parent_ids;
|
|
393
|
+
UniffiCallbackInterfaceStorageMethod9 add_deposit;
|
|
394
|
+
UniffiCallbackInterfaceStorageMethod10 delete_deposit;
|
|
395
|
+
UniffiCallbackInterfaceStorageMethod11 list_deposits;
|
|
396
|
+
UniffiCallbackInterfaceStorageMethod12 update_deposit;
|
|
397
|
+
UniffiCallbackInterfaceStorageMethod13 set_lnurl_metadata;
|
|
398
|
+
UniffiCallbackInterfaceStorageMethod14 add_outgoing_change;
|
|
399
|
+
UniffiCallbackInterfaceStorageMethod15 complete_outgoing_sync;
|
|
400
|
+
UniffiCallbackInterfaceStorageMethod16 get_pending_outgoing_changes;
|
|
401
|
+
UniffiCallbackInterfaceStorageMethod17 get_last_revision;
|
|
402
|
+
UniffiCallbackInterfaceStorageMethod18 insert_incoming_records;
|
|
403
|
+
UniffiCallbackInterfaceStorageMethod19 delete_incoming_record;
|
|
404
|
+
UniffiCallbackInterfaceStorageMethod20 get_incoming_records;
|
|
405
|
+
UniffiCallbackInterfaceStorageMethod21 get_latest_outgoing_change;
|
|
406
|
+
UniffiCallbackInterfaceStorageMethod22 update_record_from_incoming;
|
|
397
407
|
UniffiCallbackInterfaceFree uniffi_free;
|
|
398
408
|
} UniffiVTableCallbackInterfaceStorage;
|
|
399
|
-
typedef struct UniffiVTableCallbackInterfaceSyncStorage {
|
|
400
|
-
UniffiCallbackInterfaceSyncStorageMethod0 add_outgoing_change;
|
|
401
|
-
UniffiCallbackInterfaceSyncStorageMethod1 complete_outgoing_sync;
|
|
402
|
-
UniffiCallbackInterfaceSyncStorageMethod2 get_pending_outgoing_changes;
|
|
403
|
-
UniffiCallbackInterfaceSyncStorageMethod3 get_last_revision;
|
|
404
|
-
UniffiCallbackInterfaceSyncStorageMethod4 insert_incoming_records;
|
|
405
|
-
UniffiCallbackInterfaceSyncStorageMethod5 delete_incoming_record;
|
|
406
|
-
UniffiCallbackInterfaceSyncStorageMethod6 rebase_pending_outgoing_records;
|
|
407
|
-
UniffiCallbackInterfaceSyncStorageMethod7 get_incoming_records;
|
|
408
|
-
UniffiCallbackInterfaceSyncStorageMethod8 get_latest_outgoing_change;
|
|
409
|
-
UniffiCallbackInterfaceSyncStorageMethod9 update_record_from_incoming;
|
|
410
|
-
UniffiCallbackInterfaceFree uniffi_free;
|
|
411
|
-
} UniffiVTableCallbackInterfaceSyncStorage;
|
|
412
409
|
void *uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(
|
|
413
410
|
void *ptr, RustCallStatus *uniffi_out_err);
|
|
414
411
|
void uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
|
|
@@ -438,6 +435,9 @@ void uniffi_breez_sdk_spark_fn_free_breezsdk(void *ptr,
|
|
|
438
435
|
uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(void *ptr,
|
|
439
436
|
uint64_t listener);
|
|
440
437
|
/*handle*/ uint64_t
|
|
438
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin(void *ptr,
|
|
439
|
+
RustBuffer request);
|
|
440
|
+
/*handle*/ uint64_t
|
|
441
441
|
uniffi_breez_sdk_spark_fn_method_breezsdk_cancel_leaf_optimization(void *ptr);
|
|
442
442
|
/*handle*/ uint64_t
|
|
443
443
|
uniffi_breez_sdk_spark_fn_method_breezsdk_check_lightning_address_available(
|
|
@@ -657,9 +657,6 @@ uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
|
|
|
657
657
|
uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_payment_observer(
|
|
658
658
|
void *ptr, void *payment_observer);
|
|
659
659
|
/*handle*/ uint64_t
|
|
660
|
-
uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_real_time_sync_storage(
|
|
661
|
-
void *ptr, void *storage);
|
|
662
|
-
/*handle*/ uint64_t
|
|
663
660
|
uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
|
|
664
661
|
void *ptr, RustBuffer url, RustBuffer api_type, RustBuffer credentials);
|
|
665
662
|
/*handle*/ uint64_t
|
|
@@ -686,7 +683,7 @@ uniffi_breez_sdk_spark_fn_method_storage_list_payments(void *ptr,
|
|
|
686
683
|
uniffi_breez_sdk_spark_fn_method_storage_insert_payment(void *ptr,
|
|
687
684
|
RustBuffer payment);
|
|
688
685
|
/*handle*/ uint64_t
|
|
689
|
-
|
|
686
|
+
uniffi_breez_sdk_spark_fn_method_storage_insert_payment_metadata(
|
|
690
687
|
void *ptr, RustBuffer payment_id, RustBuffer metadata);
|
|
691
688
|
/*handle*/ uint64_t
|
|
692
689
|
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(void *ptr,
|
|
@@ -694,6 +691,9 @@ uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(void *ptr,
|
|
|
694
691
|
/*handle*/ uint64_t
|
|
695
692
|
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
696
693
|
void *ptr, RustBuffer invoice);
|
|
694
|
+
/*handle*/ uint64_t
|
|
695
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_payments_by_parent_ids(
|
|
696
|
+
void *ptr, RustBuffer parent_payment_ids);
|
|
697
697
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
698
698
|
void *ptr, RustBuffer txid, uint32_t vout, uint64_t amount_sats);
|
|
699
699
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_delete_deposit(
|
|
@@ -704,41 +704,30 @@ uniffi_breez_sdk_spark_fn_method_storage_list_deposits(void *ptr);
|
|
|
704
704
|
void *ptr, RustBuffer txid, uint32_t vout, RustBuffer payload);
|
|
705
705
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
|
|
706
706
|
void *ptr, RustBuffer metadata);
|
|
707
|
-
void *
|
|
708
|
-
uniffi_breez_sdk_spark_fn_clone_syncstorage(void *ptr,
|
|
709
|
-
RustCallStatus *uniffi_out_err);
|
|
710
|
-
void uniffi_breez_sdk_spark_fn_free_syncstorage(void *ptr,
|
|
711
|
-
RustCallStatus *uniffi_out_err);
|
|
712
|
-
void uniffi_breez_sdk_spark_fn_init_callback_vtable_syncstorage(
|
|
713
|
-
UniffiVTableCallbackInterfaceSyncStorage *vtable);
|
|
714
707
|
/*handle*/ uint64_t
|
|
715
|
-
|
|
716
|
-
|
|
708
|
+
uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(void *ptr,
|
|
709
|
+
RustBuffer record);
|
|
717
710
|
/*handle*/ uint64_t
|
|
718
|
-
|
|
719
|
-
void *ptr, RustBuffer record);
|
|
711
|
+
uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_sync(
|
|
712
|
+
void *ptr, RustBuffer record, uint64_t local_revision);
|
|
720
713
|
/*handle*/ uint64_t
|
|
721
|
-
|
|
714
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_changes(
|
|
722
715
|
void *ptr, uint32_t limit);
|
|
723
716
|
/*handle*/ uint64_t
|
|
724
|
-
|
|
717
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_last_revision(void *ptr);
|
|
725
718
|
/*handle*/ uint64_t
|
|
726
|
-
|
|
719
|
+
uniffi_breez_sdk_spark_fn_method_storage_insert_incoming_records(
|
|
727
720
|
void *ptr, RustBuffer records);
|
|
728
721
|
/*handle*/ uint64_t
|
|
729
|
-
|
|
722
|
+
uniffi_breez_sdk_spark_fn_method_storage_delete_incoming_record(
|
|
730
723
|
void *ptr, RustBuffer record);
|
|
731
724
|
/*handle*/ uint64_t
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
/*handle*/ uint64_t
|
|
735
|
-
uniffi_breez_sdk_spark_fn_method_syncstorage_get_incoming_records(
|
|
736
|
-
void *ptr, uint32_t limit);
|
|
725
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_incoming_records(void *ptr,
|
|
726
|
+
uint32_t limit);
|
|
737
727
|
/*handle*/ uint64_t
|
|
738
|
-
|
|
739
|
-
void *ptr);
|
|
728
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_latest_outgoing_change(void *ptr);
|
|
740
729
|
/*handle*/ uint64_t
|
|
741
|
-
|
|
730
|
+
uniffi_breez_sdk_spark_fn_method_storage_update_record_from_incoming(
|
|
742
731
|
void *ptr, RustBuffer record);
|
|
743
732
|
void *
|
|
744
733
|
uniffi_breez_sdk_spark_fn_clone_tokenissuer(void *ptr,
|
|
@@ -779,6 +768,7 @@ uniffi_breez_sdk_spark_fn_func_default_config(RustBuffer network,
|
|
|
779
768
|
void *uniffi_breez_sdk_spark_fn_func_default_external_signer(
|
|
780
769
|
RustBuffer mnemonic, RustBuffer passphrase, RustBuffer network,
|
|
781
770
|
RustBuffer key_set_config, RustCallStatus *uniffi_out_err);
|
|
771
|
+
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_func_get_spark_status();
|
|
782
772
|
void uniffi_breez_sdk_spark_fn_func_init_logging(
|
|
783
773
|
RustBuffer log_dir, RustBuffer app_logger, RustBuffer log_filter,
|
|
784
774
|
RustCallStatus *uniffi_out_err);
|
|
@@ -913,6 +903,7 @@ uint16_t uniffi_breez_sdk_spark_checksum_func_connect();
|
|
|
913
903
|
uint16_t uniffi_breez_sdk_spark_checksum_func_connect_with_signer();
|
|
914
904
|
uint16_t uniffi_breez_sdk_spark_checksum_func_default_config();
|
|
915
905
|
uint16_t uniffi_breez_sdk_spark_checksum_func_default_external_signer();
|
|
906
|
+
uint16_t uniffi_breez_sdk_spark_checksum_func_get_spark_status();
|
|
916
907
|
uint16_t uniffi_breez_sdk_spark_checksum_func_init_logging();
|
|
917
908
|
uint16_t
|
|
918
909
|
uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos();
|
|
@@ -925,6 +916,7 @@ uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction
|
|
|
925
916
|
uint16_t
|
|
926
917
|
uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees();
|
|
927
918
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener();
|
|
919
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin();
|
|
928
920
|
uint16_t
|
|
929
921
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_cancel_leaf_optimization();
|
|
930
922
|
uint16_t
|
|
@@ -1022,8 +1014,6 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client();
|
|
|
1022
1014
|
uint16_t
|
|
1023
1015
|
uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer();
|
|
1024
1016
|
uint16_t
|
|
1025
|
-
uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_real_time_sync_storage();
|
|
1026
|
-
uint16_t
|
|
1027
1017
|
uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service();
|
|
1028
1018
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage();
|
|
1029
1019
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_cached_item();
|
|
@@ -1031,34 +1021,33 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_cached_item();
|
|
|
1031
1021
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_cached_item();
|
|
1032
1022
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_payments();
|
|
1033
1023
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_insert_payment();
|
|
1034
|
-
uint16_t
|
|
1024
|
+
uint16_t
|
|
1025
|
+
uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata();
|
|
1035
1026
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id();
|
|
1036
1027
|
uint16_t
|
|
1037
1028
|
uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice();
|
|
1029
|
+
uint16_t
|
|
1030
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids();
|
|
1038
1031
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_deposit();
|
|
1039
1032
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit();
|
|
1040
1033
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_deposits();
|
|
1041
1034
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_update_deposit();
|
|
1042
1035
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata();
|
|
1036
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change();
|
|
1043
1037
|
uint16_t
|
|
1044
|
-
|
|
1045
|
-
uint16_t
|
|
1046
|
-
uniffi_breez_sdk_spark_checksum_method_syncstorage_complete_outgoing_sync();
|
|
1047
|
-
uint16_t
|
|
1048
|
-
uniffi_breez_sdk_spark_checksum_method_syncstorage_get_pending_outgoing_changes();
|
|
1049
|
-
uint16_t uniffi_breez_sdk_spark_checksum_method_syncstorage_get_last_revision();
|
|
1050
|
-
uint16_t
|
|
1051
|
-
uniffi_breez_sdk_spark_checksum_method_syncstorage_insert_incoming_records();
|
|
1038
|
+
uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync();
|
|
1052
1039
|
uint16_t
|
|
1053
|
-
|
|
1040
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes();
|
|
1041
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision();
|
|
1054
1042
|
uint16_t
|
|
1055
|
-
|
|
1043
|
+
uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records();
|
|
1056
1044
|
uint16_t
|
|
1057
|
-
|
|
1045
|
+
uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record();
|
|
1046
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records();
|
|
1058
1047
|
uint16_t
|
|
1059
|
-
|
|
1048
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change();
|
|
1060
1049
|
uint16_t
|
|
1061
|
-
|
|
1050
|
+
uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming();
|
|
1062
1051
|
uint16_t uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token();
|
|
1063
1052
|
uint16_t
|
|
1064
1053
|
uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token();
|
|
@@ -2438,118 +2427,6 @@ static void cleanup() {
|
|
|
2438
2427
|
}
|
|
2439
2428
|
} // namespace
|
|
2440
2429
|
// uniffi::breez_sdk_spark::st::vtablecallbackinterfacestorage::vtablecallbackinterfacestorage::free
|
|
2441
|
-
|
|
2442
|
-
// Callback function:
|
|
2443
|
-
// uniffi::breez_sdk_spark::st::vtablecallbackinterfacesyncstorage::vtablecallbackinterfacesyncstorage::free::UniffiCallbackInterfaceFree
|
|
2444
|
-
//
|
|
2445
|
-
// We have the following constraints:
|
|
2446
|
-
// - we need to pass a function pointer to Rust.
|
|
2447
|
-
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
2448
|
-
// - function pointers can't store state, so we can't use a lamda.
|
|
2449
|
-
//
|
|
2450
|
-
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
2451
|
-
// function calls the lambda, which itself calls the `body` which then calls
|
|
2452
|
-
// into JS.
|
|
2453
|
-
//
|
|
2454
|
-
// We then give the `callback` function pointer to Rust which will call the
|
|
2455
|
-
// lambda sometime in the future.
|
|
2456
|
-
namespace uniffi::breez_sdk_spark::st::vtablecallbackinterfacesyncstorage::
|
|
2457
|
-
vtablecallbackinterfacesyncstorage::free {
|
|
2458
|
-
using namespace facebook;
|
|
2459
|
-
|
|
2460
|
-
// We need to store a lambda in a global so we can call it from
|
|
2461
|
-
// a function pointer. The function pointer is passed to Rust.
|
|
2462
|
-
static std::function<void(uint64_t)> rsLambda = nullptr;
|
|
2463
|
-
|
|
2464
|
-
// This is the main body of the callback. It's called from the lambda,
|
|
2465
|
-
// which itself is called from the callback function which is passed to Rust.
|
|
2466
|
-
static void body(jsi::Runtime &rt,
|
|
2467
|
-
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
2468
|
-
std::shared_ptr<jsi::Value> callbackValue,
|
|
2469
|
-
uint64_t rs_handle) {
|
|
2470
|
-
|
|
2471
|
-
// Convert the arguments from Rust, into jsi::Values.
|
|
2472
|
-
// We'll use the Bridging class to do this…
|
|
2473
|
-
auto js_handle =
|
|
2474
|
-
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
|
|
2475
|
-
|
|
2476
|
-
// Now we are ready to call the callback.
|
|
2477
|
-
// We are already on the JS thread, because this `body` function was
|
|
2478
|
-
// invoked from the CallInvoker.
|
|
2479
|
-
try {
|
|
2480
|
-
// Getting the callback function
|
|
2481
|
-
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
2482
|
-
auto uniffiResult = cb.call(rt, js_handle);
|
|
2483
|
-
|
|
2484
|
-
} catch (const jsi::JSError &error) {
|
|
2485
|
-
std::cout << "Error in callback UniffiCallbackInterfaceFree: "
|
|
2486
|
-
<< error.what() << std::endl;
|
|
2487
|
-
throw error;
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
|
-
static void callback(uint64_t rs_handle) {
|
|
2492
|
-
// If the runtime has shutdown, then there is no point in trying to
|
|
2493
|
-
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
2494
|
-
//
|
|
2495
|
-
// Answer: the module destructor calls into callback `cleanup` method,
|
|
2496
|
-
// which nulls out the rsLamda.
|
|
2497
|
-
//
|
|
2498
|
-
// If rsLamda is null, then there is no runtime to call into.
|
|
2499
|
-
if (rsLambda == nullptr) {
|
|
2500
|
-
// This only occurs when destructors are calling into Rust free/drop,
|
|
2501
|
-
// which causes the JS callback to be dropped.
|
|
2502
|
-
return;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2505
|
-
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
2506
|
-
// are all in the lambda.
|
|
2507
|
-
rsLambda(rs_handle);
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
static UniffiCallbackInterfaceFree
|
|
2511
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::st::vtablecallbackinterfacesyncstorage::vtablecallbackinterfacesyncstorage::free
|
|
2512
|
-
jsi::Runtime &rt,
|
|
2513
|
-
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
2514
|
-
const jsi::Value &value) {
|
|
2515
|
-
if (rsLambda != nullptr) {
|
|
2516
|
-
// `makeCallbackFunction` is called in two circumstances:
|
|
2517
|
-
//
|
|
2518
|
-
// 1. at startup, when initializing callback interface vtables.
|
|
2519
|
-
// 2. when polling futures. This happens at least once per future that is
|
|
2520
|
-
// exposed to Javascript. We know that this is always the same function,
|
|
2521
|
-
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
2522
|
-
//
|
|
2523
|
-
// We can therefore return the callback function without making anything
|
|
2524
|
-
// new if we've been initialized already.
|
|
2525
|
-
return callback;
|
|
2526
|
-
}
|
|
2527
|
-
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
2528
|
-
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
2529
|
-
rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
|
|
2530
|
-
// We immediately make a lambda which will do the work of transforming the
|
|
2531
|
-
// arguments into JSI values and calling the callback.
|
|
2532
|
-
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
2533
|
-
[callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable {
|
|
2534
|
-
body(rt, callInvoker, callbackValue, rs_handle);
|
|
2535
|
-
};
|
|
2536
|
-
// We'll then call that lambda from the callInvoker which will
|
|
2537
|
-
// look after calling it on the correct thread.
|
|
2538
|
-
|
|
2539
|
-
callInvoker->invokeNonBlocking(rt, jsLambda);
|
|
2540
|
-
};
|
|
2541
|
-
return callback;
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
// This method is called from the destructor of NativeBreezSdkSpark, which only
|
|
2545
|
-
// happens when the jsi::Runtime is being destroyed.
|
|
2546
|
-
static void cleanup() {
|
|
2547
|
-
// The lambda holds a reference to the the Runtime, so when this is nulled
|
|
2548
|
-
// out, then the pointer will no longer be left dangling.
|
|
2549
|
-
rsLambda = nullptr;
|
|
2550
|
-
}
|
|
2551
|
-
} // namespace
|
|
2552
|
-
// uniffi::breez_sdk_spark::st::vtablecallbackinterfacesyncstorage::vtablecallbackinterfacesyncstorage::free
|
|
2553
2430
|
namespace uniffi::breez_sdk_spark {
|
|
2554
2431
|
using namespace facebook;
|
|
2555
2432
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
@@ -9386,8 +9263,8 @@ using namespace facebook;
|
|
|
9386
9263
|
|
|
9387
9264
|
// We need to store a lambda in a global so we can call it from
|
|
9388
9265
|
// a function pointer. The function pointer is passed to Rust.
|
|
9389
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
9390
|
-
|
|
9266
|
+
static std::function<void(uint64_t, RustBuffer,
|
|
9267
|
+
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
9391
9268
|
UniffiForeignFuture *)>
|
|
9392
9269
|
rsLambda = nullptr;
|
|
9393
9270
|
|
|
@@ -9396,9 +9273,8 @@ static std::function<void(uint64_t, RustBuffer, uint32_t, uint64_t,
|
|
|
9396
9273
|
static void body(jsi::Runtime &rt,
|
|
9397
9274
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
9398
9275
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
9399
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
9400
|
-
|
|
9401
|
-
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9276
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_parentPaymentIds,
|
|
9277
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
9402
9278
|
uint64_t rs_uniffiCallbackData,
|
|
9403
9279
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9404
9280
|
|
|
@@ -9406,14 +9282,12 @@ static void body(jsi::Runtime &rt,
|
|
|
9406
9282
|
// We'll use the Bridging class to do this…
|
|
9407
9283
|
auto js_uniffiHandle =
|
|
9408
9284
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
9409
|
-
auto
|
|
9410
|
-
rt, callInvoker,
|
|
9411
|
-
|
|
9412
|
-
auto
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
9416
|
-
rt, callInvoker, rs_uniffiFutureCallback);
|
|
9285
|
+
auto js_parentPaymentIds =
|
|
9286
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(rt, callInvoker,
|
|
9287
|
+
rs_parentPaymentIds);
|
|
9288
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
9289
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
9290
|
+
rs_uniffiFutureCallback);
|
|
9417
9291
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
9418
9292
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
9419
9293
|
|
|
@@ -9423,9 +9297,8 @@ static void body(jsi::Runtime &rt,
|
|
|
9423
9297
|
try {
|
|
9424
9298
|
// Getting the callback function
|
|
9425
9299
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
9426
|
-
auto uniffiResult =
|
|
9427
|
-
|
|
9428
|
-
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9300
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_parentPaymentIds,
|
|
9301
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9429
9302
|
|
|
9430
9303
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9431
9304
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
@@ -9438,11 +9311,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9438
9311
|
}
|
|
9439
9312
|
}
|
|
9440
9313
|
|
|
9441
|
-
static void
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9314
|
+
static void
|
|
9315
|
+
callback(uint64_t rs_uniffiHandle, RustBuffer rs_parentPaymentIds,
|
|
9316
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
9317
|
+
uint64_t rs_uniffiCallbackData,
|
|
9318
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9446
9319
|
// If the runtime has shutdown, then there is no point in trying to
|
|
9447
9320
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
9448
9321
|
//
|
|
@@ -9458,8 +9331,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
9458
9331
|
|
|
9459
9332
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
9460
9333
|
// are all in the lambda.
|
|
9461
|
-
rsLambda(rs_uniffiHandle,
|
|
9462
|
-
|
|
9334
|
+
rsLambda(rs_uniffiHandle, rs_parentPaymentIds, rs_uniffiFutureCallback,
|
|
9335
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9463
9336
|
}
|
|
9464
9337
|
|
|
9465
9338
|
static UniffiCallbackInterfaceStorageMethod8
|
|
@@ -9482,19 +9355,18 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
9482
9355
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
9483
9356
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
9484
9357
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
9485
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
9486
|
-
|
|
9487
|
-
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9358
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_parentPaymentIds,
|
|
9359
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
9488
9360
|
uint64_t rs_uniffiCallbackData,
|
|
9489
9361
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9490
9362
|
// We immediately make a lambda which will do the work of transforming the
|
|
9491
9363
|
// arguments into JSI values and calling the callback.
|
|
9492
9364
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
9493
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
9494
|
-
|
|
9365
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_parentPaymentIds,
|
|
9366
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9495
9367
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
9496
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
9497
|
-
|
|
9368
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
9369
|
+
rs_parentPaymentIds, rs_uniffiFutureCallback,
|
|
9498
9370
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9499
9371
|
};
|
|
9500
9372
|
// We'll then call that lambda from the callInvoker which will
|
|
@@ -9534,7 +9406,7 @@ using namespace facebook;
|
|
|
9534
9406
|
|
|
9535
9407
|
// We need to store a lambda in a global so we can call it from
|
|
9536
9408
|
// a function pointer. The function pointer is passed to Rust.
|
|
9537
|
-
static std::function<void(uint64_t, RustBuffer, uint32_t,
|
|
9409
|
+
static std::function<void(uint64_t, RustBuffer, uint32_t, uint64_t,
|
|
9538
9410
|
UniffiForeignFutureCompleteVoid, uint64_t,
|
|
9539
9411
|
UniffiForeignFuture *)>
|
|
9540
9412
|
rsLambda = nullptr;
|
|
@@ -9545,6 +9417,7 @@ static void body(jsi::Runtime &rt,
|
|
|
9545
9417
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
9546
9418
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
9547
9419
|
uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
|
|
9420
|
+
uint64_t rs_amountSats,
|
|
9548
9421
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9549
9422
|
uint64_t rs_uniffiCallbackData,
|
|
9550
9423
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -9556,6 +9429,8 @@ static void body(jsi::Runtime &rt,
|
|
|
9556
9429
|
auto js_txid = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
9557
9430
|
rt, callInvoker, rs_txid);
|
|
9558
9431
|
auto js_vout = uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_vout);
|
|
9432
|
+
auto js_amountSats =
|
|
9433
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_amountSats);
|
|
9559
9434
|
auto js_uniffiFutureCallback =
|
|
9560
9435
|
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
9561
9436
|
rt, callInvoker, rs_uniffiFutureCallback);
|
|
@@ -9568,8 +9443,9 @@ static void body(jsi::Runtime &rt,
|
|
|
9568
9443
|
try {
|
|
9569
9444
|
// Getting the callback function
|
|
9570
9445
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
9571
|
-
auto uniffiResult =
|
|
9572
|
-
|
|
9446
|
+
auto uniffiResult =
|
|
9447
|
+
cb.call(rt, js_uniffiHandle, js_txid, js_vout, js_amountSats,
|
|
9448
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9573
9449
|
|
|
9574
9450
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9575
9451
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
@@ -9583,7 +9459,7 @@ static void body(jsi::Runtime &rt,
|
|
|
9583
9459
|
}
|
|
9584
9460
|
|
|
9585
9461
|
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
9586
|
-
uint32_t rs_vout,
|
|
9462
|
+
uint32_t rs_vout, uint64_t rs_amountSats,
|
|
9587
9463
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9588
9464
|
uint64_t rs_uniffiCallbackData,
|
|
9589
9465
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -9602,8 +9478,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
9602
9478
|
|
|
9603
9479
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
9604
9480
|
// are all in the lambda.
|
|
9605
|
-
rsLambda(rs_uniffiHandle, rs_txid, rs_vout,
|
|
9606
|
-
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9481
|
+
rsLambda(rs_uniffiHandle, rs_txid, rs_vout, rs_amountSats,
|
|
9482
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9607
9483
|
}
|
|
9608
9484
|
|
|
9609
9485
|
static UniffiCallbackInterfaceStorageMethod9
|
|
@@ -9627,6 +9503,7 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
9627
9503
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
9628
9504
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
9629
9505
|
uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
|
|
9506
|
+
uint64_t rs_amountSats,
|
|
9630
9507
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9631
9508
|
uint64_t rs_uniffiCallbackData,
|
|
9632
9509
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -9634,11 +9511,11 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
9634
9511
|
// arguments into JSI values and calling the callback.
|
|
9635
9512
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
9636
9513
|
[callInvoker, callbackValue, rs_uniffiHandle, rs_txid, rs_vout,
|
|
9637
|
-
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9514
|
+
rs_amountSats, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9638
9515
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
9639
9516
|
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
|
|
9640
|
-
rs_vout,
|
|
9641
|
-
rs_uniffiOutReturn);
|
|
9517
|
+
rs_vout, rs_amountSats, rs_uniffiFutureCallback,
|
|
9518
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9642
9519
|
};
|
|
9643
9520
|
// We'll then call that lambda from the callInvoker which will
|
|
9644
9521
|
// look after calling it on the correct thread.
|
|
@@ -9677,8 +9554,9 @@ using namespace facebook;
|
|
|
9677
9554
|
|
|
9678
9555
|
// We need to store a lambda in a global so we can call it from
|
|
9679
9556
|
// a function pointer. The function pointer is passed to Rust.
|
|
9680
|
-
static std::function<void(uint64_t,
|
|
9681
|
-
uint64_t,
|
|
9557
|
+
static std::function<void(uint64_t, RustBuffer, uint32_t,
|
|
9558
|
+
UniffiForeignFutureCompleteVoid, uint64_t,
|
|
9559
|
+
UniffiForeignFuture *)>
|
|
9682
9560
|
rsLambda = nullptr;
|
|
9683
9561
|
|
|
9684
9562
|
// This is the main body of the callback. It's called from the lambda,
|
|
@@ -9686,8 +9564,8 @@ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
|
|
|
9686
9564
|
static void body(jsi::Runtime &rt,
|
|
9687
9565
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
9688
9566
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
9689
|
-
uint64_t rs_uniffiHandle,
|
|
9690
|
-
|
|
9567
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
|
|
9568
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9691
9569
|
uint64_t rs_uniffiCallbackData,
|
|
9692
9570
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9693
9571
|
|
|
@@ -9695,9 +9573,12 @@ static void body(jsi::Runtime &rt,
|
|
|
9695
9573
|
// We'll use the Bridging class to do this…
|
|
9696
9574
|
auto js_uniffiHandle =
|
|
9697
9575
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
9698
|
-
auto
|
|
9699
|
-
|
|
9700
|
-
|
|
9576
|
+
auto js_txid = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
9577
|
+
rt, callInvoker, rs_txid);
|
|
9578
|
+
auto js_vout = uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_vout);
|
|
9579
|
+
auto js_uniffiFutureCallback =
|
|
9580
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
9581
|
+
rt, callInvoker, rs_uniffiFutureCallback);
|
|
9701
9582
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
9702
9583
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
9703
9584
|
|
|
@@ -9707,8 +9588,8 @@ static void body(jsi::Runtime &rt,
|
|
|
9707
9588
|
try {
|
|
9708
9589
|
// Getting the callback function
|
|
9709
9590
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
9710
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
9711
|
-
js_uniffiCallbackData);
|
|
9591
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid, js_vout,
|
|
9592
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9712
9593
|
|
|
9713
9594
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9714
9595
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
@@ -9721,11 +9602,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9721
9602
|
}
|
|
9722
9603
|
}
|
|
9723
9604
|
|
|
9724
|
-
static void
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9605
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
9606
|
+
uint32_t rs_vout,
|
|
9607
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9608
|
+
uint64_t rs_uniffiCallbackData,
|
|
9609
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9729
9610
|
// If the runtime has shutdown, then there is no point in trying to
|
|
9730
9611
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
9731
9612
|
//
|
|
@@ -9741,8 +9622,8 @@ callback(uint64_t rs_uniffiHandle,
|
|
|
9741
9622
|
|
|
9742
9623
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
9743
9624
|
// are all in the lambda.
|
|
9744
|
-
rsLambda(rs_uniffiHandle,
|
|
9745
|
-
rs_uniffiOutReturn);
|
|
9625
|
+
rsLambda(rs_uniffiHandle, rs_txid, rs_vout, rs_uniffiFutureCallback,
|
|
9626
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9746
9627
|
}
|
|
9747
9628
|
|
|
9748
9629
|
static UniffiCallbackInterfaceStorageMethod10
|
|
@@ -9765,21 +9646,22 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
9765
9646
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
9766
9647
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
9767
9648
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
9768
|
-
uint64_t rs_uniffiHandle,
|
|
9769
|
-
|
|
9649
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
|
|
9650
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9770
9651
|
uint64_t rs_uniffiCallbackData,
|
|
9771
9652
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9772
9653
|
// We immediately make a lambda which will do the work of transforming the
|
|
9773
9654
|
// arguments into JSI values and calling the callback.
|
|
9774
9655
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
9775
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
9776
|
-
rs_uniffiCallbackData,
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
//
|
|
9656
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_txid, rs_vout,
|
|
9657
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9658
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
9659
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
|
|
9660
|
+
rs_vout, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9661
|
+
rs_uniffiOutReturn);
|
|
9662
|
+
};
|
|
9663
|
+
// We'll then call that lambda from the callInvoker which will
|
|
9664
|
+
// look after calling it on the correct thread.
|
|
9783
9665
|
callInvoker->invokeBlocking(rt, jsLambda);
|
|
9784
9666
|
};
|
|
9785
9667
|
return callback;
|
|
@@ -9815,9 +9697,8 @@ using namespace facebook;
|
|
|
9815
9697
|
|
|
9816
9698
|
// We need to store a lambda in a global so we can call it from
|
|
9817
9699
|
// a function pointer. The function pointer is passed to Rust.
|
|
9818
|
-
static std::function<void(uint64_t,
|
|
9819
|
-
|
|
9820
|
-
UniffiForeignFuture *)>
|
|
9700
|
+
static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
|
|
9701
|
+
uint64_t, UniffiForeignFuture *)>
|
|
9821
9702
|
rsLambda = nullptr;
|
|
9822
9703
|
|
|
9823
9704
|
// This is the main body of the callback. It's called from the lambda,
|
|
@@ -9825,9 +9706,8 @@ static std::function<void(uint64_t, RustBuffer, uint32_t, RustBuffer,
|
|
|
9825
9706
|
static void body(jsi::Runtime &rt,
|
|
9826
9707
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
9827
9708
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
9828
|
-
uint64_t rs_uniffiHandle,
|
|
9829
|
-
|
|
9830
|
-
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9709
|
+
uint64_t rs_uniffiHandle,
|
|
9710
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
9831
9711
|
uint64_t rs_uniffiCallbackData,
|
|
9832
9712
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9833
9713
|
|
|
@@ -9835,14 +9715,9 @@ static void body(jsi::Runtime &rt,
|
|
|
9835
9715
|
// We'll use the Bridging class to do this…
|
|
9836
9716
|
auto js_uniffiHandle =
|
|
9837
9717
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
9838
|
-
auto
|
|
9839
|
-
rt, callInvoker,
|
|
9840
|
-
|
|
9841
|
-
auto js_payload = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
9842
|
-
rt, callInvoker, rs_payload);
|
|
9843
|
-
auto js_uniffiFutureCallback =
|
|
9844
|
-
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
9845
|
-
rt, callInvoker, rs_uniffiFutureCallback);
|
|
9718
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
9719
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
9720
|
+
rs_uniffiFutureCallback);
|
|
9846
9721
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
9847
9722
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
9848
9723
|
|
|
@@ -9852,9 +9727,8 @@ static void body(jsi::Runtime &rt,
|
|
|
9852
9727
|
try {
|
|
9853
9728
|
// Getting the callback function
|
|
9854
9729
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
9855
|
-
auto uniffiResult =
|
|
9856
|
-
|
|
9857
|
-
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9730
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
9731
|
+
js_uniffiCallbackData);
|
|
9858
9732
|
|
|
9859
9733
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9860
9734
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
@@ -9867,11 +9741,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9867
9741
|
}
|
|
9868
9742
|
}
|
|
9869
9743
|
|
|
9870
|
-
static void
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9744
|
+
static void
|
|
9745
|
+
callback(uint64_t rs_uniffiHandle,
|
|
9746
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
9747
|
+
uint64_t rs_uniffiCallbackData,
|
|
9748
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9875
9749
|
// If the runtime has shutdown, then there is no point in trying to
|
|
9876
9750
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
9877
9751
|
//
|
|
@@ -9887,8 +9761,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
9887
9761
|
|
|
9888
9762
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
9889
9763
|
// are all in the lambda.
|
|
9890
|
-
rsLambda(rs_uniffiHandle,
|
|
9891
|
-
|
|
9764
|
+
rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9765
|
+
rs_uniffiOutReturn);
|
|
9892
9766
|
}
|
|
9893
9767
|
|
|
9894
9768
|
static UniffiCallbackInterfaceStorageMethod11
|
|
@@ -9911,20 +9785,18 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
9911
9785
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
9912
9786
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
9913
9787
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
9914
|
-
uint64_t rs_uniffiHandle,
|
|
9915
|
-
|
|
9916
|
-
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9788
|
+
uint64_t rs_uniffiHandle,
|
|
9789
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
9917
9790
|
uint64_t rs_uniffiCallbackData,
|
|
9918
9791
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
9919
9792
|
// We immediately make a lambda which will do the work of transforming the
|
|
9920
9793
|
// arguments into JSI values and calling the callback.
|
|
9921
9794
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
9922
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9795
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
|
|
9796
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
9797
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
9798
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9799
|
+
rs_uniffiOutReturn);
|
|
9928
9800
|
};
|
|
9929
9801
|
// We'll then call that lambda from the callInvoker which will
|
|
9930
9802
|
// look after calling it on the correct thread.
|
|
@@ -9963,8 +9835,9 @@ using namespace facebook;
|
|
|
9963
9835
|
|
|
9964
9836
|
// We need to store a lambda in a global so we can call it from
|
|
9965
9837
|
// a function pointer. The function pointer is passed to Rust.
|
|
9966
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
9967
|
-
uint64_t,
|
|
9838
|
+
static std::function<void(uint64_t, RustBuffer, uint32_t, RustBuffer,
|
|
9839
|
+
UniffiForeignFutureCompleteVoid, uint64_t,
|
|
9840
|
+
UniffiForeignFuture *)>
|
|
9968
9841
|
rsLambda = nullptr;
|
|
9969
9842
|
|
|
9970
9843
|
// This is the main body of the callback. It's called from the lambda,
|
|
@@ -9972,7 +9845,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
|
9972
9845
|
static void body(jsi::Runtime &rt,
|
|
9973
9846
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
9974
9847
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
9975
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
9848
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
|
|
9849
|
+
RustBuffer rs_payload,
|
|
9976
9850
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
9977
9851
|
uint64_t rs_uniffiCallbackData,
|
|
9978
9852
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -9981,8 +9855,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9981
9855
|
// We'll use the Bridging class to do this…
|
|
9982
9856
|
auto js_uniffiHandle =
|
|
9983
9857
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
9984
|
-
auto
|
|
9985
|
-
rt, callInvoker,
|
|
9858
|
+
auto js_txid = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
9859
|
+
rt, callInvoker, rs_txid);
|
|
9860
|
+
auto js_vout = uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_vout);
|
|
9861
|
+
auto js_payload = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
9862
|
+
rt, callInvoker, rs_payload);
|
|
9986
9863
|
auto js_uniffiFutureCallback =
|
|
9987
9864
|
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
9988
9865
|
rt, callInvoker, rs_uniffiFutureCallback);
|
|
@@ -9995,8 +9872,9 @@ static void body(jsi::Runtime &rt,
|
|
|
9995
9872
|
try {
|
|
9996
9873
|
// Getting the callback function
|
|
9997
9874
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
9998
|
-
auto uniffiResult =
|
|
9999
|
-
|
|
9875
|
+
auto uniffiResult =
|
|
9876
|
+
cb.call(rt, js_uniffiHandle, js_txid, js_vout, js_payload,
|
|
9877
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10000
9878
|
|
|
10001
9879
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10002
9880
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
@@ -10009,7 +9887,8 @@ static void body(jsi::Runtime &rt,
|
|
|
10009
9887
|
}
|
|
10010
9888
|
}
|
|
10011
9889
|
|
|
10012
|
-
static void callback(uint64_t rs_uniffiHandle, RustBuffer
|
|
9890
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
9891
|
+
uint32_t rs_vout, RustBuffer rs_payload,
|
|
10013
9892
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10014
9893
|
uint64_t rs_uniffiCallbackData,
|
|
10015
9894
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -10028,8 +9907,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
|
|
|
10028
9907
|
|
|
10029
9908
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10030
9909
|
// are all in the lambda.
|
|
10031
|
-
rsLambda(rs_uniffiHandle,
|
|
10032
|
-
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
9910
|
+
rsLambda(rs_uniffiHandle, rs_txid, rs_vout, rs_payload,
|
|
9911
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10033
9912
|
}
|
|
10034
9913
|
|
|
10035
9914
|
static UniffiCallbackInterfaceStorageMethod12
|
|
@@ -10052,19 +9931,20 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
10052
9931
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10053
9932
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10054
9933
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10055
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
9934
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_txid, uint32_t rs_vout,
|
|
9935
|
+
RustBuffer rs_payload,
|
|
10056
9936
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10057
9937
|
uint64_t rs_uniffiCallbackData,
|
|
10058
9938
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10059
9939
|
// We immediately make a lambda which will do the work of transforming the
|
|
10060
9940
|
// arguments into JSI values and calling the callback.
|
|
10061
9941
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10062
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10063
|
-
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
9942
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_txid, rs_vout,
|
|
9943
|
+
rs_payload, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10064
9944
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10065
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10066
|
-
|
|
10067
|
-
rs_uniffiOutReturn);
|
|
9945
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_txid,
|
|
9946
|
+
rs_vout, rs_payload, rs_uniffiFutureCallback,
|
|
9947
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10068
9948
|
};
|
|
10069
9949
|
// We'll then call that lambda from the callInvoker which will
|
|
10070
9950
|
// look after calling it on the correct thread.
|
|
@@ -10082,10 +9962,10 @@ static void cleanup() {
|
|
|
10082
9962
|
}
|
|
10083
9963
|
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod12
|
|
10084
9964
|
// Implementation of callback function calling from Rust to JS
|
|
10085
|
-
//
|
|
9965
|
+
// CallbackInterfaceStorageMethod13
|
|
10086
9966
|
|
|
10087
9967
|
// Callback function:
|
|
10088
|
-
// uniffi::breez_sdk_spark::cb::
|
|
9968
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod13::UniffiCallbackInterfaceStorageMethod13
|
|
10089
9969
|
//
|
|
10090
9970
|
// We have the following constraints:
|
|
10091
9971
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10098,12 +9978,12 @@ static void cleanup() {
|
|
|
10098
9978
|
//
|
|
10099
9979
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10100
9980
|
// lambda sometime in the future.
|
|
10101
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
9981
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod13 {
|
|
10102
9982
|
using namespace facebook;
|
|
10103
9983
|
|
|
10104
9984
|
// We need to store a lambda in a global so we can call it from
|
|
10105
9985
|
// a function pointer. The function pointer is passed to Rust.
|
|
10106
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
9986
|
+
static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
10107
9987
|
uint64_t, UniffiForeignFuture *)>
|
|
10108
9988
|
rsLambda = nullptr;
|
|
10109
9989
|
|
|
@@ -10112,8 +9992,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteU64,
|
|
|
10112
9992
|
static void body(jsi::Runtime &rt,
|
|
10113
9993
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10114
9994
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10115
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10116
|
-
|
|
9995
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
|
|
9996
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10117
9997
|
uint64_t rs_uniffiCallbackData,
|
|
10118
9998
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10119
9999
|
|
|
@@ -10121,10 +10001,10 @@ static void body(jsi::Runtime &rt,
|
|
|
10121
10001
|
// We'll use the Bridging class to do this…
|
|
10122
10002
|
auto js_uniffiHandle =
|
|
10123
10003
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10124
|
-
auto
|
|
10125
|
-
rt, callInvoker,
|
|
10004
|
+
auto js_metadata = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10005
|
+
rt, callInvoker, rs_metadata);
|
|
10126
10006
|
auto js_uniffiFutureCallback =
|
|
10127
|
-
uniffi::breez_sdk_spark::Bridging<
|
|
10007
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10128
10008
|
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10129
10009
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10130
10010
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
@@ -10135,7 +10015,7 @@ static void body(jsi::Runtime &rt,
|
|
|
10135
10015
|
try {
|
|
10136
10016
|
// Getting the callback function
|
|
10137
10017
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10138
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
10018
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_metadata,
|
|
10139
10019
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10140
10020
|
|
|
10141
10021
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
@@ -10143,14 +10023,14 @@ static void body(jsi::Runtime &rt,
|
|
|
10143
10023
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
10144
10024
|
uniffiResult);
|
|
10145
10025
|
} catch (const jsi::JSError &error) {
|
|
10146
|
-
std::cout << "Error in callback
|
|
10026
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod13: "
|
|
10147
10027
|
<< error.what() << std::endl;
|
|
10148
10028
|
throw error;
|
|
10149
10029
|
}
|
|
10150
10030
|
}
|
|
10151
10031
|
|
|
10152
|
-
static void callback(uint64_t rs_uniffiHandle, RustBuffer
|
|
10153
|
-
|
|
10032
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
|
|
10033
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10154
10034
|
uint64_t rs_uniffiCallbackData,
|
|
10155
10035
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10156
10036
|
// If the runtime has shutdown, then there is no point in trying to
|
|
@@ -10168,12 +10048,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
10168
10048
|
|
|
10169
10049
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10170
10050
|
// are all in the lambda.
|
|
10171
|
-
rsLambda(rs_uniffiHandle,
|
|
10051
|
+
rsLambda(rs_uniffiHandle, rs_metadata, rs_uniffiFutureCallback,
|
|
10172
10052
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10173
10053
|
}
|
|
10174
10054
|
|
|
10175
|
-
static
|
|
10176
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
10055
|
+
static UniffiCallbackInterfaceStorageMethod13
|
|
10056
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod13
|
|
10177
10057
|
jsi::Runtime &rt,
|
|
10178
10058
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10179
10059
|
const jsi::Value &value) {
|
|
@@ -10192,17 +10072,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacesyncstora
|
|
|
10192
10072
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10193
10073
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10194
10074
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10195
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10196
|
-
|
|
10075
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
|
|
10076
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10197
10077
|
uint64_t rs_uniffiCallbackData,
|
|
10198
10078
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10199
10079
|
// We immediately make a lambda which will do the work of transforming the
|
|
10200
10080
|
// arguments into JSI values and calling the callback.
|
|
10201
10081
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10202
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10082
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
|
|
10203
10083
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10204
10084
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10205
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10085
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
|
|
10206
10086
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10207
10087
|
rs_uniffiOutReturn);
|
|
10208
10088
|
};
|
|
@@ -10220,12 +10100,12 @@ static void cleanup() {
|
|
|
10220
10100
|
// out, then the pointer will no longer be left dangling.
|
|
10221
10101
|
rsLambda = nullptr;
|
|
10222
10102
|
}
|
|
10223
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
10103
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod13
|
|
10224
10104
|
// Implementation of callback function calling from Rust to JS
|
|
10225
|
-
//
|
|
10105
|
+
// CallbackInterfaceStorageMethod14
|
|
10226
10106
|
|
|
10227
10107
|
// Callback function:
|
|
10228
|
-
// uniffi::breez_sdk_spark::cb::
|
|
10108
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod14::UniffiCallbackInterfaceStorageMethod14
|
|
10229
10109
|
//
|
|
10230
10110
|
// We have the following constraints:
|
|
10231
10111
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10238,12 +10118,12 @@ static void cleanup() {
|
|
|
10238
10118
|
//
|
|
10239
10119
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10240
10120
|
// lambda sometime in the future.
|
|
10241
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
10121
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod14 {
|
|
10242
10122
|
using namespace facebook;
|
|
10243
10123
|
|
|
10244
10124
|
// We need to store a lambda in a global so we can call it from
|
|
10245
10125
|
// a function pointer. The function pointer is passed to Rust.
|
|
10246
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
10126
|
+
static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteU64,
|
|
10247
10127
|
uint64_t, UniffiForeignFuture *)>
|
|
10248
10128
|
rsLambda = nullptr;
|
|
10249
10129
|
|
|
@@ -10253,7 +10133,7 @@ static void body(jsi::Runtime &rt,
|
|
|
10253
10133
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10254
10134
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10255
10135
|
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10256
|
-
|
|
10136
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10257
10137
|
uint64_t rs_uniffiCallbackData,
|
|
10258
10138
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10259
10139
|
|
|
@@ -10264,7 +10144,7 @@ static void body(jsi::Runtime &rt,
|
|
|
10264
10144
|
auto js_record = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10265
10145
|
rt, callInvoker, rs_record);
|
|
10266
10146
|
auto js_uniffiFutureCallback =
|
|
10267
|
-
uniffi::breez_sdk_spark::Bridging<
|
|
10147
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteU64>::toJs(
|
|
10268
10148
|
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10269
10149
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10270
10150
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
@@ -10283,14 +10163,14 @@ static void body(jsi::Runtime &rt,
|
|
|
10283
10163
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
10284
10164
|
uniffiResult);
|
|
10285
10165
|
} catch (const jsi::JSError &error) {
|
|
10286
|
-
std::cout << "Error in callback
|
|
10166
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod14: "
|
|
10287
10167
|
<< error.what() << std::endl;
|
|
10288
10168
|
throw error;
|
|
10289
10169
|
}
|
|
10290
10170
|
}
|
|
10291
10171
|
|
|
10292
10172
|
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10293
|
-
|
|
10173
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10294
10174
|
uint64_t rs_uniffiCallbackData,
|
|
10295
10175
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10296
10176
|
// If the runtime has shutdown, then there is no point in trying to
|
|
@@ -10312,8 +10192,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
10312
10192
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10313
10193
|
}
|
|
10314
10194
|
|
|
10315
|
-
static
|
|
10316
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
10195
|
+
static UniffiCallbackInterfaceStorageMethod14
|
|
10196
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod14
|
|
10317
10197
|
jsi::Runtime &rt,
|
|
10318
10198
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10319
10199
|
const jsi::Value &value) {
|
|
@@ -10333,7 +10213,7 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacesyncstora
|
|
|
10333
10213
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10334
10214
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10335
10215
|
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10336
|
-
|
|
10216
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10337
10217
|
uint64_t rs_uniffiCallbackData,
|
|
10338
10218
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10339
10219
|
// We immediately make a lambda which will do the work of transforming the
|
|
@@ -10360,12 +10240,12 @@ static void cleanup() {
|
|
|
10360
10240
|
// out, then the pointer will no longer be left dangling.
|
|
10361
10241
|
rsLambda = nullptr;
|
|
10362
10242
|
}
|
|
10363
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
10243
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod14
|
|
10364
10244
|
// Implementation of callback function calling from Rust to JS
|
|
10365
|
-
//
|
|
10245
|
+
// CallbackInterfaceStorageMethod15
|
|
10366
10246
|
|
|
10367
10247
|
// Callback function:
|
|
10368
|
-
// uniffi::breez_sdk_spark::cb::
|
|
10248
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod15::UniffiCallbackInterfaceStorageMethod15
|
|
10369
10249
|
//
|
|
10370
10250
|
// We have the following constraints:
|
|
10371
10251
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10378,13 +10258,13 @@ static void cleanup() {
|
|
|
10378
10258
|
//
|
|
10379
10259
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10380
10260
|
// lambda sometime in the future.
|
|
10381
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
10261
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod15 {
|
|
10382
10262
|
using namespace facebook;
|
|
10383
10263
|
|
|
10384
10264
|
// We need to store a lambda in a global so we can call it from
|
|
10385
10265
|
// a function pointer. The function pointer is passed to Rust.
|
|
10386
|
-
static std::function<void(uint64_t,
|
|
10387
|
-
|
|
10266
|
+
static std::function<void(uint64_t, RustBuffer, uint64_t,
|
|
10267
|
+
UniffiForeignFutureCompleteVoid, uint64_t,
|
|
10388
10268
|
UniffiForeignFuture *)>
|
|
10389
10269
|
rsLambda = nullptr;
|
|
10390
10270
|
|
|
@@ -10393,8 +10273,9 @@ static std::function<void(uint64_t, uint32_t,
|
|
|
10393
10273
|
static void body(jsi::Runtime &rt,
|
|
10394
10274
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10395
10275
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10396
|
-
uint64_t rs_uniffiHandle,
|
|
10397
|
-
|
|
10276
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10277
|
+
uint64_t rs_localRevision,
|
|
10278
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10398
10279
|
uint64_t rs_uniffiCallbackData,
|
|
10399
10280
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10400
10281
|
|
|
@@ -10402,11 +10283,13 @@ static void body(jsi::Runtime &rt,
|
|
|
10402
10283
|
// We'll use the Bridging class to do this…
|
|
10403
10284
|
auto js_uniffiHandle =
|
|
10404
10285
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10405
|
-
auto
|
|
10406
|
-
|
|
10407
|
-
auto
|
|
10408
|
-
|
|
10409
|
-
|
|
10286
|
+
auto js_record = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10287
|
+
rt, callInvoker, rs_record);
|
|
10288
|
+
auto js_localRevision =
|
|
10289
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_localRevision);
|
|
10290
|
+
auto js_uniffiFutureCallback =
|
|
10291
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10292
|
+
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10410
10293
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10411
10294
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
10412
10295
|
|
|
@@ -10416,25 +10299,26 @@ static void body(jsi::Runtime &rt,
|
|
|
10416
10299
|
try {
|
|
10417
10300
|
// Getting the callback function
|
|
10418
10301
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10419
|
-
auto uniffiResult =
|
|
10420
|
-
|
|
10302
|
+
auto uniffiResult =
|
|
10303
|
+
cb.call(rt, js_uniffiHandle, js_record, js_localRevision,
|
|
10304
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10421
10305
|
|
|
10422
10306
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10423
10307
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
10424
10308
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
10425
10309
|
uniffiResult);
|
|
10426
10310
|
} catch (const jsi::JSError &error) {
|
|
10427
|
-
std::cout << "Error in callback
|
|
10311
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod15: "
|
|
10428
10312
|
<< error.what() << std::endl;
|
|
10429
10313
|
throw error;
|
|
10430
10314
|
}
|
|
10431
10315
|
}
|
|
10432
10316
|
|
|
10433
|
-
static void
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10317
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10318
|
+
uint64_t rs_localRevision,
|
|
10319
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10320
|
+
uint64_t rs_uniffiCallbackData,
|
|
10321
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10438
10322
|
// If the runtime has shutdown, then there is no point in trying to
|
|
10439
10323
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10440
10324
|
//
|
|
@@ -10450,12 +10334,12 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
|
10450
10334
|
|
|
10451
10335
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10452
10336
|
// are all in the lambda.
|
|
10453
|
-
rsLambda(rs_uniffiHandle,
|
|
10454
|
-
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10337
|
+
rsLambda(rs_uniffiHandle, rs_record, rs_localRevision,
|
|
10338
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10455
10339
|
}
|
|
10456
10340
|
|
|
10457
|
-
static
|
|
10458
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
10341
|
+
static UniffiCallbackInterfaceStorageMethod15
|
|
10342
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod15
|
|
10459
10343
|
jsi::Runtime &rt,
|
|
10460
10344
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10461
10345
|
const jsi::Value &value) {
|
|
@@ -10474,18 +10358,19 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacesyncstora
|
|
|
10474
10358
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10475
10359
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10476
10360
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10477
|
-
uint64_t rs_uniffiHandle,
|
|
10478
|
-
|
|
10361
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10362
|
+
uint64_t rs_localRevision,
|
|
10363
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10479
10364
|
uint64_t rs_uniffiCallbackData,
|
|
10480
10365
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10481
10366
|
// We immediately make a lambda which will do the work of transforming the
|
|
10482
10367
|
// arguments into JSI values and calling the callback.
|
|
10483
10368
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10484
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10485
|
-
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10369
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
10370
|
+
rs_localRevision, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10486
10371
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10487
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10488
|
-
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10372
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
10373
|
+
rs_localRevision, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10489
10374
|
rs_uniffiOutReturn);
|
|
10490
10375
|
};
|
|
10491
10376
|
// We'll then call that lambda from the callInvoker which will
|
|
@@ -10502,12 +10387,12 @@ static void cleanup() {
|
|
|
10502
10387
|
// out, then the pointer will no longer be left dangling.
|
|
10503
10388
|
rsLambda = nullptr;
|
|
10504
10389
|
}
|
|
10505
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
10390
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod15
|
|
10506
10391
|
// Implementation of callback function calling from Rust to JS
|
|
10507
|
-
//
|
|
10392
|
+
// CallbackInterfaceStorageMethod16
|
|
10508
10393
|
|
|
10509
10394
|
// Callback function:
|
|
10510
|
-
// uniffi::breez_sdk_spark::cb::
|
|
10395
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod16::UniffiCallbackInterfaceStorageMethod16
|
|
10511
10396
|
//
|
|
10512
10397
|
// We have the following constraints:
|
|
10513
10398
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10520,12 +10405,13 @@ static void cleanup() {
|
|
|
10520
10405
|
//
|
|
10521
10406
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10522
10407
|
// lambda sometime in the future.
|
|
10523
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
10408
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod16 {
|
|
10524
10409
|
using namespace facebook;
|
|
10525
10410
|
|
|
10526
10411
|
// We need to store a lambda in a global so we can call it from
|
|
10527
10412
|
// a function pointer. The function pointer is passed to Rust.
|
|
10528
|
-
static std::function<void(uint64_t,
|
|
10413
|
+
static std::function<void(uint64_t, uint32_t,
|
|
10414
|
+
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
10529
10415
|
UniffiForeignFuture *)>
|
|
10530
10416
|
rsLambda = nullptr;
|
|
10531
10417
|
|
|
@@ -10534,8 +10420,8 @@ static std::function<void(uint64_t, UniffiForeignFutureCompleteU64, uint64_t,
|
|
|
10534
10420
|
static void body(jsi::Runtime &rt,
|
|
10535
10421
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10536
10422
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10537
|
-
uint64_t rs_uniffiHandle,
|
|
10538
|
-
|
|
10423
|
+
uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
10424
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10539
10425
|
uint64_t rs_uniffiCallbackData,
|
|
10540
10426
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10541
10427
|
|
|
@@ -10543,9 +10429,11 @@ static void body(jsi::Runtime &rt,
|
|
|
10543
10429
|
// We'll use the Bridging class to do this…
|
|
10544
10430
|
auto js_uniffiHandle =
|
|
10545
10431
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10546
|
-
auto
|
|
10547
|
-
|
|
10548
|
-
|
|
10432
|
+
auto js_limit =
|
|
10433
|
+
uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_limit);
|
|
10434
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
10435
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
10436
|
+
rs_uniffiFutureCallback);
|
|
10549
10437
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10550
10438
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
10551
10439
|
|
|
@@ -10555,24 +10443,25 @@ static void body(jsi::Runtime &rt,
|
|
|
10555
10443
|
try {
|
|
10556
10444
|
// Getting the callback function
|
|
10557
10445
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10558
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
10559
|
-
js_uniffiCallbackData);
|
|
10446
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_limit,
|
|
10447
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10560
10448
|
|
|
10561
10449
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10562
10450
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
10563
10451
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
10564
10452
|
uniffiResult);
|
|
10565
10453
|
} catch (const jsi::JSError &error) {
|
|
10566
|
-
std::cout << "Error in callback
|
|
10454
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod16: "
|
|
10567
10455
|
<< error.what() << std::endl;
|
|
10568
10456
|
throw error;
|
|
10569
10457
|
}
|
|
10570
10458
|
}
|
|
10571
10459
|
|
|
10572
|
-
static void
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10460
|
+
static void
|
|
10461
|
+
callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
10462
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10463
|
+
uint64_t rs_uniffiCallbackData,
|
|
10464
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10576
10465
|
// If the runtime has shutdown, then there is no point in trying to
|
|
10577
10466
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10578
10467
|
//
|
|
@@ -10588,12 +10477,12 @@ static void callback(uint64_t rs_uniffiHandle,
|
|
|
10588
10477
|
|
|
10589
10478
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10590
10479
|
// are all in the lambda.
|
|
10591
|
-
rsLambda(rs_uniffiHandle,
|
|
10592
|
-
rs_uniffiOutReturn);
|
|
10480
|
+
rsLambda(rs_uniffiHandle, rs_limit, rs_uniffiFutureCallback,
|
|
10481
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10593
10482
|
}
|
|
10594
10483
|
|
|
10595
|
-
static
|
|
10596
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
10484
|
+
static UniffiCallbackInterfaceStorageMethod16
|
|
10485
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod16
|
|
10597
10486
|
jsi::Runtime &rt,
|
|
10598
10487
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10599
10488
|
const jsi::Value &value) {
|
|
@@ -10612,16 +10501,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacesyncstora
|
|
|
10612
10501
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10613
10502
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10614
10503
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10615
|
-
uint64_t rs_uniffiHandle,
|
|
10616
|
-
|
|
10504
|
+
uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
10505
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10617
10506
|
uint64_t rs_uniffiCallbackData,
|
|
10618
10507
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10619
10508
|
// We immediately make a lambda which will do the work of transforming the
|
|
10620
10509
|
// arguments into JSI values and calling the callback.
|
|
10621
10510
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10622
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10623
|
-
rs_uniffiCallbackData,
|
|
10624
|
-
|
|
10511
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_limit,
|
|
10512
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10513
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10514
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_limit,
|
|
10625
10515
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10626
10516
|
rs_uniffiOutReturn);
|
|
10627
10517
|
};
|
|
@@ -10639,12 +10529,12 @@ static void cleanup() {
|
|
|
10639
10529
|
// out, then the pointer will no longer be left dangling.
|
|
10640
10530
|
rsLambda = nullptr;
|
|
10641
10531
|
}
|
|
10642
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
10532
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod16
|
|
10643
10533
|
// Implementation of callback function calling from Rust to JS
|
|
10644
|
-
//
|
|
10534
|
+
// CallbackInterfaceStorageMethod17
|
|
10645
10535
|
|
|
10646
10536
|
// Callback function:
|
|
10647
|
-
// uniffi::breez_sdk_spark::cb::
|
|
10537
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17::UniffiCallbackInterfaceStorageMethod17
|
|
10648
10538
|
//
|
|
10649
10539
|
// We have the following constraints:
|
|
10650
10540
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10657,13 +10547,13 @@ static void cleanup() {
|
|
|
10657
10547
|
//
|
|
10658
10548
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10659
10549
|
// lambda sometime in the future.
|
|
10660
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
10550
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17 {
|
|
10661
10551
|
using namespace facebook;
|
|
10662
10552
|
|
|
10663
10553
|
// We need to store a lambda in a global so we can call it from
|
|
10664
10554
|
// a function pointer. The function pointer is passed to Rust.
|
|
10665
|
-
static std::function<void(uint64_t,
|
|
10666
|
-
|
|
10555
|
+
static std::function<void(uint64_t, UniffiForeignFutureCompleteU64, uint64_t,
|
|
10556
|
+
UniffiForeignFuture *)>
|
|
10667
10557
|
rsLambda = nullptr;
|
|
10668
10558
|
|
|
10669
10559
|
// This is the main body of the callback. It's called from the lambda,
|
|
@@ -10671,8 +10561,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
|
10671
10561
|
static void body(jsi::Runtime &rt,
|
|
10672
10562
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10673
10563
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10674
|
-
uint64_t rs_uniffiHandle,
|
|
10675
|
-
|
|
10564
|
+
uint64_t rs_uniffiHandle,
|
|
10565
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10676
10566
|
uint64_t rs_uniffiCallbackData,
|
|
10677
10567
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10678
10568
|
|
|
@@ -10680,10 +10570,8 @@ static void body(jsi::Runtime &rt,
|
|
|
10680
10570
|
// We'll use the Bridging class to do this…
|
|
10681
10571
|
auto js_uniffiHandle =
|
|
10682
10572
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10683
|
-
auto js_records = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10684
|
-
rt, callInvoker, rs_records);
|
|
10685
10573
|
auto js_uniffiFutureCallback =
|
|
10686
|
-
uniffi::breez_sdk_spark::Bridging<
|
|
10574
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteU64>::toJs(
|
|
10687
10575
|
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10688
10576
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10689
10577
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
@@ -10694,22 +10582,22 @@ static void body(jsi::Runtime &rt,
|
|
|
10694
10582
|
try {
|
|
10695
10583
|
// Getting the callback function
|
|
10696
10584
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10697
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
10698
|
-
|
|
10585
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
10586
|
+
js_uniffiCallbackData);
|
|
10699
10587
|
|
|
10700
10588
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10701
10589
|
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
10702
10590
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
10703
10591
|
uniffiResult);
|
|
10704
10592
|
} catch (const jsi::JSError &error) {
|
|
10705
|
-
std::cout << "Error in callback
|
|
10593
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod17: "
|
|
10706
10594
|
<< error.what() << std::endl;
|
|
10707
10595
|
throw error;
|
|
10708
10596
|
}
|
|
10709
10597
|
}
|
|
10710
10598
|
|
|
10711
|
-
static void callback(uint64_t rs_uniffiHandle,
|
|
10712
|
-
|
|
10599
|
+
static void callback(uint64_t rs_uniffiHandle,
|
|
10600
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10713
10601
|
uint64_t rs_uniffiCallbackData,
|
|
10714
10602
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10715
10603
|
// If the runtime has shutdown, then there is no point in trying to
|
|
@@ -10727,12 +10615,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_records,
|
|
|
10727
10615
|
|
|
10728
10616
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10729
10617
|
// are all in the lambda.
|
|
10730
|
-
rsLambda(rs_uniffiHandle,
|
|
10731
|
-
|
|
10618
|
+
rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10619
|
+
rs_uniffiOutReturn);
|
|
10732
10620
|
}
|
|
10733
10621
|
|
|
10734
|
-
static
|
|
10735
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
10622
|
+
static UniffiCallbackInterfaceStorageMethod17
|
|
10623
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17
|
|
10736
10624
|
jsi::Runtime &rt,
|
|
10737
10625
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10738
10626
|
const jsi::Value &value) {
|
|
@@ -10751,17 +10639,16 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacesyncstora
|
|
|
10751
10639
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10752
10640
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10753
10641
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10754
|
-
uint64_t rs_uniffiHandle,
|
|
10755
|
-
|
|
10642
|
+
uint64_t rs_uniffiHandle,
|
|
10643
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10756
10644
|
uint64_t rs_uniffiCallbackData,
|
|
10757
10645
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10758
10646
|
// We immediately make a lambda which will do the work of transforming the
|
|
10759
10647
|
// arguments into JSI values and calling the callback.
|
|
10760
10648
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10761
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_records,
|
|
10649
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
|
|
10650
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10651
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10765
10652
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10766
10653
|
rs_uniffiOutReturn);
|
|
10767
10654
|
};
|
|
@@ -10779,12 +10666,12 @@ static void cleanup() {
|
|
|
10779
10666
|
// out, then the pointer will no longer be left dangling.
|
|
10780
10667
|
rsLambda = nullptr;
|
|
10781
10668
|
}
|
|
10782
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
10669
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17
|
|
10783
10670
|
// Implementation of callback function calling from Rust to JS
|
|
10784
|
-
//
|
|
10671
|
+
// CallbackInterfaceStorageMethod18
|
|
10785
10672
|
|
|
10786
10673
|
// Callback function:
|
|
10787
|
-
// uniffi::breez_sdk_spark::cb::
|
|
10674
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18::UniffiCallbackInterfaceStorageMethod18
|
|
10788
10675
|
//
|
|
10789
10676
|
// We have the following constraints:
|
|
10790
10677
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10797,7 +10684,7 @@ static void cleanup() {
|
|
|
10797
10684
|
//
|
|
10798
10685
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10799
10686
|
// lambda sometime in the future.
|
|
10800
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
10687
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18 {
|
|
10801
10688
|
using namespace facebook;
|
|
10802
10689
|
|
|
10803
10690
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -10811,7 +10698,7 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
|
10811
10698
|
static void body(jsi::Runtime &rt,
|
|
10812
10699
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10813
10700
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10814
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10701
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_records,
|
|
10815
10702
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10816
10703
|
uint64_t rs_uniffiCallbackData,
|
|
10817
10704
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -10820,8 +10707,8 @@ static void body(jsi::Runtime &rt,
|
|
|
10820
10707
|
// We'll use the Bridging class to do this…
|
|
10821
10708
|
auto js_uniffiHandle =
|
|
10822
10709
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10823
|
-
auto
|
|
10824
|
-
rt, callInvoker,
|
|
10710
|
+
auto js_records = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10711
|
+
rt, callInvoker, rs_records);
|
|
10825
10712
|
auto js_uniffiFutureCallback =
|
|
10826
10713
|
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10827
10714
|
rt, callInvoker, rs_uniffiFutureCallback);
|
|
@@ -10834,7 +10721,7 @@ static void body(jsi::Runtime &rt,
|
|
|
10834
10721
|
try {
|
|
10835
10722
|
// Getting the callback function
|
|
10836
10723
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10837
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
10724
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_records,
|
|
10838
10725
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10839
10726
|
|
|
10840
10727
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
@@ -10842,13 +10729,13 @@ static void body(jsi::Runtime &rt,
|
|
|
10842
10729
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
10843
10730
|
uniffiResult);
|
|
10844
10731
|
} catch (const jsi::JSError &error) {
|
|
10845
|
-
std::cout << "Error in callback
|
|
10732
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod18: "
|
|
10846
10733
|
<< error.what() << std::endl;
|
|
10847
10734
|
throw error;
|
|
10848
10735
|
}
|
|
10849
10736
|
}
|
|
10850
10737
|
|
|
10851
|
-
static void callback(uint64_t rs_uniffiHandle, RustBuffer
|
|
10738
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_records,
|
|
10852
10739
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10853
10740
|
uint64_t rs_uniffiCallbackData,
|
|
10854
10741
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -10867,12 +10754,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
10867
10754
|
|
|
10868
10755
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10869
10756
|
// are all in the lambda.
|
|
10870
|
-
rsLambda(rs_uniffiHandle,
|
|
10757
|
+
rsLambda(rs_uniffiHandle, rs_records, rs_uniffiFutureCallback,
|
|
10871
10758
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10872
10759
|
}
|
|
10873
10760
|
|
|
10874
|
-
static
|
|
10875
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
10761
|
+
static UniffiCallbackInterfaceStorageMethod18
|
|
10762
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18
|
|
10876
10763
|
jsi::Runtime &rt,
|
|
10877
10764
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10878
10765
|
const jsi::Value &value) {
|
|
@@ -10891,17 +10778,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacesyncstora
|
|
|
10891
10778
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10892
10779
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10893
10780
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10894
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10781
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_records,
|
|
10895
10782
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10896
10783
|
uint64_t rs_uniffiCallbackData,
|
|
10897
10784
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10898
10785
|
// We immediately make a lambda which will do the work of transforming the
|
|
10899
10786
|
// arguments into JSI values and calling the callback.
|
|
10900
10787
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10901
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10788
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_records,
|
|
10902
10789
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10903
10790
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10904
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10791
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_records,
|
|
10905
10792
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10906
10793
|
rs_uniffiOutReturn);
|
|
10907
10794
|
};
|
|
@@ -10919,12 +10806,12 @@ static void cleanup() {
|
|
|
10919
10806
|
// out, then the pointer will no longer be left dangling.
|
|
10920
10807
|
rsLambda = nullptr;
|
|
10921
10808
|
}
|
|
10922
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
10809
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18
|
|
10923
10810
|
// Implementation of callback function calling from Rust to JS
|
|
10924
|
-
//
|
|
10811
|
+
// CallbackInterfaceStorageMethod19
|
|
10925
10812
|
|
|
10926
10813
|
// Callback function:
|
|
10927
|
-
// uniffi::breez_sdk_spark::cb::
|
|
10814
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19::UniffiCallbackInterfaceStorageMethod19
|
|
10928
10815
|
//
|
|
10929
10816
|
// We have the following constraints:
|
|
10930
10817
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10937,12 +10824,12 @@ static void cleanup() {
|
|
|
10937
10824
|
//
|
|
10938
10825
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10939
10826
|
// lambda sometime in the future.
|
|
10940
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
10827
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19 {
|
|
10941
10828
|
using namespace facebook;
|
|
10942
10829
|
|
|
10943
10830
|
// We need to store a lambda in a global so we can call it from
|
|
10944
10831
|
// a function pointer. The function pointer is passed to Rust.
|
|
10945
|
-
static std::function<void(uint64_t,
|
|
10832
|
+
static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
10946
10833
|
uint64_t, UniffiForeignFuture *)>
|
|
10947
10834
|
rsLambda = nullptr;
|
|
10948
10835
|
|
|
@@ -10951,7 +10838,7 @@ static std::function<void(uint64_t, uint64_t, UniffiForeignFutureCompleteVoid,
|
|
|
10951
10838
|
static void body(jsi::Runtime &rt,
|
|
10952
10839
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10953
10840
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10954
|
-
uint64_t rs_uniffiHandle,
|
|
10841
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10955
10842
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10956
10843
|
uint64_t rs_uniffiCallbackData,
|
|
10957
10844
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -10960,8 +10847,8 @@ static void body(jsi::Runtime &rt,
|
|
|
10960
10847
|
// We'll use the Bridging class to do this…
|
|
10961
10848
|
auto js_uniffiHandle =
|
|
10962
10849
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10963
|
-
auto
|
|
10964
|
-
|
|
10850
|
+
auto js_record = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10851
|
+
rt, callInvoker, rs_record);
|
|
10965
10852
|
auto js_uniffiFutureCallback =
|
|
10966
10853
|
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10967
10854
|
rt, callInvoker, rs_uniffiFutureCallback);
|
|
@@ -10974,7 +10861,7 @@ static void body(jsi::Runtime &rt,
|
|
|
10974
10861
|
try {
|
|
10975
10862
|
// Getting the callback function
|
|
10976
10863
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10977
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
10864
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_record,
|
|
10978
10865
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10979
10866
|
|
|
10980
10867
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
@@ -10982,13 +10869,13 @@ static void body(jsi::Runtime &rt,
|
|
|
10982
10869
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
10983
10870
|
uniffiResult);
|
|
10984
10871
|
} catch (const jsi::JSError &error) {
|
|
10985
|
-
std::cout << "Error in callback
|
|
10872
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod19: "
|
|
10986
10873
|
<< error.what() << std::endl;
|
|
10987
10874
|
throw error;
|
|
10988
10875
|
}
|
|
10989
10876
|
}
|
|
10990
10877
|
|
|
10991
|
-
static void callback(uint64_t rs_uniffiHandle,
|
|
10878
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10992
10879
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10993
10880
|
uint64_t rs_uniffiCallbackData,
|
|
10994
10881
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -11007,12 +10894,12 @@ static void callback(uint64_t rs_uniffiHandle, uint64_t rs_revision,
|
|
|
11007
10894
|
|
|
11008
10895
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
11009
10896
|
// are all in the lambda.
|
|
11010
|
-
rsLambda(rs_uniffiHandle,
|
|
10897
|
+
rsLambda(rs_uniffiHandle, rs_record, rs_uniffiFutureCallback,
|
|
11011
10898
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
11012
10899
|
}
|
|
11013
10900
|
|
|
11014
|
-
static
|
|
11015
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
10901
|
+
static UniffiCallbackInterfaceStorageMethod19
|
|
10902
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
|
|
11016
10903
|
jsi::Runtime &rt,
|
|
11017
10904
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11018
10905
|
const jsi::Value &value) {
|
|
@@ -11031,17 +10918,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacesyncstora
|
|
|
11031
10918
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
11032
10919
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
11033
10920
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
11034
|
-
uint64_t rs_uniffiHandle,
|
|
10921
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
11035
10922
|
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
11036
10923
|
uint64_t rs_uniffiCallbackData,
|
|
11037
10924
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
11038
10925
|
// We immediately make a lambda which will do the work of transforming the
|
|
11039
10926
|
// arguments into JSI values and calling the callback.
|
|
11040
10927
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
11041
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10928
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
11042
10929
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
11043
10930
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
11044
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10931
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
11045
10932
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
11046
10933
|
rs_uniffiOutReturn);
|
|
11047
10934
|
};
|
|
@@ -11059,12 +10946,12 @@ static void cleanup() {
|
|
|
11059
10946
|
// out, then the pointer will no longer be left dangling.
|
|
11060
10947
|
rsLambda = nullptr;
|
|
11061
10948
|
}
|
|
11062
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
10949
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
|
|
11063
10950
|
// Implementation of callback function calling from Rust to JS
|
|
11064
|
-
//
|
|
10951
|
+
// CallbackInterfaceStorageMethod20
|
|
11065
10952
|
|
|
11066
10953
|
// Callback function:
|
|
11067
|
-
// uniffi::breez_sdk_spark::cb::
|
|
10954
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20::UniffiCallbackInterfaceStorageMethod20
|
|
11068
10955
|
//
|
|
11069
10956
|
// We have the following constraints:
|
|
11070
10957
|
// - we need to pass a function pointer to Rust.
|
|
@@ -11077,7 +10964,7 @@ static void cleanup() {
|
|
|
11077
10964
|
//
|
|
11078
10965
|
// We then give the `callback` function pointer to Rust which will call the
|
|
11079
10966
|
// lambda sometime in the future.
|
|
11080
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
10967
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20 {
|
|
11081
10968
|
using namespace facebook;
|
|
11082
10969
|
|
|
11083
10970
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -11123,7 +11010,7 @@ static void body(jsi::Runtime &rt,
|
|
|
11123
11010
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
11124
11011
|
uniffiResult);
|
|
11125
11012
|
} catch (const jsi::JSError &error) {
|
|
11126
|
-
std::cout << "Error in callback
|
|
11013
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod20: "
|
|
11127
11014
|
<< error.what() << std::endl;
|
|
11128
11015
|
throw error;
|
|
11129
11016
|
}
|
|
@@ -11153,8 +11040,8 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
|
11153
11040
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
11154
11041
|
}
|
|
11155
11042
|
|
|
11156
|
-
static
|
|
11157
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11043
|
+
static UniffiCallbackInterfaceStorageMethod20
|
|
11044
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
|
|
11158
11045
|
jsi::Runtime &rt,
|
|
11159
11046
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11160
11047
|
const jsi::Value &value) {
|
|
@@ -11201,12 +11088,12 @@ static void cleanup() {
|
|
|
11201
11088
|
// out, then the pointer will no longer be left dangling.
|
|
11202
11089
|
rsLambda = nullptr;
|
|
11203
11090
|
}
|
|
11204
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11091
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
|
|
11205
11092
|
// Implementation of callback function calling from Rust to JS
|
|
11206
|
-
//
|
|
11093
|
+
// CallbackInterfaceStorageMethod21
|
|
11207
11094
|
|
|
11208
11095
|
// Callback function:
|
|
11209
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11096
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21::UniffiCallbackInterfaceStorageMethod21
|
|
11210
11097
|
//
|
|
11211
11098
|
// We have the following constraints:
|
|
11212
11099
|
// - we need to pass a function pointer to Rust.
|
|
@@ -11219,7 +11106,7 @@ static void cleanup() {
|
|
|
11219
11106
|
//
|
|
11220
11107
|
// We then give the `callback` function pointer to Rust which will call the
|
|
11221
11108
|
// lambda sometime in the future.
|
|
11222
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11109
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21 {
|
|
11223
11110
|
using namespace facebook;
|
|
11224
11111
|
|
|
11225
11112
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -11262,7 +11149,7 @@ static void body(jsi::Runtime &rt,
|
|
|
11262
11149
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
11263
11150
|
uniffiResult);
|
|
11264
11151
|
} catch (const jsi::JSError &error) {
|
|
11265
|
-
std::cout << "Error in callback
|
|
11152
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod21: "
|
|
11266
11153
|
<< error.what() << std::endl;
|
|
11267
11154
|
throw error;
|
|
11268
11155
|
}
|
|
@@ -11292,8 +11179,8 @@ callback(uint64_t rs_uniffiHandle,
|
|
|
11292
11179
|
rs_uniffiOutReturn);
|
|
11293
11180
|
}
|
|
11294
11181
|
|
|
11295
|
-
static
|
|
11296
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11182
|
+
static UniffiCallbackInterfaceStorageMethod21
|
|
11183
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
|
|
11297
11184
|
jsi::Runtime &rt,
|
|
11298
11185
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11299
11186
|
const jsi::Value &value) {
|
|
@@ -11339,12 +11226,12 @@ static void cleanup() {
|
|
|
11339
11226
|
// out, then the pointer will no longer be left dangling.
|
|
11340
11227
|
rsLambda = nullptr;
|
|
11341
11228
|
}
|
|
11342
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11229
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
|
|
11343
11230
|
// Implementation of callback function calling from Rust to JS
|
|
11344
|
-
//
|
|
11231
|
+
// CallbackInterfaceStorageMethod22
|
|
11345
11232
|
|
|
11346
11233
|
// Callback function:
|
|
11347
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11234
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::UniffiCallbackInterfaceStorageMethod22
|
|
11348
11235
|
//
|
|
11349
11236
|
// We have the following constraints:
|
|
11350
11237
|
// - we need to pass a function pointer to Rust.
|
|
@@ -11357,7 +11244,7 @@ static void cleanup() {
|
|
|
11357
11244
|
//
|
|
11358
11245
|
// We then give the `callback` function pointer to Rust which will call the
|
|
11359
11246
|
// lambda sometime in the future.
|
|
11360
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11247
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22 {
|
|
11361
11248
|
using namespace facebook;
|
|
11362
11249
|
|
|
11363
11250
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -11402,7 +11289,7 @@ static void body(jsi::Runtime &rt,
|
|
|
11402
11289
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
11403
11290
|
uniffiResult);
|
|
11404
11291
|
} catch (const jsi::JSError &error) {
|
|
11405
|
-
std::cout << "Error in callback
|
|
11292
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod22: "
|
|
11406
11293
|
<< error.what() << std::endl;
|
|
11407
11294
|
throw error;
|
|
11408
11295
|
}
|
|
@@ -11431,8 +11318,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
11431
11318
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
11432
11319
|
}
|
|
11433
11320
|
|
|
11434
|
-
static
|
|
11435
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11321
|
+
static UniffiCallbackInterfaceStorageMethod22
|
|
11322
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
|
|
11436
11323
|
jsi::Runtime &rt,
|
|
11437
11324
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11438
11325
|
const jsi::Value &value) {
|
|
@@ -11479,7 +11366,7 @@ static void cleanup() {
|
|
|
11479
11366
|
// out, then the pointer will no longer be left dangling.
|
|
11480
11367
|
rsLambda = nullptr;
|
|
11481
11368
|
}
|
|
11482
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11369
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
|
|
11483
11370
|
namespace uniffi::breez_sdk_spark {
|
|
11484
11371
|
using namespace facebook;
|
|
11485
11372
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
@@ -11840,99 +11727,67 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceStorage> {
|
|
|
11840
11727
|
rsObject.insert_payment = uniffi::breez_sdk_spark::cb::
|
|
11841
11728
|
callbackinterfacestoragemethod4::makeCallbackFunction(
|
|
11842
11729
|
rt, callInvoker, jsObject.getProperty(rt, "insertPayment"));
|
|
11843
|
-
rsObject.
|
|
11730
|
+
rsObject.insert_payment_metadata = uniffi::breez_sdk_spark::cb::
|
|
11844
11731
|
callbackinterfacestoragemethod5::makeCallbackFunction(
|
|
11845
|
-
rt, callInvoker, jsObject.getProperty(rt, "
|
|
11732
|
+
rt, callInvoker, jsObject.getProperty(rt, "insertPaymentMetadata"));
|
|
11846
11733
|
rsObject.get_payment_by_id = uniffi::breez_sdk_spark::cb::
|
|
11847
11734
|
callbackinterfacestoragemethod6::makeCallbackFunction(
|
|
11848
11735
|
rt, callInvoker, jsObject.getProperty(rt, "getPaymentById"));
|
|
11849
11736
|
rsObject.get_payment_by_invoice = uniffi::breez_sdk_spark::cb::
|
|
11850
11737
|
callbackinterfacestoragemethod7::makeCallbackFunction(
|
|
11851
11738
|
rt, callInvoker, jsObject.getProperty(rt, "getPaymentByInvoice"));
|
|
11852
|
-
rsObject.
|
|
11739
|
+
rsObject.get_payments_by_parent_ids = uniffi::breez_sdk_spark::cb::
|
|
11853
11740
|
callbackinterfacestoragemethod8::makeCallbackFunction(
|
|
11741
|
+
rt, callInvoker,
|
|
11742
|
+
jsObject.getProperty(rt, "getPaymentsByParentIds"));
|
|
11743
|
+
rsObject.add_deposit = uniffi::breez_sdk_spark::cb::
|
|
11744
|
+
callbackinterfacestoragemethod9::makeCallbackFunction(
|
|
11854
11745
|
rt, callInvoker, jsObject.getProperty(rt, "addDeposit"));
|
|
11855
11746
|
rsObject.delete_deposit = uniffi::breez_sdk_spark::cb::
|
|
11856
|
-
|
|
11747
|
+
callbackinterfacestoragemethod10::makeCallbackFunction(
|
|
11857
11748
|
rt, callInvoker, jsObject.getProperty(rt, "deleteDeposit"));
|
|
11858
11749
|
rsObject.list_deposits = uniffi::breez_sdk_spark::cb::
|
|
11859
|
-
|
|
11750
|
+
callbackinterfacestoragemethod11::makeCallbackFunction(
|
|
11860
11751
|
rt, callInvoker, jsObject.getProperty(rt, "listDeposits"));
|
|
11861
11752
|
rsObject.update_deposit = uniffi::breez_sdk_spark::cb::
|
|
11862
|
-
|
|
11753
|
+
callbackinterfacestoragemethod12::makeCallbackFunction(
|
|
11863
11754
|
rt, callInvoker, jsObject.getProperty(rt, "updateDeposit"));
|
|
11864
11755
|
rsObject.set_lnurl_metadata = uniffi::breez_sdk_spark::cb::
|
|
11865
|
-
|
|
11756
|
+
callbackinterfacestoragemethod13::makeCallbackFunction(
|
|
11866
11757
|
rt, callInvoker, jsObject.getProperty(rt, "setLnurlMetadata"));
|
|
11867
|
-
rsObject.uniffi_free =
|
|
11868
|
-
uniffi::breez_sdk_spark::st::vtablecallbackinterfacestorage::
|
|
11869
|
-
vtablecallbackinterfacestorage::free::makeCallbackFunction(
|
|
11870
|
-
rt, callInvoker, jsObject.getProperty(rt, "uniffiFree"));
|
|
11871
|
-
|
|
11872
|
-
return rsObject;
|
|
11873
|
-
}
|
|
11874
|
-
};
|
|
11875
|
-
|
|
11876
|
-
} // namespace uniffi::breez_sdk_spark
|
|
11877
|
-
namespace uniffi::breez_sdk_spark {
|
|
11878
|
-
using namespace facebook;
|
|
11879
|
-
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
11880
|
-
|
|
11881
|
-
template <> struct Bridging<UniffiVTableCallbackInterfaceSyncStorage> {
|
|
11882
|
-
static UniffiVTableCallbackInterfaceSyncStorage
|
|
11883
|
-
fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
|
|
11884
|
-
const jsi::Value &jsValue) {
|
|
11885
|
-
// Check if the input is an object
|
|
11886
|
-
if (!jsValue.isObject()) {
|
|
11887
|
-
throw jsi::JSError(
|
|
11888
|
-
rt,
|
|
11889
|
-
"Expected an object for UniffiVTableCallbackInterfaceSyncStorage");
|
|
11890
|
-
}
|
|
11891
|
-
|
|
11892
|
-
// Get the object from the jsi::Value
|
|
11893
|
-
auto jsObject = jsValue.getObject(rt);
|
|
11894
|
-
|
|
11895
|
-
// Create the vtable struct
|
|
11896
|
-
UniffiVTableCallbackInterfaceSyncStorage rsObject;
|
|
11897
|
-
|
|
11898
|
-
// Create the vtable from the js callbacks.
|
|
11899
11758
|
rsObject.add_outgoing_change = uniffi::breez_sdk_spark::cb::
|
|
11900
|
-
|
|
11759
|
+
callbackinterfacestoragemethod14::makeCallbackFunction(
|
|
11901
11760
|
rt, callInvoker, jsObject.getProperty(rt, "addOutgoingChange"));
|
|
11902
11761
|
rsObject.complete_outgoing_sync = uniffi::breez_sdk_spark::cb::
|
|
11903
|
-
|
|
11762
|
+
callbackinterfacestoragemethod15::makeCallbackFunction(
|
|
11904
11763
|
rt, callInvoker, jsObject.getProperty(rt, "completeOutgoingSync"));
|
|
11905
11764
|
rsObject.get_pending_outgoing_changes = uniffi::breez_sdk_spark::cb::
|
|
11906
|
-
|
|
11765
|
+
callbackinterfacestoragemethod16::makeCallbackFunction(
|
|
11907
11766
|
rt, callInvoker,
|
|
11908
11767
|
jsObject.getProperty(rt, "getPendingOutgoingChanges"));
|
|
11909
11768
|
rsObject.get_last_revision = uniffi::breez_sdk_spark::cb::
|
|
11910
|
-
|
|
11769
|
+
callbackinterfacestoragemethod17::makeCallbackFunction(
|
|
11911
11770
|
rt, callInvoker, jsObject.getProperty(rt, "getLastRevision"));
|
|
11912
11771
|
rsObject.insert_incoming_records = uniffi::breez_sdk_spark::cb::
|
|
11913
|
-
|
|
11772
|
+
callbackinterfacestoragemethod18::makeCallbackFunction(
|
|
11914
11773
|
rt, callInvoker, jsObject.getProperty(rt, "insertIncomingRecords"));
|
|
11915
11774
|
rsObject.delete_incoming_record = uniffi::breez_sdk_spark::cb::
|
|
11916
|
-
|
|
11775
|
+
callbackinterfacestoragemethod19::makeCallbackFunction(
|
|
11917
11776
|
rt, callInvoker, jsObject.getProperty(rt, "deleteIncomingRecord"));
|
|
11918
|
-
rsObject.rebase_pending_outgoing_records = uniffi::breez_sdk_spark::cb::
|
|
11919
|
-
callbackinterfacesyncstoragemethod6::makeCallbackFunction(
|
|
11920
|
-
rt, callInvoker,
|
|
11921
|
-
jsObject.getProperty(rt, "rebasePendingOutgoingRecords"));
|
|
11922
11777
|
rsObject.get_incoming_records = uniffi::breez_sdk_spark::cb::
|
|
11923
|
-
|
|
11778
|
+
callbackinterfacestoragemethod20::makeCallbackFunction(
|
|
11924
11779
|
rt, callInvoker, jsObject.getProperty(rt, "getIncomingRecords"));
|
|
11925
11780
|
rsObject.get_latest_outgoing_change = uniffi::breez_sdk_spark::cb::
|
|
11926
|
-
|
|
11781
|
+
callbackinterfacestoragemethod21::makeCallbackFunction(
|
|
11927
11782
|
rt, callInvoker,
|
|
11928
11783
|
jsObject.getProperty(rt, "getLatestOutgoingChange"));
|
|
11929
11784
|
rsObject.update_record_from_incoming = uniffi::breez_sdk_spark::cb::
|
|
11930
|
-
|
|
11785
|
+
callbackinterfacestoragemethod22::makeCallbackFunction(
|
|
11931
11786
|
rt, callInvoker,
|
|
11932
11787
|
jsObject.getProperty(rt, "updateRecordFromIncoming"));
|
|
11933
11788
|
rsObject.uniffi_free =
|
|
11934
|
-
uniffi::breez_sdk_spark::st::
|
|
11935
|
-
|
|
11789
|
+
uniffi::breez_sdk_spark::st::vtablecallbackinterfacestorage::
|
|
11790
|
+
vtablecallbackinterfacestorage::free::makeCallbackFunction(
|
|
11936
11791
|
rt, callInvoker, jsObject.getProperty(rt, "uniffiFree"));
|
|
11937
11792
|
|
|
11938
11793
|
return rsObject;
|
|
@@ -12117,6 +11972,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12117
11972
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(
|
|
12118
11973
|
rt, thisVal, args, count);
|
|
12119
11974
|
});
|
|
11975
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin"] =
|
|
11976
|
+
jsi::Function::createFromHostFunction(
|
|
11977
|
+
rt,
|
|
11978
|
+
jsi::PropNameID::forAscii(
|
|
11979
|
+
rt, "ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin"),
|
|
11980
|
+
2,
|
|
11981
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
11982
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
11983
|
+
return this
|
|
11984
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin(
|
|
11985
|
+
rt, thisVal, args, count);
|
|
11986
|
+
});
|
|
12120
11987
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_cancel_leaf_"
|
|
12121
11988
|
"optimization"] = jsi::Function::createFromHostFunction(
|
|
12122
11989
|
rt,
|
|
@@ -13069,18 +12936,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
13069
12936
|
->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_payment_observer(
|
|
13070
12937
|
rt, thisVal, args, count);
|
|
13071
12938
|
});
|
|
13072
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_real_time_sync_"
|
|
13073
|
-
"storage"] = jsi::Function::createFromHostFunction(
|
|
13074
|
-
rt,
|
|
13075
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13076
|
-
"sdkbuilder_with_real_time_sync_storage"),
|
|
13077
|
-
2,
|
|
13078
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13079
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13080
|
-
return this
|
|
13081
|
-
->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_real_time_sync_storage(
|
|
13082
|
-
rt, thisVal, args, count);
|
|
13083
|
-
});
|
|
13084
12939
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_"
|
|
13085
12940
|
"service"] = jsi::Function::createFromHostFunction(
|
|
13086
12941
|
rt,
|
|
@@ -13192,18 +13047,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
13192
13047
|
->cpp_uniffi_breez_sdk_spark_fn_method_storage_insert_payment(
|
|
13193
13048
|
rt, thisVal, args, count);
|
|
13194
13049
|
});
|
|
13195
|
-
props["
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13050
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_insert_payment_"
|
|
13051
|
+
"metadata"] = jsi::Function::createFromHostFunction(
|
|
13052
|
+
rt,
|
|
13053
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13054
|
+
"storage_insert_payment_metadata"),
|
|
13055
|
+
3,
|
|
13056
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13057
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13058
|
+
return this
|
|
13059
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_insert_payment_metadata(
|
|
13060
|
+
rt, thisVal, args, count);
|
|
13061
|
+
});
|
|
13207
13062
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id"] =
|
|
13208
13063
|
jsi::Function::createFromHostFunction(
|
|
13209
13064
|
rt,
|
|
@@ -13228,6 +13083,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
13228
13083
|
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
13229
13084
|
rt, thisVal, args, count);
|
|
13230
13085
|
});
|
|
13086
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_payments_by_parent_"
|
|
13087
|
+
"ids"] = jsi::Function::createFromHostFunction(
|
|
13088
|
+
rt,
|
|
13089
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13090
|
+
"storage_get_payments_by_parent_ids"),
|
|
13091
|
+
2,
|
|
13092
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13093
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13094
|
+
return this
|
|
13095
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payments_by_parent_ids(
|
|
13096
|
+
rt, thisVal, args, count);
|
|
13097
|
+
});
|
|
13231
13098
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_deposit"] =
|
|
13232
13099
|
jsi::Function::createFromHostFunction(
|
|
13233
13100
|
rt,
|
|
@@ -13291,147 +13158,112 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
13291
13158
|
->cpp_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
|
|
13292
13159
|
rt, thisVal, args, count);
|
|
13293
13160
|
});
|
|
13294
|
-
props["
|
|
13161
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change"] =
|
|
13295
13162
|
jsi::Function::createFromHostFunction(
|
|
13296
13163
|
rt,
|
|
13297
|
-
jsi::PropNameID::forAscii(
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13301
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13302
|
-
return this->cpp_uniffi_breez_sdk_spark_fn_clone_syncstorage(
|
|
13303
|
-
rt, thisVal, args, count);
|
|
13304
|
-
});
|
|
13305
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_free_syncstorage"] =
|
|
13306
|
-
jsi::Function::createFromHostFunction(
|
|
13307
|
-
rt,
|
|
13308
|
-
jsi::PropNameID::forAscii(
|
|
13309
|
-
rt, "ubrn_uniffi_breez_sdk_spark_fn_free_syncstorage"),
|
|
13310
|
-
1,
|
|
13164
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13165
|
+
"storage_add_outgoing_change"),
|
|
13166
|
+
2,
|
|
13311
13167
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13312
13168
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13313
|
-
return this
|
|
13314
|
-
|
|
13169
|
+
return this
|
|
13170
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(
|
|
13171
|
+
rt, thisVal, args, count);
|
|
13315
13172
|
});
|
|
13316
|
-
props["
|
|
13317
|
-
"change"] = jsi::Function::createFromHostFunction(
|
|
13318
|
-
rt,
|
|
13319
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13320
|
-
"syncstorage_add_outgoing_change"),
|
|
13321
|
-
2,
|
|
13322
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13323
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13324
|
-
return this
|
|
13325
|
-
->cpp_uniffi_breez_sdk_spark_fn_method_syncstorage_add_outgoing_change(
|
|
13326
|
-
rt, thisVal, args, count);
|
|
13327
|
-
});
|
|
13328
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_method_syncstorage_complete_outgoing_"
|
|
13173
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_"
|
|
13329
13174
|
"sync"] = jsi::Function::createFromHostFunction(
|
|
13330
13175
|
rt,
|
|
13331
13176
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13332
|
-
"
|
|
13333
|
-
|
|
13177
|
+
"storage_complete_outgoing_sync"),
|
|
13178
|
+
3,
|
|
13334
13179
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13335
13180
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13336
13181
|
return this
|
|
13337
|
-
->
|
|
13182
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_sync(
|
|
13338
13183
|
rt, thisVal, args, count);
|
|
13339
13184
|
});
|
|
13340
|
-
props["
|
|
13341
|
-
"
|
|
13185
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_"
|
|
13186
|
+
"changes"] = jsi::Function::createFromHostFunction(
|
|
13342
13187
|
rt,
|
|
13343
13188
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13344
|
-
"
|
|
13189
|
+
"storage_get_pending_outgoing_changes"),
|
|
13345
13190
|
2,
|
|
13346
13191
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13347
13192
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13348
13193
|
return this
|
|
13349
|
-
->
|
|
13194
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_changes(
|
|
13350
13195
|
rt, thisVal, args, count);
|
|
13351
13196
|
});
|
|
13352
|
-
props["
|
|
13197
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_last_revision"] =
|
|
13353
13198
|
jsi::Function::createFromHostFunction(
|
|
13354
13199
|
rt,
|
|
13355
13200
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13356
|
-
"
|
|
13201
|
+
"storage_get_last_revision"),
|
|
13357
13202
|
1,
|
|
13358
13203
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13359
13204
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13360
13205
|
return this
|
|
13361
|
-
->
|
|
13206
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_last_revision(
|
|
13362
13207
|
rt, thisVal, args, count);
|
|
13363
|
-
});
|
|
13364
|
-
props["
|
|
13365
|
-
"records"] = jsi::Function::createFromHostFunction(
|
|
13366
|
-
rt,
|
|
13367
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13368
|
-
"syncstorage_insert_incoming_records"),
|
|
13369
|
-
2,
|
|
13370
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13371
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13372
|
-
return this
|
|
13373
|
-
->cpp_uniffi_breez_sdk_spark_fn_method_syncstorage_insert_incoming_records(
|
|
13374
|
-
rt, thisVal, args, count);
|
|
13375
|
-
});
|
|
13376
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_method_syncstorage_delete_incoming_"
|
|
13377
|
-
"record"] = jsi::Function::createFromHostFunction(
|
|
13208
|
+
});
|
|
13209
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_insert_incoming_"
|
|
13210
|
+
"records"] = jsi::Function::createFromHostFunction(
|
|
13378
13211
|
rt,
|
|
13379
13212
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13380
|
-
"
|
|
13381
|
-
2,
|
|
13382
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13383
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13384
|
-
return this
|
|
13385
|
-
->cpp_uniffi_breez_sdk_spark_fn_method_syncstorage_delete_incoming_record(
|
|
13386
|
-
rt, thisVal, args, count);
|
|
13387
|
-
});
|
|
13388
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_method_syncstorage_rebase_pending_"
|
|
13389
|
-
"outgoing_records"] = jsi::Function::createFromHostFunction(
|
|
13390
|
-
rt,
|
|
13391
|
-
jsi::PropNameID::forAscii(rt,
|
|
13392
|
-
"ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13393
|
-
"syncstorage_rebase_pending_outgoing_records"),
|
|
13213
|
+
"storage_insert_incoming_records"),
|
|
13394
13214
|
2,
|
|
13395
13215
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13396
13216
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13397
13217
|
return this
|
|
13398
|
-
->
|
|
13218
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_insert_incoming_records(
|
|
13399
13219
|
rt, thisVal, args, count);
|
|
13400
13220
|
});
|
|
13401
|
-
props["
|
|
13402
|
-
"
|
|
13221
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_incoming_"
|
|
13222
|
+
"record"] = jsi::Function::createFromHostFunction(
|
|
13403
13223
|
rt,
|
|
13404
13224
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13405
|
-
"
|
|
13225
|
+
"storage_delete_incoming_record"),
|
|
13406
13226
|
2,
|
|
13407
13227
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13408
13228
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13409
13229
|
return this
|
|
13410
|
-
->
|
|
13230
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_delete_incoming_record(
|
|
13411
13231
|
rt, thisVal, args, count);
|
|
13412
13232
|
});
|
|
13413
|
-
props["
|
|
13233
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_incoming_records"] =
|
|
13234
|
+
jsi::Function::createFromHostFunction(
|
|
13235
|
+
rt,
|
|
13236
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13237
|
+
"storage_get_incoming_records"),
|
|
13238
|
+
2,
|
|
13239
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13240
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13241
|
+
return this
|
|
13242
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_incoming_records(
|
|
13243
|
+
rt, thisVal, args, count);
|
|
13244
|
+
});
|
|
13245
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_latest_outgoing_"
|
|
13414
13246
|
"change"] = jsi::Function::createFromHostFunction(
|
|
13415
13247
|
rt,
|
|
13416
13248
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13417
|
-
"
|
|
13249
|
+
"storage_get_latest_outgoing_change"),
|
|
13418
13250
|
1,
|
|
13419
13251
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13420
13252
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13421
13253
|
return this
|
|
13422
|
-
->
|
|
13254
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_latest_outgoing_change(
|
|
13423
13255
|
rt, thisVal, args, count);
|
|
13424
13256
|
});
|
|
13425
|
-
props["
|
|
13257
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_record_from_"
|
|
13426
13258
|
"incoming"] = jsi::Function::createFromHostFunction(
|
|
13427
13259
|
rt,
|
|
13428
13260
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
13429
|
-
"
|
|
13261
|
+
"storage_update_record_from_incoming"),
|
|
13430
13262
|
2,
|
|
13431
13263
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13432
13264
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13433
13265
|
return this
|
|
13434
|
-
->
|
|
13266
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_update_record_from_incoming(
|
|
13435
13267
|
rt, thisVal, args, count);
|
|
13436
13268
|
});
|
|
13437
13269
|
props["ubrn_uniffi_breez_sdk_spark_fn_clone_tokenissuer"] =
|
|
@@ -13586,6 +13418,17 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
13586
13418
|
->cpp_uniffi_breez_sdk_spark_fn_func_default_external_signer(
|
|
13587
13419
|
rt, thisVal, args, count);
|
|
13588
13420
|
});
|
|
13421
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_func_get_spark_status"] =
|
|
13422
|
+
jsi::Function::createFromHostFunction(
|
|
13423
|
+
rt,
|
|
13424
|
+
jsi::PropNameID::forAscii(
|
|
13425
|
+
rt, "ubrn_uniffi_breez_sdk_spark_fn_func_get_spark_status"),
|
|
13426
|
+
0,
|
|
13427
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13428
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13429
|
+
return this->cpp_uniffi_breez_sdk_spark_fn_func_get_spark_status(
|
|
13430
|
+
rt, thisVal, args, count);
|
|
13431
|
+
});
|
|
13589
13432
|
props["ubrn_uniffi_breez_sdk_spark_fn_func_init_logging"] =
|
|
13590
13433
|
jsi::Function::createFromHostFunction(
|
|
13591
13434
|
rt,
|
|
@@ -14218,6 +14061,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
14218
14061
|
->cpp_uniffi_breez_sdk_spark_checksum_func_default_external_signer(
|
|
14219
14062
|
rt, thisVal, args, count);
|
|
14220
14063
|
});
|
|
14064
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_func_get_spark_status"] =
|
|
14065
|
+
jsi::Function::createFromHostFunction(
|
|
14066
|
+
rt,
|
|
14067
|
+
jsi::PropNameID::forAscii(
|
|
14068
|
+
rt, "ubrn_uniffi_breez_sdk_spark_checksum_func_get_spark_status"),
|
|
14069
|
+
0,
|
|
14070
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
14071
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
14072
|
+
return this
|
|
14073
|
+
->cpp_uniffi_breez_sdk_spark_checksum_func_get_spark_status(
|
|
14074
|
+
rt, thisVal, args, count);
|
|
14075
|
+
});
|
|
14221
14076
|
props["ubrn_uniffi_breez_sdk_spark_checksum_func_init_logging"] =
|
|
14222
14077
|
jsi::Function::createFromHostFunction(
|
|
14223
14078
|
rt,
|
|
@@ -14306,6 +14161,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
14306
14161
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(
|
|
14307
14162
|
rt, thisVal, args, count);
|
|
14308
14163
|
});
|
|
14164
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin"] =
|
|
14165
|
+
jsi::Function::createFromHostFunction(
|
|
14166
|
+
rt,
|
|
14167
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
14168
|
+
"method_breezsdk_buy_bitcoin"),
|
|
14169
|
+
0,
|
|
14170
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
14171
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
14172
|
+
return this
|
|
14173
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin(
|
|
14174
|
+
rt, thisVal, args, count);
|
|
14175
|
+
});
|
|
14309
14176
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_cancel_leaf_"
|
|
14310
14177
|
"optimization"] = jsi::Function::createFromHostFunction(
|
|
14311
14178
|
rt,
|
|
@@ -15139,19 +15006,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15139
15006
|
->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer(
|
|
15140
15007
|
rt, thisVal, args, count);
|
|
15141
15008
|
});
|
|
15142
|
-
props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_real_time_"
|
|
15143
|
-
"sync_storage"] = jsi::Function::createFromHostFunction(
|
|
15144
|
-
rt,
|
|
15145
|
-
jsi::PropNameID::forAscii(rt,
|
|
15146
|
-
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
15147
|
-
"sdkbuilder_with_real_time_sync_storage"),
|
|
15148
|
-
0,
|
|
15149
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15150
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15151
|
-
return this
|
|
15152
|
-
->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_real_time_sync_storage(
|
|
15153
|
-
rt, thisVal, args, count);
|
|
15154
|
-
});
|
|
15155
15009
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_"
|
|
15156
15010
|
"chain_service"] = jsi::Function::createFromHostFunction(
|
|
15157
15011
|
rt,
|
|
@@ -15237,16 +15091,16 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15237
15091
|
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment(
|
|
15238
15092
|
rt, thisVal, args, count);
|
|
15239
15093
|
});
|
|
15240
|
-
props["
|
|
15094
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_"
|
|
15241
15095
|
"metadata"] = jsi::Function::createFromHostFunction(
|
|
15242
15096
|
rt,
|
|
15243
15097
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15244
|
-
"
|
|
15098
|
+
"method_storage_insert_payment_metadata"),
|
|
15245
15099
|
0,
|
|
15246
15100
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15247
15101
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15248
15102
|
return this
|
|
15249
|
-
->
|
|
15103
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata(
|
|
15250
15104
|
rt, thisVal, args, count);
|
|
15251
15105
|
});
|
|
15252
15106
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_"
|
|
@@ -15273,6 +15127,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15273
15127
|
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice(
|
|
15274
15128
|
rt, thisVal, args, count);
|
|
15275
15129
|
});
|
|
15130
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_"
|
|
15131
|
+
"parent_ids"] = jsi::Function::createFromHostFunction(
|
|
15132
|
+
rt,
|
|
15133
|
+
jsi::PropNameID::forAscii(rt,
|
|
15134
|
+
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
15135
|
+
"storage_get_payments_by_parent_ids"),
|
|
15136
|
+
0,
|
|
15137
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15138
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15139
|
+
return this
|
|
15140
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids(
|
|
15141
|
+
rt, thisVal, args, count);
|
|
15142
|
+
});
|
|
15276
15143
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit"] =
|
|
15277
15144
|
jsi::Function::createFromHostFunction(
|
|
15278
15145
|
rt,
|
|
@@ -15333,131 +15200,115 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15333
15200
|
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata(
|
|
15334
15201
|
rt, thisVal, args, count);
|
|
15335
15202
|
});
|
|
15336
|
-
props["
|
|
15203
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_"
|
|
15337
15204
|
"change"] = jsi::Function::createFromHostFunction(
|
|
15338
15205
|
rt,
|
|
15339
15206
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15340
|
-
"
|
|
15207
|
+
"method_storage_add_outgoing_change"),
|
|
15341
15208
|
0,
|
|
15342
15209
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15343
15210
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15344
15211
|
return this
|
|
15345
|
-
->
|
|
15212
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change(
|
|
15346
15213
|
rt, thisVal, args, count);
|
|
15347
15214
|
});
|
|
15348
|
-
props["
|
|
15349
|
-
"
|
|
15215
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_"
|
|
15216
|
+
"sync"] = jsi::Function::createFromHostFunction(
|
|
15350
15217
|
rt,
|
|
15351
|
-
jsi::PropNameID::forAscii(rt,
|
|
15352
|
-
|
|
15353
|
-
"syncstorage_complete_outgoing_sync"),
|
|
15218
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15219
|
+
"method_storage_complete_outgoing_sync"),
|
|
15354
15220
|
0,
|
|
15355
15221
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15356
15222
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15357
15223
|
return this
|
|
15358
|
-
->
|
|
15224
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync(
|
|
15359
15225
|
rt, thisVal, args, count);
|
|
15360
15226
|
});
|
|
15361
|
-
props["
|
|
15227
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_pending_"
|
|
15362
15228
|
"outgoing_changes"] = jsi::Function::createFromHostFunction(
|
|
15363
15229
|
rt,
|
|
15364
15230
|
jsi::PropNameID::forAscii(rt,
|
|
15365
15231
|
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
15366
|
-
"
|
|
15232
|
+
"storage_get_pending_outgoing_changes"),
|
|
15367
15233
|
0,
|
|
15368
15234
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15369
15235
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15370
15236
|
return this
|
|
15371
|
-
->
|
|
15237
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes(
|
|
15372
15238
|
rt, thisVal, args, count);
|
|
15373
15239
|
});
|
|
15374
|
-
props["
|
|
15240
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_last_"
|
|
15375
15241
|
"revision"] = jsi::Function::createFromHostFunction(
|
|
15376
15242
|
rt,
|
|
15377
15243
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15378
|
-
"
|
|
15379
|
-
0,
|
|
15380
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15381
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15382
|
-
return this
|
|
15383
|
-
->cpp_uniffi_breez_sdk_spark_checksum_method_syncstorage_get_last_revision(
|
|
15384
|
-
rt, thisVal, args, count);
|
|
15385
|
-
});
|
|
15386
|
-
props["ubrn_uniffi_breez_sdk_spark_checksum_method_syncstorage_insert_"
|
|
15387
|
-
"incoming_records"] = jsi::Function::createFromHostFunction(
|
|
15388
|
-
rt,
|
|
15389
|
-
jsi::PropNameID::forAscii(rt,
|
|
15390
|
-
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
15391
|
-
"syncstorage_insert_incoming_records"),
|
|
15244
|
+
"method_storage_get_last_revision"),
|
|
15392
15245
|
0,
|
|
15393
15246
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15394
15247
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15395
15248
|
return this
|
|
15396
|
-
->
|
|
15249
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision(
|
|
15397
15250
|
rt, thisVal, args, count);
|
|
15398
15251
|
});
|
|
15399
|
-
props["
|
|
15400
|
-
"
|
|
15252
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_"
|
|
15253
|
+
"records"] = jsi::Function::createFromHostFunction(
|
|
15401
15254
|
rt,
|
|
15402
|
-
jsi::PropNameID::forAscii(rt,
|
|
15403
|
-
|
|
15404
|
-
"syncstorage_delete_incoming_record"),
|
|
15255
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15256
|
+
"method_storage_insert_incoming_records"),
|
|
15405
15257
|
0,
|
|
15406
15258
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15407
15259
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15408
15260
|
return this
|
|
15409
|
-
->
|
|
15261
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records(
|
|
15410
15262
|
rt, thisVal, args, count);
|
|
15411
15263
|
});
|
|
15412
|
-
props["
|
|
15413
|
-
"
|
|
15264
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_"
|
|
15265
|
+
"record"] = jsi::Function::createFromHostFunction(
|
|
15414
15266
|
rt,
|
|
15415
|
-
jsi::PropNameID::forAscii(rt,
|
|
15416
|
-
|
|
15417
|
-
"syncstorage_rebase_pending_outgoing_records"),
|
|
15267
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15268
|
+
"method_storage_delete_incoming_record"),
|
|
15418
15269
|
0,
|
|
15419
15270
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15420
15271
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15421
15272
|
return this
|
|
15422
|
-
->
|
|
15273
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record(
|
|
15423
15274
|
rt, thisVal, args, count);
|
|
15424
15275
|
});
|
|
15425
|
-
props["
|
|
15276
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_"
|
|
15426
15277
|
"records"] = jsi::Function::createFromHostFunction(
|
|
15427
15278
|
rt,
|
|
15428
15279
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15429
|
-
"
|
|
15280
|
+
"method_storage_get_incoming_records"),
|
|
15430
15281
|
0,
|
|
15431
15282
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15432
15283
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15433
15284
|
return this
|
|
15434
|
-
->
|
|
15285
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records(
|
|
15435
15286
|
rt, thisVal, args, count);
|
|
15436
15287
|
});
|
|
15437
|
-
props["
|
|
15288
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_latest_"
|
|
15438
15289
|
"outgoing_change"] = jsi::Function::createFromHostFunction(
|
|
15439
15290
|
rt,
|
|
15440
15291
|
jsi::PropNameID::forAscii(rt,
|
|
15441
15292
|
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
15442
|
-
"
|
|
15293
|
+
"storage_get_latest_outgoing_change"),
|
|
15443
15294
|
0,
|
|
15444
15295
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15445
15296
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15446
15297
|
return this
|
|
15447
|
-
->
|
|
15298
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change(
|
|
15448
15299
|
rt, thisVal, args, count);
|
|
15449
15300
|
});
|
|
15450
|
-
props["
|
|
15301
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_record_"
|
|
15451
15302
|
"from_incoming"] = jsi::Function::createFromHostFunction(
|
|
15452
15303
|
rt,
|
|
15453
15304
|
jsi::PropNameID::forAscii(rt,
|
|
15454
15305
|
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
15455
|
-
"
|
|
15306
|
+
"storage_update_record_from_incoming"),
|
|
15456
15307
|
0,
|
|
15457
15308
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15458
15309
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15459
15310
|
return this
|
|
15460
|
-
->
|
|
15311
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming(
|
|
15461
15312
|
rt, thisVal, args, count);
|
|
15462
15313
|
});
|
|
15463
15314
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_"
|
|
@@ -15690,18 +15541,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15690
15541
|
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
15691
15542
|
rt, thisVal, args, count);
|
|
15692
15543
|
});
|
|
15693
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_syncstorage"] =
|
|
15694
|
-
jsi::Function::createFromHostFunction(
|
|
15695
|
-
rt,
|
|
15696
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
15697
|
-
"callback_vtable_syncstorage"),
|
|
15698
|
-
1,
|
|
15699
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15700
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15701
|
-
return this
|
|
15702
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_syncstorage(
|
|
15703
|
-
rt, thisVal, args, count);
|
|
15704
|
-
});
|
|
15705
15544
|
props["ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_"
|
|
15706
15545
|
"pointer"] = jsi::Function::createFromHostFunction(
|
|
15707
15546
|
rt,
|
|
@@ -15801,19 +15640,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15801
15640
|
->cpp_uniffi_internal_fn_method_storage_ffi__bless_pointer(
|
|
15802
15641
|
rt, thisVal, args, count);
|
|
15803
15642
|
});
|
|
15804
|
-
props["ubrn_uniffi_internal_fn_method_syncstorage_ffi__bless_pointer"] =
|
|
15805
|
-
jsi::Function::createFromHostFunction(
|
|
15806
|
-
rt,
|
|
15807
|
-
jsi::PropNameID::forAscii(
|
|
15808
|
-
rt,
|
|
15809
|
-
"ubrn_uniffi_internal_fn_method_syncstorage_ffi__bless_pointer"),
|
|
15810
|
-
1,
|
|
15811
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15812
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15813
|
-
return this
|
|
15814
|
-
->cpp_uniffi_internal_fn_method_syncstorage_ffi__bless_pointer(
|
|
15815
|
-
rt, thisVal, args, count);
|
|
15816
|
-
});
|
|
15817
15643
|
props["ubrn_uniffi_internal_fn_method_tokenissuer_ffi__bless_pointer"] =
|
|
15818
15644
|
jsi::Function::createFromHostFunction(
|
|
15819
15645
|
rt,
|
|
@@ -15886,8 +15712,6 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
|
|
|
15886
15712
|
vtablecallbackinterfacerestclient::free::cleanup();
|
|
15887
15713
|
uniffi::breez_sdk_spark::st::vtablecallbackinterfacestorage::
|
|
15888
15714
|
vtablecallbackinterfacestorage::free::cleanup();
|
|
15889
|
-
uniffi::breez_sdk_spark::st::vtablecallbackinterfacesyncstorage::
|
|
15890
|
-
vtablecallbackinterfacesyncstorage::free::cleanup();
|
|
15891
15715
|
// Cleanup for callback function CallbackInterfaceEventListenerMethod0
|
|
15892
15716
|
uniffi::breez_sdk_spark::cb::callbackinterfaceeventlistenermethod0::cleanup();
|
|
15893
15717
|
// Cleanup for callback function CallbackInterfaceLoggerMethod0
|
|
@@ -16006,26 +15830,26 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
|
|
|
16006
15830
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11::cleanup();
|
|
16007
15831
|
// Cleanup for callback function CallbackInterfaceStorageMethod12
|
|
16008
15832
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod12::cleanup();
|
|
16009
|
-
// Cleanup for callback function
|
|
16010
|
-
uniffi::breez_sdk_spark::cb::
|
|
16011
|
-
// Cleanup for callback function
|
|
16012
|
-
uniffi::breez_sdk_spark::cb::
|
|
16013
|
-
// Cleanup for callback function
|
|
16014
|
-
uniffi::breez_sdk_spark::cb::
|
|
16015
|
-
// Cleanup for callback function
|
|
16016
|
-
uniffi::breez_sdk_spark::cb::
|
|
16017
|
-
// Cleanup for callback function
|
|
16018
|
-
uniffi::breez_sdk_spark::cb::
|
|
16019
|
-
// Cleanup for callback function
|
|
16020
|
-
uniffi::breez_sdk_spark::cb::
|
|
16021
|
-
// Cleanup for callback function
|
|
16022
|
-
uniffi::breez_sdk_spark::cb::
|
|
16023
|
-
// Cleanup for callback function
|
|
16024
|
-
uniffi::breez_sdk_spark::cb::
|
|
16025
|
-
// Cleanup for callback function
|
|
16026
|
-
uniffi::breez_sdk_spark::cb::
|
|
16027
|
-
// Cleanup for callback function
|
|
16028
|
-
uniffi::breez_sdk_spark::cb::
|
|
15833
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod13
|
|
15834
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod13::cleanup();
|
|
15835
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod14
|
|
15836
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod14::cleanup();
|
|
15837
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod15
|
|
15838
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod15::cleanup();
|
|
15839
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod16
|
|
15840
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod16::cleanup();
|
|
15841
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod17
|
|
15842
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17::cleanup();
|
|
15843
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod18
|
|
15844
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18::cleanup();
|
|
15845
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod19
|
|
15846
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19::cleanup();
|
|
15847
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod20
|
|
15848
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20::cleanup();
|
|
15849
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod21
|
|
15850
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21::cleanup();
|
|
15851
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod22
|
|
15852
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::cleanup();
|
|
16029
15853
|
}
|
|
16030
15854
|
|
|
16031
15855
|
// Utility functions for serialization/deserialization of strings.
|
|
@@ -16177,22 +16001,6 @@ NativeBreezSdkSpark::cpp_uniffi_internal_fn_method_storage_ffi__bless_pointer(
|
|
|
16177
16001
|
auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
|
|
16178
16002
|
return jsi::Value(rt, obj);
|
|
16179
16003
|
}
|
|
16180
|
-
jsi::Value NativeBreezSdkSpark::
|
|
16181
|
-
cpp_uniffi_internal_fn_method_syncstorage_ffi__bless_pointer(
|
|
16182
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
16183
|
-
size_t count) {
|
|
16184
|
-
auto pointer =
|
|
16185
|
-
uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
|
|
16186
|
-
auto static destructor = [](uint64_t p) {
|
|
16187
|
-
auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
|
|
16188
|
-
RustCallStatus status = {0};
|
|
16189
|
-
uniffi_breez_sdk_spark_fn_free_syncstorage(pointer, &status);
|
|
16190
|
-
};
|
|
16191
|
-
auto ptrObj =
|
|
16192
|
-
std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
|
|
16193
|
-
auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
|
|
16194
|
-
return jsi::Value(rt, obj);
|
|
16195
|
-
}
|
|
16196
16004
|
jsi::Value NativeBreezSdkSpark::
|
|
16197
16005
|
cpp_uniffi_internal_fn_method_tokenissuer_ffi__bless_pointer(
|
|
16198
16006
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16335,6 +16143,18 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
16335
16143
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
16336
16144
|
value);
|
|
16337
16145
|
}
|
|
16146
|
+
jsi::Value
|
|
16147
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin(
|
|
16148
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
16149
|
+
size_t count) {
|
|
16150
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_buy_bitcoin(
|
|
16151
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
16152
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
16153
|
+
args[1]));
|
|
16154
|
+
|
|
16155
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
16156
|
+
value);
|
|
16157
|
+
}
|
|
16338
16158
|
jsi::Value NativeBreezSdkSpark::
|
|
16339
16159
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_cancel_leaf_optimization(
|
|
16340
16160
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -17317,18 +17137,6 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17317
17137
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17318
17138
|
value);
|
|
17319
17139
|
}
|
|
17320
|
-
jsi::Value NativeBreezSdkSpark::
|
|
17321
|
-
cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_real_time_sync_storage(
|
|
17322
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17323
|
-
size_t count) {
|
|
17324
|
-
auto value =
|
|
17325
|
-
uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_real_time_sync_storage(
|
|
17326
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17327
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[1]));
|
|
17328
|
-
|
|
17329
|
-
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17330
|
-
value);
|
|
17331
|
-
}
|
|
17332
17140
|
jsi::Value NativeBreezSdkSpark::
|
|
17333
17141
|
cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
|
|
17334
17142
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -17444,10 +17252,10 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17444
17252
|
value);
|
|
17445
17253
|
}
|
|
17446
17254
|
jsi::Value NativeBreezSdkSpark::
|
|
17447
|
-
|
|
17255
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_insert_payment_metadata(
|
|
17448
17256
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17449
17257
|
size_t count) {
|
|
17450
|
-
auto value =
|
|
17258
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_insert_payment_metadata(
|
|
17451
17259
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17452
17260
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17453
17261
|
args[1]),
|
|
@@ -17481,6 +17289,19 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17481
17289
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17482
17290
|
value);
|
|
17483
17291
|
}
|
|
17292
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17293
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payments_by_parent_ids(
|
|
17294
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17295
|
+
size_t count) {
|
|
17296
|
+
auto value =
|
|
17297
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_payments_by_parent_ids(
|
|
17298
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17299
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17300
|
+
args[1]));
|
|
17301
|
+
|
|
17302
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17303
|
+
value);
|
|
17304
|
+
}
|
|
17484
17305
|
jsi::Value
|
|
17485
17306
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
17486
17307
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -17545,35 +17366,11 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17545
17366
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17546
17367
|
value);
|
|
17547
17368
|
}
|
|
17548
|
-
jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_syncstorage(
|
|
17549
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17550
|
-
size_t count) {
|
|
17551
|
-
RustCallStatus status =
|
|
17552
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
17553
|
-
auto value = uniffi_breez_sdk_spark_fn_clone_syncstorage(
|
|
17554
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
|
|
17555
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
17556
|
-
rt, callInvoker, status, args[count - 1]);
|
|
17557
|
-
|
|
17558
|
-
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
17559
|
-
}
|
|
17560
|
-
jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_syncstorage(
|
|
17561
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17562
|
-
size_t count) {
|
|
17563
|
-
RustCallStatus status =
|
|
17564
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
17565
|
-
uniffi_breez_sdk_spark_fn_free_syncstorage(
|
|
17566
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
|
|
17567
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
17568
|
-
rt, callInvoker, status, args[count - 1]);
|
|
17569
|
-
|
|
17570
|
-
return jsi::Value::undefined();
|
|
17571
|
-
}
|
|
17572
17369
|
jsi::Value NativeBreezSdkSpark::
|
|
17573
|
-
|
|
17370
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(
|
|
17574
17371
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17575
17372
|
size_t count) {
|
|
17576
|
-
auto value =
|
|
17373
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(
|
|
17577
17374
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17578
17375
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17579
17376
|
args[1]));
|
|
@@ -17582,24 +17379,24 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17582
17379
|
value);
|
|
17583
17380
|
}
|
|
17584
17381
|
jsi::Value NativeBreezSdkSpark::
|
|
17585
|
-
|
|
17382
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_sync(
|
|
17586
17383
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17587
17384
|
size_t count) {
|
|
17588
|
-
auto value =
|
|
17589
|
-
|
|
17590
|
-
|
|
17591
|
-
|
|
17592
|
-
|
|
17385
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_complete_outgoing_sync(
|
|
17386
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17387
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17388
|
+
args[1]),
|
|
17389
|
+
uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[2]));
|
|
17593
17390
|
|
|
17594
17391
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17595
17392
|
value);
|
|
17596
17393
|
}
|
|
17597
17394
|
jsi::Value NativeBreezSdkSpark::
|
|
17598
|
-
|
|
17395
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_changes(
|
|
17599
17396
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17600
17397
|
size_t count) {
|
|
17601
17398
|
auto value =
|
|
17602
|
-
|
|
17399
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_pending_outgoing_changes(
|
|
17603
17400
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17604
17401
|
uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[1]));
|
|
17605
17402
|
|
|
@@ -17607,82 +17404,67 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17607
17404
|
value);
|
|
17608
17405
|
}
|
|
17609
17406
|
jsi::Value NativeBreezSdkSpark::
|
|
17610
|
-
|
|
17407
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_get_last_revision(
|
|
17611
17408
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17612
17409
|
size_t count) {
|
|
17613
|
-
auto value =
|
|
17410
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_get_last_revision(
|
|
17614
17411
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
|
|
17615
17412
|
|
|
17616
17413
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17617
17414
|
value);
|
|
17618
17415
|
}
|
|
17619
17416
|
jsi::Value NativeBreezSdkSpark::
|
|
17620
|
-
|
|
17621
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17622
|
-
size_t count) {
|
|
17623
|
-
auto value =
|
|
17624
|
-
uniffi_breez_sdk_spark_fn_method_syncstorage_insert_incoming_records(
|
|
17625
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17626
|
-
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17627
|
-
args[1]));
|
|
17628
|
-
|
|
17629
|
-
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17630
|
-
value);
|
|
17631
|
-
}
|
|
17632
|
-
jsi::Value NativeBreezSdkSpark::
|
|
17633
|
-
cpp_uniffi_breez_sdk_spark_fn_method_syncstorage_delete_incoming_record(
|
|
17417
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_insert_incoming_records(
|
|
17634
17418
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17635
17419
|
size_t count) {
|
|
17636
|
-
auto value =
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
|
|
17640
|
-
args[1]));
|
|
17420
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_insert_incoming_records(
|
|
17421
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17422
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17423
|
+
args[1]));
|
|
17641
17424
|
|
|
17642
17425
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17643
17426
|
value);
|
|
17644
17427
|
}
|
|
17645
17428
|
jsi::Value NativeBreezSdkSpark::
|
|
17646
|
-
|
|
17429
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_delete_incoming_record(
|
|
17647
17430
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17648
17431
|
size_t count) {
|
|
17649
|
-
auto value =
|
|
17650
|
-
|
|
17651
|
-
|
|
17652
|
-
|
|
17432
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_delete_incoming_record(
|
|
17433
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17434
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17435
|
+
args[1]));
|
|
17653
17436
|
|
|
17654
17437
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17655
17438
|
value);
|
|
17656
17439
|
}
|
|
17657
17440
|
jsi::Value NativeBreezSdkSpark::
|
|
17658
|
-
|
|
17441
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_get_incoming_records(
|
|
17659
17442
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17660
17443
|
size_t count) {
|
|
17661
|
-
auto value =
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[1]));
|
|
17444
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_get_incoming_records(
|
|
17445
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17446
|
+
uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[1]));
|
|
17665
17447
|
|
|
17666
17448
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17667
17449
|
value);
|
|
17668
17450
|
}
|
|
17669
17451
|
jsi::Value NativeBreezSdkSpark::
|
|
17670
|
-
|
|
17452
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_get_latest_outgoing_change(
|
|
17671
17453
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17672
17454
|
size_t count) {
|
|
17673
17455
|
auto value =
|
|
17674
|
-
|
|
17456
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_latest_outgoing_change(
|
|
17675
17457
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
|
|
17676
17458
|
|
|
17677
17459
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17678
17460
|
value);
|
|
17679
17461
|
}
|
|
17680
17462
|
jsi::Value NativeBreezSdkSpark::
|
|
17681
|
-
|
|
17463
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_update_record_from_incoming(
|
|
17682
17464
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17683
17465
|
size_t count) {
|
|
17684
17466
|
auto value =
|
|
17685
|
-
|
|
17467
|
+
uniffi_breez_sdk_spark_fn_method_storage_update_record_from_incoming(
|
|
17686
17468
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17687
17469
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17688
17470
|
args[1]));
|
|
@@ -17855,6 +17637,15 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_default_external_signer(
|
|
|
17855
17637
|
|
|
17856
17638
|
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
17857
17639
|
}
|
|
17640
|
+
jsi::Value
|
|
17641
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_get_spark_status(
|
|
17642
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17643
|
+
size_t count) {
|
|
17644
|
+
auto value = uniffi_breez_sdk_spark_fn_func_get_spark_status();
|
|
17645
|
+
|
|
17646
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17647
|
+
value);
|
|
17648
|
+
}
|
|
17858
17649
|
jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_init_logging(
|
|
17859
17650
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17860
17651
|
size_t count) {
|
|
@@ -18522,6 +18313,14 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
18522
18313
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18523
18314
|
}
|
|
18524
18315
|
jsi::Value
|
|
18316
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_checksum_func_get_spark_status(
|
|
18317
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18318
|
+
size_t count) {
|
|
18319
|
+
auto value = uniffi_breez_sdk_spark_checksum_func_get_spark_status();
|
|
18320
|
+
|
|
18321
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18322
|
+
}
|
|
18323
|
+
jsi::Value
|
|
18525
18324
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_checksum_func_init_logging(
|
|
18526
18325
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18527
18326
|
size_t count) {
|
|
@@ -18583,6 +18382,14 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
18583
18382
|
|
|
18584
18383
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18585
18384
|
}
|
|
18385
|
+
jsi::Value NativeBreezSdkSpark::
|
|
18386
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin(
|
|
18387
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18388
|
+
size_t count) {
|
|
18389
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin();
|
|
18390
|
+
|
|
18391
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18392
|
+
}
|
|
18586
18393
|
jsi::Value NativeBreezSdkSpark::
|
|
18587
18394
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_cancel_leaf_optimization(
|
|
18588
18395
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -19177,15 +18984,6 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
19177
18984
|
|
|
19178
18985
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19179
18986
|
}
|
|
19180
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19181
|
-
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_real_time_sync_storage(
|
|
19182
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19183
|
-
size_t count) {
|
|
19184
|
-
auto value =
|
|
19185
|
-
uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_real_time_sync_storage();
|
|
19186
|
-
|
|
19187
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19188
|
-
}
|
|
19189
18987
|
jsi::Value NativeBreezSdkSpark::
|
|
19190
18988
|
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service(
|
|
19191
18989
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -19245,11 +19043,11 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
19245
19043
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19246
19044
|
}
|
|
19247
19045
|
jsi::Value NativeBreezSdkSpark::
|
|
19248
|
-
|
|
19046
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata(
|
|
19249
19047
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19250
19048
|
size_t count) {
|
|
19251
19049
|
auto value =
|
|
19252
|
-
|
|
19050
|
+
uniffi_breez_sdk_spark_checksum_method_storage_insert_payment_metadata();
|
|
19253
19051
|
|
|
19254
19052
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19255
19053
|
}
|
|
@@ -19271,6 +19069,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
19271
19069
|
|
|
19272
19070
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19273
19071
|
}
|
|
19072
|
+
jsi::Value NativeBreezSdkSpark::
|
|
19073
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids(
|
|
19074
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19075
|
+
size_t count) {
|
|
19076
|
+
auto value =
|
|
19077
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_payments_by_parent_ids();
|
|
19078
|
+
|
|
19079
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19080
|
+
}
|
|
19274
19081
|
jsi::Value NativeBreezSdkSpark::
|
|
19275
19082
|
cpp_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit(
|
|
19276
19083
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -19313,92 +19120,83 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
19313
19120
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19314
19121
|
}
|
|
19315
19122
|
jsi::Value NativeBreezSdkSpark::
|
|
19316
|
-
|
|
19317
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19318
|
-
size_t count) {
|
|
19319
|
-
auto value =
|
|
19320
|
-
uniffi_breez_sdk_spark_checksum_method_syncstorage_add_outgoing_change();
|
|
19321
|
-
|
|
19322
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19323
|
-
}
|
|
19324
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19325
|
-
cpp_uniffi_breez_sdk_spark_checksum_method_syncstorage_complete_outgoing_sync(
|
|
19123
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change(
|
|
19326
19124
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19327
19125
|
size_t count) {
|
|
19328
19126
|
auto value =
|
|
19329
|
-
|
|
19127
|
+
uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change();
|
|
19330
19128
|
|
|
19331
19129
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19332
19130
|
}
|
|
19333
19131
|
jsi::Value NativeBreezSdkSpark::
|
|
19334
|
-
|
|
19132
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync(
|
|
19335
19133
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19336
19134
|
size_t count) {
|
|
19337
19135
|
auto value =
|
|
19338
|
-
|
|
19136
|
+
uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync();
|
|
19339
19137
|
|
|
19340
19138
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19341
19139
|
}
|
|
19342
19140
|
jsi::Value NativeBreezSdkSpark::
|
|
19343
|
-
|
|
19141
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes(
|
|
19344
19142
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19345
19143
|
size_t count) {
|
|
19346
19144
|
auto value =
|
|
19347
|
-
|
|
19145
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_pending_outgoing_changes();
|
|
19348
19146
|
|
|
19349
19147
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19350
19148
|
}
|
|
19351
19149
|
jsi::Value NativeBreezSdkSpark::
|
|
19352
|
-
|
|
19150
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision(
|
|
19353
19151
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19354
19152
|
size_t count) {
|
|
19355
19153
|
auto value =
|
|
19356
|
-
|
|
19154
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_last_revision();
|
|
19357
19155
|
|
|
19358
19156
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19359
19157
|
}
|
|
19360
19158
|
jsi::Value NativeBreezSdkSpark::
|
|
19361
|
-
|
|
19159
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records(
|
|
19362
19160
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19363
19161
|
size_t count) {
|
|
19364
19162
|
auto value =
|
|
19365
|
-
|
|
19163
|
+
uniffi_breez_sdk_spark_checksum_method_storage_insert_incoming_records();
|
|
19366
19164
|
|
|
19367
19165
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19368
19166
|
}
|
|
19369
19167
|
jsi::Value NativeBreezSdkSpark::
|
|
19370
|
-
|
|
19168
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record(
|
|
19371
19169
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19372
19170
|
size_t count) {
|
|
19373
19171
|
auto value =
|
|
19374
|
-
|
|
19172
|
+
uniffi_breez_sdk_spark_checksum_method_storage_delete_incoming_record();
|
|
19375
19173
|
|
|
19376
19174
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19377
19175
|
}
|
|
19378
19176
|
jsi::Value NativeBreezSdkSpark::
|
|
19379
|
-
|
|
19177
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records(
|
|
19380
19178
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19381
19179
|
size_t count) {
|
|
19382
19180
|
auto value =
|
|
19383
|
-
|
|
19181
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_incoming_records();
|
|
19384
19182
|
|
|
19385
19183
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19386
19184
|
}
|
|
19387
19185
|
jsi::Value NativeBreezSdkSpark::
|
|
19388
|
-
|
|
19186
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change(
|
|
19389
19187
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19390
19188
|
size_t count) {
|
|
19391
19189
|
auto value =
|
|
19392
|
-
|
|
19190
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_latest_outgoing_change();
|
|
19393
19191
|
|
|
19394
19192
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19395
19193
|
}
|
|
19396
19194
|
jsi::Value NativeBreezSdkSpark::
|
|
19397
|
-
|
|
19195
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming(
|
|
19398
19196
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19399
19197
|
size_t count) {
|
|
19400
19198
|
auto value =
|
|
19401
|
-
|
|
19199
|
+
uniffi_breez_sdk_spark_checksum_method_storage_update_record_from_incoming();
|
|
19402
19200
|
|
|
19403
19201
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19404
19202
|
}
|
|
@@ -19613,19 +19411,4 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
|
19613
19411
|
uniffi::breez_sdk_spark::registry::putTable(
|
|
19614
19412
|
"UniffiVTableCallbackInterfaceStorage", vtableInstance));
|
|
19615
19413
|
return jsi::Value::undefined();
|
|
19616
|
-
}
|
|
19617
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19618
|
-
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_syncstorage(
|
|
19619
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19620
|
-
size_t count) {
|
|
19621
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19622
|
-
UniffiVTableCallbackInterfaceSyncStorage>::fromJs(rt, callInvoker,
|
|
19623
|
-
args[0]);
|
|
19624
|
-
|
|
19625
|
-
std::lock_guard<std::mutex> lock(
|
|
19626
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19627
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_syncstorage(
|
|
19628
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19629
|
-
"UniffiVTableCallbackInterfaceSyncStorage", vtableInstance));
|
|
19630
|
-
return jsi::Value::undefined();
|
|
19631
19414
|
}
|