@breeztech/breez-sdk-spark-react-native 0.3.2 → 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 +147 -0
- package/cpp/generated/breez_sdk_spark.hpp +18 -0
- package/lib/commonjs/generated/breez_sdk_common.js +64 -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 +589 -24
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/generated/breez_sdk_common.js +63 -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 +588 -23
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_common.d.ts +79 -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 +6 -0
- 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 +571 -19
- 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 +79 -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 +6 -0
- 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 +571 -19
- 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 +118 -373
- package/src/generated/breez_sdk_spark-ffi.ts +15 -0
- package/src/generated/breez_sdk_spark.ts +1076 -41
|
@@ -1398,47 +1398,6 @@ const FfiConverterTypeRestResponse = (() => {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
return new FFIConverter();
|
|
1400
1400
|
})();
|
|
1401
|
-
/**
|
|
1402
|
-
* Generated factory for {@link SatsPaymentDetails} record objects.
|
|
1403
|
-
*/
|
|
1404
|
-
export const SatsPaymentDetails = (() => {
|
|
1405
|
-
const defaults = () => ({});
|
|
1406
|
-
const create = (() => {
|
|
1407
|
-
return uniffiCreateRecord(defaults);
|
|
1408
|
-
})();
|
|
1409
|
-
return Object.freeze({
|
|
1410
|
-
/**
|
|
1411
|
-
* Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
|
|
1412
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1413
|
-
*/
|
|
1414
|
-
create,
|
|
1415
|
-
/**
|
|
1416
|
-
* Create a frozen instance of {@link SatsPaymentDetails}, with defaults specified
|
|
1417
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1418
|
-
*/
|
|
1419
|
-
new: create,
|
|
1420
|
-
/**
|
|
1421
|
-
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1422
|
-
*/
|
|
1423
|
-
defaults: () => Object.freeze(defaults())
|
|
1424
|
-
});
|
|
1425
|
-
})();
|
|
1426
|
-
const FfiConverterTypeSatsPaymentDetails = (() => {
|
|
1427
|
-
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1428
|
-
read(from) {
|
|
1429
|
-
return {
|
|
1430
|
-
amount: FfiConverterOptionalUInt64.read(from)
|
|
1431
|
-
};
|
|
1432
|
-
}
|
|
1433
|
-
write(value, into) {
|
|
1434
|
-
FfiConverterOptionalUInt64.write(value.amount, into);
|
|
1435
|
-
}
|
|
1436
|
-
allocationSize(value) {
|
|
1437
|
-
return FfiConverterOptionalUInt64.allocationSize(value.amount);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
return new FFIConverter();
|
|
1441
|
-
})();
|
|
1442
1401
|
/**
|
|
1443
1402
|
* Generated factory for {@link SilentPaymentAddressDetails} record objects.
|
|
1444
1403
|
*/
|
|
@@ -1484,53 +1443,6 @@ const FfiConverterTypeSilentPaymentAddressDetails = (() => {
|
|
|
1484
1443
|
}
|
|
1485
1444
|
return new FFIConverter();
|
|
1486
1445
|
})();
|
|
1487
|
-
/**
|
|
1488
|
-
* Generated factory for {@link SparkAddress} record objects.
|
|
1489
|
-
*/
|
|
1490
|
-
export const SparkAddress = (() => {
|
|
1491
|
-
const defaults = () => ({});
|
|
1492
|
-
const create = (() => {
|
|
1493
|
-
return uniffiCreateRecord(defaults);
|
|
1494
|
-
})();
|
|
1495
|
-
return Object.freeze({
|
|
1496
|
-
/**
|
|
1497
|
-
* Create a frozen instance of {@link SparkAddress}, with defaults specified
|
|
1498
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1499
|
-
*/
|
|
1500
|
-
create,
|
|
1501
|
-
/**
|
|
1502
|
-
* Create a frozen instance of {@link SparkAddress}, with defaults specified
|
|
1503
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1504
|
-
*/
|
|
1505
|
-
new: create,
|
|
1506
|
-
/**
|
|
1507
|
-
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1508
|
-
*/
|
|
1509
|
-
defaults: () => Object.freeze(defaults())
|
|
1510
|
-
});
|
|
1511
|
-
})();
|
|
1512
|
-
const FfiConverterTypeSparkAddress = (() => {
|
|
1513
|
-
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1514
|
-
read(from) {
|
|
1515
|
-
return {
|
|
1516
|
-
identityPublicKey: FfiConverterString.read(from),
|
|
1517
|
-
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
1518
|
-
sparkInvoiceFields: FfiConverterOptionalTypeSparkInvoiceFields.read(from),
|
|
1519
|
-
signature: FfiConverterOptionalString.read(from)
|
|
1520
|
-
};
|
|
1521
|
-
}
|
|
1522
|
-
write(value, into) {
|
|
1523
|
-
FfiConverterString.write(value.identityPublicKey, into);
|
|
1524
|
-
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
1525
|
-
FfiConverterOptionalTypeSparkInvoiceFields.write(value.sparkInvoiceFields, into);
|
|
1526
|
-
FfiConverterOptionalString.write(value.signature, into);
|
|
1527
|
-
}
|
|
1528
|
-
allocationSize(value) {
|
|
1529
|
-
return FfiConverterString.allocationSize(value.identityPublicKey) + FfiConverterTypeBitcoinNetwork.allocationSize(value.network) + FfiConverterOptionalTypeSparkInvoiceFields.allocationSize(value.sparkInvoiceFields) + FfiConverterOptionalString.allocationSize(value.signature);
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
return new FFIConverter();
|
|
1533
|
-
})();
|
|
1534
1446
|
/**
|
|
1535
1447
|
* Generated factory for {@link SparkAddressDetails} record objects.
|
|
1536
1448
|
*/
|
|
@@ -1561,37 +1473,39 @@ const FfiConverterTypeSparkAddressDetails = (() => {
|
|
|
1561
1473
|
read(from) {
|
|
1562
1474
|
return {
|
|
1563
1475
|
address: FfiConverterString.read(from),
|
|
1564
|
-
|
|
1476
|
+
identityPublicKey: FfiConverterString.read(from),
|
|
1477
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
1565
1478
|
source: FfiConverterTypePaymentRequestSource.read(from)
|
|
1566
1479
|
};
|
|
1567
1480
|
}
|
|
1568
1481
|
write(value, into) {
|
|
1569
1482
|
FfiConverterString.write(value.address, into);
|
|
1570
|
-
|
|
1483
|
+
FfiConverterString.write(value.identityPublicKey, into);
|
|
1484
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
1571
1485
|
FfiConverterTypePaymentRequestSource.write(value.source, into);
|
|
1572
1486
|
}
|
|
1573
1487
|
allocationSize(value) {
|
|
1574
|
-
return FfiConverterString.allocationSize(value.address) +
|
|
1488
|
+
return FfiConverterString.allocationSize(value.address) + FfiConverterString.allocationSize(value.identityPublicKey) + FfiConverterTypeBitcoinNetwork.allocationSize(value.network) + FfiConverterTypePaymentRequestSource.allocationSize(value.source);
|
|
1575
1489
|
}
|
|
1576
1490
|
}
|
|
1577
1491
|
return new FFIConverter();
|
|
1578
1492
|
})();
|
|
1579
1493
|
/**
|
|
1580
|
-
* Generated factory for {@link
|
|
1494
|
+
* Generated factory for {@link SparkInvoiceDetails} record objects.
|
|
1581
1495
|
*/
|
|
1582
|
-
export const
|
|
1496
|
+
export const SparkInvoiceDetails = (() => {
|
|
1583
1497
|
const defaults = () => ({});
|
|
1584
1498
|
const create = (() => {
|
|
1585
1499
|
return uniffiCreateRecord(defaults);
|
|
1586
1500
|
})();
|
|
1587
1501
|
return Object.freeze({
|
|
1588
1502
|
/**
|
|
1589
|
-
* Create a frozen instance of {@link
|
|
1503
|
+
* Create a frozen instance of {@link SparkInvoiceDetails}, with defaults specified
|
|
1590
1504
|
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1591
1505
|
*/
|
|
1592
1506
|
create,
|
|
1593
1507
|
/**
|
|
1594
|
-
* Create a frozen instance of {@link
|
|
1508
|
+
* Create a frozen instance of {@link SparkInvoiceDetails}, with defaults specified
|
|
1595
1509
|
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1596
1510
|
*/
|
|
1597
1511
|
new: create,
|
|
@@ -1601,28 +1515,32 @@ export const SparkInvoiceFields = (() => {
|
|
|
1601
1515
|
defaults: () => Object.freeze(defaults())
|
|
1602
1516
|
});
|
|
1603
1517
|
})();
|
|
1604
|
-
const
|
|
1518
|
+
const FfiConverterTypeSparkInvoiceDetails = (() => {
|
|
1605
1519
|
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1606
1520
|
read(from) {
|
|
1607
1521
|
return {
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1522
|
+
invoice: FfiConverterString.read(from),
|
|
1523
|
+
identityPublicKey: FfiConverterString.read(from),
|
|
1524
|
+
network: FfiConverterTypeBitcoinNetwork.read(from),
|
|
1525
|
+
amount: FfiConverterOptionalTypecommon_u128.read(from),
|
|
1526
|
+
tokenIdentifier: FfiConverterOptionalString.read(from),
|
|
1612
1527
|
expiryTime: FfiConverterOptionalUInt64.read(from),
|
|
1613
|
-
|
|
1528
|
+
description: FfiConverterOptionalString.read(from),
|
|
1529
|
+
senderPublicKey: FfiConverterOptionalString.read(from)
|
|
1614
1530
|
};
|
|
1615
1531
|
}
|
|
1616
1532
|
write(value, into) {
|
|
1617
|
-
FfiConverterString.write(value.
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1533
|
+
FfiConverterString.write(value.invoice, into);
|
|
1534
|
+
FfiConverterString.write(value.identityPublicKey, into);
|
|
1535
|
+
FfiConverterTypeBitcoinNetwork.write(value.network, into);
|
|
1536
|
+
FfiConverterOptionalTypecommon_u128.write(value.amount, into);
|
|
1537
|
+
FfiConverterOptionalString.write(value.tokenIdentifier, into);
|
|
1621
1538
|
FfiConverterOptionalUInt64.write(value.expiryTime, into);
|
|
1622
|
-
|
|
1539
|
+
FfiConverterOptionalString.write(value.description, into);
|
|
1540
|
+
FfiConverterOptionalString.write(value.senderPublicKey, into);
|
|
1623
1541
|
}
|
|
1624
1542
|
allocationSize(value) {
|
|
1625
|
-
return FfiConverterString.allocationSize(value.
|
|
1543
|
+
return FfiConverterString.allocationSize(value.invoice) + FfiConverterString.allocationSize(value.identityPublicKey) + FfiConverterTypeBitcoinNetwork.allocationSize(value.network) + FfiConverterOptionalTypecommon_u128.allocationSize(value.amount) + FfiConverterOptionalString.allocationSize(value.tokenIdentifier) + FfiConverterOptionalUInt64.allocationSize(value.expiryTime) + FfiConverterOptionalString.allocationSize(value.description) + FfiConverterOptionalString.allocationSize(value.senderPublicKey);
|
|
1626
1544
|
}
|
|
1627
1545
|
}
|
|
1628
1546
|
return new FFIConverter();
|
|
@@ -1679,49 +1597,6 @@ const FfiConverterTypeSymbol = (() => {
|
|
|
1679
1597
|
}
|
|
1680
1598
|
return new FFIConverter();
|
|
1681
1599
|
})();
|
|
1682
|
-
/**
|
|
1683
|
-
* Generated factory for {@link TokensPaymentDetails} record objects.
|
|
1684
|
-
*/
|
|
1685
|
-
export const TokensPaymentDetails = (() => {
|
|
1686
|
-
const defaults = () => ({});
|
|
1687
|
-
const create = (() => {
|
|
1688
|
-
return uniffiCreateRecord(defaults);
|
|
1689
|
-
})();
|
|
1690
|
-
return Object.freeze({
|
|
1691
|
-
/**
|
|
1692
|
-
* Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
|
|
1693
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1694
|
-
*/
|
|
1695
|
-
create,
|
|
1696
|
-
/**
|
|
1697
|
-
* Create a frozen instance of {@link TokensPaymentDetails}, with defaults specified
|
|
1698
|
-
* in Rust, in the {@link breez_sdk_common} crate.
|
|
1699
|
-
*/
|
|
1700
|
-
new: create,
|
|
1701
|
-
/**
|
|
1702
|
-
* Defaults specified in the {@link breez_sdk_common} crate.
|
|
1703
|
-
*/
|
|
1704
|
-
defaults: () => Object.freeze(defaults())
|
|
1705
|
-
});
|
|
1706
|
-
})();
|
|
1707
|
-
const FfiConverterTypeTokensPaymentDetails = (() => {
|
|
1708
|
-
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1709
|
-
read(from) {
|
|
1710
|
-
return {
|
|
1711
|
-
tokenIdentifier: FfiConverterOptionalString.read(from),
|
|
1712
|
-
amount: FfiConverterOptionalTypecommon_u128.read(from)
|
|
1713
|
-
};
|
|
1714
|
-
}
|
|
1715
|
-
write(value, into) {
|
|
1716
|
-
FfiConverterOptionalString.write(value.tokenIdentifier, into);
|
|
1717
|
-
FfiConverterOptionalTypecommon_u128.write(value.amount, into);
|
|
1718
|
-
}
|
|
1719
|
-
allocationSize(value) {
|
|
1720
|
-
return FfiConverterOptionalString.allocationSize(value.tokenIdentifier) + FfiConverterOptionalTypecommon_u128.allocationSize(value.amount);
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
return new FFIConverter();
|
|
1724
|
-
})();
|
|
1725
1600
|
/**
|
|
1726
1601
|
* Generated factory for {@link UrlSuccessActionData} record objects.
|
|
1727
1602
|
*/
|
|
@@ -2116,6 +1991,7 @@ export let InputType_Tags = /*#__PURE__*/function (InputType_Tags) {
|
|
|
2116
1991
|
InputType_Tags["Bolt12InvoiceRequest"] = "Bolt12InvoiceRequest";
|
|
2117
1992
|
InputType_Tags["LnurlWithdraw"] = "LnurlWithdraw";
|
|
2118
1993
|
InputType_Tags["SparkAddress"] = "SparkAddress";
|
|
1994
|
+
InputType_Tags["SparkInvoice"] = "SparkInvoice";
|
|
2119
1995
|
return InputType_Tags;
|
|
2120
1996
|
}({});
|
|
2121
1997
|
export const InputType = (() => {
|
|
@@ -2353,6 +2229,24 @@ export const InputType = (() => {
|
|
|
2353
2229
|
return obj.tag === InputType_Tags.SparkAddress;
|
|
2354
2230
|
}
|
|
2355
2231
|
}
|
|
2232
|
+
class SparkInvoice_ extends UniffiEnum {
|
|
2233
|
+
/**
|
|
2234
|
+
* @private
|
|
2235
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2236
|
+
*/
|
|
2237
|
+
[uniffiTypeNameSymbol] = 'InputType';
|
|
2238
|
+
tag = InputType_Tags.SparkInvoice;
|
|
2239
|
+
constructor(v0) {
|
|
2240
|
+
super('InputType', 'SparkInvoice');
|
|
2241
|
+
this.inner = Object.freeze([v0]);
|
|
2242
|
+
}
|
|
2243
|
+
static new(v0) {
|
|
2244
|
+
return new SparkInvoice_(v0);
|
|
2245
|
+
}
|
|
2246
|
+
static instanceOf(obj) {
|
|
2247
|
+
return obj.tag === InputType_Tags.SparkInvoice;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2356
2250
|
function instanceOf(obj) {
|
|
2357
2251
|
return obj[uniffiTypeNameSymbol] === 'InputType';
|
|
2358
2252
|
}
|
|
@@ -2370,7 +2264,8 @@ export const InputType = (() => {
|
|
|
2370
2264
|
Bip21: Bip21_,
|
|
2371
2265
|
Bolt12InvoiceRequest: Bolt12InvoiceRequest_,
|
|
2372
2266
|
LnurlWithdraw: LnurlWithdraw_,
|
|
2373
|
-
SparkAddress: SparkAddress_
|
|
2267
|
+
SparkAddress: SparkAddress_,
|
|
2268
|
+
SparkInvoice: SparkInvoice_
|
|
2374
2269
|
});
|
|
2375
2270
|
})();
|
|
2376
2271
|
// FfiConverter for enum InputType
|
|
@@ -2405,6 +2300,8 @@ const FfiConverterTypeInputType = (() => {
|
|
|
2405
2300
|
return new InputType.LnurlWithdraw(FfiConverterTypeLnurlWithdrawRequestDetails.read(from));
|
|
2406
2301
|
case 13:
|
|
2407
2302
|
return new InputType.SparkAddress(FfiConverterTypeSparkAddressDetails.read(from));
|
|
2303
|
+
case 14:
|
|
2304
|
+
return new InputType.SparkInvoice(FfiConverterTypeSparkInvoiceDetails.read(from));
|
|
2408
2305
|
default:
|
|
2409
2306
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2410
2307
|
}
|
|
@@ -2502,6 +2399,13 @@ const FfiConverterTypeInputType = (() => {
|
|
|
2502
2399
|
FfiConverterTypeSparkAddressDetails.write(inner[0], into);
|
|
2503
2400
|
return;
|
|
2504
2401
|
}
|
|
2402
|
+
case InputType_Tags.SparkInvoice:
|
|
2403
|
+
{
|
|
2404
|
+
ordinalConverter.write(14, into);
|
|
2405
|
+
const inner = value.inner;
|
|
2406
|
+
FfiConverterTypeSparkInvoiceDetails.write(inner[0], into);
|
|
2407
|
+
return;
|
|
2408
|
+
}
|
|
2505
2409
|
default:
|
|
2506
2410
|
// Throwing from here means that InputType_Tags hasn't matched an ordinal.
|
|
2507
2411
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
@@ -2600,6 +2504,13 @@ const FfiConverterTypeInputType = (() => {
|
|
|
2600
2504
|
size += FfiConverterTypeSparkAddressDetails.allocationSize(inner[0]);
|
|
2601
2505
|
return size;
|
|
2602
2506
|
}
|
|
2507
|
+
case InputType_Tags.SparkInvoice:
|
|
2508
|
+
{
|
|
2509
|
+
const inner = value.inner;
|
|
2510
|
+
let size = ordinalConverter.allocationSize(14);
|
|
2511
|
+
size += FfiConverterTypeSparkInvoiceDetails.allocationSize(inner[0]);
|
|
2512
|
+
return size;
|
|
2513
|
+
}
|
|
2603
2514
|
default:
|
|
2604
2515
|
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2605
2516
|
}
|
|
@@ -3211,117 +3122,6 @@ const FfiConverterTypeServiceConnectivityError = (() => {
|
|
|
3211
3122
|
return new FFIConverter();
|
|
3212
3123
|
})();
|
|
3213
3124
|
|
|
3214
|
-
// Enum: SparkAddressPaymentType
|
|
3215
|
-
export let SparkAddressPaymentType_Tags = /*#__PURE__*/function (SparkAddressPaymentType_Tags) {
|
|
3216
|
-
SparkAddressPaymentType_Tags["TokensPayment"] = "TokensPayment";
|
|
3217
|
-
SparkAddressPaymentType_Tags["SatsPayment"] = "SatsPayment";
|
|
3218
|
-
return SparkAddressPaymentType_Tags;
|
|
3219
|
-
}({});
|
|
3220
|
-
export const SparkAddressPaymentType = (() => {
|
|
3221
|
-
class TokensPayment_ extends UniffiEnum {
|
|
3222
|
-
/**
|
|
3223
|
-
* @private
|
|
3224
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3225
|
-
*/
|
|
3226
|
-
[uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
|
|
3227
|
-
tag = SparkAddressPaymentType_Tags.TokensPayment;
|
|
3228
|
-
constructor(v0) {
|
|
3229
|
-
super('SparkAddressPaymentType', 'TokensPayment');
|
|
3230
|
-
this.inner = Object.freeze([v0]);
|
|
3231
|
-
}
|
|
3232
|
-
static new(v0) {
|
|
3233
|
-
return new TokensPayment_(v0);
|
|
3234
|
-
}
|
|
3235
|
-
static instanceOf(obj) {
|
|
3236
|
-
return obj.tag === SparkAddressPaymentType_Tags.TokensPayment;
|
|
3237
|
-
}
|
|
3238
|
-
}
|
|
3239
|
-
class SatsPayment_ extends UniffiEnum {
|
|
3240
|
-
/**
|
|
3241
|
-
* @private
|
|
3242
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3243
|
-
*/
|
|
3244
|
-
[uniffiTypeNameSymbol] = 'SparkAddressPaymentType';
|
|
3245
|
-
tag = SparkAddressPaymentType_Tags.SatsPayment;
|
|
3246
|
-
constructor(v0) {
|
|
3247
|
-
super('SparkAddressPaymentType', 'SatsPayment');
|
|
3248
|
-
this.inner = Object.freeze([v0]);
|
|
3249
|
-
}
|
|
3250
|
-
static new(v0) {
|
|
3251
|
-
return new SatsPayment_(v0);
|
|
3252
|
-
}
|
|
3253
|
-
static instanceOf(obj) {
|
|
3254
|
-
return obj.tag === SparkAddressPaymentType_Tags.SatsPayment;
|
|
3255
|
-
}
|
|
3256
|
-
}
|
|
3257
|
-
function instanceOf(obj) {
|
|
3258
|
-
return obj[uniffiTypeNameSymbol] === 'SparkAddressPaymentType';
|
|
3259
|
-
}
|
|
3260
|
-
return Object.freeze({
|
|
3261
|
-
instanceOf,
|
|
3262
|
-
TokensPayment: TokensPayment_,
|
|
3263
|
-
SatsPayment: SatsPayment_
|
|
3264
|
-
});
|
|
3265
|
-
})();
|
|
3266
|
-
// FfiConverter for enum SparkAddressPaymentType
|
|
3267
|
-
const FfiConverterTypeSparkAddressPaymentType = (() => {
|
|
3268
|
-
const ordinalConverter = FfiConverterInt32;
|
|
3269
|
-
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
3270
|
-
read(from) {
|
|
3271
|
-
switch (ordinalConverter.read(from)) {
|
|
3272
|
-
case 1:
|
|
3273
|
-
return new SparkAddressPaymentType.TokensPayment(FfiConverterTypeTokensPaymentDetails.read(from));
|
|
3274
|
-
case 2:
|
|
3275
|
-
return new SparkAddressPaymentType.SatsPayment(FfiConverterTypeSatsPaymentDetails.read(from));
|
|
3276
|
-
default:
|
|
3277
|
-
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3280
|
-
write(value, into) {
|
|
3281
|
-
switch (value.tag) {
|
|
3282
|
-
case SparkAddressPaymentType_Tags.TokensPayment:
|
|
3283
|
-
{
|
|
3284
|
-
ordinalConverter.write(1, into);
|
|
3285
|
-
const inner = value.inner;
|
|
3286
|
-
FfiConverterTypeTokensPaymentDetails.write(inner[0], into);
|
|
3287
|
-
return;
|
|
3288
|
-
}
|
|
3289
|
-
case SparkAddressPaymentType_Tags.SatsPayment:
|
|
3290
|
-
{
|
|
3291
|
-
ordinalConverter.write(2, into);
|
|
3292
|
-
const inner = value.inner;
|
|
3293
|
-
FfiConverterTypeSatsPaymentDetails.write(inner[0], into);
|
|
3294
|
-
return;
|
|
3295
|
-
}
|
|
3296
|
-
default:
|
|
3297
|
-
// Throwing from here means that SparkAddressPaymentType_Tags hasn't matched an ordinal.
|
|
3298
|
-
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3299
|
-
}
|
|
3300
|
-
}
|
|
3301
|
-
allocationSize(value) {
|
|
3302
|
-
switch (value.tag) {
|
|
3303
|
-
case SparkAddressPaymentType_Tags.TokensPayment:
|
|
3304
|
-
{
|
|
3305
|
-
const inner = value.inner;
|
|
3306
|
-
let size = ordinalConverter.allocationSize(1);
|
|
3307
|
-
size += FfiConverterTypeTokensPaymentDetails.allocationSize(inner[0]);
|
|
3308
|
-
return size;
|
|
3309
|
-
}
|
|
3310
|
-
case SparkAddressPaymentType_Tags.SatsPayment:
|
|
3311
|
-
{
|
|
3312
|
-
const inner = value.inner;
|
|
3313
|
-
let size = ordinalConverter.allocationSize(2);
|
|
3314
|
-
size += FfiConverterTypeSatsPaymentDetails.allocationSize(inner[0]);
|
|
3315
|
-
return size;
|
|
3316
|
-
}
|
|
3317
|
-
default:
|
|
3318
|
-
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3319
|
-
}
|
|
3320
|
-
}
|
|
3321
|
-
}
|
|
3322
|
-
return new FFIConverter();
|
|
3323
|
-
})();
|
|
3324
|
-
|
|
3325
3125
|
// Enum: SuccessAction
|
|
3326
3126
|
export let SuccessAction_Tags = /*#__PURE__*/function (SuccessAction_Tags) {
|
|
3327
3127
|
SuccessAction_Tags["Aes"] = "Aes";
|
|
@@ -4064,9 +3864,6 @@ const uniffiCallbackInterfaceRestClient = {
|
|
|
4064
3864
|
// FfiConverter for boolean | undefined
|
|
4065
3865
|
const FfiConverterOptionalBool = new FfiConverterOptional(FfiConverterBool);
|
|
4066
3866
|
|
|
4067
|
-
// FfiConverter for SparkInvoiceFields | undefined
|
|
4068
|
-
const FfiConverterOptionalTypeSparkInvoiceFields = new FfiConverterOptional(FfiConverterTypeSparkInvoiceFields);
|
|
4069
|
-
|
|
4070
3867
|
// FfiConverter for Symbol | undefined
|
|
4071
3868
|
const FfiConverterOptionalTypeSymbol = new FfiConverterOptional(FfiConverterTypeSymbol);
|
|
4072
3869
|
|
|
@@ -4112,9 +3909,6 @@ const FfiConverterOptionalTypecommon_u128 = new FfiConverterOptional(FfiConverte
|
|
|
4112
3909
|
// FfiConverter for Amount | undefined
|
|
4113
3910
|
const FfiConverterOptionalTypeAmount = new FfiConverterOptional(FfiConverterTypeAmount);
|
|
4114
3911
|
|
|
4115
|
-
// FfiConverter for SparkAddressPaymentType | undefined
|
|
4116
|
-
const FfiConverterOptionalTypeSparkAddressPaymentType = new FfiConverterOptional(FfiConverterTypeSparkAddressPaymentType);
|
|
4117
|
-
|
|
4118
3912
|
// FfiConverter for Map<string, string> | undefined
|
|
4119
3913
|
const FfiConverterOptionalMapStringString = new FfiConverterOptional(FfiConverterMapStringString);
|
|
4120
3914
|
|
|
@@ -4196,16 +3990,12 @@ export default Object.freeze({
|
|
|
4196
3990
|
FfiConverterTypeRate,
|
|
4197
3991
|
FfiConverterTypeRestClient,
|
|
4198
3992
|
FfiConverterTypeRestResponse,
|
|
4199
|
-
FfiConverterTypeSatsPaymentDetails,
|
|
4200
3993
|
FfiConverterTypeSilentPaymentAddressDetails,
|
|
4201
|
-
FfiConverterTypeSparkAddress,
|
|
4202
3994
|
FfiConverterTypeSparkAddressDetails,
|
|
4203
|
-
|
|
4204
|
-
FfiConverterTypeSparkInvoiceFields,
|
|
3995
|
+
FfiConverterTypeSparkInvoiceDetails,
|
|
4205
3996
|
FfiConverterTypeSuccessAction,
|
|
4206
3997
|
FfiConverterTypeSuccessActionProcessed,
|
|
4207
3998
|
FfiConverterTypeSymbol,
|
|
4208
|
-
FfiConverterTypeTokensPaymentDetails,
|
|
4209
3999
|
FfiConverterTypeUrlSuccessActionData,
|
|
4210
4000
|
FfiConverterTypecommon_u128
|
|
4211
4001
|
}
|