@breeztech/breez-sdk-spark-react-native 0.10.0 → 0.11.0-dev2
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/{breeztech-breez-sdk-spark-react-native.podspec → BreezSdkSparkReactNative.podspec} +2 -2
- package/android/CMakeLists.txt +3 -4
- package/android/proguard-rules.pro +4 -0
- package/cpp/generated/breez_sdk_spark.cpp +1567 -514
- package/cpp/generated/breez_sdk_spark.hpp +73 -25
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +186 -81
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js +4 -2
- package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -1
- package/lib/commonjs/index.js +11 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +185 -80
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark_bindings.js +4 -2
- package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -1
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +95 -71
- 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 +409 -5
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +95 -71
- 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 +409 -5
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/breez_sdk_spark-ffi.ts +163 -95
- package/src/generated/breez_sdk_spark.ts +1919 -771
- package/src/generated/breez_sdk_spark_bindings.ts +2 -2
- package/src/index.tsx +7 -0
|
@@ -290,38 +290,54 @@ typedef void (*UniffiCallbackInterfaceStorageMethod13)(
|
|
|
290
290
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
291
291
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
292
292
|
typedef void (*UniffiCallbackInterfaceStorageMethod14)(
|
|
293
|
+
uint64_t uniffi_handle, RustBuffer request,
|
|
294
|
+
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
295
|
+
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
296
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod15)(
|
|
297
|
+
uint64_t uniffi_handle, RustBuffer id,
|
|
298
|
+
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
299
|
+
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
300
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod16)(
|
|
301
|
+
uint64_t uniffi_handle, RustBuffer contact,
|
|
302
|
+
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
303
|
+
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
304
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod17)(
|
|
305
|
+
uint64_t uniffi_handle, RustBuffer id,
|
|
306
|
+
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
307
|
+
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
308
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod18)(
|
|
293
309
|
uint64_t uniffi_handle, RustBuffer record,
|
|
294
310
|
UniffiForeignFutureCompleteU64 uniffi_future_callback,
|
|
295
311
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
296
|
-
typedef void (*
|
|
312
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod19)(
|
|
297
313
|
uint64_t uniffi_handle, RustBuffer record, uint64_t local_revision,
|
|
298
314
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
299
315
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
300
|
-
typedef void (*
|
|
316
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod20)(
|
|
301
317
|
uint64_t uniffi_handle, uint32_t limit,
|
|
302
318
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
303
319
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
304
|
-
typedef void (*
|
|
320
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod21)(
|
|
305
321
|
uint64_t uniffi_handle,
|
|
306
322
|
UniffiForeignFutureCompleteU64 uniffi_future_callback,
|
|
307
323
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
308
|
-
typedef void (*
|
|
324
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod22)(
|
|
309
325
|
uint64_t uniffi_handle, RustBuffer records,
|
|
310
326
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
311
327
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
312
|
-
typedef void (*
|
|
328
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod23)(
|
|
313
329
|
uint64_t uniffi_handle, RustBuffer record,
|
|
314
330
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
315
331
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
316
|
-
typedef void (*
|
|
332
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod24)(
|
|
317
333
|
uint64_t uniffi_handle, uint32_t limit,
|
|
318
334
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
319
335
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
320
|
-
typedef void (*
|
|
336
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod25)(
|
|
321
337
|
uint64_t uniffi_handle,
|
|
322
338
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
323
339
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
324
|
-
typedef void (*
|
|
340
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod26)(
|
|
325
341
|
uint64_t uniffi_handle, RustBuffer record,
|
|
326
342
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
327
343
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
@@ -395,15 +411,19 @@ typedef struct UniffiVTableCallbackInterfaceStorage {
|
|
|
395
411
|
UniffiCallbackInterfaceStorageMethod11 list_deposits;
|
|
396
412
|
UniffiCallbackInterfaceStorageMethod12 update_deposit;
|
|
397
413
|
UniffiCallbackInterfaceStorageMethod13 set_lnurl_metadata;
|
|
398
|
-
UniffiCallbackInterfaceStorageMethod14
|
|
399
|
-
UniffiCallbackInterfaceStorageMethod15
|
|
400
|
-
UniffiCallbackInterfaceStorageMethod16
|
|
401
|
-
UniffiCallbackInterfaceStorageMethod17
|
|
402
|
-
UniffiCallbackInterfaceStorageMethod18
|
|
403
|
-
UniffiCallbackInterfaceStorageMethod19
|
|
404
|
-
UniffiCallbackInterfaceStorageMethod20
|
|
405
|
-
UniffiCallbackInterfaceStorageMethod21
|
|
406
|
-
UniffiCallbackInterfaceStorageMethod22
|
|
414
|
+
UniffiCallbackInterfaceStorageMethod14 list_contacts;
|
|
415
|
+
UniffiCallbackInterfaceStorageMethod15 get_contact;
|
|
416
|
+
UniffiCallbackInterfaceStorageMethod16 insert_contact;
|
|
417
|
+
UniffiCallbackInterfaceStorageMethod17 delete_contact;
|
|
418
|
+
UniffiCallbackInterfaceStorageMethod18 add_outgoing_change;
|
|
419
|
+
UniffiCallbackInterfaceStorageMethod19 complete_outgoing_sync;
|
|
420
|
+
UniffiCallbackInterfaceStorageMethod20 get_pending_outgoing_changes;
|
|
421
|
+
UniffiCallbackInterfaceStorageMethod21 get_last_revision;
|
|
422
|
+
UniffiCallbackInterfaceStorageMethod22 insert_incoming_records;
|
|
423
|
+
UniffiCallbackInterfaceStorageMethod23 delete_incoming_record;
|
|
424
|
+
UniffiCallbackInterfaceStorageMethod24 get_incoming_records;
|
|
425
|
+
UniffiCallbackInterfaceStorageMethod25 get_latest_outgoing_change;
|
|
426
|
+
UniffiCallbackInterfaceStorageMethod26 update_record_from_incoming;
|
|
407
427
|
UniffiCallbackInterfaceFree uniffi_free;
|
|
408
428
|
} UniffiVTableCallbackInterfaceStorage;
|
|
409
429
|
void *uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(
|
|
@@ -432,6 +452,9 @@ void *uniffi_breez_sdk_spark_fn_clone_breezsdk(void *ptr,
|
|
|
432
452
|
void uniffi_breez_sdk_spark_fn_free_breezsdk(void *ptr,
|
|
433
453
|
RustCallStatus *uniffi_out_err);
|
|
434
454
|
/*handle*/ uint64_t
|
|
455
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact(void *ptr,
|
|
456
|
+
RustBuffer request);
|
|
457
|
+
/*handle*/ uint64_t
|
|
435
458
|
uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(void *ptr,
|
|
436
459
|
uint64_t listener);
|
|
437
460
|
/*handle*/ uint64_t
|
|
@@ -452,6 +475,9 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(void *ptr,
|
|
|
452
475
|
uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
|
|
453
476
|
void *ptr, RustBuffer request);
|
|
454
477
|
/*handle*/ uint64_t
|
|
478
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact(void *ptr,
|
|
479
|
+
RustBuffer id);
|
|
480
|
+
/*handle*/ uint64_t
|
|
455
481
|
uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(void *ptr);
|
|
456
482
|
/*handle*/ uint64_t
|
|
457
483
|
uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(void *ptr);
|
|
@@ -477,6 +503,9 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata(
|
|
|
477
503
|
/*handle*/ uint64_t
|
|
478
504
|
uniffi_breez_sdk_spark_fn_method_breezsdk_get_user_settings(void *ptr);
|
|
479
505
|
/*handle*/ uint64_t
|
|
506
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts(void *ptr,
|
|
507
|
+
RustBuffer request);
|
|
508
|
+
/*handle*/ uint64_t
|
|
480
509
|
uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies(void *ptr);
|
|
481
510
|
/*handle*/ uint64_t
|
|
482
511
|
uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_rates(void *ptr);
|
|
@@ -529,6 +558,9 @@ void uniffi_breez_sdk_spark_fn_method_breezsdk_start_leaf_optimization(
|
|
|
529
558
|
uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(void *ptr,
|
|
530
559
|
RustBuffer request);
|
|
531
560
|
/*handle*/ uint64_t
|
|
561
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact(void *ptr,
|
|
562
|
+
RustBuffer request);
|
|
563
|
+
/*handle*/ uint64_t
|
|
532
564
|
uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
|
|
533
565
|
void *ptr, RustBuffer request);
|
|
534
566
|
void *
|
|
@@ -705,6 +737,17 @@ uniffi_breez_sdk_spark_fn_method_storage_list_deposits(void *ptr);
|
|
|
705
737
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
|
|
706
738
|
void *ptr, RustBuffer metadata);
|
|
707
739
|
/*handle*/ uint64_t
|
|
740
|
+
uniffi_breez_sdk_spark_fn_method_storage_list_contacts(void *ptr,
|
|
741
|
+
RustBuffer request);
|
|
742
|
+
/*handle*/ uint64_t
|
|
743
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_contact(void *ptr, RustBuffer id);
|
|
744
|
+
/*handle*/ uint64_t
|
|
745
|
+
uniffi_breez_sdk_spark_fn_method_storage_insert_contact(void *ptr,
|
|
746
|
+
RustBuffer contact);
|
|
747
|
+
/*handle*/ uint64_t
|
|
748
|
+
uniffi_breez_sdk_spark_fn_method_storage_delete_contact(void *ptr,
|
|
749
|
+
RustBuffer id);
|
|
750
|
+
/*handle*/ uint64_t
|
|
708
751
|
uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(void *ptr,
|
|
709
752
|
RustBuffer record);
|
|
710
753
|
/*handle*/ uint64_t
|
|
@@ -915,6 +958,7 @@ uint16_t
|
|
|
915
958
|
uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction();
|
|
916
959
|
uint16_t
|
|
917
960
|
uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees();
|
|
961
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact();
|
|
918
962
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener();
|
|
919
963
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin();
|
|
920
964
|
uint16_t
|
|
@@ -924,6 +968,7 @@ uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_availabl
|
|
|
924
968
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message();
|
|
925
969
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit();
|
|
926
970
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment();
|
|
971
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact();
|
|
927
972
|
uint16_t
|
|
928
973
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address();
|
|
929
974
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect();
|
|
@@ -938,6 +983,7 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment();
|
|
|
938
983
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer();
|
|
939
984
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata();
|
|
940
985
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings();
|
|
986
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts();
|
|
941
987
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies();
|
|
942
988
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates();
|
|
943
989
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments();
|
|
@@ -961,6 +1007,7 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message();
|
|
|
961
1007
|
uint16_t
|
|
962
1008
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_start_leaf_optimization();
|
|
963
1009
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
|
|
1010
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact();
|
|
964
1011
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings();
|
|
965
1012
|
uint16_t
|
|
966
1013
|
uniffi_breez_sdk_spark_checksum_method_externalsigner_identity_public_key();
|
|
@@ -1033,6 +1080,10 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit();
|
|
|
1033
1080
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_deposits();
|
|
1034
1081
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_update_deposit();
|
|
1035
1082
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata();
|
|
1083
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_contacts();
|
|
1084
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_contact();
|
|
1085
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_insert_contact();
|
|
1086
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_contact();
|
|
1036
1087
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change();
|
|
1037
1088
|
uint16_t
|
|
1038
1089
|
uniffi_breez_sdk_spark_checksum_method_storage_complete_outgoing_sync();
|
|
@@ -3394,10 +3445,11 @@ static void body(jsi::Runtime &rt,
|
|
|
3394
3445
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_event,
|
|
3395
3446
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
3396
3447
|
|
|
3448
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
3397
3449
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
3398
|
-
*rs_uniffiOutReturn =
|
|
3399
|
-
|
|
3400
|
-
|
|
3450
|
+
*rs_uniffiOutReturn =
|
|
3451
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
3452
|
+
rt, callInvoker, uniffiResult);
|
|
3401
3453
|
} catch (const jsi::JSError &error) {
|
|
3402
3454
|
std::cout
|
|
3403
3455
|
<< "Error in callback UniffiCallbackInterfaceEventListenerMethod0: "
|
|
@@ -3669,10 +3721,11 @@ static void body(jsi::Runtime &rt,
|
|
|
3669
3721
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_address,
|
|
3670
3722
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
3671
3723
|
|
|
3724
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
3672
3725
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
3673
|
-
*rs_uniffiOutReturn =
|
|
3674
|
-
|
|
3675
|
-
|
|
3726
|
+
*rs_uniffiOutReturn =
|
|
3727
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
3728
|
+
rt, callInvoker, uniffiResult);
|
|
3676
3729
|
} catch (const jsi::JSError &error) {
|
|
3677
3730
|
std::cout << "Error in callback "
|
|
3678
3731
|
"UniffiCallbackInterfaceBitcoinChainServiceMethod0: "
|
|
@@ -3814,10 +3867,11 @@ static void body(jsi::Runtime &rt,
|
|
|
3814
3867
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid,
|
|
3815
3868
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
3816
3869
|
|
|
3870
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
3817
3871
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
3818
|
-
*rs_uniffiOutReturn =
|
|
3819
|
-
|
|
3820
|
-
|
|
3872
|
+
*rs_uniffiOutReturn =
|
|
3873
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
3874
|
+
rt, callInvoker, uniffiResult);
|
|
3821
3875
|
} catch (const jsi::JSError &error) {
|
|
3822
3876
|
std::cout << "Error in callback "
|
|
3823
3877
|
"UniffiCallbackInterfaceBitcoinChainServiceMethod1: "
|
|
@@ -3959,10 +4013,11 @@ static void body(jsi::Runtime &rt,
|
|
|
3959
4013
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid,
|
|
3960
4014
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
3961
4015
|
|
|
4016
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
3962
4017
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
3963
|
-
*rs_uniffiOutReturn =
|
|
3964
|
-
|
|
3965
|
-
|
|
4018
|
+
*rs_uniffiOutReturn =
|
|
4019
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
4020
|
+
rt, callInvoker, uniffiResult);
|
|
3966
4021
|
} catch (const jsi::JSError &error) {
|
|
3967
4022
|
std::cout << "Error in callback "
|
|
3968
4023
|
"UniffiCallbackInterfaceBitcoinChainServiceMethod2: "
|
|
@@ -4103,10 +4158,11 @@ static void body(jsi::Runtime &rt,
|
|
|
4103
4158
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_tx,
|
|
4104
4159
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
4105
4160
|
|
|
4161
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
4106
4162
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4107
|
-
*rs_uniffiOutReturn =
|
|
4108
|
-
|
|
4109
|
-
|
|
4163
|
+
*rs_uniffiOutReturn =
|
|
4164
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
4165
|
+
rt, callInvoker, uniffiResult);
|
|
4110
4166
|
} catch (const jsi::JSError &error) {
|
|
4111
4167
|
std::cout << "Error in callback "
|
|
4112
4168
|
"UniffiCallbackInterfaceBitcoinChainServiceMethod3: "
|
|
@@ -4244,10 +4300,11 @@ static void body(jsi::Runtime &rt,
|
|
|
4244
4300
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
4245
4301
|
js_uniffiCallbackData);
|
|
4246
4302
|
|
|
4303
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
4247
4304
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4248
|
-
*rs_uniffiOutReturn =
|
|
4249
|
-
|
|
4250
|
-
|
|
4305
|
+
*rs_uniffiOutReturn =
|
|
4306
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
4307
|
+
rt, callInvoker, uniffiResult);
|
|
4251
4308
|
} catch (const jsi::JSError &error) {
|
|
4252
4309
|
std::cout << "Error in callback "
|
|
4253
4310
|
"UniffiCallbackInterfaceBitcoinChainServiceMethod4: "
|
|
@@ -4385,7 +4442,9 @@ static void body(jsi::Runtime &rt,
|
|
|
4385
4442
|
return;
|
|
4386
4443
|
}
|
|
4387
4444
|
|
|
4388
|
-
//
|
|
4445
|
+
// return type is MutReference(RustBuffer(Some(ExternalFfiMetadata { name:
|
|
4446
|
+
// "PublicKeyBytes", module_path: "breez_sdk_spark" }))) Finally, we need to
|
|
4447
|
+
// copy the return value back into the Rust pointer.
|
|
4389
4448
|
*rs_uniffiOutReturn =
|
|
4390
4449
|
uniffi::breez_sdk_spark::Bridging<ReferenceHolder<RustBuffer>>::fromJs(
|
|
4391
4450
|
rt, callInvoker, uniffiResult);
|
|
@@ -4521,10 +4580,11 @@ static void body(jsi::Runtime &rt,
|
|
|
4521
4580
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_path,
|
|
4522
4581
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
4523
4582
|
|
|
4583
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
4524
4584
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4525
|
-
*rs_uniffiOutReturn =
|
|
4526
|
-
|
|
4527
|
-
|
|
4585
|
+
*rs_uniffiOutReturn =
|
|
4586
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
4587
|
+
rt, callInvoker, uniffiResult);
|
|
4528
4588
|
} catch (const jsi::JSError &error) {
|
|
4529
4589
|
std::cout
|
|
4530
4590
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod1: "
|
|
@@ -4668,10 +4728,11 @@ static void body(jsi::Runtime &rt,
|
|
|
4668
4728
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
|
|
4669
4729
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
4670
4730
|
|
|
4731
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
4671
4732
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4672
|
-
*rs_uniffiOutReturn =
|
|
4673
|
-
|
|
4674
|
-
|
|
4733
|
+
*rs_uniffiOutReturn =
|
|
4734
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
4735
|
+
rt, callInvoker, uniffiResult);
|
|
4675
4736
|
} catch (const jsi::JSError &error) {
|
|
4676
4737
|
std::cout
|
|
4677
4738
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod2: "
|
|
@@ -4816,10 +4877,11 @@ static void body(jsi::Runtime &rt,
|
|
|
4816
4877
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
|
|
4817
4878
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
4818
4879
|
|
|
4880
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
4819
4881
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4820
|
-
*rs_uniffiOutReturn =
|
|
4821
|
-
|
|
4822
|
-
|
|
4882
|
+
*rs_uniffiOutReturn =
|
|
4883
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
4884
|
+
rt, callInvoker, uniffiResult);
|
|
4823
4885
|
} catch (const jsi::JSError &error) {
|
|
4824
4886
|
std::cout
|
|
4825
4887
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod3: "
|
|
@@ -4964,10 +5026,11 @@ static void body(jsi::Runtime &rt,
|
|
|
4964
5026
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
|
|
4965
5027
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
4966
5028
|
|
|
5029
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
4967
5030
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4968
|
-
*rs_uniffiOutReturn =
|
|
4969
|
-
|
|
4970
|
-
|
|
5031
|
+
*rs_uniffiOutReturn =
|
|
5032
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
5033
|
+
rt, callInvoker, uniffiResult);
|
|
4971
5034
|
} catch (const jsi::JSError &error) {
|
|
4972
5035
|
std::cout
|
|
4973
5036
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod4: "
|
|
@@ -5112,10 +5175,11 @@ static void body(jsi::Runtime &rt,
|
|
|
5112
5175
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
|
|
5113
5176
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
5114
5177
|
|
|
5178
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
5115
5179
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
5116
|
-
*rs_uniffiOutReturn =
|
|
5117
|
-
|
|
5118
|
-
|
|
5180
|
+
*rs_uniffiOutReturn =
|
|
5181
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
5182
|
+
rt, callInvoker, uniffiResult);
|
|
5119
5183
|
} catch (const jsi::JSError &error) {
|
|
5120
5184
|
std::cout
|
|
5121
5185
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod5: "
|
|
@@ -5260,10 +5324,11 @@ static void body(jsi::Runtime &rt,
|
|
|
5260
5324
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_hash, js_path,
|
|
5261
5325
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
5262
5326
|
|
|
5327
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
5263
5328
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
5264
|
-
*rs_uniffiOutReturn =
|
|
5265
|
-
|
|
5266
|
-
|
|
5329
|
+
*rs_uniffiOutReturn =
|
|
5330
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
5331
|
+
rt, callInvoker, uniffiResult);
|
|
5267
5332
|
} catch (const jsi::JSError &error) {
|
|
5268
5333
|
std::cout
|
|
5269
5334
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod6: "
|
|
@@ -5408,10 +5473,11 @@ static void body(jsi::Runtime &rt,
|
|
|
5408
5473
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_message, js_path,
|
|
5409
5474
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
5410
5475
|
|
|
5476
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
5411
5477
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
5412
|
-
*rs_uniffiOutReturn =
|
|
5413
|
-
|
|
5414
|
-
|
|
5478
|
+
*rs_uniffiOutReturn =
|
|
5479
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
5480
|
+
rt, callInvoker, uniffiResult);
|
|
5415
5481
|
} catch (const jsi::JSError &error) {
|
|
5416
5482
|
std::cout
|
|
5417
5483
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod7: "
|
|
@@ -5550,10 +5616,11 @@ static void body(jsi::Runtime &rt,
|
|
|
5550
5616
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
5551
5617
|
js_uniffiCallbackData);
|
|
5552
5618
|
|
|
5619
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
5553
5620
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
5554
|
-
*rs_uniffiOutReturn =
|
|
5555
|
-
|
|
5556
|
-
|
|
5621
|
+
*rs_uniffiOutReturn =
|
|
5622
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
5623
|
+
rt, callInvoker, uniffiResult);
|
|
5557
5624
|
} catch (const jsi::JSError &error) {
|
|
5558
5625
|
std::cout
|
|
5559
5626
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod8: "
|
|
@@ -5693,10 +5760,11 @@ static void body(jsi::Runtime &rt,
|
|
|
5693
5760
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
|
|
5694
5761
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
5695
5762
|
|
|
5763
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
5696
5764
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
5697
|
-
*rs_uniffiOutReturn =
|
|
5698
|
-
|
|
5699
|
-
|
|
5765
|
+
*rs_uniffiOutReturn =
|
|
5766
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
5767
|
+
rt, callInvoker, uniffiResult);
|
|
5700
5768
|
} catch (const jsi::JSError &error) {
|
|
5701
5769
|
std::cout
|
|
5702
5770
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod9: "
|
|
@@ -5834,10 +5902,11 @@ static void body(jsi::Runtime &rt,
|
|
|
5834
5902
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
5835
5903
|
js_uniffiCallbackData);
|
|
5836
5904
|
|
|
5905
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
5837
5906
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
5838
|
-
*rs_uniffiOutReturn =
|
|
5839
|
-
|
|
5840
|
-
|
|
5907
|
+
*rs_uniffiOutReturn =
|
|
5908
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
5909
|
+
rt, callInvoker, uniffiResult);
|
|
5841
5910
|
} catch (const jsi::JSError &error) {
|
|
5842
5911
|
std::cout
|
|
5843
5912
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod10: "
|
|
@@ -5977,10 +6046,11 @@ static void body(jsi::Runtime &rt,
|
|
|
5977
6046
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_index,
|
|
5978
6047
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
5979
6048
|
|
|
6049
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
5980
6050
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
5981
|
-
*rs_uniffiOutReturn =
|
|
5982
|
-
|
|
5983
|
-
|
|
6051
|
+
*rs_uniffiOutReturn =
|
|
6052
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
6053
|
+
rt, callInvoker, uniffiResult);
|
|
5984
6054
|
} catch (const jsi::JSError &error) {
|
|
5985
6055
|
std::cout
|
|
5986
6056
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod11: "
|
|
@@ -6121,10 +6191,11 @@ static void body(jsi::Runtime &rt,
|
|
|
6121
6191
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_index,
|
|
6122
6192
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
6123
6193
|
|
|
6194
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
6124
6195
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
6125
|
-
*rs_uniffiOutReturn =
|
|
6126
|
-
|
|
6127
|
-
|
|
6196
|
+
*rs_uniffiOutReturn =
|
|
6197
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
6198
|
+
rt, callInvoker, uniffiResult);
|
|
6128
6199
|
} catch (const jsi::JSError &error) {
|
|
6129
6200
|
std::cout
|
|
6130
6201
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod12: "
|
|
@@ -6265,10 +6336,11 @@ static void body(jsi::Runtime &rt,
|
|
|
6265
6336
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_index,
|
|
6266
6337
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
6267
6338
|
|
|
6339
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
6268
6340
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
6269
|
-
*rs_uniffiOutReturn =
|
|
6270
|
-
|
|
6271
|
-
|
|
6341
|
+
*rs_uniffiOutReturn =
|
|
6342
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
6343
|
+
rt, callInvoker, uniffiResult);
|
|
6272
6344
|
} catch (const jsi::JSError &error) {
|
|
6273
6345
|
std::cout
|
|
6274
6346
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod13: "
|
|
@@ -6413,10 +6485,11 @@ static void body(jsi::Runtime &rt,
|
|
|
6413
6485
|
cb.call(rt, js_uniffiHandle, js_signingKey, js_newSigningKey,
|
|
6414
6486
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
6415
6487
|
|
|
6488
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
6416
6489
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
6417
|
-
*rs_uniffiOutReturn =
|
|
6418
|
-
|
|
6419
|
-
|
|
6490
|
+
*rs_uniffiOutReturn =
|
|
6491
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
6492
|
+
rt, callInvoker, uniffiResult);
|
|
6420
6493
|
} catch (const jsi::JSError &error) {
|
|
6421
6494
|
std::cout
|
|
6422
6495
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod14: "
|
|
@@ -6565,10 +6638,11 @@ static void body(jsi::Runtime &rt,
|
|
|
6565
6638
|
cb.call(rt, js_uniffiHandle, js_secret, js_threshold, js_numShares,
|
|
6566
6639
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
6567
6640
|
|
|
6641
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
6568
6642
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
6569
|
-
*rs_uniffiOutReturn =
|
|
6570
|
-
|
|
6571
|
-
|
|
6643
|
+
*rs_uniffiOutReturn =
|
|
6644
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
6645
|
+
rt, callInvoker, uniffiResult);
|
|
6572
6646
|
} catch (const jsi::JSError &error) {
|
|
6573
6647
|
std::cout
|
|
6574
6648
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod15: "
|
|
@@ -6716,10 +6790,11 @@ static void body(jsi::Runtime &rt,
|
|
|
6716
6790
|
cb.call(rt, js_uniffiHandle, js_encryptedSecret, js_receiverPublicKey,
|
|
6717
6791
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
6718
6792
|
|
|
6793
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
6719
6794
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
6720
|
-
*rs_uniffiOutReturn =
|
|
6721
|
-
|
|
6722
|
-
|
|
6795
|
+
*rs_uniffiOutReturn =
|
|
6796
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
6797
|
+
rt, callInvoker, uniffiResult);
|
|
6723
6798
|
} catch (const jsi::JSError &error) {
|
|
6724
6799
|
std::cout
|
|
6725
6800
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod16: "
|
|
@@ -6863,10 +6938,11 @@ static void body(jsi::Runtime &rt,
|
|
|
6863
6938
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_secret,
|
|
6864
6939
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
6865
6940
|
|
|
6941
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
6866
6942
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
6867
|
-
*rs_uniffiOutReturn =
|
|
6868
|
-
|
|
6869
|
-
|
|
6943
|
+
*rs_uniffiOutReturn =
|
|
6944
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
6945
|
+
rt, callInvoker, uniffiResult);
|
|
6870
6946
|
} catch (const jsi::JSError &error) {
|
|
6871
6947
|
std::cout
|
|
6872
6948
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod17: "
|
|
@@ -7007,10 +7083,11 @@ static void body(jsi::Runtime &rt,
|
|
|
7007
7083
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
|
|
7008
7084
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
7009
7085
|
|
|
7086
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
7010
7087
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
7011
|
-
*rs_uniffiOutReturn =
|
|
7012
|
-
|
|
7013
|
-
|
|
7088
|
+
*rs_uniffiOutReturn =
|
|
7089
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
7090
|
+
rt, callInvoker, uniffiResult);
|
|
7014
7091
|
} catch (const jsi::JSError &error) {
|
|
7015
7092
|
std::cout
|
|
7016
7093
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod18: "
|
|
@@ -7151,10 +7228,11 @@ static void body(jsi::Runtime &rt,
|
|
|
7151
7228
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
|
|
7152
7229
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
7153
7230
|
|
|
7231
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
7154
7232
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
7155
|
-
*rs_uniffiOutReturn =
|
|
7156
|
-
|
|
7157
|
-
|
|
7233
|
+
*rs_uniffiOutReturn =
|
|
7234
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
7235
|
+
rt, callInvoker, uniffiResult);
|
|
7158
7236
|
} catch (const jsi::JSError &error) {
|
|
7159
7237
|
std::cout
|
|
7160
7238
|
<< "Error in callback UniffiCallbackInterfaceExternalSignerMethod19: "
|
|
@@ -7292,10 +7370,11 @@ static void body(jsi::Runtime &rt,
|
|
|
7292
7370
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
7293
7371
|
js_uniffiCallbackData);
|
|
7294
7372
|
|
|
7373
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
7295
7374
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
7296
|
-
*rs_uniffiOutReturn =
|
|
7297
|
-
|
|
7298
|
-
|
|
7375
|
+
*rs_uniffiOutReturn =
|
|
7376
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
7377
|
+
rt, callInvoker, uniffiResult);
|
|
7299
7378
|
} catch (const jsi::JSError &error) {
|
|
7300
7379
|
std::cout << "Error in callback UniffiCallbackInterfaceFiatServiceMethod0: "
|
|
7301
7380
|
<< error.what() << std::endl;
|
|
@@ -7430,10 +7509,11 @@ static void body(jsi::Runtime &rt,
|
|
|
7430
7509
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
7431
7510
|
js_uniffiCallbackData);
|
|
7432
7511
|
|
|
7512
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
7433
7513
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
7434
|
-
*rs_uniffiOutReturn =
|
|
7435
|
-
|
|
7436
|
-
|
|
7514
|
+
*rs_uniffiOutReturn =
|
|
7515
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
7516
|
+
rt, callInvoker, uniffiResult);
|
|
7437
7517
|
} catch (const jsi::JSError &error) {
|
|
7438
7518
|
std::cout << "Error in callback UniffiCallbackInterfaceFiatServiceMethod1: "
|
|
7439
7519
|
<< error.what() << std::endl;
|
|
@@ -7570,10 +7650,11 @@ static void body(jsi::Runtime &rt,
|
|
|
7570
7650
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_payments,
|
|
7571
7651
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
7572
7652
|
|
|
7653
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
7573
7654
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
7574
|
-
*rs_uniffiOutReturn =
|
|
7575
|
-
|
|
7576
|
-
|
|
7655
|
+
*rs_uniffiOutReturn =
|
|
7656
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
7657
|
+
rt, callInvoker, uniffiResult);
|
|
7577
7658
|
} catch (const jsi::JSError &error) {
|
|
7578
7659
|
std::cout
|
|
7579
7660
|
<< "Error in callback UniffiCallbackInterfacePaymentObserverMethod0: "
|
|
@@ -7716,10 +7797,11 @@ static void body(jsi::Runtime &rt,
|
|
|
7716
7797
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_url, js_headers,
|
|
7717
7798
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
7718
7799
|
|
|
7800
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
7719
7801
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
7720
|
-
*rs_uniffiOutReturn =
|
|
7721
|
-
|
|
7722
|
-
|
|
7802
|
+
*rs_uniffiOutReturn =
|
|
7803
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
7804
|
+
rt, callInvoker, uniffiResult);
|
|
7723
7805
|
} catch (const jsi::JSError &error) {
|
|
7724
7806
|
std::cout << "Error in callback UniffiCallbackInterfaceRestClientMethod0: "
|
|
7725
7807
|
<< error.what() << std::endl;
|
|
@@ -7865,10 +7947,11 @@ static void body(jsi::Runtime &rt,
|
|
|
7865
7947
|
cb.call(rt, js_uniffiHandle, js_url, js_headers, js_body,
|
|
7866
7948
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
7867
7949
|
|
|
7950
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
7868
7951
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
7869
|
-
*rs_uniffiOutReturn =
|
|
7870
|
-
|
|
7871
|
-
|
|
7952
|
+
*rs_uniffiOutReturn =
|
|
7953
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
7954
|
+
rt, callInvoker, uniffiResult);
|
|
7872
7955
|
} catch (const jsi::JSError &error) {
|
|
7873
7956
|
std::cout << "Error in callback UniffiCallbackInterfaceRestClientMethod1: "
|
|
7874
7957
|
<< error.what() << std::endl;
|
|
@@ -8015,10 +8098,11 @@ static void body(jsi::Runtime &rt,
|
|
|
8015
8098
|
cb.call(rt, js_uniffiHandle, js_url, js_headers, js_body,
|
|
8016
8099
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
8017
8100
|
|
|
8101
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
8018
8102
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
8019
|
-
*rs_uniffiOutReturn =
|
|
8020
|
-
|
|
8021
|
-
|
|
8103
|
+
*rs_uniffiOutReturn =
|
|
8104
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
8105
|
+
rt, callInvoker, uniffiResult);
|
|
8022
8106
|
} catch (const jsi::JSError &error) {
|
|
8023
8107
|
std::cout << "Error in callback UniffiCallbackInterfaceRestClientMethod2: "
|
|
8024
8108
|
<< error.what() << std::endl;
|
|
@@ -8158,10 +8242,11 @@ static void body(jsi::Runtime &rt,
|
|
|
8158
8242
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_key,
|
|
8159
8243
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
8160
8244
|
|
|
8245
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
8161
8246
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
8162
|
-
*rs_uniffiOutReturn =
|
|
8163
|
-
|
|
8164
|
-
|
|
8247
|
+
*rs_uniffiOutReturn =
|
|
8248
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
8249
|
+
rt, callInvoker, uniffiResult);
|
|
8165
8250
|
} catch (const jsi::JSError &error) {
|
|
8166
8251
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod0: "
|
|
8167
8252
|
<< error.what() << std::endl;
|
|
@@ -8299,10 +8384,11 @@ static void body(jsi::Runtime &rt,
|
|
|
8299
8384
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_key,
|
|
8300
8385
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
8301
8386
|
|
|
8387
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
8302
8388
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
8303
|
-
*rs_uniffiOutReturn =
|
|
8304
|
-
|
|
8305
|
-
|
|
8389
|
+
*rs_uniffiOutReturn =
|
|
8390
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
8391
|
+
rt, callInvoker, uniffiResult);
|
|
8306
8392
|
} catch (const jsi::JSError &error) {
|
|
8307
8393
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod1: "
|
|
8308
8394
|
<< error.what() << std::endl;
|
|
@@ -8444,10 +8530,11 @@ static void body(jsi::Runtime &rt,
|
|
|
8444
8530
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_key, js_value,
|
|
8445
8531
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
8446
8532
|
|
|
8533
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
8447
8534
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
8448
|
-
*rs_uniffiOutReturn =
|
|
8449
|
-
|
|
8450
|
-
|
|
8535
|
+
*rs_uniffiOutReturn =
|
|
8536
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
8537
|
+
rt, callInvoker, uniffiResult);
|
|
8451
8538
|
} catch (const jsi::JSError &error) {
|
|
8452
8539
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod2: "
|
|
8453
8540
|
<< error.what() << std::endl;
|
|
@@ -8587,10 +8674,11 @@ static void body(jsi::Runtime &rt,
|
|
|
8587
8674
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
|
|
8588
8675
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
8589
8676
|
|
|
8677
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
8590
8678
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
8591
|
-
*rs_uniffiOutReturn =
|
|
8592
|
-
|
|
8593
|
-
|
|
8679
|
+
*rs_uniffiOutReturn =
|
|
8680
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
8681
|
+
rt, callInvoker, uniffiResult);
|
|
8594
8682
|
} catch (const jsi::JSError &error) {
|
|
8595
8683
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod3: "
|
|
8596
8684
|
<< error.what() << std::endl;
|
|
@@ -8728,10 +8816,11 @@ static void body(jsi::Runtime &rt,
|
|
|
8728
8816
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_payment,
|
|
8729
8817
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
8730
8818
|
|
|
8819
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
8731
8820
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
8732
|
-
*rs_uniffiOutReturn =
|
|
8733
|
-
|
|
8734
|
-
|
|
8821
|
+
*rs_uniffiOutReturn =
|
|
8822
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
8823
|
+
rt, callInvoker, uniffiResult);
|
|
8735
8824
|
} catch (const jsi::JSError &error) {
|
|
8736
8825
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod4: "
|
|
8737
8826
|
<< error.what() << std::endl;
|
|
@@ -8872,10 +8961,11 @@ static void body(jsi::Runtime &rt,
|
|
|
8872
8961
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_paymentId, js_metadata,
|
|
8873
8962
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
8874
8963
|
|
|
8964
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
8875
8965
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
8876
|
-
*rs_uniffiOutReturn =
|
|
8877
|
-
|
|
8878
|
-
|
|
8966
|
+
*rs_uniffiOutReturn =
|
|
8967
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
8968
|
+
rt, callInvoker, uniffiResult);
|
|
8879
8969
|
} catch (const jsi::JSError &error) {
|
|
8880
8970
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod5: "
|
|
8881
8971
|
<< error.what() << std::endl;
|
|
@@ -9015,10 +9105,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9015
9105
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
|
|
9016
9106
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9017
9107
|
|
|
9108
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
9018
9109
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9019
|
-
*rs_uniffiOutReturn =
|
|
9020
|
-
|
|
9021
|
-
|
|
9110
|
+
*rs_uniffiOutReturn =
|
|
9111
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
9112
|
+
rt, callInvoker, uniffiResult);
|
|
9022
9113
|
} catch (const jsi::JSError &error) {
|
|
9023
9114
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod6: "
|
|
9024
9115
|
<< error.what() << std::endl;
|
|
@@ -9157,10 +9248,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9157
9248
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_invoice,
|
|
9158
9249
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9159
9250
|
|
|
9251
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
9160
9252
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9161
|
-
*rs_uniffiOutReturn =
|
|
9162
|
-
|
|
9163
|
-
|
|
9253
|
+
*rs_uniffiOutReturn =
|
|
9254
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
9255
|
+
rt, callInvoker, uniffiResult);
|
|
9164
9256
|
} catch (const jsi::JSError &error) {
|
|
9165
9257
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod7: "
|
|
9166
9258
|
<< error.what() << std::endl;
|
|
@@ -9300,10 +9392,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9300
9392
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_parentPaymentIds,
|
|
9301
9393
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9302
9394
|
|
|
9395
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
9303
9396
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9304
|
-
*rs_uniffiOutReturn =
|
|
9305
|
-
|
|
9306
|
-
|
|
9397
|
+
*rs_uniffiOutReturn =
|
|
9398
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
9399
|
+
rt, callInvoker, uniffiResult);
|
|
9307
9400
|
} catch (const jsi::JSError &error) {
|
|
9308
9401
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod8: "
|
|
9309
9402
|
<< error.what() << std::endl;
|
|
@@ -9447,10 +9540,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9447
9540
|
cb.call(rt, js_uniffiHandle, js_txid, js_vout, js_amountSats,
|
|
9448
9541
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9449
9542
|
|
|
9543
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
9450
9544
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9451
|
-
*rs_uniffiOutReturn =
|
|
9452
|
-
|
|
9453
|
-
|
|
9545
|
+
*rs_uniffiOutReturn =
|
|
9546
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
9547
|
+
rt, callInvoker, uniffiResult);
|
|
9454
9548
|
} catch (const jsi::JSError &error) {
|
|
9455
9549
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod9: "
|
|
9456
9550
|
<< error.what() << std::endl;
|
|
@@ -9591,10 +9685,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9591
9685
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_txid, js_vout,
|
|
9592
9686
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9593
9687
|
|
|
9688
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
9594
9689
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9595
|
-
*rs_uniffiOutReturn =
|
|
9596
|
-
|
|
9597
|
-
|
|
9690
|
+
*rs_uniffiOutReturn =
|
|
9691
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
9692
|
+
rt, callInvoker, uniffiResult);
|
|
9598
9693
|
} catch (const jsi::JSError &error) {
|
|
9599
9694
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod10: "
|
|
9600
9695
|
<< error.what() << std::endl;
|
|
@@ -9730,10 +9825,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9730
9825
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
9731
9826
|
js_uniffiCallbackData);
|
|
9732
9827
|
|
|
9828
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
9733
9829
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9734
|
-
*rs_uniffiOutReturn =
|
|
9735
|
-
|
|
9736
|
-
|
|
9830
|
+
*rs_uniffiOutReturn =
|
|
9831
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
9832
|
+
rt, callInvoker, uniffiResult);
|
|
9737
9833
|
} catch (const jsi::JSError &error) {
|
|
9738
9834
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod11: "
|
|
9739
9835
|
<< error.what() << std::endl;
|
|
@@ -9876,10 +9972,11 @@ static void body(jsi::Runtime &rt,
|
|
|
9876
9972
|
cb.call(rt, js_uniffiHandle, js_txid, js_vout, js_payload,
|
|
9877
9973
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
9878
9974
|
|
|
9975
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
9879
9976
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
9880
|
-
*rs_uniffiOutReturn =
|
|
9881
|
-
|
|
9882
|
-
|
|
9977
|
+
*rs_uniffiOutReturn =
|
|
9978
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
9979
|
+
rt, callInvoker, uniffiResult);
|
|
9883
9980
|
} catch (const jsi::JSError &error) {
|
|
9884
9981
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod12: "
|
|
9885
9982
|
<< error.what() << std::endl;
|
|
@@ -10018,10 +10115,11 @@ static void body(jsi::Runtime &rt,
|
|
|
10018
10115
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_metadata,
|
|
10019
10116
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10020
10117
|
|
|
10118
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10021
10119
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10022
|
-
*rs_uniffiOutReturn =
|
|
10023
|
-
|
|
10024
|
-
|
|
10120
|
+
*rs_uniffiOutReturn =
|
|
10121
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
10122
|
+
rt, callInvoker, uniffiResult);
|
|
10025
10123
|
} catch (const jsi::JSError &error) {
|
|
10026
10124
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod13: "
|
|
10027
10125
|
<< error.what() << std::endl;
|
|
@@ -10123,8 +10221,9 @@ using namespace facebook;
|
|
|
10123
10221
|
|
|
10124
10222
|
// We need to store a lambda in a global so we can call it from
|
|
10125
10223
|
// a function pointer. The function pointer is passed to Rust.
|
|
10126
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
10127
|
-
uint64_t,
|
|
10224
|
+
static std::function<void(uint64_t, RustBuffer,
|
|
10225
|
+
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
10226
|
+
UniffiForeignFuture *)>
|
|
10128
10227
|
rsLambda = nullptr;
|
|
10129
10228
|
|
|
10130
10229
|
// This is the main body of the callback. It's called from the lambda,
|
|
@@ -10132,8 +10231,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteU64,
|
|
|
10132
10231
|
static void body(jsi::Runtime &rt,
|
|
10133
10232
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10134
10233
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10135
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10136
|
-
|
|
10234
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_request,
|
|
10235
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10137
10236
|
uint64_t rs_uniffiCallbackData,
|
|
10138
10237
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10139
10238
|
|
|
@@ -10141,11 +10240,11 @@ static void body(jsi::Runtime &rt,
|
|
|
10141
10240
|
// We'll use the Bridging class to do this…
|
|
10142
10241
|
auto js_uniffiHandle =
|
|
10143
10242
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10144
|
-
auto
|
|
10145
|
-
rt, callInvoker,
|
|
10146
|
-
auto js_uniffiFutureCallback =
|
|
10147
|
-
|
|
10148
|
-
|
|
10243
|
+
auto js_request = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10244
|
+
rt, callInvoker, rs_request);
|
|
10245
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
10246
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
10247
|
+
rs_uniffiFutureCallback);
|
|
10149
10248
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10150
10249
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
10151
10250
|
|
|
@@ -10155,13 +10254,14 @@ static void body(jsi::Runtime &rt,
|
|
|
10155
10254
|
try {
|
|
10156
10255
|
// Getting the callback function
|
|
10157
10256
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10158
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
10257
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
|
|
10159
10258
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10160
10259
|
|
|
10260
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10161
10261
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10162
|
-
*rs_uniffiOutReturn =
|
|
10163
|
-
|
|
10164
|
-
|
|
10262
|
+
*rs_uniffiOutReturn =
|
|
10263
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
10264
|
+
rt, callInvoker, uniffiResult);
|
|
10165
10265
|
} catch (const jsi::JSError &error) {
|
|
10166
10266
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod14: "
|
|
10167
10267
|
<< error.what() << std::endl;
|
|
@@ -10169,10 +10269,11 @@ static void body(jsi::Runtime &rt,
|
|
|
10169
10269
|
}
|
|
10170
10270
|
}
|
|
10171
10271
|
|
|
10172
|
-
static void
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10272
|
+
static void
|
|
10273
|
+
callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
|
|
10274
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10275
|
+
uint64_t rs_uniffiCallbackData,
|
|
10276
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10176
10277
|
// If the runtime has shutdown, then there is no point in trying to
|
|
10177
10278
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10178
10279
|
//
|
|
@@ -10188,7 +10289,7 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
10188
10289
|
|
|
10189
10290
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10190
10291
|
// are all in the lambda.
|
|
10191
|
-
rsLambda(rs_uniffiHandle,
|
|
10292
|
+
rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
|
|
10192
10293
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10193
10294
|
}
|
|
10194
10295
|
|
|
@@ -10212,17 +10313,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
10212
10313
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10213
10314
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10214
10315
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10215
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10216
|
-
|
|
10316
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_request,
|
|
10317
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10217
10318
|
uint64_t rs_uniffiCallbackData,
|
|
10218
10319
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10219
10320
|
// We immediately make a lambda which will do the work of transforming the
|
|
10220
10321
|
// arguments into JSI values and calling the callback.
|
|
10221
10322
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10222
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10323
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_request,
|
|
10223
10324
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10224
10325
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10225
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10326
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
|
|
10226
10327
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10227
10328
|
rs_uniffiOutReturn);
|
|
10228
10329
|
};
|
|
@@ -10263,8 +10364,8 @@ using namespace facebook;
|
|
|
10263
10364
|
|
|
10264
10365
|
// We need to store a lambda in a global so we can call it from
|
|
10265
10366
|
// a function pointer. The function pointer is passed to Rust.
|
|
10266
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
10267
|
-
|
|
10367
|
+
static std::function<void(uint64_t, RustBuffer,
|
|
10368
|
+
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
10268
10369
|
UniffiForeignFuture *)>
|
|
10269
10370
|
rsLambda = nullptr;
|
|
10270
10371
|
|
|
@@ -10273,9 +10374,8 @@ static std::function<void(uint64_t, RustBuffer, uint64_t,
|
|
|
10273
10374
|
static void body(jsi::Runtime &rt,
|
|
10274
10375
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10275
10376
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10276
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10277
|
-
|
|
10278
|
-
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10377
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_id,
|
|
10378
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10279
10379
|
uint64_t rs_uniffiCallbackData,
|
|
10280
10380
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10281
10381
|
|
|
@@ -10283,13 +10383,11 @@ static void body(jsi::Runtime &rt,
|
|
|
10283
10383
|
// We'll use the Bridging class to do this…
|
|
10284
10384
|
auto js_uniffiHandle =
|
|
10285
10385
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10286
|
-
auto
|
|
10287
|
-
rt, callInvoker,
|
|
10288
|
-
auto
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10292
|
-
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10386
|
+
auto js_id = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10387
|
+
rt, callInvoker, rs_id);
|
|
10388
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
10389
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
10390
|
+
rs_uniffiFutureCallback);
|
|
10293
10391
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10294
10392
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
10295
10393
|
|
|
@@ -10299,14 +10397,14 @@ static void body(jsi::Runtime &rt,
|
|
|
10299
10397
|
try {
|
|
10300
10398
|
// Getting the callback function
|
|
10301
10399
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10302
|
-
auto uniffiResult =
|
|
10303
|
-
|
|
10304
|
-
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10400
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
|
|
10401
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10305
10402
|
|
|
10403
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10306
10404
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10307
|
-
*rs_uniffiOutReturn =
|
|
10308
|
-
|
|
10309
|
-
|
|
10405
|
+
*rs_uniffiOutReturn =
|
|
10406
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
10407
|
+
rt, callInvoker, uniffiResult);
|
|
10310
10408
|
} catch (const jsi::JSError &error) {
|
|
10311
10409
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod15: "
|
|
10312
10410
|
<< error.what() << std::endl;
|
|
@@ -10314,11 +10412,11 @@ static void body(jsi::Runtime &rt,
|
|
|
10314
10412
|
}
|
|
10315
10413
|
}
|
|
10316
10414
|
|
|
10317
|
-
static void
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10415
|
+
static void
|
|
10416
|
+
callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
|
|
10417
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10418
|
+
uint64_t rs_uniffiCallbackData,
|
|
10419
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10322
10420
|
// If the runtime has shutdown, then there is no point in trying to
|
|
10323
10421
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10324
10422
|
//
|
|
@@ -10334,8 +10432,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
10334
10432
|
|
|
10335
10433
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10336
10434
|
// are all in the lambda.
|
|
10337
|
-
rsLambda(rs_uniffiHandle,
|
|
10338
|
-
|
|
10435
|
+
rsLambda(rs_uniffiHandle, rs_id, rs_uniffiFutureCallback,
|
|
10436
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10339
10437
|
}
|
|
10340
10438
|
|
|
10341
10439
|
static UniffiCallbackInterfaceStorageMethod15
|
|
@@ -10358,19 +10456,18 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
10358
10456
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10359
10457
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10360
10458
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10361
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
10362
|
-
|
|
10363
|
-
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10459
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_id,
|
|
10460
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10364
10461
|
uint64_t rs_uniffiCallbackData,
|
|
10365
10462
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10366
10463
|
// We immediately make a lambda which will do the work of transforming the
|
|
10367
10464
|
// arguments into JSI values and calling the callback.
|
|
10368
10465
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10369
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
10370
|
-
|
|
10466
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_id,
|
|
10467
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10371
10468
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10372
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
10373
|
-
|
|
10469
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_id,
|
|
10470
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10374
10471
|
rs_uniffiOutReturn);
|
|
10375
10472
|
};
|
|
10376
10473
|
// We'll then call that lambda from the callInvoker which will
|
|
@@ -10410,9 +10507,8 @@ using namespace facebook;
|
|
|
10410
10507
|
|
|
10411
10508
|
// We need to store a lambda in a global so we can call it from
|
|
10412
10509
|
// a function pointer. The function pointer is passed to Rust.
|
|
10413
|
-
static std::function<void(uint64_t,
|
|
10414
|
-
|
|
10415
|
-
UniffiForeignFuture *)>
|
|
10510
|
+
static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
10511
|
+
uint64_t, UniffiForeignFuture *)>
|
|
10416
10512
|
rsLambda = nullptr;
|
|
10417
10513
|
|
|
10418
10514
|
// This is the main body of the callback. It's called from the lambda,
|
|
@@ -10420,8 +10516,8 @@ static std::function<void(uint64_t, uint32_t,
|
|
|
10420
10516
|
static void body(jsi::Runtime &rt,
|
|
10421
10517
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10422
10518
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
10423
|
-
uint64_t rs_uniffiHandle,
|
|
10424
|
-
|
|
10519
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_contact,
|
|
10520
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10425
10521
|
uint64_t rs_uniffiCallbackData,
|
|
10426
10522
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10427
10523
|
|
|
@@ -10429,11 +10525,11 @@ static void body(jsi::Runtime &rt,
|
|
|
10429
10525
|
// We'll use the Bridging class to do this…
|
|
10430
10526
|
auto js_uniffiHandle =
|
|
10431
10527
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10432
|
-
auto
|
|
10433
|
-
|
|
10434
|
-
auto js_uniffiFutureCallback =
|
|
10435
|
-
|
|
10436
|
-
|
|
10528
|
+
auto js_contact = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10529
|
+
rt, callInvoker, rs_contact);
|
|
10530
|
+
auto js_uniffiFutureCallback =
|
|
10531
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10532
|
+
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10437
10533
|
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10438
10534
|
rt, callInvoker, rs_uniffiCallbackData);
|
|
10439
10535
|
|
|
@@ -10443,13 +10539,14 @@ static void body(jsi::Runtime &rt,
|
|
|
10443
10539
|
try {
|
|
10444
10540
|
// Getting the callback function
|
|
10445
10541
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10446
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
10542
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_contact,
|
|
10447
10543
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10448
10544
|
|
|
10545
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10449
10546
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10450
|
-
*rs_uniffiOutReturn =
|
|
10451
|
-
|
|
10452
|
-
|
|
10547
|
+
*rs_uniffiOutReturn =
|
|
10548
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
10549
|
+
rt, callInvoker, uniffiResult);
|
|
10453
10550
|
} catch (const jsi::JSError &error) {
|
|
10454
10551
|
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod16: "
|
|
10455
10552
|
<< error.what() << std::endl;
|
|
@@ -10457,11 +10554,10 @@ static void body(jsi::Runtime &rt,
|
|
|
10457
10554
|
}
|
|
10458
10555
|
}
|
|
10459
10556
|
|
|
10460
|
-
static void
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10557
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_contact,
|
|
10558
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10559
|
+
uint64_t rs_uniffiCallbackData,
|
|
10560
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10465
10561
|
// If the runtime has shutdown, then there is no point in trying to
|
|
10466
10562
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10467
10563
|
//
|
|
@@ -10477,7 +10573,7 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
|
10477
10573
|
|
|
10478
10574
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10479
10575
|
// are all in the lambda.
|
|
10480
|
-
rsLambda(rs_uniffiHandle,
|
|
10576
|
+
rsLambda(rs_uniffiHandle, rs_contact, rs_uniffiFutureCallback,
|
|
10481
10577
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10482
10578
|
}
|
|
10483
10579
|
|
|
@@ -10501,7 +10597,580 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
10501
10597
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10502
10598
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10503
10599
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10504
|
-
uint64_t rs_uniffiHandle,
|
|
10600
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_contact,
|
|
10601
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10602
|
+
uint64_t rs_uniffiCallbackData,
|
|
10603
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10604
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
10605
|
+
// arguments into JSI values and calling the callback.
|
|
10606
|
+
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10607
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
|
|
10608
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10609
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10610
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
|
|
10611
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10612
|
+
rs_uniffiOutReturn);
|
|
10613
|
+
};
|
|
10614
|
+
// We'll then call that lambda from the callInvoker which will
|
|
10615
|
+
// look after calling it on the correct thread.
|
|
10616
|
+
callInvoker->invokeBlocking(rt, jsLambda);
|
|
10617
|
+
};
|
|
10618
|
+
return callback;
|
|
10619
|
+
}
|
|
10620
|
+
|
|
10621
|
+
// This method is called from the destructor of NativeBreezSdkSpark, which only
|
|
10622
|
+
// happens when the jsi::Runtime is being destroyed.
|
|
10623
|
+
static void cleanup() {
|
|
10624
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled
|
|
10625
|
+
// out, then the pointer will no longer be left dangling.
|
|
10626
|
+
rsLambda = nullptr;
|
|
10627
|
+
}
|
|
10628
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod16
|
|
10629
|
+
// Implementation of callback function calling from Rust to JS
|
|
10630
|
+
// CallbackInterfaceStorageMethod17
|
|
10631
|
+
|
|
10632
|
+
// Callback function:
|
|
10633
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17::UniffiCallbackInterfaceStorageMethod17
|
|
10634
|
+
//
|
|
10635
|
+
// We have the following constraints:
|
|
10636
|
+
// - we need to pass a function pointer to Rust.
|
|
10637
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
10638
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
10639
|
+
//
|
|
10640
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
10641
|
+
// function calls the lambda, which itself calls the `body` which then calls
|
|
10642
|
+
// into JS.
|
|
10643
|
+
//
|
|
10644
|
+
// We then give the `callback` function pointer to Rust which will call the
|
|
10645
|
+
// lambda sometime in the future.
|
|
10646
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17 {
|
|
10647
|
+
using namespace facebook;
|
|
10648
|
+
|
|
10649
|
+
// We need to store a lambda in a global so we can call it from
|
|
10650
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
10651
|
+
static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
10652
|
+
uint64_t, UniffiForeignFuture *)>
|
|
10653
|
+
rsLambda = nullptr;
|
|
10654
|
+
|
|
10655
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
10656
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
10657
|
+
static void body(jsi::Runtime &rt,
|
|
10658
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10659
|
+
std::shared_ptr<jsi::Value> callbackValue,
|
|
10660
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_id,
|
|
10661
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10662
|
+
uint64_t rs_uniffiCallbackData,
|
|
10663
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10664
|
+
|
|
10665
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
10666
|
+
// We'll use the Bridging class to do this…
|
|
10667
|
+
auto js_uniffiHandle =
|
|
10668
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10669
|
+
auto js_id = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10670
|
+
rt, callInvoker, rs_id);
|
|
10671
|
+
auto js_uniffiFutureCallback =
|
|
10672
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10673
|
+
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10674
|
+
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10675
|
+
rt, callInvoker, rs_uniffiCallbackData);
|
|
10676
|
+
|
|
10677
|
+
// Now we are ready to call the callback.
|
|
10678
|
+
// We are already on the JS thread, because this `body` function was
|
|
10679
|
+
// invoked from the CallInvoker.
|
|
10680
|
+
try {
|
|
10681
|
+
// Getting the callback function
|
|
10682
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10683
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
|
|
10684
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10685
|
+
|
|
10686
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10687
|
+
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10688
|
+
*rs_uniffiOutReturn =
|
|
10689
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
10690
|
+
rt, callInvoker, uniffiResult);
|
|
10691
|
+
} catch (const jsi::JSError &error) {
|
|
10692
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod17: "
|
|
10693
|
+
<< error.what() << std::endl;
|
|
10694
|
+
throw error;
|
|
10695
|
+
}
|
|
10696
|
+
}
|
|
10697
|
+
|
|
10698
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
|
|
10699
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10700
|
+
uint64_t rs_uniffiCallbackData,
|
|
10701
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10702
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
10703
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10704
|
+
//
|
|
10705
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
10706
|
+
// which nulls out the rsLamda.
|
|
10707
|
+
//
|
|
10708
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
10709
|
+
if (rsLambda == nullptr) {
|
|
10710
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
10711
|
+
// which causes the JS callback to be dropped.
|
|
10712
|
+
return;
|
|
10713
|
+
}
|
|
10714
|
+
|
|
10715
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10716
|
+
// are all in the lambda.
|
|
10717
|
+
rsLambda(rs_uniffiHandle, rs_id, rs_uniffiFutureCallback,
|
|
10718
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10719
|
+
}
|
|
10720
|
+
|
|
10721
|
+
static UniffiCallbackInterfaceStorageMethod17
|
|
10722
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17
|
|
10723
|
+
jsi::Runtime &rt,
|
|
10724
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10725
|
+
const jsi::Value &value) {
|
|
10726
|
+
if (rsLambda != nullptr) {
|
|
10727
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
10728
|
+
//
|
|
10729
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
10730
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
10731
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
10732
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
10733
|
+
//
|
|
10734
|
+
// We can therefore return the callback function without making anything
|
|
10735
|
+
// new if we've been initialized already.
|
|
10736
|
+
return callback;
|
|
10737
|
+
}
|
|
10738
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10739
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10740
|
+
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10741
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_id,
|
|
10742
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10743
|
+
uint64_t rs_uniffiCallbackData,
|
|
10744
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10745
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
10746
|
+
// arguments into JSI values and calling the callback.
|
|
10747
|
+
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10748
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_id,
|
|
10749
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10750
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10751
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_id,
|
|
10752
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10753
|
+
rs_uniffiOutReturn);
|
|
10754
|
+
};
|
|
10755
|
+
// We'll then call that lambda from the callInvoker which will
|
|
10756
|
+
// look after calling it on the correct thread.
|
|
10757
|
+
callInvoker->invokeBlocking(rt, jsLambda);
|
|
10758
|
+
};
|
|
10759
|
+
return callback;
|
|
10760
|
+
}
|
|
10761
|
+
|
|
10762
|
+
// This method is called from the destructor of NativeBreezSdkSpark, which only
|
|
10763
|
+
// happens when the jsi::Runtime is being destroyed.
|
|
10764
|
+
static void cleanup() {
|
|
10765
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled
|
|
10766
|
+
// out, then the pointer will no longer be left dangling.
|
|
10767
|
+
rsLambda = nullptr;
|
|
10768
|
+
}
|
|
10769
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod17
|
|
10770
|
+
// Implementation of callback function calling from Rust to JS
|
|
10771
|
+
// CallbackInterfaceStorageMethod18
|
|
10772
|
+
|
|
10773
|
+
// Callback function:
|
|
10774
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18::UniffiCallbackInterfaceStorageMethod18
|
|
10775
|
+
//
|
|
10776
|
+
// We have the following constraints:
|
|
10777
|
+
// - we need to pass a function pointer to Rust.
|
|
10778
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
10779
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
10780
|
+
//
|
|
10781
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
10782
|
+
// function calls the lambda, which itself calls the `body` which then calls
|
|
10783
|
+
// into JS.
|
|
10784
|
+
//
|
|
10785
|
+
// We then give the `callback` function pointer to Rust which will call the
|
|
10786
|
+
// lambda sometime in the future.
|
|
10787
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18 {
|
|
10788
|
+
using namespace facebook;
|
|
10789
|
+
|
|
10790
|
+
// We need to store a lambda in a global so we can call it from
|
|
10791
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
10792
|
+
static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteU64,
|
|
10793
|
+
uint64_t, UniffiForeignFuture *)>
|
|
10794
|
+
rsLambda = nullptr;
|
|
10795
|
+
|
|
10796
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
10797
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
10798
|
+
static void body(jsi::Runtime &rt,
|
|
10799
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10800
|
+
std::shared_ptr<jsi::Value> callbackValue,
|
|
10801
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10802
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10803
|
+
uint64_t rs_uniffiCallbackData,
|
|
10804
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10805
|
+
|
|
10806
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
10807
|
+
// We'll use the Bridging class to do this…
|
|
10808
|
+
auto js_uniffiHandle =
|
|
10809
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10810
|
+
auto js_record = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10811
|
+
rt, callInvoker, rs_record);
|
|
10812
|
+
auto js_uniffiFutureCallback =
|
|
10813
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteU64>::toJs(
|
|
10814
|
+
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10815
|
+
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10816
|
+
rt, callInvoker, rs_uniffiCallbackData);
|
|
10817
|
+
|
|
10818
|
+
// Now we are ready to call the callback.
|
|
10819
|
+
// We are already on the JS thread, because this `body` function was
|
|
10820
|
+
// invoked from the CallInvoker.
|
|
10821
|
+
try {
|
|
10822
|
+
// Getting the callback function
|
|
10823
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10824
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_record,
|
|
10825
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10826
|
+
|
|
10827
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10828
|
+
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10829
|
+
*rs_uniffiOutReturn =
|
|
10830
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
10831
|
+
rt, callInvoker, uniffiResult);
|
|
10832
|
+
} catch (const jsi::JSError &error) {
|
|
10833
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod18: "
|
|
10834
|
+
<< error.what() << std::endl;
|
|
10835
|
+
throw error;
|
|
10836
|
+
}
|
|
10837
|
+
}
|
|
10838
|
+
|
|
10839
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10840
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10841
|
+
uint64_t rs_uniffiCallbackData,
|
|
10842
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10843
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
10844
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10845
|
+
//
|
|
10846
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
10847
|
+
// which nulls out the rsLamda.
|
|
10848
|
+
//
|
|
10849
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
10850
|
+
if (rsLambda == nullptr) {
|
|
10851
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
10852
|
+
// which causes the JS callback to be dropped.
|
|
10853
|
+
return;
|
|
10854
|
+
}
|
|
10855
|
+
|
|
10856
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
10857
|
+
// are all in the lambda.
|
|
10858
|
+
rsLambda(rs_uniffiHandle, rs_record, rs_uniffiFutureCallback,
|
|
10859
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10860
|
+
}
|
|
10861
|
+
|
|
10862
|
+
static UniffiCallbackInterfaceStorageMethod18
|
|
10863
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18
|
|
10864
|
+
jsi::Runtime &rt,
|
|
10865
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10866
|
+
const jsi::Value &value) {
|
|
10867
|
+
if (rsLambda != nullptr) {
|
|
10868
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
10869
|
+
//
|
|
10870
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
10871
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
10872
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
10873
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
10874
|
+
//
|
|
10875
|
+
// We can therefore return the callback function without making anything
|
|
10876
|
+
// new if we've been initialized already.
|
|
10877
|
+
return callback;
|
|
10878
|
+
}
|
|
10879
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
10880
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
10881
|
+
rsLambda = [&rt, callInvoker, callbackValue](
|
|
10882
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10883
|
+
UniffiForeignFutureCompleteU64 rs_uniffiFutureCallback,
|
|
10884
|
+
uint64_t rs_uniffiCallbackData,
|
|
10885
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10886
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
10887
|
+
// arguments into JSI values and calling the callback.
|
|
10888
|
+
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
10889
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
10890
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10891
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
10892
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
10893
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
10894
|
+
rs_uniffiOutReturn);
|
|
10895
|
+
};
|
|
10896
|
+
// We'll then call that lambda from the callInvoker which will
|
|
10897
|
+
// look after calling it on the correct thread.
|
|
10898
|
+
callInvoker->invokeBlocking(rt, jsLambda);
|
|
10899
|
+
};
|
|
10900
|
+
return callback;
|
|
10901
|
+
}
|
|
10902
|
+
|
|
10903
|
+
// This method is called from the destructor of NativeBreezSdkSpark, which only
|
|
10904
|
+
// happens when the jsi::Runtime is being destroyed.
|
|
10905
|
+
static void cleanup() {
|
|
10906
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled
|
|
10907
|
+
// out, then the pointer will no longer be left dangling.
|
|
10908
|
+
rsLambda = nullptr;
|
|
10909
|
+
}
|
|
10910
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod18
|
|
10911
|
+
// Implementation of callback function calling from Rust to JS
|
|
10912
|
+
// CallbackInterfaceStorageMethod19
|
|
10913
|
+
|
|
10914
|
+
// Callback function:
|
|
10915
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19::UniffiCallbackInterfaceStorageMethod19
|
|
10916
|
+
//
|
|
10917
|
+
// We have the following constraints:
|
|
10918
|
+
// - we need to pass a function pointer to Rust.
|
|
10919
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
10920
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
10921
|
+
//
|
|
10922
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
10923
|
+
// function calls the lambda, which itself calls the `body` which then calls
|
|
10924
|
+
// into JS.
|
|
10925
|
+
//
|
|
10926
|
+
// We then give the `callback` function pointer to Rust which will call the
|
|
10927
|
+
// lambda sometime in the future.
|
|
10928
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19 {
|
|
10929
|
+
using namespace facebook;
|
|
10930
|
+
|
|
10931
|
+
// We need to store a lambda in a global so we can call it from
|
|
10932
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
10933
|
+
static std::function<void(uint64_t, RustBuffer, uint64_t,
|
|
10934
|
+
UniffiForeignFutureCompleteVoid, uint64_t,
|
|
10935
|
+
UniffiForeignFuture *)>
|
|
10936
|
+
rsLambda = nullptr;
|
|
10937
|
+
|
|
10938
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
10939
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
10940
|
+
static void body(jsi::Runtime &rt,
|
|
10941
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10942
|
+
std::shared_ptr<jsi::Value> callbackValue,
|
|
10943
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10944
|
+
uint64_t rs_localRevision,
|
|
10945
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10946
|
+
uint64_t rs_uniffiCallbackData,
|
|
10947
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10948
|
+
|
|
10949
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
10950
|
+
// We'll use the Bridging class to do this…
|
|
10951
|
+
auto js_uniffiHandle =
|
|
10952
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
10953
|
+
auto js_record = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
10954
|
+
rt, callInvoker, rs_record);
|
|
10955
|
+
auto js_localRevision =
|
|
10956
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_localRevision);
|
|
10957
|
+
auto js_uniffiFutureCallback =
|
|
10958
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
10959
|
+
rt, callInvoker, rs_uniffiFutureCallback);
|
|
10960
|
+
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
10961
|
+
rt, callInvoker, rs_uniffiCallbackData);
|
|
10962
|
+
|
|
10963
|
+
// Now we are ready to call the callback.
|
|
10964
|
+
// We are already on the JS thread, because this `body` function was
|
|
10965
|
+
// invoked from the CallInvoker.
|
|
10966
|
+
try {
|
|
10967
|
+
// Getting the callback function
|
|
10968
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
10969
|
+
auto uniffiResult =
|
|
10970
|
+
cb.call(rt, js_uniffiHandle, js_record, js_localRevision,
|
|
10971
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10972
|
+
|
|
10973
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10974
|
+
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10975
|
+
*rs_uniffiOutReturn =
|
|
10976
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
10977
|
+
rt, callInvoker, uniffiResult);
|
|
10978
|
+
} catch (const jsi::JSError &error) {
|
|
10979
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod19: "
|
|
10980
|
+
<< error.what() << std::endl;
|
|
10981
|
+
throw error;
|
|
10982
|
+
}
|
|
10983
|
+
}
|
|
10984
|
+
|
|
10985
|
+
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
10986
|
+
uint64_t rs_localRevision,
|
|
10987
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
10988
|
+
uint64_t rs_uniffiCallbackData,
|
|
10989
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
10990
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
10991
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
10992
|
+
//
|
|
10993
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
10994
|
+
// which nulls out the rsLamda.
|
|
10995
|
+
//
|
|
10996
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
10997
|
+
if (rsLambda == nullptr) {
|
|
10998
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
10999
|
+
// which causes the JS callback to be dropped.
|
|
11000
|
+
return;
|
|
11001
|
+
}
|
|
11002
|
+
|
|
11003
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
11004
|
+
// are all in the lambda.
|
|
11005
|
+
rsLambda(rs_uniffiHandle, rs_record, rs_localRevision,
|
|
11006
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
11007
|
+
}
|
|
11008
|
+
|
|
11009
|
+
static UniffiCallbackInterfaceStorageMethod19
|
|
11010
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
|
|
11011
|
+
jsi::Runtime &rt,
|
|
11012
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11013
|
+
const jsi::Value &value) {
|
|
11014
|
+
if (rsLambda != nullptr) {
|
|
11015
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
11016
|
+
//
|
|
11017
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
11018
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
11019
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
11020
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
11021
|
+
//
|
|
11022
|
+
// We can therefore return the callback function without making anything
|
|
11023
|
+
// new if we've been initialized already.
|
|
11024
|
+
return callback;
|
|
11025
|
+
}
|
|
11026
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
11027
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
11028
|
+
rsLambda = [&rt, callInvoker, callbackValue](
|
|
11029
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
11030
|
+
uint64_t rs_localRevision,
|
|
11031
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
11032
|
+
uint64_t rs_uniffiCallbackData,
|
|
11033
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
11034
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
11035
|
+
// arguments into JSI values and calling the callback.
|
|
11036
|
+
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
11037
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
11038
|
+
rs_localRevision, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
11039
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
11040
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_record,
|
|
11041
|
+
rs_localRevision, rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
11042
|
+
rs_uniffiOutReturn);
|
|
11043
|
+
};
|
|
11044
|
+
// We'll then call that lambda from the callInvoker which will
|
|
11045
|
+
// look after calling it on the correct thread.
|
|
11046
|
+
callInvoker->invokeBlocking(rt, jsLambda);
|
|
11047
|
+
};
|
|
11048
|
+
return callback;
|
|
11049
|
+
}
|
|
11050
|
+
|
|
11051
|
+
// This method is called from the destructor of NativeBreezSdkSpark, which only
|
|
11052
|
+
// happens when the jsi::Runtime is being destroyed.
|
|
11053
|
+
static void cleanup() {
|
|
11054
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled
|
|
11055
|
+
// out, then the pointer will no longer be left dangling.
|
|
11056
|
+
rsLambda = nullptr;
|
|
11057
|
+
}
|
|
11058
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
|
|
11059
|
+
// Implementation of callback function calling from Rust to JS
|
|
11060
|
+
// CallbackInterfaceStorageMethod20
|
|
11061
|
+
|
|
11062
|
+
// Callback function:
|
|
11063
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20::UniffiCallbackInterfaceStorageMethod20
|
|
11064
|
+
//
|
|
11065
|
+
// We have the following constraints:
|
|
11066
|
+
// - we need to pass a function pointer to Rust.
|
|
11067
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
11068
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
11069
|
+
//
|
|
11070
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
11071
|
+
// function calls the lambda, which itself calls the `body` which then calls
|
|
11072
|
+
// into JS.
|
|
11073
|
+
//
|
|
11074
|
+
// We then give the `callback` function pointer to Rust which will call the
|
|
11075
|
+
// lambda sometime in the future.
|
|
11076
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20 {
|
|
11077
|
+
using namespace facebook;
|
|
11078
|
+
|
|
11079
|
+
// We need to store a lambda in a global so we can call it from
|
|
11080
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
11081
|
+
static std::function<void(uint64_t, uint32_t,
|
|
11082
|
+
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
11083
|
+
UniffiForeignFuture *)>
|
|
11084
|
+
rsLambda = nullptr;
|
|
11085
|
+
|
|
11086
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
11087
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
11088
|
+
static void body(jsi::Runtime &rt,
|
|
11089
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11090
|
+
std::shared_ptr<jsi::Value> callbackValue,
|
|
11091
|
+
uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
11092
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
11093
|
+
uint64_t rs_uniffiCallbackData,
|
|
11094
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
11095
|
+
|
|
11096
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
11097
|
+
// We'll use the Bridging class to do this…
|
|
11098
|
+
auto js_uniffiHandle =
|
|
11099
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
11100
|
+
auto js_limit =
|
|
11101
|
+
uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, rs_limit);
|
|
11102
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
11103
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
11104
|
+
rs_uniffiFutureCallback);
|
|
11105
|
+
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
11106
|
+
rt, callInvoker, rs_uniffiCallbackData);
|
|
11107
|
+
|
|
11108
|
+
// Now we are ready to call the callback.
|
|
11109
|
+
// We are already on the JS thread, because this `body` function was
|
|
11110
|
+
// invoked from the CallInvoker.
|
|
11111
|
+
try {
|
|
11112
|
+
// Getting the callback function
|
|
11113
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
11114
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_limit,
|
|
11115
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
11116
|
+
|
|
11117
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
11118
|
+
// Finally, we need to copy the return value back into the Rust pointer.
|
|
11119
|
+
*rs_uniffiOutReturn =
|
|
11120
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
11121
|
+
rt, callInvoker, uniffiResult);
|
|
11122
|
+
} catch (const jsi::JSError &error) {
|
|
11123
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod20: "
|
|
11124
|
+
<< error.what() << std::endl;
|
|
11125
|
+
throw error;
|
|
11126
|
+
}
|
|
11127
|
+
}
|
|
11128
|
+
|
|
11129
|
+
static void
|
|
11130
|
+
callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
11131
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
11132
|
+
uint64_t rs_uniffiCallbackData,
|
|
11133
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
11134
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
11135
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
11136
|
+
//
|
|
11137
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
11138
|
+
// which nulls out the rsLamda.
|
|
11139
|
+
//
|
|
11140
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
11141
|
+
if (rsLambda == nullptr) {
|
|
11142
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
11143
|
+
// which causes the JS callback to be dropped.
|
|
11144
|
+
return;
|
|
11145
|
+
}
|
|
11146
|
+
|
|
11147
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
11148
|
+
// are all in the lambda.
|
|
11149
|
+
rsLambda(rs_uniffiHandle, rs_limit, rs_uniffiFutureCallback,
|
|
11150
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
11151
|
+
}
|
|
11152
|
+
|
|
11153
|
+
static UniffiCallbackInterfaceStorageMethod20
|
|
11154
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
|
|
11155
|
+
jsi::Runtime &rt,
|
|
11156
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11157
|
+
const jsi::Value &value) {
|
|
11158
|
+
if (rsLambda != nullptr) {
|
|
11159
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
11160
|
+
//
|
|
11161
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
11162
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
11163
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
11164
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
11165
|
+
//
|
|
11166
|
+
// We can therefore return the callback function without making anything
|
|
11167
|
+
// new if we've been initialized already.
|
|
11168
|
+
return callback;
|
|
11169
|
+
}
|
|
11170
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
11171
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
11172
|
+
rsLambda = [&rt, callInvoker, callbackValue](
|
|
11173
|
+
uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
10505
11174
|
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
10506
11175
|
uint64_t rs_uniffiCallbackData,
|
|
10507
11176
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -10529,12 +11198,12 @@ static void cleanup() {
|
|
|
10529
11198
|
// out, then the pointer will no longer be left dangling.
|
|
10530
11199
|
rsLambda = nullptr;
|
|
10531
11200
|
}
|
|
10532
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11201
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
|
|
10533
11202
|
// Implementation of callback function calling from Rust to JS
|
|
10534
|
-
//
|
|
11203
|
+
// CallbackInterfaceStorageMethod21
|
|
10535
11204
|
|
|
10536
11205
|
// Callback function:
|
|
10537
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11206
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21::UniffiCallbackInterfaceStorageMethod21
|
|
10538
11207
|
//
|
|
10539
11208
|
// We have the following constraints:
|
|
10540
11209
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10547,7 +11216,7 @@ static void cleanup() {
|
|
|
10547
11216
|
//
|
|
10548
11217
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10549
11218
|
// lambda sometime in the future.
|
|
10550
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11219
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21 {
|
|
10551
11220
|
using namespace facebook;
|
|
10552
11221
|
|
|
10553
11222
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -10585,12 +11254,13 @@ static void body(jsi::Runtime &rt,
|
|
|
10585
11254
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
10586
11255
|
js_uniffiCallbackData);
|
|
10587
11256
|
|
|
11257
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10588
11258
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10589
|
-
*rs_uniffiOutReturn =
|
|
10590
|
-
|
|
10591
|
-
|
|
11259
|
+
*rs_uniffiOutReturn =
|
|
11260
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
11261
|
+
rt, callInvoker, uniffiResult);
|
|
10592
11262
|
} catch (const jsi::JSError &error) {
|
|
10593
|
-
std::cout << "Error in callback
|
|
11263
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod21: "
|
|
10594
11264
|
<< error.what() << std::endl;
|
|
10595
11265
|
throw error;
|
|
10596
11266
|
}
|
|
@@ -10619,8 +11289,8 @@ static void callback(uint64_t rs_uniffiHandle,
|
|
|
10619
11289
|
rs_uniffiOutReturn);
|
|
10620
11290
|
}
|
|
10621
11291
|
|
|
10622
|
-
static
|
|
10623
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11292
|
+
static UniffiCallbackInterfaceStorageMethod21
|
|
11293
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
|
|
10624
11294
|
jsi::Runtime &rt,
|
|
10625
11295
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10626
11296
|
const jsi::Value &value) {
|
|
@@ -10666,12 +11336,12 @@ static void cleanup() {
|
|
|
10666
11336
|
// out, then the pointer will no longer be left dangling.
|
|
10667
11337
|
rsLambda = nullptr;
|
|
10668
11338
|
}
|
|
10669
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11339
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
|
|
10670
11340
|
// Implementation of callback function calling from Rust to JS
|
|
10671
|
-
//
|
|
11341
|
+
// CallbackInterfaceStorageMethod22
|
|
10672
11342
|
|
|
10673
11343
|
// Callback function:
|
|
10674
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11344
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::UniffiCallbackInterfaceStorageMethod22
|
|
10675
11345
|
//
|
|
10676
11346
|
// We have the following constraints:
|
|
10677
11347
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10684,7 +11354,7 @@ static void cleanup() {
|
|
|
10684
11354
|
//
|
|
10685
11355
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10686
11356
|
// lambda sometime in the future.
|
|
10687
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11357
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22 {
|
|
10688
11358
|
using namespace facebook;
|
|
10689
11359
|
|
|
10690
11360
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -10724,12 +11394,13 @@ static void body(jsi::Runtime &rt,
|
|
|
10724
11394
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_records,
|
|
10725
11395
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10726
11396
|
|
|
11397
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10727
11398
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10728
|
-
*rs_uniffiOutReturn =
|
|
10729
|
-
|
|
10730
|
-
|
|
11399
|
+
*rs_uniffiOutReturn =
|
|
11400
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
11401
|
+
rt, callInvoker, uniffiResult);
|
|
10731
11402
|
} catch (const jsi::JSError &error) {
|
|
10732
|
-
std::cout << "Error in callback
|
|
11403
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod22: "
|
|
10733
11404
|
<< error.what() << std::endl;
|
|
10734
11405
|
throw error;
|
|
10735
11406
|
}
|
|
@@ -10758,8 +11429,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_records,
|
|
|
10758
11429
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10759
11430
|
}
|
|
10760
11431
|
|
|
10761
|
-
static
|
|
10762
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11432
|
+
static UniffiCallbackInterfaceStorageMethod22
|
|
11433
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
|
|
10763
11434
|
jsi::Runtime &rt,
|
|
10764
11435
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10765
11436
|
const jsi::Value &value) {
|
|
@@ -10806,12 +11477,12 @@ static void cleanup() {
|
|
|
10806
11477
|
// out, then the pointer will no longer be left dangling.
|
|
10807
11478
|
rsLambda = nullptr;
|
|
10808
11479
|
}
|
|
10809
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11480
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
|
|
10810
11481
|
// Implementation of callback function calling from Rust to JS
|
|
10811
|
-
//
|
|
11482
|
+
// CallbackInterfaceStorageMethod23
|
|
10812
11483
|
|
|
10813
11484
|
// Callback function:
|
|
10814
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11485
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23::UniffiCallbackInterfaceStorageMethod23
|
|
10815
11486
|
//
|
|
10816
11487
|
// We have the following constraints:
|
|
10817
11488
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10824,7 +11495,7 @@ static void cleanup() {
|
|
|
10824
11495
|
//
|
|
10825
11496
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10826
11497
|
// lambda sometime in the future.
|
|
10827
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11498
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23 {
|
|
10828
11499
|
using namespace facebook;
|
|
10829
11500
|
|
|
10830
11501
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -10864,12 +11535,13 @@ static void body(jsi::Runtime &rt,
|
|
|
10864
11535
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_record,
|
|
10865
11536
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
10866
11537
|
|
|
11538
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
10867
11539
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
10868
|
-
*rs_uniffiOutReturn =
|
|
10869
|
-
|
|
10870
|
-
|
|
11540
|
+
*rs_uniffiOutReturn =
|
|
11541
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
11542
|
+
rt, callInvoker, uniffiResult);
|
|
10871
11543
|
} catch (const jsi::JSError &error) {
|
|
10872
|
-
std::cout << "Error in callback
|
|
11544
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod23: "
|
|
10873
11545
|
<< error.what() << std::endl;
|
|
10874
11546
|
throw error;
|
|
10875
11547
|
}
|
|
@@ -10898,8 +11570,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
10898
11570
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
10899
11571
|
}
|
|
10900
11572
|
|
|
10901
|
-
static
|
|
10902
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11573
|
+
static UniffiCallbackInterfaceStorageMethod23
|
|
11574
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
|
|
10903
11575
|
jsi::Runtime &rt,
|
|
10904
11576
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
10905
11577
|
const jsi::Value &value) {
|
|
@@ -10946,12 +11618,12 @@ static void cleanup() {
|
|
|
10946
11618
|
// out, then the pointer will no longer be left dangling.
|
|
10947
11619
|
rsLambda = nullptr;
|
|
10948
11620
|
}
|
|
10949
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11621
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
|
|
10950
11622
|
// Implementation of callback function calling from Rust to JS
|
|
10951
|
-
//
|
|
11623
|
+
// CallbackInterfaceStorageMethod24
|
|
10952
11624
|
|
|
10953
11625
|
// Callback function:
|
|
10954
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11626
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24::UniffiCallbackInterfaceStorageMethod24
|
|
10955
11627
|
//
|
|
10956
11628
|
// We have the following constraints:
|
|
10957
11629
|
// - we need to pass a function pointer to Rust.
|
|
@@ -10964,7 +11636,7 @@ static void cleanup() {
|
|
|
10964
11636
|
//
|
|
10965
11637
|
// We then give the `callback` function pointer to Rust which will call the
|
|
10966
11638
|
// lambda sometime in the future.
|
|
10967
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11639
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24 {
|
|
10968
11640
|
using namespace facebook;
|
|
10969
11641
|
|
|
10970
11642
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -11005,12 +11677,13 @@ static void body(jsi::Runtime &rt,
|
|
|
11005
11677
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_limit,
|
|
11006
11678
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
11007
11679
|
|
|
11680
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
11008
11681
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
11009
|
-
*rs_uniffiOutReturn =
|
|
11010
|
-
|
|
11011
|
-
|
|
11682
|
+
*rs_uniffiOutReturn =
|
|
11683
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
11684
|
+
rt, callInvoker, uniffiResult);
|
|
11012
11685
|
} catch (const jsi::JSError &error) {
|
|
11013
|
-
std::cout << "Error in callback
|
|
11686
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod24: "
|
|
11014
11687
|
<< error.what() << std::endl;
|
|
11015
11688
|
throw error;
|
|
11016
11689
|
}
|
|
@@ -11040,8 +11713,8 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
|
|
|
11040
11713
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
11041
11714
|
}
|
|
11042
11715
|
|
|
11043
|
-
static
|
|
11044
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11716
|
+
static UniffiCallbackInterfaceStorageMethod24
|
|
11717
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
|
|
11045
11718
|
jsi::Runtime &rt,
|
|
11046
11719
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11047
11720
|
const jsi::Value &value) {
|
|
@@ -11088,12 +11761,12 @@ static void cleanup() {
|
|
|
11088
11761
|
// out, then the pointer will no longer be left dangling.
|
|
11089
11762
|
rsLambda = nullptr;
|
|
11090
11763
|
}
|
|
11091
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11764
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
|
|
11092
11765
|
// Implementation of callback function calling from Rust to JS
|
|
11093
|
-
//
|
|
11766
|
+
// CallbackInterfaceStorageMethod25
|
|
11094
11767
|
|
|
11095
11768
|
// Callback function:
|
|
11096
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11769
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25::UniffiCallbackInterfaceStorageMethod25
|
|
11097
11770
|
//
|
|
11098
11771
|
// We have the following constraints:
|
|
11099
11772
|
// - we need to pass a function pointer to Rust.
|
|
@@ -11106,7 +11779,7 @@ static void cleanup() {
|
|
|
11106
11779
|
//
|
|
11107
11780
|
// We then give the `callback` function pointer to Rust which will call the
|
|
11108
11781
|
// lambda sometime in the future.
|
|
11109
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11782
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25 {
|
|
11110
11783
|
using namespace facebook;
|
|
11111
11784
|
|
|
11112
11785
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -11144,12 +11817,13 @@ static void body(jsi::Runtime &rt,
|
|
|
11144
11817
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
|
|
11145
11818
|
js_uniffiCallbackData);
|
|
11146
11819
|
|
|
11820
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
11147
11821
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
11148
|
-
*rs_uniffiOutReturn =
|
|
11149
|
-
|
|
11150
|
-
|
|
11822
|
+
*rs_uniffiOutReturn =
|
|
11823
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
11824
|
+
rt, callInvoker, uniffiResult);
|
|
11151
11825
|
} catch (const jsi::JSError &error) {
|
|
11152
|
-
std::cout << "Error in callback
|
|
11826
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod25: "
|
|
11153
11827
|
<< error.what() << std::endl;
|
|
11154
11828
|
throw error;
|
|
11155
11829
|
}
|
|
@@ -11179,8 +11853,8 @@ callback(uint64_t rs_uniffiHandle,
|
|
|
11179
11853
|
rs_uniffiOutReturn);
|
|
11180
11854
|
}
|
|
11181
11855
|
|
|
11182
|
-
static
|
|
11183
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11856
|
+
static UniffiCallbackInterfaceStorageMethod25
|
|
11857
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
|
|
11184
11858
|
jsi::Runtime &rt,
|
|
11185
11859
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11186
11860
|
const jsi::Value &value) {
|
|
@@ -11226,12 +11900,12 @@ static void cleanup() {
|
|
|
11226
11900
|
// out, then the pointer will no longer be left dangling.
|
|
11227
11901
|
rsLambda = nullptr;
|
|
11228
11902
|
}
|
|
11229
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
11903
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
|
|
11230
11904
|
// Implementation of callback function calling from Rust to JS
|
|
11231
|
-
//
|
|
11905
|
+
// CallbackInterfaceStorageMethod26
|
|
11232
11906
|
|
|
11233
11907
|
// Callback function:
|
|
11234
|
-
// uniffi::breez_sdk_spark::cb::
|
|
11908
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26::UniffiCallbackInterfaceStorageMethod26
|
|
11235
11909
|
//
|
|
11236
11910
|
// We have the following constraints:
|
|
11237
11911
|
// - we need to pass a function pointer to Rust.
|
|
@@ -11244,7 +11918,7 @@ static void cleanup() {
|
|
|
11244
11918
|
//
|
|
11245
11919
|
// We then give the `callback` function pointer to Rust which will call the
|
|
11246
11920
|
// lambda sometime in the future.
|
|
11247
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
11921
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26 {
|
|
11248
11922
|
using namespace facebook;
|
|
11249
11923
|
|
|
11250
11924
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -11284,12 +11958,13 @@ static void body(jsi::Runtime &rt,
|
|
|
11284
11958
|
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_record,
|
|
11285
11959
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
11286
11960
|
|
|
11961
|
+
// return type is MutReference(Struct("ForeignFuture"))
|
|
11287
11962
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
11288
|
-
*rs_uniffiOutReturn =
|
|
11289
|
-
|
|
11290
|
-
|
|
11963
|
+
*rs_uniffiOutReturn =
|
|
11964
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
|
|
11965
|
+
rt, callInvoker, uniffiResult);
|
|
11291
11966
|
} catch (const jsi::JSError &error) {
|
|
11292
|
-
std::cout << "Error in callback
|
|
11967
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod26: "
|
|
11293
11968
|
<< error.what() << std::endl;
|
|
11294
11969
|
throw error;
|
|
11295
11970
|
}
|
|
@@ -11318,8 +11993,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
|
|
|
11318
11993
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
11319
11994
|
}
|
|
11320
11995
|
|
|
11321
|
-
static
|
|
11322
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
11996
|
+
static UniffiCallbackInterfaceStorageMethod26
|
|
11997
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
|
|
11323
11998
|
jsi::Runtime &rt,
|
|
11324
11999
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
11325
12000
|
const jsi::Value &value) {
|
|
@@ -11366,7 +12041,7 @@ static void cleanup() {
|
|
|
11366
12041
|
// out, then the pointer will no longer be left dangling.
|
|
11367
12042
|
rsLambda = nullptr;
|
|
11368
12043
|
}
|
|
11369
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
12044
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
|
|
11370
12045
|
namespace uniffi::breez_sdk_spark {
|
|
11371
12046
|
using namespace facebook;
|
|
11372
12047
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
@@ -11755,34 +12430,46 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceStorage> {
|
|
|
11755
12430
|
rsObject.set_lnurl_metadata = uniffi::breez_sdk_spark::cb::
|
|
11756
12431
|
callbackinterfacestoragemethod13::makeCallbackFunction(
|
|
11757
12432
|
rt, callInvoker, jsObject.getProperty(rt, "setLnurlMetadata"));
|
|
11758
|
-
rsObject.
|
|
12433
|
+
rsObject.list_contacts = uniffi::breez_sdk_spark::cb::
|
|
11759
12434
|
callbackinterfacestoragemethod14::makeCallbackFunction(
|
|
12435
|
+
rt, callInvoker, jsObject.getProperty(rt, "listContacts"));
|
|
12436
|
+
rsObject.get_contact = uniffi::breez_sdk_spark::cb::
|
|
12437
|
+
callbackinterfacestoragemethod15::makeCallbackFunction(
|
|
12438
|
+
rt, callInvoker, jsObject.getProperty(rt, "getContact"));
|
|
12439
|
+
rsObject.insert_contact = uniffi::breez_sdk_spark::cb::
|
|
12440
|
+
callbackinterfacestoragemethod16::makeCallbackFunction(
|
|
12441
|
+
rt, callInvoker, jsObject.getProperty(rt, "insertContact"));
|
|
12442
|
+
rsObject.delete_contact = uniffi::breez_sdk_spark::cb::
|
|
12443
|
+
callbackinterfacestoragemethod17::makeCallbackFunction(
|
|
12444
|
+
rt, callInvoker, jsObject.getProperty(rt, "deleteContact"));
|
|
12445
|
+
rsObject.add_outgoing_change = uniffi::breez_sdk_spark::cb::
|
|
12446
|
+
callbackinterfacestoragemethod18::makeCallbackFunction(
|
|
11760
12447
|
rt, callInvoker, jsObject.getProperty(rt, "addOutgoingChange"));
|
|
11761
12448
|
rsObject.complete_outgoing_sync = uniffi::breez_sdk_spark::cb::
|
|
11762
|
-
|
|
12449
|
+
callbackinterfacestoragemethod19::makeCallbackFunction(
|
|
11763
12450
|
rt, callInvoker, jsObject.getProperty(rt, "completeOutgoingSync"));
|
|
11764
12451
|
rsObject.get_pending_outgoing_changes = uniffi::breez_sdk_spark::cb::
|
|
11765
|
-
|
|
12452
|
+
callbackinterfacestoragemethod20::makeCallbackFunction(
|
|
11766
12453
|
rt, callInvoker,
|
|
11767
12454
|
jsObject.getProperty(rt, "getPendingOutgoingChanges"));
|
|
11768
12455
|
rsObject.get_last_revision = uniffi::breez_sdk_spark::cb::
|
|
11769
|
-
|
|
12456
|
+
callbackinterfacestoragemethod21::makeCallbackFunction(
|
|
11770
12457
|
rt, callInvoker, jsObject.getProperty(rt, "getLastRevision"));
|
|
11771
12458
|
rsObject.insert_incoming_records = uniffi::breez_sdk_spark::cb::
|
|
11772
|
-
|
|
12459
|
+
callbackinterfacestoragemethod22::makeCallbackFunction(
|
|
11773
12460
|
rt, callInvoker, jsObject.getProperty(rt, "insertIncomingRecords"));
|
|
11774
12461
|
rsObject.delete_incoming_record = uniffi::breez_sdk_spark::cb::
|
|
11775
|
-
|
|
12462
|
+
callbackinterfacestoragemethod23::makeCallbackFunction(
|
|
11776
12463
|
rt, callInvoker, jsObject.getProperty(rt, "deleteIncomingRecord"));
|
|
11777
12464
|
rsObject.get_incoming_records = uniffi::breez_sdk_spark::cb::
|
|
11778
|
-
|
|
12465
|
+
callbackinterfacestoragemethod24::makeCallbackFunction(
|
|
11779
12466
|
rt, callInvoker, jsObject.getProperty(rt, "getIncomingRecords"));
|
|
11780
12467
|
rsObject.get_latest_outgoing_change = uniffi::breez_sdk_spark::cb::
|
|
11781
|
-
|
|
12468
|
+
callbackinterfacestoragemethod25::makeCallbackFunction(
|
|
11782
12469
|
rt, callInvoker,
|
|
11783
12470
|
jsObject.getProperty(rt, "getLatestOutgoingChange"));
|
|
11784
12471
|
rsObject.update_record_from_incoming = uniffi::breez_sdk_spark::cb::
|
|
11785
|
-
|
|
12472
|
+
callbackinterfacestoragemethod26::makeCallbackFunction(
|
|
11786
12473
|
rt, callInvoker,
|
|
11787
12474
|
jsObject.getProperty(rt, "updateRecordFromIncoming"));
|
|
11788
12475
|
rsObject.uniffi_free =
|
|
@@ -11876,6 +12563,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
11876
12563
|
return this->cpp_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
|
|
11877
12564
|
rt, thisVal, args, count);
|
|
11878
12565
|
});
|
|
12566
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_"
|
|
12567
|
+
"bitcoinchainservice"] = jsi::Function::createFromHostFunction(
|
|
12568
|
+
rt,
|
|
12569
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
12570
|
+
"callback_vtable_bitcoinchainservice"),
|
|
12571
|
+
1,
|
|
12572
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
12573
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
12574
|
+
return this
|
|
12575
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
|
|
12576
|
+
rt, thisVal, args, count);
|
|
12577
|
+
});
|
|
11879
12578
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_"
|
|
11880
12579
|
"utxos"] = jsi::Function::createFromHostFunction(
|
|
11881
12580
|
rt,
|
|
@@ -11960,6 +12659,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
11960
12659
|
return this->cpp_uniffi_breez_sdk_spark_fn_free_breezsdk(
|
|
11961
12660
|
rt, thisVal, args, count);
|
|
11962
12661
|
});
|
|
12662
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact"] =
|
|
12663
|
+
jsi::Function::createFromHostFunction(
|
|
12664
|
+
rt,
|
|
12665
|
+
jsi::PropNameID::forAscii(
|
|
12666
|
+
rt, "ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact"),
|
|
12667
|
+
2,
|
|
12668
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
12669
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
12670
|
+
return this
|
|
12671
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact(
|
|
12672
|
+
rt, thisVal, args, count);
|
|
12673
|
+
});
|
|
11963
12674
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener"] =
|
|
11964
12675
|
jsi::Function::createFromHostFunction(
|
|
11965
12676
|
rt,
|
|
@@ -12047,6 +12758,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12047
12758
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
|
|
12048
12759
|
rt, thisVal, args, count);
|
|
12049
12760
|
});
|
|
12761
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact"] =
|
|
12762
|
+
jsi::Function::createFromHostFunction(
|
|
12763
|
+
rt,
|
|
12764
|
+
jsi::PropNameID::forAscii(
|
|
12765
|
+
rt,
|
|
12766
|
+
"ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact"),
|
|
12767
|
+
2,
|
|
12768
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
12769
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
12770
|
+
return this
|
|
12771
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact(
|
|
12772
|
+
rt, thisVal, args, count);
|
|
12773
|
+
});
|
|
12050
12774
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_"
|
|
12051
12775
|
"address"] = jsi::Function::createFromHostFunction(
|
|
12052
12776
|
rt,
|
|
@@ -12166,6 +12890,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12166
12890
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_user_settings(
|
|
12167
12891
|
rt, thisVal, args, count);
|
|
12168
12892
|
});
|
|
12893
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts"] =
|
|
12894
|
+
jsi::Function::createFromHostFunction(
|
|
12895
|
+
rt,
|
|
12896
|
+
jsi::PropNameID::forAscii(
|
|
12897
|
+
rt,
|
|
12898
|
+
"ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts"),
|
|
12899
|
+
2,
|
|
12900
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
12901
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
12902
|
+
return this
|
|
12903
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts(
|
|
12904
|
+
rt, thisVal, args, count);
|
|
12905
|
+
});
|
|
12169
12906
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies"] =
|
|
12170
12907
|
jsi::Function::createFromHostFunction(
|
|
12171
12908
|
rt,
|
|
@@ -12400,6 +13137,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12400
13137
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
12401
13138
|
rt, thisVal, args, count);
|
|
12402
13139
|
});
|
|
13140
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact"] =
|
|
13141
|
+
jsi::Function::createFromHostFunction(
|
|
13142
|
+
rt,
|
|
13143
|
+
jsi::PropNameID::forAscii(
|
|
13144
|
+
rt,
|
|
13145
|
+
"ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact"),
|
|
13146
|
+
2,
|
|
13147
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13148
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13149
|
+
return this
|
|
13150
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact(
|
|
13151
|
+
rt, thisVal, args, count);
|
|
13152
|
+
});
|
|
12403
13153
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings"] =
|
|
12404
13154
|
jsi::Function::createFromHostFunction(
|
|
12405
13155
|
rt,
|
|
@@ -12434,6 +13184,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12434
13184
|
return this->cpp_uniffi_breez_sdk_spark_fn_free_externalsigner(
|
|
12435
13185
|
rt, thisVal, args, count);
|
|
12436
13186
|
});
|
|
13187
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner"] =
|
|
13188
|
+
jsi::Function::createFromHostFunction(
|
|
13189
|
+
rt,
|
|
13190
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
13191
|
+
"callback_vtable_externalsigner"),
|
|
13192
|
+
1,
|
|
13193
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13194
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13195
|
+
return this
|
|
13196
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
|
|
13197
|
+
rt, thisVal, args, count);
|
|
13198
|
+
});
|
|
12437
13199
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_externalsigner_identity_public_"
|
|
12438
13200
|
"key"] = jsi::Function::createFromHostFunction(
|
|
12439
13201
|
rt,
|
|
@@ -12700,6 +13462,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12700
13462
|
return this->cpp_uniffi_breez_sdk_spark_fn_free_fiatservice(
|
|
12701
13463
|
rt, thisVal, args, count);
|
|
12702
13464
|
});
|
|
13465
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice"] =
|
|
13466
|
+
jsi::Function::createFromHostFunction(
|
|
13467
|
+
rt,
|
|
13468
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
13469
|
+
"callback_vtable_fiatservice"),
|
|
13470
|
+
1,
|
|
13471
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13472
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13473
|
+
return this
|
|
13474
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
|
|
13475
|
+
rt, thisVal, args, count);
|
|
13476
|
+
});
|
|
12703
13477
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_"
|
|
12704
13478
|
"currencies"] = jsi::Function::createFromHostFunction(
|
|
12705
13479
|
rt,
|
|
@@ -12746,6 +13520,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12746
13520
|
return this->cpp_uniffi_breez_sdk_spark_fn_free_paymentobserver(
|
|
12747
13521
|
rt, thisVal, args, count);
|
|
12748
13522
|
});
|
|
13523
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver"] =
|
|
13524
|
+
jsi::Function::createFromHostFunction(
|
|
13525
|
+
rt,
|
|
13526
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
13527
|
+
"callback_vtable_paymentobserver"),
|
|
13528
|
+
1,
|
|
13529
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13530
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13531
|
+
return this
|
|
13532
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
|
|
13533
|
+
rt, thisVal, args, count);
|
|
13534
|
+
});
|
|
12749
13535
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_paymentobserver_before_send"] =
|
|
12750
13536
|
jsi::Function::createFromHostFunction(
|
|
12751
13537
|
rt,
|
|
@@ -12780,6 +13566,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12780
13566
|
return this->cpp_uniffi_breez_sdk_spark_fn_free_restclient(
|
|
12781
13567
|
rt, thisVal, args, count);
|
|
12782
13568
|
});
|
|
13569
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"] =
|
|
13570
|
+
jsi::Function::createFromHostFunction(
|
|
13571
|
+
rt,
|
|
13572
|
+
jsi::PropNameID::forAscii(
|
|
13573
|
+
rt,
|
|
13574
|
+
"ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"),
|
|
13575
|
+
1,
|
|
13576
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13577
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13578
|
+
return this
|
|
13579
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
|
|
13580
|
+
rt, thisVal, args, count);
|
|
13581
|
+
});
|
|
12783
13582
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_restclient_get_request"] =
|
|
12784
13583
|
jsi::Function::createFromHostFunction(
|
|
12785
13584
|
rt,
|
|
@@ -12983,6 +13782,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
12983
13782
|
return this->cpp_uniffi_breez_sdk_spark_fn_free_storage(
|
|
12984
13783
|
rt, thisVal, args, count);
|
|
12985
13784
|
});
|
|
13785
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"] =
|
|
13786
|
+
jsi::Function::createFromHostFunction(
|
|
13787
|
+
rt,
|
|
13788
|
+
jsi::PropNameID::forAscii(
|
|
13789
|
+
rt,
|
|
13790
|
+
"ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"),
|
|
13791
|
+
1,
|
|
13792
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13793
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13794
|
+
return this
|
|
13795
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
13796
|
+
rt, thisVal, args, count);
|
|
13797
|
+
});
|
|
12986
13798
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_cached_item"] =
|
|
12987
13799
|
jsi::Function::createFromHostFunction(
|
|
12988
13800
|
rt,
|
|
@@ -13158,6 +13970,57 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
13158
13970
|
->cpp_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
|
|
13159
13971
|
rt, thisVal, args, count);
|
|
13160
13972
|
});
|
|
13973
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_contacts"] =
|
|
13974
|
+
jsi::Function::createFromHostFunction(
|
|
13975
|
+
rt,
|
|
13976
|
+
jsi::PropNameID::forAscii(
|
|
13977
|
+
rt,
|
|
13978
|
+
"ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_contacts"),
|
|
13979
|
+
2,
|
|
13980
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13981
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13982
|
+
return this
|
|
13983
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_list_contacts(
|
|
13984
|
+
rt, thisVal, args, count);
|
|
13985
|
+
});
|
|
13986
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_contact"] =
|
|
13987
|
+
jsi::Function::createFromHostFunction(
|
|
13988
|
+
rt,
|
|
13989
|
+
jsi::PropNameID::forAscii(
|
|
13990
|
+
rt, "ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_contact"),
|
|
13991
|
+
2,
|
|
13992
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
13993
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
13994
|
+
return this
|
|
13995
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_contact(
|
|
13996
|
+
rt, thisVal, args, count);
|
|
13997
|
+
});
|
|
13998
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_insert_contact"] =
|
|
13999
|
+
jsi::Function::createFromHostFunction(
|
|
14000
|
+
rt,
|
|
14001
|
+
jsi::PropNameID::forAscii(
|
|
14002
|
+
rt,
|
|
14003
|
+
"ubrn_uniffi_breez_sdk_spark_fn_method_storage_insert_contact"),
|
|
14004
|
+
2,
|
|
14005
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
14006
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
14007
|
+
return this
|
|
14008
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_insert_contact(
|
|
14009
|
+
rt, thisVal, args, count);
|
|
14010
|
+
});
|
|
14011
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_contact"] =
|
|
14012
|
+
jsi::Function::createFromHostFunction(
|
|
14013
|
+
rt,
|
|
14014
|
+
jsi::PropNameID::forAscii(
|
|
14015
|
+
rt,
|
|
14016
|
+
"ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_contact"),
|
|
14017
|
+
2,
|
|
14018
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
14019
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
14020
|
+
return this
|
|
14021
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_delete_contact(
|
|
14022
|
+
rt, thisVal, args, count);
|
|
14023
|
+
});
|
|
13161
14024
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change"] =
|
|
13162
14025
|
jsi::Function::createFromHostFunction(
|
|
13163
14026
|
rt,
|
|
@@ -13372,6 +14235,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
13372
14235
|
->cpp_uniffi_breez_sdk_spark_fn_method_tokenissuer_unfreeze_issuer_token(
|
|
13373
14236
|
rt, thisVal, args, count);
|
|
13374
14237
|
});
|
|
14238
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener"] =
|
|
14239
|
+
jsi::Function::createFromHostFunction(
|
|
14240
|
+
rt,
|
|
14241
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
14242
|
+
"callback_vtable_eventlistener"),
|
|
14243
|
+
1,
|
|
14244
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
14245
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
14246
|
+
return this
|
|
14247
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
|
|
14248
|
+
rt, thisVal, args, count);
|
|
14249
|
+
});
|
|
14250
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"] =
|
|
14251
|
+
jsi::Function::createFromHostFunction(
|
|
14252
|
+
rt,
|
|
14253
|
+
jsi::PropNameID::forAscii(
|
|
14254
|
+
rt, "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"),
|
|
14255
|
+
1,
|
|
14256
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
14257
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
14258
|
+
return this
|
|
14259
|
+
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
|
|
14260
|
+
rt, thisVal, args, count);
|
|
14261
|
+
});
|
|
13375
14262
|
props["ubrn_uniffi_breez_sdk_spark_fn_func_connect"] =
|
|
13376
14263
|
jsi::Function::createFromHostFunction(
|
|
13377
14264
|
rt,
|
|
@@ -14149,6 +15036,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
14149
15036
|
->cpp_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees(
|
|
14150
15037
|
rt, thisVal, args, count);
|
|
14151
15038
|
});
|
|
15039
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact"] =
|
|
15040
|
+
jsi::Function::createFromHostFunction(
|
|
15041
|
+
rt,
|
|
15042
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15043
|
+
"method_breezsdk_add_contact"),
|
|
15044
|
+
0,
|
|
15045
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15046
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15047
|
+
return this
|
|
15048
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact(
|
|
15049
|
+
rt, thisVal, args, count);
|
|
15050
|
+
});
|
|
14152
15051
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_"
|
|
14153
15052
|
"listener"] = jsi::Function::createFromHostFunction(
|
|
14154
15053
|
rt,
|
|
@@ -14234,6 +15133,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
14234
15133
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment(
|
|
14235
15134
|
rt, thisVal, args, count);
|
|
14236
15135
|
});
|
|
15136
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact"] =
|
|
15137
|
+
jsi::Function::createFromHostFunction(
|
|
15138
|
+
rt,
|
|
15139
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15140
|
+
"method_breezsdk_delete_contact"),
|
|
15141
|
+
0,
|
|
15142
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15143
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15144
|
+
return this
|
|
15145
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact(
|
|
15146
|
+
rt, thisVal, args, count);
|
|
15147
|
+
});
|
|
14237
15148
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_"
|
|
14238
15149
|
"address"] = jsi::Function::createFromHostFunction(
|
|
14239
15150
|
rt,
|
|
@@ -14356,6 +15267,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
14356
15267
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings(
|
|
14357
15268
|
rt, thisVal, args, count);
|
|
14358
15269
|
});
|
|
15270
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts"] =
|
|
15271
|
+
jsi::Function::createFromHostFunction(
|
|
15272
|
+
rt,
|
|
15273
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15274
|
+
"method_breezsdk_list_contacts"),
|
|
15275
|
+
0,
|
|
15276
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15277
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15278
|
+
return this
|
|
15279
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts(
|
|
15280
|
+
rt, thisVal, args, count);
|
|
15281
|
+
});
|
|
14359
15282
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_"
|
|
14360
15283
|
"currencies"] = jsi::Function::createFromHostFunction(
|
|
14361
15284
|
rt,
|
|
@@ -14586,6 +15509,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
14586
15509
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
|
|
14587
15510
|
rt, thisVal, args, count);
|
|
14588
15511
|
});
|
|
15512
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact"] =
|
|
15513
|
+
jsi::Function::createFromHostFunction(
|
|
15514
|
+
rt,
|
|
15515
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
15516
|
+
"method_breezsdk_update_contact"),
|
|
15517
|
+
0,
|
|
15518
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15519
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15520
|
+
return this
|
|
15521
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact(
|
|
15522
|
+
rt, thisVal, args, count);
|
|
15523
|
+
});
|
|
14589
15524
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_"
|
|
14590
15525
|
"settings"] = jsi::Function::createFromHostFunction(
|
|
14591
15526
|
rt,
|
|
@@ -15200,6 +16135,54 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15200
16135
|
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata(
|
|
15201
16136
|
rt, thisVal, args, count);
|
|
15202
16137
|
});
|
|
16138
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_contacts"] =
|
|
16139
|
+
jsi::Function::createFromHostFunction(
|
|
16140
|
+
rt,
|
|
16141
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
16142
|
+
"method_storage_list_contacts"),
|
|
16143
|
+
0,
|
|
16144
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
16145
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
16146
|
+
return this
|
|
16147
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_list_contacts(
|
|
16148
|
+
rt, thisVal, args, count);
|
|
16149
|
+
});
|
|
16150
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_contact"] =
|
|
16151
|
+
jsi::Function::createFromHostFunction(
|
|
16152
|
+
rt,
|
|
16153
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
16154
|
+
"method_storage_get_contact"),
|
|
16155
|
+
0,
|
|
16156
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
16157
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
16158
|
+
return this
|
|
16159
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_contact(
|
|
16160
|
+
rt, thisVal, args, count);
|
|
16161
|
+
});
|
|
16162
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_contact"] =
|
|
16163
|
+
jsi::Function::createFromHostFunction(
|
|
16164
|
+
rt,
|
|
16165
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
16166
|
+
"method_storage_insert_contact"),
|
|
16167
|
+
0,
|
|
16168
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
16169
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
16170
|
+
return this
|
|
16171
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_insert_contact(
|
|
16172
|
+
rt, thisVal, args, count);
|
|
16173
|
+
});
|
|
16174
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_contact"] =
|
|
16175
|
+
jsi::Function::createFromHostFunction(
|
|
16176
|
+
rt,
|
|
16177
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
16178
|
+
"method_storage_delete_contact"),
|
|
16179
|
+
0,
|
|
16180
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
16181
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
16182
|
+
return this
|
|
16183
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_delete_contact(
|
|
16184
|
+
rt, thisVal, args, count);
|
|
16185
|
+
});
|
|
15203
16186
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_"
|
|
15204
16187
|
"change"] = jsi::Function::createFromHostFunction(
|
|
15205
16188
|
rt,
|
|
@@ -15443,104 +16426,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
15443
16426
|
return this->cpp_ffi_breez_sdk_spark_uniffi_contract_version(
|
|
15444
16427
|
rt, thisVal, args, count);
|
|
15445
16428
|
});
|
|
15446
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener"] =
|
|
15447
|
-
jsi::Function::createFromHostFunction(
|
|
15448
|
-
rt,
|
|
15449
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
15450
|
-
"callback_vtable_eventlistener"),
|
|
15451
|
-
1,
|
|
15452
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15453
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15454
|
-
return this
|
|
15455
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
|
|
15456
|
-
rt, thisVal, args, count);
|
|
15457
|
-
});
|
|
15458
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"] =
|
|
15459
|
-
jsi::Function::createFromHostFunction(
|
|
15460
|
-
rt,
|
|
15461
|
-
jsi::PropNameID::forAscii(
|
|
15462
|
-
rt, "ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger"),
|
|
15463
|
-
1,
|
|
15464
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15465
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15466
|
-
return this
|
|
15467
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
|
|
15468
|
-
rt, thisVal, args, count);
|
|
15469
|
-
});
|
|
15470
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_"
|
|
15471
|
-
"bitcoinchainservice"] = jsi::Function::createFromHostFunction(
|
|
15472
|
-
rt,
|
|
15473
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
15474
|
-
"callback_vtable_bitcoinchainservice"),
|
|
15475
|
-
1,
|
|
15476
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15477
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15478
|
-
return this
|
|
15479
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
|
|
15480
|
-
rt, thisVal, args, count);
|
|
15481
|
-
});
|
|
15482
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner"] =
|
|
15483
|
-
jsi::Function::createFromHostFunction(
|
|
15484
|
-
rt,
|
|
15485
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
15486
|
-
"callback_vtable_externalsigner"),
|
|
15487
|
-
1,
|
|
15488
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15489
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15490
|
-
return this
|
|
15491
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
|
|
15492
|
-
rt, thisVal, args, count);
|
|
15493
|
-
});
|
|
15494
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice"] =
|
|
15495
|
-
jsi::Function::createFromHostFunction(
|
|
15496
|
-
rt,
|
|
15497
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
15498
|
-
"callback_vtable_fiatservice"),
|
|
15499
|
-
1,
|
|
15500
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15501
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15502
|
-
return this
|
|
15503
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
|
|
15504
|
-
rt, thisVal, args, count);
|
|
15505
|
-
});
|
|
15506
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver"] =
|
|
15507
|
-
jsi::Function::createFromHostFunction(
|
|
15508
|
-
rt,
|
|
15509
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_init_"
|
|
15510
|
-
"callback_vtable_paymentobserver"),
|
|
15511
|
-
1,
|
|
15512
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15513
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15514
|
-
return this
|
|
15515
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
|
|
15516
|
-
rt, thisVal, args, count);
|
|
15517
|
-
});
|
|
15518
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"] =
|
|
15519
|
-
jsi::Function::createFromHostFunction(
|
|
15520
|
-
rt,
|
|
15521
|
-
jsi::PropNameID::forAscii(
|
|
15522
|
-
rt,
|
|
15523
|
-
"ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient"),
|
|
15524
|
-
1,
|
|
15525
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15526
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15527
|
-
return this
|
|
15528
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
|
|
15529
|
-
rt, thisVal, args, count);
|
|
15530
|
-
});
|
|
15531
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"] =
|
|
15532
|
-
jsi::Function::createFromHostFunction(
|
|
15533
|
-
rt,
|
|
15534
|
-
jsi::PropNameID::forAscii(
|
|
15535
|
-
rt,
|
|
15536
|
-
"ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage"),
|
|
15537
|
-
1,
|
|
15538
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
15539
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
15540
|
-
return this
|
|
15541
|
-
->cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
15542
|
-
rt, thisVal, args, count);
|
|
15543
|
-
});
|
|
15544
16429
|
props["ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_"
|
|
15545
16430
|
"pointer"] = jsi::Function::createFromHostFunction(
|
|
15546
16431
|
rt,
|
|
@@ -15850,6 +16735,14 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
|
|
|
15850
16735
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21::cleanup();
|
|
15851
16736
|
// Cleanup for callback function CallbackInterfaceStorageMethod22
|
|
15852
16737
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::cleanup();
|
|
16738
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod23
|
|
16739
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23::cleanup();
|
|
16740
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod24
|
|
16741
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24::cleanup();
|
|
16742
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod25
|
|
16743
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25::cleanup();
|
|
16744
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod26
|
|
16745
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26::cleanup();
|
|
15853
16746
|
}
|
|
15854
16747
|
|
|
15855
16748
|
// Utility functions for serialization/deserialization of strings.
|
|
@@ -16045,6 +16938,21 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
|
|
|
16045
16938
|
|
|
16046
16939
|
return jsi::Value::undefined();
|
|
16047
16940
|
}
|
|
16941
|
+
jsi::Value NativeBreezSdkSpark::
|
|
16942
|
+
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
|
|
16943
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
16944
|
+
size_t count) {
|
|
16945
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
16946
|
+
UniffiVTableCallbackInterfaceBitcoinChainService>::fromJs(rt, callInvoker,
|
|
16947
|
+
args[0]);
|
|
16948
|
+
|
|
16949
|
+
std::lock_guard<std::mutex> lock(
|
|
16950
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
16951
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
|
|
16952
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
16953
|
+
"UniffiVTableCallbackInterfaceBitcoinChainService", vtableInstance));
|
|
16954
|
+
return jsi::Value::undefined();
|
|
16955
|
+
}
|
|
16048
16956
|
jsi::Value NativeBreezSdkSpark::
|
|
16049
16957
|
cpp_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_utxos(
|
|
16050
16958
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16132,6 +17040,18 @@ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_breezsdk(
|
|
|
16132
17040
|
|
|
16133
17041
|
return jsi::Value::undefined();
|
|
16134
17042
|
}
|
|
17043
|
+
jsi::Value
|
|
17044
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact(
|
|
17045
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17046
|
+
size_t count) {
|
|
17047
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_add_contact(
|
|
17048
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17049
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17050
|
+
args[1]));
|
|
17051
|
+
|
|
17052
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17053
|
+
value);
|
|
17054
|
+
}
|
|
16135
17055
|
jsi::Value NativeBreezSdkSpark::
|
|
16136
17056
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(
|
|
16137
17057
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16215,6 +17135,18 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
16215
17135
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
16216
17136
|
value);
|
|
16217
17137
|
}
|
|
17138
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17139
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact(
|
|
17140
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17141
|
+
size_t count) {
|
|
17142
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_delete_contact(
|
|
17143
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17144
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17145
|
+
args[1]));
|
|
17146
|
+
|
|
17147
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17148
|
+
value);
|
|
17149
|
+
}
|
|
16218
17150
|
jsi::Value NativeBreezSdkSpark::
|
|
16219
17151
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(
|
|
16220
17152
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16334,6 +17266,18 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
16334
17266
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
16335
17267
|
value);
|
|
16336
17268
|
}
|
|
17269
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17270
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts(
|
|
17271
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17272
|
+
size_t count) {
|
|
17273
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_list_contacts(
|
|
17274
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17275
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17276
|
+
args[1]));
|
|
17277
|
+
|
|
17278
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17279
|
+
value);
|
|
17280
|
+
}
|
|
16337
17281
|
jsi::Value NativeBreezSdkSpark::
|
|
16338
17282
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies(
|
|
16339
17283
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16559,6 +17503,18 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
|
16559
17503
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
16560
17504
|
value);
|
|
16561
17505
|
}
|
|
17506
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17507
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact(
|
|
17508
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17509
|
+
size_t count) {
|
|
17510
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_update_contact(
|
|
17511
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
17512
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
17513
|
+
args[1]));
|
|
17514
|
+
|
|
17515
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17516
|
+
value);
|
|
17517
|
+
}
|
|
16562
17518
|
jsi::Value NativeBreezSdkSpark::
|
|
16563
17519
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings(
|
|
16564
17520
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16597,6 +17553,21 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_externalsigner(
|
|
|
16597
17553
|
|
|
16598
17554
|
return jsi::Value::undefined();
|
|
16599
17555
|
}
|
|
17556
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17557
|
+
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
|
|
17558
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17559
|
+
size_t count) {
|
|
17560
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
17561
|
+
UniffiVTableCallbackInterfaceExternalSigner>::fromJs(rt, callInvoker,
|
|
17562
|
+
args[0]);
|
|
17563
|
+
|
|
17564
|
+
std::lock_guard<std::mutex> lock(
|
|
17565
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
17566
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
|
|
17567
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
17568
|
+
"UniffiVTableCallbackInterfaceExternalSigner", vtableInstance));
|
|
17569
|
+
return jsi::Value::undefined();
|
|
17570
|
+
}
|
|
16600
17571
|
jsi::Value NativeBreezSdkSpark::
|
|
16601
17572
|
cpp_uniffi_breez_sdk_spark_fn_method_externalsigner_identity_public_key(
|
|
16602
17573
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16888,6 +17859,21 @@ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_fiatservice(
|
|
|
16888
17859
|
|
|
16889
17860
|
return jsi::Value::undefined();
|
|
16890
17861
|
}
|
|
17862
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17863
|
+
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
|
|
17864
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17865
|
+
size_t count) {
|
|
17866
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
17867
|
+
UniffiVTableCallbackInterfaceFiatService>::fromJs(rt, callInvoker,
|
|
17868
|
+
args[0]);
|
|
17869
|
+
|
|
17870
|
+
std::lock_guard<std::mutex> lock(
|
|
17871
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
17872
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
|
|
17873
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
17874
|
+
"UniffiVTableCallbackInterfaceFiatService", vtableInstance));
|
|
17875
|
+
return jsi::Value::undefined();
|
|
17876
|
+
}
|
|
16891
17877
|
jsi::Value NativeBreezSdkSpark::
|
|
16892
17878
|
cpp_uniffi_breez_sdk_spark_fn_method_fiatservice_fetch_fiat_currencies(
|
|
16893
17879
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16935,6 +17921,21 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_paymentobserver(
|
|
|
16935
17921
|
|
|
16936
17922
|
return jsi::Value::undefined();
|
|
16937
17923
|
}
|
|
17924
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17925
|
+
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
|
|
17926
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17927
|
+
size_t count) {
|
|
17928
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
17929
|
+
UniffiVTableCallbackInterfacePaymentObserver>::fromJs(rt, callInvoker,
|
|
17930
|
+
args[0]);
|
|
17931
|
+
|
|
17932
|
+
std::lock_guard<std::mutex> lock(
|
|
17933
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
17934
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
|
|
17935
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
17936
|
+
"UniffiVTableCallbackInterfacePaymentObserver", vtableInstance));
|
|
17937
|
+
return jsi::Value::undefined();
|
|
17938
|
+
}
|
|
16938
17939
|
jsi::Value NativeBreezSdkSpark::
|
|
16939
17940
|
cpp_uniffi_breez_sdk_spark_fn_method_paymentobserver_before_send(
|
|
16940
17941
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -16971,6 +17972,21 @@ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_restclient(
|
|
|
16971
17972
|
|
|
16972
17973
|
return jsi::Value::undefined();
|
|
16973
17974
|
}
|
|
17975
|
+
jsi::Value NativeBreezSdkSpark::
|
|
17976
|
+
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
|
|
17977
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17978
|
+
size_t count) {
|
|
17979
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
17980
|
+
UniffiVTableCallbackInterfaceRestClient>::fromJs(rt, callInvoker,
|
|
17981
|
+
args[0]);
|
|
17982
|
+
|
|
17983
|
+
std::lock_guard<std::mutex> lock(
|
|
17984
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
17985
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
|
|
17986
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
17987
|
+
"UniffiVTableCallbackInterfaceRestClient", vtableInstance));
|
|
17988
|
+
return jsi::Value::undefined();
|
|
17989
|
+
}
|
|
16974
17990
|
jsi::Value NativeBreezSdkSpark::
|
|
16975
17991
|
cpp_uniffi_breez_sdk_spark_fn_method_restclient_get_request(
|
|
16976
17992
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -17189,6 +18205,20 @@ jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_free_storage(
|
|
|
17189
18205
|
|
|
17190
18206
|
return jsi::Value::undefined();
|
|
17191
18207
|
}
|
|
18208
|
+
jsi::Value
|
|
18209
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
18210
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18211
|
+
size_t count) {
|
|
18212
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
18213
|
+
UniffiVTableCallbackInterfaceStorage>::fromJs(rt, callInvoker, args[0]);
|
|
18214
|
+
|
|
18215
|
+
std::lock_guard<std::mutex> lock(
|
|
18216
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
18217
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
18218
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
18219
|
+
"UniffiVTableCallbackInterfaceStorage", vtableInstance));
|
|
18220
|
+
return jsi::Value::undefined();
|
|
18221
|
+
}
|
|
17192
18222
|
jsi::Value NativeBreezSdkSpark::
|
|
17193
18223
|
cpp_uniffi_breez_sdk_spark_fn_method_storage_delete_cached_item(
|
|
17194
18224
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -17366,6 +18396,54 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17366
18396
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17367
18397
|
value);
|
|
17368
18398
|
}
|
|
18399
|
+
jsi::Value
|
|
18400
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_storage_list_contacts(
|
|
18401
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18402
|
+
size_t count) {
|
|
18403
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_list_contacts(
|
|
18404
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
18405
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
18406
|
+
args[1]));
|
|
18407
|
+
|
|
18408
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
18409
|
+
value);
|
|
18410
|
+
}
|
|
18411
|
+
jsi::Value
|
|
18412
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_storage_get_contact(
|
|
18413
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18414
|
+
size_t count) {
|
|
18415
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_get_contact(
|
|
18416
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
18417
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
18418
|
+
args[1]));
|
|
18419
|
+
|
|
18420
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
18421
|
+
value);
|
|
18422
|
+
}
|
|
18423
|
+
jsi::Value NativeBreezSdkSpark::
|
|
18424
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_insert_contact(
|
|
18425
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18426
|
+
size_t count) {
|
|
18427
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_insert_contact(
|
|
18428
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
18429
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
18430
|
+
args[1]));
|
|
18431
|
+
|
|
18432
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
18433
|
+
value);
|
|
18434
|
+
}
|
|
18435
|
+
jsi::Value NativeBreezSdkSpark::
|
|
18436
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_delete_contact(
|
|
18437
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18438
|
+
size_t count) {
|
|
18439
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_delete_contact(
|
|
18440
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
18441
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
18442
|
+
args[1]));
|
|
18443
|
+
|
|
18444
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
18445
|
+
value);
|
|
18446
|
+
}
|
|
17369
18447
|
jsi::Value NativeBreezSdkSpark::
|
|
17370
18448
|
cpp_uniffi_breez_sdk_spark_fn_method_storage_add_outgoing_change(
|
|
17371
18449
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -17579,6 +18657,35 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
17579
18657
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
17580
18658
|
value);
|
|
17581
18659
|
}
|
|
18660
|
+
jsi::Value NativeBreezSdkSpark::
|
|
18661
|
+
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
|
|
18662
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18663
|
+
size_t count) {
|
|
18664
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
18665
|
+
UniffiVTableCallbackInterfaceEventListener>::fromJs(rt, callInvoker,
|
|
18666
|
+
args[0]);
|
|
18667
|
+
|
|
18668
|
+
std::lock_guard<std::mutex> lock(
|
|
18669
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
18670
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
|
|
18671
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
18672
|
+
"UniffiVTableCallbackInterfaceEventListener", vtableInstance));
|
|
18673
|
+
return jsi::Value::undefined();
|
|
18674
|
+
}
|
|
18675
|
+
jsi::Value
|
|
18676
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
|
|
18677
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
18678
|
+
size_t count) {
|
|
18679
|
+
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
18680
|
+
UniffiVTableCallbackInterfaceLogger>::fromJs(rt, callInvoker, args[0]);
|
|
18681
|
+
|
|
18682
|
+
std::lock_guard<std::mutex> lock(
|
|
18683
|
+
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
18684
|
+
uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
|
|
18685
|
+
uniffi::breez_sdk_spark::registry::putTable(
|
|
18686
|
+
"UniffiVTableCallbackInterfaceLogger", vtableInstance));
|
|
18687
|
+
return jsi::Value::undefined();
|
|
18688
|
+
}
|
|
17582
18689
|
jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_connect(
|
|
17583
18690
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
17584
18691
|
size_t count) {
|
|
@@ -18373,6 +19480,14 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
18373
19480
|
|
|
18374
19481
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18375
19482
|
}
|
|
19483
|
+
jsi::Value NativeBreezSdkSpark::
|
|
19484
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact(
|
|
19485
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19486
|
+
size_t count) {
|
|
19487
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_breezsdk_add_contact();
|
|
19488
|
+
|
|
19489
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19490
|
+
}
|
|
18376
19491
|
jsi::Value NativeBreezSdkSpark::
|
|
18377
19492
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(
|
|
18378
19493
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -18433,6 +19548,14 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
18433
19548
|
|
|
18434
19549
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18435
19550
|
}
|
|
19551
|
+
jsi::Value NativeBreezSdkSpark::
|
|
19552
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact(
|
|
19553
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19554
|
+
size_t count) {
|
|
19555
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_contact();
|
|
19556
|
+
|
|
19557
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19558
|
+
}
|
|
18436
19559
|
jsi::Value NativeBreezSdkSpark::
|
|
18437
19560
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address(
|
|
18438
19561
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -18520,6 +19643,14 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
18520
19643
|
|
|
18521
19644
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18522
19645
|
}
|
|
19646
|
+
jsi::Value NativeBreezSdkSpark::
|
|
19647
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts(
|
|
19648
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19649
|
+
size_t count) {
|
|
19650
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_breezsdk_list_contacts();
|
|
19651
|
+
|
|
19652
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19653
|
+
}
|
|
18523
19654
|
jsi::Value NativeBreezSdkSpark::
|
|
18524
19655
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies(
|
|
18525
19656
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -18682,6 +19813,14 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
18682
19813
|
|
|
18683
19814
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
18684
19815
|
}
|
|
19816
|
+
jsi::Value NativeBreezSdkSpark::
|
|
19817
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact(
|
|
19818
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19819
|
+
size_t count) {
|
|
19820
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_breezsdk_update_contact();
|
|
19821
|
+
|
|
19822
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19823
|
+
}
|
|
18685
19824
|
jsi::Value NativeBreezSdkSpark::
|
|
18686
19825
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings(
|
|
18687
19826
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -19119,6 +20258,38 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
19119
20258
|
|
|
19120
20259
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
19121
20260
|
}
|
|
20261
|
+
jsi::Value NativeBreezSdkSpark::
|
|
20262
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_list_contacts(
|
|
20263
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
20264
|
+
size_t count) {
|
|
20265
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_storage_list_contacts();
|
|
20266
|
+
|
|
20267
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
20268
|
+
}
|
|
20269
|
+
jsi::Value NativeBreezSdkSpark::
|
|
20270
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_contact(
|
|
20271
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
20272
|
+
size_t count) {
|
|
20273
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_storage_get_contact();
|
|
20274
|
+
|
|
20275
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
20276
|
+
}
|
|
20277
|
+
jsi::Value NativeBreezSdkSpark::
|
|
20278
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_insert_contact(
|
|
20279
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
20280
|
+
size_t count) {
|
|
20281
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_storage_insert_contact();
|
|
20282
|
+
|
|
20283
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
20284
|
+
}
|
|
20285
|
+
jsi::Value NativeBreezSdkSpark::
|
|
20286
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_delete_contact(
|
|
20287
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
20288
|
+
size_t count) {
|
|
20289
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_storage_delete_contact();
|
|
20290
|
+
|
|
20291
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
20292
|
+
}
|
|
19122
20293
|
jsi::Value NativeBreezSdkSpark::
|
|
19123
20294
|
cpp_uniffi_breez_sdk_spark_checksum_method_storage_add_outgoing_change(
|
|
19124
20295
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -19293,122 +20464,4 @@ jsi::Value NativeBreezSdkSpark::cpp_ffi_breez_sdk_spark_uniffi_contract_version(
|
|
|
19293
20464
|
auto value = ffi_breez_sdk_spark_uniffi_contract_version();
|
|
19294
20465
|
|
|
19295
20466
|
return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
|
|
19296
|
-
}
|
|
19297
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19298
|
-
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
|
|
19299
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19300
|
-
size_t count) {
|
|
19301
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19302
|
-
UniffiVTableCallbackInterfaceEventListener>::fromJs(rt, callInvoker,
|
|
19303
|
-
args[0]);
|
|
19304
|
-
|
|
19305
|
-
std::lock_guard<std::mutex> lock(
|
|
19306
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19307
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
|
|
19308
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19309
|
-
"UniffiVTableCallbackInterfaceEventListener", vtableInstance));
|
|
19310
|
-
return jsi::Value::undefined();
|
|
19311
|
-
}
|
|
19312
|
-
jsi::Value
|
|
19313
|
-
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
|
|
19314
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19315
|
-
size_t count) {
|
|
19316
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19317
|
-
UniffiVTableCallbackInterfaceLogger>::fromJs(rt, callInvoker, args[0]);
|
|
19318
|
-
|
|
19319
|
-
std::lock_guard<std::mutex> lock(
|
|
19320
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19321
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
|
|
19322
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19323
|
-
"UniffiVTableCallbackInterfaceLogger", vtableInstance));
|
|
19324
|
-
return jsi::Value::undefined();
|
|
19325
|
-
}
|
|
19326
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19327
|
-
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
|
|
19328
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19329
|
-
size_t count) {
|
|
19330
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19331
|
-
UniffiVTableCallbackInterfaceBitcoinChainService>::fromJs(rt, callInvoker,
|
|
19332
|
-
args[0]);
|
|
19333
|
-
|
|
19334
|
-
std::lock_guard<std::mutex> lock(
|
|
19335
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19336
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
|
|
19337
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19338
|
-
"UniffiVTableCallbackInterfaceBitcoinChainService", vtableInstance));
|
|
19339
|
-
return jsi::Value::undefined();
|
|
19340
|
-
}
|
|
19341
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19342
|
-
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
|
|
19343
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19344
|
-
size_t count) {
|
|
19345
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19346
|
-
UniffiVTableCallbackInterfaceExternalSigner>::fromJs(rt, callInvoker,
|
|
19347
|
-
args[0]);
|
|
19348
|
-
|
|
19349
|
-
std::lock_guard<std::mutex> lock(
|
|
19350
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19351
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_externalsigner(
|
|
19352
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19353
|
-
"UniffiVTableCallbackInterfaceExternalSigner", vtableInstance));
|
|
19354
|
-
return jsi::Value::undefined();
|
|
19355
|
-
}
|
|
19356
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19357
|
-
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
|
|
19358
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19359
|
-
size_t count) {
|
|
19360
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19361
|
-
UniffiVTableCallbackInterfaceFiatService>::fromJs(rt, callInvoker,
|
|
19362
|
-
args[0]);
|
|
19363
|
-
|
|
19364
|
-
std::lock_guard<std::mutex> lock(
|
|
19365
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19366
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_fiatservice(
|
|
19367
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19368
|
-
"UniffiVTableCallbackInterfaceFiatService", vtableInstance));
|
|
19369
|
-
return jsi::Value::undefined();
|
|
19370
|
-
}
|
|
19371
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19372
|
-
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
|
|
19373
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19374
|
-
size_t count) {
|
|
19375
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19376
|
-
UniffiVTableCallbackInterfacePaymentObserver>::fromJs(rt, callInvoker,
|
|
19377
|
-
args[0]);
|
|
19378
|
-
|
|
19379
|
-
std::lock_guard<std::mutex> lock(
|
|
19380
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19381
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(
|
|
19382
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19383
|
-
"UniffiVTableCallbackInterfacePaymentObserver", vtableInstance));
|
|
19384
|
-
return jsi::Value::undefined();
|
|
19385
|
-
}
|
|
19386
|
-
jsi::Value NativeBreezSdkSpark::
|
|
19387
|
-
cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
|
|
19388
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19389
|
-
size_t count) {
|
|
19390
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19391
|
-
UniffiVTableCallbackInterfaceRestClient>::fromJs(rt, callInvoker,
|
|
19392
|
-
args[0]);
|
|
19393
|
-
|
|
19394
|
-
std::lock_guard<std::mutex> lock(
|
|
19395
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19396
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_restclient(
|
|
19397
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19398
|
-
"UniffiVTableCallbackInterfaceRestClient", vtableInstance));
|
|
19399
|
-
return jsi::Value::undefined();
|
|
19400
|
-
}
|
|
19401
|
-
jsi::Value
|
|
19402
|
-
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
19403
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
19404
|
-
size_t count) {
|
|
19405
|
-
auto vtableInstance = uniffi::breez_sdk_spark::Bridging<
|
|
19406
|
-
UniffiVTableCallbackInterfaceStorage>::fromJs(rt, callInvoker, args[0]);
|
|
19407
|
-
|
|
19408
|
-
std::lock_guard<std::mutex> lock(
|
|
19409
|
-
uniffi::breez_sdk_spark::registry::vtableMutex);
|
|
19410
|
-
uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
|
|
19411
|
-
uniffi::breez_sdk_spark::registry::putTable(
|
|
19412
|
-
"UniffiVTableCallbackInterfaceStorage", vtableInstance));
|
|
19413
|
-
return jsi::Value::undefined();
|
|
19414
20467
|
}
|