@breeztech/breez-sdk-spark-react-native 0.1.8-dev4 → 0.1.9-dev2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cpp/generated/breez_sdk_spark.cpp +64 -7
- package/cpp/generated/breez_sdk_spark.hpp +6 -0
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +123 -20
- 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 +122 -19
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +4 -2
- 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 +82 -6
- 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 +4 -2
- 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 +82 -6
- 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 +10 -2
- package/src/generated/breez_sdk_spark.ts +184 -37
|
@@ -240,7 +240,8 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits(
|
|
|
240
240
|
uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay(void *ptr,
|
|
241
241
|
RustBuffer request);
|
|
242
242
|
void uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(
|
|
243
|
-
void *ptr, RustBuffer
|
|
243
|
+
void *ptr, RustBuffer payment, RustBuffer ssp_id,
|
|
244
|
+
RustCallStatus *uniffi_out_err);
|
|
244
245
|
/*handle*/ uint64_t
|
|
245
246
|
uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(void *ptr,
|
|
246
247
|
RustBuffer request);
|
|
@@ -281,6 +282,8 @@ uniffi_breez_sdk_spark_fn_method_sdkbuilder_build(void *ptr);
|
|
|
281
282
|
/*handle*/ uint64_t
|
|
282
283
|
uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service(
|
|
283
284
|
void *ptr, void *chain_service);
|
|
285
|
+
/*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
|
|
286
|
+
void *ptr, RustBuffer key_set_type, int8_t use_address_index);
|
|
284
287
|
/*handle*/ uint64_t
|
|
285
288
|
uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
|
|
286
289
|
void *ptr, void *lnurl_client);
|
|
@@ -328,8 +331,9 @@ void uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
|
|
|
328
331
|
RustBuffer
|
|
329
332
|
uniffi_breez_sdk_spark_fn_func_default_config(RustBuffer network,
|
|
330
333
|
RustCallStatus *uniffi_out_err);
|
|
331
|
-
|
|
332
|
-
uniffi_breez_sdk_spark_fn_func_default_storage(RustBuffer data_dir
|
|
334
|
+
void *
|
|
335
|
+
uniffi_breez_sdk_spark_fn_func_default_storage(RustBuffer data_dir,
|
|
336
|
+
RustCallStatus *uniffi_out_err);
|
|
333
337
|
void uniffi_breez_sdk_spark_fn_func_init_logging(
|
|
334
338
|
RustBuffer log_dir, RustBuffer app_logger, RustBuffer log_filter,
|
|
335
339
|
RustCallStatus *uniffi_out_err);
|
|
@@ -505,6 +509,7 @@ uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal();
|
|
|
505
509
|
uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet();
|
|
506
510
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build();
|
|
507
511
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service();
|
|
512
|
+
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set();
|
|
508
513
|
uint16_t uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client();
|
|
509
514
|
uint16_t
|
|
510
515
|
uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service();
|
|
@@ -5077,7 +5082,7 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5077
5082
|
rt,
|
|
5078
5083
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
|
|
5079
5084
|
"breezsdk_poll_lightning_send_payment"),
|
|
5080
|
-
|
|
5085
|
+
3,
|
|
5081
5086
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5082
5087
|
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5083
5088
|
return this
|
|
@@ -5264,6 +5269,19 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
5264
5269
|
->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service(
|
|
5265
5270
|
rt, thisVal, args, count);
|
|
5266
5271
|
});
|
|
5272
|
+
props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set"] =
|
|
5273
|
+
jsi::Function::createFromHostFunction(
|
|
5274
|
+
rt,
|
|
5275
|
+
jsi::PropNameID::forAscii(
|
|
5276
|
+
rt,
|
|
5277
|
+
"ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set"),
|
|
5278
|
+
3,
|
|
5279
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
5280
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
5281
|
+
return this
|
|
5282
|
+
->cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
|
|
5283
|
+
rt, thisVal, args, count);
|
|
5284
|
+
});
|
|
5267
5285
|
props["ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client"] =
|
|
5268
5286
|
jsi::Function::createFromHostFunction(
|
|
5269
5287
|
rt,
|
|
@@ -6468,6 +6486,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
|
|
|
6468
6486
|
->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service(
|
|
6469
6487
|
rt, thisVal, args, count);
|
|
6470
6488
|
});
|
|
6489
|
+
props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set"] =
|
|
6490
|
+
jsi::Function::createFromHostFunction(
|
|
6491
|
+
rt,
|
|
6492
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
|
|
6493
|
+
"method_sdkbuilder_with_key_set"),
|
|
6494
|
+
0,
|
|
6495
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
6496
|
+
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
6497
|
+
return this
|
|
6498
|
+
->cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set(
|
|
6499
|
+
rt, thisVal, args, count);
|
|
6500
|
+
});
|
|
6471
6501
|
props["ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_"
|
|
6472
6502
|
"client"] = jsi::Function::createFromHostFunction(
|
|
6473
6503
|
rt,
|
|
@@ -7179,6 +7209,8 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7179
7209
|
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7180
7210
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7181
7211
|
args[1]),
|
|
7212
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7213
|
+
args[2]),
|
|
7182
7214
|
&status);
|
|
7183
7215
|
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
7184
7216
|
rt, callInvoker, status, args[count - 1]);
|
|
@@ -7377,6 +7409,19 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
7377
7409
|
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7378
7410
|
value);
|
|
7379
7411
|
}
|
|
7412
|
+
jsi::Value NativeBreezSdkSpark::
|
|
7413
|
+
cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
|
|
7414
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7415
|
+
size_t count) {
|
|
7416
|
+
auto value = uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
|
|
7417
|
+
uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
7418
|
+
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7419
|
+
args[1]),
|
|
7420
|
+
uniffi_jsi::Bridging<int8_t>::fromJs(rt, callInvoker, args[2]));
|
|
7421
|
+
|
|
7422
|
+
return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
|
|
7423
|
+
value);
|
|
7424
|
+
}
|
|
7380
7425
|
jsi::Value NativeBreezSdkSpark::
|
|
7381
7426
|
cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
|
|
7382
7427
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -7599,12 +7644,16 @@ jsi::Value
|
|
|
7599
7644
|
NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_default_storage(
|
|
7600
7645
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
7601
7646
|
size_t count) {
|
|
7647
|
+
RustCallStatus status =
|
|
7648
|
+
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
7602
7649
|
auto value = uniffi_breez_sdk_spark_fn_func_default_storage(
|
|
7603
7650
|
uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
7604
|
-
args[0])
|
|
7651
|
+
args[0]),
|
|
7652
|
+
&status);
|
|
7653
|
+
uniffi::breez_sdk_spark::Bridging<RustCallStatus>::copyIntoJs(
|
|
7654
|
+
rt, callInvoker, status, args[count - 1]);
|
|
7605
7655
|
|
|
7606
|
-
return uniffi_jsi::Bridging
|
|
7607
|
-
value);
|
|
7656
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
7608
7657
|
}
|
|
7609
7658
|
jsi::Value NativeBreezSdkSpark::cpp_uniffi_breez_sdk_spark_fn_func_init_logging(
|
|
7610
7659
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -8522,6 +8571,14 @@ jsi::Value NativeBreezSdkSpark::
|
|
|
8522
8571
|
|
|
8523
8572
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8524
8573
|
}
|
|
8574
|
+
jsi::Value NativeBreezSdkSpark::
|
|
8575
|
+
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set(
|
|
8576
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
8577
|
+
size_t count) {
|
|
8578
|
+
auto value = uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set();
|
|
8579
|
+
|
|
8580
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
8581
|
+
}
|
|
8525
8582
|
jsi::Value NativeBreezSdkSpark::
|
|
8526
8583
|
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client(
|
|
8527
8584
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -142,6 +142,9 @@ protected:
|
|
|
142
142
|
jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service(
|
|
143
143
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
144
144
|
size_t count);
|
|
145
|
+
jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
|
|
146
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
147
|
+
size_t count);
|
|
145
148
|
jsi::Value cpp_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
|
|
146
149
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
147
150
|
size_t count);
|
|
@@ -473,6 +476,9 @@ protected:
|
|
|
473
476
|
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service(
|
|
474
477
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
475
478
|
size_t count);
|
|
479
|
+
jsi::Value cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set(
|
|
480
|
+
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
481
|
+
size_t count);
|
|
476
482
|
jsi::Value
|
|
477
483
|
cpp_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client(
|
|
478
484
|
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AA0dA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAC3BL,MAAM,EAErB;AAkPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Utxo = exports.UpdateDepositPayload_Tags = exports.UpdateDepositPayload = exports.TxStatus = exports.SyncWalletResponse = exports.SyncWalletRequest = exports.StorageImpl = exports.StorageError_Tags = exports.StorageError = exports.SendPaymentResponse = exports.SendPaymentRequest = exports.SendPaymentOptions_Tags = exports.SendPaymentOptions = exports.SendPaymentMethod_Tags = exports.SendPaymentMethod = exports.SendOnchainSpeedFeeQuote = exports.SendOnchainFeeQuote = exports.SdkEvent_Tags = exports.SdkEvent = exports.SdkError_Tags = exports.SdkError = exports.SdkBuilder = exports.RegisterLightningAddressRequest = exports.RefundDepositResponse = exports.RefundDepositRequest = exports.ReceivePaymentResponse = exports.ReceivePaymentRequest = exports.ReceivePaymentMethod_Tags = exports.ReceivePaymentMethod = exports.PrepareSendPaymentResponse = exports.PrepareSendPaymentRequest = exports.PrepareLnurlPayResponse = exports.PrepareLnurlPayRequest = exports.PaymentType = exports.PaymentStatus = exports.PaymentMethod = exports.PaymentMetadata = exports.PaymentDetails_Tags = exports.PaymentDetails = exports.Payment = exports.OnchainConfirmationSpeed = exports.Network = exports.LogEntry = exports.LnurlPayResponse = exports.LnurlPayRequest = exports.LnurlPayInfo = exports.ListUnclaimedDepositsResponse = exports.ListUnclaimedDepositsRequest = exports.ListPaymentsResponse = exports.ListPaymentsRequest = exports.LightningAddressInfo = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.Fee_Tags = exports.Fee = exports.DepositInfo = exports.DepositClaimError_Tags = exports.DepositClaimError = exports.Credentials = exports.ConnectRequest = exports.Config = exports.ClaimDepositResponse = exports.ClaimDepositRequest = exports.CheckLightningAddressRequest = exports.ChainServiceError_Tags = exports.ChainServiceError = exports.BreezSdk = exports.BitcoinChainServiceImpl = void 0;
|
|
6
|
+
exports.Utxo = exports.UpdateDepositPayload_Tags = exports.UpdateDepositPayload = exports.TxStatus = exports.SyncWalletResponse = exports.SyncWalletRequest = exports.StorageImpl = exports.StorageError_Tags = exports.StorageError = exports.SendPaymentResponse = exports.SendPaymentRequest = exports.SendPaymentOptions_Tags = exports.SendPaymentOptions = exports.SendPaymentMethod_Tags = exports.SendPaymentMethod = exports.SendOnchainSpeedFeeQuote = exports.SendOnchainFeeQuote = exports.SdkEvent_Tags = exports.SdkEvent = exports.SdkError_Tags = exports.SdkError = exports.SdkBuilder = exports.RegisterLightningAddressRequest = exports.RefundDepositResponse = exports.RefundDepositRequest = exports.ReceivePaymentResponse = exports.ReceivePaymentRequest = exports.ReceivePaymentMethod_Tags = exports.ReceivePaymentMethod = exports.PrepareSendPaymentResponse = exports.PrepareSendPaymentRequest = exports.PrepareLnurlPayResponse = exports.PrepareLnurlPayRequest = exports.PaymentType = exports.PaymentStatus = exports.PaymentMethod = exports.PaymentMetadata = exports.PaymentDetails_Tags = exports.PaymentDetails = exports.Payment = exports.OnchainConfirmationSpeed = exports.Network = exports.LogEntry = exports.LnurlPayResponse = exports.LnurlPayRequest = exports.LnurlPayInfo = exports.ListUnclaimedDepositsResponse = exports.ListUnclaimedDepositsRequest = exports.ListPaymentsResponse = exports.ListPaymentsRequest = exports.LightningAddressInfo = exports.KeySetType = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.GetInfoResponse = exports.GetInfoRequest = exports.Fee_Tags = exports.Fee = exports.DepositInfo = exports.DepositClaimError_Tags = exports.DepositClaimError = exports.Credentials = exports.ConnectRequest = exports.Config = exports.ClaimDepositResponse = exports.ClaimDepositRequest = exports.CheckLightningAddressRequest = exports.ChainServiceError_Tags = exports.ChainServiceError = exports.BreezSdk = exports.BitcoinChainServiceImpl = void 0;
|
|
7
7
|
exports.connect = connect;
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
exports.defaultConfig = defaultConfig;
|
|
@@ -65,18 +65,10 @@ function defaultConfig(network) {
|
|
|
65
65
|
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_func_default_config(FfiConverterTypeNetwork.lower(network), callStatus);
|
|
66
66
|
}, /*liftString:*/FfiConverterString.lift));
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_func_default_storage(FfiConverterString.lower(dataDir));
|
|
73
|
-
}, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_pointer, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_pointer, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_pointer, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_pointer, /*liftFunc:*/FfiConverterTypeStorage.lift.bind(FfiConverterTypeStorage), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
74
|
-
} catch (__error) {
|
|
75
|
-
if (uniffiIsDebug && __error instanceof Error) {
|
|
76
|
-
__error.stack = __stack;
|
|
77
|
-
}
|
|
78
|
-
throw __error;
|
|
79
|
-
}
|
|
68
|
+
function defaultStorage(dataDir) /*throws*/{
|
|
69
|
+
return FfiConverterTypeStorage.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError), /*caller:*/callStatus => {
|
|
70
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_func_default_storage(FfiConverterString.lower(dataDir), callStatus);
|
|
71
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
80
72
|
}
|
|
81
73
|
function initLogging(logDir, appLogger, logFilter) /*throws*/{
|
|
82
74
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError), /*caller:*/callStatus => {
|
|
@@ -323,7 +315,8 @@ const FfiConverterTypeConfig = (() => {
|
|
|
323
315
|
network: FfiConverterTypeNetwork.read(from),
|
|
324
316
|
syncIntervalSecs: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
325
317
|
maxDepositClaimFee: FfiConverterOptionalTypeFee.read(from),
|
|
326
|
-
lnurlDomain: FfiConverterOptionalString.read(from)
|
|
318
|
+
lnurlDomain: FfiConverterOptionalString.read(from),
|
|
319
|
+
preferSparkOverLightning: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
327
320
|
};
|
|
328
321
|
}
|
|
329
322
|
write(value, into) {
|
|
@@ -332,9 +325,10 @@ const FfiConverterTypeConfig = (() => {
|
|
|
332
325
|
_uniffiBindgenReactNative.FfiConverterUInt32.write(value.syncIntervalSecs, into);
|
|
333
326
|
FfiConverterOptionalTypeFee.write(value.maxDepositClaimFee, into);
|
|
334
327
|
FfiConverterOptionalString.write(value.lnurlDomain, into);
|
|
328
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.preferSparkOverLightning, into);
|
|
335
329
|
}
|
|
336
330
|
allocationSize(value) {
|
|
337
|
-
return FfiConverterOptionalString.allocationSize(value.apiKey) + FfiConverterTypeNetwork.allocationSize(value.network) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.syncIntervalSecs) + FfiConverterOptionalTypeFee.allocationSize(value.maxDepositClaimFee) + FfiConverterOptionalString.allocationSize(value.lnurlDomain);
|
|
331
|
+
return FfiConverterOptionalString.allocationSize(value.apiKey) + FfiConverterTypeNetwork.allocationSize(value.network) + _uniffiBindgenReactNative.FfiConverterUInt32.allocationSize(value.syncIntervalSecs) + FfiConverterOptionalTypeFee.allocationSize(value.maxDepositClaimFee) + FfiConverterOptionalString.allocationSize(value.lnurlDomain) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.preferSparkOverLightning);
|
|
338
332
|
}
|
|
339
333
|
}
|
|
340
334
|
return new FFIConverter();
|
|
@@ -2372,6 +2366,53 @@ const FfiConverterTypeFee = (() => {
|
|
|
2372
2366
|
}
|
|
2373
2367
|
return new FFIConverter();
|
|
2374
2368
|
})();
|
|
2369
|
+
let KeySetType = exports.KeySetType = /*#__PURE__*/function (KeySetType) {
|
|
2370
|
+
KeySetType[KeySetType["Default"] = 0] = "Default";
|
|
2371
|
+
KeySetType[KeySetType["Taproot"] = 1] = "Taproot";
|
|
2372
|
+
KeySetType[KeySetType["NativeSegwit"] = 2] = "NativeSegwit";
|
|
2373
|
+
KeySetType[KeySetType["WrappedSegwit"] = 3] = "WrappedSegwit";
|
|
2374
|
+
KeySetType[KeySetType["Legacy"] = 4] = "Legacy";
|
|
2375
|
+
return KeySetType;
|
|
2376
|
+
}({});
|
|
2377
|
+
const FfiConverterTypeKeySetType = (() => {
|
|
2378
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
2379
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2380
|
+
read(from) {
|
|
2381
|
+
switch (ordinalConverter.read(from)) {
|
|
2382
|
+
case 1:
|
|
2383
|
+
return KeySetType.Default;
|
|
2384
|
+
case 2:
|
|
2385
|
+
return KeySetType.Taproot;
|
|
2386
|
+
case 3:
|
|
2387
|
+
return KeySetType.NativeSegwit;
|
|
2388
|
+
case 4:
|
|
2389
|
+
return KeySetType.WrappedSegwit;
|
|
2390
|
+
case 5:
|
|
2391
|
+
return KeySetType.Legacy;
|
|
2392
|
+
default:
|
|
2393
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
write(value, into) {
|
|
2397
|
+
switch (value) {
|
|
2398
|
+
case KeySetType.Default:
|
|
2399
|
+
return ordinalConverter.write(1, into);
|
|
2400
|
+
case KeySetType.Taproot:
|
|
2401
|
+
return ordinalConverter.write(2, into);
|
|
2402
|
+
case KeySetType.NativeSegwit:
|
|
2403
|
+
return ordinalConverter.write(3, into);
|
|
2404
|
+
case KeySetType.WrappedSegwit:
|
|
2405
|
+
return ordinalConverter.write(4, into);
|
|
2406
|
+
case KeySetType.Legacy:
|
|
2407
|
+
return ordinalConverter.write(5, into);
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
allocationSize(value) {
|
|
2411
|
+
return ordinalConverter.allocationSize(0);
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
return new FFIConverter();
|
|
2415
|
+
})();
|
|
2375
2416
|
let Network = exports.Network = /*#__PURE__*/function (Network) {
|
|
2376
2417
|
Network[Network["Mainnet"] = 0] = "Mainnet";
|
|
2377
2418
|
Network[Network["Regtest"] = 1] = "Regtest";
|
|
@@ -3419,6 +3460,7 @@ let SdkEvent_Tags = exports.SdkEvent_Tags = /*#__PURE__*/function (SdkEvent_Tags
|
|
|
3419
3460
|
SdkEvent_Tags["ClaimDepositsFailed"] = "ClaimDepositsFailed";
|
|
3420
3461
|
SdkEvent_Tags["ClaimDepositsSucceeded"] = "ClaimDepositsSucceeded";
|
|
3421
3462
|
SdkEvent_Tags["PaymentSucceeded"] = "PaymentSucceeded";
|
|
3463
|
+
SdkEvent_Tags["PaymentFailed"] = "PaymentFailed";
|
|
3422
3464
|
return SdkEvent_Tags;
|
|
3423
3465
|
}({});
|
|
3424
3466
|
/**
|
|
@@ -3502,6 +3544,24 @@ const SdkEvent = exports.SdkEvent = (() => {
|
|
|
3502
3544
|
return obj.tag === SdkEvent_Tags.PaymentSucceeded;
|
|
3503
3545
|
}
|
|
3504
3546
|
}
|
|
3547
|
+
class PaymentFailed_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3548
|
+
/**
|
|
3549
|
+
* @private
|
|
3550
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3551
|
+
*/
|
|
3552
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SdkEvent';
|
|
3553
|
+
tag = SdkEvent_Tags.PaymentFailed;
|
|
3554
|
+
constructor(inner) {
|
|
3555
|
+
super('SdkEvent', 'PaymentFailed');
|
|
3556
|
+
this.inner = Object.freeze(inner);
|
|
3557
|
+
}
|
|
3558
|
+
static new(inner) {
|
|
3559
|
+
return new PaymentFailed_(inner);
|
|
3560
|
+
}
|
|
3561
|
+
static instanceOf(obj) {
|
|
3562
|
+
return obj.tag === SdkEvent_Tags.PaymentFailed;
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3505
3565
|
function instanceOf(obj) {
|
|
3506
3566
|
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'SdkEvent';
|
|
3507
3567
|
}
|
|
@@ -3510,7 +3570,8 @@ const SdkEvent = exports.SdkEvent = (() => {
|
|
|
3510
3570
|
Synced: Synced_,
|
|
3511
3571
|
ClaimDepositsFailed: ClaimDepositsFailed_,
|
|
3512
3572
|
ClaimDepositsSucceeded: ClaimDepositsSucceeded_,
|
|
3513
|
-
PaymentSucceeded: PaymentSucceeded_
|
|
3573
|
+
PaymentSucceeded: PaymentSucceeded_,
|
|
3574
|
+
PaymentFailed: PaymentFailed_
|
|
3514
3575
|
});
|
|
3515
3576
|
})();
|
|
3516
3577
|
|
|
@@ -3538,6 +3599,10 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
3538
3599
|
return new SdkEvent.PaymentSucceeded({
|
|
3539
3600
|
payment: FfiConverterTypePayment.read(from)
|
|
3540
3601
|
});
|
|
3602
|
+
case 5:
|
|
3603
|
+
return new SdkEvent.PaymentFailed({
|
|
3604
|
+
payment: FfiConverterTypePayment.read(from)
|
|
3605
|
+
});
|
|
3541
3606
|
default:
|
|
3542
3607
|
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3543
3608
|
}
|
|
@@ -3570,6 +3635,13 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
3570
3635
|
FfiConverterTypePayment.write(inner.payment, into);
|
|
3571
3636
|
return;
|
|
3572
3637
|
}
|
|
3638
|
+
case SdkEvent_Tags.PaymentFailed:
|
|
3639
|
+
{
|
|
3640
|
+
ordinalConverter.write(5, into);
|
|
3641
|
+
const inner = value.inner;
|
|
3642
|
+
FfiConverterTypePayment.write(inner.payment, into);
|
|
3643
|
+
return;
|
|
3644
|
+
}
|
|
3573
3645
|
default:
|
|
3574
3646
|
// Throwing from here means that SdkEvent_Tags hasn't matched an ordinal.
|
|
3575
3647
|
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -3602,6 +3674,13 @@ const FfiConverterTypeSdkEvent = (() => {
|
|
|
3602
3674
|
size += FfiConverterTypePayment.allocationSize(inner.payment);
|
|
3603
3675
|
return size;
|
|
3604
3676
|
}
|
|
3677
|
+
case SdkEvent_Tags.PaymentFailed:
|
|
3678
|
+
{
|
|
3679
|
+
const inner = value.inner;
|
|
3680
|
+
let size = ordinalConverter.allocationSize(5);
|
|
3681
|
+
size += FfiConverterTypePayment.allocationSize(inner.payment);
|
|
3682
|
+
return size;
|
|
3683
|
+
}
|
|
3605
3684
|
default:
|
|
3606
3685
|
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3607
3686
|
}
|
|
@@ -4564,9 +4643,9 @@ class BreezSdk extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
4564
4643
|
throw __error;
|
|
4565
4644
|
}
|
|
4566
4645
|
}
|
|
4567
|
-
pollLightningSendPayment(
|
|
4646
|
+
pollLightningSendPayment(payment, sspId) {
|
|
4568
4647
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
4569
|
-
(0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterString.lower(
|
|
4648
|
+
(0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterTypePayment.lower(payment), FfiConverterString.lower(sspId), callStatus);
|
|
4570
4649
|
}, /*liftString:*/FfiConverterString.lift);
|
|
4571
4650
|
}
|
|
4572
4651
|
async prepareLnurlPay(request, asyncOpts_) /*throws*/{
|
|
@@ -4815,6 +4894,26 @@ class SdkBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
4815
4894
|
throw __error;
|
|
4816
4895
|
}
|
|
4817
4896
|
}
|
|
4897
|
+
|
|
4898
|
+
/**
|
|
4899
|
+
* Sets the key set type to be used by the SDK.
|
|
4900
|
+
* Arguments:
|
|
4901
|
+
* - `key_set_type`: The key set type which determines the derivation path.
|
|
4902
|
+
* - `use_address_index`: Controls the structure of the BIP derivation path.
|
|
4903
|
+
*/
|
|
4904
|
+
async withKeySet(keySetType, useAddressIndex, asyncOpts_) {
|
|
4905
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4906
|
+
try {
|
|
4907
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
4908
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(uniffiTypeSdkBuilderObjectFactory.clonePointer(this), FfiConverterTypeKeySetType.lower(keySetType), _uniffiBindgenReactNative.FfiConverterBool.lower(useAddressIndex));
|
|
4909
|
+
}, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_void, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_void, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_void, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_);
|
|
4910
|
+
} catch (__error) {
|
|
4911
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
4912
|
+
__error.stack = __stack;
|
|
4913
|
+
}
|
|
4914
|
+
throw __error;
|
|
4915
|
+
}
|
|
4916
|
+
}
|
|
4818
4917
|
async withLnurlClient(lnurlClient, asyncOpts_) {
|
|
4819
4918
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4820
4919
|
try {
|
|
@@ -5568,7 +5667,7 @@ function uniffiEnsureInitialized() {
|
|
|
5568
5667
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_func_default_config() !== 62194) {
|
|
5569
5668
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_default_config');
|
|
5570
5669
|
}
|
|
5571
|
-
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_func_default_storage() !==
|
|
5670
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_func_default_storage() !== 46285) {
|
|
5572
5671
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_default_storage');
|
|
5573
5672
|
}
|
|
5574
5673
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_func_init_logging() !== 8518) {
|
|
@@ -5619,7 +5718,7 @@ function uniffiEnsureInitialized() {
|
|
|
5619
5718
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay() !== 10147) {
|
|
5620
5719
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay');
|
|
5621
5720
|
}
|
|
5622
|
-
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment() !==
|
|
5721
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment() !== 57601) {
|
|
5623
5722
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment');
|
|
5624
5723
|
}
|
|
5625
5724
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay() !== 37691) {
|
|
@@ -5658,6 +5757,9 @@ function uniffiEnsureInitialized() {
|
|
|
5658
5757
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service() !== 2848) {
|
|
5659
5758
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service');
|
|
5660
5759
|
}
|
|
5760
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set() !== 55523) {
|
|
5761
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set');
|
|
5762
|
+
}
|
|
5661
5763
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client() !== 61720) {
|
|
5662
5764
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client');
|
|
5663
5765
|
}
|
|
@@ -5729,6 +5831,7 @@ var _default = exports.default = Object.freeze({
|
|
|
5729
5831
|
FfiConverterTypeGetInfoResponse,
|
|
5730
5832
|
FfiConverterTypeGetPaymentRequest,
|
|
5731
5833
|
FfiConverterTypeGetPaymentResponse,
|
|
5834
|
+
FfiConverterTypeKeySetType,
|
|
5732
5835
|
FfiConverterTypeLightningAddressInfo,
|
|
5733
5836
|
FfiConverterTypeListPaymentsRequest,
|
|
5734
5837
|
FfiConverterTypeListPaymentsResponse,
|