@breeztech/breez-sdk-spark-react-native 0.2.5-dev2 → 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 +452 -45
- 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 +338 -12
- 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 +337 -11
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +21 -9
- 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 +196 -2
- 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 +21 -9
- 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 +196 -2
- 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 +47 -10
- package/src/generated/breez_sdk_spark.ts +661 -23
|
@@ -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);
|
|
@@ -277,14 +282,27 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_register_lightning_address(
|
|
|
277
282
|
uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(void *ptr,
|
|
278
283
|
RustBuffer id);
|
|
279
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);
|
|
291
|
+
/*handle*/ uint64_t
|
|
280
292
|
uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(void *ptr,
|
|
281
293
|
RustBuffer request);
|
|
282
294
|
/*handle*/ uint64_t
|
|
283
295
|
uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
|
|
284
296
|
void *ptr, RustBuffer request, int8_t suppress_payment_event);
|
|
285
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
|
|
286
301
|
uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(void *ptr,
|
|
287
302
|
RustBuffer request);
|
|
303
|
+
/*handle*/ uint64_t
|
|
304
|
+
uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(void *ptr,
|
|
305
|
+
RustBuffer request);
|
|
288
306
|
void *
|
|
289
307
|
uniffi_breez_sdk_spark_fn_clone_sdkbuilder(void *ptr,
|
|
290
308
|
RustCallStatus *uniffi_out_err);
|
|
@@ -335,6 +353,9 @@ uniffi_breez_sdk_spark_fn_method_storage_set_payment_metadata(
|
|
|
335
353
|
/*handle*/ uint64_t
|
|
336
354
|
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(void *ptr,
|
|
337
355
|
RustBuffer id);
|
|
356
|
+
/*handle*/ uint64_t
|
|
357
|
+
uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
|
|
358
|
+
void *ptr, RustBuffer invoice);
|
|
338
359
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
339
360
|
void *ptr, RustBuffer txid, uint32_t vout, uint64_t amount_sats);
|
|
340
361
|
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_delete_deposit(
|
|
@@ -527,10 +548,14 @@ uint16_t
|
|
|
527
548
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address();
|
|
528
549
|
uint16_t
|
|
529
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();
|
|
530
553
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment();
|
|
531
554
|
uint16_t
|
|
532
555
|
uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal();
|
|
556
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address();
|
|
533
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();
|
|
534
559
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build();
|
|
535
560
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service();
|
|
536
561
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service();
|
|
@@ -545,6 +570,8 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_payments();
|
|
|
545
570
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_insert_payment();
|
|
546
571
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_payment_metadata();
|
|
547
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();
|
|
548
575
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_deposit();
|
|
549
576
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit();
|
|
550
577
|
uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_deposits();
|
|
@@ -4251,6 +4278,148 @@ static void cleanup() {
|
|
|
4251
4278
|
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod7 {
|
|
4252
4279
|
using namespace facebook;
|
|
4253
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
|
+
|
|
4254
4423
|
// We need to store a lambda in a global so we can call it from
|
|
4255
4424
|
// a function pointer. The function pointer is passed to Rust.
|
|
4256
4425
|
static std::function<void(uint64_t, RustBuffer, uint32_t, uint64_t,
|
|
@@ -4299,7 +4468,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4299
4468
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4300
4469
|
uniffiResult);
|
|
4301
4470
|
} catch (const jsi::JSError &error) {
|
|
4302
|
-
std::cout << "Error in callback
|
|
4471
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod8: "
|
|
4303
4472
|
<< error.what() << std::endl;
|
|
4304
4473
|
throw error;
|
|
4305
4474
|
}
|
|
@@ -4329,8 +4498,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4329
4498
|
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4330
4499
|
}
|
|
4331
4500
|
|
|
4332
|
-
static
|
|
4333
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4501
|
+
static UniffiCallbackInterfaceStorageMethod8
|
|
4502
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8
|
|
4334
4503
|
jsi::Runtime &rt,
|
|
4335
4504
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4336
4505
|
const jsi::Value &value) {
|
|
@@ -4378,12 +4547,12 @@ static void cleanup() {
|
|
|
4378
4547
|
// out, then the pointer will no longer be left dangling.
|
|
4379
4548
|
rsLambda = nullptr;
|
|
4380
4549
|
}
|
|
4381
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4550
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod8
|
|
4382
4551
|
// Implementation of callback function calling from Rust to JS
|
|
4383
|
-
//
|
|
4552
|
+
// CallbackInterfaceStorageMethod9
|
|
4384
4553
|
|
|
4385
4554
|
// Callback function:
|
|
4386
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4555
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9::UniffiCallbackInterfaceStorageMethod9
|
|
4387
4556
|
//
|
|
4388
4557
|
// We have the following constraints:
|
|
4389
4558
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4396,7 +4565,7 @@ static void cleanup() {
|
|
|
4396
4565
|
//
|
|
4397
4566
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4398
4567
|
// lambda sometime in the future.
|
|
4399
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4568
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9 {
|
|
4400
4569
|
using namespace facebook;
|
|
4401
4570
|
|
|
4402
4571
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4443,7 +4612,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4443
4612
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4444
4613
|
uniffiResult);
|
|
4445
4614
|
} catch (const jsi::JSError &error) {
|
|
4446
|
-
std::cout << "Error in callback
|
|
4615
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod9: "
|
|
4447
4616
|
<< error.what() << std::endl;
|
|
4448
4617
|
throw error;
|
|
4449
4618
|
}
|
|
@@ -4473,8 +4642,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4473
4642
|
rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4474
4643
|
}
|
|
4475
4644
|
|
|
4476
|
-
static
|
|
4477
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4645
|
+
static UniffiCallbackInterfaceStorageMethod9
|
|
4646
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9
|
|
4478
4647
|
jsi::Runtime &rt,
|
|
4479
4648
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4480
4649
|
const jsi::Value &value) {
|
|
@@ -4521,12 +4690,12 @@ static void cleanup() {
|
|
|
4521
4690
|
// out, then the pointer will no longer be left dangling.
|
|
4522
4691
|
rsLambda = nullptr;
|
|
4523
4692
|
}
|
|
4524
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4693
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9
|
|
4525
4694
|
// Implementation of callback function calling from Rust to JS
|
|
4526
|
-
//
|
|
4695
|
+
// CallbackInterfaceStorageMethod10
|
|
4527
4696
|
|
|
4528
4697
|
// Callback function:
|
|
4529
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4698
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10::UniffiCallbackInterfaceStorageMethod10
|
|
4530
4699
|
//
|
|
4531
4700
|
// We have the following constraints:
|
|
4532
4701
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4539,7 +4708,7 @@ static void cleanup() {
|
|
|
4539
4708
|
//
|
|
4540
4709
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4541
4710
|
// lambda sometime in the future.
|
|
4542
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4711
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10 {
|
|
4543
4712
|
using namespace facebook;
|
|
4544
4713
|
|
|
4545
4714
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4582,7 +4751,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4582
4751
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4583
4752
|
uniffiResult);
|
|
4584
4753
|
} catch (const jsi::JSError &error) {
|
|
4585
|
-
std::cout << "Error in callback
|
|
4754
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod10: "
|
|
4586
4755
|
<< error.what() << std::endl;
|
|
4587
4756
|
throw error;
|
|
4588
4757
|
}
|
|
@@ -4612,8 +4781,8 @@ callback(uint64_t rs_uniffiHandle,
|
|
|
4612
4781
|
rs_uniffiOutReturn);
|
|
4613
4782
|
}
|
|
4614
4783
|
|
|
4615
|
-
static
|
|
4616
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4784
|
+
static UniffiCallbackInterfaceStorageMethod10
|
|
4785
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10
|
|
4617
4786
|
jsi::Runtime &rt,
|
|
4618
4787
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4619
4788
|
const jsi::Value &value) {
|
|
@@ -4659,12 +4828,12 @@ static void cleanup() {
|
|
|
4659
4828
|
// out, then the pointer will no longer be left dangling.
|
|
4660
4829
|
rsLambda = nullptr;
|
|
4661
4830
|
}
|
|
4662
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4831
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10
|
|
4663
4832
|
// Implementation of callback function calling from Rust to JS
|
|
4664
|
-
//
|
|
4833
|
+
// CallbackInterfaceStorageMethod11
|
|
4665
4834
|
|
|
4666
4835
|
// Callback function:
|
|
4667
|
-
// uniffi::breez_sdk_spark::cb::
|
|
4836
|
+
// uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11::UniffiCallbackInterfaceStorageMethod11
|
|
4668
4837
|
//
|
|
4669
4838
|
// We have the following constraints:
|
|
4670
4839
|
// - we need to pass a function pointer to Rust.
|
|
@@ -4677,7 +4846,7 @@ static void cleanup() {
|
|
|
4677
4846
|
//
|
|
4678
4847
|
// We then give the `callback` function pointer to Rust which will call the
|
|
4679
4848
|
// lambda sometime in the future.
|
|
4680
|
-
namespace uniffi::breez_sdk_spark::cb::
|
|
4849
|
+
namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11 {
|
|
4681
4850
|
using namespace facebook;
|
|
4682
4851
|
|
|
4683
4852
|
// We need to store a lambda in a global so we can call it from
|
|
@@ -4728,7 +4897,7 @@ static void body(jsi::Runtime &rt,
|
|
|
4728
4897
|
ReferenceHolder<UniffiForeignFuture>>::fromJs(rt, callInvoker,
|
|
4729
4898
|
uniffiResult);
|
|
4730
4899
|
} catch (const jsi::JSError &error) {
|
|
4731
|
-
std::cout << "Error in callback
|
|
4900
|
+
std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod11: "
|
|
4732
4901
|
<< error.what() << std::endl;
|
|
4733
4902
|
throw error;
|
|
4734
4903
|
}
|
|
@@ -4758,8 +4927,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_txid,
|
|
|
4758
4927
|
rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
|
|
4759
4928
|
}
|
|
4760
4929
|
|
|
4761
|
-
static
|
|
4762
|
-
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::
|
|
4930
|
+
static UniffiCallbackInterfaceStorageMethod11
|
|
4931
|
+
makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11
|
|
4763
4932
|
jsi::Runtime &rt,
|
|
4764
4933
|
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
4765
4934
|
const jsi::Value &value) {
|
|
@@ -4807,7 +4976,7 @@ static void cleanup() {
|
|
|
4807
4976
|
// out, then the pointer will no longer be left dangling.
|
|
4808
4977
|
rsLambda = nullptr;
|
|
4809
4978
|
}
|
|
4810
|
-
} // namespace uniffi::breez_sdk_spark::cb::
|
|
4979
|
+
} // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11
|
|
4811
4980
|
namespace uniffi::breez_sdk_spark {
|
|
4812
4981
|
using namespace facebook;
|
|
4813
4982
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
@@ -4963,17 +5132,20 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceStorage> {
|
|
|
4963
5132
|
rsObject.get_payment_by_id = uniffi::breez_sdk_spark::cb::
|
|
4964
5133
|
callbackinterfacestoragemethod6::makeCallbackFunction(
|
|
4965
5134
|
rt, callInvoker, jsObject.getProperty(rt, "getPaymentById"));
|
|
4966
|
-
rsObject.
|
|
5135
|
+
rsObject.get_payment_by_invoice = uniffi::breez_sdk_spark::cb::
|
|
4967
5136
|
callbackinterfacestoragemethod7::makeCallbackFunction(
|
|
5137
|
+
rt, callInvoker, jsObject.getProperty(rt, "getPaymentByInvoice"));
|
|
5138
|
+
rsObject.add_deposit = uniffi::breez_sdk_spark::cb::
|
|
5139
|
+
callbackinterfacestoragemethod8::makeCallbackFunction(
|
|
4968
5140
|
rt, callInvoker, jsObject.getProperty(rt, "addDeposit"));
|
|
4969
5141
|
rsObject.delete_deposit = uniffi::breez_sdk_spark::cb::
|
|
4970
|
-
|
|
5142
|
+
callbackinterfacestoragemethod9::makeCallbackFunction(
|
|
4971
5143
|
rt, callInvoker, jsObject.getProperty(rt, "deleteDeposit"));
|
|
4972
5144
|
rsObject.list_deposits = uniffi::breez_sdk_spark::cb::
|
|
4973
|
-
|
|
5145
|
+
callbackinterfacestoragemethod10::makeCallbackFunction(
|
|
4974
5146
|
rt, callInvoker, jsObject.getProperty(rt, "listDeposits"));
|
|
4975
5147
|
rsObject.update_deposit = uniffi::breez_sdk_spark::cb::
|
|
4976
|
-
|
|
5148
|
+
callbackinterfacestoragemethod11::makeCallbackFunction(
|
|
4977
5149
|
rt, callInvoker, jsObject.getProperty(rt, "updateDeposit"));
|
|
4978
5150
|
rsObject.uniffi_free =
|
|
4979
5151
|
uniffi::breez_sdk_spark::st::vtablecallbackinterfacestorage::
|
|
@@ -5395,6 +5567,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5395
5567
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
|
|
5396
5568
|
rt, thisVal, args, count);
|
|
5397
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
|
+
});
|
|
5398
5594
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment"] =
|
|
5399
5595
|
jsi::Function::createFromHostFunction(
|
|
5400
5596
|
rt,
|
|
@@ -5420,6 +5616,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5420
5616
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
|
|
5421
5617
|
rt, thisVal, args, count);
|
|
5422
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
|
+
});
|
|
5423
5631
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet"] =
|
|
5424
5632
|
jsi::Function::createFromHostFunction(
|
|
5425
5633
|
rt,
|
|
@@ -5432,6 +5640,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5432
5640
|
->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
5433
5641
|
rt, thisVal, args, count);
|
|
5434
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
|
+
});
|
|
5435
5655
|
props["ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder"] =
|
|
5436
5656
|
jsi::Function::createFromHostFunction(
|
|
5437
5657
|
rt,
|
|
@@ -5648,6 +5868,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5648
5868
|
->cpp_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(
|
|
5649
5869
|
rt, thisVal, args, count);
|
|
5650
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
|
+
});
|
|
5651
5883
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_deposit"] =
|
|
5652
5884
|
jsi::Function::createFromHostFunction(
|
|
5653
5885
|
rt,
|
|
@@ -6694,6 +6926,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6694
6926
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener(
|
|
6695
6927
|
rt, thisVal, args, count);
|
|
6696
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
|
+
});
|
|
6697
6953
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment"] =
|
|
6698
6954
|
jsi::Function::createFromHostFunction(
|
|
6699
6955
|
rt,
|
|
@@ -6718,6 +6974,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6718
6974
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal(
|
|
6719
6975
|
rt, thisVal, args, count);
|
|
6720
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
|
+
});
|
|
6721
6989
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet"] =
|
|
6722
6990
|
jsi::Function::createFromHostFunction(
|
|
6723
6991
|
rt,
|
|
@@ -6730,6 +6998,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6730
6998
|
->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
|
|
6731
6999
|
rt, thisVal, args, count);
|
|
6732
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
|
+
});
|
|
6733
7013
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build"] =
|
|
6734
7014
|
jsi::Function::createFromHostFunction(
|
|
6735
7015
|
rt,
|
|
@@ -6888,6 +7168,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6888
7168
|
->cpp_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id(
|
|
6889
7169
|
rt, thisVal, args, count);
|
|
6890
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
|
+
});
|
|
6891
7183
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit"] =
|
|
6892
7184
|
jsi::Function::createFromHostFunction(
|
|
6893
7185
|
rt,
|
|
@@ -7169,6 +7461,8 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
|
|
|
7169
7461
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod9::cleanup();
|
|
7170
7462
|
// Cleanup for callback function CallbackInterfaceStorageMethod10
|
|
7171
7463
|
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod10::cleanup();
|
|
7464
|
+
// Cleanup for callback function CallbackInterfaceStorageMethod11
|
|
7465
|
+
uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod11::cleanup();
|
|
7172
7466
|
}
|
|
7173
7467
|
|
|
7174
7468
|
// Utility functions for serialization/deserialization of strings.
|
|
@@ -7411,14 +7705,11 @@ jsi::Value
|
|
|
7411
7705
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7412
7706
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7413
7707
|
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]);
|
|
7708
|
+
auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
|
|
7709
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
|
|
7420
7710
|
|
|
7421
|
-
return
|
|
7711
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7712
|
+
value);
|
|
7422
7713
|
}
|
|
7423
7714
|
jsi::Value
|
|
7424
7715
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_get_info(
|
|
@@ -7613,6 +7904,39 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7613
7904
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7614
7905
|
value);
|
|
7615
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(
|
|
7912
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7913
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7914
|
+
args[1]),
|
|
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]));
|
|
7919
|
+
|
|
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);
|
|
7939
|
+
}
|
|
7616
7940
|
jsi::Value
|
|
7617
7941
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(
|
|
7618
7942
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -7638,6 +7962,20 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7638
7962
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7639
7963
|
value);
|
|
7640
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
|
+
}
|
|
7641
7979
|
jsi::Value
|
|
7642
7980
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
7643
7981
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -7650,6 +7988,18 @@ NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
|
|
|
7650
7988
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7651
7989
|
value);
|
|
7652
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);
|
|
8002
|
+
}
|
|
7653
8003
|
jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_clone_sdkbuilder(
|
|
7654
8004
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7655
8005
|
size_t count) {
|
|
@@ -7878,6 +8228,18 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7878
8228
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7879
8229
|
value);
|
|
7880
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
|
+
}
|
|
7881
8243
|
jsi::Value
|
|
7882
8244
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
|
|
7883
8245
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8872,6 +9234,24 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8872
9234
|
|
|
8873
9235
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8874
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
|
+
}
|
|
8875
9255
|
jsi::Value NativeBreezSdkSpark::
|
|
8876
9256
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment(
|
|
8877
9257
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8889,6 +9269,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8889
9269
|
|
|
8890
9270
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8891
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
|
+
}
|
|
8892
9281
|
jsi::Value NativeBreezSdkSpark::
|
|
8893
9282
|
cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(
|
|
8894
9283
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8897,6 +9286,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8897
9286
|
|
|
8898
9287
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8899
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
|
+
}
|
|
8900
9298
|
jsi::Value NativeBreezSdkSpark::
|
|
8901
9299
|
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build(
|
|
8902
9300
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -9008,6 +9406,15 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
9008
9406
|
|
|
9009
9407
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
9010
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
|
+
}
|
|
9011
9418
|
jsi::Value NativeBreezSdkSpark::
|
|
9012
9419
|
cpp_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit(
|
|
9013
9420
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|