@lightsparkdev/lightspark-sdk 0.4.8 → 0.4.10
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/CHANGELOG.md +12 -0
- package/dist/{chunk-YTXDF6SQ.js → chunk-NXUFC5J7.js} +950 -246
- package/dist/{index-adeff42d.d.ts → index-3ffe9e7b.d.ts} +194 -56
- package/dist/index.cjs +962 -254
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -9
- package/dist/objects/index.cjs +952 -246
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +5 -1
- package/package.json +1 -2
- package/src/client.ts +13 -14
- package/src/objects/Account.ts +36 -30
- package/src/objects/AccountToApiTokensConnection.ts +11 -6
- package/src/objects/AccountToNodesConnection.ts +11 -6
- package/src/objects/AccountToPaymentRequestsConnection.ts +20 -15
- package/src/objects/AccountToTransactionsConnection.ts +19 -14
- package/src/objects/AccountToWalletsConnection.ts +11 -6
- package/src/objects/ApiToken.ts +2 -1
- package/src/objects/Balances.ts +1 -0
- package/src/objects/BitcoinNetwork.ts +2 -1
- package/src/objects/BlockchainBalance.ts +1 -1
- package/src/objects/Channel.ts +2 -2
- package/src/objects/ChannelClosingTransaction.ts +2 -2
- package/src/objects/ChannelFees.ts +1 -0
- package/src/objects/ChannelOpeningTransaction.ts +2 -2
- package/src/objects/ChannelStatus.ts +1 -0
- package/src/objects/Connection.ts +387 -0
- package/src/objects/CreateInvoiceInput.ts +12 -0
- package/src/objects/CreateLnurlInvoiceInput.ts +10 -0
- package/src/objects/CreateTestModePaymentoutput.ts +1 -0
- package/src/objects/CryptoSanctionsScreeningProvider.ts +14 -0
- package/src/objects/CurrencyAmount.ts +1 -1
- package/src/objects/CurrencyUnit.ts +1 -0
- package/src/objects/Deposit.ts +2 -2
- package/src/objects/Entity.ts +1 -1
- package/src/objects/FeeEstimate.ts +1 -0
- package/src/objects/GraphNode.ts +2 -2
- package/src/objects/Hop.ts +2 -2
- package/src/objects/HtlcAttemptFailureCode.ts +1 -0
- package/src/objects/IncomingPayment.ts +19 -6
- package/src/objects/IncomingPaymentAttempt.ts +2 -2
- package/src/objects/IncomingPaymentAttemptStatus.ts +1 -1
- package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -1
- package/src/objects/Invoice.ts +2 -2
- package/src/objects/InvoiceData.ts +1 -1
- package/src/objects/InvoiceType.ts +1 -0
- package/src/objects/LightningTransaction.ts +2 -2
- package/src/objects/LightsparkNode.ts +12 -6
- package/src/objects/LightsparkNodeOwner.ts +2 -2
- package/src/objects/LightsparkNodePurpose.ts +1 -0
- package/src/objects/LightsparkNodeToChannelsConnection.ts +11 -6
- package/src/objects/Node.ts +2 -3
- package/src/objects/NodeAddress.ts +1 -1
- package/src/objects/NodeAddressType.ts +1 -1
- package/src/objects/OnChainTransaction.ts +2 -3
- package/src/objects/OutgoingPayment.ts +14 -6
- package/src/objects/OutgoingPaymentAttempt.ts +14 -6
- package/src/objects/OutgoingPaymentAttemptStatus.ts +1 -1
- package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +21 -1
- package/src/objects/OutgoingPaymentToAttemptsConnection.ts +21 -1
- package/src/objects/PageInfo.ts +1 -0
- package/src/objects/PaymentFailureReason.ts +1 -0
- package/src/objects/PaymentRequest.ts +2 -2
- package/src/objects/PaymentRequestData.ts +1 -1
- package/src/objects/PaymentRequestStatus.ts +1 -0
- package/src/objects/Permission.ts +1 -0
- package/src/objects/RiskRating.ts +18 -0
- package/src/objects/RoutingTransaction.ts +2 -2
- package/src/objects/RoutingTransactionFailureReason.ts +1 -0
- package/src/objects/ScreenBitcoinAddressesInput.ts +23 -0
- package/src/objects/ScreenBitcoinAddressesOutput.ts +25 -0
- package/src/objects/Transaction.ts +2 -2
- package/src/objects/TransactionFailures.ts +1 -0
- package/src/objects/TransactionStatus.ts +1 -0
- package/src/objects/TransactionType.ts +1 -0
- package/src/objects/Wallet.ts +632 -7
- package/src/objects/WalletStatus.ts +1 -0
- package/src/objects/WalletToPaymentRequestsConnection.ts +57 -0
- package/src/objects/WalletToTransactionsConnection.ts +57 -0
- package/src/objects/WebhookEventType.ts +3 -0
- package/src/objects/Withdrawal.ts +2 -2
- package/src/objects/WithdrawalMode.ts +1 -0
- package/src/objects/WithdrawalRequest.ts +2 -1
- package/src/objects/WithdrawalRequestStatus.ts +1 -0
- package/src/objects/index.ts +7 -0
- package/src/objects/.eslintrc.cjs +0 -5
package/dist/objects/index.cjs
CHANGED
|
@@ -35,6 +35,7 @@ __export(objects_exports, {
|
|
|
35
35
|
BitcoinNetwork: () => BitcoinNetwork_default,
|
|
36
36
|
Channel: () => Channel_default,
|
|
37
37
|
ChannelStatus: () => ChannelStatus_default,
|
|
38
|
+
CryptoSanctionsScreeningProvider: () => CryptoSanctionsScreeningProvider_default,
|
|
38
39
|
CurrencyUnit: () => CurrencyUnit_default,
|
|
39
40
|
GraphNode: () => GraphNode_default,
|
|
40
41
|
HtlcAttemptFailureCode: () => HtlcAttemptFailureCode_default,
|
|
@@ -52,6 +53,7 @@ __export(objects_exports, {
|
|
|
52
53
|
PaymentFailureReason: () => PaymentFailureReason_default,
|
|
53
54
|
PaymentRequestStatus: () => PaymentRequestStatus_default,
|
|
54
55
|
Permission: () => Permission_default,
|
|
56
|
+
RiskRating: () => RiskRating_default,
|
|
55
57
|
RoutingTransactionFailureReason: () => RoutingTransactionFailureReason_default,
|
|
56
58
|
TransactionStatus: () => TransactionStatus_default,
|
|
57
59
|
TransactionType: () => TransactionType_default,
|
|
@@ -155,13 +157,14 @@ var PageInfoFromJson = (obj) => {
|
|
|
155
157
|
// src/objects/AccountToApiTokensConnection.ts
|
|
156
158
|
var AccountToApiTokensConnectionFromJson = (obj) => {
|
|
157
159
|
return {
|
|
160
|
+
count: obj["account_to_api_tokens_connection_count"],
|
|
158
161
|
pageInfo: PageInfoFromJson(
|
|
159
162
|
obj["account_to_api_tokens_connection_page_info"]
|
|
160
163
|
),
|
|
161
|
-
count: obj["account_to_api_tokens_connection_count"],
|
|
162
164
|
entities: obj["account_to_api_tokens_connection_entities"].map(
|
|
163
165
|
(e) => ApiTokenFromJson(e)
|
|
164
|
-
)
|
|
166
|
+
),
|
|
167
|
+
typename: "AccountToApiTokensConnection"
|
|
165
168
|
};
|
|
166
169
|
};
|
|
167
170
|
|
|
@@ -542,13 +545,14 @@ var LightsparkNodeStatus_default = LightsparkNodeStatus;
|
|
|
542
545
|
// src/objects/LightsparkNodeToChannelsConnection.ts
|
|
543
546
|
var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
|
|
544
547
|
return {
|
|
548
|
+
count: obj["lightspark_node_to_channels_connection_count"],
|
|
545
549
|
pageInfo: PageInfoFromJson(
|
|
546
550
|
obj["lightspark_node_to_channels_connection_page_info"]
|
|
547
551
|
),
|
|
548
|
-
count: obj["lightspark_node_to_channels_connection_count"],
|
|
549
552
|
entities: obj["lightspark_node_to_channels_connection_entities"].map(
|
|
550
553
|
(e) => ChannelFromJson(e)
|
|
551
|
-
)
|
|
554
|
+
),
|
|
555
|
+
typename: "LightsparkNodeToChannelsConnection"
|
|
552
556
|
};
|
|
553
557
|
};
|
|
554
558
|
|
|
@@ -639,14 +643,15 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
|
|
|
639
643
|
}
|
|
640
644
|
});
|
|
641
645
|
}
|
|
642
|
-
async getChannels(client, first = void 0, statuses = void 0) {
|
|
646
|
+
async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
|
|
643
647
|
return await client.executeRawQuery({
|
|
644
648
|
queryPayload: `
|
|
645
|
-
query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!]) {
|
|
649
|
+
query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
|
|
646
650
|
entity(id: $entity_id) {
|
|
647
651
|
... on LightsparkNode {
|
|
648
|
-
channels(, first: $first, statuses: $statuses) {
|
|
652
|
+
channels(, first: $first, statuses: $statuses, after: $after) {
|
|
649
653
|
__typename
|
|
654
|
+
lightspark_node_to_channels_connection_count: count
|
|
650
655
|
lightspark_node_to_channels_connection_page_info: page_info {
|
|
651
656
|
__typename
|
|
652
657
|
page_info_has_next_page: has_next_page
|
|
@@ -654,7 +659,6 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
|
|
|
654
659
|
page_info_start_cursor: start_cursor
|
|
655
660
|
page_info_end_cursor: end_cursor
|
|
656
661
|
}
|
|
657
|
-
lightspark_node_to_channels_connection_count: count
|
|
658
662
|
lightspark_node_to_channels_connection_entities: entities {
|
|
659
663
|
__typename
|
|
660
664
|
channel_id: id
|
|
@@ -754,7 +758,12 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
|
|
|
754
758
|
}
|
|
755
759
|
}
|
|
756
760
|
`,
|
|
757
|
-
variables: {
|
|
761
|
+
variables: {
|
|
762
|
+
entity_id: this.id,
|
|
763
|
+
first,
|
|
764
|
+
statuses,
|
|
765
|
+
after
|
|
766
|
+
},
|
|
758
767
|
constructObject: (json) => {
|
|
759
768
|
const connection = json["entity"]["channels"];
|
|
760
769
|
return LightsparkNodeToChannelsConnectionFromJson(connection);
|
|
@@ -917,11 +926,12 @@ var LightsparkNode_default = LightsparkNode;
|
|
|
917
926
|
// src/objects/AccountToNodesConnection.ts
|
|
918
927
|
var AccountToNodesConnectionFromJson = (obj) => {
|
|
919
928
|
return {
|
|
920
|
-
pageInfo: PageInfoFromJson(obj["account_to_nodes_connection_page_info"]),
|
|
921
929
|
count: obj["account_to_nodes_connection_count"],
|
|
930
|
+
pageInfo: PageInfoFromJson(obj["account_to_nodes_connection_page_info"]),
|
|
922
931
|
entities: obj["account_to_nodes_connection_entities"].map(
|
|
923
932
|
(e) => LightsparkNodeFromJson(e)
|
|
924
933
|
),
|
|
934
|
+
typename: "AccountToNodesConnection",
|
|
925
935
|
purpose: !!obj["account_to_nodes_connection_purpose"] ? LightsparkNodePurpose_default[obj["account_to_nodes_connection_purpose"]] ?? LightsparkNodePurpose_default.FUTURE_VALUE : null
|
|
926
936
|
};
|
|
927
937
|
};
|
|
@@ -1473,13 +1483,14 @@ ${FRAGMENT6}
|
|
|
1473
1483
|
// src/objects/AccountToPaymentRequestsConnection.ts
|
|
1474
1484
|
var AccountToPaymentRequestsConnectionFromJson = (obj) => {
|
|
1475
1485
|
return {
|
|
1476
|
-
|
|
1477
|
-
(e) => PaymentRequestFromJson(e)
|
|
1478
|
-
),
|
|
1486
|
+
count: obj["account_to_payment_requests_connection_count"],
|
|
1479
1487
|
pageInfo: PageInfoFromJson(
|
|
1480
1488
|
obj["account_to_payment_requests_connection_page_info"]
|
|
1481
1489
|
),
|
|
1482
|
-
|
|
1490
|
+
entities: obj["account_to_payment_requests_connection_entities"].map(
|
|
1491
|
+
(e) => PaymentRequestFromJson(e)
|
|
1492
|
+
),
|
|
1493
|
+
typename: "AccountToPaymentRequestsConnection"
|
|
1483
1494
|
};
|
|
1484
1495
|
};
|
|
1485
1496
|
|
|
@@ -1555,9 +1566,13 @@ ${FRAGMENT7}
|
|
|
1555
1566
|
var IncomingPaymentToAttemptsConnectionFromJson = (obj) => {
|
|
1556
1567
|
return {
|
|
1557
1568
|
count: obj["incoming_payment_to_attempts_connection_count"],
|
|
1569
|
+
pageInfo: PageInfoFromJson(
|
|
1570
|
+
obj["incoming_payment_to_attempts_connection_page_info"]
|
|
1571
|
+
),
|
|
1558
1572
|
entities: obj["incoming_payment_to_attempts_connection_entities"].map(
|
|
1559
1573
|
(e) => IncomingPaymentAttemptFromJson(e)
|
|
1560
|
-
)
|
|
1574
|
+
),
|
|
1575
|
+
typename: "IncomingPaymentToAttemptsConnection"
|
|
1561
1576
|
};
|
|
1562
1577
|
};
|
|
1563
1578
|
|
|
@@ -1590,15 +1605,22 @@ var IncomingPayment = class {
|
|
|
1590
1605
|
this.paymentRequestId = paymentRequestId;
|
|
1591
1606
|
(0, import_auto_bind6.default)(this);
|
|
1592
1607
|
}
|
|
1593
|
-
async getAttempts(client, first = void 0, statuses = void 0) {
|
|
1608
|
+
async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
|
|
1594
1609
|
return await client.executeRawQuery({
|
|
1595
1610
|
queryPayload: `
|
|
1596
|
-
query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $statuses: [IncomingPaymentAttemptStatus!]) {
|
|
1611
|
+
query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $statuses: [IncomingPaymentAttemptStatus!], $after: String) {
|
|
1597
1612
|
entity(id: $entity_id) {
|
|
1598
1613
|
... on IncomingPayment {
|
|
1599
|
-
attempts(, first: $first, statuses: $statuses) {
|
|
1614
|
+
attempts(, first: $first, statuses: $statuses, after: $after) {
|
|
1600
1615
|
__typename
|
|
1601
1616
|
incoming_payment_to_attempts_connection_count: count
|
|
1617
|
+
incoming_payment_to_attempts_connection_page_info: page_info {
|
|
1618
|
+
__typename
|
|
1619
|
+
page_info_has_next_page: has_next_page
|
|
1620
|
+
page_info_has_previous_page: has_previous_page
|
|
1621
|
+
page_info_start_cursor: start_cursor
|
|
1622
|
+
page_info_end_cursor: end_cursor
|
|
1623
|
+
}
|
|
1602
1624
|
incoming_payment_to_attempts_connection_entities: entities {
|
|
1603
1625
|
__typename
|
|
1604
1626
|
incoming_payment_attempt_id: id
|
|
@@ -1623,7 +1645,12 @@ query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $st
|
|
|
1623
1645
|
}
|
|
1624
1646
|
}
|
|
1625
1647
|
`,
|
|
1626
|
-
variables: {
|
|
1648
|
+
variables: {
|
|
1649
|
+
entity_id: this.id,
|
|
1650
|
+
first,
|
|
1651
|
+
statuses,
|
|
1652
|
+
after
|
|
1653
|
+
},
|
|
1627
1654
|
constructObject: (json) => {
|
|
1628
1655
|
const connection = json["entity"]["attempts"];
|
|
1629
1656
|
return IncomingPaymentToAttemptsConnectionFromJson(connection);
|
|
@@ -1808,9 +1835,13 @@ ${FRAGMENT9}
|
|
|
1808
1835
|
var OutgoingPaymentAttemptToHopsConnectionFromJson = (obj) => {
|
|
1809
1836
|
return {
|
|
1810
1837
|
count: obj["outgoing_payment_attempt_to_hops_connection_count"],
|
|
1838
|
+
pageInfo: PageInfoFromJson(
|
|
1839
|
+
obj["outgoing_payment_attempt_to_hops_connection_page_info"]
|
|
1840
|
+
),
|
|
1811
1841
|
entities: obj["outgoing_payment_attempt_to_hops_connection_entities"].map(
|
|
1812
1842
|
(e) => HopFromJson(e)
|
|
1813
|
-
)
|
|
1843
|
+
),
|
|
1844
|
+
typename: "OutgoingPaymentAttemptToHopsConnection"
|
|
1814
1845
|
};
|
|
1815
1846
|
};
|
|
1816
1847
|
|
|
@@ -1830,15 +1861,22 @@ var OutgoingPaymentAttempt = class {
|
|
|
1830
1861
|
this.fees = fees;
|
|
1831
1862
|
(0, import_auto_bind7.default)(this);
|
|
1832
1863
|
}
|
|
1833
|
-
async getHops(client, first = void 0) {
|
|
1864
|
+
async getHops(client, first = void 0, after = void 0) {
|
|
1834
1865
|
return await client.executeRawQuery({
|
|
1835
1866
|
queryPayload: `
|
|
1836
|
-
query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int) {
|
|
1867
|
+
query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int, $after: String) {
|
|
1837
1868
|
entity(id: $entity_id) {
|
|
1838
1869
|
... on OutgoingPaymentAttempt {
|
|
1839
|
-
hops(, first: $first) {
|
|
1870
|
+
hops(, first: $first, after: $after) {
|
|
1840
1871
|
__typename
|
|
1841
1872
|
outgoing_payment_attempt_to_hops_connection_count: count
|
|
1873
|
+
outgoing_payment_attempt_to_hops_connection_page_info: page_info {
|
|
1874
|
+
__typename
|
|
1875
|
+
page_info_has_next_page: has_next_page
|
|
1876
|
+
page_info_has_previous_page: has_previous_page
|
|
1877
|
+
page_info_start_cursor: start_cursor
|
|
1878
|
+
page_info_end_cursor: end_cursor
|
|
1879
|
+
}
|
|
1842
1880
|
outgoing_payment_attempt_to_hops_connection_entities: entities {
|
|
1843
1881
|
__typename
|
|
1844
1882
|
hop_id: id
|
|
@@ -1872,7 +1910,7 @@ query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int)
|
|
|
1872
1910
|
}
|
|
1873
1911
|
}
|
|
1874
1912
|
`,
|
|
1875
|
-
variables: { entity_id: this.id, first },
|
|
1913
|
+
variables: { entity_id: this.id, first, after },
|
|
1876
1914
|
constructObject: (json) => {
|
|
1877
1915
|
const connection = json["entity"]["hops"];
|
|
1878
1916
|
return OutgoingPaymentAttemptToHopsConnectionFromJson(connection);
|
|
@@ -1948,9 +1986,13 @@ var OutgoingPaymentAttempt_default = OutgoingPaymentAttempt;
|
|
|
1948
1986
|
var OutgoingPaymentToAttemptsConnectionFromJson = (obj) => {
|
|
1949
1987
|
return {
|
|
1950
1988
|
count: obj["outgoing_payment_to_attempts_connection_count"],
|
|
1989
|
+
pageInfo: PageInfoFromJson(
|
|
1990
|
+
obj["outgoing_payment_to_attempts_connection_page_info"]
|
|
1991
|
+
),
|
|
1951
1992
|
entities: obj["outgoing_payment_to_attempts_connection_entities"].map(
|
|
1952
1993
|
(e) => OutgoingPaymentAttemptFromJson(e)
|
|
1953
|
-
)
|
|
1994
|
+
),
|
|
1995
|
+
typename: "OutgoingPaymentToAttemptsConnection"
|
|
1954
1996
|
};
|
|
1955
1997
|
};
|
|
1956
1998
|
|
|
@@ -2019,15 +2061,22 @@ var OutgoingPayment = class {
|
|
|
2019
2061
|
this.failureMessage = failureMessage;
|
|
2020
2062
|
(0, import_auto_bind8.default)(this);
|
|
2021
2063
|
}
|
|
2022
|
-
async getAttempts(client, first = void 0) {
|
|
2064
|
+
async getAttempts(client, first = void 0, after = void 0) {
|
|
2023
2065
|
return await client.executeRawQuery({
|
|
2024
2066
|
queryPayload: `
|
|
2025
|
-
query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int) {
|
|
2067
|
+
query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $after: String) {
|
|
2026
2068
|
entity(id: $entity_id) {
|
|
2027
2069
|
... on OutgoingPayment {
|
|
2028
|
-
attempts(, first: $first) {
|
|
2070
|
+
attempts(, first: $first, after: $after) {
|
|
2029
2071
|
__typename
|
|
2030
2072
|
outgoing_payment_to_attempts_connection_count: count
|
|
2073
|
+
outgoing_payment_to_attempts_connection_page_info: page_info {
|
|
2074
|
+
__typename
|
|
2075
|
+
page_info_has_next_page: has_next_page
|
|
2076
|
+
page_info_has_previous_page: has_previous_page
|
|
2077
|
+
page_info_start_cursor: start_cursor
|
|
2078
|
+
page_info_end_cursor: end_cursor
|
|
2079
|
+
}
|
|
2031
2080
|
outgoing_payment_to_attempts_connection_entities: entities {
|
|
2032
2081
|
__typename
|
|
2033
2082
|
outgoing_payment_attempt_id: id
|
|
@@ -2062,7 +2111,7 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int) {
|
|
|
2062
2111
|
}
|
|
2063
2112
|
}
|
|
2064
2113
|
`,
|
|
2065
|
-
variables: { entity_id: this.id, first },
|
|
2114
|
+
variables: { entity_id: this.id, first, after },
|
|
2066
2115
|
constructObject: (json) => {
|
|
2067
2116
|
const connection = json["entity"]["attempts"];
|
|
2068
2117
|
return OutgoingPaymentToAttemptsConnectionFromJson(connection);
|
|
@@ -2823,12 +2872,13 @@ ${FRAGMENT12}
|
|
|
2823
2872
|
var AccountToTransactionsConnectionFromJson = (obj) => {
|
|
2824
2873
|
return {
|
|
2825
2874
|
count: obj["account_to_transactions_connection_count"],
|
|
2826
|
-
entities: obj["account_to_transactions_connection_entities"].map(
|
|
2827
|
-
(e) => TransactionFromJson(e)
|
|
2828
|
-
),
|
|
2829
2875
|
pageInfo: PageInfoFromJson(
|
|
2830
2876
|
obj["account_to_transactions_connection_page_info"]
|
|
2831
2877
|
),
|
|
2878
|
+
entities: obj["account_to_transactions_connection_entities"].map(
|
|
2879
|
+
(e) => TransactionFromJson(e)
|
|
2880
|
+
),
|
|
2881
|
+
typename: "AccountToTransactionsConnection",
|
|
2832
2882
|
profitLoss: !!obj["account_to_transactions_connection_profit_loss"] ? CurrencyAmountFromJson(
|
|
2833
2883
|
obj["account_to_transactions_connection_profit_loss"]
|
|
2834
2884
|
) : void 0,
|
|
@@ -2873,6 +2923,34 @@ var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
|
|
|
2873
2923
|
})(WalletStatus || {});
|
|
2874
2924
|
var WalletStatus_default = WalletStatus;
|
|
2875
2925
|
|
|
2926
|
+
// src/objects/WalletToPaymentRequestsConnection.ts
|
|
2927
|
+
var WalletToPaymentRequestsConnectionFromJson = (obj) => {
|
|
2928
|
+
return {
|
|
2929
|
+
count: obj["wallet_to_payment_requests_connection_count"],
|
|
2930
|
+
pageInfo: PageInfoFromJson(
|
|
2931
|
+
obj["wallet_to_payment_requests_connection_page_info"]
|
|
2932
|
+
),
|
|
2933
|
+
entities: obj["wallet_to_payment_requests_connection_entities"].map(
|
|
2934
|
+
(e) => PaymentRequestFromJson(e)
|
|
2935
|
+
),
|
|
2936
|
+
typename: "WalletToPaymentRequestsConnection"
|
|
2937
|
+
};
|
|
2938
|
+
};
|
|
2939
|
+
|
|
2940
|
+
// src/objects/WalletToTransactionsConnection.ts
|
|
2941
|
+
var WalletToTransactionsConnectionFromJson = (obj) => {
|
|
2942
|
+
return {
|
|
2943
|
+
count: obj["wallet_to_transactions_connection_count"],
|
|
2944
|
+
pageInfo: PageInfoFromJson(
|
|
2945
|
+
obj["wallet_to_transactions_connection_page_info"]
|
|
2946
|
+
),
|
|
2947
|
+
entities: obj["wallet_to_transactions_connection_entities"].map(
|
|
2948
|
+
(e) => TransactionFromJson(e)
|
|
2949
|
+
),
|
|
2950
|
+
typename: "WalletToTransactionsConnection"
|
|
2951
|
+
};
|
|
2952
|
+
};
|
|
2953
|
+
|
|
2876
2954
|
// src/objects/Wallet.ts
|
|
2877
2955
|
var Wallet = class {
|
|
2878
2956
|
constructor(id, createdAt, updatedAt, thirdPartyIdentifier, status, typename, lastLoginAt, balances) {
|
|
@@ -2886,200 +2964,803 @@ var Wallet = class {
|
|
|
2886
2964
|
this.balances = balances;
|
|
2887
2965
|
(0, import_auto_bind9.default)(this);
|
|
2888
2966
|
}
|
|
2889
|
-
async
|
|
2890
|
-
return await client.executeRawQuery({
|
|
2891
|
-
queryPayload: `
|
|
2892
|
-
query FetchWalletTotalAmountReceived($created_after_date: DateTime, $created_before_date: DateTime) {
|
|
2893
|
-
current_wallet {
|
|
2894
|
-
... on Wallet {
|
|
2895
|
-
total_amount_received(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
2896
|
-
__typename
|
|
2897
|
-
currency_amount_original_value: original_value
|
|
2898
|
-
currency_amount_original_unit: original_unit
|
|
2899
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
2900
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
2901
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
2902
|
-
}
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
}
|
|
2906
|
-
`,
|
|
2907
|
-
variables: {
|
|
2908
|
-
created_after_date: createdAfterDate,
|
|
2909
|
-
created_before_date: createdBeforeDate
|
|
2910
|
-
},
|
|
2911
|
-
constructObject: (json) => {
|
|
2912
|
-
const connection = json["current_wallet"]["total_amount_received"];
|
|
2913
|
-
return CurrencyAmountFromJson(connection);
|
|
2914
|
-
}
|
|
2915
|
-
});
|
|
2916
|
-
}
|
|
2917
|
-
async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
2967
|
+
async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
|
|
2918
2968
|
return await client.executeRawQuery({
|
|
2919
2969
|
queryPayload: `
|
|
2920
|
-
query
|
|
2921
|
-
|
|
2922
|
-
... on Wallet {
|
|
2923
|
-
total_amount_sent(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
2924
|
-
__typename
|
|
2925
|
-
currency_amount_original_value: original_value
|
|
2926
|
-
currency_amount_original_unit: original_unit
|
|
2927
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
2928
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
2929
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
2930
|
-
}
|
|
2931
|
-
}
|
|
2932
|
-
}
|
|
2933
|
-
}
|
|
2934
|
-
`,
|
|
2935
|
-
variables: {
|
|
2936
|
-
created_after_date: createdAfterDate,
|
|
2937
|
-
created_before_date: createdBeforeDate
|
|
2938
|
-
},
|
|
2939
|
-
constructObject: (json) => {
|
|
2940
|
-
const connection = json["current_wallet"]["total_amount_sent"];
|
|
2941
|
-
return CurrencyAmountFromJson(connection);
|
|
2942
|
-
}
|
|
2943
|
-
});
|
|
2944
|
-
}
|
|
2945
|
-
static getWalletQuery(id) {
|
|
2946
|
-
return {
|
|
2947
|
-
queryPayload: `
|
|
2948
|
-
query GetWallet($id: ID!) {
|
|
2949
|
-
entity(id: $id) {
|
|
2970
|
+
query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime, $statuses: [TransactionStatus!], $types: [TransactionType!]) {
|
|
2971
|
+
entity(id: $entity_id) {
|
|
2950
2972
|
... on Wallet {
|
|
2951
|
-
|
|
2952
|
-
}
|
|
2953
|
-
}
|
|
2954
|
-
}
|
|
2955
|
-
|
|
2956
|
-
${FRAGMENT13}
|
|
2957
|
-
`,
|
|
2958
|
-
variables: { id },
|
|
2959
|
-
constructObject: (data) => WalletFromJson(data.entity)
|
|
2960
|
-
};
|
|
2961
|
-
}
|
|
2962
|
-
};
|
|
2963
|
-
var WalletFromJson = (obj) => {
|
|
2964
|
-
return new Wallet(
|
|
2965
|
-
obj["wallet_id"],
|
|
2966
|
-
obj["wallet_created_at"],
|
|
2967
|
-
obj["wallet_updated_at"],
|
|
2968
|
-
obj["wallet_third_party_identifier"],
|
|
2969
|
-
WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
|
|
2970
|
-
"Wallet",
|
|
2971
|
-
obj["wallet_last_login_at"],
|
|
2972
|
-
!!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
|
|
2973
|
-
);
|
|
2974
|
-
};
|
|
2975
|
-
var FRAGMENT13 = `
|
|
2976
|
-
fragment WalletFragment on Wallet {
|
|
2977
|
-
__typename
|
|
2978
|
-
wallet_id: id
|
|
2979
|
-
wallet_created_at: created_at
|
|
2980
|
-
wallet_updated_at: updated_at
|
|
2981
|
-
wallet_last_login_at: last_login_at
|
|
2982
|
-
wallet_balances: balances {
|
|
2983
|
-
__typename
|
|
2984
|
-
balances_owned_balance: owned_balance {
|
|
2985
|
-
__typename
|
|
2986
|
-
currency_amount_original_value: original_value
|
|
2987
|
-
currency_amount_original_unit: original_unit
|
|
2988
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
2989
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
2990
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
2991
|
-
}
|
|
2992
|
-
balances_available_to_send_balance: available_to_send_balance {
|
|
2993
|
-
__typename
|
|
2994
|
-
currency_amount_original_value: original_value
|
|
2995
|
-
currency_amount_original_unit: original_unit
|
|
2996
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
2997
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
2998
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
2999
|
-
}
|
|
3000
|
-
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
3001
|
-
__typename
|
|
3002
|
-
currency_amount_original_value: original_value
|
|
3003
|
-
currency_amount_original_unit: original_unit
|
|
3004
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3005
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3006
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3007
|
-
}
|
|
3008
|
-
}
|
|
3009
|
-
wallet_third_party_identifier: third_party_identifier
|
|
3010
|
-
wallet_status: status
|
|
3011
|
-
}`;
|
|
3012
|
-
var Wallet_default = Wallet;
|
|
3013
|
-
|
|
3014
|
-
// src/objects/AccountToWalletsConnection.ts
|
|
3015
|
-
var AccountToWalletsConnectionFromJson = (obj) => {
|
|
3016
|
-
return {
|
|
3017
|
-
pageInfo: PageInfoFromJson(obj["account_to_wallets_connection_page_info"]),
|
|
3018
|
-
count: obj["account_to_wallets_connection_count"],
|
|
3019
|
-
entities: obj["account_to_wallets_connection_entities"].map(
|
|
3020
|
-
(e) => WalletFromJson(e)
|
|
3021
|
-
)
|
|
3022
|
-
};
|
|
3023
|
-
};
|
|
3024
|
-
|
|
3025
|
-
// src/objects/Account.ts
|
|
3026
|
-
var Account = class {
|
|
3027
|
-
constructor(id, createdAt, updatedAt, typename, name) {
|
|
3028
|
-
this.id = id;
|
|
3029
|
-
this.createdAt = createdAt;
|
|
3030
|
-
this.updatedAt = updatedAt;
|
|
3031
|
-
this.typename = typename;
|
|
3032
|
-
this.name = name;
|
|
3033
|
-
(0, import_auto_bind10.default)(this);
|
|
3034
|
-
}
|
|
3035
|
-
async getApiTokens(client, first = void 0) {
|
|
3036
|
-
return await client.executeRawQuery({
|
|
3037
|
-
queryPayload: `
|
|
3038
|
-
query FetchAccountToApiTokensConnection($first: Int) {
|
|
3039
|
-
current_account {
|
|
3040
|
-
... on Account {
|
|
3041
|
-
api_tokens(, first: $first) {
|
|
2973
|
+
transactions(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date, statuses: $statuses, types: $types) {
|
|
3042
2974
|
__typename
|
|
3043
|
-
|
|
2975
|
+
wallet_to_transactions_connection_count: count
|
|
2976
|
+
wallet_to_transactions_connection_page_info: page_info {
|
|
3044
2977
|
__typename
|
|
3045
2978
|
page_info_has_next_page: has_next_page
|
|
3046
2979
|
page_info_has_previous_page: has_previous_page
|
|
3047
2980
|
page_info_start_cursor: start_cursor
|
|
3048
2981
|
page_info_end_cursor: end_cursor
|
|
3049
2982
|
}
|
|
3050
|
-
|
|
3051
|
-
account_to_api_tokens_connection_entities: entities {
|
|
3052
|
-
__typename
|
|
3053
|
-
api_token_id: id
|
|
3054
|
-
api_token_created_at: created_at
|
|
3055
|
-
api_token_updated_at: updated_at
|
|
3056
|
-
api_token_client_id: client_id
|
|
3057
|
-
api_token_name: name
|
|
3058
|
-
api_token_permissions: permissions
|
|
3059
|
-
}
|
|
3060
|
-
}
|
|
3061
|
-
}
|
|
3062
|
-
}
|
|
3063
|
-
}
|
|
3064
|
-
`,
|
|
3065
|
-
variables: { first },
|
|
3066
|
-
constructObject: (json) => {
|
|
3067
|
-
const connection = json["current_account"]["api_tokens"];
|
|
3068
|
-
return AccountToApiTokensConnectionFromJson(connection);
|
|
3069
|
-
}
|
|
3070
|
-
});
|
|
3071
|
-
}
|
|
3072
|
-
async getBlockchainBalance(client, bitcoinNetworks = void 0, nodeIds = void 0) {
|
|
3073
|
-
return await client.executeRawQuery({
|
|
3074
|
-
queryPayload: `
|
|
3075
|
-
query FetchAccountBlockchainBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
|
|
3076
|
-
current_account {
|
|
3077
|
-
... on Account {
|
|
3078
|
-
blockchain_balance(, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
|
|
3079
|
-
__typename
|
|
3080
|
-
blockchain_balance_total_balance: total_balance {
|
|
2983
|
+
wallet_to_transactions_connection_entities: entities {
|
|
3081
2984
|
__typename
|
|
3082
|
-
|
|
2985
|
+
... on ChannelClosingTransaction {
|
|
2986
|
+
__typename
|
|
2987
|
+
channel_closing_transaction_id: id
|
|
2988
|
+
channel_closing_transaction_created_at: created_at
|
|
2989
|
+
channel_closing_transaction_updated_at: updated_at
|
|
2990
|
+
channel_closing_transaction_status: status
|
|
2991
|
+
channel_closing_transaction_resolved_at: resolved_at
|
|
2992
|
+
channel_closing_transaction_amount: amount {
|
|
2993
|
+
__typename
|
|
2994
|
+
currency_amount_original_value: original_value
|
|
2995
|
+
currency_amount_original_unit: original_unit
|
|
2996
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
2997
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
2998
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
2999
|
+
}
|
|
3000
|
+
channel_closing_transaction_transaction_hash: transaction_hash
|
|
3001
|
+
channel_closing_transaction_fees: fees {
|
|
3002
|
+
__typename
|
|
3003
|
+
currency_amount_original_value: original_value
|
|
3004
|
+
currency_amount_original_unit: original_unit
|
|
3005
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3006
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3007
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3008
|
+
}
|
|
3009
|
+
channel_closing_transaction_block_hash: block_hash
|
|
3010
|
+
channel_closing_transaction_block_height: block_height
|
|
3011
|
+
channel_closing_transaction_destination_addresses: destination_addresses
|
|
3012
|
+
channel_closing_transaction_num_confirmations: num_confirmations
|
|
3013
|
+
channel_closing_transaction_channel: channel {
|
|
3014
|
+
id
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
... on ChannelOpeningTransaction {
|
|
3018
|
+
__typename
|
|
3019
|
+
channel_opening_transaction_id: id
|
|
3020
|
+
channel_opening_transaction_created_at: created_at
|
|
3021
|
+
channel_opening_transaction_updated_at: updated_at
|
|
3022
|
+
channel_opening_transaction_status: status
|
|
3023
|
+
channel_opening_transaction_resolved_at: resolved_at
|
|
3024
|
+
channel_opening_transaction_amount: amount {
|
|
3025
|
+
__typename
|
|
3026
|
+
currency_amount_original_value: original_value
|
|
3027
|
+
currency_amount_original_unit: original_unit
|
|
3028
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3029
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3030
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3031
|
+
}
|
|
3032
|
+
channel_opening_transaction_transaction_hash: transaction_hash
|
|
3033
|
+
channel_opening_transaction_fees: fees {
|
|
3034
|
+
__typename
|
|
3035
|
+
currency_amount_original_value: original_value
|
|
3036
|
+
currency_amount_original_unit: original_unit
|
|
3037
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3038
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3039
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3040
|
+
}
|
|
3041
|
+
channel_opening_transaction_block_hash: block_hash
|
|
3042
|
+
channel_opening_transaction_block_height: block_height
|
|
3043
|
+
channel_opening_transaction_destination_addresses: destination_addresses
|
|
3044
|
+
channel_opening_transaction_num_confirmations: num_confirmations
|
|
3045
|
+
channel_opening_transaction_channel: channel {
|
|
3046
|
+
id
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
... on Deposit {
|
|
3050
|
+
__typename
|
|
3051
|
+
deposit_id: id
|
|
3052
|
+
deposit_created_at: created_at
|
|
3053
|
+
deposit_updated_at: updated_at
|
|
3054
|
+
deposit_status: status
|
|
3055
|
+
deposit_resolved_at: resolved_at
|
|
3056
|
+
deposit_amount: amount {
|
|
3057
|
+
__typename
|
|
3058
|
+
currency_amount_original_value: original_value
|
|
3059
|
+
currency_amount_original_unit: original_unit
|
|
3060
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3061
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3062
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3063
|
+
}
|
|
3064
|
+
deposit_transaction_hash: transaction_hash
|
|
3065
|
+
deposit_fees: fees {
|
|
3066
|
+
__typename
|
|
3067
|
+
currency_amount_original_value: original_value
|
|
3068
|
+
currency_amount_original_unit: original_unit
|
|
3069
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3070
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3071
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3072
|
+
}
|
|
3073
|
+
deposit_block_hash: block_hash
|
|
3074
|
+
deposit_block_height: block_height
|
|
3075
|
+
deposit_destination_addresses: destination_addresses
|
|
3076
|
+
deposit_num_confirmations: num_confirmations
|
|
3077
|
+
deposit_destination: destination {
|
|
3078
|
+
id
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
... on IncomingPayment {
|
|
3082
|
+
__typename
|
|
3083
|
+
incoming_payment_id: id
|
|
3084
|
+
incoming_payment_created_at: created_at
|
|
3085
|
+
incoming_payment_updated_at: updated_at
|
|
3086
|
+
incoming_payment_status: status
|
|
3087
|
+
incoming_payment_resolved_at: resolved_at
|
|
3088
|
+
incoming_payment_amount: amount {
|
|
3089
|
+
__typename
|
|
3090
|
+
currency_amount_original_value: original_value
|
|
3091
|
+
currency_amount_original_unit: original_unit
|
|
3092
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3093
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3094
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3095
|
+
}
|
|
3096
|
+
incoming_payment_transaction_hash: transaction_hash
|
|
3097
|
+
incoming_payment_origin: origin {
|
|
3098
|
+
id
|
|
3099
|
+
}
|
|
3100
|
+
incoming_payment_destination: destination {
|
|
3101
|
+
id
|
|
3102
|
+
}
|
|
3103
|
+
incoming_payment_payment_request: payment_request {
|
|
3104
|
+
id
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
... on OutgoingPayment {
|
|
3108
|
+
__typename
|
|
3109
|
+
outgoing_payment_id: id
|
|
3110
|
+
outgoing_payment_created_at: created_at
|
|
3111
|
+
outgoing_payment_updated_at: updated_at
|
|
3112
|
+
outgoing_payment_status: status
|
|
3113
|
+
outgoing_payment_resolved_at: resolved_at
|
|
3114
|
+
outgoing_payment_amount: amount {
|
|
3115
|
+
__typename
|
|
3116
|
+
currency_amount_original_value: original_value
|
|
3117
|
+
currency_amount_original_unit: original_unit
|
|
3118
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3119
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3120
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3121
|
+
}
|
|
3122
|
+
outgoing_payment_transaction_hash: transaction_hash
|
|
3123
|
+
outgoing_payment_origin: origin {
|
|
3124
|
+
id
|
|
3125
|
+
}
|
|
3126
|
+
outgoing_payment_destination: destination {
|
|
3127
|
+
id
|
|
3128
|
+
}
|
|
3129
|
+
outgoing_payment_fees: fees {
|
|
3130
|
+
__typename
|
|
3131
|
+
currency_amount_original_value: original_value
|
|
3132
|
+
currency_amount_original_unit: original_unit
|
|
3133
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3134
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3135
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3136
|
+
}
|
|
3137
|
+
outgoing_payment_payment_request_data: payment_request_data {
|
|
3138
|
+
__typename
|
|
3139
|
+
... on InvoiceData {
|
|
3140
|
+
__typename
|
|
3141
|
+
invoice_data_encoded_payment_request: encoded_payment_request
|
|
3142
|
+
invoice_data_bitcoin_network: bitcoin_network
|
|
3143
|
+
invoice_data_payment_hash: payment_hash
|
|
3144
|
+
invoice_data_amount: amount {
|
|
3145
|
+
__typename
|
|
3146
|
+
currency_amount_original_value: original_value
|
|
3147
|
+
currency_amount_original_unit: original_unit
|
|
3148
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3149
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3150
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3151
|
+
}
|
|
3152
|
+
invoice_data_created_at: created_at
|
|
3153
|
+
invoice_data_expires_at: expires_at
|
|
3154
|
+
invoice_data_memo: memo
|
|
3155
|
+
invoice_data_destination: destination {
|
|
3156
|
+
__typename
|
|
3157
|
+
... on GraphNode {
|
|
3158
|
+
__typename
|
|
3159
|
+
graph_node_id: id
|
|
3160
|
+
graph_node_created_at: created_at
|
|
3161
|
+
graph_node_updated_at: updated_at
|
|
3162
|
+
graph_node_alias: alias
|
|
3163
|
+
graph_node_bitcoin_network: bitcoin_network
|
|
3164
|
+
graph_node_color: color
|
|
3165
|
+
graph_node_conductivity: conductivity
|
|
3166
|
+
graph_node_display_name: display_name
|
|
3167
|
+
graph_node_public_key: public_key
|
|
3168
|
+
}
|
|
3169
|
+
... on LightsparkNode {
|
|
3170
|
+
__typename
|
|
3171
|
+
lightspark_node_id: id
|
|
3172
|
+
lightspark_node_created_at: created_at
|
|
3173
|
+
lightspark_node_updated_at: updated_at
|
|
3174
|
+
lightspark_node_alias: alias
|
|
3175
|
+
lightspark_node_bitcoin_network: bitcoin_network
|
|
3176
|
+
lightspark_node_color: color
|
|
3177
|
+
lightspark_node_conductivity: conductivity
|
|
3178
|
+
lightspark_node_display_name: display_name
|
|
3179
|
+
lightspark_node_public_key: public_key
|
|
3180
|
+
lightspark_node_account: account {
|
|
3181
|
+
id
|
|
3182
|
+
}
|
|
3183
|
+
lightspark_node_owner: owner {
|
|
3184
|
+
id
|
|
3185
|
+
}
|
|
3186
|
+
lightspark_node_blockchain_balance: blockchain_balance {
|
|
3187
|
+
__typename
|
|
3188
|
+
blockchain_balance_total_balance: total_balance {
|
|
3189
|
+
__typename
|
|
3190
|
+
currency_amount_original_value: original_value
|
|
3191
|
+
currency_amount_original_unit: original_unit
|
|
3192
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3193
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3194
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3195
|
+
}
|
|
3196
|
+
blockchain_balance_confirmed_balance: confirmed_balance {
|
|
3197
|
+
__typename
|
|
3198
|
+
currency_amount_original_value: original_value
|
|
3199
|
+
currency_amount_original_unit: original_unit
|
|
3200
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3201
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3202
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3203
|
+
}
|
|
3204
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
3205
|
+
__typename
|
|
3206
|
+
currency_amount_original_value: original_value
|
|
3207
|
+
currency_amount_original_unit: original_unit
|
|
3208
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3209
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3210
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3211
|
+
}
|
|
3212
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
3213
|
+
__typename
|
|
3214
|
+
currency_amount_original_value: original_value
|
|
3215
|
+
currency_amount_original_unit: original_unit
|
|
3216
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3217
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3218
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3219
|
+
}
|
|
3220
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
3221
|
+
__typename
|
|
3222
|
+
currency_amount_original_value: original_value
|
|
3223
|
+
currency_amount_original_unit: original_unit
|
|
3224
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3225
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3226
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3227
|
+
}
|
|
3228
|
+
blockchain_balance_available_balance: available_balance {
|
|
3229
|
+
__typename
|
|
3230
|
+
currency_amount_original_value: original_value
|
|
3231
|
+
currency_amount_original_unit: original_unit
|
|
3232
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3233
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3234
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
3238
|
+
__typename
|
|
3239
|
+
secret_encrypted_value: encrypted_value
|
|
3240
|
+
secret_cipher: cipher
|
|
3241
|
+
}
|
|
3242
|
+
lightspark_node_total_balance: total_balance {
|
|
3243
|
+
__typename
|
|
3244
|
+
currency_amount_original_value: original_value
|
|
3245
|
+
currency_amount_original_unit: original_unit
|
|
3246
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3247
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3248
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3249
|
+
}
|
|
3250
|
+
lightspark_node_total_local_balance: total_local_balance {
|
|
3251
|
+
__typename
|
|
3252
|
+
currency_amount_original_value: original_value
|
|
3253
|
+
currency_amount_original_unit: original_unit
|
|
3254
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3255
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3256
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3257
|
+
}
|
|
3258
|
+
lightspark_node_local_balance: local_balance {
|
|
3259
|
+
__typename
|
|
3260
|
+
currency_amount_original_value: original_value
|
|
3261
|
+
currency_amount_original_unit: original_unit
|
|
3262
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3263
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3264
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3265
|
+
}
|
|
3266
|
+
lightspark_node_purpose: purpose
|
|
3267
|
+
lightspark_node_remote_balance: remote_balance {
|
|
3268
|
+
__typename
|
|
3269
|
+
currency_amount_original_value: original_value
|
|
3270
|
+
currency_amount_original_unit: original_unit
|
|
3271
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3272
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3273
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3274
|
+
}
|
|
3275
|
+
lightspark_node_status: status
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
outgoing_payment_failure_reason: failure_reason
|
|
3281
|
+
outgoing_payment_failure_message: failure_message {
|
|
3282
|
+
__typename
|
|
3283
|
+
rich_text_text: text
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
... on RoutingTransaction {
|
|
3287
|
+
__typename
|
|
3288
|
+
routing_transaction_id: id
|
|
3289
|
+
routing_transaction_created_at: created_at
|
|
3290
|
+
routing_transaction_updated_at: updated_at
|
|
3291
|
+
routing_transaction_status: status
|
|
3292
|
+
routing_transaction_resolved_at: resolved_at
|
|
3293
|
+
routing_transaction_amount: amount {
|
|
3294
|
+
__typename
|
|
3295
|
+
currency_amount_original_value: original_value
|
|
3296
|
+
currency_amount_original_unit: original_unit
|
|
3297
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3298
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3299
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3300
|
+
}
|
|
3301
|
+
routing_transaction_transaction_hash: transaction_hash
|
|
3302
|
+
routing_transaction_incoming_channel: incoming_channel {
|
|
3303
|
+
id
|
|
3304
|
+
}
|
|
3305
|
+
routing_transaction_outgoing_channel: outgoing_channel {
|
|
3306
|
+
id
|
|
3307
|
+
}
|
|
3308
|
+
routing_transaction_fees: fees {
|
|
3309
|
+
__typename
|
|
3310
|
+
currency_amount_original_value: original_value
|
|
3311
|
+
currency_amount_original_unit: original_unit
|
|
3312
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3313
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3314
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3315
|
+
}
|
|
3316
|
+
routing_transaction_failure_message: failure_message {
|
|
3317
|
+
__typename
|
|
3318
|
+
rich_text_text: text
|
|
3319
|
+
}
|
|
3320
|
+
routing_transaction_failure_reason: failure_reason
|
|
3321
|
+
}
|
|
3322
|
+
... on Withdrawal {
|
|
3323
|
+
__typename
|
|
3324
|
+
withdrawal_id: id
|
|
3325
|
+
withdrawal_created_at: created_at
|
|
3326
|
+
withdrawal_updated_at: updated_at
|
|
3327
|
+
withdrawal_status: status
|
|
3328
|
+
withdrawal_resolved_at: resolved_at
|
|
3329
|
+
withdrawal_amount: amount {
|
|
3330
|
+
__typename
|
|
3331
|
+
currency_amount_original_value: original_value
|
|
3332
|
+
currency_amount_original_unit: original_unit
|
|
3333
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3334
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3335
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3336
|
+
}
|
|
3337
|
+
withdrawal_transaction_hash: transaction_hash
|
|
3338
|
+
withdrawal_fees: fees {
|
|
3339
|
+
__typename
|
|
3340
|
+
currency_amount_original_value: original_value
|
|
3341
|
+
currency_amount_original_unit: original_unit
|
|
3342
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3343
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3344
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3345
|
+
}
|
|
3346
|
+
withdrawal_block_hash: block_hash
|
|
3347
|
+
withdrawal_block_height: block_height
|
|
3348
|
+
withdrawal_destination_addresses: destination_addresses
|
|
3349
|
+
withdrawal_num_confirmations: num_confirmations
|
|
3350
|
+
withdrawal_origin: origin {
|
|
3351
|
+
id
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
`,
|
|
3360
|
+
variables: {
|
|
3361
|
+
entity_id: this.id,
|
|
3362
|
+
first,
|
|
3363
|
+
after,
|
|
3364
|
+
created_after_date: createdAfterDate,
|
|
3365
|
+
created_before_date: createdBeforeDate,
|
|
3366
|
+
statuses,
|
|
3367
|
+
types
|
|
3368
|
+
},
|
|
3369
|
+
constructObject: (json) => {
|
|
3370
|
+
const connection = json["entity"]["transactions"];
|
|
3371
|
+
return WalletToTransactionsConnectionFromJson(connection);
|
|
3372
|
+
}
|
|
3373
|
+
});
|
|
3374
|
+
}
|
|
3375
|
+
async getPaymentRequests(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
3376
|
+
return await client.executeRawQuery({
|
|
3377
|
+
queryPayload: `
|
|
3378
|
+
query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime) {
|
|
3379
|
+
entity(id: $entity_id) {
|
|
3380
|
+
... on Wallet {
|
|
3381
|
+
payment_requests(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
3382
|
+
__typename
|
|
3383
|
+
wallet_to_payment_requests_connection_count: count
|
|
3384
|
+
wallet_to_payment_requests_connection_page_info: page_info {
|
|
3385
|
+
__typename
|
|
3386
|
+
page_info_has_next_page: has_next_page
|
|
3387
|
+
page_info_has_previous_page: has_previous_page
|
|
3388
|
+
page_info_start_cursor: start_cursor
|
|
3389
|
+
page_info_end_cursor: end_cursor
|
|
3390
|
+
}
|
|
3391
|
+
wallet_to_payment_requests_connection_entities: entities {
|
|
3392
|
+
__typename
|
|
3393
|
+
... on Invoice {
|
|
3394
|
+
__typename
|
|
3395
|
+
invoice_id: id
|
|
3396
|
+
invoice_created_at: created_at
|
|
3397
|
+
invoice_updated_at: updated_at
|
|
3398
|
+
invoice_data: data {
|
|
3399
|
+
__typename
|
|
3400
|
+
invoice_data_encoded_payment_request: encoded_payment_request
|
|
3401
|
+
invoice_data_bitcoin_network: bitcoin_network
|
|
3402
|
+
invoice_data_payment_hash: payment_hash
|
|
3403
|
+
invoice_data_amount: amount {
|
|
3404
|
+
__typename
|
|
3405
|
+
currency_amount_original_value: original_value
|
|
3406
|
+
currency_amount_original_unit: original_unit
|
|
3407
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3408
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3409
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3410
|
+
}
|
|
3411
|
+
invoice_data_created_at: created_at
|
|
3412
|
+
invoice_data_expires_at: expires_at
|
|
3413
|
+
invoice_data_memo: memo
|
|
3414
|
+
invoice_data_destination: destination {
|
|
3415
|
+
__typename
|
|
3416
|
+
... on GraphNode {
|
|
3417
|
+
__typename
|
|
3418
|
+
graph_node_id: id
|
|
3419
|
+
graph_node_created_at: created_at
|
|
3420
|
+
graph_node_updated_at: updated_at
|
|
3421
|
+
graph_node_alias: alias
|
|
3422
|
+
graph_node_bitcoin_network: bitcoin_network
|
|
3423
|
+
graph_node_color: color
|
|
3424
|
+
graph_node_conductivity: conductivity
|
|
3425
|
+
graph_node_display_name: display_name
|
|
3426
|
+
graph_node_public_key: public_key
|
|
3427
|
+
}
|
|
3428
|
+
... on LightsparkNode {
|
|
3429
|
+
__typename
|
|
3430
|
+
lightspark_node_id: id
|
|
3431
|
+
lightspark_node_created_at: created_at
|
|
3432
|
+
lightspark_node_updated_at: updated_at
|
|
3433
|
+
lightspark_node_alias: alias
|
|
3434
|
+
lightspark_node_bitcoin_network: bitcoin_network
|
|
3435
|
+
lightspark_node_color: color
|
|
3436
|
+
lightspark_node_conductivity: conductivity
|
|
3437
|
+
lightspark_node_display_name: display_name
|
|
3438
|
+
lightspark_node_public_key: public_key
|
|
3439
|
+
lightspark_node_account: account {
|
|
3440
|
+
id
|
|
3441
|
+
}
|
|
3442
|
+
lightspark_node_owner: owner {
|
|
3443
|
+
id
|
|
3444
|
+
}
|
|
3445
|
+
lightspark_node_blockchain_balance: blockchain_balance {
|
|
3446
|
+
__typename
|
|
3447
|
+
blockchain_balance_total_balance: total_balance {
|
|
3448
|
+
__typename
|
|
3449
|
+
currency_amount_original_value: original_value
|
|
3450
|
+
currency_amount_original_unit: original_unit
|
|
3451
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3452
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3453
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3454
|
+
}
|
|
3455
|
+
blockchain_balance_confirmed_balance: confirmed_balance {
|
|
3456
|
+
__typename
|
|
3457
|
+
currency_amount_original_value: original_value
|
|
3458
|
+
currency_amount_original_unit: original_unit
|
|
3459
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3460
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3461
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3462
|
+
}
|
|
3463
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
3464
|
+
__typename
|
|
3465
|
+
currency_amount_original_value: original_value
|
|
3466
|
+
currency_amount_original_unit: original_unit
|
|
3467
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3468
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3469
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3470
|
+
}
|
|
3471
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
3472
|
+
__typename
|
|
3473
|
+
currency_amount_original_value: original_value
|
|
3474
|
+
currency_amount_original_unit: original_unit
|
|
3475
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3476
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3477
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3478
|
+
}
|
|
3479
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
3480
|
+
__typename
|
|
3481
|
+
currency_amount_original_value: original_value
|
|
3482
|
+
currency_amount_original_unit: original_unit
|
|
3483
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3484
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3485
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3486
|
+
}
|
|
3487
|
+
blockchain_balance_available_balance: available_balance {
|
|
3488
|
+
__typename
|
|
3489
|
+
currency_amount_original_value: original_value
|
|
3490
|
+
currency_amount_original_unit: original_unit
|
|
3491
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3492
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3493
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3496
|
+
lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
3497
|
+
__typename
|
|
3498
|
+
secret_encrypted_value: encrypted_value
|
|
3499
|
+
secret_cipher: cipher
|
|
3500
|
+
}
|
|
3501
|
+
lightspark_node_total_balance: total_balance {
|
|
3502
|
+
__typename
|
|
3503
|
+
currency_amount_original_value: original_value
|
|
3504
|
+
currency_amount_original_unit: original_unit
|
|
3505
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3506
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3507
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3508
|
+
}
|
|
3509
|
+
lightspark_node_total_local_balance: total_local_balance {
|
|
3510
|
+
__typename
|
|
3511
|
+
currency_amount_original_value: original_value
|
|
3512
|
+
currency_amount_original_unit: original_unit
|
|
3513
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3514
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3515
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3516
|
+
}
|
|
3517
|
+
lightspark_node_local_balance: local_balance {
|
|
3518
|
+
__typename
|
|
3519
|
+
currency_amount_original_value: original_value
|
|
3520
|
+
currency_amount_original_unit: original_unit
|
|
3521
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3522
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3523
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3524
|
+
}
|
|
3525
|
+
lightspark_node_purpose: purpose
|
|
3526
|
+
lightspark_node_remote_balance: remote_balance {
|
|
3527
|
+
__typename
|
|
3528
|
+
currency_amount_original_value: original_value
|
|
3529
|
+
currency_amount_original_unit: original_unit
|
|
3530
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3531
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3532
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3533
|
+
}
|
|
3534
|
+
lightspark_node_status: status
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
}
|
|
3538
|
+
invoice_status: status
|
|
3539
|
+
invoice_amount_paid: amount_paid {
|
|
3540
|
+
__typename
|
|
3541
|
+
currency_amount_original_value: original_value
|
|
3542
|
+
currency_amount_original_unit: original_unit
|
|
3543
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3544
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3545
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
}
|
|
3550
|
+
}
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
3553
|
+
`,
|
|
3554
|
+
variables: {
|
|
3555
|
+
entity_id: this.id,
|
|
3556
|
+
first,
|
|
3557
|
+
after,
|
|
3558
|
+
created_after_date: createdAfterDate,
|
|
3559
|
+
created_before_date: createdBeforeDate
|
|
3560
|
+
},
|
|
3561
|
+
constructObject: (json) => {
|
|
3562
|
+
const connection = json["entity"]["payment_requests"];
|
|
3563
|
+
return WalletToPaymentRequestsConnectionFromJson(connection);
|
|
3564
|
+
}
|
|
3565
|
+
});
|
|
3566
|
+
}
|
|
3567
|
+
async getTotalAmountReceived(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
3568
|
+
return await client.executeRawQuery({
|
|
3569
|
+
queryPayload: `
|
|
3570
|
+
query FetchWalletTotalAmountReceived($entity_id: ID!, $created_after_date: DateTime, $created_before_date: DateTime) {
|
|
3571
|
+
entity(id: $entity_id) {
|
|
3572
|
+
... on Wallet {
|
|
3573
|
+
total_amount_received(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
3574
|
+
__typename
|
|
3575
|
+
currency_amount_original_value: original_value
|
|
3576
|
+
currency_amount_original_unit: original_unit
|
|
3577
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3578
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3579
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3580
|
+
}
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
`,
|
|
3585
|
+
variables: {
|
|
3586
|
+
entity_id: this.id,
|
|
3587
|
+
created_after_date: createdAfterDate,
|
|
3588
|
+
created_before_date: createdBeforeDate
|
|
3589
|
+
},
|
|
3590
|
+
constructObject: (json) => {
|
|
3591
|
+
const connection = json["entity"]["total_amount_received"];
|
|
3592
|
+
return CurrencyAmountFromJson(connection);
|
|
3593
|
+
}
|
|
3594
|
+
});
|
|
3595
|
+
}
|
|
3596
|
+
async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
3597
|
+
return await client.executeRawQuery({
|
|
3598
|
+
queryPayload: `
|
|
3599
|
+
query FetchWalletTotalAmountSent($entity_id: ID!, $created_after_date: DateTime, $created_before_date: DateTime) {
|
|
3600
|
+
entity(id: $entity_id) {
|
|
3601
|
+
... on Wallet {
|
|
3602
|
+
total_amount_sent(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
3603
|
+
__typename
|
|
3604
|
+
currency_amount_original_value: original_value
|
|
3605
|
+
currency_amount_original_unit: original_unit
|
|
3606
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3607
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3608
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
}
|
|
3613
|
+
`,
|
|
3614
|
+
variables: {
|
|
3615
|
+
entity_id: this.id,
|
|
3616
|
+
created_after_date: createdAfterDate,
|
|
3617
|
+
created_before_date: createdBeforeDate
|
|
3618
|
+
},
|
|
3619
|
+
constructObject: (json) => {
|
|
3620
|
+
const connection = json["entity"]["total_amount_sent"];
|
|
3621
|
+
return CurrencyAmountFromJson(connection);
|
|
3622
|
+
}
|
|
3623
|
+
});
|
|
3624
|
+
}
|
|
3625
|
+
static getWalletQuery(id) {
|
|
3626
|
+
return {
|
|
3627
|
+
queryPayload: `
|
|
3628
|
+
query GetWallet($id: ID!) {
|
|
3629
|
+
entity(id: $id) {
|
|
3630
|
+
... on Wallet {
|
|
3631
|
+
...WalletFragment
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3636
|
+
${FRAGMENT13}
|
|
3637
|
+
`,
|
|
3638
|
+
variables: { id },
|
|
3639
|
+
constructObject: (data) => WalletFromJson(data.entity)
|
|
3640
|
+
};
|
|
3641
|
+
}
|
|
3642
|
+
};
|
|
3643
|
+
var WalletFromJson = (obj) => {
|
|
3644
|
+
return new Wallet(
|
|
3645
|
+
obj["wallet_id"],
|
|
3646
|
+
obj["wallet_created_at"],
|
|
3647
|
+
obj["wallet_updated_at"],
|
|
3648
|
+
obj["wallet_third_party_identifier"],
|
|
3649
|
+
WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
|
|
3650
|
+
"Wallet",
|
|
3651
|
+
obj["wallet_last_login_at"],
|
|
3652
|
+
!!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
|
|
3653
|
+
);
|
|
3654
|
+
};
|
|
3655
|
+
var FRAGMENT13 = `
|
|
3656
|
+
fragment WalletFragment on Wallet {
|
|
3657
|
+
__typename
|
|
3658
|
+
wallet_id: id
|
|
3659
|
+
wallet_created_at: created_at
|
|
3660
|
+
wallet_updated_at: updated_at
|
|
3661
|
+
wallet_last_login_at: last_login_at
|
|
3662
|
+
wallet_balances: balances {
|
|
3663
|
+
__typename
|
|
3664
|
+
balances_owned_balance: owned_balance {
|
|
3665
|
+
__typename
|
|
3666
|
+
currency_amount_original_value: original_value
|
|
3667
|
+
currency_amount_original_unit: original_unit
|
|
3668
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3669
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3670
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3671
|
+
}
|
|
3672
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
3673
|
+
__typename
|
|
3674
|
+
currency_amount_original_value: original_value
|
|
3675
|
+
currency_amount_original_unit: original_unit
|
|
3676
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3677
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3678
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3679
|
+
}
|
|
3680
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
3681
|
+
__typename
|
|
3682
|
+
currency_amount_original_value: original_value
|
|
3683
|
+
currency_amount_original_unit: original_unit
|
|
3684
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3685
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3686
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
wallet_third_party_identifier: third_party_identifier
|
|
3690
|
+
wallet_status: status
|
|
3691
|
+
}`;
|
|
3692
|
+
var Wallet_default = Wallet;
|
|
3693
|
+
|
|
3694
|
+
// src/objects/AccountToWalletsConnection.ts
|
|
3695
|
+
var AccountToWalletsConnectionFromJson = (obj) => {
|
|
3696
|
+
return {
|
|
3697
|
+
count: obj["account_to_wallets_connection_count"],
|
|
3698
|
+
pageInfo: PageInfoFromJson(obj["account_to_wallets_connection_page_info"]),
|
|
3699
|
+
entities: obj["account_to_wallets_connection_entities"].map(
|
|
3700
|
+
(e) => WalletFromJson(e)
|
|
3701
|
+
),
|
|
3702
|
+
typename: "AccountToWalletsConnection"
|
|
3703
|
+
};
|
|
3704
|
+
};
|
|
3705
|
+
|
|
3706
|
+
// src/objects/Account.ts
|
|
3707
|
+
var Account = class {
|
|
3708
|
+
constructor(id, createdAt, updatedAt, typename, name) {
|
|
3709
|
+
this.id = id;
|
|
3710
|
+
this.createdAt = createdAt;
|
|
3711
|
+
this.updatedAt = updatedAt;
|
|
3712
|
+
this.typename = typename;
|
|
3713
|
+
this.name = name;
|
|
3714
|
+
(0, import_auto_bind10.default)(this);
|
|
3715
|
+
}
|
|
3716
|
+
async getApiTokens(client, first = void 0, after = void 0) {
|
|
3717
|
+
return await client.executeRawQuery({
|
|
3718
|
+
queryPayload: `
|
|
3719
|
+
query FetchAccountToApiTokensConnection($first: Int, $after: String) {
|
|
3720
|
+
current_account {
|
|
3721
|
+
... on Account {
|
|
3722
|
+
api_tokens(, first: $first, after: $after) {
|
|
3723
|
+
__typename
|
|
3724
|
+
account_to_api_tokens_connection_count: count
|
|
3725
|
+
account_to_api_tokens_connection_page_info: page_info {
|
|
3726
|
+
__typename
|
|
3727
|
+
page_info_has_next_page: has_next_page
|
|
3728
|
+
page_info_has_previous_page: has_previous_page
|
|
3729
|
+
page_info_start_cursor: start_cursor
|
|
3730
|
+
page_info_end_cursor: end_cursor
|
|
3731
|
+
}
|
|
3732
|
+
account_to_api_tokens_connection_entities: entities {
|
|
3733
|
+
__typename
|
|
3734
|
+
api_token_id: id
|
|
3735
|
+
api_token_created_at: created_at
|
|
3736
|
+
api_token_updated_at: updated_at
|
|
3737
|
+
api_token_client_id: client_id
|
|
3738
|
+
api_token_name: name
|
|
3739
|
+
api_token_permissions: permissions
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
`,
|
|
3746
|
+
variables: { first, after },
|
|
3747
|
+
constructObject: (json) => {
|
|
3748
|
+
const connection = json["current_account"]["api_tokens"];
|
|
3749
|
+
return AccountToApiTokensConnectionFromJson(connection);
|
|
3750
|
+
}
|
|
3751
|
+
});
|
|
3752
|
+
}
|
|
3753
|
+
async getBlockchainBalance(client, bitcoinNetworks = void 0, nodeIds = void 0) {
|
|
3754
|
+
return await client.executeRawQuery({
|
|
3755
|
+
queryPayload: `
|
|
3756
|
+
query FetchAccountBlockchainBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
|
|
3757
|
+
current_account {
|
|
3758
|
+
... on Account {
|
|
3759
|
+
blockchain_balance(, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
|
|
3760
|
+
__typename
|
|
3761
|
+
blockchain_balance_total_balance: total_balance {
|
|
3762
|
+
__typename
|
|
3763
|
+
currency_amount_original_value: original_value
|
|
3083
3764
|
currency_amount_original_unit: original_unit
|
|
3084
3765
|
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
3085
3766
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
@@ -3180,14 +3861,15 @@ query FetchAccountLocalBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids:
|
|
|
3180
3861
|
}
|
|
3181
3862
|
});
|
|
3182
3863
|
}
|
|
3183
|
-
async getNodes(client, first = void 0, bitcoinNetworks = void 0, nodeIds = void 0) {
|
|
3864
|
+
async getNodes(client, first = void 0, bitcoinNetworks = void 0, nodeIds = void 0, after = void 0) {
|
|
3184
3865
|
return await client.executeRawQuery({
|
|
3185
3866
|
queryPayload: `
|
|
3186
|
-
query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
|
|
3867
|
+
query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!], $after: String) {
|
|
3187
3868
|
current_account {
|
|
3188
3869
|
... on Account {
|
|
3189
|
-
nodes(, first: $first, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
|
|
3870
|
+
nodes(, first: $first, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids, after: $after) {
|
|
3190
3871
|
__typename
|
|
3872
|
+
account_to_nodes_connection_count: count
|
|
3191
3873
|
account_to_nodes_connection_page_info: page_info {
|
|
3192
3874
|
__typename
|
|
3193
3875
|
page_info_has_next_page: has_next_page
|
|
@@ -3195,7 +3877,6 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
|
|
|
3195
3877
|
page_info_start_cursor: start_cursor
|
|
3196
3878
|
page_info_end_cursor: end_cursor
|
|
3197
3879
|
}
|
|
3198
|
-
account_to_nodes_connection_count: count
|
|
3199
3880
|
account_to_nodes_connection_purpose: purpose
|
|
3200
3881
|
account_to_nodes_connection_entities: entities {
|
|
3201
3882
|
__typename
|
|
@@ -3313,7 +3994,8 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
|
|
|
3313
3994
|
variables: {
|
|
3314
3995
|
first,
|
|
3315
3996
|
bitcoin_networks: bitcoinNetworks,
|
|
3316
|
-
node_ids: nodeIds
|
|
3997
|
+
node_ids: nodeIds,
|
|
3998
|
+
after
|
|
3317
3999
|
},
|
|
3318
4000
|
constructObject: (json) => {
|
|
3319
4001
|
const connection = json["current_account"]["nodes"];
|
|
@@ -3498,6 +4180,14 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
3498
4180
|
... on Account {
|
|
3499
4181
|
transactions(, first: $first, after: $after, types: $types, after_date: $after_date, before_date: $before_date, bitcoin_network: $bitcoin_network, lightning_node_id: $lightning_node_id, statuses: $statuses, exclude_failures: $exclude_failures) {
|
|
3500
4182
|
__typename
|
|
4183
|
+
account_to_transactions_connection_count: count
|
|
4184
|
+
account_to_transactions_connection_page_info: page_info {
|
|
4185
|
+
__typename
|
|
4186
|
+
page_info_has_next_page: has_next_page
|
|
4187
|
+
page_info_has_previous_page: has_previous_page
|
|
4188
|
+
page_info_start_cursor: start_cursor
|
|
4189
|
+
page_info_end_cursor: end_cursor
|
|
4190
|
+
}
|
|
3501
4191
|
account_to_transactions_connection_profit_loss: profit_loss {
|
|
3502
4192
|
__typename
|
|
3503
4193
|
currency_amount_original_value: original_value
|
|
@@ -3514,7 +4204,6 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
3514
4204
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
3515
4205
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
3516
4206
|
}
|
|
3517
|
-
account_to_transactions_connection_count: count
|
|
3518
4207
|
account_to_transactions_connection_total_amount_transacted: total_amount_transacted {
|
|
3519
4208
|
__typename
|
|
3520
4209
|
currency_amount_original_value: original_value
|
|
@@ -3895,13 +4584,6 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
3895
4584
|
}
|
|
3896
4585
|
}
|
|
3897
4586
|
}
|
|
3898
|
-
account_to_transactions_connection_page_info: page_info {
|
|
3899
|
-
__typename
|
|
3900
|
-
page_info_has_next_page: has_next_page
|
|
3901
|
-
page_info_has_previous_page: has_previous_page
|
|
3902
|
-
page_info_start_cursor: start_cursor
|
|
3903
|
-
page_info_end_cursor: end_cursor
|
|
3904
|
-
}
|
|
3905
4587
|
}
|
|
3906
4588
|
}
|
|
3907
4589
|
}
|
|
@@ -3933,6 +4615,13 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
|
|
|
3933
4615
|
payment_requests(, first: $first, after: $after, after_date: $after_date, before_date: $before_date, bitcoin_network: $bitcoin_network, lightning_node_id: $lightning_node_id) {
|
|
3934
4616
|
__typename
|
|
3935
4617
|
account_to_payment_requests_connection_count: count
|
|
4618
|
+
account_to_payment_requests_connection_page_info: page_info {
|
|
4619
|
+
__typename
|
|
4620
|
+
page_info_has_next_page: has_next_page
|
|
4621
|
+
page_info_has_previous_page: has_previous_page
|
|
4622
|
+
page_info_start_cursor: start_cursor
|
|
4623
|
+
page_info_end_cursor: end_cursor
|
|
4624
|
+
}
|
|
3936
4625
|
account_to_payment_requests_connection_entities: entities {
|
|
3937
4626
|
__typename
|
|
3938
4627
|
... on Invoice {
|
|
@@ -4091,13 +4780,6 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
|
|
|
4091
4780
|
}
|
|
4092
4781
|
}
|
|
4093
4782
|
}
|
|
4094
|
-
account_to_payment_requests_connection_page_info: page_info {
|
|
4095
|
-
__typename
|
|
4096
|
-
page_info_has_next_page: has_next_page
|
|
4097
|
-
page_info_has_previous_page: has_previous_page
|
|
4098
|
-
page_info_start_cursor: start_cursor
|
|
4099
|
-
page_info_end_cursor: end_cursor
|
|
4100
|
-
}
|
|
4101
4783
|
}
|
|
4102
4784
|
}
|
|
4103
4785
|
}
|
|
@@ -4117,14 +4799,15 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
|
|
|
4117
4799
|
}
|
|
4118
4800
|
});
|
|
4119
4801
|
}
|
|
4120
|
-
async getWallets(client, first = void 0) {
|
|
4802
|
+
async getWallets(client, first = void 0, after = void 0, thirdPartyIds = void 0) {
|
|
4121
4803
|
return await client.executeRawQuery({
|
|
4122
4804
|
queryPayload: `
|
|
4123
|
-
query FetchAccountToWalletsConnection($first: Int) {
|
|
4805
|
+
query FetchAccountToWalletsConnection($first: Int, $after: String, $third_party_ids: [String!]) {
|
|
4124
4806
|
current_account {
|
|
4125
4807
|
... on Account {
|
|
4126
|
-
wallets(, first: $first) {
|
|
4808
|
+
wallets(, first: $first, after: $after, third_party_ids: $third_party_ids) {
|
|
4127
4809
|
__typename
|
|
4810
|
+
account_to_wallets_connection_count: count
|
|
4128
4811
|
account_to_wallets_connection_page_info: page_info {
|
|
4129
4812
|
__typename
|
|
4130
4813
|
page_info_has_next_page: has_next_page
|
|
@@ -4132,7 +4815,6 @@ query FetchAccountToWalletsConnection($first: Int) {
|
|
|
4132
4815
|
page_info_start_cursor: start_cursor
|
|
4133
4816
|
page_info_end_cursor: end_cursor
|
|
4134
4817
|
}
|
|
4135
|
-
account_to_wallets_connection_count: count
|
|
4136
4818
|
account_to_wallets_connection_entities: entities {
|
|
4137
4819
|
__typename
|
|
4138
4820
|
wallet_id: id
|
|
@@ -4174,7 +4856,7 @@ query FetchAccountToWalletsConnection($first: Int) {
|
|
|
4174
4856
|
}
|
|
4175
4857
|
}
|
|
4176
4858
|
`,
|
|
4177
|
-
variables: { first },
|
|
4859
|
+
variables: { first, after, third_party_ids: thirdPartyIds },
|
|
4178
4860
|
constructObject: (json) => {
|
|
4179
4861
|
const connection = json["current_account"]["wallets"];
|
|
4180
4862
|
return AccountToWalletsConnectionFromJson(connection);
|
|
@@ -4358,6 +5040,9 @@ ${FRAGMENT16}
|
|
|
4358
5040
|
};
|
|
4359
5041
|
};
|
|
4360
5042
|
|
|
5043
|
+
// src/objects/Connection.ts
|
|
5044
|
+
var import_core5 = require("@lightsparkdev/core");
|
|
5045
|
+
|
|
4361
5046
|
// src/objects/InvoiceType.ts
|
|
4362
5047
|
var InvoiceType = /* @__PURE__ */ ((InvoiceType2) => {
|
|
4363
5048
|
InvoiceType2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
@@ -4367,6 +5052,14 @@ var InvoiceType = /* @__PURE__ */ ((InvoiceType2) => {
|
|
|
4367
5052
|
})(InvoiceType || {});
|
|
4368
5053
|
var InvoiceType_default = InvoiceType;
|
|
4369
5054
|
|
|
5055
|
+
// src/objects/CryptoSanctionsScreeningProvider.ts
|
|
5056
|
+
var CryptoSanctionsScreeningProvider = /* @__PURE__ */ ((CryptoSanctionsScreeningProvider2) => {
|
|
5057
|
+
CryptoSanctionsScreeningProvider2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
5058
|
+
CryptoSanctionsScreeningProvider2["CHAINALYSIS"] = "CHAINALYSIS";
|
|
5059
|
+
return CryptoSanctionsScreeningProvider2;
|
|
5060
|
+
})(CryptoSanctionsScreeningProvider || {});
|
|
5061
|
+
var CryptoSanctionsScreeningProvider_default = CryptoSanctionsScreeningProvider;
|
|
5062
|
+
|
|
4370
5063
|
// src/objects/Deposit.ts
|
|
4371
5064
|
var DepositFromJson = (obj) => {
|
|
4372
5065
|
return {
|
|
@@ -4624,7 +5317,7 @@ ${FRAGMENT18}
|
|
|
4624
5317
|
};
|
|
4625
5318
|
|
|
4626
5319
|
// src/objects/LightningTransaction.ts
|
|
4627
|
-
var
|
|
5320
|
+
var import_core6 = require("@lightsparkdev/core");
|
|
4628
5321
|
var LightningTransactionFromJson = (obj) => {
|
|
4629
5322
|
if (obj["__typename"] == "IncomingPayment") {
|
|
4630
5323
|
return new IncomingPayment_default(
|
|
@@ -4678,7 +5371,7 @@ var LightningTransactionFromJson = (obj) => {
|
|
|
4678
5371
|
failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
|
|
4679
5372
|
};
|
|
4680
5373
|
}
|
|
4681
|
-
throw new
|
|
5374
|
+
throw new import_core6.LightsparkException(
|
|
4682
5375
|
"DeserializationError",
|
|
4683
5376
|
`Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
|
|
4684
5377
|
);
|
|
@@ -4947,7 +5640,7 @@ ${FRAGMENT19}
|
|
|
4947
5640
|
};
|
|
4948
5641
|
|
|
4949
5642
|
// src/objects/LightsparkNodeOwner.ts
|
|
4950
|
-
var
|
|
5643
|
+
var import_core7 = require("@lightsparkdev/core");
|
|
4951
5644
|
var LightsparkNodeOwnerFromJson = (obj) => {
|
|
4952
5645
|
if (obj["__typename"] == "Account") {
|
|
4953
5646
|
return new Account_default(
|
|
@@ -4970,7 +5663,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
|
|
|
4970
5663
|
!!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
|
|
4971
5664
|
);
|
|
4972
5665
|
}
|
|
4973
|
-
throw new
|
|
5666
|
+
throw new import_core7.LightsparkException(
|
|
4974
5667
|
"DeserializationError",
|
|
4975
5668
|
`Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
|
|
4976
5669
|
);
|
|
@@ -5041,7 +5734,7 @@ ${FRAGMENT20}
|
|
|
5041
5734
|
};
|
|
5042
5735
|
|
|
5043
5736
|
// src/objects/OnChainTransaction.ts
|
|
5044
|
-
var
|
|
5737
|
+
var import_core8 = require("@lightsparkdev/core");
|
|
5045
5738
|
var OnChainTransactionFromJson = (obj) => {
|
|
5046
5739
|
if (obj["__typename"] == "ChannelClosingTransaction") {
|
|
5047
5740
|
return {
|
|
@@ -5115,7 +5808,7 @@ var OnChainTransactionFromJson = (obj) => {
|
|
|
5115
5808
|
numConfirmations: obj["withdrawal_num_confirmations"]
|
|
5116
5809
|
};
|
|
5117
5810
|
}
|
|
5118
|
-
throw new
|
|
5811
|
+
throw new import_core8.LightsparkException(
|
|
5119
5812
|
"DeserializationError",
|
|
5120
5813
|
`Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
|
|
5121
5814
|
);
|
|
@@ -5279,6 +5972,16 @@ var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
|
|
|
5279
5972
|
})(WithdrawalMode || {});
|
|
5280
5973
|
var WithdrawalMode_default = WithdrawalMode;
|
|
5281
5974
|
|
|
5975
|
+
// src/objects/RiskRating.ts
|
|
5976
|
+
var RiskRating = /* @__PURE__ */ ((RiskRating2) => {
|
|
5977
|
+
RiskRating2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
5978
|
+
RiskRating2["HIGH_RISK"] = "HIGH_RISK";
|
|
5979
|
+
RiskRating2["LOW_RISK"] = "LOW_RISK";
|
|
5980
|
+
RiskRating2["UNKNOWN"] = "UNKNOWN";
|
|
5981
|
+
return RiskRating2;
|
|
5982
|
+
})(RiskRating || {});
|
|
5983
|
+
var RiskRating_default = RiskRating;
|
|
5984
|
+
|
|
5282
5985
|
// src/objects/RoutingTransaction.ts
|
|
5283
5986
|
var RoutingTransactionFromJson = (obj) => {
|
|
5284
5987
|
return {
|
|
@@ -5379,6 +6082,7 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
|
|
|
5379
6082
|
WebhookEventType2["WALLET_INCOMING_PAYMENT_FINISHED"] = "WALLET_INCOMING_PAYMENT_FINISHED";
|
|
5380
6083
|
WebhookEventType2["WALLET_WITHDRAWAL_FINISHED"] = "WALLET_WITHDRAWAL_FINISHED";
|
|
5381
6084
|
WebhookEventType2["WALLET_FUNDS_RECEIVED"] = "WALLET_FUNDS_RECEIVED";
|
|
6085
|
+
WebhookEventType2["REMOTE_SIGNING"] = "REMOTE_SIGNING";
|
|
5382
6086
|
return WebhookEventType2;
|
|
5383
6087
|
})(WebhookEventType || {});
|
|
5384
6088
|
var WebhookEventType_default = WebhookEventType;
|
|
@@ -5699,6 +6403,7 @@ var WithdrawalRequest_default = WithdrawalRequest;
|
|
|
5699
6403
|
BitcoinNetwork,
|
|
5700
6404
|
Channel,
|
|
5701
6405
|
ChannelStatus,
|
|
6406
|
+
CryptoSanctionsScreeningProvider,
|
|
5702
6407
|
CurrencyUnit,
|
|
5703
6408
|
GraphNode,
|
|
5704
6409
|
HtlcAttemptFailureCode,
|
|
@@ -5716,6 +6421,7 @@ var WithdrawalRequest_default = WithdrawalRequest;
|
|
|
5716
6421
|
PaymentFailureReason,
|
|
5717
6422
|
PaymentRequestStatus,
|
|
5718
6423
|
Permission,
|
|
6424
|
+
RiskRating,
|
|
5719
6425
|
RoutingTransactionFailureReason,
|
|
5720
6426
|
TransactionStatus,
|
|
5721
6427
|
TransactionType,
|