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