@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/index.cjs
CHANGED
|
@@ -1843,6 +1843,7 @@ __export(src_exports, {
|
|
|
1843
1843
|
BitcoinNetwork: () => BitcoinNetwork_default,
|
|
1844
1844
|
Channel: () => Channel_default,
|
|
1845
1845
|
ChannelStatus: () => ChannelStatus_default,
|
|
1846
|
+
CryptoSanctionsScreeningProvider: () => CryptoSanctionsScreeningProvider_default,
|
|
1846
1847
|
CurrencyUnit: () => CurrencyUnit_default,
|
|
1847
1848
|
GraphNode: () => GraphNode_default,
|
|
1848
1849
|
HtlcAttemptFailureCode: () => HtlcAttemptFailureCode_default,
|
|
@@ -1861,6 +1862,7 @@ __export(src_exports, {
|
|
|
1861
1862
|
PaymentFailureReason: () => PaymentFailureReason_default,
|
|
1862
1863
|
PaymentRequestStatus: () => PaymentRequestStatus_default,
|
|
1863
1864
|
Permission: () => Permission_default,
|
|
1865
|
+
RiskRating: () => RiskRating_default,
|
|
1864
1866
|
RoutingTransactionFailureReason: () => RoutingTransactionFailureReason_default,
|
|
1865
1867
|
TransactionStatus: () => TransactionStatus_default,
|
|
1866
1868
|
TransactionType: () => TransactionType_default,
|
|
@@ -1927,7 +1929,7 @@ var import_crypto = require("crypto");
|
|
|
1927
1929
|
// package.json
|
|
1928
1930
|
var package_default = {
|
|
1929
1931
|
name: "@lightsparkdev/lightspark-sdk",
|
|
1930
|
-
version: "0.4.
|
|
1932
|
+
version: "0.4.10",
|
|
1931
1933
|
description: "Lightspark JS SDK",
|
|
1932
1934
|
author: "Lightspark Inc.",
|
|
1933
1935
|
keywords: [
|
|
@@ -2011,7 +2013,6 @@ var package_default = {
|
|
|
2011
2013
|
},
|
|
2012
2014
|
devDependencies: {
|
|
2013
2015
|
"@lightsparkdev/eslint-config": "*",
|
|
2014
|
-
"@lightsparkdev/gql": "0.0.2",
|
|
2015
2016
|
"@lightsparkdev/tsconfig": "0.0.0",
|
|
2016
2017
|
"@types/crypto-js": "^4.1.1",
|
|
2017
2018
|
"@types/jest": "^29.5.2",
|
|
@@ -2666,13 +2667,14 @@ var PageInfoFromJson = (obj) => {
|
|
|
2666
2667
|
// src/objects/LightsparkNodeToChannelsConnection.ts
|
|
2667
2668
|
var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
|
|
2668
2669
|
return {
|
|
2670
|
+
count: obj["lightspark_node_to_channels_connection_count"],
|
|
2669
2671
|
pageInfo: PageInfoFromJson(
|
|
2670
2672
|
obj["lightspark_node_to_channels_connection_page_info"]
|
|
2671
2673
|
),
|
|
2672
|
-
count: obj["lightspark_node_to_channels_connection_count"],
|
|
2673
2674
|
entities: obj["lightspark_node_to_channels_connection_entities"].map(
|
|
2674
2675
|
(e) => ChannelFromJson(e)
|
|
2675
|
-
)
|
|
2676
|
+
),
|
|
2677
|
+
typename: "LightsparkNodeToChannelsConnection"
|
|
2676
2678
|
};
|
|
2677
2679
|
};
|
|
2678
2680
|
|
|
@@ -2735,14 +2737,15 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
|
|
|
2735
2737
|
}
|
|
2736
2738
|
});
|
|
2737
2739
|
}
|
|
2738
|
-
async getChannels(client, first = void 0, statuses = void 0) {
|
|
2740
|
+
async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
|
|
2739
2741
|
return await client.executeRawQuery({
|
|
2740
2742
|
queryPayload: `
|
|
2741
|
-
query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!]) {
|
|
2743
|
+
query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
|
|
2742
2744
|
entity(id: $entity_id) {
|
|
2743
2745
|
... on LightsparkNode {
|
|
2744
|
-
channels(, first: $first, statuses: $statuses) {
|
|
2746
|
+
channels(, first: $first, statuses: $statuses, after: $after) {
|
|
2745
2747
|
__typename
|
|
2748
|
+
lightspark_node_to_channels_connection_count: count
|
|
2746
2749
|
lightspark_node_to_channels_connection_page_info: page_info {
|
|
2747
2750
|
__typename
|
|
2748
2751
|
page_info_has_next_page: has_next_page
|
|
@@ -2750,7 +2753,6 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
|
|
|
2750
2753
|
page_info_start_cursor: start_cursor
|
|
2751
2754
|
page_info_end_cursor: end_cursor
|
|
2752
2755
|
}
|
|
2753
|
-
lightspark_node_to_channels_connection_count: count
|
|
2754
2756
|
lightspark_node_to_channels_connection_entities: entities {
|
|
2755
2757
|
__typename
|
|
2756
2758
|
channel_id: id
|
|
@@ -2850,7 +2852,12 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
|
|
|
2850
2852
|
}
|
|
2851
2853
|
}
|
|
2852
2854
|
`,
|
|
2853
|
-
variables: {
|
|
2855
|
+
variables: {
|
|
2856
|
+
entity_id: this.id,
|
|
2857
|
+
first,
|
|
2858
|
+
statuses,
|
|
2859
|
+
after
|
|
2860
|
+
},
|
|
2854
2861
|
constructObject: (json) => {
|
|
2855
2862
|
const connection = json["entity"]["channels"];
|
|
2856
2863
|
return LightsparkNodeToChannelsConnectionFromJson(connection);
|
|
@@ -3758,9 +3765,13 @@ ${FRAGMENT10}
|
|
|
3758
3765
|
var OutgoingPaymentAttemptToHopsConnectionFromJson = (obj) => {
|
|
3759
3766
|
return {
|
|
3760
3767
|
count: obj["outgoing_payment_attempt_to_hops_connection_count"],
|
|
3768
|
+
pageInfo: PageInfoFromJson(
|
|
3769
|
+
obj["outgoing_payment_attempt_to_hops_connection_page_info"]
|
|
3770
|
+
),
|
|
3761
3771
|
entities: obj["outgoing_payment_attempt_to_hops_connection_entities"].map(
|
|
3762
3772
|
(e) => HopFromJson(e)
|
|
3763
|
-
)
|
|
3773
|
+
),
|
|
3774
|
+
typename: "OutgoingPaymentAttemptToHopsConnection"
|
|
3764
3775
|
};
|
|
3765
3776
|
};
|
|
3766
3777
|
|
|
@@ -3780,15 +3791,22 @@ var OutgoingPaymentAttempt = class {
|
|
|
3780
3791
|
this.fees = fees;
|
|
3781
3792
|
(0, import_auto_bind6.default)(this);
|
|
3782
3793
|
}
|
|
3783
|
-
async getHops(client, first = void 0) {
|
|
3794
|
+
async getHops(client, first = void 0, after = void 0) {
|
|
3784
3795
|
return await client.executeRawQuery({
|
|
3785
3796
|
queryPayload: `
|
|
3786
|
-
query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int) {
|
|
3797
|
+
query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int, $after: String) {
|
|
3787
3798
|
entity(id: $entity_id) {
|
|
3788
3799
|
... on OutgoingPaymentAttempt {
|
|
3789
|
-
hops(, first: $first) {
|
|
3800
|
+
hops(, first: $first, after: $after) {
|
|
3790
3801
|
__typename
|
|
3791
3802
|
outgoing_payment_attempt_to_hops_connection_count: count
|
|
3803
|
+
outgoing_payment_attempt_to_hops_connection_page_info: page_info {
|
|
3804
|
+
__typename
|
|
3805
|
+
page_info_has_next_page: has_next_page
|
|
3806
|
+
page_info_has_previous_page: has_previous_page
|
|
3807
|
+
page_info_start_cursor: start_cursor
|
|
3808
|
+
page_info_end_cursor: end_cursor
|
|
3809
|
+
}
|
|
3792
3810
|
outgoing_payment_attempt_to_hops_connection_entities: entities {
|
|
3793
3811
|
__typename
|
|
3794
3812
|
hop_id: id
|
|
@@ -3822,7 +3840,7 @@ query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int)
|
|
|
3822
3840
|
}
|
|
3823
3841
|
}
|
|
3824
3842
|
`,
|
|
3825
|
-
variables: { entity_id: this.id, first },
|
|
3843
|
+
variables: { entity_id: this.id, first, after },
|
|
3826
3844
|
constructObject: (json) => {
|
|
3827
3845
|
const connection = json["entity"]["hops"];
|
|
3828
3846
|
return OutgoingPaymentAttemptToHopsConnectionFromJson(connection);
|
|
@@ -3898,9 +3916,13 @@ var OutgoingPaymentAttempt_default = OutgoingPaymentAttempt;
|
|
|
3898
3916
|
var OutgoingPaymentToAttemptsConnectionFromJson = (obj) => {
|
|
3899
3917
|
return {
|
|
3900
3918
|
count: obj["outgoing_payment_to_attempts_connection_count"],
|
|
3919
|
+
pageInfo: PageInfoFromJson(
|
|
3920
|
+
obj["outgoing_payment_to_attempts_connection_page_info"]
|
|
3921
|
+
),
|
|
3901
3922
|
entities: obj["outgoing_payment_to_attempts_connection_entities"].map(
|
|
3902
3923
|
(e) => OutgoingPaymentAttemptFromJson(e)
|
|
3903
|
-
)
|
|
3924
|
+
),
|
|
3925
|
+
typename: "OutgoingPaymentToAttemptsConnection"
|
|
3904
3926
|
};
|
|
3905
3927
|
};
|
|
3906
3928
|
|
|
@@ -3982,15 +4004,22 @@ var OutgoingPayment = class {
|
|
|
3982
4004
|
this.failureMessage = failureMessage;
|
|
3983
4005
|
(0, import_auto_bind7.default)(this);
|
|
3984
4006
|
}
|
|
3985
|
-
async getAttempts(client, first = void 0) {
|
|
4007
|
+
async getAttempts(client, first = void 0, after = void 0) {
|
|
3986
4008
|
return await client.executeRawQuery({
|
|
3987
4009
|
queryPayload: `
|
|
3988
|
-
query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int) {
|
|
4010
|
+
query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $after: String) {
|
|
3989
4011
|
entity(id: $entity_id) {
|
|
3990
4012
|
... on OutgoingPayment {
|
|
3991
|
-
attempts(, first: $first) {
|
|
4013
|
+
attempts(, first: $first, after: $after) {
|
|
3992
4014
|
__typename
|
|
3993
4015
|
outgoing_payment_to_attempts_connection_count: count
|
|
4016
|
+
outgoing_payment_to_attempts_connection_page_info: page_info {
|
|
4017
|
+
__typename
|
|
4018
|
+
page_info_has_next_page: has_next_page
|
|
4019
|
+
page_info_has_previous_page: has_previous_page
|
|
4020
|
+
page_info_start_cursor: start_cursor
|
|
4021
|
+
page_info_end_cursor: end_cursor
|
|
4022
|
+
}
|
|
3994
4023
|
outgoing_payment_to_attempts_connection_entities: entities {
|
|
3995
4024
|
__typename
|
|
3996
4025
|
outgoing_payment_attempt_id: id
|
|
@@ -4025,7 +4054,7 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int) {
|
|
|
4025
4054
|
}
|
|
4026
4055
|
}
|
|
4027
4056
|
`,
|
|
4028
|
-
variables: { entity_id: this.id, first },
|
|
4057
|
+
variables: { entity_id: this.id, first, after },
|
|
4029
4058
|
constructObject: (json) => {
|
|
4030
4059
|
const connection = json["entity"]["attempts"];
|
|
4031
4060
|
return OutgoingPaymentToAttemptsConnectionFromJson(connection);
|
|
@@ -4995,9 +5024,13 @@ ${FRAGMENT17}
|
|
|
4995
5024
|
var IncomingPaymentToAttemptsConnectionFromJson = (obj) => {
|
|
4996
5025
|
return {
|
|
4997
5026
|
count: obj["incoming_payment_to_attempts_connection_count"],
|
|
5027
|
+
pageInfo: PageInfoFromJson(
|
|
5028
|
+
obj["incoming_payment_to_attempts_connection_page_info"]
|
|
5029
|
+
),
|
|
4998
5030
|
entities: obj["incoming_payment_to_attempts_connection_entities"].map(
|
|
4999
5031
|
(e) => IncomingPaymentAttemptFromJson(e)
|
|
5000
|
-
)
|
|
5032
|
+
),
|
|
5033
|
+
typename: "IncomingPaymentToAttemptsConnection"
|
|
5001
5034
|
};
|
|
5002
5035
|
};
|
|
5003
5036
|
|
|
@@ -5017,15 +5050,22 @@ var IncomingPayment = class {
|
|
|
5017
5050
|
this.paymentRequestId = paymentRequestId;
|
|
5018
5051
|
(0, import_auto_bind9.default)(this);
|
|
5019
5052
|
}
|
|
5020
|
-
async getAttempts(client, first = void 0, statuses = void 0) {
|
|
5053
|
+
async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
|
|
5021
5054
|
return await client.executeRawQuery({
|
|
5022
5055
|
queryPayload: `
|
|
5023
|
-
query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $statuses: [IncomingPaymentAttemptStatus!]) {
|
|
5056
|
+
query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $statuses: [IncomingPaymentAttemptStatus!], $after: String) {
|
|
5024
5057
|
entity(id: $entity_id) {
|
|
5025
5058
|
... on IncomingPayment {
|
|
5026
|
-
attempts(, first: $first, statuses: $statuses) {
|
|
5059
|
+
attempts(, first: $first, statuses: $statuses, after: $after) {
|
|
5027
5060
|
__typename
|
|
5028
5061
|
incoming_payment_to_attempts_connection_count: count
|
|
5062
|
+
incoming_payment_to_attempts_connection_page_info: page_info {
|
|
5063
|
+
__typename
|
|
5064
|
+
page_info_has_next_page: has_next_page
|
|
5065
|
+
page_info_has_previous_page: has_previous_page
|
|
5066
|
+
page_info_start_cursor: start_cursor
|
|
5067
|
+
page_info_end_cursor: end_cursor
|
|
5068
|
+
}
|
|
5029
5069
|
incoming_payment_to_attempts_connection_entities: entities {
|
|
5030
5070
|
__typename
|
|
5031
5071
|
incoming_payment_attempt_id: id
|
|
@@ -5050,7 +5090,12 @@ query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $st
|
|
|
5050
5090
|
}
|
|
5051
5091
|
}
|
|
5052
5092
|
`,
|
|
5053
|
-
variables: {
|
|
5093
|
+
variables: {
|
|
5094
|
+
entity_id: this.id,
|
|
5095
|
+
first,
|
|
5096
|
+
statuses,
|
|
5097
|
+
after
|
|
5098
|
+
},
|
|
5054
5099
|
constructObject: (json) => {
|
|
5055
5100
|
const connection = json["entity"]["attempts"];
|
|
5056
5101
|
return IncomingPaymentToAttemptsConnectionFromJson(connection);
|
|
@@ -5855,13 +5900,14 @@ var import_auto_bind12 = __toESM(require("auto-bind"), 1);
|
|
|
5855
5900
|
// src/objects/AccountToApiTokensConnection.ts
|
|
5856
5901
|
var AccountToApiTokensConnectionFromJson = (obj) => {
|
|
5857
5902
|
return {
|
|
5903
|
+
count: obj["account_to_api_tokens_connection_count"],
|
|
5858
5904
|
pageInfo: PageInfoFromJson(
|
|
5859
5905
|
obj["account_to_api_tokens_connection_page_info"]
|
|
5860
5906
|
),
|
|
5861
|
-
count: obj["account_to_api_tokens_connection_count"],
|
|
5862
5907
|
entities: obj["account_to_api_tokens_connection_entities"].map(
|
|
5863
5908
|
(e) => ApiTokenFromJson(e)
|
|
5864
|
-
)
|
|
5909
|
+
),
|
|
5910
|
+
typename: "AccountToApiTokensConnection"
|
|
5865
5911
|
};
|
|
5866
5912
|
};
|
|
5867
5913
|
|
|
@@ -5887,11 +5933,12 @@ var AccountToChannelsConnection_default = AccountToChannelsConnection;
|
|
|
5887
5933
|
// src/objects/AccountToNodesConnection.ts
|
|
5888
5934
|
var AccountToNodesConnectionFromJson = (obj) => {
|
|
5889
5935
|
return {
|
|
5890
|
-
pageInfo: PageInfoFromJson(obj["account_to_nodes_connection_page_info"]),
|
|
5891
5936
|
count: obj["account_to_nodes_connection_count"],
|
|
5937
|
+
pageInfo: PageInfoFromJson(obj["account_to_nodes_connection_page_info"]),
|
|
5892
5938
|
entities: obj["account_to_nodes_connection_entities"].map(
|
|
5893
5939
|
(e) => LightsparkNodeFromJson(e)
|
|
5894
5940
|
),
|
|
5941
|
+
typename: "AccountToNodesConnection",
|
|
5895
5942
|
purpose: !!obj["account_to_nodes_connection_purpose"] ? LightsparkNodePurpose_default[obj["account_to_nodes_connection_purpose"]] ?? LightsparkNodePurpose_default.FUTURE_VALUE : null
|
|
5896
5943
|
};
|
|
5897
5944
|
};
|
|
@@ -6095,13 +6142,14 @@ ${FRAGMENT21}
|
|
|
6095
6142
|
// src/objects/AccountToPaymentRequestsConnection.ts
|
|
6096
6143
|
var AccountToPaymentRequestsConnectionFromJson = (obj) => {
|
|
6097
6144
|
return {
|
|
6098
|
-
|
|
6099
|
-
(e) => PaymentRequestFromJson(e)
|
|
6100
|
-
),
|
|
6145
|
+
count: obj["account_to_payment_requests_connection_count"],
|
|
6101
6146
|
pageInfo: PageInfoFromJson(
|
|
6102
6147
|
obj["account_to_payment_requests_connection_page_info"]
|
|
6103
6148
|
),
|
|
6104
|
-
|
|
6149
|
+
entities: obj["account_to_payment_requests_connection_entities"].map(
|
|
6150
|
+
(e) => PaymentRequestFromJson(e)
|
|
6151
|
+
),
|
|
6152
|
+
typename: "AccountToPaymentRequestsConnection"
|
|
6105
6153
|
};
|
|
6106
6154
|
};
|
|
6107
6155
|
|
|
@@ -6109,12 +6157,13 @@ var AccountToPaymentRequestsConnectionFromJson = (obj) => {
|
|
|
6109
6157
|
var AccountToTransactionsConnectionFromJson = (obj) => {
|
|
6110
6158
|
return {
|
|
6111
6159
|
count: obj["account_to_transactions_connection_count"],
|
|
6112
|
-
entities: obj["account_to_transactions_connection_entities"].map(
|
|
6113
|
-
(e) => TransactionFromJson(e)
|
|
6114
|
-
),
|
|
6115
6160
|
pageInfo: PageInfoFromJson(
|
|
6116
6161
|
obj["account_to_transactions_connection_page_info"]
|
|
6117
6162
|
),
|
|
6163
|
+
entities: obj["account_to_transactions_connection_entities"].map(
|
|
6164
|
+
(e) => TransactionFromJson(e)
|
|
6165
|
+
),
|
|
6166
|
+
typename: "AccountToTransactionsConnection",
|
|
6118
6167
|
profitLoss: !!obj["account_to_transactions_connection_profit_loss"] ? CurrencyAmountFromJson(
|
|
6119
6168
|
obj["account_to_transactions_connection_profit_loss"]
|
|
6120
6169
|
) : void 0,
|
|
@@ -6159,6 +6208,34 @@ var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
|
|
|
6159
6208
|
})(WalletStatus || {});
|
|
6160
6209
|
var WalletStatus_default = WalletStatus;
|
|
6161
6210
|
|
|
6211
|
+
// src/objects/WalletToPaymentRequestsConnection.ts
|
|
6212
|
+
var WalletToPaymentRequestsConnectionFromJson = (obj) => {
|
|
6213
|
+
return {
|
|
6214
|
+
count: obj["wallet_to_payment_requests_connection_count"],
|
|
6215
|
+
pageInfo: PageInfoFromJson(
|
|
6216
|
+
obj["wallet_to_payment_requests_connection_page_info"]
|
|
6217
|
+
),
|
|
6218
|
+
entities: obj["wallet_to_payment_requests_connection_entities"].map(
|
|
6219
|
+
(e) => PaymentRequestFromJson(e)
|
|
6220
|
+
),
|
|
6221
|
+
typename: "WalletToPaymentRequestsConnection"
|
|
6222
|
+
};
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6225
|
+
// src/objects/WalletToTransactionsConnection.ts
|
|
6226
|
+
var WalletToTransactionsConnectionFromJson = (obj) => {
|
|
6227
|
+
return {
|
|
6228
|
+
count: obj["wallet_to_transactions_connection_count"],
|
|
6229
|
+
pageInfo: PageInfoFromJson(
|
|
6230
|
+
obj["wallet_to_transactions_connection_page_info"]
|
|
6231
|
+
),
|
|
6232
|
+
entities: obj["wallet_to_transactions_connection_entities"].map(
|
|
6233
|
+
(e) => TransactionFromJson(e)
|
|
6234
|
+
),
|
|
6235
|
+
typename: "WalletToTransactionsConnection"
|
|
6236
|
+
};
|
|
6237
|
+
};
|
|
6238
|
+
|
|
6162
6239
|
// src/objects/Wallet.ts
|
|
6163
6240
|
var Wallet = class {
|
|
6164
6241
|
constructor(id, createdAt, updatedAt, thirdPartyIdentifier, status, typename, lastLoginAt, balances) {
|
|
@@ -6172,200 +6249,803 @@ var Wallet = class {
|
|
|
6172
6249
|
this.balances = balances;
|
|
6173
6250
|
(0, import_auto_bind11.default)(this);
|
|
6174
6251
|
}
|
|
6175
|
-
async
|
|
6176
|
-
return await client.executeRawQuery({
|
|
6177
|
-
queryPayload: `
|
|
6178
|
-
query FetchWalletTotalAmountReceived($created_after_date: DateTime, $created_before_date: DateTime) {
|
|
6179
|
-
current_wallet {
|
|
6180
|
-
... on Wallet {
|
|
6181
|
-
total_amount_received(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
6182
|
-
__typename
|
|
6183
|
-
currency_amount_original_value: original_value
|
|
6184
|
-
currency_amount_original_unit: original_unit
|
|
6185
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6186
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6187
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6188
|
-
}
|
|
6189
|
-
}
|
|
6190
|
-
}
|
|
6191
|
-
}
|
|
6192
|
-
`,
|
|
6193
|
-
variables: {
|
|
6194
|
-
created_after_date: createdAfterDate,
|
|
6195
|
-
created_before_date: createdBeforeDate
|
|
6196
|
-
},
|
|
6197
|
-
constructObject: (json) => {
|
|
6198
|
-
const connection = json["current_wallet"]["total_amount_received"];
|
|
6199
|
-
return CurrencyAmountFromJson(connection);
|
|
6200
|
-
}
|
|
6201
|
-
});
|
|
6202
|
-
}
|
|
6203
|
-
async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
6252
|
+
async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
|
|
6204
6253
|
return await client.executeRawQuery({
|
|
6205
6254
|
queryPayload: `
|
|
6206
|
-
query
|
|
6207
|
-
|
|
6208
|
-
... on Wallet {
|
|
6209
|
-
total_amount_sent(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
6210
|
-
__typename
|
|
6211
|
-
currency_amount_original_value: original_value
|
|
6212
|
-
currency_amount_original_unit: original_unit
|
|
6213
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6214
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6215
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6216
|
-
}
|
|
6217
|
-
}
|
|
6218
|
-
}
|
|
6219
|
-
}
|
|
6220
|
-
`,
|
|
6221
|
-
variables: {
|
|
6222
|
-
created_after_date: createdAfterDate,
|
|
6223
|
-
created_before_date: createdBeforeDate
|
|
6224
|
-
},
|
|
6225
|
-
constructObject: (json) => {
|
|
6226
|
-
const connection = json["current_wallet"]["total_amount_sent"];
|
|
6227
|
-
return CurrencyAmountFromJson(connection);
|
|
6228
|
-
}
|
|
6229
|
-
});
|
|
6230
|
-
}
|
|
6231
|
-
static getWalletQuery(id) {
|
|
6232
|
-
return {
|
|
6233
|
-
queryPayload: `
|
|
6234
|
-
query GetWallet($id: ID!) {
|
|
6235
|
-
entity(id: $id) {
|
|
6255
|
+
query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime, $statuses: [TransactionStatus!], $types: [TransactionType!]) {
|
|
6256
|
+
entity(id: $entity_id) {
|
|
6236
6257
|
... on Wallet {
|
|
6237
|
-
|
|
6238
|
-
}
|
|
6239
|
-
}
|
|
6240
|
-
}
|
|
6241
|
-
|
|
6242
|
-
${FRAGMENT22}
|
|
6243
|
-
`,
|
|
6244
|
-
variables: { id },
|
|
6245
|
-
constructObject: (data) => WalletFromJson(data.entity)
|
|
6246
|
-
};
|
|
6247
|
-
}
|
|
6248
|
-
};
|
|
6249
|
-
var WalletFromJson = (obj) => {
|
|
6250
|
-
return new Wallet(
|
|
6251
|
-
obj["wallet_id"],
|
|
6252
|
-
obj["wallet_created_at"],
|
|
6253
|
-
obj["wallet_updated_at"],
|
|
6254
|
-
obj["wallet_third_party_identifier"],
|
|
6255
|
-
WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
|
|
6256
|
-
"Wallet",
|
|
6257
|
-
obj["wallet_last_login_at"],
|
|
6258
|
-
!!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
|
|
6259
|
-
);
|
|
6260
|
-
};
|
|
6261
|
-
var FRAGMENT22 = `
|
|
6262
|
-
fragment WalletFragment on Wallet {
|
|
6263
|
-
__typename
|
|
6264
|
-
wallet_id: id
|
|
6265
|
-
wallet_created_at: created_at
|
|
6266
|
-
wallet_updated_at: updated_at
|
|
6267
|
-
wallet_last_login_at: last_login_at
|
|
6268
|
-
wallet_balances: balances {
|
|
6269
|
-
__typename
|
|
6270
|
-
balances_owned_balance: owned_balance {
|
|
6271
|
-
__typename
|
|
6272
|
-
currency_amount_original_value: original_value
|
|
6273
|
-
currency_amount_original_unit: original_unit
|
|
6274
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6275
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6276
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6277
|
-
}
|
|
6278
|
-
balances_available_to_send_balance: available_to_send_balance {
|
|
6279
|
-
__typename
|
|
6280
|
-
currency_amount_original_value: original_value
|
|
6281
|
-
currency_amount_original_unit: original_unit
|
|
6282
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6283
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6284
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6285
|
-
}
|
|
6286
|
-
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
6287
|
-
__typename
|
|
6288
|
-
currency_amount_original_value: original_value
|
|
6289
|
-
currency_amount_original_unit: original_unit
|
|
6290
|
-
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6291
|
-
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6292
|
-
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6293
|
-
}
|
|
6294
|
-
}
|
|
6295
|
-
wallet_third_party_identifier: third_party_identifier
|
|
6296
|
-
wallet_status: status
|
|
6297
|
-
}`;
|
|
6298
|
-
var Wallet_default = Wallet;
|
|
6299
|
-
|
|
6300
|
-
// src/objects/AccountToWalletsConnection.ts
|
|
6301
|
-
var AccountToWalletsConnectionFromJson = (obj) => {
|
|
6302
|
-
return {
|
|
6303
|
-
pageInfo: PageInfoFromJson(obj["account_to_wallets_connection_page_info"]),
|
|
6304
|
-
count: obj["account_to_wallets_connection_count"],
|
|
6305
|
-
entities: obj["account_to_wallets_connection_entities"].map(
|
|
6306
|
-
(e) => WalletFromJson(e)
|
|
6307
|
-
)
|
|
6308
|
-
};
|
|
6309
|
-
};
|
|
6310
|
-
|
|
6311
|
-
// src/objects/Account.ts
|
|
6312
|
-
var Account = class {
|
|
6313
|
-
constructor(id, createdAt, updatedAt, typename, name) {
|
|
6314
|
-
this.id = id;
|
|
6315
|
-
this.createdAt = createdAt;
|
|
6316
|
-
this.updatedAt = updatedAt;
|
|
6317
|
-
this.typename = typename;
|
|
6318
|
-
this.name = name;
|
|
6319
|
-
(0, import_auto_bind12.default)(this);
|
|
6320
|
-
}
|
|
6321
|
-
async getApiTokens(client, first = void 0) {
|
|
6322
|
-
return await client.executeRawQuery({
|
|
6323
|
-
queryPayload: `
|
|
6324
|
-
query FetchAccountToApiTokensConnection($first: Int) {
|
|
6325
|
-
current_account {
|
|
6326
|
-
... on Account {
|
|
6327
|
-
api_tokens(, first: $first) {
|
|
6258
|
+
transactions(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date, statuses: $statuses, types: $types) {
|
|
6328
6259
|
__typename
|
|
6329
|
-
|
|
6260
|
+
wallet_to_transactions_connection_count: count
|
|
6261
|
+
wallet_to_transactions_connection_page_info: page_info {
|
|
6330
6262
|
__typename
|
|
6331
6263
|
page_info_has_next_page: has_next_page
|
|
6332
6264
|
page_info_has_previous_page: has_previous_page
|
|
6333
6265
|
page_info_start_cursor: start_cursor
|
|
6334
6266
|
page_info_end_cursor: end_cursor
|
|
6335
6267
|
}
|
|
6336
|
-
|
|
6337
|
-
account_to_api_tokens_connection_entities: entities {
|
|
6338
|
-
__typename
|
|
6339
|
-
api_token_id: id
|
|
6340
|
-
api_token_created_at: created_at
|
|
6341
|
-
api_token_updated_at: updated_at
|
|
6342
|
-
api_token_client_id: client_id
|
|
6343
|
-
api_token_name: name
|
|
6344
|
-
api_token_permissions: permissions
|
|
6345
|
-
}
|
|
6346
|
-
}
|
|
6347
|
-
}
|
|
6348
|
-
}
|
|
6349
|
-
}
|
|
6350
|
-
`,
|
|
6351
|
-
variables: { first },
|
|
6352
|
-
constructObject: (json) => {
|
|
6353
|
-
const connection = json["current_account"]["api_tokens"];
|
|
6354
|
-
return AccountToApiTokensConnectionFromJson(connection);
|
|
6355
|
-
}
|
|
6356
|
-
});
|
|
6357
|
-
}
|
|
6358
|
-
async getBlockchainBalance(client, bitcoinNetworks = void 0, nodeIds = void 0) {
|
|
6359
|
-
return await client.executeRawQuery({
|
|
6360
|
-
queryPayload: `
|
|
6361
|
-
query FetchAccountBlockchainBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
|
|
6362
|
-
current_account {
|
|
6363
|
-
... on Account {
|
|
6364
|
-
blockchain_balance(, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
|
|
6365
|
-
__typename
|
|
6366
|
-
blockchain_balance_total_balance: total_balance {
|
|
6268
|
+
wallet_to_transactions_connection_entities: entities {
|
|
6367
6269
|
__typename
|
|
6368
|
-
|
|
6270
|
+
... on ChannelClosingTransaction {
|
|
6271
|
+
__typename
|
|
6272
|
+
channel_closing_transaction_id: id
|
|
6273
|
+
channel_closing_transaction_created_at: created_at
|
|
6274
|
+
channel_closing_transaction_updated_at: updated_at
|
|
6275
|
+
channel_closing_transaction_status: status
|
|
6276
|
+
channel_closing_transaction_resolved_at: resolved_at
|
|
6277
|
+
channel_closing_transaction_amount: amount {
|
|
6278
|
+
__typename
|
|
6279
|
+
currency_amount_original_value: original_value
|
|
6280
|
+
currency_amount_original_unit: original_unit
|
|
6281
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6282
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6283
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6284
|
+
}
|
|
6285
|
+
channel_closing_transaction_transaction_hash: transaction_hash
|
|
6286
|
+
channel_closing_transaction_fees: fees {
|
|
6287
|
+
__typename
|
|
6288
|
+
currency_amount_original_value: original_value
|
|
6289
|
+
currency_amount_original_unit: original_unit
|
|
6290
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6291
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6292
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6293
|
+
}
|
|
6294
|
+
channel_closing_transaction_block_hash: block_hash
|
|
6295
|
+
channel_closing_transaction_block_height: block_height
|
|
6296
|
+
channel_closing_transaction_destination_addresses: destination_addresses
|
|
6297
|
+
channel_closing_transaction_num_confirmations: num_confirmations
|
|
6298
|
+
channel_closing_transaction_channel: channel {
|
|
6299
|
+
id
|
|
6300
|
+
}
|
|
6301
|
+
}
|
|
6302
|
+
... on ChannelOpeningTransaction {
|
|
6303
|
+
__typename
|
|
6304
|
+
channel_opening_transaction_id: id
|
|
6305
|
+
channel_opening_transaction_created_at: created_at
|
|
6306
|
+
channel_opening_transaction_updated_at: updated_at
|
|
6307
|
+
channel_opening_transaction_status: status
|
|
6308
|
+
channel_opening_transaction_resolved_at: resolved_at
|
|
6309
|
+
channel_opening_transaction_amount: amount {
|
|
6310
|
+
__typename
|
|
6311
|
+
currency_amount_original_value: original_value
|
|
6312
|
+
currency_amount_original_unit: original_unit
|
|
6313
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6314
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6315
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6316
|
+
}
|
|
6317
|
+
channel_opening_transaction_transaction_hash: transaction_hash
|
|
6318
|
+
channel_opening_transaction_fees: fees {
|
|
6319
|
+
__typename
|
|
6320
|
+
currency_amount_original_value: original_value
|
|
6321
|
+
currency_amount_original_unit: original_unit
|
|
6322
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6323
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6324
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6325
|
+
}
|
|
6326
|
+
channel_opening_transaction_block_hash: block_hash
|
|
6327
|
+
channel_opening_transaction_block_height: block_height
|
|
6328
|
+
channel_opening_transaction_destination_addresses: destination_addresses
|
|
6329
|
+
channel_opening_transaction_num_confirmations: num_confirmations
|
|
6330
|
+
channel_opening_transaction_channel: channel {
|
|
6331
|
+
id
|
|
6332
|
+
}
|
|
6333
|
+
}
|
|
6334
|
+
... on Deposit {
|
|
6335
|
+
__typename
|
|
6336
|
+
deposit_id: id
|
|
6337
|
+
deposit_created_at: created_at
|
|
6338
|
+
deposit_updated_at: updated_at
|
|
6339
|
+
deposit_status: status
|
|
6340
|
+
deposit_resolved_at: resolved_at
|
|
6341
|
+
deposit_amount: amount {
|
|
6342
|
+
__typename
|
|
6343
|
+
currency_amount_original_value: original_value
|
|
6344
|
+
currency_amount_original_unit: original_unit
|
|
6345
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6346
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6347
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6348
|
+
}
|
|
6349
|
+
deposit_transaction_hash: transaction_hash
|
|
6350
|
+
deposit_fees: fees {
|
|
6351
|
+
__typename
|
|
6352
|
+
currency_amount_original_value: original_value
|
|
6353
|
+
currency_amount_original_unit: original_unit
|
|
6354
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6355
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6356
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6357
|
+
}
|
|
6358
|
+
deposit_block_hash: block_hash
|
|
6359
|
+
deposit_block_height: block_height
|
|
6360
|
+
deposit_destination_addresses: destination_addresses
|
|
6361
|
+
deposit_num_confirmations: num_confirmations
|
|
6362
|
+
deposit_destination: destination {
|
|
6363
|
+
id
|
|
6364
|
+
}
|
|
6365
|
+
}
|
|
6366
|
+
... on IncomingPayment {
|
|
6367
|
+
__typename
|
|
6368
|
+
incoming_payment_id: id
|
|
6369
|
+
incoming_payment_created_at: created_at
|
|
6370
|
+
incoming_payment_updated_at: updated_at
|
|
6371
|
+
incoming_payment_status: status
|
|
6372
|
+
incoming_payment_resolved_at: resolved_at
|
|
6373
|
+
incoming_payment_amount: amount {
|
|
6374
|
+
__typename
|
|
6375
|
+
currency_amount_original_value: original_value
|
|
6376
|
+
currency_amount_original_unit: original_unit
|
|
6377
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6378
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6379
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6380
|
+
}
|
|
6381
|
+
incoming_payment_transaction_hash: transaction_hash
|
|
6382
|
+
incoming_payment_origin: origin {
|
|
6383
|
+
id
|
|
6384
|
+
}
|
|
6385
|
+
incoming_payment_destination: destination {
|
|
6386
|
+
id
|
|
6387
|
+
}
|
|
6388
|
+
incoming_payment_payment_request: payment_request {
|
|
6389
|
+
id
|
|
6390
|
+
}
|
|
6391
|
+
}
|
|
6392
|
+
... on OutgoingPayment {
|
|
6393
|
+
__typename
|
|
6394
|
+
outgoing_payment_id: id
|
|
6395
|
+
outgoing_payment_created_at: created_at
|
|
6396
|
+
outgoing_payment_updated_at: updated_at
|
|
6397
|
+
outgoing_payment_status: status
|
|
6398
|
+
outgoing_payment_resolved_at: resolved_at
|
|
6399
|
+
outgoing_payment_amount: amount {
|
|
6400
|
+
__typename
|
|
6401
|
+
currency_amount_original_value: original_value
|
|
6402
|
+
currency_amount_original_unit: original_unit
|
|
6403
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6404
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6405
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6406
|
+
}
|
|
6407
|
+
outgoing_payment_transaction_hash: transaction_hash
|
|
6408
|
+
outgoing_payment_origin: origin {
|
|
6409
|
+
id
|
|
6410
|
+
}
|
|
6411
|
+
outgoing_payment_destination: destination {
|
|
6412
|
+
id
|
|
6413
|
+
}
|
|
6414
|
+
outgoing_payment_fees: fees {
|
|
6415
|
+
__typename
|
|
6416
|
+
currency_amount_original_value: original_value
|
|
6417
|
+
currency_amount_original_unit: original_unit
|
|
6418
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6419
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6420
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6421
|
+
}
|
|
6422
|
+
outgoing_payment_payment_request_data: payment_request_data {
|
|
6423
|
+
__typename
|
|
6424
|
+
... on InvoiceData {
|
|
6425
|
+
__typename
|
|
6426
|
+
invoice_data_encoded_payment_request: encoded_payment_request
|
|
6427
|
+
invoice_data_bitcoin_network: bitcoin_network
|
|
6428
|
+
invoice_data_payment_hash: payment_hash
|
|
6429
|
+
invoice_data_amount: amount {
|
|
6430
|
+
__typename
|
|
6431
|
+
currency_amount_original_value: original_value
|
|
6432
|
+
currency_amount_original_unit: original_unit
|
|
6433
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6434
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6435
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6436
|
+
}
|
|
6437
|
+
invoice_data_created_at: created_at
|
|
6438
|
+
invoice_data_expires_at: expires_at
|
|
6439
|
+
invoice_data_memo: memo
|
|
6440
|
+
invoice_data_destination: destination {
|
|
6441
|
+
__typename
|
|
6442
|
+
... on GraphNode {
|
|
6443
|
+
__typename
|
|
6444
|
+
graph_node_id: id
|
|
6445
|
+
graph_node_created_at: created_at
|
|
6446
|
+
graph_node_updated_at: updated_at
|
|
6447
|
+
graph_node_alias: alias
|
|
6448
|
+
graph_node_bitcoin_network: bitcoin_network
|
|
6449
|
+
graph_node_color: color
|
|
6450
|
+
graph_node_conductivity: conductivity
|
|
6451
|
+
graph_node_display_name: display_name
|
|
6452
|
+
graph_node_public_key: public_key
|
|
6453
|
+
}
|
|
6454
|
+
... on LightsparkNode {
|
|
6455
|
+
__typename
|
|
6456
|
+
lightspark_node_id: id
|
|
6457
|
+
lightspark_node_created_at: created_at
|
|
6458
|
+
lightspark_node_updated_at: updated_at
|
|
6459
|
+
lightspark_node_alias: alias
|
|
6460
|
+
lightspark_node_bitcoin_network: bitcoin_network
|
|
6461
|
+
lightspark_node_color: color
|
|
6462
|
+
lightspark_node_conductivity: conductivity
|
|
6463
|
+
lightspark_node_display_name: display_name
|
|
6464
|
+
lightspark_node_public_key: public_key
|
|
6465
|
+
lightspark_node_account: account {
|
|
6466
|
+
id
|
|
6467
|
+
}
|
|
6468
|
+
lightspark_node_owner: owner {
|
|
6469
|
+
id
|
|
6470
|
+
}
|
|
6471
|
+
lightspark_node_blockchain_balance: blockchain_balance {
|
|
6472
|
+
__typename
|
|
6473
|
+
blockchain_balance_total_balance: total_balance {
|
|
6474
|
+
__typename
|
|
6475
|
+
currency_amount_original_value: original_value
|
|
6476
|
+
currency_amount_original_unit: original_unit
|
|
6477
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6478
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6479
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6480
|
+
}
|
|
6481
|
+
blockchain_balance_confirmed_balance: confirmed_balance {
|
|
6482
|
+
__typename
|
|
6483
|
+
currency_amount_original_value: original_value
|
|
6484
|
+
currency_amount_original_unit: original_unit
|
|
6485
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6486
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6487
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6488
|
+
}
|
|
6489
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
6490
|
+
__typename
|
|
6491
|
+
currency_amount_original_value: original_value
|
|
6492
|
+
currency_amount_original_unit: original_unit
|
|
6493
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6494
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6495
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6496
|
+
}
|
|
6497
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
6498
|
+
__typename
|
|
6499
|
+
currency_amount_original_value: original_value
|
|
6500
|
+
currency_amount_original_unit: original_unit
|
|
6501
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6502
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6503
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6504
|
+
}
|
|
6505
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
6506
|
+
__typename
|
|
6507
|
+
currency_amount_original_value: original_value
|
|
6508
|
+
currency_amount_original_unit: original_unit
|
|
6509
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6510
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6511
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6512
|
+
}
|
|
6513
|
+
blockchain_balance_available_balance: available_balance {
|
|
6514
|
+
__typename
|
|
6515
|
+
currency_amount_original_value: original_value
|
|
6516
|
+
currency_amount_original_unit: original_unit
|
|
6517
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6518
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6519
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6520
|
+
}
|
|
6521
|
+
}
|
|
6522
|
+
lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
6523
|
+
__typename
|
|
6524
|
+
secret_encrypted_value: encrypted_value
|
|
6525
|
+
secret_cipher: cipher
|
|
6526
|
+
}
|
|
6527
|
+
lightspark_node_total_balance: total_balance {
|
|
6528
|
+
__typename
|
|
6529
|
+
currency_amount_original_value: original_value
|
|
6530
|
+
currency_amount_original_unit: original_unit
|
|
6531
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6532
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6533
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6534
|
+
}
|
|
6535
|
+
lightspark_node_total_local_balance: total_local_balance {
|
|
6536
|
+
__typename
|
|
6537
|
+
currency_amount_original_value: original_value
|
|
6538
|
+
currency_amount_original_unit: original_unit
|
|
6539
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6540
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6541
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6542
|
+
}
|
|
6543
|
+
lightspark_node_local_balance: local_balance {
|
|
6544
|
+
__typename
|
|
6545
|
+
currency_amount_original_value: original_value
|
|
6546
|
+
currency_amount_original_unit: original_unit
|
|
6547
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6548
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6549
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6550
|
+
}
|
|
6551
|
+
lightspark_node_purpose: purpose
|
|
6552
|
+
lightspark_node_remote_balance: remote_balance {
|
|
6553
|
+
__typename
|
|
6554
|
+
currency_amount_original_value: original_value
|
|
6555
|
+
currency_amount_original_unit: original_unit
|
|
6556
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6557
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6558
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6559
|
+
}
|
|
6560
|
+
lightspark_node_status: status
|
|
6561
|
+
}
|
|
6562
|
+
}
|
|
6563
|
+
}
|
|
6564
|
+
}
|
|
6565
|
+
outgoing_payment_failure_reason: failure_reason
|
|
6566
|
+
outgoing_payment_failure_message: failure_message {
|
|
6567
|
+
__typename
|
|
6568
|
+
rich_text_text: text
|
|
6569
|
+
}
|
|
6570
|
+
}
|
|
6571
|
+
... on RoutingTransaction {
|
|
6572
|
+
__typename
|
|
6573
|
+
routing_transaction_id: id
|
|
6574
|
+
routing_transaction_created_at: created_at
|
|
6575
|
+
routing_transaction_updated_at: updated_at
|
|
6576
|
+
routing_transaction_status: status
|
|
6577
|
+
routing_transaction_resolved_at: resolved_at
|
|
6578
|
+
routing_transaction_amount: amount {
|
|
6579
|
+
__typename
|
|
6580
|
+
currency_amount_original_value: original_value
|
|
6581
|
+
currency_amount_original_unit: original_unit
|
|
6582
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6583
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6584
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6585
|
+
}
|
|
6586
|
+
routing_transaction_transaction_hash: transaction_hash
|
|
6587
|
+
routing_transaction_incoming_channel: incoming_channel {
|
|
6588
|
+
id
|
|
6589
|
+
}
|
|
6590
|
+
routing_transaction_outgoing_channel: outgoing_channel {
|
|
6591
|
+
id
|
|
6592
|
+
}
|
|
6593
|
+
routing_transaction_fees: fees {
|
|
6594
|
+
__typename
|
|
6595
|
+
currency_amount_original_value: original_value
|
|
6596
|
+
currency_amount_original_unit: original_unit
|
|
6597
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6598
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6599
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6600
|
+
}
|
|
6601
|
+
routing_transaction_failure_message: failure_message {
|
|
6602
|
+
__typename
|
|
6603
|
+
rich_text_text: text
|
|
6604
|
+
}
|
|
6605
|
+
routing_transaction_failure_reason: failure_reason
|
|
6606
|
+
}
|
|
6607
|
+
... on Withdrawal {
|
|
6608
|
+
__typename
|
|
6609
|
+
withdrawal_id: id
|
|
6610
|
+
withdrawal_created_at: created_at
|
|
6611
|
+
withdrawal_updated_at: updated_at
|
|
6612
|
+
withdrawal_status: status
|
|
6613
|
+
withdrawal_resolved_at: resolved_at
|
|
6614
|
+
withdrawal_amount: amount {
|
|
6615
|
+
__typename
|
|
6616
|
+
currency_amount_original_value: original_value
|
|
6617
|
+
currency_amount_original_unit: original_unit
|
|
6618
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6619
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6620
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6621
|
+
}
|
|
6622
|
+
withdrawal_transaction_hash: transaction_hash
|
|
6623
|
+
withdrawal_fees: fees {
|
|
6624
|
+
__typename
|
|
6625
|
+
currency_amount_original_value: original_value
|
|
6626
|
+
currency_amount_original_unit: original_unit
|
|
6627
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6628
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6629
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6630
|
+
}
|
|
6631
|
+
withdrawal_block_hash: block_hash
|
|
6632
|
+
withdrawal_block_height: block_height
|
|
6633
|
+
withdrawal_destination_addresses: destination_addresses
|
|
6634
|
+
withdrawal_num_confirmations: num_confirmations
|
|
6635
|
+
withdrawal_origin: origin {
|
|
6636
|
+
id
|
|
6637
|
+
}
|
|
6638
|
+
}
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6643
|
+
}
|
|
6644
|
+
`,
|
|
6645
|
+
variables: {
|
|
6646
|
+
entity_id: this.id,
|
|
6647
|
+
first,
|
|
6648
|
+
after,
|
|
6649
|
+
created_after_date: createdAfterDate,
|
|
6650
|
+
created_before_date: createdBeforeDate,
|
|
6651
|
+
statuses,
|
|
6652
|
+
types
|
|
6653
|
+
},
|
|
6654
|
+
constructObject: (json) => {
|
|
6655
|
+
const connection = json["entity"]["transactions"];
|
|
6656
|
+
return WalletToTransactionsConnectionFromJson(connection);
|
|
6657
|
+
}
|
|
6658
|
+
});
|
|
6659
|
+
}
|
|
6660
|
+
async getPaymentRequests(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
6661
|
+
return await client.executeRawQuery({
|
|
6662
|
+
queryPayload: `
|
|
6663
|
+
query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime) {
|
|
6664
|
+
entity(id: $entity_id) {
|
|
6665
|
+
... on Wallet {
|
|
6666
|
+
payment_requests(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
6667
|
+
__typename
|
|
6668
|
+
wallet_to_payment_requests_connection_count: count
|
|
6669
|
+
wallet_to_payment_requests_connection_page_info: page_info {
|
|
6670
|
+
__typename
|
|
6671
|
+
page_info_has_next_page: has_next_page
|
|
6672
|
+
page_info_has_previous_page: has_previous_page
|
|
6673
|
+
page_info_start_cursor: start_cursor
|
|
6674
|
+
page_info_end_cursor: end_cursor
|
|
6675
|
+
}
|
|
6676
|
+
wallet_to_payment_requests_connection_entities: entities {
|
|
6677
|
+
__typename
|
|
6678
|
+
... on Invoice {
|
|
6679
|
+
__typename
|
|
6680
|
+
invoice_id: id
|
|
6681
|
+
invoice_created_at: created_at
|
|
6682
|
+
invoice_updated_at: updated_at
|
|
6683
|
+
invoice_data: data {
|
|
6684
|
+
__typename
|
|
6685
|
+
invoice_data_encoded_payment_request: encoded_payment_request
|
|
6686
|
+
invoice_data_bitcoin_network: bitcoin_network
|
|
6687
|
+
invoice_data_payment_hash: payment_hash
|
|
6688
|
+
invoice_data_amount: amount {
|
|
6689
|
+
__typename
|
|
6690
|
+
currency_amount_original_value: original_value
|
|
6691
|
+
currency_amount_original_unit: original_unit
|
|
6692
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6693
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6694
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6695
|
+
}
|
|
6696
|
+
invoice_data_created_at: created_at
|
|
6697
|
+
invoice_data_expires_at: expires_at
|
|
6698
|
+
invoice_data_memo: memo
|
|
6699
|
+
invoice_data_destination: destination {
|
|
6700
|
+
__typename
|
|
6701
|
+
... on GraphNode {
|
|
6702
|
+
__typename
|
|
6703
|
+
graph_node_id: id
|
|
6704
|
+
graph_node_created_at: created_at
|
|
6705
|
+
graph_node_updated_at: updated_at
|
|
6706
|
+
graph_node_alias: alias
|
|
6707
|
+
graph_node_bitcoin_network: bitcoin_network
|
|
6708
|
+
graph_node_color: color
|
|
6709
|
+
graph_node_conductivity: conductivity
|
|
6710
|
+
graph_node_display_name: display_name
|
|
6711
|
+
graph_node_public_key: public_key
|
|
6712
|
+
}
|
|
6713
|
+
... on LightsparkNode {
|
|
6714
|
+
__typename
|
|
6715
|
+
lightspark_node_id: id
|
|
6716
|
+
lightspark_node_created_at: created_at
|
|
6717
|
+
lightspark_node_updated_at: updated_at
|
|
6718
|
+
lightspark_node_alias: alias
|
|
6719
|
+
lightspark_node_bitcoin_network: bitcoin_network
|
|
6720
|
+
lightspark_node_color: color
|
|
6721
|
+
lightspark_node_conductivity: conductivity
|
|
6722
|
+
lightspark_node_display_name: display_name
|
|
6723
|
+
lightspark_node_public_key: public_key
|
|
6724
|
+
lightspark_node_account: account {
|
|
6725
|
+
id
|
|
6726
|
+
}
|
|
6727
|
+
lightspark_node_owner: owner {
|
|
6728
|
+
id
|
|
6729
|
+
}
|
|
6730
|
+
lightspark_node_blockchain_balance: blockchain_balance {
|
|
6731
|
+
__typename
|
|
6732
|
+
blockchain_balance_total_balance: total_balance {
|
|
6733
|
+
__typename
|
|
6734
|
+
currency_amount_original_value: original_value
|
|
6735
|
+
currency_amount_original_unit: original_unit
|
|
6736
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6737
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6738
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6739
|
+
}
|
|
6740
|
+
blockchain_balance_confirmed_balance: confirmed_balance {
|
|
6741
|
+
__typename
|
|
6742
|
+
currency_amount_original_value: original_value
|
|
6743
|
+
currency_amount_original_unit: original_unit
|
|
6744
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6745
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6746
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6747
|
+
}
|
|
6748
|
+
blockchain_balance_unconfirmed_balance: unconfirmed_balance {
|
|
6749
|
+
__typename
|
|
6750
|
+
currency_amount_original_value: original_value
|
|
6751
|
+
currency_amount_original_unit: original_unit
|
|
6752
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6753
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6754
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6755
|
+
}
|
|
6756
|
+
blockchain_balance_locked_balance: locked_balance {
|
|
6757
|
+
__typename
|
|
6758
|
+
currency_amount_original_value: original_value
|
|
6759
|
+
currency_amount_original_unit: original_unit
|
|
6760
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6761
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6762
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6763
|
+
}
|
|
6764
|
+
blockchain_balance_required_reserve: required_reserve {
|
|
6765
|
+
__typename
|
|
6766
|
+
currency_amount_original_value: original_value
|
|
6767
|
+
currency_amount_original_unit: original_unit
|
|
6768
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6769
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6770
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6771
|
+
}
|
|
6772
|
+
blockchain_balance_available_balance: available_balance {
|
|
6773
|
+
__typename
|
|
6774
|
+
currency_amount_original_value: original_value
|
|
6775
|
+
currency_amount_original_unit: original_unit
|
|
6776
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6777
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6778
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6779
|
+
}
|
|
6780
|
+
}
|
|
6781
|
+
lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
|
|
6782
|
+
__typename
|
|
6783
|
+
secret_encrypted_value: encrypted_value
|
|
6784
|
+
secret_cipher: cipher
|
|
6785
|
+
}
|
|
6786
|
+
lightspark_node_total_balance: total_balance {
|
|
6787
|
+
__typename
|
|
6788
|
+
currency_amount_original_value: original_value
|
|
6789
|
+
currency_amount_original_unit: original_unit
|
|
6790
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6791
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6792
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6793
|
+
}
|
|
6794
|
+
lightspark_node_total_local_balance: total_local_balance {
|
|
6795
|
+
__typename
|
|
6796
|
+
currency_amount_original_value: original_value
|
|
6797
|
+
currency_amount_original_unit: original_unit
|
|
6798
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6799
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6800
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6801
|
+
}
|
|
6802
|
+
lightspark_node_local_balance: local_balance {
|
|
6803
|
+
__typename
|
|
6804
|
+
currency_amount_original_value: original_value
|
|
6805
|
+
currency_amount_original_unit: original_unit
|
|
6806
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6807
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6808
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6809
|
+
}
|
|
6810
|
+
lightspark_node_purpose: purpose
|
|
6811
|
+
lightspark_node_remote_balance: remote_balance {
|
|
6812
|
+
__typename
|
|
6813
|
+
currency_amount_original_value: original_value
|
|
6814
|
+
currency_amount_original_unit: original_unit
|
|
6815
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6816
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6817
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6818
|
+
}
|
|
6819
|
+
lightspark_node_status: status
|
|
6820
|
+
}
|
|
6821
|
+
}
|
|
6822
|
+
}
|
|
6823
|
+
invoice_status: status
|
|
6824
|
+
invoice_amount_paid: amount_paid {
|
|
6825
|
+
__typename
|
|
6826
|
+
currency_amount_original_value: original_value
|
|
6827
|
+
currency_amount_original_unit: original_unit
|
|
6828
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6829
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6830
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6831
|
+
}
|
|
6832
|
+
}
|
|
6833
|
+
}
|
|
6834
|
+
}
|
|
6835
|
+
}
|
|
6836
|
+
}
|
|
6837
|
+
}
|
|
6838
|
+
`,
|
|
6839
|
+
variables: {
|
|
6840
|
+
entity_id: this.id,
|
|
6841
|
+
first,
|
|
6842
|
+
after,
|
|
6843
|
+
created_after_date: createdAfterDate,
|
|
6844
|
+
created_before_date: createdBeforeDate
|
|
6845
|
+
},
|
|
6846
|
+
constructObject: (json) => {
|
|
6847
|
+
const connection = json["entity"]["payment_requests"];
|
|
6848
|
+
return WalletToPaymentRequestsConnectionFromJson(connection);
|
|
6849
|
+
}
|
|
6850
|
+
});
|
|
6851
|
+
}
|
|
6852
|
+
async getTotalAmountReceived(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
6853
|
+
return await client.executeRawQuery({
|
|
6854
|
+
queryPayload: `
|
|
6855
|
+
query FetchWalletTotalAmountReceived($entity_id: ID!, $created_after_date: DateTime, $created_before_date: DateTime) {
|
|
6856
|
+
entity(id: $entity_id) {
|
|
6857
|
+
... on Wallet {
|
|
6858
|
+
total_amount_received(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
6859
|
+
__typename
|
|
6860
|
+
currency_amount_original_value: original_value
|
|
6861
|
+
currency_amount_original_unit: original_unit
|
|
6862
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6863
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6864
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6865
|
+
}
|
|
6866
|
+
}
|
|
6867
|
+
}
|
|
6868
|
+
}
|
|
6869
|
+
`,
|
|
6870
|
+
variables: {
|
|
6871
|
+
entity_id: this.id,
|
|
6872
|
+
created_after_date: createdAfterDate,
|
|
6873
|
+
created_before_date: createdBeforeDate
|
|
6874
|
+
},
|
|
6875
|
+
constructObject: (json) => {
|
|
6876
|
+
const connection = json["entity"]["total_amount_received"];
|
|
6877
|
+
return CurrencyAmountFromJson(connection);
|
|
6878
|
+
}
|
|
6879
|
+
});
|
|
6880
|
+
}
|
|
6881
|
+
async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
|
|
6882
|
+
return await client.executeRawQuery({
|
|
6883
|
+
queryPayload: `
|
|
6884
|
+
query FetchWalletTotalAmountSent($entity_id: ID!, $created_after_date: DateTime, $created_before_date: DateTime) {
|
|
6885
|
+
entity(id: $entity_id) {
|
|
6886
|
+
... on Wallet {
|
|
6887
|
+
total_amount_sent(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
|
|
6888
|
+
__typename
|
|
6889
|
+
currency_amount_original_value: original_value
|
|
6890
|
+
currency_amount_original_unit: original_unit
|
|
6891
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6892
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6893
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6894
|
+
}
|
|
6895
|
+
}
|
|
6896
|
+
}
|
|
6897
|
+
}
|
|
6898
|
+
`,
|
|
6899
|
+
variables: {
|
|
6900
|
+
entity_id: this.id,
|
|
6901
|
+
created_after_date: createdAfterDate,
|
|
6902
|
+
created_before_date: createdBeforeDate
|
|
6903
|
+
},
|
|
6904
|
+
constructObject: (json) => {
|
|
6905
|
+
const connection = json["entity"]["total_amount_sent"];
|
|
6906
|
+
return CurrencyAmountFromJson(connection);
|
|
6907
|
+
}
|
|
6908
|
+
});
|
|
6909
|
+
}
|
|
6910
|
+
static getWalletQuery(id) {
|
|
6911
|
+
return {
|
|
6912
|
+
queryPayload: `
|
|
6913
|
+
query GetWallet($id: ID!) {
|
|
6914
|
+
entity(id: $id) {
|
|
6915
|
+
... on Wallet {
|
|
6916
|
+
...WalletFragment
|
|
6917
|
+
}
|
|
6918
|
+
}
|
|
6919
|
+
}
|
|
6920
|
+
|
|
6921
|
+
${FRAGMENT22}
|
|
6922
|
+
`,
|
|
6923
|
+
variables: { id },
|
|
6924
|
+
constructObject: (data) => WalletFromJson(data.entity)
|
|
6925
|
+
};
|
|
6926
|
+
}
|
|
6927
|
+
};
|
|
6928
|
+
var WalletFromJson = (obj) => {
|
|
6929
|
+
return new Wallet(
|
|
6930
|
+
obj["wallet_id"],
|
|
6931
|
+
obj["wallet_created_at"],
|
|
6932
|
+
obj["wallet_updated_at"],
|
|
6933
|
+
obj["wallet_third_party_identifier"],
|
|
6934
|
+
WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
|
|
6935
|
+
"Wallet",
|
|
6936
|
+
obj["wallet_last_login_at"],
|
|
6937
|
+
!!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
|
|
6938
|
+
);
|
|
6939
|
+
};
|
|
6940
|
+
var FRAGMENT22 = `
|
|
6941
|
+
fragment WalletFragment on Wallet {
|
|
6942
|
+
__typename
|
|
6943
|
+
wallet_id: id
|
|
6944
|
+
wallet_created_at: created_at
|
|
6945
|
+
wallet_updated_at: updated_at
|
|
6946
|
+
wallet_last_login_at: last_login_at
|
|
6947
|
+
wallet_balances: balances {
|
|
6948
|
+
__typename
|
|
6949
|
+
balances_owned_balance: owned_balance {
|
|
6950
|
+
__typename
|
|
6951
|
+
currency_amount_original_value: original_value
|
|
6952
|
+
currency_amount_original_unit: original_unit
|
|
6953
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6954
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6955
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6956
|
+
}
|
|
6957
|
+
balances_available_to_send_balance: available_to_send_balance {
|
|
6958
|
+
__typename
|
|
6959
|
+
currency_amount_original_value: original_value
|
|
6960
|
+
currency_amount_original_unit: original_unit
|
|
6961
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6962
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6963
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6964
|
+
}
|
|
6965
|
+
balances_available_to_withdraw_balance: available_to_withdraw_balance {
|
|
6966
|
+
__typename
|
|
6967
|
+
currency_amount_original_value: original_value
|
|
6968
|
+
currency_amount_original_unit: original_unit
|
|
6969
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6970
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6971
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6972
|
+
}
|
|
6973
|
+
}
|
|
6974
|
+
wallet_third_party_identifier: third_party_identifier
|
|
6975
|
+
wallet_status: status
|
|
6976
|
+
}`;
|
|
6977
|
+
var Wallet_default = Wallet;
|
|
6978
|
+
|
|
6979
|
+
// src/objects/AccountToWalletsConnection.ts
|
|
6980
|
+
var AccountToWalletsConnectionFromJson = (obj) => {
|
|
6981
|
+
return {
|
|
6982
|
+
count: obj["account_to_wallets_connection_count"],
|
|
6983
|
+
pageInfo: PageInfoFromJson(obj["account_to_wallets_connection_page_info"]),
|
|
6984
|
+
entities: obj["account_to_wallets_connection_entities"].map(
|
|
6985
|
+
(e) => WalletFromJson(e)
|
|
6986
|
+
),
|
|
6987
|
+
typename: "AccountToWalletsConnection"
|
|
6988
|
+
};
|
|
6989
|
+
};
|
|
6990
|
+
|
|
6991
|
+
// src/objects/Account.ts
|
|
6992
|
+
var Account = class {
|
|
6993
|
+
constructor(id, createdAt, updatedAt, typename, name) {
|
|
6994
|
+
this.id = id;
|
|
6995
|
+
this.createdAt = createdAt;
|
|
6996
|
+
this.updatedAt = updatedAt;
|
|
6997
|
+
this.typename = typename;
|
|
6998
|
+
this.name = name;
|
|
6999
|
+
(0, import_auto_bind12.default)(this);
|
|
7000
|
+
}
|
|
7001
|
+
async getApiTokens(client, first = void 0, after = void 0) {
|
|
7002
|
+
return await client.executeRawQuery({
|
|
7003
|
+
queryPayload: `
|
|
7004
|
+
query FetchAccountToApiTokensConnection($first: Int, $after: String) {
|
|
7005
|
+
current_account {
|
|
7006
|
+
... on Account {
|
|
7007
|
+
api_tokens(, first: $first, after: $after) {
|
|
7008
|
+
__typename
|
|
7009
|
+
account_to_api_tokens_connection_count: count
|
|
7010
|
+
account_to_api_tokens_connection_page_info: page_info {
|
|
7011
|
+
__typename
|
|
7012
|
+
page_info_has_next_page: has_next_page
|
|
7013
|
+
page_info_has_previous_page: has_previous_page
|
|
7014
|
+
page_info_start_cursor: start_cursor
|
|
7015
|
+
page_info_end_cursor: end_cursor
|
|
7016
|
+
}
|
|
7017
|
+
account_to_api_tokens_connection_entities: entities {
|
|
7018
|
+
__typename
|
|
7019
|
+
api_token_id: id
|
|
7020
|
+
api_token_created_at: created_at
|
|
7021
|
+
api_token_updated_at: updated_at
|
|
7022
|
+
api_token_client_id: client_id
|
|
7023
|
+
api_token_name: name
|
|
7024
|
+
api_token_permissions: permissions
|
|
7025
|
+
}
|
|
7026
|
+
}
|
|
7027
|
+
}
|
|
7028
|
+
}
|
|
7029
|
+
}
|
|
7030
|
+
`,
|
|
7031
|
+
variables: { first, after },
|
|
7032
|
+
constructObject: (json) => {
|
|
7033
|
+
const connection = json["current_account"]["api_tokens"];
|
|
7034
|
+
return AccountToApiTokensConnectionFromJson(connection);
|
|
7035
|
+
}
|
|
7036
|
+
});
|
|
7037
|
+
}
|
|
7038
|
+
async getBlockchainBalance(client, bitcoinNetworks = void 0, nodeIds = void 0) {
|
|
7039
|
+
return await client.executeRawQuery({
|
|
7040
|
+
queryPayload: `
|
|
7041
|
+
query FetchAccountBlockchainBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
|
|
7042
|
+
current_account {
|
|
7043
|
+
... on Account {
|
|
7044
|
+
blockchain_balance(, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
|
|
7045
|
+
__typename
|
|
7046
|
+
blockchain_balance_total_balance: total_balance {
|
|
7047
|
+
__typename
|
|
7048
|
+
currency_amount_original_value: original_value
|
|
6369
7049
|
currency_amount_original_unit: original_unit
|
|
6370
7050
|
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
6371
7051
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
@@ -6466,14 +7146,15 @@ query FetchAccountLocalBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids:
|
|
|
6466
7146
|
}
|
|
6467
7147
|
});
|
|
6468
7148
|
}
|
|
6469
|
-
async getNodes(client, first = void 0, bitcoinNetworks = void 0, nodeIds = void 0) {
|
|
7149
|
+
async getNodes(client, first = void 0, bitcoinNetworks = void 0, nodeIds = void 0, after = void 0) {
|
|
6470
7150
|
return await client.executeRawQuery({
|
|
6471
7151
|
queryPayload: `
|
|
6472
|
-
query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
|
|
7152
|
+
query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!], $after: String) {
|
|
6473
7153
|
current_account {
|
|
6474
7154
|
... on Account {
|
|
6475
|
-
nodes(, first: $first, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
|
|
7155
|
+
nodes(, first: $first, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids, after: $after) {
|
|
6476
7156
|
__typename
|
|
7157
|
+
account_to_nodes_connection_count: count
|
|
6477
7158
|
account_to_nodes_connection_page_info: page_info {
|
|
6478
7159
|
__typename
|
|
6479
7160
|
page_info_has_next_page: has_next_page
|
|
@@ -6481,7 +7162,6 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
|
|
|
6481
7162
|
page_info_start_cursor: start_cursor
|
|
6482
7163
|
page_info_end_cursor: end_cursor
|
|
6483
7164
|
}
|
|
6484
|
-
account_to_nodes_connection_count: count
|
|
6485
7165
|
account_to_nodes_connection_purpose: purpose
|
|
6486
7166
|
account_to_nodes_connection_entities: entities {
|
|
6487
7167
|
__typename
|
|
@@ -6599,7 +7279,8 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
|
|
|
6599
7279
|
variables: {
|
|
6600
7280
|
first,
|
|
6601
7281
|
bitcoin_networks: bitcoinNetworks,
|
|
6602
|
-
node_ids: nodeIds
|
|
7282
|
+
node_ids: nodeIds,
|
|
7283
|
+
after
|
|
6603
7284
|
},
|
|
6604
7285
|
constructObject: (json) => {
|
|
6605
7286
|
const connection = json["current_account"]["nodes"];
|
|
@@ -6784,6 +7465,14 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
6784
7465
|
... on Account {
|
|
6785
7466
|
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) {
|
|
6786
7467
|
__typename
|
|
7468
|
+
account_to_transactions_connection_count: count
|
|
7469
|
+
account_to_transactions_connection_page_info: page_info {
|
|
7470
|
+
__typename
|
|
7471
|
+
page_info_has_next_page: has_next_page
|
|
7472
|
+
page_info_has_previous_page: has_previous_page
|
|
7473
|
+
page_info_start_cursor: start_cursor
|
|
7474
|
+
page_info_end_cursor: end_cursor
|
|
7475
|
+
}
|
|
6787
7476
|
account_to_transactions_connection_profit_loss: profit_loss {
|
|
6788
7477
|
__typename
|
|
6789
7478
|
currency_amount_original_value: original_value
|
|
@@ -6800,7 +7489,6 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
6800
7489
|
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
6801
7490
|
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
6802
7491
|
}
|
|
6803
|
-
account_to_transactions_connection_count: count
|
|
6804
7492
|
account_to_transactions_connection_total_amount_transacted: total_amount_transacted {
|
|
6805
7493
|
__typename
|
|
6806
7494
|
currency_amount_original_value: original_value
|
|
@@ -7181,13 +7869,6 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
|
|
|
7181
7869
|
}
|
|
7182
7870
|
}
|
|
7183
7871
|
}
|
|
7184
|
-
account_to_transactions_connection_page_info: page_info {
|
|
7185
|
-
__typename
|
|
7186
|
-
page_info_has_next_page: has_next_page
|
|
7187
|
-
page_info_has_previous_page: has_previous_page
|
|
7188
|
-
page_info_start_cursor: start_cursor
|
|
7189
|
-
page_info_end_cursor: end_cursor
|
|
7190
|
-
}
|
|
7191
7872
|
}
|
|
7192
7873
|
}
|
|
7193
7874
|
}
|
|
@@ -7219,6 +7900,13 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
|
|
|
7219
7900
|
payment_requests(, first: $first, after: $after, after_date: $after_date, before_date: $before_date, bitcoin_network: $bitcoin_network, lightning_node_id: $lightning_node_id) {
|
|
7220
7901
|
__typename
|
|
7221
7902
|
account_to_payment_requests_connection_count: count
|
|
7903
|
+
account_to_payment_requests_connection_page_info: page_info {
|
|
7904
|
+
__typename
|
|
7905
|
+
page_info_has_next_page: has_next_page
|
|
7906
|
+
page_info_has_previous_page: has_previous_page
|
|
7907
|
+
page_info_start_cursor: start_cursor
|
|
7908
|
+
page_info_end_cursor: end_cursor
|
|
7909
|
+
}
|
|
7222
7910
|
account_to_payment_requests_connection_entities: entities {
|
|
7223
7911
|
__typename
|
|
7224
7912
|
... on Invoice {
|
|
@@ -7377,13 +8065,6 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
|
|
|
7377
8065
|
}
|
|
7378
8066
|
}
|
|
7379
8067
|
}
|
|
7380
|
-
account_to_payment_requests_connection_page_info: page_info {
|
|
7381
|
-
__typename
|
|
7382
|
-
page_info_has_next_page: has_next_page
|
|
7383
|
-
page_info_has_previous_page: has_previous_page
|
|
7384
|
-
page_info_start_cursor: start_cursor
|
|
7385
|
-
page_info_end_cursor: end_cursor
|
|
7386
|
-
}
|
|
7387
8068
|
}
|
|
7388
8069
|
}
|
|
7389
8070
|
}
|
|
@@ -7403,14 +8084,15 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
|
|
|
7403
8084
|
}
|
|
7404
8085
|
});
|
|
7405
8086
|
}
|
|
7406
|
-
async getWallets(client, first = void 0) {
|
|
8087
|
+
async getWallets(client, first = void 0, after = void 0, thirdPartyIds = void 0) {
|
|
7407
8088
|
return await client.executeRawQuery({
|
|
7408
8089
|
queryPayload: `
|
|
7409
|
-
query FetchAccountToWalletsConnection($first: Int) {
|
|
8090
|
+
query FetchAccountToWalletsConnection($first: Int, $after: String, $third_party_ids: [String!]) {
|
|
7410
8091
|
current_account {
|
|
7411
8092
|
... on Account {
|
|
7412
|
-
wallets(, first: $first) {
|
|
8093
|
+
wallets(, first: $first, after: $after, third_party_ids: $third_party_ids) {
|
|
7413
8094
|
__typename
|
|
8095
|
+
account_to_wallets_connection_count: count
|
|
7414
8096
|
account_to_wallets_connection_page_info: page_info {
|
|
7415
8097
|
__typename
|
|
7416
8098
|
page_info_has_next_page: has_next_page
|
|
@@ -7418,7 +8100,6 @@ query FetchAccountToWalletsConnection($first: Int) {
|
|
|
7418
8100
|
page_info_start_cursor: start_cursor
|
|
7419
8101
|
page_info_end_cursor: end_cursor
|
|
7420
8102
|
}
|
|
7421
|
-
account_to_wallets_connection_count: count
|
|
7422
8103
|
account_to_wallets_connection_entities: entities {
|
|
7423
8104
|
__typename
|
|
7424
8105
|
wallet_id: id
|
|
@@ -7460,7 +8141,7 @@ query FetchAccountToWalletsConnection($first: Int) {
|
|
|
7460
8141
|
}
|
|
7461
8142
|
}
|
|
7462
8143
|
`,
|
|
7463
|
-
variables: { first },
|
|
8144
|
+
variables: { first, after, third_party_ids: thirdPartyIds },
|
|
7464
8145
|
constructObject: (json) => {
|
|
7465
8146
|
const connection = json["current_account"]["wallets"];
|
|
7466
8147
|
return AccountToWalletsConnectionFromJson(connection);
|
|
@@ -7600,11 +8281,14 @@ var LightsparkClient = class {
|
|
|
7600
8281
|
* @returns A zen-observable that emits transaction updates for the given node IDs.
|
|
7601
8282
|
*/
|
|
7602
8283
|
listenToTransactions(nodeIds) {
|
|
7603
|
-
const response = this.requester.subscribe(
|
|
7604
|
-
|
|
7605
|
-
|
|
8284
|
+
const response = this.requester.subscribe(
|
|
8285
|
+
TransactionSubscription,
|
|
8286
|
+
{
|
|
8287
|
+
nodeIds
|
|
8288
|
+
}
|
|
8289
|
+
);
|
|
7606
8290
|
return response.map(
|
|
7607
|
-
(response2) => response2
|
|
8291
|
+
(response2) => response2?.data?.transactions && TransactionUpdateFromJson(response2.data.transactions)
|
|
7608
8292
|
);
|
|
7609
8293
|
}
|
|
7610
8294
|
/**
|
|
@@ -7841,7 +8525,7 @@ var LightsparkClient = class {
|
|
|
7841
8525
|
}
|
|
7842
8526
|
);
|
|
7843
8527
|
return CurrencyAmountFromJson(
|
|
7844
|
-
response.lightning_fee_estimate_for_invoice.
|
|
8528
|
+
response.lightning_fee_estimate_for_invoice.lightning_fee_estimate_output_fee_estimate
|
|
7845
8529
|
);
|
|
7846
8530
|
}
|
|
7847
8531
|
/**
|
|
@@ -7862,7 +8546,7 @@ var LightsparkClient = class {
|
|
|
7862
8546
|
}
|
|
7863
8547
|
);
|
|
7864
8548
|
return CurrencyAmountFromJson(
|
|
7865
|
-
response.lightning_fee_estimate_for_node.
|
|
8549
|
+
response.lightning_fee_estimate_for_node.lightning_fee_estimate_output_fee_estimate
|
|
7866
8550
|
);
|
|
7867
8551
|
}
|
|
7868
8552
|
/**
|
|
@@ -8161,6 +8845,17 @@ var LightsparkClient = class {
|
|
|
8161
8845
|
var LIGHTSPARK_SDK_ENDPOINT = "graphql/server/2023-04-04";
|
|
8162
8846
|
var client_default = LightsparkClient;
|
|
8163
8847
|
|
|
8848
|
+
// src/objects/Connection.ts
|
|
8849
|
+
var import_core7 = require("@lightsparkdev/core");
|
|
8850
|
+
|
|
8851
|
+
// src/objects/CryptoSanctionsScreeningProvider.ts
|
|
8852
|
+
var CryptoSanctionsScreeningProvider = /* @__PURE__ */ ((CryptoSanctionsScreeningProvider2) => {
|
|
8853
|
+
CryptoSanctionsScreeningProvider2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
8854
|
+
CryptoSanctionsScreeningProvider2["CHAINALYSIS"] = "CHAINALYSIS";
|
|
8855
|
+
return CryptoSanctionsScreeningProvider2;
|
|
8856
|
+
})(CryptoSanctionsScreeningProvider || {});
|
|
8857
|
+
var CryptoSanctionsScreeningProvider_default = CryptoSanctionsScreeningProvider;
|
|
8858
|
+
|
|
8164
8859
|
// src/objects/Deposit.ts
|
|
8165
8860
|
var DepositFromJson = (obj) => {
|
|
8166
8861
|
return {
|
|
@@ -8232,7 +8927,7 @@ ${FRAGMENT24}
|
|
|
8232
8927
|
};
|
|
8233
8928
|
|
|
8234
8929
|
// src/objects/LightningTransaction.ts
|
|
8235
|
-
var
|
|
8930
|
+
var import_core8 = require("@lightsparkdev/core");
|
|
8236
8931
|
var LightningTransactionFromJson = (obj) => {
|
|
8237
8932
|
if (obj["__typename"] == "IncomingPayment") {
|
|
8238
8933
|
return new IncomingPayment_default(
|
|
@@ -8286,7 +8981,7 @@ var LightningTransactionFromJson = (obj) => {
|
|
|
8286
8981
|
failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
|
|
8287
8982
|
};
|
|
8288
8983
|
}
|
|
8289
|
-
throw new
|
|
8984
|
+
throw new import_core8.LightsparkException(
|
|
8290
8985
|
"DeserializationError",
|
|
8291
8986
|
`Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
|
|
8292
8987
|
);
|
|
@@ -8555,7 +9250,7 @@ ${FRAGMENT25}
|
|
|
8555
9250
|
};
|
|
8556
9251
|
|
|
8557
9252
|
// src/objects/LightsparkNodeOwner.ts
|
|
8558
|
-
var
|
|
9253
|
+
var import_core9 = require("@lightsparkdev/core");
|
|
8559
9254
|
var LightsparkNodeOwnerFromJson = (obj) => {
|
|
8560
9255
|
if (obj["__typename"] == "Account") {
|
|
8561
9256
|
return new Account_default(
|
|
@@ -8578,7 +9273,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
|
|
|
8578
9273
|
!!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
|
|
8579
9274
|
);
|
|
8580
9275
|
}
|
|
8581
|
-
throw new
|
|
9276
|
+
throw new import_core9.LightsparkException(
|
|
8582
9277
|
"DeserializationError",
|
|
8583
9278
|
`Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
|
|
8584
9279
|
);
|
|
@@ -8649,7 +9344,7 @@ ${FRAGMENT26}
|
|
|
8649
9344
|
};
|
|
8650
9345
|
|
|
8651
9346
|
// src/objects/OnChainTransaction.ts
|
|
8652
|
-
var
|
|
9347
|
+
var import_core10 = require("@lightsparkdev/core");
|
|
8653
9348
|
var OnChainTransactionFromJson = (obj) => {
|
|
8654
9349
|
if (obj["__typename"] == "ChannelClosingTransaction") {
|
|
8655
9350
|
return {
|
|
@@ -8723,7 +9418,7 @@ var OnChainTransactionFromJson = (obj) => {
|
|
|
8723
9418
|
numConfirmations: obj["withdrawal_num_confirmations"]
|
|
8724
9419
|
};
|
|
8725
9420
|
}
|
|
8726
|
-
throw new
|
|
9421
|
+
throw new import_core10.LightsparkException(
|
|
8727
9422
|
"DeserializationError",
|
|
8728
9423
|
`Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
|
|
8729
9424
|
);
|
|
@@ -8878,6 +9573,16 @@ ${FRAGMENT27}
|
|
|
8878
9573
|
};
|
|
8879
9574
|
};
|
|
8880
9575
|
|
|
9576
|
+
// src/objects/RiskRating.ts
|
|
9577
|
+
var RiskRating = /* @__PURE__ */ ((RiskRating2) => {
|
|
9578
|
+
RiskRating2["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
9579
|
+
RiskRating2["HIGH_RISK"] = "HIGH_RISK";
|
|
9580
|
+
RiskRating2["LOW_RISK"] = "LOW_RISK";
|
|
9581
|
+
RiskRating2["UNKNOWN"] = "UNKNOWN";
|
|
9582
|
+
return RiskRating2;
|
|
9583
|
+
})(RiskRating || {});
|
|
9584
|
+
var RiskRating_default = RiskRating;
|
|
9585
|
+
|
|
8881
9586
|
// src/objects/RoutingTransaction.ts
|
|
8882
9587
|
var RoutingTransactionFromJson = (obj) => {
|
|
8883
9588
|
return {
|
|
@@ -8978,6 +9683,7 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
|
|
|
8978
9683
|
WebhookEventType2["WALLET_INCOMING_PAYMENT_FINISHED"] = "WALLET_INCOMING_PAYMENT_FINISHED";
|
|
8979
9684
|
WebhookEventType2["WALLET_WITHDRAWAL_FINISHED"] = "WALLET_WITHDRAWAL_FINISHED";
|
|
8980
9685
|
WebhookEventType2["WALLET_FUNDS_RECEIVED"] = "WALLET_FUNDS_RECEIVED";
|
|
9686
|
+
WebhookEventType2["REMOTE_SIGNING"] = "REMOTE_SIGNING";
|
|
8981
9687
|
return WebhookEventType2;
|
|
8982
9688
|
})(WebhookEventType || {});
|
|
8983
9689
|
var WebhookEventType_default = WebhookEventType;
|
|
@@ -9086,6 +9792,7 @@ var parseWebhook = async (data) => {
|
|
|
9086
9792
|
BitcoinNetwork,
|
|
9087
9793
|
Channel,
|
|
9088
9794
|
ChannelStatus,
|
|
9795
|
+
CryptoSanctionsScreeningProvider,
|
|
9089
9796
|
CurrencyUnit,
|
|
9090
9797
|
GraphNode,
|
|
9091
9798
|
HtlcAttemptFailureCode,
|
|
@@ -9104,6 +9811,7 @@ var parseWebhook = async (data) => {
|
|
|
9104
9811
|
PaymentFailureReason,
|
|
9105
9812
|
PaymentRequestStatus,
|
|
9106
9813
|
Permission,
|
|
9814
|
+
RiskRating,
|
|
9107
9815
|
RoutingTransactionFailureReason,
|
|
9108
9816
|
TransactionStatus,
|
|
9109
9817
|
TransactionType,
|