@breeztech/breez-sdk-spark-react-native 0.2.5-dev1 → 0.2.6
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 +500 -94
- package/cpp/generated/breez_sdk_spark.hpp +36 -0
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +405 -40
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +405 -40
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +25 -13
- 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 +220 -10
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +25 -13
- 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 +220 -10
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/generated/breez_sdk_spark-ffi.ts +57 -21
- package/src/generated/breez_sdk_spark.ts +806 -74
|
@@ -101,8 +101,9 @@ typedef struct UniffiForeignFutureStructVoid {
|
|
|
101
101
|
typedef void (*UniffiForeignFutureCompleteVoid)(
|
|
102
102
|
uint64_t callback_data, UniffiForeignFutureStructVoid result);
|
|
103
103
|
typedef void (*UniffiCallbackInterfaceEventListenerMethod0)(
|
|
104
|
-
uint64_t uniffi_handle, RustBuffer event,
|
|
105
|
-
|
|
104
|
+
uint64_t uniffi_handle, RustBuffer event,
|
|
105
|
+
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
106
|
+
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
106
107
|
typedef void (*UniffiCallbackInterfaceLoggerMethod0)(
|
|
107
108
|
uint64_t uniffi_handle, RustBuffer l, void *uniffi_out_return,
|
|
108
109
|
RustCallStatus *rust_call_status);
|
|
@@ -151,19 +152,23 @@ typedef void (*UniffiCallbackInterfaceStorageMethod6)(
|
|
|
151
152
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
152
153
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
153
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)(
|
|
154
159
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout,
|
|
155
160
|
uint64_t amount_sats,
|
|
156
161
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
157
162
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
158
|
-
typedef void (*
|
|
163
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod9)(
|
|
159
164
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout,
|
|
160
165
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
161
166
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
162
|
-
typedef void (*
|
|
167
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod10)(
|
|
163
168
|
uint64_t uniffi_handle,
|
|
164
169
|
UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
|
|
165
170
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
166
|
-
typedef void (*
|
|
171
|
+
typedef void (*UniffiCallbackInterfaceStorageMethod11)(
|
|
167
172
|
uint64_t uniffi_handle, RustBuffer txid, uint32_t vout, RustBuffer payload,
|
|
168
173
|
UniffiForeignFutureCompleteVoid uniffi_future_callback,
|
|
169
174
|
uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
|
|
@@ -190,10 +195,11 @@ typedef struct UniffiVTableCallbackInterfaceStorage {
|
|
|
190
195
|
UniffiCallbackInterfaceStorageMethod4 insert_payment;
|
|
191
196
|
UniffiCallbackInterfaceStorageMethod5 set_payment_metadata;
|
|
192
197
|
UniffiCallbackInterfaceStorageMethod6 get_payment_by_id;
|
|
193
|
-
UniffiCallbackInterfaceStorageMethod7
|
|
194
|
-
UniffiCallbackInterfaceStorageMethod8
|
|
195
|
-
UniffiCallbackInterfaceStorageMethod9
|
|
196
|
-
UniffiCallbackInterfaceStorageMethod10
|
|
198
|
+
UniffiCallbackInterfaceStorageMethod7 get_payment_by_invoice;
|
|
199
|
+
UniffiCallbackInterfaceStorageMethod8 add_deposit;
|
|
200
|
+
UniffiCallbackInterfaceStorageMethod9 delete_deposit;
|
|
201
|
+
UniffiCallbackInterfaceStorageMethod10 list_deposits;
|
|
202
|
+
UniffiCallbackInterfaceStorageMethod11 update_deposit;
|
|
197
203
|
UniffiCallbackInterfaceFree uniffi_free;
|
|
198
204
|
} UniffiVTableCallbackInterfaceStorage;
|
|
199
205
|
void *uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(
|
|
@@ -218,8 +224,9 @@ void *uniffi_breez_sdk_spark_fn_clone_breezsdk(void *ptr,
|
|
|
218
224
|
RustCallStatus *uniffi_out_err);
|
|
219
225
|
void uniffi_breez_sdk_spark_fn_free_breezsdk(void *ptr,
|
|
220
226
|
RustCallStatus *uniffi_out_err);
|
|
221
|
-
|
|
222
|
-
|
|
227
|
+
/*handle*/ uint64_t
|
|
228
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(void *ptr,
|
|
229
|
+
uint64_t listener);
|
|
223
230
|
/*handle*/ uint64_t
|
|
224
231
|
uniffi_breez_sdk_spark_fn_method_breezsdk_check_lightning_address_available(
|
|
225
232
|
void *ptr, RustBuffer req);
|
|
@@ -228,8 +235,8 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(void *ptr,
|
|
|
228
235
|
RustBuffer request);
|
|
229
236
|
/*handle*/ uint64_t
|
|
230
237
|
uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(void *ptr);
|
|
231
|
-
|
|
232
|
-
|
|
238
|
+
/*handle*/ uint64_t
|
|
239
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(void *ptr);
|
|
233
240
|
/*handle*/ uint64_t
|
|
234
241
|
uniffi_breez_sdk_spark_fn_method_breezsdk_get_info(void *ptr,
|
|
235
242
|
RustBuffer request);
|
|
@@ -271,16 +278,31 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(void *ptr,
|
|
|
271
278
|
/*handle*/ uint64_t
|
|
272
279
|
uniffi_breez_sdk_spark_fn_method_breezsdk_register_lightning_address(
|
|
273
280
|
void *ptr, RustBuffer request);
|
|
274
|
-
|
|
275
|
-
|
|
281
|
+
/*handle*/ uint64_t
|
|
282
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(void *ptr,
|
|
283
|
+
RustBuffer id);
|
|
284
|
+
/*handle*/ uint64_t
|
|
285
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address(
|
|
286
|
+
void *ptr, RustBuffer address, RustBuffer fee_quote, RustBuffer request);
|
|
287
|
+
/*handle*/ uint64_t
|
|
288
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice(
|
|
289
|
+
void *ptr, RustBuffer invoice_details, RustBuffer spark_transfer_fee_sats,
|
|
290
|
+
uint64_t lightning_fee_sats, RustBuffer request);
|
|
276
291
|
/*handle*/ uint64_t
|
|
277
292
|
uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(void *ptr,
|
|
278
293
|
RustBuffer request);
|
|
279
294
|
/*handle*/ uint64_t
|
|
280
295
|
uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
|
|
281
296
|
void *ptr, RustBuffer request, int8_t suppress_payment_event);
|
|
282
|
-
|
|
283
|
-
|
|
297
|
+
/*handle*/ uint64_t
|
|
298
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address(
|
|
299
|
+
void *ptr, RustBuffer address, RustBuffer request);
|
|
300
|
+
/*handle*/ uint64_t
|
|
301
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(void *ptr,
|
|
302
|
+
RustBuffer request);
|
|
303
|
+
/*handle*/ uint64_t
|
|
304
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(void *ptr,
|
|
305
|
+
RustBuffer request);
|
|
284
306
|
void *
|
|
285
307
|
uniffi_breez_sdk_spark_fn_clone_sdkbuilder(void *ptr,
|
|
286
308
|
RustCallStatus *uniffi_out_err);
|
|
@@ -331,6 +353,9 @@ uniffi_breez_sdk_spark_fn_method_storage_set_payment_metadata(
|
|
|
331
353
|
/*handle*/ uint64_t
|
|
332
354
|
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(void *ptr,
|
|
333
355
|
RustBuffer id);
|
|
356
|
+
/*handle*/ uint64_t
|
|
357
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
358
|
+
void *ptr, RustBuffer invoice);
|
|
334
359
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
335
360
|
void *ptr, RustBuffer txid, uint32_t vout, uint64_t amount_sats);
|
|
336
361
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_delete_deposit(
|
|
@@ -523,10 +548,14 @@ uint16_t
|
|
|
523
548
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address();
|
|
524
549
|
uint16_t
|
|
525
550
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener();
|
|
551
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_address();
|
|
552
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_invoice();
|
|
526
553
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment();
|
|
527
554
|
uint16_t
|
|
528
555
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal();
|
|
556
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address();
|
|
529
557
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
|
|
558
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment();
|
|
530
559
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build();
|
|
531
560
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service();
|
|
532
561
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service();
|
|
@@ -541,6 +570,8 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_payments();
|
|
|
541
570
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_insert_payment();
|
|
542
571
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_payment_metadata();
|
|
543
572
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id();
|
|
573
|
+
uint16_t
|
|
574
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice();
|
|
544
575
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_deposit();
|
|
545
576
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit();
|
|
546
577
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_deposits();
|
|
@@ -2396,7 +2427,8 @@ using namespace facebook;
|
|
|
2396
2427
|
|
|
2397
2428
|
// We need to store a lambda in a global so we can call it from
|
|
2398
2429
|
// a function pointer. The function pointer is passed to Rust.
|
|
2399
|
-
static std::function<void(uint64_t, RustBuffer,
|
|
2430
|
+
static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
|
|
2431
|
+
uint64_t, UniffiForeignFuture *)>
|
|
2400
2432
|
rsLambda = nullptr;
|
|
2401
2433
|
|
|
2402
2434
|
// This is the main body of the callback. It's called from the lambda,
|
|
@@ -2405,7 +2437,9 @@ static void body(jsi::Runtime &rt,
|
|
|
2405
2437
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
2406
2438
|
std::shared_ptr<jsi::Value> callbackValue,
|
|
2407
2439
|
uint64_t rs_uniffiHandle, RustBuffer rs_event,
|
|
2408
|
-
|
|
2440
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
2441
|
+
uint64_t rs_uniffiCallbackData,
|
|
2442
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
2409
2443
|
|
|
2410
2444
|
// Convert the arguments from Rust, into jsi::Values.
|
|
2411
2445
|
// We'll use the Bridging class to do this…
|
|
@@ -2413,6 +2447,11 @@ static void body(jsi::Runtime &rt,
|
|
|
2413
2447
|
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
2414
2448
|
auto js_event = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
2415
2449
|
rt, callInvoker, rs_event);
|
|
2450
|
+
auto js_uniffiFutureCallback =
|
|
2451
|
+
uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
|
|
2452
|
+
rt, callInvoker, rs_uniffiFutureCallback);
|
|
2453
|
+
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
2454
|
+
rt, callInvoker, rs_uniffiCallbackData);
|
|
2416
2455
|
|
|
2417
2456
|
// Now we are ready to call the callback.
|
|
2418
2457
|
// We are already on the JS thread, because this `body` function was
|
|
@@ -2420,18 +2459,13 @@ static void body(jsi::Runtime &rt,
|
|
|
2420
2459
|
try {
|
|
2421
2460
|
// Getting the callback function
|
|
2422
2461
|
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
2423
|
-
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_event
|
|
2424
|
-
|
|
2425
|
-
// Now copy the result back from JS into the RustCallStatus object.
|
|
2426
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyFromJs(
|
|
2427
|
-
rt, callInvoker, uniffiResult, uniffi_call_status);
|
|
2428
|
-
|
|
2429
|
-
if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) {
|
|
2430
|
-
// The JS callback finished abnormally, so we cannot retrieve the return
|
|
2431
|
-
// value.
|
|
2432
|
-
return;
|
|
2433
|
-
}
|
|
2462
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_event,
|
|
2463
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
2434
2464
|
|
|
2465
|
+
// Finally, we need to copy the return value back into the Rust pointer.
|
|
2466
|
+
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
2467
|
+
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
2468
|
+
uniffiResult);
|
|
2435
2469
|
} catch (const jsi::JSError &error) {
|
|
2436
2470
|
std::cout
|
|
2437
2471
|
<< "Error in callback UniffiCallbackInterfaceEventListenerMethod0: "
|
|
@@ -2441,8 +2475,9 @@ static void body(jsi::Runtime &rt,
|
|
|
2441
2475
|
}
|
|
2442
2476
|
|
|
2443
2477
|
static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event,
|
|
2444
|
-
|
|
2445
|
-
|
|
2478
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
2479
|
+
uint64_t rs_uniffiCallbackData,
|
|
2480
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
2446
2481
|
// If the runtime has shutdown, then there is no point in trying to
|
|
2447
2482
|
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
2448
2483
|
//
|
|
@@ -2458,7 +2493,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event,
|
|
|
2458
2493
|
|
|
2459
2494
|
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
2460
2495
|
// are all in the lambda.
|
|
2461
|
-
rsLambda(rs_uniffiHandle, rs_event,
|
|
2496
|
+
rsLambda(rs_uniffiHandle, rs_event, rs_uniffiFutureCallback,
|
|
2497
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
2462
2498
|
}
|
|
2463
2499
|
|
|
2464
2500
|
static UniffiCallbackInterfaceEventListenerMethod0
|
|
@@ -2482,14 +2518,18 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfaceeventlist
|
|
|
2482
2518
|
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
2483
2519
|
rsLambda = [&rt, callInvoker, callbackValue](
|
|
2484
2520
|
uint64_t rs_uniffiHandle, RustBuffer rs_event,
|
|
2485
|
-
|
|
2521
|
+
UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
|
|
2522
|
+
uint64_t rs_uniffiCallbackData,
|
|
2523
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
2486
2524
|
// We immediately make a lambda which will do the work of transforming the
|
|
2487
2525
|
// arguments into JSI values and calling the callback.
|
|
2488
2526
|
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
2489
2527
|
[callInvoker, callbackValue, rs_uniffiHandle, rs_event,
|
|
2490
|
-
|
|
2528
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
2529
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
2491
2530
|
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_event,
|
|
2492
|
-
|
|
2531
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
2532
|
+
rs_uniffiOutReturn);
|
|
2493
2533
|
};
|
|
2494
2534
|
// We'll then call that lambda from the callInvoker which will
|
|
2495
2535
|
// look after calling it on the correct thread.
|
|
@@ -4238,6 +4278,148 @@ static void cleanup() {
|
|
|
4238
4278
|
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod7 {
|
|
4239
4279
|
using namespace facebook;
|
|
4240
4280
|
|
|
4281
|
+
// We need to store a lambda in a global so we can call it from
|
|
4282
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
4283
|
+
static std::function<void(uint64_t, RustBuffer,
|
|
4284
|
+
UniffiForeignFutureCompleteRustBuffer, uint64_t,
|
|
4285
|
+
UniffiForeignFuture *)>
|
|
4286
|
+
rsLambda = nullptr;
|
|
4287
|
+
|
|
4288
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
4289
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
4290
|
+
static void body(jsi::Runtime &rt,
|
|
4291
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4292
|
+
std::shared_ptr<jsi::Value> callbackValue,
|
|
4293
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_invoice,
|
|
4294
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
4295
|
+
uint64_t rs_uniffiCallbackData,
|
|
4296
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
4297
|
+
|
|
4298
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
4299
|
+
// We'll use the Bridging class to do this…
|
|
4300
|
+
auto js_uniffiHandle =
|
|
4301
|
+
uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
|
|
4302
|
+
auto js_invoice = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
|
|
4303
|
+
rt, callInvoker, rs_invoice);
|
|
4304
|
+
auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
|
|
4305
|
+
UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
|
|
4306
|
+
rs_uniffiFutureCallback);
|
|
4307
|
+
auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
|
|
4308
|
+
rt, callInvoker, rs_uniffiCallbackData);
|
|
4309
|
+
|
|
4310
|
+
// Now we are ready to call the callback.
|
|
4311
|
+
// We are already on the JS thread, because this `body` function was
|
|
4312
|
+
// invoked from the CallInvoker.
|
|
4313
|
+
try {
|
|
4314
|
+
// Getting the callback function
|
|
4315
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
4316
|
+
auto uniffiResult = cb.call(rt, js_uniffiHandle, js_invoice,
|
|
4317
|
+
js_uniffiFutureCallback, js_uniffiCallbackData);
|
|
4318
|
+
|
|
4319
|
+
// Finally, we need to copy the return value back into the Rust pointer.
|
|
4320
|
+
*rs_uniffiOutReturn = uniffi::breez_sdk_spark::Bridging<
|
|
4321
|
+
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4322
|
+
uniffiResult);
|
|
4323
|
+
} catch (const jsi::JSError &error) {
|
|
4324
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod7: "
|
|
4325
|
+
<< error.what() << std::endl;
|
|
4326
|
+
throw error;
|
|
4327
|
+
}
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4330
|
+
static void
|
|
4331
|
+
callback(uint64_t rs_uniffiHandle, RustBuffer rs_invoice,
|
|
4332
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
4333
|
+
uint64_t rs_uniffiCallbackData,
|
|
4334
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
4335
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
4336
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
4337
|
+
//
|
|
4338
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
4339
|
+
// which nulls out the rsLamda.
|
|
4340
|
+
//
|
|
4341
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
4342
|
+
if (rsLambda == nullptr) {
|
|
4343
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
4344
|
+
// which causes the JS callback to be dropped.
|
|
4345
|
+
return;
|
|
4346
|
+
}
|
|
4347
|
+
|
|
4348
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
4349
|
+
// are all in the lambda.
|
|
4350
|
+
rsLambda(rs_uniffiHandle, rs_invoice, rs_uniffiFutureCallback,
|
|
4351
|
+
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
static UniffiCallbackInterfaceStorageMethod7
|
|
4355
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod7
|
|
4356
|
+
jsi::Runtime &rt,
|
|
4357
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4358
|
+
const jsi::Value &value) {
|
|
4359
|
+
if (rsLambda != nullptr) {
|
|
4360
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
4361
|
+
//
|
|
4362
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
4363
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
4364
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
4365
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
4366
|
+
//
|
|
4367
|
+
// We can therefore return the callback function without making anything
|
|
4368
|
+
// new if we've been initialized already.
|
|
4369
|
+
return callback;
|
|
4370
|
+
}
|
|
4371
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
4372
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
4373
|
+
rsLambda = [&rt, callInvoker, callbackValue](
|
|
4374
|
+
uint64_t rs_uniffiHandle, RustBuffer rs_invoice,
|
|
4375
|
+
UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
|
|
4376
|
+
uint64_t rs_uniffiCallbackData,
|
|
4377
|
+
UniffiForeignFuture *rs_uniffiOutReturn) {
|
|
4378
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
4379
|
+
// arguments into JSI values and calling the callback.
|
|
4380
|
+
uniffi_runtime::UniffiCallFunc jsLambda =
|
|
4381
|
+
[callInvoker, callbackValue, rs_uniffiHandle, rs_invoice,
|
|
4382
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
4383
|
+
rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
|
|
4384
|
+
body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_invoice,
|
|
4385
|
+
rs_uniffiFutureCallback, rs_uniffiCallbackData,
|
|
4386
|
+
rs_uniffiOutReturn);
|
|
4387
|
+
};
|
|
4388
|
+
// We'll then call that lambda from the callInvoker which will
|
|
4389
|
+
// look after calling it on the correct thread.
|
|
4390
|
+
callInvoker->invokeBlocking(rt, jsLambda);
|
|
4391
|
+
};
|
|
4392
|
+
return callback;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
// This method is called from the destructor of NativeBreezSdkSpark, which only
|
|
4396
|
+
// happens when the jsi::Runtime is being destroyed.
|
|
4397
|
+
static void cleanup() {
|
|
4398
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled
|
|
4399
|
+
// out, then the pointer will no longer be left dangling.
|
|
4400
|
+
rsLambda = nullptr;
|
|
4401
|
+
}
|
|
4402
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod7
|
|
4403
|
+
// Implementation of callback function calling from Rust to JS
|
|
4404
|
+
// CallbackInterfaceStorageMethod8
|
|
4405
|
+
|
|
4406
|
+
// Callback function:
|
|
4407
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8::UniffiCallbackInterfaceStorageMethod8
|
|
4408
|
+
//
|
|
4409
|
+
// We have the following constraints:
|
|
4410
|
+
// - we need to pass a function pointer to Rust.
|
|
4411
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
4412
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
4413
|
+
//
|
|
4414
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
4415
|
+
// function calls the lambda, which itself calls the `body` which then calls
|
|
4416
|
+
// into JS.
|
|
4417
|
+
//
|
|
4418
|
+
// We then give the `callback` function pointer to Rust which will call the
|
|
4419
|
+
// lambda sometime in the future.
|
|
4420
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8 {
|
|
4421
|
+
using namespace facebook;
|
|
4422
|
+
|
|
4241
4423
|
// We need to store a lambda in a global so we can call it from
|
|
4242
4424
|
// a function pointer. The function pointer is passed to Rust.
|
|
4243
4425
|
static std::function<void(uint64_t, RustBuffer, uint32_t, uint64_t,
|
|
@@ -4286,7 +4468,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4286
4468
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4287
4469
|
uniffiResult);
|
|
4288
4470
|
} catch (const jsi::JSError &error) {
|
|
4289
|
-
std::cout << "Error in callback
|
|
4471
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod8: "
|
|
4290
4472
|
<< error.what() << std::endl;
|
|
4291
4473
|
throw error;
|
|
4292
4474
|
}
|
|
@@ -4316,8 +4498,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4316
4498
|
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4317
4499
|
}
|
|
4318
4500
|
|
|
4319
|
-
static
|
|
4320
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4501
|
+
static UniffiCallbackInterfaceStorageMethod8
|
|
4502
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8
|
|
4321
4503
|
jsi::Runtime &rt,
|
|
4322
4504
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4323
4505
|
const jsi::Value &value) {
|
|
@@ -4365,12 +4547,12 @@ static void cleanup() {
|
|
|
4365
4547
|
// out, then the pointer will no longer be left dangling.
|
|
4366
4548
|
rsLambda = nullptr;
|
|
4367
4549
|
}
|
|
4368
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4550
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8
|
|
4369
4551
|
// Implementation of callback function calling from Rust to JS
|
|
4370
|
-
//
|
|
4552
|
+
// CallbackInterfaceStorageMethod9
|
|
4371
4553
|
|
|
4372
4554
|
// Callback function:
|
|
4373
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4555
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9::UniffiCallbackInterfaceStorageMethod9
|
|
4374
4556
|
//
|
|
4375
4557
|
// We have the following constraints:
|
|
4376
4558
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4383,7 +4565,7 @@ static void cleanup() {
|
|
|
4383
4565
|
//
|
|
4384
4566
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4385
4567
|
// lambda sometime in the future.
|
|
4386
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4568
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9 {
|
|
4387
4569
|
using namespace facebook;
|
|
4388
4570
|
|
|
4389
4571
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4430,7 +4612,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4430
4612
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4431
4613
|
uniffiResult);
|
|
4432
4614
|
} catch (const jsi::JSError &error) {
|
|
4433
|
-
std::cout << "Error in callback
|
|
4615
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod9: "
|
|
4434
4616
|
<< error.what() << std::endl;
|
|
4435
4617
|
throw error;
|
|
4436
4618
|
}
|
|
@@ -4460,8 +4642,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4460
4642
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4461
4643
|
}
|
|
4462
4644
|
|
|
4463
|
-
static
|
|
4464
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4645
|
+
static UniffiCallbackInterfaceStorageMethod9
|
|
4646
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9
|
|
4465
4647
|
jsi::Runtime &rt,
|
|
4466
4648
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4467
4649
|
const jsi::Value &value) {
|
|
@@ -4508,12 +4690,12 @@ static void cleanup() {
|
|
|
4508
4690
|
// out, then the pointer will no longer be left dangling.
|
|
4509
4691
|
rsLambda = nullptr;
|
|
4510
4692
|
}
|
|
4511
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4693
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9
|
|
4512
4694
|
// Implementation of callback function calling from Rust to JS
|
|
4513
|
-
//
|
|
4695
|
+
// CallbackInterfaceStorageMethod10
|
|
4514
4696
|
|
|
4515
4697
|
// Callback function:
|
|
4516
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4698
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10::UniffiCallbackInterfaceStorageMethod10
|
|
4517
4699
|
//
|
|
4518
4700
|
// We have the following constraints:
|
|
4519
4701
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4526,7 +4708,7 @@ static void cleanup() {
|
|
|
4526
4708
|
//
|
|
4527
4709
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4528
4710
|
// lambda sometime in the future.
|
|
4529
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4711
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10 {
|
|
4530
4712
|
using namespace facebook;
|
|
4531
4713
|
|
|
4532
4714
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4569,7 +4751,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4569
4751
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4570
4752
|
uniffiResult);
|
|
4571
4753
|
} catch (const jsi::JSError &error) {
|
|
4572
|
-
std::cout << "Error in callback
|
|
4754
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod10: "
|
|
4573
4755
|
<< error.what() << std::endl;
|
|
4574
4756
|
throw error;
|
|
4575
4757
|
}
|
|
@@ -4599,8 +4781,8 @@ callback(uint64_t rs_uniffiHandle,
|
|
|
4599
4781
|
rs_uniffiOutReturn);
|
|
4600
4782
|
}
|
|
4601
4783
|
|
|
4602
|
-
static
|
|
4603
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4784
|
+
static UniffiCallbackInterfaceStorageMethod10
|
|
4785
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10
|
|
4604
4786
|
jsi::Runtime &rt,
|
|
4605
4787
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4606
4788
|
const jsi::Value &value) {
|
|
@@ -4646,12 +4828,12 @@ static void cleanup() {
|
|
|
4646
4828
|
// out, then the pointer will no longer be left dangling.
|
|
4647
4829
|
rsLambda = nullptr;
|
|
4648
4830
|
}
|
|
4649
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4831
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10
|
|
4650
4832
|
// Implementation of callback function calling from Rust to JS
|
|
4651
|
-
//
|
|
4833
|
+
// CallbackInterfaceStorageMethod11
|
|
4652
4834
|
|
|
4653
4835
|
// Callback function:
|
|
4654
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4836
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11::UniffiCallbackInterfaceStorageMethod11
|
|
4655
4837
|
//
|
|
4656
4838
|
// We have the following constraints:
|
|
4657
4839
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4664,7 +4846,7 @@ static void cleanup() {
|
|
|
4664
4846
|
//
|
|
4665
4847
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4666
4848
|
// lambda sometime in the future.
|
|
4667
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4849
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11 {
|
|
4668
4850
|
using namespace facebook;
|
|
4669
4851
|
|
|
4670
4852
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4715,7 +4897,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4715
4897
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4716
4898
|
uniffiResult);
|
|
4717
4899
|
} catch (const jsi::JSError &error) {
|
|
4718
|
-
std::cout << "Error in callback
|
|
4900
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod11: "
|
|
4719
4901
|
<< error.what() << std::endl;
|
|
4720
4902
|
throw error;
|
|
4721
4903
|
}
|
|
@@ -4745,8 +4927,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4745
4927
|
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4746
4928
|
}
|
|
4747
4929
|
|
|
4748
|
-
static
|
|
4749
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4930
|
+
static UniffiCallbackInterfaceStorageMethod11
|
|
4931
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11
|
|
4750
4932
|
jsi::Runtime &rt,
|
|
4751
4933
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4752
4934
|
const jsi::Value &value) {
|
|
@@ -4794,7 +4976,7 @@ static void cleanup() {
|
|
|
4794
4976
|
// out, then the pointer will no longer be left dangling.
|
|
4795
4977
|
rsLambda = nullptr;
|
|
4796
4978
|
}
|
|
4797
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4979
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11
|
|
4798
4980
|
namespace uniffi::breez_sdk_spark {
|
|
4799
4981
|
using namespace facebook;
|
|
4800
4982
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
@@ -4950,17 +5132,20 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceStorage> {
|
|
|
4950
5132
|
rsObject.get_payment_by_id = uniffi::breez_sdk_spark::cb::
|
|
4951
5133
|
callbackinterfacestoragemethod6::makeCallbackFunction(
|
|
4952
5134
|
rt, callInvoker, jsObject.getProperty(rt, "getPaymentById"));
|
|
4953
|
-
rsObject.
|
|
5135
|
+
rsObject.get_payment_by_invoice = uniffi::breez_sdk_spark::cb::
|
|
4954
5136
|
callbackinterfacestoragemethod7::makeCallbackFunction(
|
|
5137
|
+
rt, callInvoker, jsObject.getProperty(rt, "getPaymentByInvoice"));
|
|
5138
|
+
rsObject.add_deposit = uniffi::breez_sdk_spark::cb::
|
|
5139
|
+
callbackinterfacestoragemethod8::makeCallbackFunction(
|
|
4955
5140
|
rt, callInvoker, jsObject.getProperty(rt, "addDeposit"));
|
|
4956
5141
|
rsObject.delete_deposit = uniffi::breez_sdk_spark::cb::
|
|
4957
|
-
|
|
5142
|
+
callbackinterfacestoragemethod9::makeCallbackFunction(
|
|
4958
5143
|
rt, callInvoker, jsObject.getProperty(rt, "deleteDeposit"));
|
|
4959
5144
|
rsObject.list_deposits = uniffi::breez_sdk_spark::cb::
|
|
4960
|
-
|
|
5145
|
+
callbackinterfacestoragemethod10::makeCallbackFunction(
|
|
4961
5146
|
rt, callInvoker, jsObject.getProperty(rt, "listDeposits"));
|
|
4962
5147
|
rsObject.update_deposit = uniffi::breez_sdk_spark::cb::
|
|
4963
|
-
|
|
5148
|
+
callbackinterfacestoragemethod11::makeCallbackFunction(
|
|
4964
5149
|
rt, callInvoker, jsObject.getProperty(rt, "updateDeposit"));
|
|
4965
5150
|
rsObject.uniffi_free =
|
|
4966
5151
|
uniffi::breez_sdk_spark::st::vtablecallbackinterfacestorage::
|
|
@@ -5382,6 +5567,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5382
5567
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
|
|
5383
5568
|
rt, thisVal, args, count);
|
|
5384
5569
|
});
|
|
5570
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address"] =
|
|
5571
|
+
jsi::Function::createFromHostFunction(
|
|
5572
|
+
rt,
|
|
5573
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5574
|
+
"breezsdk_send_bitcoin_address"),
|
|
5575
|
+
4,
|
|
5576
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5577
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5578
|
+
return this
|
|
5579
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address(
|
|
5580
|
+
rt, thisVal, args, count);
|
|
5581
|
+
});
|
|
5582
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice"] =
|
|
5583
|
+
jsi::Function::createFromHostFunction(
|
|
5584
|
+
rt,
|
|
5585
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5586
|
+
"breezsdk_send_bolt11_invoice"),
|
|
5587
|
+
5,
|
|
5588
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5589
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5590
|
+
return this
|
|
5591
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice(
|
|
5592
|
+
rt, thisVal, args, count);
|
|
5593
|
+
});
|
|
5385
5594
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment"] =
|
|
5386
5595
|
jsi::Function::createFromHostFunction(
|
|
5387
5596
|
rt,
|
|
@@ -5407,6 +5616,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5407
5616
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
|
|
5408
5617
|
rt, thisVal, args, count);
|
|
5409
5618
|
});
|
|
5619
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address"] =
|
|
5620
|
+
jsi::Function::createFromHostFunction(
|
|
5621
|
+
rt,
|
|
5622
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5623
|
+
"breezsdk_send_spark_address"),
|
|
5624
|
+
3,
|
|
5625
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5626
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5627
|
+
return this
|
|
5628
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address(
|
|
5629
|
+
rt, thisVal, args, count);
|
|
5630
|
+
});
|
|
5410
5631
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet"] =
|
|
5411
5632
|
jsi::Function::createFromHostFunction(
|
|
5412
5633
|
rt,
|
|
@@ -5419,6 +5640,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5419
5640
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
5420
5641
|
rt, thisVal, args, count);
|
|
5421
5642
|
});
|
|
5643
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment"] =
|
|
5644
|
+
jsi::Function::createFromHostFunction(
|
|
5645
|
+
rt,
|
|
5646
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5647
|
+
"breezsdk_wait_for_payment"),
|
|
5648
|
+
2,
|
|
5649
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5650
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5651
|
+
return this
|
|
5652
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
|
|
5653
|
+
rt, thisVal, args, count);
|
|
5654
|
+
});
|
|
5422
5655
|
props["ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder"] =
|
|
5423
5656
|
jsi::Function::createFromHostFunction(
|
|
5424
5657
|
rt,
|
|
@@ -5635,6 +5868,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5635
5868
|
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(
|
|
5636
5869
|
rt, thisVal, args, count);
|
|
5637
5870
|
});
|
|
5871
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_"
|
|
5872
|
+
"invoice"] = jsi::Function::createFromHostFunction(
|
|
5873
|
+
rt,
|
|
5874
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5875
|
+
"storage_get_payment_by_invoice"),
|
|
5876
|
+
2,
|
|
5877
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5878
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5879
|
+
return this
|
|
5880
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
5881
|
+
rt, thisVal, args, count);
|
|
5882
|
+
});
|
|
5638
5883
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_deposit"] =
|
|
5639
5884
|
jsi::Function::createFromHostFunction(
|
|
5640
5885
|
rt,
|
|
@@ -6681,6 +6926,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6681
6926
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener(
|
|
6682
6927
|
rt, thisVal, args, count);
|
|
6683
6928
|
});
|
|
6929
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_"
|
|
6930
|
+
"address"] = jsi::Function::createFromHostFunction(
|
|
6931
|
+
rt,
|
|
6932
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
6933
|
+
"method_breezsdk_send_bitcoin_address"),
|
|
6934
|
+
0,
|
|
6935
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6936
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6937
|
+
return this
|
|
6938
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_address(
|
|
6939
|
+
rt, thisVal, args, count);
|
|
6940
|
+
});
|
|
6941
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_"
|
|
6942
|
+
"invoice"] = jsi::Function::createFromHostFunction(
|
|
6943
|
+
rt,
|
|
6944
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
6945
|
+
"method_breezsdk_send_bolt11_invoice"),
|
|
6946
|
+
0,
|
|
6947
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6948
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6949
|
+
return this
|
|
6950
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_invoice(
|
|
6951
|
+
rt, thisVal, args, count);
|
|
6952
|
+
});
|
|
6684
6953
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment"] =
|
|
6685
6954
|
jsi::Function::createFromHostFunction(
|
|
6686
6955
|
rt,
|
|
@@ -6705,6 +6974,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6705
6974
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal(
|
|
6706
6975
|
rt, thisVal, args, count);
|
|
6707
6976
|
});
|
|
6977
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_"
|
|
6978
|
+
"address"] = jsi::Function::createFromHostFunction(
|
|
6979
|
+
rt,
|
|
6980
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
6981
|
+
"method_breezsdk_send_spark_address"),
|
|
6982
|
+
0,
|
|
6983
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6984
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6985
|
+
return this
|
|
6986
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address(
|
|
6987
|
+
rt, thisVal, args, count);
|
|
6988
|
+
});
|
|
6708
6989
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet"] =
|
|
6709
6990
|
jsi::Function::createFromHostFunction(
|
|
6710
6991
|
rt,
|
|
@@ -6717,6 +6998,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6717
6998
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
|
|
6718
6999
|
rt, thisVal, args, count);
|
|
6719
7000
|
});
|
|
7001
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_"
|
|
7002
|
+
"payment"] = jsi::Function::createFromHostFunction(
|
|
7003
|
+
rt,
|
|
7004
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
7005
|
+
"method_breezsdk_wait_for_payment"),
|
|
7006
|
+
0,
|
|
7007
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
7008
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
7009
|
+
return this
|
|
7010
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(
|
|
7011
|
+
rt, thisVal, args, count);
|
|
7012
|
+
});
|
|
6720
7013
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build"] =
|
|
6721
7014
|
jsi::Function::createFromHostFunction(
|
|
6722
7015
|
rt,
|
|
@@ -6875,6 +7168,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6875
7168
|
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id(
|
|
6876
7169
|
rt, thisVal, args, count);
|
|
6877
7170
|
});
|
|
7171
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_"
|
|
7172
|
+
"invoice"] = jsi::Function::createFromHostFunction(
|
|
7173
|
+
rt,
|
|
7174
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
7175
|
+
"method_storage_get_payment_by_invoice"),
|
|
7176
|
+
0,
|
|
7177
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
7178
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
7179
|
+
return this
|
|
7180
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice(
|
|
7181
|
+
rt, thisVal, args, count);
|
|
7182
|
+
});
|
|
6878
7183
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit"] =
|
|
6879
7184
|
jsi::Function::createFromHostFunction(
|
|
6880
7185
|
rt,
|
|
@@ -7156,6 +7461,8 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
|
|
|
7156
7461
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9::cleanup();
|
|
7157
7462
|
// Cleanup for callback function CallbackInterfaceStorageMethod10
|
|
7158
7463
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10::cleanup();
|
|
7464
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod11
|
|
7465
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11::cleanup();
|
|
7159
7466
|
}
|
|
7160
7467
|
|
|
7161
7468
|
// Utility functions for serialization/deserialization of strings.
|
|
@@ -7351,17 +7658,12 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7351
7658
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(
|
|
7352
7659
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7353
7660
|
size_t count) {
|
|
7354
|
-
RustCallStatus status =
|
|
7355
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
7356
7661
|
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(
|
|
7357
7662
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7358
|
-
uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[1])
|
|
7359
|
-
&status);
|
|
7360
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
7361
|
-
rt, callInvoker, status, args[count - 1]);
|
|
7663
|
+
uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[1]));
|
|
7362
7664
|
|
|
7363
|
-
return
|
|
7364
|
-
|
|
7665
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7666
|
+
value);
|
|
7365
7667
|
}
|
|
7366
7668
|
jsi::Value NativeBreezSdkSpark::
|
|
7367
7669
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_check_lightning_address_available(
|
|
@@ -7403,14 +7705,11 @@ jsi::Value
|
|
|
7403
7705
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7404
7706
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7405
7707
|
size_t count) {
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7409
|
-
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
|
|
7410
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
7411
|
-
rt, callInvoker, status, args[count - 1]);
|
|
7708
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7709
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
|
|
7412
7710
|
|
|
7413
|
-
return
|
|
7711
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7712
|
+
value);
|
|
7414
7713
|
}
|
|
7415
7714
|
jsi::Value
|
|
7416
7715
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_info(
|
|
@@ -7597,17 +7896,46 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7597
7896
|
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
|
|
7598
7897
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7599
7898
|
size_t count) {
|
|
7600
|
-
RustCallStatus status =
|
|
7601
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
7602
7899
|
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
|
|
7900
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7901
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7902
|
+
args[1]));
|
|
7903
|
+
|
|
7904
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7905
|
+
value);
|
|
7906
|
+
}
|
|
7907
|
+
jsi::Value NativeBreezSdkSpark::
|
|
7908
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address(
|
|
7909
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7910
|
+
size_t count) {
|
|
7911
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address(
|
|
7603
7912
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7604
7913
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7605
7914
|
args[1]),
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
rt, callInvoker,
|
|
7915
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7916
|
+
args[2]),
|
|
7917
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7918
|
+
args[3]));
|
|
7609
7919
|
|
|
7610
|
-
return uniffi_jsi::Bridging
|
|
7920
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7921
|
+
value);
|
|
7922
|
+
}
|
|
7923
|
+
jsi::Value NativeBreezSdkSpark::
|
|
7924
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice(
|
|
7925
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7926
|
+
size_t count) {
|
|
7927
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice(
|
|
7928
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7929
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7930
|
+
args[1]),
|
|
7931
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7932
|
+
args[2]),
|
|
7933
|
+
uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[3]),
|
|
7934
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7935
|
+
args[4]));
|
|
7936
|
+
|
|
7937
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7938
|
+
value);
|
|
7611
7939
|
}
|
|
7612
7940
|
jsi::Value
|
|
7613
7941
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(
|
|
@@ -7634,22 +7962,43 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7634
7962
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7635
7963
|
value);
|
|
7636
7964
|
}
|
|
7965
|
+
jsi::Value NativeBreezSdkSpark::
|
|
7966
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address(
|
|
7967
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7968
|
+
size_t count) {
|
|
7969
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address(
|
|
7970
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7971
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7972
|
+
args[1]),
|
|
7973
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7974
|
+
args[2]));
|
|
7975
|
+
|
|
7976
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7977
|
+
value);
|
|
7978
|
+
}
|
|
7637
7979
|
jsi::Value
|
|
7638
7980
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
7639
7981
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7640
7982
|
size_t count) {
|
|
7641
|
-
RustCallStatus status =
|
|
7642
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
7643
7983
|
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
7644
7984
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7645
7985
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7646
|
-
args[1])
|
|
7647
|
-
&status);
|
|
7648
|
-
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
7649
|
-
rt, callInvoker, status, args[count - 1]);
|
|
7986
|
+
args[1]));
|
|
7650
7987
|
|
|
7651
|
-
return
|
|
7652
|
-
|
|
7988
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7989
|
+
value);
|
|
7990
|
+
}
|
|
7991
|
+
jsi::Value NativeBreezSdkSpark::
|
|
7992
|
+
cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
|
|
7993
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7994
|
+
size_t count) {
|
|
7995
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
|
|
7996
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7997
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7998
|
+
args[1]));
|
|
7999
|
+
|
|
8000
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
8001
|
+
value);
|
|
7653
8002
|
}
|
|
7654
8003
|
jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_sdkbuilder(
|
|
7655
8004
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -7879,6 +8228,18 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7879
8228
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7880
8229
|
value);
|
|
7881
8230
|
}
|
|
8231
|
+
jsi::Value NativeBreezSdkSpark::
|
|
8232
|
+
cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
8233
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8234
|
+
size_t count) {
|
|
8235
|
+
auto value = uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
8236
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
8237
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
8238
|
+
args[1]));
|
|
8239
|
+
|
|
8240
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
8241
|
+
value);
|
|
8242
|
+
}
|
|
7882
8243
|
jsi::Value
|
|
7883
8244
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
7884
8245
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8873,6 +9234,24 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8873
9234
|
|
|
8874
9235
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8875
9236
|
}
|
|
9237
|
+
jsi::Value NativeBreezSdkSpark::
|
|
9238
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_address(
|
|
9239
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
9240
|
+
size_t count) {
|
|
9241
|
+
auto value =
|
|
9242
|
+
uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_address();
|
|
9243
|
+
|
|
9244
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9245
|
+
}
|
|
9246
|
+
jsi::Value NativeBreezSdkSpark::
|
|
9247
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_invoice(
|
|
9248
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
9249
|
+
size_t count) {
|
|
9250
|
+
auto value =
|
|
9251
|
+
uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_invoice();
|
|
9252
|
+
|
|
9253
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9254
|
+
}
|
|
8876
9255
|
jsi::Value NativeBreezSdkSpark::
|
|
8877
9256
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment(
|
|
8878
9257
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8890,6 +9269,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8890
9269
|
|
|
8891
9270
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8892
9271
|
}
|
|
9272
|
+
jsi::Value NativeBreezSdkSpark::
|
|
9273
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address(
|
|
9274
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
9275
|
+
size_t count) {
|
|
9276
|
+
auto value =
|
|
9277
|
+
uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address();
|
|
9278
|
+
|
|
9279
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9280
|
+
}
|
|
8893
9281
|
jsi::Value NativeBreezSdkSpark::
|
|
8894
9282
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
|
|
8895
9283
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8898,6 +9286,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8898
9286
|
|
|
8899
9287
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8900
9288
|
}
|
|
9289
|
+
jsi::Value NativeBreezSdkSpark::
|
|
9290
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment(
|
|
9291
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
9292
|
+
size_t count) {
|
|
9293
|
+
auto value =
|
|
9294
|
+
uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment();
|
|
9295
|
+
|
|
9296
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9297
|
+
}
|
|
8901
9298
|
jsi::Value NativeBreezSdkSpark::
|
|
8902
9299
|
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build(
|
|
8903
9300
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -9009,6 +9406,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
9009
9406
|
|
|
9010
9407
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9011
9408
|
}
|
|
9409
|
+
jsi::Value NativeBreezSdkSpark::
|
|
9410
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice(
|
|
9411
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
9412
|
+
size_t count) {
|
|
9413
|
+
auto value =
|
|
9414
|
+
uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice();
|
|
9415
|
+
|
|
9416
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9417
|
+
}
|
|
9012
9418
|
jsi::Value NativeBreezSdkSpark::
|
|
9013
9419
|
cpp_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit(
|
|
9014
9420
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|