@breeztech/breez-sdk-spark-react-native 0.3.1 → 0.3.3
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 +710 -48
- package/cpp/generated/breez_sdk_spark.hpp +51 -7
- package/lib/commonjs/generated/breez_sdk_common.js +115 -274
- package/lib/commonjs/generated/breez_sdk_common.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +1165 -67
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_common.js +114 -273
- package/lib/module/generated/breez_sdk_common.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +1163 -65
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +123 -183
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +21 -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 +1082 -77
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts +123 -183
- package/lib/typescript/module/src/generated/breez_sdk_common.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +21 -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 +1082 -77
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/generated/breez_sdk_common.ts +194 -373
- package/src/generated/breez_sdk_spark-ffi.ts +55 -2
- package/src/generated/breez_sdk_spark.ts +2090 -218
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.WaitForPaymentResponse = exports.WaitForPaymentRequest = exports.WaitForPaymentIdentifier_Tags = exports.WaitForPaymentIdentifier = exports.Utxo = exports.UpdateDepositPayload_Tags = exports.UpdateDepositPayload = exports.TxStatus = exports.TokenMetadata = exports.TokenBalance = 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.Seed_Tags = exports.Seed = 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.ListFiatRatesResponse = exports.ListFiatCurrenciesResponse = exports.LightningAddressInfo = exports.KeySetType = exports.GetTokensMetadataResponse = exports.GetTokensMetadataRequest = 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 = exports.AssetFilter_Tags = exports.AssetFilter = void 0;
|
|
6
|
+
exports.WaitForPaymentResponse = exports.WaitForPaymentRequest = exports.WaitForPaymentIdentifier_Tags = exports.WaitForPaymentIdentifier = exports.Utxo = exports.UpdateDepositPayload_Tags = exports.UpdateDepositPayload = exports.TxStatus = exports.TokenMetadata = exports.TokenBalance = exports.SyncWalletResponse = exports.SyncWalletRequest = exports.StorageImpl = exports.StorageError_Tags = exports.StorageError = exports.SparkInvoicePaymentDetails = exports.SignMessageResponse = exports.SignMessageRequest = exports.SendPaymentResponse = exports.SendPaymentRequest = exports.SendPaymentOptions_Tags = exports.SendPaymentOptions = exports.SendPaymentMethod_Tags = exports.SendPaymentMethod = exports.SendOnchainSpeedFeeQuote = exports.SendOnchainFeeQuote = exports.Seed_Tags = exports.Seed = 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.ProvisionalPaymentDetails_Tags = exports.ProvisionalPaymentDetails = exports.ProvisionalPayment = exports.PrepareSendPaymentResponse = exports.PrepareSendPaymentRequest = exports.PrepareLnurlPayResponse = exports.PrepareLnurlPayRequest = exports.PaymentType = exports.PaymentStatus = exports.PaymentObserverImpl = exports.PaymentObserverError_Tags = exports.PaymentObserverError = exports.PaymentMethod = exports.PaymentMetadata = exports.PaymentDetails_Tags = exports.PaymentDetails = exports.Payment = exports.OnchainConfirmationSpeed = exports.Network = exports.LogEntry = exports.LnurlWithdrawResponse = exports.LnurlWithdrawRequest = exports.LnurlWithdrawInfo = exports.LnurlPayResponse = exports.LnurlPayRequest = exports.LnurlPayInfo = exports.ListUnclaimedDepositsResponse = exports.ListUnclaimedDepositsRequest = exports.ListPaymentsResponse = exports.ListPaymentsRequest = exports.ListFiatRatesResponse = exports.ListFiatCurrenciesResponse = exports.LightningAddressInfo = exports.KeySetType = exports.GetTokensMetadataResponse = exports.GetTokensMetadataRequest = 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.CheckMessageResponse = exports.CheckMessageRequest = exports.CheckLightningAddressRequest = exports.ChainServiceError_Tags = exports.ChainServiceError = exports.BreezSdk = exports.BitcoinChainServiceImpl = exports.AssetFilter_Tags = exports.AssetFilter = void 0;
|
|
7
7
|
exports.connect = connect;
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
exports.defaultConfig = defaultConfig;
|
|
10
10
|
exports.defaultStorage = defaultStorage;
|
|
11
11
|
exports.initLogging = initLogging;
|
|
12
|
-
exports.parse = parse;
|
|
13
12
|
var _breez_sdk_sparkFfi = _interopRequireDefault(require("./breez_sdk_spark-ffi.js"));
|
|
14
13
|
var _uniffiBindgenReactNative = require("uniffi-bindgen-react-native");
|
|
15
14
|
var _breez_sdk_common = _interopRequireDefault(require("./breez_sdk_common.js"));
|
|
@@ -22,12 +21,15 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
21
|
const {
|
|
23
22
|
FfiConverterTypeBitcoinAddressDetails,
|
|
24
23
|
FfiConverterTypeBolt11InvoiceDetails,
|
|
24
|
+
FfiConverterTypeExternalInputParser,
|
|
25
25
|
FfiConverterTypeFiatCurrency,
|
|
26
26
|
FfiConverterTypeFiatService,
|
|
27
27
|
FfiConverterTypeInputType,
|
|
28
28
|
FfiConverterTypeLnurlPayRequestDetails,
|
|
29
|
+
FfiConverterTypeLnurlWithdrawRequestDetails,
|
|
29
30
|
FfiConverterTypeRate,
|
|
30
31
|
FfiConverterTypeRestClient,
|
|
32
|
+
FfiConverterTypeSparkInvoiceDetails,
|
|
31
33
|
FfiConverterTypeSuccessAction,
|
|
32
34
|
FfiConverterTypeSuccessActionProcessed
|
|
33
35
|
} = _breez_sdk_common.default.converters;
|
|
@@ -78,19 +80,6 @@ function initLogging(logDir, appLogger, logFilter) /*throws*/{
|
|
|
78
80
|
(0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_func_init_logging(FfiConverterOptionalString.lower(logDir), FfiConverterOptionalTypeLogger.lower(appLogger), FfiConverterOptionalString.lower(logFilter), callStatus);
|
|
79
81
|
}, /*liftString:*/FfiConverterString.lift);
|
|
80
82
|
}
|
|
81
|
-
async function parse(input, asyncOpts_) /*throws*/{
|
|
82
|
-
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
83
|
-
try {
|
|
84
|
-
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
85
|
-
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_func_parse(FfiConverterString.lower(input));
|
|
86
|
-
}, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeInputType.lift.bind(FfiConverterTypeInputType), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
87
|
-
} catch (__error) {
|
|
88
|
-
if (uniffiIsDebug && __error instanceof Error) {
|
|
89
|
-
__error.stack = __stack;
|
|
90
|
-
}
|
|
91
|
-
throw __error;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
83
|
|
|
95
84
|
/**
|
|
96
85
|
* Trait for event listeners
|
|
@@ -208,6 +197,92 @@ const FfiConverterTypeCheckLightningAddressRequest = (() => {
|
|
|
208
197
|
}
|
|
209
198
|
return new FFIConverter();
|
|
210
199
|
})();
|
|
200
|
+
/**
|
|
201
|
+
* Generated factory for {@link CheckMessageRequest} record objects.
|
|
202
|
+
*/
|
|
203
|
+
const CheckMessageRequest = exports.CheckMessageRequest = (() => {
|
|
204
|
+
const defaults = () => ({});
|
|
205
|
+
const create = (() => {
|
|
206
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
207
|
+
})();
|
|
208
|
+
return Object.freeze({
|
|
209
|
+
/**
|
|
210
|
+
* Create a frozen instance of {@link CheckMessageRequest}, with defaults specified
|
|
211
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
212
|
+
*/
|
|
213
|
+
create,
|
|
214
|
+
/**
|
|
215
|
+
* Create a frozen instance of {@link CheckMessageRequest}, with defaults specified
|
|
216
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
217
|
+
*/
|
|
218
|
+
new: create,
|
|
219
|
+
/**
|
|
220
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
221
|
+
*/
|
|
222
|
+
defaults: () => Object.freeze(defaults())
|
|
223
|
+
});
|
|
224
|
+
})();
|
|
225
|
+
const FfiConverterTypeCheckMessageRequest = (() => {
|
|
226
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
227
|
+
read(from) {
|
|
228
|
+
return {
|
|
229
|
+
message: FfiConverterString.read(from),
|
|
230
|
+
pubkey: FfiConverterString.read(from),
|
|
231
|
+
signature: FfiConverterString.read(from)
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
write(value, into) {
|
|
235
|
+
FfiConverterString.write(value.message, into);
|
|
236
|
+
FfiConverterString.write(value.pubkey, into);
|
|
237
|
+
FfiConverterString.write(value.signature, into);
|
|
238
|
+
}
|
|
239
|
+
allocationSize(value) {
|
|
240
|
+
return FfiConverterString.allocationSize(value.message) + FfiConverterString.allocationSize(value.pubkey) + FfiConverterString.allocationSize(value.signature);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return new FFIConverter();
|
|
244
|
+
})();
|
|
245
|
+
/**
|
|
246
|
+
* Generated factory for {@link CheckMessageResponse} record objects.
|
|
247
|
+
*/
|
|
248
|
+
const CheckMessageResponse = exports.CheckMessageResponse = (() => {
|
|
249
|
+
const defaults = () => ({});
|
|
250
|
+
const create = (() => {
|
|
251
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
252
|
+
})();
|
|
253
|
+
return Object.freeze({
|
|
254
|
+
/**
|
|
255
|
+
* Create a frozen instance of {@link CheckMessageResponse}, with defaults specified
|
|
256
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
257
|
+
*/
|
|
258
|
+
create,
|
|
259
|
+
/**
|
|
260
|
+
* Create a frozen instance of {@link CheckMessageResponse}, with defaults specified
|
|
261
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
262
|
+
*/
|
|
263
|
+
new: create,
|
|
264
|
+
/**
|
|
265
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
266
|
+
*/
|
|
267
|
+
defaults: () => Object.freeze(defaults())
|
|
268
|
+
});
|
|
269
|
+
})();
|
|
270
|
+
const FfiConverterTypeCheckMessageResponse = (() => {
|
|
271
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
272
|
+
read(from) {
|
|
273
|
+
return {
|
|
274
|
+
isValid: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
write(value, into) {
|
|
278
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.isValid, into);
|
|
279
|
+
}
|
|
280
|
+
allocationSize(value) {
|
|
281
|
+
return _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.isValid);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return new FFIConverter();
|
|
285
|
+
})();
|
|
211
286
|
/**
|
|
212
287
|
* Generated factory for {@link ClaimDepositRequest} record objects.
|
|
213
288
|
*/
|
|
@@ -330,7 +405,9 @@ const FfiConverterTypeConfig = (() => {
|
|
|
330
405
|
syncIntervalSecs: _uniffiBindgenReactNative.FfiConverterUInt32.read(from),
|
|
331
406
|
maxDepositClaimFee: FfiConverterOptionalTypeFee.read(from),
|
|
332
407
|
lnurlDomain: FfiConverterOptionalString.read(from),
|
|
333
|
-
preferSparkOverLightning: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
408
|
+
preferSparkOverLightning: _uniffiBindgenReactNative.FfiConverterBool.read(from),
|
|
409
|
+
externalInputParsers: FfiConverterOptionalArrayTypeExternalInputParser.read(from),
|
|
410
|
+
useDefaultExternalInputParsers: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
334
411
|
};
|
|
335
412
|
}
|
|
336
413
|
write(value, into) {
|
|
@@ -340,9 +417,11 @@ const FfiConverterTypeConfig = (() => {
|
|
|
340
417
|
FfiConverterOptionalTypeFee.write(value.maxDepositClaimFee, into);
|
|
341
418
|
FfiConverterOptionalString.write(value.lnurlDomain, into);
|
|
342
419
|
_uniffiBindgenReactNative.FfiConverterBool.write(value.preferSparkOverLightning, into);
|
|
420
|
+
FfiConverterOptionalArrayTypeExternalInputParser.write(value.externalInputParsers, into);
|
|
421
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.useDefaultExternalInputParsers, into);
|
|
343
422
|
}
|
|
344
423
|
allocationSize(value) {
|
|
345
|
-
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);
|
|
424
|
+
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) + FfiConverterOptionalArrayTypeExternalInputParser.allocationSize(value.externalInputParsers) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.useDefaultExternalInputParsers);
|
|
346
425
|
}
|
|
347
426
|
}
|
|
348
427
|
return new FFIConverter();
|
|
@@ -1216,6 +1295,142 @@ const FfiConverterTypeLnurlPayResponse = (() => {
|
|
|
1216
1295
|
}
|
|
1217
1296
|
return new FFIConverter();
|
|
1218
1297
|
})();
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Represents the withdraw LNURL info
|
|
1301
|
+
*/
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Generated factory for {@link LnurlWithdrawInfo} record objects.
|
|
1305
|
+
*/
|
|
1306
|
+
const LnurlWithdrawInfo = exports.LnurlWithdrawInfo = (() => {
|
|
1307
|
+
const defaults = () => ({});
|
|
1308
|
+
const create = (() => {
|
|
1309
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1310
|
+
})();
|
|
1311
|
+
return Object.freeze({
|
|
1312
|
+
/**
|
|
1313
|
+
* Create a frozen instance of {@link LnurlWithdrawInfo}, with defaults specified
|
|
1314
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1315
|
+
*/
|
|
1316
|
+
create,
|
|
1317
|
+
/**
|
|
1318
|
+
* Create a frozen instance of {@link LnurlWithdrawInfo}, with defaults specified
|
|
1319
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1320
|
+
*/
|
|
1321
|
+
new: create,
|
|
1322
|
+
/**
|
|
1323
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1324
|
+
*/
|
|
1325
|
+
defaults: () => Object.freeze(defaults())
|
|
1326
|
+
});
|
|
1327
|
+
})();
|
|
1328
|
+
const FfiConverterTypeLnurlWithdrawInfo = (() => {
|
|
1329
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1330
|
+
read(from) {
|
|
1331
|
+
return {
|
|
1332
|
+
withdrawUrl: FfiConverterString.read(from)
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
write(value, into) {
|
|
1336
|
+
FfiConverterString.write(value.withdrawUrl, into);
|
|
1337
|
+
}
|
|
1338
|
+
allocationSize(value) {
|
|
1339
|
+
return FfiConverterString.allocationSize(value.withdrawUrl);
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
return new FFIConverter();
|
|
1343
|
+
})();
|
|
1344
|
+
/**
|
|
1345
|
+
* Generated factory for {@link LnurlWithdrawRequest} record objects.
|
|
1346
|
+
*/
|
|
1347
|
+
const LnurlWithdrawRequest = exports.LnurlWithdrawRequest = (() => {
|
|
1348
|
+
const defaults = () => ({
|
|
1349
|
+
completionTimeoutSecs: undefined
|
|
1350
|
+
});
|
|
1351
|
+
const create = (() => {
|
|
1352
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1353
|
+
})();
|
|
1354
|
+
return Object.freeze({
|
|
1355
|
+
/**
|
|
1356
|
+
* Create a frozen instance of {@link LnurlWithdrawRequest}, with defaults specified
|
|
1357
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1358
|
+
*/
|
|
1359
|
+
create,
|
|
1360
|
+
/**
|
|
1361
|
+
* Create a frozen instance of {@link LnurlWithdrawRequest}, with defaults specified
|
|
1362
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1363
|
+
*/
|
|
1364
|
+
new: create,
|
|
1365
|
+
/**
|
|
1366
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1367
|
+
*/
|
|
1368
|
+
defaults: () => Object.freeze(defaults())
|
|
1369
|
+
});
|
|
1370
|
+
})();
|
|
1371
|
+
const FfiConverterTypeLnurlWithdrawRequest = (() => {
|
|
1372
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1373
|
+
read(from) {
|
|
1374
|
+
return {
|
|
1375
|
+
amountSats: _uniffiBindgenReactNative.FfiConverterUInt64.read(from),
|
|
1376
|
+
withdrawRequest: FfiConverterTypeLnurlWithdrawRequestDetails.read(from),
|
|
1377
|
+
completionTimeoutSecs: FfiConverterOptionalUInt32.read(from)
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
write(value, into) {
|
|
1381
|
+
_uniffiBindgenReactNative.FfiConverterUInt64.write(value.amountSats, into);
|
|
1382
|
+
FfiConverterTypeLnurlWithdrawRequestDetails.write(value.withdrawRequest, into);
|
|
1383
|
+
FfiConverterOptionalUInt32.write(value.completionTimeoutSecs, into);
|
|
1384
|
+
}
|
|
1385
|
+
allocationSize(value) {
|
|
1386
|
+
return _uniffiBindgenReactNative.FfiConverterUInt64.allocationSize(value.amountSats) + FfiConverterTypeLnurlWithdrawRequestDetails.allocationSize(value.withdrawRequest) + FfiConverterOptionalUInt32.allocationSize(value.completionTimeoutSecs);
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
return new FFIConverter();
|
|
1390
|
+
})();
|
|
1391
|
+
/**
|
|
1392
|
+
* Generated factory for {@link LnurlWithdrawResponse} record objects.
|
|
1393
|
+
*/
|
|
1394
|
+
const LnurlWithdrawResponse = exports.LnurlWithdrawResponse = (() => {
|
|
1395
|
+
const defaults = () => ({});
|
|
1396
|
+
const create = (() => {
|
|
1397
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1398
|
+
})();
|
|
1399
|
+
return Object.freeze({
|
|
1400
|
+
/**
|
|
1401
|
+
* Create a frozen instance of {@link LnurlWithdrawResponse}, with defaults specified
|
|
1402
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1403
|
+
*/
|
|
1404
|
+
create,
|
|
1405
|
+
/**
|
|
1406
|
+
* Create a frozen instance of {@link LnurlWithdrawResponse}, with defaults specified
|
|
1407
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1408
|
+
*/
|
|
1409
|
+
new: create,
|
|
1410
|
+
/**
|
|
1411
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1412
|
+
*/
|
|
1413
|
+
defaults: () => Object.freeze(defaults())
|
|
1414
|
+
});
|
|
1415
|
+
})();
|
|
1416
|
+
const FfiConverterTypeLnurlWithdrawResponse = (() => {
|
|
1417
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1418
|
+
read(from) {
|
|
1419
|
+
return {
|
|
1420
|
+
paymentRequest: FfiConverterString.read(from),
|
|
1421
|
+
payment: FfiConverterOptionalTypePayment.read(from)
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
write(value, into) {
|
|
1425
|
+
FfiConverterString.write(value.paymentRequest, into);
|
|
1426
|
+
FfiConverterOptionalTypePayment.write(value.payment, into);
|
|
1427
|
+
}
|
|
1428
|
+
allocationSize(value) {
|
|
1429
|
+
return FfiConverterString.allocationSize(value.paymentRequest) + FfiConverterOptionalTypePayment.allocationSize(value.payment);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
return new FFIConverter();
|
|
1433
|
+
})();
|
|
1219
1434
|
/**
|
|
1220
1435
|
* Generated factory for {@link LogEntry} record objects.
|
|
1221
1436
|
*/
|
|
@@ -1354,15 +1569,17 @@ const FfiConverterTypePaymentMetadata = (() => {
|
|
|
1354
1569
|
read(from) {
|
|
1355
1570
|
return {
|
|
1356
1571
|
lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
|
|
1572
|
+
lnurlWithdrawInfo: FfiConverterOptionalTypeLnurlWithdrawInfo.read(from),
|
|
1357
1573
|
lnurlDescription: FfiConverterOptionalString.read(from)
|
|
1358
1574
|
};
|
|
1359
1575
|
}
|
|
1360
1576
|
write(value, into) {
|
|
1361
1577
|
FfiConverterOptionalTypeLnurlPayInfo.write(value.lnurlPayInfo, into);
|
|
1578
|
+
FfiConverterOptionalTypeLnurlWithdrawInfo.write(value.lnurlWithdrawInfo, into);
|
|
1362
1579
|
FfiConverterOptionalString.write(value.lnurlDescription, into);
|
|
1363
1580
|
}
|
|
1364
1581
|
allocationSize(value) {
|
|
1365
|
-
return FfiConverterOptionalTypeLnurlPayInfo.allocationSize(value.lnurlPayInfo) + FfiConverterOptionalString.allocationSize(value.lnurlDescription);
|
|
1582
|
+
return FfiConverterOptionalTypeLnurlPayInfo.allocationSize(value.lnurlPayInfo) + FfiConverterOptionalTypeLnurlWithdrawInfo.allocationSize(value.lnurlWithdrawInfo) + FfiConverterOptionalString.allocationSize(value.lnurlDescription);
|
|
1366
1583
|
}
|
|
1367
1584
|
}
|
|
1368
1585
|
return new FFIConverter();
|
|
@@ -1561,6 +1778,51 @@ const FfiConverterTypePrepareSendPaymentResponse = (() => {
|
|
|
1561
1778
|
}
|
|
1562
1779
|
return new FFIConverter();
|
|
1563
1780
|
})();
|
|
1781
|
+
/**
|
|
1782
|
+
* Generated factory for {@link ProvisionalPayment} record objects.
|
|
1783
|
+
*/
|
|
1784
|
+
const ProvisionalPayment = exports.ProvisionalPayment = (() => {
|
|
1785
|
+
const defaults = () => ({});
|
|
1786
|
+
const create = (() => {
|
|
1787
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1788
|
+
})();
|
|
1789
|
+
return Object.freeze({
|
|
1790
|
+
/**
|
|
1791
|
+
* Create a frozen instance of {@link ProvisionalPayment}, with defaults specified
|
|
1792
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1793
|
+
*/
|
|
1794
|
+
create,
|
|
1795
|
+
/**
|
|
1796
|
+
* Create a frozen instance of {@link ProvisionalPayment}, with defaults specified
|
|
1797
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1798
|
+
*/
|
|
1799
|
+
new: create,
|
|
1800
|
+
/**
|
|
1801
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
1802
|
+
*/
|
|
1803
|
+
defaults: () => Object.freeze(defaults())
|
|
1804
|
+
});
|
|
1805
|
+
})();
|
|
1806
|
+
const FfiConverterTypeProvisionalPayment = (() => {
|
|
1807
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1808
|
+
read(from) {
|
|
1809
|
+
return {
|
|
1810
|
+
paymentId: FfiConverterString.read(from),
|
|
1811
|
+
amount: FfiConverterTypeu128.read(from),
|
|
1812
|
+
details: FfiConverterTypeProvisionalPaymentDetails.read(from)
|
|
1813
|
+
};
|
|
1814
|
+
}
|
|
1815
|
+
write(value, into) {
|
|
1816
|
+
FfiConverterString.write(value.paymentId, into);
|
|
1817
|
+
FfiConverterTypeu128.write(value.amount, into);
|
|
1818
|
+
FfiConverterTypeProvisionalPaymentDetails.write(value.details, into);
|
|
1819
|
+
}
|
|
1820
|
+
allocationSize(value) {
|
|
1821
|
+
return FfiConverterString.allocationSize(value.paymentId) + FfiConverterTypeu128.allocationSize(value.amount) + FfiConverterTypeProvisionalPaymentDetails.allocationSize(value.details);
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
return new FFIConverter();
|
|
1825
|
+
})();
|
|
1564
1826
|
/**
|
|
1565
1827
|
* Generated factory for {@link ReceivePaymentRequest} record objects.
|
|
1566
1828
|
*/
|
|
@@ -1632,15 +1894,15 @@ const FfiConverterTypeReceivePaymentResponse = (() => {
|
|
|
1632
1894
|
read(from) {
|
|
1633
1895
|
return {
|
|
1634
1896
|
paymentRequest: FfiConverterString.read(from),
|
|
1635
|
-
|
|
1897
|
+
fee: FfiConverterTypeu128.read(from)
|
|
1636
1898
|
};
|
|
1637
1899
|
}
|
|
1638
1900
|
write(value, into) {
|
|
1639
1901
|
FfiConverterString.write(value.paymentRequest, into);
|
|
1640
|
-
|
|
1902
|
+
FfiConverterTypeu128.write(value.fee, into);
|
|
1641
1903
|
}
|
|
1642
1904
|
allocationSize(value) {
|
|
1643
|
-
return FfiConverterString.allocationSize(value.paymentRequest) +
|
|
1905
|
+
return FfiConverterString.allocationSize(value.paymentRequest) + FfiConverterTypeu128.allocationSize(value.fee);
|
|
1644
1906
|
}
|
|
1645
1907
|
}
|
|
1646
1908
|
return new FFIConverter();
|
|
@@ -1958,27 +2220,22 @@ const FfiConverterTypeSendPaymentResponse = (() => {
|
|
|
1958
2220
|
}
|
|
1959
2221
|
return new FFIConverter();
|
|
1960
2222
|
})();
|
|
1961
|
-
|
|
1962
|
-
/**
|
|
1963
|
-
* Request to sync the wallet with the Spark network
|
|
1964
|
-
*/
|
|
1965
|
-
|
|
1966
2223
|
/**
|
|
1967
|
-
* Generated factory for {@link
|
|
2224
|
+
* Generated factory for {@link SignMessageRequest} record objects.
|
|
1968
2225
|
*/
|
|
1969
|
-
const
|
|
2226
|
+
const SignMessageRequest = exports.SignMessageRequest = (() => {
|
|
1970
2227
|
const defaults = () => ({});
|
|
1971
2228
|
const create = (() => {
|
|
1972
2229
|
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
1973
2230
|
})();
|
|
1974
2231
|
return Object.freeze({
|
|
1975
2232
|
/**
|
|
1976
|
-
* Create a frozen instance of {@link
|
|
2233
|
+
* Create a frozen instance of {@link SignMessageRequest}, with defaults specified
|
|
1977
2234
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1978
2235
|
*/
|
|
1979
2236
|
create,
|
|
1980
2237
|
/**
|
|
1981
|
-
* Create a frozen instance of {@link
|
|
2238
|
+
* Create a frozen instance of {@link SignMessageRequest}, with defaults specified
|
|
1982
2239
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
1983
2240
|
*/
|
|
1984
2241
|
new: create,
|
|
@@ -1988,39 +2245,40 @@ const SyncWalletRequest = exports.SyncWalletRequest = (() => {
|
|
|
1988
2245
|
defaults: () => Object.freeze(defaults())
|
|
1989
2246
|
});
|
|
1990
2247
|
})();
|
|
1991
|
-
const
|
|
2248
|
+
const FfiConverterTypeSignMessageRequest = (() => {
|
|
1992
2249
|
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1993
2250
|
read(from) {
|
|
1994
|
-
return {
|
|
2251
|
+
return {
|
|
2252
|
+
message: FfiConverterString.read(from),
|
|
2253
|
+
compact: _uniffiBindgenReactNative.FfiConverterBool.read(from)
|
|
2254
|
+
};
|
|
2255
|
+
}
|
|
2256
|
+
write(value, into) {
|
|
2257
|
+
FfiConverterString.write(value.message, into);
|
|
2258
|
+
_uniffiBindgenReactNative.FfiConverterBool.write(value.compact, into);
|
|
1995
2259
|
}
|
|
1996
|
-
write(value, into) {}
|
|
1997
2260
|
allocationSize(value) {
|
|
1998
|
-
return
|
|
2261
|
+
return FfiConverterString.allocationSize(value.message) + _uniffiBindgenReactNative.FfiConverterBool.allocationSize(value.compact);
|
|
1999
2262
|
}
|
|
2000
2263
|
}
|
|
2001
2264
|
return new FFIConverter();
|
|
2002
2265
|
})();
|
|
2003
|
-
|
|
2004
|
-
/**
|
|
2005
|
-
* Response from synchronizing the wallet
|
|
2006
|
-
*/
|
|
2007
|
-
|
|
2008
2266
|
/**
|
|
2009
|
-
* Generated factory for {@link
|
|
2267
|
+
* Generated factory for {@link SignMessageResponse} record objects.
|
|
2010
2268
|
*/
|
|
2011
|
-
const
|
|
2269
|
+
const SignMessageResponse = exports.SignMessageResponse = (() => {
|
|
2012
2270
|
const defaults = () => ({});
|
|
2013
2271
|
const create = (() => {
|
|
2014
2272
|
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
2015
2273
|
})();
|
|
2016
2274
|
return Object.freeze({
|
|
2017
2275
|
/**
|
|
2018
|
-
* Create a frozen instance of {@link
|
|
2276
|
+
* Create a frozen instance of {@link SignMessageResponse}, with defaults specified
|
|
2019
2277
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2020
2278
|
*/
|
|
2021
2279
|
create,
|
|
2022
2280
|
/**
|
|
2023
|
-
* Create a frozen instance of {@link
|
|
2281
|
+
* Create a frozen instance of {@link SignMessageResponse}, with defaults specified
|
|
2024
2282
|
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2025
2283
|
*/
|
|
2026
2284
|
new: create,
|
|
@@ -2030,20 +2288,153 @@ const SyncWalletResponse = exports.SyncWalletResponse = (() => {
|
|
|
2030
2288
|
defaults: () => Object.freeze(defaults())
|
|
2031
2289
|
});
|
|
2032
2290
|
})();
|
|
2033
|
-
const
|
|
2291
|
+
const FfiConverterTypeSignMessageResponse = (() => {
|
|
2034
2292
|
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2035
2293
|
read(from) {
|
|
2036
|
-
return {
|
|
2294
|
+
return {
|
|
2295
|
+
pubkey: FfiConverterString.read(from),
|
|
2296
|
+
signature: FfiConverterString.read(from)
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2299
|
+
write(value, into) {
|
|
2300
|
+
FfiConverterString.write(value.pubkey, into);
|
|
2301
|
+
FfiConverterString.write(value.signature, into);
|
|
2037
2302
|
}
|
|
2038
|
-
write(value, into) {}
|
|
2039
2303
|
allocationSize(value) {
|
|
2040
|
-
return
|
|
2304
|
+
return FfiConverterString.allocationSize(value.pubkey) + FfiConverterString.allocationSize(value.signature);
|
|
2041
2305
|
}
|
|
2042
2306
|
}
|
|
2043
2307
|
return new FFIConverter();
|
|
2044
2308
|
})();
|
|
2045
2309
|
/**
|
|
2046
|
-
* Generated factory for {@link
|
|
2310
|
+
* Generated factory for {@link SparkInvoicePaymentDetails} record objects.
|
|
2311
|
+
*/
|
|
2312
|
+
const SparkInvoicePaymentDetails = exports.SparkInvoicePaymentDetails = (() => {
|
|
2313
|
+
const defaults = () => ({});
|
|
2314
|
+
const create = (() => {
|
|
2315
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
2316
|
+
})();
|
|
2317
|
+
return Object.freeze({
|
|
2318
|
+
/**
|
|
2319
|
+
* Create a frozen instance of {@link SparkInvoicePaymentDetails}, with defaults specified
|
|
2320
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2321
|
+
*/
|
|
2322
|
+
create,
|
|
2323
|
+
/**
|
|
2324
|
+
* Create a frozen instance of {@link SparkInvoicePaymentDetails}, with defaults specified
|
|
2325
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2326
|
+
*/
|
|
2327
|
+
new: create,
|
|
2328
|
+
/**
|
|
2329
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
2330
|
+
*/
|
|
2331
|
+
defaults: () => Object.freeze(defaults())
|
|
2332
|
+
});
|
|
2333
|
+
})();
|
|
2334
|
+
const FfiConverterTypeSparkInvoicePaymentDetails = (() => {
|
|
2335
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2336
|
+
read(from) {
|
|
2337
|
+
return {
|
|
2338
|
+
description: FfiConverterOptionalString.read(from),
|
|
2339
|
+
invoice: FfiConverterString.read(from)
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
write(value, into) {
|
|
2343
|
+
FfiConverterOptionalString.write(value.description, into);
|
|
2344
|
+
FfiConverterString.write(value.invoice, into);
|
|
2345
|
+
}
|
|
2346
|
+
allocationSize(value) {
|
|
2347
|
+
return FfiConverterOptionalString.allocationSize(value.description) + FfiConverterString.allocationSize(value.invoice);
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
return new FFIConverter();
|
|
2351
|
+
})();
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* Request to sync the wallet with the Spark network
|
|
2355
|
+
*/
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Generated factory for {@link SyncWalletRequest} record objects.
|
|
2359
|
+
*/
|
|
2360
|
+
const SyncWalletRequest = exports.SyncWalletRequest = (() => {
|
|
2361
|
+
const defaults = () => ({});
|
|
2362
|
+
const create = (() => {
|
|
2363
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
2364
|
+
})();
|
|
2365
|
+
return Object.freeze({
|
|
2366
|
+
/**
|
|
2367
|
+
* Create a frozen instance of {@link SyncWalletRequest}, with defaults specified
|
|
2368
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2369
|
+
*/
|
|
2370
|
+
create,
|
|
2371
|
+
/**
|
|
2372
|
+
* Create a frozen instance of {@link SyncWalletRequest}, with defaults specified
|
|
2373
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2374
|
+
*/
|
|
2375
|
+
new: create,
|
|
2376
|
+
/**
|
|
2377
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
2378
|
+
*/
|
|
2379
|
+
defaults: () => Object.freeze(defaults())
|
|
2380
|
+
});
|
|
2381
|
+
})();
|
|
2382
|
+
const FfiConverterTypeSyncWalletRequest = (() => {
|
|
2383
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2384
|
+
read(from) {
|
|
2385
|
+
return {};
|
|
2386
|
+
}
|
|
2387
|
+
write(value, into) {}
|
|
2388
|
+
allocationSize(value) {
|
|
2389
|
+
return 0;
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
return new FFIConverter();
|
|
2393
|
+
})();
|
|
2394
|
+
|
|
2395
|
+
/**
|
|
2396
|
+
* Response from synchronizing the wallet
|
|
2397
|
+
*/
|
|
2398
|
+
|
|
2399
|
+
/**
|
|
2400
|
+
* Generated factory for {@link SyncWalletResponse} record objects.
|
|
2401
|
+
*/
|
|
2402
|
+
const SyncWalletResponse = exports.SyncWalletResponse = (() => {
|
|
2403
|
+
const defaults = () => ({});
|
|
2404
|
+
const create = (() => {
|
|
2405
|
+
return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
|
|
2406
|
+
})();
|
|
2407
|
+
return Object.freeze({
|
|
2408
|
+
/**
|
|
2409
|
+
* Create a frozen instance of {@link SyncWalletResponse}, with defaults specified
|
|
2410
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2411
|
+
*/
|
|
2412
|
+
create,
|
|
2413
|
+
/**
|
|
2414
|
+
* Create a frozen instance of {@link SyncWalletResponse}, with defaults specified
|
|
2415
|
+
* in Rust, in the {@link breez_sdk_spark} crate.
|
|
2416
|
+
*/
|
|
2417
|
+
new: create,
|
|
2418
|
+
/**
|
|
2419
|
+
* Defaults specified in the {@link breez_sdk_spark} crate.
|
|
2420
|
+
*/
|
|
2421
|
+
defaults: () => Object.freeze(defaults())
|
|
2422
|
+
});
|
|
2423
|
+
})();
|
|
2424
|
+
const FfiConverterTypeSyncWalletResponse = (() => {
|
|
2425
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
2426
|
+
read(from) {
|
|
2427
|
+
return {};
|
|
2428
|
+
}
|
|
2429
|
+
write(value, into) {}
|
|
2430
|
+
allocationSize(value) {
|
|
2431
|
+
return 0;
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
return new FFIConverter();
|
|
2435
|
+
})();
|
|
2436
|
+
/**
|
|
2437
|
+
* Generated factory for {@link TokenBalance} record objects.
|
|
2047
2438
|
*/
|
|
2048
2439
|
const TokenBalance = exports.TokenBalance = (() => {
|
|
2049
2440
|
const defaults = () => ({});
|
|
@@ -3047,11 +3438,12 @@ const PaymentDetails = exports.PaymentDetails = (() => {
|
|
|
3047
3438
|
*/
|
|
3048
3439
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'PaymentDetails';
|
|
3049
3440
|
tag = PaymentDetails_Tags.Spark;
|
|
3050
|
-
constructor() {
|
|
3441
|
+
constructor(inner) {
|
|
3051
3442
|
super('PaymentDetails', 'Spark');
|
|
3443
|
+
this.inner = Object.freeze(inner);
|
|
3052
3444
|
}
|
|
3053
|
-
static new() {
|
|
3054
|
-
return new Spark_();
|
|
3445
|
+
static new(inner) {
|
|
3446
|
+
return new Spark_(inner);
|
|
3055
3447
|
}
|
|
3056
3448
|
static instanceOf(obj) {
|
|
3057
3449
|
return obj.tag === PaymentDetails_Tags.Spark;
|
|
@@ -3148,11 +3540,14 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3148
3540
|
read(from) {
|
|
3149
3541
|
switch (ordinalConverter.read(from)) {
|
|
3150
3542
|
case 1:
|
|
3151
|
-
return new PaymentDetails.Spark(
|
|
3543
|
+
return new PaymentDetails.Spark({
|
|
3544
|
+
invoiceDetails: FfiConverterOptionalTypeSparkInvoicePaymentDetails.read(from)
|
|
3545
|
+
});
|
|
3152
3546
|
case 2:
|
|
3153
3547
|
return new PaymentDetails.Token({
|
|
3154
3548
|
metadata: FfiConverterTypeTokenMetadata.read(from),
|
|
3155
|
-
txHash: FfiConverterString.read(from)
|
|
3549
|
+
txHash: FfiConverterString.read(from),
|
|
3550
|
+
invoiceDetails: FfiConverterOptionalTypeSparkInvoicePaymentDetails.read(from)
|
|
3156
3551
|
});
|
|
3157
3552
|
case 3:
|
|
3158
3553
|
return new PaymentDetails.Lightning({
|
|
@@ -3161,7 +3556,8 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3161
3556
|
invoice: FfiConverterString.read(from),
|
|
3162
3557
|
paymentHash: FfiConverterString.read(from),
|
|
3163
3558
|
destinationPubkey: FfiConverterString.read(from),
|
|
3164
|
-
lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from)
|
|
3559
|
+
lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
|
|
3560
|
+
lnurlWithdrawInfo: FfiConverterOptionalTypeLnurlWithdrawInfo.read(from)
|
|
3165
3561
|
});
|
|
3166
3562
|
case 4:
|
|
3167
3563
|
return new PaymentDetails.Withdraw({
|
|
@@ -3180,6 +3576,8 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3180
3576
|
case PaymentDetails_Tags.Spark:
|
|
3181
3577
|
{
|
|
3182
3578
|
ordinalConverter.write(1, into);
|
|
3579
|
+
const inner = value.inner;
|
|
3580
|
+
FfiConverterOptionalTypeSparkInvoicePaymentDetails.write(inner.invoiceDetails, into);
|
|
3183
3581
|
return;
|
|
3184
3582
|
}
|
|
3185
3583
|
case PaymentDetails_Tags.Token:
|
|
@@ -3188,6 +3586,7 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3188
3586
|
const inner = value.inner;
|
|
3189
3587
|
FfiConverterTypeTokenMetadata.write(inner.metadata, into);
|
|
3190
3588
|
FfiConverterString.write(inner.txHash, into);
|
|
3589
|
+
FfiConverterOptionalTypeSparkInvoicePaymentDetails.write(inner.invoiceDetails, into);
|
|
3191
3590
|
return;
|
|
3192
3591
|
}
|
|
3193
3592
|
case PaymentDetails_Tags.Lightning:
|
|
@@ -3200,6 +3599,7 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3200
3599
|
FfiConverterString.write(inner.paymentHash, into);
|
|
3201
3600
|
FfiConverterString.write(inner.destinationPubkey, into);
|
|
3202
3601
|
FfiConverterOptionalTypeLnurlPayInfo.write(inner.lnurlPayInfo, into);
|
|
3602
|
+
FfiConverterOptionalTypeLnurlWithdrawInfo.write(inner.lnurlWithdrawInfo, into);
|
|
3203
3603
|
return;
|
|
3204
3604
|
}
|
|
3205
3605
|
case PaymentDetails_Tags.Withdraw:
|
|
@@ -3225,7 +3625,10 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3225
3625
|
switch (value.tag) {
|
|
3226
3626
|
case PaymentDetails_Tags.Spark:
|
|
3227
3627
|
{
|
|
3228
|
-
|
|
3628
|
+
const inner = value.inner;
|
|
3629
|
+
let size = ordinalConverter.allocationSize(1);
|
|
3630
|
+
size += FfiConverterOptionalTypeSparkInvoicePaymentDetails.allocationSize(inner.invoiceDetails);
|
|
3631
|
+
return size;
|
|
3229
3632
|
}
|
|
3230
3633
|
case PaymentDetails_Tags.Token:
|
|
3231
3634
|
{
|
|
@@ -3233,6 +3636,7 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3233
3636
|
let size = ordinalConverter.allocationSize(2);
|
|
3234
3637
|
size += FfiConverterTypeTokenMetadata.allocationSize(inner.metadata);
|
|
3235
3638
|
size += FfiConverterString.allocationSize(inner.txHash);
|
|
3639
|
+
size += FfiConverterOptionalTypeSparkInvoicePaymentDetails.allocationSize(inner.invoiceDetails);
|
|
3236
3640
|
return size;
|
|
3237
3641
|
}
|
|
3238
3642
|
case PaymentDetails_Tags.Lightning:
|
|
@@ -3245,6 +3649,7 @@ const FfiConverterTypePaymentDetails = (() => {
|
|
|
3245
3649
|
size += FfiConverterString.allocationSize(inner.paymentHash);
|
|
3246
3650
|
size += FfiConverterString.allocationSize(inner.destinationPubkey);
|
|
3247
3651
|
size += FfiConverterOptionalTypeLnurlPayInfo.allocationSize(inner.lnurlPayInfo);
|
|
3652
|
+
size += FfiConverterOptionalTypeLnurlWithdrawInfo.allocationSize(inner.lnurlWithdrawInfo);
|
|
3248
3653
|
return size;
|
|
3249
3654
|
}
|
|
3250
3655
|
case PaymentDetails_Tags.Withdraw:
|
|
@@ -3321,6 +3726,131 @@ const FfiConverterTypePaymentMethod = (() => {
|
|
|
3321
3726
|
return new FFIConverter();
|
|
3322
3727
|
})();
|
|
3323
3728
|
|
|
3729
|
+
// Error type: PaymentObserverError
|
|
3730
|
+
|
|
3731
|
+
// Enum: PaymentObserverError
|
|
3732
|
+
let PaymentObserverError_Tags = exports.PaymentObserverError_Tags = /*#__PURE__*/function (PaymentObserverError_Tags) {
|
|
3733
|
+
PaymentObserverError_Tags["ServiceConnectivity"] = "ServiceConnectivity";
|
|
3734
|
+
PaymentObserverError_Tags["Generic"] = "Generic";
|
|
3735
|
+
return PaymentObserverError_Tags;
|
|
3736
|
+
}({});
|
|
3737
|
+
const PaymentObserverError = exports.PaymentObserverError = (() => {
|
|
3738
|
+
class ServiceConnectivity_ extends _uniffiBindgenReactNative.UniffiError {
|
|
3739
|
+
/**
|
|
3740
|
+
* @private
|
|
3741
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3742
|
+
*/
|
|
3743
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'PaymentObserverError';
|
|
3744
|
+
tag = PaymentObserverError_Tags.ServiceConnectivity;
|
|
3745
|
+
constructor(v0) {
|
|
3746
|
+
super('PaymentObserverError', 'ServiceConnectivity');
|
|
3747
|
+
this.inner = Object.freeze([v0]);
|
|
3748
|
+
}
|
|
3749
|
+
static new(v0) {
|
|
3750
|
+
return new ServiceConnectivity_(v0);
|
|
3751
|
+
}
|
|
3752
|
+
static instanceOf(obj) {
|
|
3753
|
+
return obj.tag === PaymentObserverError_Tags.ServiceConnectivity;
|
|
3754
|
+
}
|
|
3755
|
+
static hasInner(obj) {
|
|
3756
|
+
return ServiceConnectivity_.instanceOf(obj);
|
|
3757
|
+
}
|
|
3758
|
+
static getInner(obj) {
|
|
3759
|
+
return obj.inner;
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
class Generic_ extends _uniffiBindgenReactNative.UniffiError {
|
|
3763
|
+
/**
|
|
3764
|
+
* @private
|
|
3765
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3766
|
+
*/
|
|
3767
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'PaymentObserverError';
|
|
3768
|
+
tag = PaymentObserverError_Tags.Generic;
|
|
3769
|
+
constructor(v0) {
|
|
3770
|
+
super('PaymentObserverError', 'Generic');
|
|
3771
|
+
this.inner = Object.freeze([v0]);
|
|
3772
|
+
}
|
|
3773
|
+
static new(v0) {
|
|
3774
|
+
return new Generic_(v0);
|
|
3775
|
+
}
|
|
3776
|
+
static instanceOf(obj) {
|
|
3777
|
+
return obj.tag === PaymentObserverError_Tags.Generic;
|
|
3778
|
+
}
|
|
3779
|
+
static hasInner(obj) {
|
|
3780
|
+
return Generic_.instanceOf(obj);
|
|
3781
|
+
}
|
|
3782
|
+
static getInner(obj) {
|
|
3783
|
+
return obj.inner;
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3786
|
+
function instanceOf(obj) {
|
|
3787
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'PaymentObserverError';
|
|
3788
|
+
}
|
|
3789
|
+
return Object.freeze({
|
|
3790
|
+
instanceOf,
|
|
3791
|
+
ServiceConnectivity: ServiceConnectivity_,
|
|
3792
|
+
Generic: Generic_
|
|
3793
|
+
});
|
|
3794
|
+
})();
|
|
3795
|
+
// FfiConverter for enum PaymentObserverError
|
|
3796
|
+
const FfiConverterTypePaymentObserverError = (() => {
|
|
3797
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
3798
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
3799
|
+
read(from) {
|
|
3800
|
+
switch (ordinalConverter.read(from)) {
|
|
3801
|
+
case 1:
|
|
3802
|
+
return new PaymentObserverError.ServiceConnectivity(FfiConverterString.read(from));
|
|
3803
|
+
case 2:
|
|
3804
|
+
return new PaymentObserverError.Generic(FfiConverterString.read(from));
|
|
3805
|
+
default:
|
|
3806
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
write(value, into) {
|
|
3810
|
+
switch (value.tag) {
|
|
3811
|
+
case PaymentObserverError_Tags.ServiceConnectivity:
|
|
3812
|
+
{
|
|
3813
|
+
ordinalConverter.write(1, into);
|
|
3814
|
+
const inner = value.inner;
|
|
3815
|
+
FfiConverterString.write(inner[0], into);
|
|
3816
|
+
return;
|
|
3817
|
+
}
|
|
3818
|
+
case PaymentObserverError_Tags.Generic:
|
|
3819
|
+
{
|
|
3820
|
+
ordinalConverter.write(2, into);
|
|
3821
|
+
const inner = value.inner;
|
|
3822
|
+
FfiConverterString.write(inner[0], into);
|
|
3823
|
+
return;
|
|
3824
|
+
}
|
|
3825
|
+
default:
|
|
3826
|
+
// Throwing from here means that PaymentObserverError_Tags hasn't matched an ordinal.
|
|
3827
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
allocationSize(value) {
|
|
3831
|
+
switch (value.tag) {
|
|
3832
|
+
case PaymentObserverError_Tags.ServiceConnectivity:
|
|
3833
|
+
{
|
|
3834
|
+
const inner = value.inner;
|
|
3835
|
+
let size = ordinalConverter.allocationSize(1);
|
|
3836
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3837
|
+
return size;
|
|
3838
|
+
}
|
|
3839
|
+
case PaymentObserverError_Tags.Generic:
|
|
3840
|
+
{
|
|
3841
|
+
const inner = value.inner;
|
|
3842
|
+
let size = ordinalConverter.allocationSize(2);
|
|
3843
|
+
size += FfiConverterString.allocationSize(inner[0]);
|
|
3844
|
+
return size;
|
|
3845
|
+
}
|
|
3846
|
+
default:
|
|
3847
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
3848
|
+
}
|
|
3849
|
+
}
|
|
3850
|
+
}
|
|
3851
|
+
return new FFIConverter();
|
|
3852
|
+
})();
|
|
3853
|
+
|
|
3324
3854
|
/**
|
|
3325
3855
|
* The status of a payment
|
|
3326
3856
|
*/
|
|
@@ -3406,9 +3936,203 @@ const FfiConverterTypePaymentType = (() => {
|
|
|
3406
3936
|
return ordinalConverter.write(2, into);
|
|
3407
3937
|
}
|
|
3408
3938
|
}
|
|
3409
|
-
allocationSize(value) {
|
|
3410
|
-
return ordinalConverter.allocationSize(0);
|
|
3411
|
-
}
|
|
3939
|
+
allocationSize(value) {
|
|
3940
|
+
return ordinalConverter.allocationSize(0);
|
|
3941
|
+
}
|
|
3942
|
+
}
|
|
3943
|
+
return new FFIConverter();
|
|
3944
|
+
})();
|
|
3945
|
+
|
|
3946
|
+
// Enum: ProvisionalPaymentDetails
|
|
3947
|
+
let ProvisionalPaymentDetails_Tags = exports.ProvisionalPaymentDetails_Tags = /*#__PURE__*/function (ProvisionalPaymentDetails_Tags) {
|
|
3948
|
+
ProvisionalPaymentDetails_Tags["Bitcoin"] = "Bitcoin";
|
|
3949
|
+
ProvisionalPaymentDetails_Tags["Lightning"] = "Lightning";
|
|
3950
|
+
ProvisionalPaymentDetails_Tags["Spark"] = "Spark";
|
|
3951
|
+
ProvisionalPaymentDetails_Tags["Token"] = "Token";
|
|
3952
|
+
return ProvisionalPaymentDetails_Tags;
|
|
3953
|
+
}({});
|
|
3954
|
+
const ProvisionalPaymentDetails = exports.ProvisionalPaymentDetails = (() => {
|
|
3955
|
+
class Bitcoin_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3956
|
+
/**
|
|
3957
|
+
* @private
|
|
3958
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3959
|
+
*/
|
|
3960
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ProvisionalPaymentDetails';
|
|
3961
|
+
tag = ProvisionalPaymentDetails_Tags.Bitcoin;
|
|
3962
|
+
constructor(inner) {
|
|
3963
|
+
super('ProvisionalPaymentDetails', 'Bitcoin');
|
|
3964
|
+
this.inner = Object.freeze(inner);
|
|
3965
|
+
}
|
|
3966
|
+
static new(inner) {
|
|
3967
|
+
return new Bitcoin_(inner);
|
|
3968
|
+
}
|
|
3969
|
+
static instanceOf(obj) {
|
|
3970
|
+
return obj.tag === ProvisionalPaymentDetails_Tags.Bitcoin;
|
|
3971
|
+
}
|
|
3972
|
+
}
|
|
3973
|
+
class Lightning_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3974
|
+
/**
|
|
3975
|
+
* @private
|
|
3976
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3977
|
+
*/
|
|
3978
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ProvisionalPaymentDetails';
|
|
3979
|
+
tag = ProvisionalPaymentDetails_Tags.Lightning;
|
|
3980
|
+
constructor(inner) {
|
|
3981
|
+
super('ProvisionalPaymentDetails', 'Lightning');
|
|
3982
|
+
this.inner = Object.freeze(inner);
|
|
3983
|
+
}
|
|
3984
|
+
static new(inner) {
|
|
3985
|
+
return new Lightning_(inner);
|
|
3986
|
+
}
|
|
3987
|
+
static instanceOf(obj) {
|
|
3988
|
+
return obj.tag === ProvisionalPaymentDetails_Tags.Lightning;
|
|
3989
|
+
}
|
|
3990
|
+
}
|
|
3991
|
+
class Spark_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3992
|
+
/**
|
|
3993
|
+
* @private
|
|
3994
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3995
|
+
*/
|
|
3996
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ProvisionalPaymentDetails';
|
|
3997
|
+
tag = ProvisionalPaymentDetails_Tags.Spark;
|
|
3998
|
+
constructor(inner) {
|
|
3999
|
+
super('ProvisionalPaymentDetails', 'Spark');
|
|
4000
|
+
this.inner = Object.freeze(inner);
|
|
4001
|
+
}
|
|
4002
|
+
static new(inner) {
|
|
4003
|
+
return new Spark_(inner);
|
|
4004
|
+
}
|
|
4005
|
+
static instanceOf(obj) {
|
|
4006
|
+
return obj.tag === ProvisionalPaymentDetails_Tags.Spark;
|
|
4007
|
+
}
|
|
4008
|
+
}
|
|
4009
|
+
class Token_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
4010
|
+
/**
|
|
4011
|
+
* @private
|
|
4012
|
+
* This field is private and should not be used, use `tag` instead.
|
|
4013
|
+
*/
|
|
4014
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ProvisionalPaymentDetails';
|
|
4015
|
+
tag = ProvisionalPaymentDetails_Tags.Token;
|
|
4016
|
+
constructor(inner) {
|
|
4017
|
+
super('ProvisionalPaymentDetails', 'Token');
|
|
4018
|
+
this.inner = Object.freeze(inner);
|
|
4019
|
+
}
|
|
4020
|
+
static new(inner) {
|
|
4021
|
+
return new Token_(inner);
|
|
4022
|
+
}
|
|
4023
|
+
static instanceOf(obj) {
|
|
4024
|
+
return obj.tag === ProvisionalPaymentDetails_Tags.Token;
|
|
4025
|
+
}
|
|
4026
|
+
}
|
|
4027
|
+
function instanceOf(obj) {
|
|
4028
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'ProvisionalPaymentDetails';
|
|
4029
|
+
}
|
|
4030
|
+
return Object.freeze({
|
|
4031
|
+
instanceOf,
|
|
4032
|
+
Bitcoin: Bitcoin_,
|
|
4033
|
+
Lightning: Lightning_,
|
|
4034
|
+
Spark: Spark_,
|
|
4035
|
+
Token: Token_
|
|
4036
|
+
});
|
|
4037
|
+
})();
|
|
4038
|
+
// FfiConverter for enum ProvisionalPaymentDetails
|
|
4039
|
+
const FfiConverterTypeProvisionalPaymentDetails = (() => {
|
|
4040
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
4041
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
4042
|
+
read(from) {
|
|
4043
|
+
switch (ordinalConverter.read(from)) {
|
|
4044
|
+
case 1:
|
|
4045
|
+
return new ProvisionalPaymentDetails.Bitcoin({
|
|
4046
|
+
withdrawalAddress: FfiConverterString.read(from)
|
|
4047
|
+
});
|
|
4048
|
+
case 2:
|
|
4049
|
+
return new ProvisionalPaymentDetails.Lightning({
|
|
4050
|
+
invoice: FfiConverterString.read(from)
|
|
4051
|
+
});
|
|
4052
|
+
case 3:
|
|
4053
|
+
return new ProvisionalPaymentDetails.Spark({
|
|
4054
|
+
payRequest: FfiConverterString.read(from)
|
|
4055
|
+
});
|
|
4056
|
+
case 4:
|
|
4057
|
+
return new ProvisionalPaymentDetails.Token({
|
|
4058
|
+
tokenId: FfiConverterString.read(from),
|
|
4059
|
+
payRequest: FfiConverterString.read(from)
|
|
4060
|
+
});
|
|
4061
|
+
default:
|
|
4062
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
4063
|
+
}
|
|
4064
|
+
}
|
|
4065
|
+
write(value, into) {
|
|
4066
|
+
switch (value.tag) {
|
|
4067
|
+
case ProvisionalPaymentDetails_Tags.Bitcoin:
|
|
4068
|
+
{
|
|
4069
|
+
ordinalConverter.write(1, into);
|
|
4070
|
+
const inner = value.inner;
|
|
4071
|
+
FfiConverterString.write(inner.withdrawalAddress, into);
|
|
4072
|
+
return;
|
|
4073
|
+
}
|
|
4074
|
+
case ProvisionalPaymentDetails_Tags.Lightning:
|
|
4075
|
+
{
|
|
4076
|
+
ordinalConverter.write(2, into);
|
|
4077
|
+
const inner = value.inner;
|
|
4078
|
+
FfiConverterString.write(inner.invoice, into);
|
|
4079
|
+
return;
|
|
4080
|
+
}
|
|
4081
|
+
case ProvisionalPaymentDetails_Tags.Spark:
|
|
4082
|
+
{
|
|
4083
|
+
ordinalConverter.write(3, into);
|
|
4084
|
+
const inner = value.inner;
|
|
4085
|
+
FfiConverterString.write(inner.payRequest, into);
|
|
4086
|
+
return;
|
|
4087
|
+
}
|
|
4088
|
+
case ProvisionalPaymentDetails_Tags.Token:
|
|
4089
|
+
{
|
|
4090
|
+
ordinalConverter.write(4, into);
|
|
4091
|
+
const inner = value.inner;
|
|
4092
|
+
FfiConverterString.write(inner.tokenId, into);
|
|
4093
|
+
FfiConverterString.write(inner.payRequest, into);
|
|
4094
|
+
return;
|
|
4095
|
+
}
|
|
4096
|
+
default:
|
|
4097
|
+
// Throwing from here means that ProvisionalPaymentDetails_Tags hasn't matched an ordinal.
|
|
4098
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
allocationSize(value) {
|
|
4102
|
+
switch (value.tag) {
|
|
4103
|
+
case ProvisionalPaymentDetails_Tags.Bitcoin:
|
|
4104
|
+
{
|
|
4105
|
+
const inner = value.inner;
|
|
4106
|
+
let size = ordinalConverter.allocationSize(1);
|
|
4107
|
+
size += FfiConverterString.allocationSize(inner.withdrawalAddress);
|
|
4108
|
+
return size;
|
|
4109
|
+
}
|
|
4110
|
+
case ProvisionalPaymentDetails_Tags.Lightning:
|
|
4111
|
+
{
|
|
4112
|
+
const inner = value.inner;
|
|
4113
|
+
let size = ordinalConverter.allocationSize(2);
|
|
4114
|
+
size += FfiConverterString.allocationSize(inner.invoice);
|
|
4115
|
+
return size;
|
|
4116
|
+
}
|
|
4117
|
+
case ProvisionalPaymentDetails_Tags.Spark:
|
|
4118
|
+
{
|
|
4119
|
+
const inner = value.inner;
|
|
4120
|
+
let size = ordinalConverter.allocationSize(3);
|
|
4121
|
+
size += FfiConverterString.allocationSize(inner.payRequest);
|
|
4122
|
+
return size;
|
|
4123
|
+
}
|
|
4124
|
+
case ProvisionalPaymentDetails_Tags.Token:
|
|
4125
|
+
{
|
|
4126
|
+
const inner = value.inner;
|
|
4127
|
+
let size = ordinalConverter.allocationSize(4);
|
|
4128
|
+
size += FfiConverterString.allocationSize(inner.tokenId);
|
|
4129
|
+
size += FfiConverterString.allocationSize(inner.payRequest);
|
|
4130
|
+
return size;
|
|
4131
|
+
}
|
|
4132
|
+
default:
|
|
4133
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
3412
4136
|
}
|
|
3413
4137
|
return new FFIConverter();
|
|
3414
4138
|
})();
|
|
@@ -3416,6 +4140,7 @@ const FfiConverterTypePaymentType = (() => {
|
|
|
3416
4140
|
// Enum: ReceivePaymentMethod
|
|
3417
4141
|
let ReceivePaymentMethod_Tags = exports.ReceivePaymentMethod_Tags = /*#__PURE__*/function (ReceivePaymentMethod_Tags) {
|
|
3418
4142
|
ReceivePaymentMethod_Tags["SparkAddress"] = "SparkAddress";
|
|
4143
|
+
ReceivePaymentMethod_Tags["SparkInvoice"] = "SparkInvoice";
|
|
3419
4144
|
ReceivePaymentMethod_Tags["BitcoinAddress"] = "BitcoinAddress";
|
|
3420
4145
|
ReceivePaymentMethod_Tags["Bolt11Invoice"] = "Bolt11Invoice";
|
|
3421
4146
|
return ReceivePaymentMethod_Tags;
|
|
@@ -3438,6 +4163,24 @@ const ReceivePaymentMethod = exports.ReceivePaymentMethod = (() => {
|
|
|
3438
4163
|
return obj.tag === ReceivePaymentMethod_Tags.SparkAddress;
|
|
3439
4164
|
}
|
|
3440
4165
|
}
|
|
4166
|
+
class SparkInvoice_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
4167
|
+
/**
|
|
4168
|
+
* @private
|
|
4169
|
+
* This field is private and should not be used, use `tag` instead.
|
|
4170
|
+
*/
|
|
4171
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'ReceivePaymentMethod';
|
|
4172
|
+
tag = ReceivePaymentMethod_Tags.SparkInvoice;
|
|
4173
|
+
constructor(inner) {
|
|
4174
|
+
super('ReceivePaymentMethod', 'SparkInvoice');
|
|
4175
|
+
this.inner = Object.freeze(inner);
|
|
4176
|
+
}
|
|
4177
|
+
static new(inner) {
|
|
4178
|
+
return new SparkInvoice_(inner);
|
|
4179
|
+
}
|
|
4180
|
+
static instanceOf(obj) {
|
|
4181
|
+
return obj.tag === ReceivePaymentMethod_Tags.SparkInvoice;
|
|
4182
|
+
}
|
|
4183
|
+
}
|
|
3441
4184
|
class BitcoinAddress_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
3442
4185
|
/**
|
|
3443
4186
|
* @private
|
|
@@ -3479,6 +4222,7 @@ const ReceivePaymentMethod = exports.ReceivePaymentMethod = (() => {
|
|
|
3479
4222
|
return Object.freeze({
|
|
3480
4223
|
instanceOf,
|
|
3481
4224
|
SparkAddress: SparkAddress_,
|
|
4225
|
+
SparkInvoice: SparkInvoice_,
|
|
3482
4226
|
BitcoinAddress: BitcoinAddress_,
|
|
3483
4227
|
Bolt11Invoice: Bolt11Invoice_
|
|
3484
4228
|
});
|
|
@@ -3492,8 +4236,16 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
|
|
|
3492
4236
|
case 1:
|
|
3493
4237
|
return new ReceivePaymentMethod.SparkAddress();
|
|
3494
4238
|
case 2:
|
|
3495
|
-
return new ReceivePaymentMethod.
|
|
4239
|
+
return new ReceivePaymentMethod.SparkInvoice({
|
|
4240
|
+
amount: FfiConverterOptionalTypeu128.read(from),
|
|
4241
|
+
tokenIdentifier: FfiConverterOptionalString.read(from),
|
|
4242
|
+
expiryTime: FfiConverterOptionalUInt64.read(from),
|
|
4243
|
+
description: FfiConverterOptionalString.read(from),
|
|
4244
|
+
senderPublicKey: FfiConverterOptionalString.read(from)
|
|
4245
|
+
});
|
|
3496
4246
|
case 3:
|
|
4247
|
+
return new ReceivePaymentMethod.BitcoinAddress();
|
|
4248
|
+
case 4:
|
|
3497
4249
|
return new ReceivePaymentMethod.Bolt11Invoice({
|
|
3498
4250
|
description: FfiConverterString.read(from),
|
|
3499
4251
|
amountSats: FfiConverterOptionalUInt64.read(from)
|
|
@@ -3509,14 +4261,25 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
|
|
|
3509
4261
|
ordinalConverter.write(1, into);
|
|
3510
4262
|
return;
|
|
3511
4263
|
}
|
|
3512
|
-
case ReceivePaymentMethod_Tags.
|
|
4264
|
+
case ReceivePaymentMethod_Tags.SparkInvoice:
|
|
3513
4265
|
{
|
|
3514
4266
|
ordinalConverter.write(2, into);
|
|
4267
|
+
const inner = value.inner;
|
|
4268
|
+
FfiConverterOptionalTypeu128.write(inner.amount, into);
|
|
4269
|
+
FfiConverterOptionalString.write(inner.tokenIdentifier, into);
|
|
4270
|
+
FfiConverterOptionalUInt64.write(inner.expiryTime, into);
|
|
4271
|
+
FfiConverterOptionalString.write(inner.description, into);
|
|
4272
|
+
FfiConverterOptionalString.write(inner.senderPublicKey, into);
|
|
3515
4273
|
return;
|
|
3516
4274
|
}
|
|
3517
|
-
case ReceivePaymentMethod_Tags.
|
|
4275
|
+
case ReceivePaymentMethod_Tags.BitcoinAddress:
|
|
3518
4276
|
{
|
|
3519
4277
|
ordinalConverter.write(3, into);
|
|
4278
|
+
return;
|
|
4279
|
+
}
|
|
4280
|
+
case ReceivePaymentMethod_Tags.Bolt11Invoice:
|
|
4281
|
+
{
|
|
4282
|
+
ordinalConverter.write(4, into);
|
|
3520
4283
|
const inner = value.inner;
|
|
3521
4284
|
FfiConverterString.write(inner.description, into);
|
|
3522
4285
|
FfiConverterOptionalUInt64.write(inner.amountSats, into);
|
|
@@ -3533,14 +4296,25 @@ const FfiConverterTypeReceivePaymentMethod = (() => {
|
|
|
3533
4296
|
{
|
|
3534
4297
|
return ordinalConverter.allocationSize(1);
|
|
3535
4298
|
}
|
|
4299
|
+
case ReceivePaymentMethod_Tags.SparkInvoice:
|
|
4300
|
+
{
|
|
4301
|
+
const inner = value.inner;
|
|
4302
|
+
let size = ordinalConverter.allocationSize(2);
|
|
4303
|
+
size += FfiConverterOptionalTypeu128.allocationSize(inner.amount);
|
|
4304
|
+
size += FfiConverterOptionalString.allocationSize(inner.tokenIdentifier);
|
|
4305
|
+
size += FfiConverterOptionalUInt64.allocationSize(inner.expiryTime);
|
|
4306
|
+
size += FfiConverterOptionalString.allocationSize(inner.description);
|
|
4307
|
+
size += FfiConverterOptionalString.allocationSize(inner.senderPublicKey);
|
|
4308
|
+
return size;
|
|
4309
|
+
}
|
|
3536
4310
|
case ReceivePaymentMethod_Tags.BitcoinAddress:
|
|
3537
4311
|
{
|
|
3538
|
-
return ordinalConverter.allocationSize(
|
|
4312
|
+
return ordinalConverter.allocationSize(3);
|
|
3539
4313
|
}
|
|
3540
4314
|
case ReceivePaymentMethod_Tags.Bolt11Invoice:
|
|
3541
4315
|
{
|
|
3542
4316
|
const inner = value.inner;
|
|
3543
|
-
let size = ordinalConverter.allocationSize(
|
|
4317
|
+
let size = ordinalConverter.allocationSize(4);
|
|
3544
4318
|
size += FfiConverterString.allocationSize(inner.description);
|
|
3545
4319
|
size += FfiConverterOptionalUInt64.allocationSize(inner.amountSats);
|
|
3546
4320
|
return size;
|
|
@@ -4419,6 +5193,7 @@ let SendPaymentMethod_Tags = exports.SendPaymentMethod_Tags = /*#__PURE__*/funct
|
|
|
4419
5193
|
SendPaymentMethod_Tags["BitcoinAddress"] = "BitcoinAddress";
|
|
4420
5194
|
SendPaymentMethod_Tags["Bolt11Invoice"] = "Bolt11Invoice";
|
|
4421
5195
|
SendPaymentMethod_Tags["SparkAddress"] = "SparkAddress";
|
|
5196
|
+
SendPaymentMethod_Tags["SparkInvoice"] = "SparkInvoice";
|
|
4422
5197
|
return SendPaymentMethod_Tags;
|
|
4423
5198
|
}({});
|
|
4424
5199
|
const SendPaymentMethod = exports.SendPaymentMethod = (() => {
|
|
@@ -4476,6 +5251,24 @@ const SendPaymentMethod = exports.SendPaymentMethod = (() => {
|
|
|
4476
5251
|
return obj.tag === SendPaymentMethod_Tags.SparkAddress;
|
|
4477
5252
|
}
|
|
4478
5253
|
}
|
|
5254
|
+
class SparkInvoice_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
5255
|
+
/**
|
|
5256
|
+
* @private
|
|
5257
|
+
* This field is private and should not be used, use `tag` instead.
|
|
5258
|
+
*/
|
|
5259
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'SendPaymentMethod';
|
|
5260
|
+
tag = SendPaymentMethod_Tags.SparkInvoice;
|
|
5261
|
+
constructor(inner) {
|
|
5262
|
+
super('SendPaymentMethod', 'SparkInvoice');
|
|
5263
|
+
this.inner = Object.freeze(inner);
|
|
5264
|
+
}
|
|
5265
|
+
static new(inner) {
|
|
5266
|
+
return new SparkInvoice_(inner);
|
|
5267
|
+
}
|
|
5268
|
+
static instanceOf(obj) {
|
|
5269
|
+
return obj.tag === SendPaymentMethod_Tags.SparkInvoice;
|
|
5270
|
+
}
|
|
5271
|
+
}
|
|
4479
5272
|
function instanceOf(obj) {
|
|
4480
5273
|
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'SendPaymentMethod';
|
|
4481
5274
|
}
|
|
@@ -4483,7 +5276,8 @@ const SendPaymentMethod = exports.SendPaymentMethod = (() => {
|
|
|
4483
5276
|
instanceOf,
|
|
4484
5277
|
BitcoinAddress: BitcoinAddress_,
|
|
4485
5278
|
Bolt11Invoice: Bolt11Invoice_,
|
|
4486
|
-
SparkAddress: SparkAddress_
|
|
5279
|
+
SparkAddress: SparkAddress_,
|
|
5280
|
+
SparkInvoice: SparkInvoice_
|
|
4487
5281
|
});
|
|
4488
5282
|
})();
|
|
4489
5283
|
// FfiConverter for enum SendPaymentMethod
|
|
@@ -4509,6 +5303,12 @@ const FfiConverterTypeSendPaymentMethod = (() => {
|
|
|
4509
5303
|
fee: FfiConverterTypeu128.read(from),
|
|
4510
5304
|
tokenIdentifier: FfiConverterOptionalString.read(from)
|
|
4511
5305
|
});
|
|
5306
|
+
case 4:
|
|
5307
|
+
return new SendPaymentMethod.SparkInvoice({
|
|
5308
|
+
sparkInvoiceDetails: FfiConverterTypeSparkInvoiceDetails.read(from),
|
|
5309
|
+
fee: FfiConverterTypeu128.read(from),
|
|
5310
|
+
tokenIdentifier: FfiConverterOptionalString.read(from)
|
|
5311
|
+
});
|
|
4512
5312
|
default:
|
|
4513
5313
|
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
4514
5314
|
}
|
|
@@ -4541,6 +5341,15 @@ const FfiConverterTypeSendPaymentMethod = (() => {
|
|
|
4541
5341
|
FfiConverterOptionalString.write(inner.tokenIdentifier, into);
|
|
4542
5342
|
return;
|
|
4543
5343
|
}
|
|
5344
|
+
case SendPaymentMethod_Tags.SparkInvoice:
|
|
5345
|
+
{
|
|
5346
|
+
ordinalConverter.write(4, into);
|
|
5347
|
+
const inner = value.inner;
|
|
5348
|
+
FfiConverterTypeSparkInvoiceDetails.write(inner.sparkInvoiceDetails, into);
|
|
5349
|
+
FfiConverterTypeu128.write(inner.fee, into);
|
|
5350
|
+
FfiConverterOptionalString.write(inner.tokenIdentifier, into);
|
|
5351
|
+
return;
|
|
5352
|
+
}
|
|
4544
5353
|
default:
|
|
4545
5354
|
// Throwing from here means that SendPaymentMethod_Tags hasn't matched an ordinal.
|
|
4546
5355
|
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -4574,6 +5383,15 @@ const FfiConverterTypeSendPaymentMethod = (() => {
|
|
|
4574
5383
|
size += FfiConverterOptionalString.allocationSize(inner.tokenIdentifier);
|
|
4575
5384
|
return size;
|
|
4576
5385
|
}
|
|
5386
|
+
case SendPaymentMethod_Tags.SparkInvoice:
|
|
5387
|
+
{
|
|
5388
|
+
const inner = value.inner;
|
|
5389
|
+
let size = ordinalConverter.allocationSize(4);
|
|
5390
|
+
size += FfiConverterTypeSparkInvoiceDetails.allocationSize(inner.sparkInvoiceDetails);
|
|
5391
|
+
size += FfiConverterTypeu128.allocationSize(inner.fee);
|
|
5392
|
+
size += FfiConverterOptionalString.allocationSize(inner.tokenIdentifier);
|
|
5393
|
+
return size;
|
|
5394
|
+
}
|
|
4577
5395
|
default:
|
|
4578
5396
|
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
4579
5397
|
}
|
|
@@ -5395,6 +6213,25 @@ class BreezSdk extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5395
6213
|
throw __error;
|
|
5396
6214
|
}
|
|
5397
6215
|
}
|
|
6216
|
+
|
|
6217
|
+
/**
|
|
6218
|
+
* Verifies a message signature against the provided public key. The message
|
|
6219
|
+
* is SHA256 hashed before verification. The signature can be hex encoded
|
|
6220
|
+
* in either DER or compact format.
|
|
6221
|
+
*/
|
|
6222
|
+
async checkMessage(request, asyncOpts_) /*throws*/{
|
|
6223
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6224
|
+
try {
|
|
6225
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6226
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterTypeCheckMessageRequest.lower(request));
|
|
6227
|
+
}, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeCheckMessageResponse.lift.bind(FfiConverterTypeCheckMessageResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
6228
|
+
} catch (__error) {
|
|
6229
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6230
|
+
__error.stack = __stack;
|
|
6231
|
+
}
|
|
6232
|
+
throw __error;
|
|
6233
|
+
}
|
|
6234
|
+
}
|
|
5398
6235
|
async claimDeposit(request, asyncOpts_) /*throws*/{
|
|
5399
6236
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5400
6237
|
try {
|
|
@@ -5600,6 +6437,60 @@ class BreezSdk extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5600
6437
|
throw __error;
|
|
5601
6438
|
}
|
|
5602
6439
|
}
|
|
6440
|
+
|
|
6441
|
+
/**
|
|
6442
|
+
* Performs an LNURL withdraw operation for the amount of satoshis to
|
|
6443
|
+
* withdraw and the LNURL withdraw request details. The LNURL withdraw request
|
|
6444
|
+
* details can be obtained from calling [`BreezSdk::parse`].
|
|
6445
|
+
*
|
|
6446
|
+
* The method generates a Lightning invoice for the withdraw amount, stores
|
|
6447
|
+
* the LNURL withdraw metadata, and performs the LNURL withdraw using the generated
|
|
6448
|
+
* invoice.
|
|
6449
|
+
*
|
|
6450
|
+
* If the `completion_timeout_secs` parameter is provided and greater than 0, the
|
|
6451
|
+
* method will wait for the payment to be completed within that period. If the
|
|
6452
|
+
* withdraw is completed within the timeout, the `payment` field in the response
|
|
6453
|
+
* will be set with the payment details. If the `completion_timeout_secs`
|
|
6454
|
+
* parameter is not provided or set to 0, the method will not wait for the payment
|
|
6455
|
+
* to be completed. If the withdraw is not completed within the
|
|
6456
|
+
* timeout, the `payment` field will be empty.
|
|
6457
|
+
*
|
|
6458
|
+
* # Arguments
|
|
6459
|
+
*
|
|
6460
|
+
* * `request` - The LNURL withdraw request
|
|
6461
|
+
*
|
|
6462
|
+
* # Returns
|
|
6463
|
+
*
|
|
6464
|
+
* Result containing either:
|
|
6465
|
+
* * `LnurlWithdrawResponse` - The payment details if the withdraw request was successful
|
|
6466
|
+
* * `SdkError` - If there was an error during the withdraw process
|
|
6467
|
+
*/
|
|
6468
|
+
async lnurlWithdraw(request, asyncOpts_) /*throws*/{
|
|
6469
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6470
|
+
try {
|
|
6471
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6472
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_withdraw(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterTypeLnurlWithdrawRequest.lower(request));
|
|
6473
|
+
}, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeLnurlWithdrawResponse.lift.bind(FfiConverterTypeLnurlWithdrawResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
6474
|
+
} catch (__error) {
|
|
6475
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6476
|
+
__error.stack = __stack;
|
|
6477
|
+
}
|
|
6478
|
+
throw __error;
|
|
6479
|
+
}
|
|
6480
|
+
}
|
|
6481
|
+
async parse(input, asyncOpts_) /*throws*/{
|
|
6482
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6483
|
+
try {
|
|
6484
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6485
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_parse(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterString.lower(input));
|
|
6486
|
+
}, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeInputType.lift.bind(FfiConverterTypeInputType), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
6487
|
+
} catch (__error) {
|
|
6488
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6489
|
+
__error.stack = __stack;
|
|
6490
|
+
}
|
|
6491
|
+
throw __error;
|
|
6492
|
+
}
|
|
6493
|
+
}
|
|
5603
6494
|
async prepareLnurlPay(request, asyncOpts_) /*throws*/{
|
|
5604
6495
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5605
6496
|
try {
|
|
@@ -5704,6 +6595,25 @@ class BreezSdk extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5704
6595
|
}
|
|
5705
6596
|
}
|
|
5706
6597
|
|
|
6598
|
+
/**
|
|
6599
|
+
* Signs a message with the wallet's identity key. The message is SHA256
|
|
6600
|
+
* hashed before signing. The returned signature will be hex encoded in
|
|
6601
|
+
* DER format by default, or compact format if specified.
|
|
6602
|
+
*/
|
|
6603
|
+
async signMessage(request, asyncOpts_) /*throws*/{
|
|
6604
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6605
|
+
try {
|
|
6606
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6607
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sign_message(uniffiTypeBreezSdkObjectFactory.clonePointer(this), FfiConverterTypeSignMessageRequest.lower(request));
|
|
6608
|
+
}, /*pollFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _breez_sdk_sparkFfi.default)().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeSignMessageResponse.lift.bind(FfiConverterTypeSignMessageResponse), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
6609
|
+
} catch (__error) {
|
|
6610
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6611
|
+
__error.stack = __stack;
|
|
6612
|
+
}
|
|
6613
|
+
throw __error;
|
|
6614
|
+
}
|
|
6615
|
+
}
|
|
6616
|
+
|
|
5707
6617
|
/**
|
|
5708
6618
|
* Synchronizes the wallet with the Spark network
|
|
5709
6619
|
*/
|
|
@@ -5785,6 +6695,133 @@ const uniffiTypeBreezSdkObjectFactory = {
|
|
|
5785
6695
|
// FfiConverter for BreezSdkInterface
|
|
5786
6696
|
const FfiConverterTypeBreezSdk = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeBreezSdkObjectFactory);
|
|
5787
6697
|
|
|
6698
|
+
/**
|
|
6699
|
+
* This interface is used to observe outgoing payments before Lightning, Spark and onchain Bitcoin payments.
|
|
6700
|
+
* If the implementation returns an error, the payment is cancelled.
|
|
6701
|
+
*/
|
|
6702
|
+
|
|
6703
|
+
/**
|
|
6704
|
+
* This interface is used to observe outgoing payments before Lightning, Spark and onchain Bitcoin payments.
|
|
6705
|
+
* If the implementation returns an error, the payment is cancelled.
|
|
6706
|
+
*/
|
|
6707
|
+
class PaymentObserverImpl extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
6708
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'PaymentObserverImpl';
|
|
6709
|
+
// No primary constructor declared for this class.
|
|
6710
|
+
constructor(pointer) {
|
|
6711
|
+
super();
|
|
6712
|
+
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
6713
|
+
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypePaymentObserverImplObjectFactory.bless(pointer);
|
|
6714
|
+
}
|
|
6715
|
+
|
|
6716
|
+
/**
|
|
6717
|
+
* Called before Lightning, Spark or onchain Bitcoin payments are made
|
|
6718
|
+
*/
|
|
6719
|
+
async beforeSend(payments, asyncOpts_) /*throws*/{
|
|
6720
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6721
|
+
try {
|
|
6722
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6723
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_paymentobserver_before_send(uniffiTypePaymentObserverImplObjectFactory.clonePointer(this), FfiConverterArrayTypeProvisionalPayment.lower(payments));
|
|
6724
|
+
}, /*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_, /*errorHandler:*/FfiConverterTypePaymentObserverError.lift.bind(FfiConverterTypePaymentObserverError));
|
|
6725
|
+
} catch (__error) {
|
|
6726
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6727
|
+
__error.stack = __stack;
|
|
6728
|
+
}
|
|
6729
|
+
throw __error;
|
|
6730
|
+
}
|
|
6731
|
+
}
|
|
6732
|
+
|
|
6733
|
+
/**
|
|
6734
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
6735
|
+
*/
|
|
6736
|
+
uniffiDestroy() {
|
|
6737
|
+
const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
6738
|
+
if (ptr !== undefined) {
|
|
6739
|
+
const pointer = uniffiTypePaymentObserverImplObjectFactory.pointer(this);
|
|
6740
|
+
uniffiTypePaymentObserverImplObjectFactory.freePointer(pointer);
|
|
6741
|
+
uniffiTypePaymentObserverImplObjectFactory.unbless(ptr);
|
|
6742
|
+
delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
|
|
6743
|
+
}
|
|
6744
|
+
}
|
|
6745
|
+
static instanceOf(obj) {
|
|
6746
|
+
return uniffiTypePaymentObserverImplObjectFactory.isConcreteType(obj);
|
|
6747
|
+
}
|
|
6748
|
+
}
|
|
6749
|
+
exports.PaymentObserverImpl = PaymentObserverImpl;
|
|
6750
|
+
const uniffiTypePaymentObserverImplObjectFactory = {
|
|
6751
|
+
create(pointer) {
|
|
6752
|
+
const instance = Object.create(PaymentObserverImpl.prototype);
|
|
6753
|
+
instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
6754
|
+
instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
|
|
6755
|
+
instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = 'PaymentObserverImpl';
|
|
6756
|
+
return instance;
|
|
6757
|
+
},
|
|
6758
|
+
bless(p) {
|
|
6759
|
+
return uniffiCaller.rustCall(/*caller:*/status => (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_internal_fn_method_paymentobserver_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
|
|
6760
|
+
},
|
|
6761
|
+
unbless(ptr) {
|
|
6762
|
+
ptr.markDestroyed();
|
|
6763
|
+
},
|
|
6764
|
+
pointer(obj) {
|
|
6765
|
+
if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
|
|
6766
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
|
|
6767
|
+
}
|
|
6768
|
+
return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
|
|
6769
|
+
},
|
|
6770
|
+
clonePointer(obj) {
|
|
6771
|
+
const pointer = this.pointer(obj);
|
|
6772
|
+
return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_clone_paymentobserver(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
6773
|
+
},
|
|
6774
|
+
freePointer(pointer) {
|
|
6775
|
+
uniffiCaller.rustCall(/*caller:*/callStatus => (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_free_paymentobserver(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
|
|
6776
|
+
},
|
|
6777
|
+
isConcreteType(obj) {
|
|
6778
|
+
return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === 'PaymentObserverImpl';
|
|
6779
|
+
}
|
|
6780
|
+
};
|
|
6781
|
+
// FfiConverter for PaymentObserver
|
|
6782
|
+
const FfiConverterTypePaymentObserver = new _uniffiBindgenReactNative.FfiConverterObjectWithCallbacks(uniffiTypePaymentObserverImplObjectFactory);
|
|
6783
|
+
|
|
6784
|
+
// Add a vtavble for the callbacks that go in PaymentObserver.
|
|
6785
|
+
|
|
6786
|
+
// Put the implementation in a struct so we don't pollute the top-level namespace
|
|
6787
|
+
const uniffiCallbackInterfacePaymentObserver = {
|
|
6788
|
+
// Create the VTable using a series of closures.
|
|
6789
|
+
// ts automatically converts these into C callback functions.
|
|
6790
|
+
vtable: {
|
|
6791
|
+
beforeSend: (uniffiHandle, payments, uniffiFutureCallback, uniffiCallbackData) => {
|
|
6792
|
+
const uniffiMakeCall = async signal => {
|
|
6793
|
+
const jsCallback = FfiConverterTypePaymentObserver.lift(uniffiHandle);
|
|
6794
|
+
return await jsCallback.beforeSend(FfiConverterArrayTypeProvisionalPayment.lift(payments), {
|
|
6795
|
+
signal
|
|
6796
|
+
});
|
|
6797
|
+
};
|
|
6798
|
+
const uniffiHandleSuccess = returnValue => {
|
|
6799
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructVoid */{
|
|
6800
|
+
callStatus: uniffiCaller.createCallStatus()
|
|
6801
|
+
});
|
|
6802
|
+
};
|
|
6803
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
6804
|
+
uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructVoid */{
|
|
6805
|
+
// TODO create callstatus with error.
|
|
6806
|
+
callStatus: {
|
|
6807
|
+
code,
|
|
6808
|
+
errorBuf
|
|
6809
|
+
}
|
|
6810
|
+
});
|
|
6811
|
+
};
|
|
6812
|
+
const uniffiForeignFuture = (0, _uniffiBindgenReactNative.uniffiTraitInterfaceCallAsyncWithError)(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/PaymentObserverError.instanceOf, /*lowerError:*/FfiConverterTypePaymentObserverError.lower.bind(FfiConverterTypePaymentObserverError), /*lowerString:*/FfiConverterString.lower);
|
|
6813
|
+
return _uniffiBindgenReactNative.UniffiResult.success(uniffiForeignFuture);
|
|
6814
|
+
},
|
|
6815
|
+
uniffiFree: uniffiHandle => {
|
|
6816
|
+
// PaymentObserver: this will throw a stale handle error if the handle isn't found.
|
|
6817
|
+
FfiConverterTypePaymentObserver.drop(uniffiHandle);
|
|
6818
|
+
}
|
|
6819
|
+
},
|
|
6820
|
+
register: () => {
|
|
6821
|
+
(0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_paymentobserver(uniffiCallbackInterfacePaymentObserver.vtable);
|
|
6822
|
+
}
|
|
6823
|
+
};
|
|
6824
|
+
|
|
5788
6825
|
/**
|
|
5789
6826
|
* Builder for creating `BreezSdk` instances with customizable components.
|
|
5790
6827
|
*/
|
|
@@ -5898,6 +6935,25 @@ class SdkBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
5898
6935
|
}
|
|
5899
6936
|
}
|
|
5900
6937
|
|
|
6938
|
+
/**
|
|
6939
|
+
* Sets the payment observer to be used by the SDK.
|
|
6940
|
+
* Arguments:
|
|
6941
|
+
* - `payment_observer`: The payment observer to be used.
|
|
6942
|
+
*/
|
|
6943
|
+
async withPaymentObserver(paymentObserver, asyncOpts_) {
|
|
6944
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6945
|
+
try {
|
|
6946
|
+
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6947
|
+
return (0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_payment_observer(uniffiTypeSdkBuilderObjectFactory.clonePointer(this), FfiConverterTypePaymentObserver.lower(paymentObserver));
|
|
6948
|
+
}, /*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_);
|
|
6949
|
+
} catch (__error) {
|
|
6950
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6951
|
+
__error.stack = __stack;
|
|
6952
|
+
}
|
|
6953
|
+
throw __error;
|
|
6954
|
+
}
|
|
6955
|
+
}
|
|
6956
|
+
|
|
5901
6957
|
/**
|
|
5902
6958
|
* Sets the REST chain service to be used by the SDK.
|
|
5903
6959
|
* Arguments:
|
|
@@ -6631,9 +7687,15 @@ const FfiConverterOptionalTypeLightningAddressInfo = new _uniffiBindgenReactNati
|
|
|
6631
7687
|
// FfiConverter for LnurlPayInfo | undefined
|
|
6632
7688
|
const FfiConverterOptionalTypeLnurlPayInfo = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeLnurlPayInfo);
|
|
6633
7689
|
|
|
7690
|
+
// FfiConverter for LnurlWithdrawInfo | undefined
|
|
7691
|
+
const FfiConverterOptionalTypeLnurlWithdrawInfo = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeLnurlWithdrawInfo);
|
|
7692
|
+
|
|
6634
7693
|
// FfiConverter for Payment | undefined
|
|
6635
7694
|
const FfiConverterOptionalTypePayment = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypePayment);
|
|
6636
7695
|
|
|
7696
|
+
// FfiConverter for SparkInvoicePaymentDetails | undefined
|
|
7697
|
+
const FfiConverterOptionalTypeSparkInvoicePaymentDetails = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeSparkInvoicePaymentDetails);
|
|
7698
|
+
|
|
6637
7699
|
// FfiConverter for string | undefined
|
|
6638
7700
|
const FfiConverterOptionalString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterString);
|
|
6639
7701
|
|
|
@@ -6643,6 +7705,9 @@ const FfiConverterOptionalUInt32 = new _uniffiBindgenReactNative.FfiConverterOpt
|
|
|
6643
7705
|
// FfiConverter for /*u64*/bigint | undefined
|
|
6644
7706
|
const FfiConverterOptionalUInt64 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterUInt64);
|
|
6645
7707
|
|
|
7708
|
+
// FfiConverter for Array<ExternalInputParser>
|
|
7709
|
+
const FfiConverterArrayTypeExternalInputParser = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeExternalInputParser);
|
|
7710
|
+
|
|
6646
7711
|
// FfiConverter for Array<FiatCurrency>
|
|
6647
7712
|
const FfiConverterArrayTypeFiatCurrency = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeFiatCurrency);
|
|
6648
7713
|
|
|
@@ -6655,6 +7720,9 @@ const FfiConverterArrayTypeDepositInfo = new _uniffiBindgenReactNative.FfiConver
|
|
|
6655
7720
|
// FfiConverter for Array<Payment>
|
|
6656
7721
|
const FfiConverterArrayTypePayment = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypePayment);
|
|
6657
7722
|
|
|
7723
|
+
// FfiConverter for Array<ProvisionalPayment>
|
|
7724
|
+
const FfiConverterArrayTypeProvisionalPayment = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeProvisionalPayment);
|
|
7725
|
+
|
|
6658
7726
|
// FfiConverter for Array<TokenMetadata>
|
|
6659
7727
|
const FfiConverterArrayTypeTokenMetadata = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeTokenMetadata);
|
|
6660
7728
|
|
|
@@ -6682,6 +7750,9 @@ const FfiConverterOptionalTypePaymentDetails = new _uniffiBindgenReactNative.Ffi
|
|
|
6682
7750
|
// FfiConverter for SendPaymentOptions | undefined
|
|
6683
7751
|
const FfiConverterOptionalTypeSendPaymentOptions = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeSendPaymentOptions);
|
|
6684
7752
|
|
|
7753
|
+
// FfiConverter for Array<ExternalInputParser> | undefined
|
|
7754
|
+
const FfiConverterOptionalArrayTypeExternalInputParser = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterArrayTypeExternalInputParser);
|
|
7755
|
+
|
|
6685
7756
|
// FfiConverter for Array<PaymentStatus>
|
|
6686
7757
|
const FfiConverterArrayTypePaymentStatus = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypePaymentStatus);
|
|
6687
7758
|
|
|
@@ -6724,9 +7795,6 @@ function uniffiEnsureInitialized() {
|
|
|
6724
7795
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_func_init_logging() !== 8518) {
|
|
6725
7796
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_init_logging');
|
|
6726
7797
|
}
|
|
6727
|
-
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_func_parse() !== 58372) {
|
|
6728
|
-
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_func_parse');
|
|
6729
|
-
}
|
|
6730
7798
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos() !== 20959) {
|
|
6731
7799
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos');
|
|
6732
7800
|
}
|
|
@@ -6745,6 +7813,9 @@ function uniffiEnsureInitialized() {
|
|
|
6745
7813
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available() !== 31624) {
|
|
6746
7814
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available');
|
|
6747
7815
|
}
|
|
7816
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message() !== 4385) {
|
|
7817
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message');
|
|
7818
|
+
}
|
|
6748
7819
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit() !== 43529) {
|
|
6749
7820
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit');
|
|
6750
7821
|
}
|
|
@@ -6781,6 +7852,12 @@ function uniffiEnsureInitialized() {
|
|
|
6781
7852
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay() !== 10147) {
|
|
6782
7853
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay');
|
|
6783
7854
|
}
|
|
7855
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw() !== 45652) {
|
|
7856
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw');
|
|
7857
|
+
}
|
|
7858
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_parse() !== 195) {
|
|
7859
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_parse');
|
|
7860
|
+
}
|
|
6784
7861
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay() !== 37691) {
|
|
6785
7862
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay');
|
|
6786
7863
|
}
|
|
@@ -6802,12 +7879,18 @@ function uniffiEnsureInitialized() {
|
|
|
6802
7879
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment() !== 54349) {
|
|
6803
7880
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment');
|
|
6804
7881
|
}
|
|
7882
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message() !== 57563) {
|
|
7883
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_sign_message');
|
|
7884
|
+
}
|
|
6805
7885
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() !== 30368) {
|
|
6806
7886
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet');
|
|
6807
7887
|
}
|
|
6808
7888
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment() !== 64922) {
|
|
6809
7889
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment');
|
|
6810
7890
|
}
|
|
7891
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send() !== 30686) {
|
|
7892
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_paymentobserver_before_send');
|
|
7893
|
+
}
|
|
6811
7894
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build() !== 8126) {
|
|
6812
7895
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build');
|
|
6813
7896
|
}
|
|
@@ -6823,6 +7906,9 @@ function uniffiEnsureInitialized() {
|
|
|
6823
7906
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client() !== 61720) {
|
|
6824
7907
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client');
|
|
6825
7908
|
}
|
|
7909
|
+
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer() !== 21617) {
|
|
7910
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_payment_observer');
|
|
7911
|
+
}
|
|
6826
7912
|
if ((0, _breez_sdk_sparkFfi.default)().ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service() !== 56288) {
|
|
6827
7913
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service');
|
|
6828
7914
|
}
|
|
@@ -6874,6 +7960,7 @@ function uniffiEnsureInitialized() {
|
|
|
6874
7960
|
uniffiCallbackInterfaceEventListener.register();
|
|
6875
7961
|
uniffiCallbackInterfaceLogger.register();
|
|
6876
7962
|
uniffiCallbackInterfaceBitcoinChainService.register();
|
|
7963
|
+
uniffiCallbackInterfacePaymentObserver.register();
|
|
6877
7964
|
uniffiCallbackInterfaceStorage.register();
|
|
6878
7965
|
}
|
|
6879
7966
|
var _default = exports.default = Object.freeze({
|
|
@@ -6883,6 +7970,8 @@ var _default = exports.default = Object.freeze({
|
|
|
6883
7970
|
FfiConverterTypeBitcoinChainService,
|
|
6884
7971
|
FfiConverterTypeBreezSdk,
|
|
6885
7972
|
FfiConverterTypeCheckLightningAddressRequest,
|
|
7973
|
+
FfiConverterTypeCheckMessageRequest,
|
|
7974
|
+
FfiConverterTypeCheckMessageResponse,
|
|
6886
7975
|
FfiConverterTypeClaimDepositRequest,
|
|
6887
7976
|
FfiConverterTypeClaimDepositResponse,
|
|
6888
7977
|
FfiConverterTypeConfig,
|
|
@@ -6908,6 +7997,9 @@ var _default = exports.default = Object.freeze({
|
|
|
6908
7997
|
FfiConverterTypeLnurlPayInfo,
|
|
6909
7998
|
FfiConverterTypeLnurlPayRequest,
|
|
6910
7999
|
FfiConverterTypeLnurlPayResponse,
|
|
8000
|
+
FfiConverterTypeLnurlWithdrawInfo,
|
|
8001
|
+
FfiConverterTypeLnurlWithdrawRequest,
|
|
8002
|
+
FfiConverterTypeLnurlWithdrawResponse,
|
|
6911
8003
|
FfiConverterTypeLogEntry,
|
|
6912
8004
|
FfiConverterTypeNetwork,
|
|
6913
8005
|
FfiConverterTypeOnchainConfirmationSpeed,
|
|
@@ -6915,12 +8007,15 @@ var _default = exports.default = Object.freeze({
|
|
|
6915
8007
|
FfiConverterTypePaymentDetails,
|
|
6916
8008
|
FfiConverterTypePaymentMetadata,
|
|
6917
8009
|
FfiConverterTypePaymentMethod,
|
|
8010
|
+
FfiConverterTypePaymentObserver,
|
|
6918
8011
|
FfiConverterTypePaymentStatus,
|
|
6919
8012
|
FfiConverterTypePaymentType,
|
|
6920
8013
|
FfiConverterTypePrepareLnurlPayRequest,
|
|
6921
8014
|
FfiConverterTypePrepareLnurlPayResponse,
|
|
6922
8015
|
FfiConverterTypePrepareSendPaymentRequest,
|
|
6923
8016
|
FfiConverterTypePrepareSendPaymentResponse,
|
|
8017
|
+
FfiConverterTypeProvisionalPayment,
|
|
8018
|
+
FfiConverterTypeProvisionalPaymentDetails,
|
|
6924
8019
|
FfiConverterTypeReceivePaymentMethod,
|
|
6925
8020
|
FfiConverterTypeReceivePaymentRequest,
|
|
6926
8021
|
FfiConverterTypeReceivePaymentResponse,
|
|
@@ -6936,6 +8031,9 @@ var _default = exports.default = Object.freeze({
|
|
|
6936
8031
|
FfiConverterTypeSendPaymentOptions,
|
|
6937
8032
|
FfiConverterTypeSendPaymentRequest,
|
|
6938
8033
|
FfiConverterTypeSendPaymentResponse,
|
|
8034
|
+
FfiConverterTypeSignMessageRequest,
|
|
8035
|
+
FfiConverterTypeSignMessageResponse,
|
|
8036
|
+
FfiConverterTypeSparkInvoicePaymentDetails,
|
|
6939
8037
|
FfiConverterTypeStorage,
|
|
6940
8038
|
FfiConverterTypeSyncWalletRequest,
|
|
6941
8039
|
FfiConverterTypeSyncWalletResponse,
|