@breeztech/breez-sdk-spark-react-native 0.2.5-dev2 → 0.3.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cpp/generated/breez_sdk_spark.cpp +354 -219
- package/cpp/generated/breez_sdk_spark.hpp +20 -22
- package/lib/commonjs/generated/breez_sdk_common.js +41 -4
- package/lib/commonjs/generated/breez_sdk_common.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +795 -104
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_common.js +41 -4
- package/lib/module/generated/breez_sdk_common.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +795 -104
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +13 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +19 -17
- 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 +551 -47
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts +13 -1
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +19 -17
- 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 +551 -47
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/generated/breez_sdk_common.ts +47 -4
- package/src/generated/breez_sdk_spark-ffi.ts +32 -30
- package/src/generated/breez_sdk_spark.ts +1261 -219
|
@@ -136,7 +136,7 @@ typedef void (*UniffiCallbackInterfaceStorageMethod2)(
|
|
|
136
136
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
137
137
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
138
138
|
typedef void (*UniffiCallbackInterfaceStorageMethod3)(
|
|
139
|
-
uint64_t uniffi_handle, RustBuffer
|
|
139
|
+
uint64_t uniffi_handle, RustBuffer request,
|
|
140
140
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
141
141
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
142
142
|
typedef void (*UniffiCallbackInterfaceStorageMethod4)(
|
|
@@ -152,19 +152,23 @@ typedef void (*UniffiCallbackInterfaceStorageMethod6)(
|
|
|
152
152
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
153
153
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
154
154
|
typedef void (*UniffiCallbackInterfaceStorageMethod7)(
|
|
155
|
+
uint64_t uniffi_handle, RustBuffer invoice,
|
|
156
|
+
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
157
|
+
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
158
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod8)(
|
|
155
159
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout,
|
|
156
160
|
uint64_t amount_sats,
|
|
157
161
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
158
162
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
159
|
-
typedef void (*
|
|
163
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod9)(
|
|
160
164
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout,
|
|
161
165
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
162
166
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
163
|
-
typedef void (*
|
|
167
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod10)(
|
|
164
168
|
uint64_t uniffi_handle,
|
|
165
169
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
166
170
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
167
|
-
typedef void (*
|
|
171
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod11)(
|
|
168
172
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout, RustBuffer payload,
|
|
169
173
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
170
174
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
@@ -191,10 +195,11 @@ typedef struct UniffiVTableCallbackInterfaceStorage {
|
|
|
191
195
|
UniffiCallbackInterfaceStorageMethod4 insert_payment;
|
|
192
196
|
UniffiCallbackInterfaceStorageMethod5 set_payment_metadata;
|
|
193
197
|
UniffiCallbackInterfaceStorageMethod6 get_payment_by_id;
|
|
194
|
-
UniffiCallbackInterfaceStorageMethod7
|
|
195
|
-
UniffiCallbackInterfaceStorageMethod8
|
|
196
|
-
UniffiCallbackInterfaceStorageMethod9
|
|
197
|
-
UniffiCallbackInterfaceStorageMethod10
|
|
198
|
+
UniffiCallbackInterfaceStorageMethod7 get_payment_by_invoice;
|
|
199
|
+
UniffiCallbackInterfaceStorageMethod8 add_deposit;
|
|
200
|
+
UniffiCallbackInterfaceStorageMethod9 delete_deposit;
|
|
201
|
+
UniffiCallbackInterfaceStorageMethod10 list_deposits;
|
|
202
|
+
UniffiCallbackInterfaceStorageMethod11 update_deposit;
|
|
198
203
|
UniffiCallbackInterfaceFree uniffi_free;
|
|
199
204
|
} UniffiVTableCallbackInterfaceStorage;
|
|
200
205
|
void *uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(
|
|
@@ -230,8 +235,8 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(void *ptr,
|
|
|
230
235
|
RustBuffer request);
|
|
231
236
|
/*handle*/ uint64_t
|
|
232
237
|
uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(void *ptr);
|
|
233
|
-
|
|
234
|
-
|
|
238
|
+
/*handle*/ uint64_t
|
|
239
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(void *ptr);
|
|
235
240
|
/*handle*/ uint64_t
|
|
236
241
|
uniffi_breez_sdk_spark_fn_method_breezsdk_get_info(void *ptr,
|
|
237
242
|
RustBuffer request);
|
|
@@ -241,6 +246,9 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_get_lightning_address(void *ptr);
|
|
|
241
246
|
uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment(void *ptr,
|
|
242
247
|
RustBuffer request);
|
|
243
248
|
/*handle*/ uint64_t
|
|
249
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata(
|
|
250
|
+
void *ptr, RustBuffer request);
|
|
251
|
+
/*handle*/ uint64_t
|
|
244
252
|
uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies(void *ptr);
|
|
245
253
|
/*handle*/ uint64_t
|
|
246
254
|
uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_rates(void *ptr);
|
|
@@ -253,9 +261,6 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits(
|
|
|
253
261
|
/*handle*/ uint64_t
|
|
254
262
|
uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay(void *ptr,
|
|
255
263
|
RustBuffer request);
|
|
256
|
-
void uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(
|
|
257
|
-
void *ptr, RustBuffer payment, RustBuffer ssp_id,
|
|
258
|
-
RustCallStatus *uniffi_out_err);
|
|
259
264
|
/*handle*/ uint64_t
|
|
260
265
|
uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(void *ptr,
|
|
261
266
|
RustBuffer request);
|
|
@@ -266,8 +271,6 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
|
|
|
266
271
|
uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(void *ptr,
|
|
267
272
|
RustBuffer request);
|
|
268
273
|
/*handle*/ uint64_t
|
|
269
|
-
uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address(void *ptr);
|
|
270
|
-
/*handle*/ uint64_t
|
|
271
274
|
uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(void *ptr,
|
|
272
275
|
RustBuffer request);
|
|
273
276
|
/*handle*/ uint64_t
|
|
@@ -280,11 +283,11 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(void *ptr,
|
|
|
280
283
|
uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(void *ptr,
|
|
281
284
|
RustBuffer request);
|
|
282
285
|
/*handle*/ uint64_t
|
|
283
|
-
uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
|
|
284
|
-
void *ptr, RustBuffer request, int8_t suppress_payment_event);
|
|
285
|
-
/*handle*/ uint64_t
|
|
286
286
|
uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(void *ptr,
|
|
287
287
|
RustBuffer request);
|
|
288
|
+
/*handle*/ uint64_t
|
|
289
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(void *ptr,
|
|
290
|
+
RustBuffer request);
|
|
288
291
|
void *
|
|
289
292
|
uniffi_breez_sdk_spark_fn_clone_sdkbuilder(void *ptr,
|
|
290
293
|
RustCallStatus *uniffi_out_err);
|
|
@@ -324,8 +327,9 @@ uniffi_breez_sdk_spark_fn_method_storage_get_cached_item(void *ptr,
|
|
|
324
327
|
RustBuffer key);
|
|
325
328
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_set_cached_item(
|
|
326
329
|
void *ptr, RustBuffer key, RustBuffer value);
|
|
327
|
-
/*handle*/ uint64_t
|
|
328
|
-
|
|
330
|
+
/*handle*/ uint64_t
|
|
331
|
+
uniffi_breez_sdk_spark_fn_method_storage_list_payments(void *ptr,
|
|
332
|
+
RustBuffer request);
|
|
329
333
|
/*handle*/ uint64_t
|
|
330
334
|
uniffi_breez_sdk_spark_fn_method_storage_insert_payment(void *ptr,
|
|
331
335
|
RustBuffer payment);
|
|
@@ -335,6 +339,9 @@ uniffi_breez_sdk_spark_fn_method_storage_set_payment_metadata(
|
|
|
335
339
|
/*handle*/ uint64_t
|
|
336
340
|
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(void *ptr,
|
|
337
341
|
RustBuffer id);
|
|
342
|
+
/*handle*/ uint64_t
|
|
343
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
344
|
+
void *ptr, RustBuffer invoice);
|
|
338
345
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
339
346
|
void *ptr, RustBuffer txid, uint32_t vout, uint64_t amount_sats);
|
|
340
347
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_delete_deposit(
|
|
@@ -509,28 +516,24 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info();
|
|
|
509
516
|
uint16_t
|
|
510
517
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address();
|
|
511
518
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment();
|
|
519
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata();
|
|
512
520
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies();
|
|
513
521
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates();
|
|
514
522
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments();
|
|
515
523
|
uint16_t
|
|
516
524
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits();
|
|
517
525
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay();
|
|
518
|
-
uint16_t
|
|
519
|
-
uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment();
|
|
520
526
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay();
|
|
521
527
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment();
|
|
522
528
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment();
|
|
523
|
-
uint16_t
|
|
524
|
-
uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address();
|
|
525
529
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit();
|
|
526
530
|
uint16_t
|
|
527
531
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address();
|
|
528
532
|
uint16_t
|
|
529
533
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener();
|
|
530
534
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment();
|
|
531
|
-
uint16_t
|
|
532
|
-
uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal();
|
|
533
535
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
|
|
536
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment();
|
|
534
537
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build();
|
|
535
538
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service();
|
|
536
539
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service();
|
|
@@ -545,6 +548,8 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_payments();
|
|
|
545
548
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_insert_payment();
|
|
546
549
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_payment_metadata();
|
|
547
550
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id();
|
|
551
|
+
uint16_t
|
|
552
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice();
|
|
548
553
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_deposit();
|
|
549
554
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit();
|
|
550
555
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_deposits();
|
|
@@ -3679,7 +3684,7 @@ using namespace facebook;
|
|
|
3679
3684
|
|
|
3680
3685
|
// We need to store a lambda in a global so we can call it from
|
|
3681
3686
|
// a function pointer. The function pointer is passed to Rust.
|
|
3682
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
3687
|
+
static std::function<void(uint64_t, RustBuffer,
|
|
3683
3688
|
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
3684
3689
|
UniffiForeignFuture *)>
|
|
3685
3690
|
rsLambda = nullptr;
|
|
@@ -3689,8 +3694,7 @@ static std::function<void(uint64_t, RustBuffer, RustBuffer,
|
|
|
3689
3694
|
static void body(jsi::Runtime &rt,
|
|
3690
3695
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
3691
3696
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
3692
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
3693
|
-
RustBuffer rs_limit,
|
|
3697
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_request,
|
|
3694
3698
|
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
3695
3699
|
uint64_t rs_uniffiCallbackData,
|
|
3696
3700
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -3699,10 +3703,8 @@ static void body(jsi::Runtime &rt,
|
|
|
3699
3703
|
// We'll use the Bridging class to do this…
|
|
3700
3704
|
auto js_uniffiHandle =
|
|
3701
3705
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
3702
|
-
auto
|
|
3703
|
-
rt, callInvoker,
|
|
3704
|
-
auto js_limit = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
3705
|
-
rt, callInvoker, rs_limit);
|
|
3706
|
+
auto js_request = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
3707
|
+
rt, callInvoker, rs_request);
|
|
3706
3708
|
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
3707
3709
|
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
3708
3710
|
rs_uniffiFutureCallback);
|
|
@@ -3715,7 +3717,7 @@ static void body(jsi::Runtime &rt,
|
|
|
3715
3717
|
try {
|
|
3716
3718
|
// Getting the callback function
|
|
3717
3719
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
3718
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle,
|
|
3720
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
|
|
3719
3721
|
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
3720
3722
|
|
|
3721
3723
|
// Finally, we need to copy the return value back into the Rust pointer.
|
|
@@ -3730,7 +3732,7 @@ static void body(jsi::Runtime &rt,
|
|
|
3730
3732
|
}
|
|
3731
3733
|
|
|
3732
3734
|
static void
|
|
3733
|
-
callback(uint64_t rs_uniffiHandle, RustBuffer
|
|
3735
|
+
callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
|
|
3734
3736
|
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
3735
3737
|
uint64_t rs_uniffiCallbackData,
|
|
3736
3738
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
@@ -3749,7 +3751,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_offset, RustBuffer rs_limit,
|
|
|
3749
3751
|
|
|
3750
3752
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
3751
3753
|
// are all in the lambda.
|
|
3752
|
-
rsLambda(rs_uniffiHandle,
|
|
3754
|
+
rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
|
|
3753
3755
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
3754
3756
|
}
|
|
3755
3757
|
|
|
@@ -3773,19 +3775,18 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
|
|
|
3773
3775
|
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
3774
3776
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
3775
3777
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
3776
|
-
uint64_t rs_uniffiHandle, RustBuffer
|
|
3777
|
-
RustBuffer rs_limit,
|
|
3778
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_request,
|
|
3778
3779
|
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
3779
3780
|
uint64_t rs_uniffiCallbackData,
|
|
3780
3781
|
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
3781
3782
|
// We immediately make a lambda which will do the work of transforming the
|
|
3782
3783
|
// arguments into JSI values and calling the callback.
|
|
3783
3784
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
3784
|
-
[callInvoker, callbackValue, rs_uniffiHandle,
|
|
3785
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_request,
|
|
3785
3786
|
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
3786
3787
|
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
3787
|
-
body(rt, callInvoker, callbackValue, rs_uniffiHandle,
|
|
3788
|
-
|
|
3788
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
|
|
3789
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
3789
3790
|
rs_uniffiOutReturn);
|
|
3790
3791
|
};
|
|
3791
3792
|
// We'll then call that lambda from the callInvoker which will
|
|
@@ -4251,6 +4252,148 @@ static void cleanup() {
|
|
|
4251
4252
|
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod7 {
|
|
4252
4253
|
using namespace facebook;
|
|
4253
4254
|
|
|
4255
|
+
// We need to store a lambda in a global so we can call it from
|
|
4256
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
4257
|
+
static std::function<void(uint64_t, RustBuffer,
|
|
4258
|
+
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
4259
|
+
UniffiForeignFuture *)>
|
|
4260
|
+
rsLambda = nullptr;
|
|
4261
|
+
|
|
4262
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
4263
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
4264
|
+
static void body(jsi::Runtime &rt,
|
|
4265
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4266
|
+
std::shared_ptr<jsi::Value> callbackValue,
|
|
4267
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_invoice,
|
|
4268
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
4269
|
+
uint64_t rs_uniffiCallbackData,
|
|
4270
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
4271
|
+
|
|
4272
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
4273
|
+
// We'll use the Bridging class to do this…
|
|
4274
|
+
auto js_uniffiHandle =
|
|
4275
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
4276
|
+
auto js_invoice = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
4277
|
+
rt, callInvoker, rs_invoice);
|
|
4278
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
4279
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
4280
|
+
rs_uniffiFutureCallback);
|
|
4281
|
+
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
4282
|
+
rt, callInvoker, rs_uniffiCallbackData);
|
|
4283
|
+
|
|
4284
|
+
// Now we are ready to call the callback.
|
|
4285
|
+
// We are already on the JS thread, because this `body` function was
|
|
4286
|
+
// invoked from the CallInvoker.
|
|
4287
|
+
try {
|
|
4288
|
+
// Getting the callback function
|
|
4289
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
4290
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_invoice,
|
|
4291
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
4292
|
+
|
|
4293
|
+
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4294
|
+
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
4295
|
+
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4296
|
+
uniffiResult);
|
|
4297
|
+
} catch (const jsi::JSError &error) {
|
|
4298
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod7: "
|
|
4299
|
+
<< error.what() << std::endl;
|
|
4300
|
+
throw error;
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
|
|
4304
|
+
static void
|
|
4305
|
+
callback(uint64_t rs_uniffiHandle, RustBuffer rs_invoice,
|
|
4306
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
4307
|
+
uint64_t rs_uniffiCallbackData,
|
|
4308
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
4309
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
4310
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
4311
|
+
//
|
|
4312
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
4313
|
+
// which nulls out the rsLamda.
|
|
4314
|
+
//
|
|
4315
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
4316
|
+
if (rsLambda == nullptr) {
|
|
4317
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
4318
|
+
// which causes the JS callback to be dropped.
|
|
4319
|
+
return;
|
|
4320
|
+
}
|
|
4321
|
+
|
|
4322
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
4323
|
+
// are all in the lambda.
|
|
4324
|
+
rsLambda(rs_uniffiHandle, rs_invoice, rs_uniffiFutureCallback,
|
|
4325
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4326
|
+
}
|
|
4327
|
+
|
|
4328
|
+
static UniffiCallbackInterfaceStorageMethod7
|
|
4329
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod7
|
|
4330
|
+
jsi::Runtime &rt,
|
|
4331
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4332
|
+
const jsi::Value &value) {
|
|
4333
|
+
if (rsLambda != nullptr) {
|
|
4334
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
4335
|
+
//
|
|
4336
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
4337
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
4338
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
4339
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
4340
|
+
//
|
|
4341
|
+
// We can therefore return the callback function without making anything
|
|
4342
|
+
// new if we've been initialized already.
|
|
4343
|
+
return callback;
|
|
4344
|
+
}
|
|
4345
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
4346
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
4347
|
+
rsLambda = [&rt, callInvoker, callbackValue](
|
|
4348
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_invoice,
|
|
4349
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
4350
|
+
uint64_t rs_uniffiCallbackData,
|
|
4351
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
4352
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
4353
|
+
// arguments into JSI values and calling the callback.
|
|
4354
|
+
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
4355
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_invoice,
|
|
4356
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
4357
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
4358
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_invoice,
|
|
4359
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
4360
|
+
rs_uniffiOutReturn);
|
|
4361
|
+
};
|
|
4362
|
+
// We'll then call that lambda from the callInvoker which will
|
|
4363
|
+
// look after calling it on the correct thread.
|
|
4364
|
+
callInvoker->invokeBlocking(rt, jsLambda);
|
|
4365
|
+
};
|
|
4366
|
+
return callback;
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4369
|
+
// This method is called from the destructor of NativeBreezSdkSpark, which only
|
|
4370
|
+
// happens when the jsi::Runtime is being destroyed.
|
|
4371
|
+
static void cleanup() {
|
|
4372
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled
|
|
4373
|
+
// out, then the pointer will no longer be left dangling.
|
|
4374
|
+
rsLambda = nullptr;
|
|
4375
|
+
}
|
|
4376
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod7
|
|
4377
|
+
// Implementation of callback function calling from Rust to JS
|
|
4378
|
+
// CallbackInterfaceStorageMethod8
|
|
4379
|
+
|
|
4380
|
+
// Callback function:
|
|
4381
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8::UniffiCallbackInterfaceStorageMethod8
|
|
4382
|
+
//
|
|
4383
|
+
// We have the following constraints:
|
|
4384
|
+
// - we need to pass a function pointer to Rust.
|
|
4385
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
4386
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
4387
|
+
//
|
|
4388
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
4389
|
+
// function calls the lambda, which itself calls the `body` which then calls
|
|
4390
|
+
// into JS.
|
|
4391
|
+
//
|
|
4392
|
+
// We then give the `callback` function pointer to Rust which will call the
|
|
4393
|
+
// lambda sometime in the future.
|
|
4394
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8 {
|
|
4395
|
+
using namespace facebook;
|
|
4396
|
+
|
|
4254
4397
|
// We need to store a lambda in a global so we can call it from
|
|
4255
4398
|
// a function pointer. The function pointer is passed to Rust.
|
|
4256
4399
|
static std::function<void(uint64_t, RustBuffer, uint32_t, uint64_t,
|
|
@@ -4299,7 +4442,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4299
4442
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4300
4443
|
uniffiResult);
|
|
4301
4444
|
} catch (const jsi::JSError &error) {
|
|
4302
|
-
std::cout << "Error in callback
|
|
4445
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod8: "
|
|
4303
4446
|
<< error.what() << std::endl;
|
|
4304
4447
|
throw error;
|
|
4305
4448
|
}
|
|
@@ -4329,8 +4472,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4329
4472
|
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4330
4473
|
}
|
|
4331
4474
|
|
|
4332
|
-
static
|
|
4333
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4475
|
+
static UniffiCallbackInterfaceStorageMethod8
|
|
4476
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8
|
|
4334
4477
|
jsi::Runtime &rt,
|
|
4335
4478
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4336
4479
|
const jsi::Value &value) {
|
|
@@ -4378,12 +4521,12 @@ static void cleanup() {
|
|
|
4378
4521
|
// out, then the pointer will no longer be left dangling.
|
|
4379
4522
|
rsLambda = nullptr;
|
|
4380
4523
|
}
|
|
4381
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4524
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8
|
|
4382
4525
|
// Implementation of callback function calling from Rust to JS
|
|
4383
|
-
//
|
|
4526
|
+
// CallbackInterfaceStorageMethod9
|
|
4384
4527
|
|
|
4385
4528
|
// Callback function:
|
|
4386
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4529
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9::UniffiCallbackInterfaceStorageMethod9
|
|
4387
4530
|
//
|
|
4388
4531
|
// We have the following constraints:
|
|
4389
4532
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4396,7 +4539,7 @@ static void cleanup() {
|
|
|
4396
4539
|
//
|
|
4397
4540
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4398
4541
|
// lambda sometime in the future.
|
|
4399
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4542
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9 {
|
|
4400
4543
|
using namespace facebook;
|
|
4401
4544
|
|
|
4402
4545
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4443,7 +4586,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4443
4586
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4444
4587
|
uniffiResult);
|
|
4445
4588
|
} catch (const jsi::JSError &error) {
|
|
4446
|
-
std::cout << "Error in callback
|
|
4589
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod9: "
|
|
4447
4590
|
<< error.what() << std::endl;
|
|
4448
4591
|
throw error;
|
|
4449
4592
|
}
|
|
@@ -4473,8 +4616,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4473
4616
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4474
4617
|
}
|
|
4475
4618
|
|
|
4476
|
-
static
|
|
4477
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4619
|
+
static UniffiCallbackInterfaceStorageMethod9
|
|
4620
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9
|
|
4478
4621
|
jsi::Runtime &rt,
|
|
4479
4622
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4480
4623
|
const jsi::Value &value) {
|
|
@@ -4521,12 +4664,12 @@ static void cleanup() {
|
|
|
4521
4664
|
// out, then the pointer will no longer be left dangling.
|
|
4522
4665
|
rsLambda = nullptr;
|
|
4523
4666
|
}
|
|
4524
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4667
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9
|
|
4525
4668
|
// Implementation of callback function calling from Rust to JS
|
|
4526
|
-
//
|
|
4669
|
+
// CallbackInterfaceStorageMethod10
|
|
4527
4670
|
|
|
4528
4671
|
// Callback function:
|
|
4529
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4672
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10::UniffiCallbackInterfaceStorageMethod10
|
|
4530
4673
|
//
|
|
4531
4674
|
// We have the following constraints:
|
|
4532
4675
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4539,7 +4682,7 @@ static void cleanup() {
|
|
|
4539
4682
|
//
|
|
4540
4683
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4541
4684
|
// lambda sometime in the future.
|
|
4542
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4685
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10 {
|
|
4543
4686
|
using namespace facebook;
|
|
4544
4687
|
|
|
4545
4688
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4582,7 +4725,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4582
4725
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4583
4726
|
uniffiResult);
|
|
4584
4727
|
} catch (const jsi::JSError &error) {
|
|
4585
|
-
std::cout << "Error in callback
|
|
4728
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod10: "
|
|
4586
4729
|
<< error.what() << std::endl;
|
|
4587
4730
|
throw error;
|
|
4588
4731
|
}
|
|
@@ -4612,8 +4755,8 @@ callback(uint64_t rs_uniffiHandle,
|
|
|
4612
4755
|
rs_uniffiOutReturn);
|
|
4613
4756
|
}
|
|
4614
4757
|
|
|
4615
|
-
static
|
|
4616
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4758
|
+
static UniffiCallbackInterfaceStorageMethod10
|
|
4759
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10
|
|
4617
4760
|
jsi::Runtime &rt,
|
|
4618
4761
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4619
4762
|
const jsi::Value &value) {
|
|
@@ -4659,12 +4802,12 @@ static void cleanup() {
|
|
|
4659
4802
|
// out, then the pointer will no longer be left dangling.
|
|
4660
4803
|
rsLambda = nullptr;
|
|
4661
4804
|
}
|
|
4662
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4805
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10
|
|
4663
4806
|
// Implementation of callback function calling from Rust to JS
|
|
4664
|
-
//
|
|
4807
|
+
// CallbackInterfaceStorageMethod11
|
|
4665
4808
|
|
|
4666
4809
|
// Callback function:
|
|
4667
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4810
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11::UniffiCallbackInterfaceStorageMethod11
|
|
4668
4811
|
//
|
|
4669
4812
|
// We have the following constraints:
|
|
4670
4813
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4677,7 +4820,7 @@ static void cleanup() {
|
|
|
4677
4820
|
//
|
|
4678
4821
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4679
4822
|
// lambda sometime in the future.
|
|
4680
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4823
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11 {
|
|
4681
4824
|
using namespace facebook;
|
|
4682
4825
|
|
|
4683
4826
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4728,7 +4871,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4728
4871
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4729
4872
|
uniffiResult);
|
|
4730
4873
|
} catch (const jsi::JSError &error) {
|
|
4731
|
-
std::cout << "Error in callback
|
|
4874
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod11: "
|
|
4732
4875
|
<< error.what() << std::endl;
|
|
4733
4876
|
throw error;
|
|
4734
4877
|
}
|
|
@@ -4758,8 +4901,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4758
4901
|
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4759
4902
|
}
|
|
4760
4903
|
|
|
4761
|
-
static
|
|
4762
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4904
|
+
static UniffiCallbackInterfaceStorageMethod11
|
|
4905
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11
|
|
4763
4906
|
jsi::Runtime &rt,
|
|
4764
4907
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4765
4908
|
const jsi::Value &value) {
|
|
@@ -4807,7 +4950,7 @@ static void cleanup() {
|
|
|
4807
4950
|
// out, then the pointer will no longer be left dangling.
|
|
4808
4951
|
rsLambda = nullptr;
|
|
4809
4952
|
}
|
|
4810
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4953
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11
|
|
4811
4954
|
namespace uniffi::breez_sdk_spark {
|
|
4812
4955
|
using namespace facebook;
|
|
4813
4956
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
@@ -4963,17 +5106,20 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceStorage> {
|
|
|
4963
5106
|
rsObject.get_payment_by_id = uniffi::breez_sdk_spark::cb::
|
|
4964
5107
|
callbackinterfacestoragemethod6::makeCallbackFunction(
|
|
4965
5108
|
rt, callInvoker, jsObject.getProperty(rt, "getPaymentById"));
|
|
4966
|
-
rsObject.
|
|
5109
|
+
rsObject.get_payment_by_invoice = uniffi::breez_sdk_spark::cb::
|
|
4967
5110
|
callbackinterfacestoragemethod7::makeCallbackFunction(
|
|
5111
|
+
rt, callInvoker, jsObject.getProperty(rt, "getPaymentByInvoice"));
|
|
5112
|
+
rsObject.add_deposit = uniffi::breez_sdk_spark::cb::
|
|
5113
|
+
callbackinterfacestoragemethod8::makeCallbackFunction(
|
|
4968
5114
|
rt, callInvoker, jsObject.getProperty(rt, "addDeposit"));
|
|
4969
5115
|
rsObject.delete_deposit = uniffi::breez_sdk_spark::cb::
|
|
4970
|
-
|
|
5116
|
+
callbackinterfacestoragemethod9::makeCallbackFunction(
|
|
4971
5117
|
rt, callInvoker, jsObject.getProperty(rt, "deleteDeposit"));
|
|
4972
5118
|
rsObject.list_deposits = uniffi::breez_sdk_spark::cb::
|
|
4973
|
-
|
|
5119
|
+
callbackinterfacestoragemethod10::makeCallbackFunction(
|
|
4974
5120
|
rt, callInvoker, jsObject.getProperty(rt, "listDeposits"));
|
|
4975
5121
|
rsObject.update_deposit = uniffi::breez_sdk_spark::cb::
|
|
4976
|
-
|
|
5122
|
+
callbackinterfacestoragemethod11::makeCallbackFunction(
|
|
4977
5123
|
rt, callInvoker, jsObject.getProperty(rt, "updateDeposit"));
|
|
4978
5124
|
rsObject.uniffi_free =
|
|
4979
5125
|
uniffi::breez_sdk_spark::st::vtablecallbackinterfacestorage::
|
|
@@ -5235,6 +5381,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5235
5381
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment(
|
|
5236
5382
|
rt, thisVal, args, count);
|
|
5237
5383
|
});
|
|
5384
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata"] =
|
|
5385
|
+
jsi::Function::createFromHostFunction(
|
|
5386
|
+
rt,
|
|
5387
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5388
|
+
"breezsdk_get_tokens_metadata"),
|
|
5389
|
+
2,
|
|
5390
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5391
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5392
|
+
return this
|
|
5393
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata(
|
|
5394
|
+
rt, thisVal, args, count);
|
|
5395
|
+
});
|
|
5238
5396
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies"] =
|
|
5239
5397
|
jsi::Function::createFromHostFunction(
|
|
5240
5398
|
rt,
|
|
@@ -5297,18 +5455,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5297
5455
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay(
|
|
5298
5456
|
rt, thisVal, args, count);
|
|
5299
5457
|
});
|
|
5300
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_"
|
|
5301
|
-
"payment"] = jsi::Function::createFromHostFunction(
|
|
5302
|
-
rt,
|
|
5303
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5304
|
-
"breezsdk_poll_lightning_send_payment"),
|
|
5305
|
-
3,
|
|
5306
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5307
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5308
|
-
return this
|
|
5309
|
-
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(
|
|
5310
|
-
rt, thisVal, args, count);
|
|
5311
|
-
});
|
|
5312
5458
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay"] =
|
|
5313
5459
|
jsi::Function::createFromHostFunction(
|
|
5314
5460
|
rt,
|
|
@@ -5346,18 +5492,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5346
5492
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(
|
|
5347
5493
|
rt, thisVal, args, count);
|
|
5348
5494
|
});
|
|
5349
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_"
|
|
5350
|
-
"address"] = jsi::Function::createFromHostFunction(
|
|
5351
|
-
rt,
|
|
5352
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5353
|
-
"breezsdk_recover_lightning_address"),
|
|
5354
|
-
1,
|
|
5355
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5356
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5357
|
-
return this
|
|
5358
|
-
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address(
|
|
5359
|
-
rt, thisVal, args, count);
|
|
5360
|
-
});
|
|
5361
5495
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit"] =
|
|
5362
5496
|
jsi::Function::createFromHostFunction(
|
|
5363
5497
|
rt,
|
|
@@ -5408,18 +5542,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5408
5542
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(
|
|
5409
5543
|
rt, thisVal, args, count);
|
|
5410
5544
|
});
|
|
5411
|
-
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_"
|
|
5412
|
-
"internal"] = jsi::Function::createFromHostFunction(
|
|
5413
|
-
rt,
|
|
5414
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5415
|
-
"breezsdk_send_payment_internal"),
|
|
5416
|
-
3,
|
|
5417
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5418
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5419
|
-
return this
|
|
5420
|
-
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
|
|
5421
|
-
rt, thisVal, args, count);
|
|
5422
|
-
});
|
|
5423
5545
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet"] =
|
|
5424
5546
|
jsi::Function::createFromHostFunction(
|
|
5425
5547
|
rt,
|
|
@@ -5432,6 +5554,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5432
5554
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
5433
5555
|
rt, thisVal, args, count);
|
|
5434
5556
|
});
|
|
5557
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment"] =
|
|
5558
|
+
jsi::Function::createFromHostFunction(
|
|
5559
|
+
rt,
|
|
5560
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5561
|
+
"breezsdk_wait_for_payment"),
|
|
5562
|
+
2,
|
|
5563
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5564
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5565
|
+
return this
|
|
5566
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
|
|
5567
|
+
rt, thisVal, args, count);
|
|
5568
|
+
});
|
|
5435
5569
|
props["ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder"] =
|
|
5436
5570
|
jsi::Function::createFromHostFunction(
|
|
5437
5571
|
rt,
|
|
@@ -5604,7 +5738,7 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5604
5738
|
jsi::PropNameID::forAscii(
|
|
5605
5739
|
rt,
|
|
5606
5740
|
"ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_payments"),
|
|
5607
|
-
|
|
5741
|
+
2,
|
|
5608
5742
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5609
5743
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5610
5744
|
return this
|
|
@@ -5648,6 +5782,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5648
5782
|
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(
|
|
5649
5783
|
rt, thisVal, args, count);
|
|
5650
5784
|
});
|
|
5785
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_"
|
|
5786
|
+
"invoice"] = jsi::Function::createFromHostFunction(
|
|
5787
|
+
rt,
|
|
5788
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5789
|
+
"storage_get_payment_by_invoice"),
|
|
5790
|
+
2,
|
|
5791
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5792
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5793
|
+
return this
|
|
5794
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
5795
|
+
rt, thisVal, args, count);
|
|
5796
|
+
});
|
|
5651
5797
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_deposit"] =
|
|
5652
5798
|
jsi::Function::createFromHostFunction(
|
|
5653
5799
|
rt,
|
|
@@ -6534,6 +6680,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6534
6680
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment(
|
|
6535
6681
|
rt, thisVal, args, count);
|
|
6536
6682
|
});
|
|
6683
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_"
|
|
6684
|
+
"metadata"] = jsi::Function::createFromHostFunction(
|
|
6685
|
+
rt,
|
|
6686
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
6687
|
+
"method_breezsdk_get_tokens_metadata"),
|
|
6688
|
+
0,
|
|
6689
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6690
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6691
|
+
return this
|
|
6692
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata(
|
|
6693
|
+
rt, thisVal, args, count);
|
|
6694
|
+
});
|
|
6537
6695
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_"
|
|
6538
6696
|
"currencies"] = jsi::Function::createFromHostFunction(
|
|
6539
6697
|
rt,
|
|
@@ -6595,19 +6753,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6595
6753
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay(
|
|
6596
6754
|
rt, thisVal, args, count);
|
|
6597
6755
|
});
|
|
6598
|
-
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_"
|
|
6599
|
-
"send_payment"] = jsi::Function::createFromHostFunction(
|
|
6600
|
-
rt,
|
|
6601
|
-
jsi::PropNameID::forAscii(rt,
|
|
6602
|
-
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
6603
|
-
"breezsdk_poll_lightning_send_payment"),
|
|
6604
|
-
0,
|
|
6605
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6606
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6607
|
-
return this
|
|
6608
|
-
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment(
|
|
6609
|
-
rt, thisVal, args, count);
|
|
6610
|
-
});
|
|
6611
6756
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_"
|
|
6612
6757
|
"pay"] = jsi::Function::createFromHostFunction(
|
|
6613
6758
|
rt,
|
|
@@ -6644,19 +6789,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6644
6789
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment(
|
|
6645
6790
|
rt, thisVal, args, count);
|
|
6646
6791
|
});
|
|
6647
|
-
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_"
|
|
6648
|
-
"lightning_address"] = jsi::Function::createFromHostFunction(
|
|
6649
|
-
rt,
|
|
6650
|
-
jsi::PropNameID::forAscii(rt,
|
|
6651
|
-
"ubrn_uniffi_breez_sdk_spark_checksum_method_"
|
|
6652
|
-
"breezsdk_recover_lightning_address"),
|
|
6653
|
-
0,
|
|
6654
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6655
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6656
|
-
return this
|
|
6657
|
-
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address(
|
|
6658
|
-
rt, thisVal, args, count);
|
|
6659
|
-
});
|
|
6660
6792
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit"] =
|
|
6661
6793
|
jsi::Function::createFromHostFunction(
|
|
6662
6794
|
rt,
|
|
@@ -6706,18 +6838,6 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6706
6838
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment(
|
|
6707
6839
|
rt, thisVal, args, count);
|
|
6708
6840
|
});
|
|
6709
|
-
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_"
|
|
6710
|
-
"internal"] = jsi::Function::createFromHostFunction(
|
|
6711
|
-
rt,
|
|
6712
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
6713
|
-
"method_breezsdk_send_payment_internal"),
|
|
6714
|
-
0,
|
|
6715
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6716
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6717
|
-
return this
|
|
6718
|
-
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal(
|
|
6719
|
-
rt, thisVal, args, count);
|
|
6720
|
-
});
|
|
6721
6841
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet"] =
|
|
6722
6842
|
jsi::Function::createFromHostFunction(
|
|
6723
6843
|
rt,
|
|
@@ -6730,6 +6850,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6730
6850
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
|
|
6731
6851
|
rt, thisVal, args, count);
|
|
6732
6852
|
});
|
|
6853
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_"
|
|
6854
|
+
"payment"] = jsi::Function::createFromHostFunction(
|
|
6855
|
+
rt,
|
|
6856
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
6857
|
+
"method_breezsdk_wait_for_payment"),
|
|
6858
|
+
0,
|
|
6859
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6860
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6861
|
+
return this
|
|
6862
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(
|
|
6863
|
+
rt, thisVal, args, count);
|
|
6864
|
+
});
|
|
6733
6865
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build"] =
|
|
6734
6866
|
jsi::Function::createFromHostFunction(
|
|
6735
6867
|
rt,
|
|
@@ -6888,6 +7020,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6888
7020
|
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id(
|
|
6889
7021
|
rt, thisVal, args, count);
|
|
6890
7022
|
});
|
|
7023
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_"
|
|
7024
|
+
"invoice"] = jsi::Function::createFromHostFunction(
|
|
7025
|
+
rt,
|
|
7026
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
7027
|
+
"method_storage_get_payment_by_invoice"),
|
|
7028
|
+
0,
|
|
7029
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
7030
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
7031
|
+
return this
|
|
7032
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice(
|
|
7033
|
+
rt, thisVal, args, count);
|
|
7034
|
+
});
|
|
6891
7035
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit"] =
|
|
6892
7036
|
jsi::Function::createFromHostFunction(
|
|
6893
7037
|
rt,
|
|
@@ -7169,6 +7313,8 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
|
|
|
7169
7313
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9::cleanup();
|
|
7170
7314
|
// Cleanup for callback function CallbackInterfaceStorageMethod10
|
|
7171
7315
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10::cleanup();
|
|
7316
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod11
|
|
7317
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11::cleanup();
|
|
7172
7318
|
}
|
|
7173
7319
|
|
|
7174
7320
|
// Utility functions for serialization/deserialization of strings.
|
|
@@ -7411,14 +7557,11 @@ jsi::Value
|
|
|
7411
7557
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7412
7558
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7413
7559
|
size_t count) {
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7417
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
|
|
7418
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
7419
|
-
rt, callInvoker, status, args[count - 1]);
|
|
7560
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7561
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
|
|
7420
7562
|
|
|
7421
|
-
return
|
|
7563
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7564
|
+
value);
|
|
7422
7565
|
}
|
|
7423
7566
|
jsi::Value
|
|
7424
7567
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_info(
|
|
@@ -7454,6 +7597,18 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment(
|
|
|
7454
7597
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7455
7598
|
value);
|
|
7456
7599
|
}
|
|
7600
|
+
jsi::Value NativeBreezSdkSpark::
|
|
7601
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata(
|
|
7602
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7603
|
+
size_t count) {
|
|
7604
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata(
|
|
7605
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7606
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7607
|
+
args[1]));
|
|
7608
|
+
|
|
7609
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7610
|
+
value);
|
|
7611
|
+
}
|
|
7457
7612
|
jsi::Value NativeBreezSdkSpark::
|
|
7458
7613
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies(
|
|
7459
7614
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -7511,24 +7666,6 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay(
|
|
|
7511
7666
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7512
7667
|
value);
|
|
7513
7668
|
}
|
|
7514
|
-
jsi::Value NativeBreezSdkSpark::
|
|
7515
|
-
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(
|
|
7516
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7517
|
-
size_t count) {
|
|
7518
|
-
RustCallStatus status =
|
|
7519
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
7520
|
-
uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(
|
|
7521
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7522
|
-
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7523
|
-
args[1]),
|
|
7524
|
-
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7525
|
-
args[2]),
|
|
7526
|
-
&status);
|
|
7527
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
7528
|
-
rt, callInvoker, status, args[count - 1]);
|
|
7529
|
-
|
|
7530
|
-
return jsi::Value::undefined();
|
|
7531
|
-
}
|
|
7532
7669
|
jsi::Value NativeBreezSdkSpark::
|
|
7533
7670
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(
|
|
7534
7671
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -7565,17 +7702,6 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7565
7702
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7566
7703
|
value);
|
|
7567
7704
|
}
|
|
7568
|
-
jsi::Value NativeBreezSdkSpark::
|
|
7569
|
-
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address(
|
|
7570
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7571
|
-
size_t count) {
|
|
7572
|
-
auto value =
|
|
7573
|
-
uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address(
|
|
7574
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
|
|
7575
|
-
|
|
7576
|
-
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7577
|
-
value);
|
|
7578
|
-
}
|
|
7579
7705
|
jsi::Value NativeBreezSdkSpark::
|
|
7580
7706
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(
|
|
7581
7707
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -7625,24 +7751,23 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(
|
|
|
7625
7751
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7626
7752
|
value);
|
|
7627
7753
|
}
|
|
7628
|
-
jsi::Value
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
auto value =
|
|
7754
|
+
jsi::Value
|
|
7755
|
+
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
7756
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7757
|
+
size_t count) {
|
|
7758
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
7633
7759
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7634
7760
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7635
|
-
args[1])
|
|
7636
|
-
uniffi_jsi::Bridging<int8_t>::fromJs(rt, callInvoker, args[2]));
|
|
7761
|
+
args[1]));
|
|
7637
7762
|
|
|
7638
7763
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7639
7764
|
value);
|
|
7640
7765
|
}
|
|
7641
|
-
jsi::Value
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
auto value =
|
|
7766
|
+
jsi::Value NativeBreezSdkSpark::
|
|
7767
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
|
|
7768
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7769
|
+
size_t count) {
|
|
7770
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
|
|
7646
7771
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7647
7772
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7648
7773
|
args[1]));
|
|
@@ -7833,9 +7958,7 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_storage_list_payments(
|
|
|
7833
7958
|
auto value = uniffi_breez_sdk_spark_fn_method_storage_list_payments(
|
|
7834
7959
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7835
7960
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7836
|
-
args[1])
|
|
7837
|
-
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7838
|
-
args[2]));
|
|
7961
|
+
args[1]));
|
|
7839
7962
|
|
|
7840
7963
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7841
7964
|
value);
|
|
@@ -7878,6 +8001,18 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7878
8001
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7879
8002
|
value);
|
|
7880
8003
|
}
|
|
8004
|
+
jsi::Value NativeBreezSdkSpark::
|
|
8005
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
8006
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8007
|
+
size_t count) {
|
|
8008
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
8009
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
8010
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
8011
|
+
args[1]));
|
|
8012
|
+
|
|
8013
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
8014
|
+
value);
|
|
8015
|
+
}
|
|
7881
8016
|
jsi::Value
|
|
7882
8017
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
7883
8018
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8758,6 +8893,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8758
8893
|
|
|
8759
8894
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8760
8895
|
}
|
|
8896
|
+
jsi::Value NativeBreezSdkSpark::
|
|
8897
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata(
|
|
8898
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8899
|
+
size_t count) {
|
|
8900
|
+
auto value =
|
|
8901
|
+
uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata();
|
|
8902
|
+
|
|
8903
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8904
|
+
}
|
|
8761
8905
|
jsi::Value NativeBreezSdkSpark::
|
|
8762
8906
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies(
|
|
8763
8907
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8801,15 +8945,6 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8801
8945
|
|
|
8802
8946
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8803
8947
|
}
|
|
8804
|
-
jsi::Value NativeBreezSdkSpark::
|
|
8805
|
-
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment(
|
|
8806
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8807
|
-
size_t count) {
|
|
8808
|
-
auto value =
|
|
8809
|
-
uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment();
|
|
8810
|
-
|
|
8811
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8812
|
-
}
|
|
8813
8948
|
jsi::Value NativeBreezSdkSpark::
|
|
8814
8949
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay(
|
|
8815
8950
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8837,15 +8972,6 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8837
8972
|
|
|
8838
8973
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8839
8974
|
}
|
|
8840
|
-
jsi::Value NativeBreezSdkSpark::
|
|
8841
|
-
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address(
|
|
8842
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8843
|
-
size_t count) {
|
|
8844
|
-
auto value =
|
|
8845
|
-
uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address();
|
|
8846
|
-
|
|
8847
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8848
|
-
}
|
|
8849
8975
|
jsi::Value NativeBreezSdkSpark::
|
|
8850
8976
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit(
|
|
8851
8977
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8881,19 +9007,19 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8881
9007
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8882
9008
|
}
|
|
8883
9009
|
jsi::Value NativeBreezSdkSpark::
|
|
8884
|
-
|
|
9010
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
|
|
8885
9011
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8886
9012
|
size_t count) {
|
|
8887
|
-
auto value =
|
|
8888
|
-
uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal();
|
|
9013
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
|
|
8889
9014
|
|
|
8890
9015
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8891
9016
|
}
|
|
8892
9017
|
jsi::Value NativeBreezSdkSpark::
|
|
8893
|
-
|
|
9018
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(
|
|
8894
9019
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8895
9020
|
size_t count) {
|
|
8896
|
-
auto value =
|
|
9021
|
+
auto value =
|
|
9022
|
+
uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment();
|
|
8897
9023
|
|
|
8898
9024
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8899
9025
|
}
|
|
@@ -9008,6 +9134,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
9008
9134
|
|
|
9009
9135
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9010
9136
|
}
|
|
9137
|
+
jsi::Value NativeBreezSdkSpark::
|
|
9138
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice(
|
|
9139
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
9140
|
+
size_t count) {
|
|
9141
|
+
auto value =
|
|
9142
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice();
|
|
9143
|
+
|
|
9144
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9145
|
+
}
|
|
9011
9146
|
jsi::Value NativeBreezSdkSpark::
|
|
9012
9147
|
cpp_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit(
|
|
9013
9148
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|