@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.
Files changed (86) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{chunk-YTXDF6SQ.js → chunk-NXUFC5J7.js} +950 -246
  3. package/dist/{index-adeff42d.d.ts → index-3ffe9e7b.d.ts} +194 -56
  4. package/dist/index.cjs +962 -254
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +15 -9
  7. package/dist/objects/index.cjs +952 -246
  8. package/dist/objects/index.d.ts +1 -1
  9. package/dist/objects/index.js +5 -1
  10. package/package.json +1 -2
  11. package/src/client.ts +13 -14
  12. package/src/objects/Account.ts +36 -30
  13. package/src/objects/AccountToApiTokensConnection.ts +11 -6
  14. package/src/objects/AccountToNodesConnection.ts +11 -6
  15. package/src/objects/AccountToPaymentRequestsConnection.ts +20 -15
  16. package/src/objects/AccountToTransactionsConnection.ts +19 -14
  17. package/src/objects/AccountToWalletsConnection.ts +11 -6
  18. package/src/objects/ApiToken.ts +2 -1
  19. package/src/objects/Balances.ts +1 -0
  20. package/src/objects/BitcoinNetwork.ts +2 -1
  21. package/src/objects/BlockchainBalance.ts +1 -1
  22. package/src/objects/Channel.ts +2 -2
  23. package/src/objects/ChannelClosingTransaction.ts +2 -2
  24. package/src/objects/ChannelFees.ts +1 -0
  25. package/src/objects/ChannelOpeningTransaction.ts +2 -2
  26. package/src/objects/ChannelStatus.ts +1 -0
  27. package/src/objects/Connection.ts +387 -0
  28. package/src/objects/CreateInvoiceInput.ts +12 -0
  29. package/src/objects/CreateLnurlInvoiceInput.ts +10 -0
  30. package/src/objects/CreateTestModePaymentoutput.ts +1 -0
  31. package/src/objects/CryptoSanctionsScreeningProvider.ts +14 -0
  32. package/src/objects/CurrencyAmount.ts +1 -1
  33. package/src/objects/CurrencyUnit.ts +1 -0
  34. package/src/objects/Deposit.ts +2 -2
  35. package/src/objects/Entity.ts +1 -1
  36. package/src/objects/FeeEstimate.ts +1 -0
  37. package/src/objects/GraphNode.ts +2 -2
  38. package/src/objects/Hop.ts +2 -2
  39. package/src/objects/HtlcAttemptFailureCode.ts +1 -0
  40. package/src/objects/IncomingPayment.ts +19 -6
  41. package/src/objects/IncomingPaymentAttempt.ts +2 -2
  42. package/src/objects/IncomingPaymentAttemptStatus.ts +1 -1
  43. package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -1
  44. package/src/objects/Invoice.ts +2 -2
  45. package/src/objects/InvoiceData.ts +1 -1
  46. package/src/objects/InvoiceType.ts +1 -0
  47. package/src/objects/LightningTransaction.ts +2 -2
  48. package/src/objects/LightsparkNode.ts +12 -6
  49. package/src/objects/LightsparkNodeOwner.ts +2 -2
  50. package/src/objects/LightsparkNodePurpose.ts +1 -0
  51. package/src/objects/LightsparkNodeToChannelsConnection.ts +11 -6
  52. package/src/objects/Node.ts +2 -3
  53. package/src/objects/NodeAddress.ts +1 -1
  54. package/src/objects/NodeAddressType.ts +1 -1
  55. package/src/objects/OnChainTransaction.ts +2 -3
  56. package/src/objects/OutgoingPayment.ts +14 -6
  57. package/src/objects/OutgoingPaymentAttempt.ts +14 -6
  58. package/src/objects/OutgoingPaymentAttemptStatus.ts +1 -1
  59. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +21 -1
  60. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +21 -1
  61. package/src/objects/PageInfo.ts +1 -0
  62. package/src/objects/PaymentFailureReason.ts +1 -0
  63. package/src/objects/PaymentRequest.ts +2 -2
  64. package/src/objects/PaymentRequestData.ts +1 -1
  65. package/src/objects/PaymentRequestStatus.ts +1 -0
  66. package/src/objects/Permission.ts +1 -0
  67. package/src/objects/RiskRating.ts +18 -0
  68. package/src/objects/RoutingTransaction.ts +2 -2
  69. package/src/objects/RoutingTransactionFailureReason.ts +1 -0
  70. package/src/objects/ScreenBitcoinAddressesInput.ts +23 -0
  71. package/src/objects/ScreenBitcoinAddressesOutput.ts +25 -0
  72. package/src/objects/Transaction.ts +2 -2
  73. package/src/objects/TransactionFailures.ts +1 -0
  74. package/src/objects/TransactionStatus.ts +1 -0
  75. package/src/objects/TransactionType.ts +1 -0
  76. package/src/objects/Wallet.ts +632 -7
  77. package/src/objects/WalletStatus.ts +1 -0
  78. package/src/objects/WalletToPaymentRequestsConnection.ts +57 -0
  79. package/src/objects/WalletToTransactionsConnection.ts +57 -0
  80. package/src/objects/WebhookEventType.ts +3 -0
  81. package/src/objects/Withdrawal.ts +2 -2
  82. package/src/objects/WithdrawalMode.ts +1 -0
  83. package/src/objects/WithdrawalRequest.ts +2 -1
  84. package/src/objects/WithdrawalRequestStatus.ts +1 -0
  85. package/src/objects/index.ts +7 -0
  86. package/src/objects/.eslintrc.cjs +0 -5
@@ -75,13 +75,14 @@ var PageInfoFromJson = (obj) => {
75
75
  // src/objects/AccountToApiTokensConnection.ts
76
76
  var AccountToApiTokensConnectionFromJson = (obj) => {
77
77
  return {
78
+ count: obj["account_to_api_tokens_connection_count"],
78
79
  pageInfo: PageInfoFromJson(
79
80
  obj["account_to_api_tokens_connection_page_info"]
80
81
  ),
81
- count: obj["account_to_api_tokens_connection_count"],
82
82
  entities: obj["account_to_api_tokens_connection_entities"].map(
83
83
  (e) => ApiTokenFromJson(e)
84
- )
84
+ ),
85
+ typename: "AccountToApiTokensConnection"
85
86
  };
86
87
  };
87
88
 
@@ -471,13 +472,14 @@ var LightsparkNodeStatus_default = LightsparkNodeStatus;
471
472
  // src/objects/LightsparkNodeToChannelsConnection.ts
472
473
  var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
473
474
  return {
475
+ count: obj["lightspark_node_to_channels_connection_count"],
474
476
  pageInfo: PageInfoFromJson(
475
477
  obj["lightspark_node_to_channels_connection_page_info"]
476
478
  ),
477
- count: obj["lightspark_node_to_channels_connection_count"],
478
479
  entities: obj["lightspark_node_to_channels_connection_entities"].map(
479
480
  (e) => ChannelFromJson(e)
480
- )
481
+ ),
482
+ typename: "LightsparkNodeToChannelsConnection"
481
483
  };
482
484
  };
483
485
 
@@ -568,14 +570,15 @@ query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [Node
568
570
  }
569
571
  });
570
572
  }
571
- async getChannels(client, first = void 0, statuses = void 0) {
573
+ async getChannels(client, first = void 0, statuses = void 0, after = void 0) {
572
574
  return await client.executeRawQuery({
573
575
  queryPayload: `
574
- query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!]) {
576
+ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) {
575
577
  entity(id: $entity_id) {
576
578
  ... on LightsparkNode {
577
- channels(, first: $first, statuses: $statuses) {
579
+ channels(, first: $first, statuses: $statuses, after: $after) {
578
580
  __typename
581
+ lightspark_node_to_channels_connection_count: count
579
582
  lightspark_node_to_channels_connection_page_info: page_info {
580
583
  __typename
581
584
  page_info_has_next_page: has_next_page
@@ -583,7 +586,6 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
583
586
  page_info_start_cursor: start_cursor
584
587
  page_info_end_cursor: end_cursor
585
588
  }
586
- lightspark_node_to_channels_connection_count: count
587
589
  lightspark_node_to_channels_connection_entities: entities {
588
590
  __typename
589
591
  channel_id: id
@@ -683,7 +685,12 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
683
685
  }
684
686
  }
685
687
  `,
686
- variables: { entity_id: this.id, first, statuses },
688
+ variables: {
689
+ entity_id: this.id,
690
+ first,
691
+ statuses,
692
+ after
693
+ },
687
694
  constructObject: (json) => {
688
695
  const connection = json["entity"]["channels"];
689
696
  return LightsparkNodeToChannelsConnectionFromJson(connection);
@@ -846,11 +853,12 @@ var LightsparkNode_default = LightsparkNode;
846
853
  // src/objects/AccountToNodesConnection.ts
847
854
  var AccountToNodesConnectionFromJson = (obj) => {
848
855
  return {
849
- pageInfo: PageInfoFromJson(obj["account_to_nodes_connection_page_info"]),
850
856
  count: obj["account_to_nodes_connection_count"],
857
+ pageInfo: PageInfoFromJson(obj["account_to_nodes_connection_page_info"]),
851
858
  entities: obj["account_to_nodes_connection_entities"].map(
852
859
  (e) => LightsparkNodeFromJson(e)
853
860
  ),
861
+ typename: "AccountToNodesConnection",
854
862
  purpose: !!obj["account_to_nodes_connection_purpose"] ? LightsparkNodePurpose_default[obj["account_to_nodes_connection_purpose"]] ?? LightsparkNodePurpose_default.FUTURE_VALUE : null
855
863
  };
856
864
  };
@@ -1543,13 +1551,14 @@ ${FRAGMENT8}
1543
1551
  // src/objects/AccountToPaymentRequestsConnection.ts
1544
1552
  var AccountToPaymentRequestsConnectionFromJson = (obj) => {
1545
1553
  return {
1546
- entities: obj["account_to_payment_requests_connection_entities"].map(
1547
- (e) => PaymentRequestFromJson(e)
1548
- ),
1554
+ count: obj["account_to_payment_requests_connection_count"],
1549
1555
  pageInfo: PageInfoFromJson(
1550
1556
  obj["account_to_payment_requests_connection_page_info"]
1551
1557
  ),
1552
- count: obj["account_to_payment_requests_connection_count"]
1558
+ entities: obj["account_to_payment_requests_connection_entities"].map(
1559
+ (e) => PaymentRequestFromJson(e)
1560
+ ),
1561
+ typename: "AccountToPaymentRequestsConnection"
1553
1562
  };
1554
1563
  };
1555
1564
 
@@ -1625,9 +1634,13 @@ ${FRAGMENT9}
1625
1634
  var IncomingPaymentToAttemptsConnectionFromJson = (obj) => {
1626
1635
  return {
1627
1636
  count: obj["incoming_payment_to_attempts_connection_count"],
1637
+ pageInfo: PageInfoFromJson(
1638
+ obj["incoming_payment_to_attempts_connection_page_info"]
1639
+ ),
1628
1640
  entities: obj["incoming_payment_to_attempts_connection_entities"].map(
1629
1641
  (e) => IncomingPaymentAttemptFromJson(e)
1630
- )
1642
+ ),
1643
+ typename: "IncomingPaymentToAttemptsConnection"
1631
1644
  };
1632
1645
  };
1633
1646
 
@@ -1660,15 +1673,22 @@ var IncomingPayment = class {
1660
1673
  this.paymentRequestId = paymentRequestId;
1661
1674
  autoBind6(this);
1662
1675
  }
1663
- async getAttempts(client, first = void 0, statuses = void 0) {
1676
+ async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
1664
1677
  return await client.executeRawQuery({
1665
1678
  queryPayload: `
1666
- query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $statuses: [IncomingPaymentAttemptStatus!]) {
1679
+ query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $statuses: [IncomingPaymentAttemptStatus!], $after: String) {
1667
1680
  entity(id: $entity_id) {
1668
1681
  ... on IncomingPayment {
1669
- attempts(, first: $first, statuses: $statuses) {
1682
+ attempts(, first: $first, statuses: $statuses, after: $after) {
1670
1683
  __typename
1671
1684
  incoming_payment_to_attempts_connection_count: count
1685
+ incoming_payment_to_attempts_connection_page_info: page_info {
1686
+ __typename
1687
+ page_info_has_next_page: has_next_page
1688
+ page_info_has_previous_page: has_previous_page
1689
+ page_info_start_cursor: start_cursor
1690
+ page_info_end_cursor: end_cursor
1691
+ }
1672
1692
  incoming_payment_to_attempts_connection_entities: entities {
1673
1693
  __typename
1674
1694
  incoming_payment_attempt_id: id
@@ -1693,7 +1713,12 @@ query FetchIncomingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $st
1693
1713
  }
1694
1714
  }
1695
1715
  `,
1696
- variables: { entity_id: this.id, first, statuses },
1716
+ variables: {
1717
+ entity_id: this.id,
1718
+ first,
1719
+ statuses,
1720
+ after
1721
+ },
1697
1722
  constructObject: (json) => {
1698
1723
  const connection = json["entity"]["attempts"];
1699
1724
  return IncomingPaymentToAttemptsConnectionFromJson(connection);
@@ -1878,9 +1903,13 @@ ${FRAGMENT11}
1878
1903
  var OutgoingPaymentAttemptToHopsConnectionFromJson = (obj) => {
1879
1904
  return {
1880
1905
  count: obj["outgoing_payment_attempt_to_hops_connection_count"],
1906
+ pageInfo: PageInfoFromJson(
1907
+ obj["outgoing_payment_attempt_to_hops_connection_page_info"]
1908
+ ),
1881
1909
  entities: obj["outgoing_payment_attempt_to_hops_connection_entities"].map(
1882
1910
  (e) => HopFromJson(e)
1883
- )
1911
+ ),
1912
+ typename: "OutgoingPaymentAttemptToHopsConnection"
1884
1913
  };
1885
1914
  };
1886
1915
 
@@ -1900,15 +1929,22 @@ var OutgoingPaymentAttempt = class {
1900
1929
  this.fees = fees;
1901
1930
  autoBind7(this);
1902
1931
  }
1903
- async getHops(client, first = void 0) {
1932
+ async getHops(client, first = void 0, after = void 0) {
1904
1933
  return await client.executeRawQuery({
1905
1934
  queryPayload: `
1906
- query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int) {
1935
+ query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int, $after: String) {
1907
1936
  entity(id: $entity_id) {
1908
1937
  ... on OutgoingPaymentAttempt {
1909
- hops(, first: $first) {
1938
+ hops(, first: $first, after: $after) {
1910
1939
  __typename
1911
1940
  outgoing_payment_attempt_to_hops_connection_count: count
1941
+ outgoing_payment_attempt_to_hops_connection_page_info: page_info {
1942
+ __typename
1943
+ page_info_has_next_page: has_next_page
1944
+ page_info_has_previous_page: has_previous_page
1945
+ page_info_start_cursor: start_cursor
1946
+ page_info_end_cursor: end_cursor
1947
+ }
1912
1948
  outgoing_payment_attempt_to_hops_connection_entities: entities {
1913
1949
  __typename
1914
1950
  hop_id: id
@@ -1942,7 +1978,7 @@ query FetchOutgoingPaymentAttemptToHopsConnection($entity_id: ID!, $first: Int)
1942
1978
  }
1943
1979
  }
1944
1980
  `,
1945
- variables: { entity_id: this.id, first },
1981
+ variables: { entity_id: this.id, first, after },
1946
1982
  constructObject: (json) => {
1947
1983
  const connection = json["entity"]["hops"];
1948
1984
  return OutgoingPaymentAttemptToHopsConnectionFromJson(connection);
@@ -2018,9 +2054,13 @@ var OutgoingPaymentAttempt_default = OutgoingPaymentAttempt;
2018
2054
  var OutgoingPaymentToAttemptsConnectionFromJson = (obj) => {
2019
2055
  return {
2020
2056
  count: obj["outgoing_payment_to_attempts_connection_count"],
2057
+ pageInfo: PageInfoFromJson(
2058
+ obj["outgoing_payment_to_attempts_connection_page_info"]
2059
+ ),
2021
2060
  entities: obj["outgoing_payment_to_attempts_connection_entities"].map(
2022
2061
  (e) => OutgoingPaymentAttemptFromJson(e)
2023
- )
2062
+ ),
2063
+ typename: "OutgoingPaymentToAttemptsConnection"
2024
2064
  };
2025
2065
  };
2026
2066
 
@@ -2089,15 +2129,22 @@ var OutgoingPayment = class {
2089
2129
  this.failureMessage = failureMessage;
2090
2130
  autoBind8(this);
2091
2131
  }
2092
- async getAttempts(client, first = void 0) {
2132
+ async getAttempts(client, first = void 0, after = void 0) {
2093
2133
  return await client.executeRawQuery({
2094
2134
  queryPayload: `
2095
- query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int) {
2135
+ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $after: String) {
2096
2136
  entity(id: $entity_id) {
2097
2137
  ... on OutgoingPayment {
2098
- attempts(, first: $first) {
2138
+ attempts(, first: $first, after: $after) {
2099
2139
  __typename
2100
2140
  outgoing_payment_to_attempts_connection_count: count
2141
+ outgoing_payment_to_attempts_connection_page_info: page_info {
2142
+ __typename
2143
+ page_info_has_next_page: has_next_page
2144
+ page_info_has_previous_page: has_previous_page
2145
+ page_info_start_cursor: start_cursor
2146
+ page_info_end_cursor: end_cursor
2147
+ }
2101
2148
  outgoing_payment_to_attempts_connection_entities: entities {
2102
2149
  __typename
2103
2150
  outgoing_payment_attempt_id: id
@@ -2132,7 +2179,7 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int) {
2132
2179
  }
2133
2180
  }
2134
2181
  `,
2135
- variables: { entity_id: this.id, first },
2182
+ variables: { entity_id: this.id, first, after },
2136
2183
  constructObject: (json) => {
2137
2184
  const connection = json["entity"]["attempts"];
2138
2185
  return OutgoingPaymentToAttemptsConnectionFromJson(connection);
@@ -2893,12 +2940,13 @@ ${FRAGMENT14}
2893
2940
  var AccountToTransactionsConnectionFromJson = (obj) => {
2894
2941
  return {
2895
2942
  count: obj["account_to_transactions_connection_count"],
2896
- entities: obj["account_to_transactions_connection_entities"].map(
2897
- (e) => TransactionFromJson(e)
2898
- ),
2899
2943
  pageInfo: PageInfoFromJson(
2900
2944
  obj["account_to_transactions_connection_page_info"]
2901
2945
  ),
2946
+ entities: obj["account_to_transactions_connection_entities"].map(
2947
+ (e) => TransactionFromJson(e)
2948
+ ),
2949
+ typename: "AccountToTransactionsConnection",
2902
2950
  profitLoss: !!obj["account_to_transactions_connection_profit_loss"] ? CurrencyAmountFromJson(
2903
2951
  obj["account_to_transactions_connection_profit_loss"]
2904
2952
  ) : void 0,
@@ -2943,6 +2991,34 @@ var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
2943
2991
  })(WalletStatus || {});
2944
2992
  var WalletStatus_default = WalletStatus;
2945
2993
 
2994
+ // src/objects/WalletToPaymentRequestsConnection.ts
2995
+ var WalletToPaymentRequestsConnectionFromJson = (obj) => {
2996
+ return {
2997
+ count: obj["wallet_to_payment_requests_connection_count"],
2998
+ pageInfo: PageInfoFromJson(
2999
+ obj["wallet_to_payment_requests_connection_page_info"]
3000
+ ),
3001
+ entities: obj["wallet_to_payment_requests_connection_entities"].map(
3002
+ (e) => PaymentRequestFromJson(e)
3003
+ ),
3004
+ typename: "WalletToPaymentRequestsConnection"
3005
+ };
3006
+ };
3007
+
3008
+ // src/objects/WalletToTransactionsConnection.ts
3009
+ var WalletToTransactionsConnectionFromJson = (obj) => {
3010
+ return {
3011
+ count: obj["wallet_to_transactions_connection_count"],
3012
+ pageInfo: PageInfoFromJson(
3013
+ obj["wallet_to_transactions_connection_page_info"]
3014
+ ),
3015
+ entities: obj["wallet_to_transactions_connection_entities"].map(
3016
+ (e) => TransactionFromJson(e)
3017
+ ),
3018
+ typename: "WalletToTransactionsConnection"
3019
+ };
3020
+ };
3021
+
2946
3022
  // src/objects/Wallet.ts
2947
3023
  var Wallet = class {
2948
3024
  constructor(id, createdAt, updatedAt, thirdPartyIdentifier, status, typename, lastLoginAt, balances) {
@@ -2956,200 +3032,803 @@ var Wallet = class {
2956
3032
  this.balances = balances;
2957
3033
  autoBind9(this);
2958
3034
  }
2959
- async getTotalAmountReceived(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
2960
- return await client.executeRawQuery({
2961
- queryPayload: `
2962
- query FetchWalletTotalAmountReceived($created_after_date: DateTime, $created_before_date: DateTime) {
2963
- current_wallet {
2964
- ... on Wallet {
2965
- total_amount_received(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
2966
- __typename
2967
- currency_amount_original_value: original_value
2968
- currency_amount_original_unit: original_unit
2969
- currency_amount_preferred_currency_unit: preferred_currency_unit
2970
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2971
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2972
- }
2973
- }
2974
- }
2975
- }
2976
- `,
2977
- variables: {
2978
- created_after_date: createdAfterDate,
2979
- created_before_date: createdBeforeDate
2980
- },
2981
- constructObject: (json) => {
2982
- const connection = json["current_wallet"]["total_amount_received"];
2983
- return CurrencyAmountFromJson(connection);
2984
- }
2985
- });
2986
- }
2987
- async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
3035
+ async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
2988
3036
  return await client.executeRawQuery({
2989
3037
  queryPayload: `
2990
- query FetchWalletTotalAmountSent($created_after_date: DateTime, $created_before_date: DateTime) {
2991
- current_wallet {
2992
- ... on Wallet {
2993
- total_amount_sent(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
2994
- __typename
2995
- currency_amount_original_value: original_value
2996
- currency_amount_original_unit: original_unit
2997
- currency_amount_preferred_currency_unit: preferred_currency_unit
2998
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2999
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3000
- }
3001
- }
3002
- }
3003
- }
3004
- `,
3005
- variables: {
3006
- created_after_date: createdAfterDate,
3007
- created_before_date: createdBeforeDate
3008
- },
3009
- constructObject: (json) => {
3010
- const connection = json["current_wallet"]["total_amount_sent"];
3011
- return CurrencyAmountFromJson(connection);
3012
- }
3013
- });
3014
- }
3015
- static getWalletQuery(id) {
3016
- return {
3017
- queryPayload: `
3018
- query GetWallet($id: ID!) {
3019
- entity(id: $id) {
3038
+ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime, $statuses: [TransactionStatus!], $types: [TransactionType!]) {
3039
+ entity(id: $entity_id) {
3020
3040
  ... on Wallet {
3021
- ...WalletFragment
3022
- }
3023
- }
3024
- }
3025
-
3026
- ${FRAGMENT15}
3027
- `,
3028
- variables: { id },
3029
- constructObject: (data) => WalletFromJson(data.entity)
3030
- };
3031
- }
3032
- };
3033
- var WalletFromJson = (obj) => {
3034
- return new Wallet(
3035
- obj["wallet_id"],
3036
- obj["wallet_created_at"],
3037
- obj["wallet_updated_at"],
3038
- obj["wallet_third_party_identifier"],
3039
- WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
3040
- "Wallet",
3041
- obj["wallet_last_login_at"],
3042
- !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
3043
- );
3044
- };
3045
- var FRAGMENT15 = `
3046
- fragment WalletFragment on Wallet {
3047
- __typename
3048
- wallet_id: id
3049
- wallet_created_at: created_at
3050
- wallet_updated_at: updated_at
3051
- wallet_last_login_at: last_login_at
3052
- wallet_balances: balances {
3053
- __typename
3054
- balances_owned_balance: owned_balance {
3055
- __typename
3056
- currency_amount_original_value: original_value
3057
- currency_amount_original_unit: original_unit
3058
- currency_amount_preferred_currency_unit: preferred_currency_unit
3059
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3060
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3061
- }
3062
- balances_available_to_send_balance: available_to_send_balance {
3063
- __typename
3064
- currency_amount_original_value: original_value
3065
- currency_amount_original_unit: original_unit
3066
- currency_amount_preferred_currency_unit: preferred_currency_unit
3067
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3068
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3069
- }
3070
- balances_available_to_withdraw_balance: available_to_withdraw_balance {
3071
- __typename
3072
- currency_amount_original_value: original_value
3073
- currency_amount_original_unit: original_unit
3074
- currency_amount_preferred_currency_unit: preferred_currency_unit
3075
- currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3076
- currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3077
- }
3078
- }
3079
- wallet_third_party_identifier: third_party_identifier
3080
- wallet_status: status
3081
- }`;
3082
- var Wallet_default = Wallet;
3083
-
3084
- // src/objects/AccountToWalletsConnection.ts
3085
- var AccountToWalletsConnectionFromJson = (obj) => {
3086
- return {
3087
- pageInfo: PageInfoFromJson(obj["account_to_wallets_connection_page_info"]),
3088
- count: obj["account_to_wallets_connection_count"],
3089
- entities: obj["account_to_wallets_connection_entities"].map(
3090
- (e) => WalletFromJson(e)
3091
- )
3092
- };
3093
- };
3094
-
3095
- // src/objects/Account.ts
3096
- var Account = class {
3097
- constructor(id, createdAt, updatedAt, typename, name) {
3098
- this.id = id;
3099
- this.createdAt = createdAt;
3100
- this.updatedAt = updatedAt;
3101
- this.typename = typename;
3102
- this.name = name;
3103
- autoBind10(this);
3104
- }
3105
- async getApiTokens(client, first = void 0) {
3106
- return await client.executeRawQuery({
3107
- queryPayload: `
3108
- query FetchAccountToApiTokensConnection($first: Int) {
3109
- current_account {
3110
- ... on Account {
3111
- api_tokens(, first: $first) {
3041
+ transactions(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date, statuses: $statuses, types: $types) {
3112
3042
  __typename
3113
- account_to_api_tokens_connection_page_info: page_info {
3043
+ wallet_to_transactions_connection_count: count
3044
+ wallet_to_transactions_connection_page_info: page_info {
3114
3045
  __typename
3115
3046
  page_info_has_next_page: has_next_page
3116
3047
  page_info_has_previous_page: has_previous_page
3117
3048
  page_info_start_cursor: start_cursor
3118
3049
  page_info_end_cursor: end_cursor
3119
3050
  }
3120
- account_to_api_tokens_connection_count: count
3121
- account_to_api_tokens_connection_entities: entities {
3122
- __typename
3123
- api_token_id: id
3124
- api_token_created_at: created_at
3125
- api_token_updated_at: updated_at
3126
- api_token_client_id: client_id
3127
- api_token_name: name
3128
- api_token_permissions: permissions
3129
- }
3130
- }
3131
- }
3132
- }
3133
- }
3134
- `,
3135
- variables: { first },
3136
- constructObject: (json) => {
3137
- const connection = json["current_account"]["api_tokens"];
3138
- return AccountToApiTokensConnectionFromJson(connection);
3139
- }
3140
- });
3141
- }
3142
- async getBlockchainBalance(client, bitcoinNetworks = void 0, nodeIds = void 0) {
3143
- return await client.executeRawQuery({
3144
- queryPayload: `
3145
- query FetchAccountBlockchainBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
3146
- current_account {
3147
- ... on Account {
3148
- blockchain_balance(, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
3149
- __typename
3150
- blockchain_balance_total_balance: total_balance {
3051
+ wallet_to_transactions_connection_entities: entities {
3151
3052
  __typename
3152
- currency_amount_original_value: original_value
3053
+ ... on ChannelClosingTransaction {
3054
+ __typename
3055
+ channel_closing_transaction_id: id
3056
+ channel_closing_transaction_created_at: created_at
3057
+ channel_closing_transaction_updated_at: updated_at
3058
+ channel_closing_transaction_status: status
3059
+ channel_closing_transaction_resolved_at: resolved_at
3060
+ channel_closing_transaction_amount: amount {
3061
+ __typename
3062
+ currency_amount_original_value: original_value
3063
+ currency_amount_original_unit: original_unit
3064
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3065
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3066
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3067
+ }
3068
+ channel_closing_transaction_transaction_hash: transaction_hash
3069
+ channel_closing_transaction_fees: fees {
3070
+ __typename
3071
+ currency_amount_original_value: original_value
3072
+ currency_amount_original_unit: original_unit
3073
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3074
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3075
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3076
+ }
3077
+ channel_closing_transaction_block_hash: block_hash
3078
+ channel_closing_transaction_block_height: block_height
3079
+ channel_closing_transaction_destination_addresses: destination_addresses
3080
+ channel_closing_transaction_num_confirmations: num_confirmations
3081
+ channel_closing_transaction_channel: channel {
3082
+ id
3083
+ }
3084
+ }
3085
+ ... on ChannelOpeningTransaction {
3086
+ __typename
3087
+ channel_opening_transaction_id: id
3088
+ channel_opening_transaction_created_at: created_at
3089
+ channel_opening_transaction_updated_at: updated_at
3090
+ channel_opening_transaction_status: status
3091
+ channel_opening_transaction_resolved_at: resolved_at
3092
+ channel_opening_transaction_amount: amount {
3093
+ __typename
3094
+ currency_amount_original_value: original_value
3095
+ currency_amount_original_unit: original_unit
3096
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3097
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3098
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3099
+ }
3100
+ channel_opening_transaction_transaction_hash: transaction_hash
3101
+ channel_opening_transaction_fees: fees {
3102
+ __typename
3103
+ currency_amount_original_value: original_value
3104
+ currency_amount_original_unit: original_unit
3105
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3106
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3107
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3108
+ }
3109
+ channel_opening_transaction_block_hash: block_hash
3110
+ channel_opening_transaction_block_height: block_height
3111
+ channel_opening_transaction_destination_addresses: destination_addresses
3112
+ channel_opening_transaction_num_confirmations: num_confirmations
3113
+ channel_opening_transaction_channel: channel {
3114
+ id
3115
+ }
3116
+ }
3117
+ ... on Deposit {
3118
+ __typename
3119
+ deposit_id: id
3120
+ deposit_created_at: created_at
3121
+ deposit_updated_at: updated_at
3122
+ deposit_status: status
3123
+ deposit_resolved_at: resolved_at
3124
+ deposit_amount: amount {
3125
+ __typename
3126
+ currency_amount_original_value: original_value
3127
+ currency_amount_original_unit: original_unit
3128
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3129
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3130
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3131
+ }
3132
+ deposit_transaction_hash: transaction_hash
3133
+ deposit_fees: fees {
3134
+ __typename
3135
+ currency_amount_original_value: original_value
3136
+ currency_amount_original_unit: original_unit
3137
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3138
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3139
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3140
+ }
3141
+ deposit_block_hash: block_hash
3142
+ deposit_block_height: block_height
3143
+ deposit_destination_addresses: destination_addresses
3144
+ deposit_num_confirmations: num_confirmations
3145
+ deposit_destination: destination {
3146
+ id
3147
+ }
3148
+ }
3149
+ ... on IncomingPayment {
3150
+ __typename
3151
+ incoming_payment_id: id
3152
+ incoming_payment_created_at: created_at
3153
+ incoming_payment_updated_at: updated_at
3154
+ incoming_payment_status: status
3155
+ incoming_payment_resolved_at: resolved_at
3156
+ incoming_payment_amount: amount {
3157
+ __typename
3158
+ currency_amount_original_value: original_value
3159
+ currency_amount_original_unit: original_unit
3160
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3161
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3162
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3163
+ }
3164
+ incoming_payment_transaction_hash: transaction_hash
3165
+ incoming_payment_origin: origin {
3166
+ id
3167
+ }
3168
+ incoming_payment_destination: destination {
3169
+ id
3170
+ }
3171
+ incoming_payment_payment_request: payment_request {
3172
+ id
3173
+ }
3174
+ }
3175
+ ... on OutgoingPayment {
3176
+ __typename
3177
+ outgoing_payment_id: id
3178
+ outgoing_payment_created_at: created_at
3179
+ outgoing_payment_updated_at: updated_at
3180
+ outgoing_payment_status: status
3181
+ outgoing_payment_resolved_at: resolved_at
3182
+ outgoing_payment_amount: amount {
3183
+ __typename
3184
+ currency_amount_original_value: original_value
3185
+ currency_amount_original_unit: original_unit
3186
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3187
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3188
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3189
+ }
3190
+ outgoing_payment_transaction_hash: transaction_hash
3191
+ outgoing_payment_origin: origin {
3192
+ id
3193
+ }
3194
+ outgoing_payment_destination: destination {
3195
+ id
3196
+ }
3197
+ outgoing_payment_fees: fees {
3198
+ __typename
3199
+ currency_amount_original_value: original_value
3200
+ currency_amount_original_unit: original_unit
3201
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3202
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3203
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3204
+ }
3205
+ outgoing_payment_payment_request_data: payment_request_data {
3206
+ __typename
3207
+ ... on InvoiceData {
3208
+ __typename
3209
+ invoice_data_encoded_payment_request: encoded_payment_request
3210
+ invoice_data_bitcoin_network: bitcoin_network
3211
+ invoice_data_payment_hash: payment_hash
3212
+ invoice_data_amount: amount {
3213
+ __typename
3214
+ currency_amount_original_value: original_value
3215
+ currency_amount_original_unit: original_unit
3216
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3217
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3218
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3219
+ }
3220
+ invoice_data_created_at: created_at
3221
+ invoice_data_expires_at: expires_at
3222
+ invoice_data_memo: memo
3223
+ invoice_data_destination: destination {
3224
+ __typename
3225
+ ... on GraphNode {
3226
+ __typename
3227
+ graph_node_id: id
3228
+ graph_node_created_at: created_at
3229
+ graph_node_updated_at: updated_at
3230
+ graph_node_alias: alias
3231
+ graph_node_bitcoin_network: bitcoin_network
3232
+ graph_node_color: color
3233
+ graph_node_conductivity: conductivity
3234
+ graph_node_display_name: display_name
3235
+ graph_node_public_key: public_key
3236
+ }
3237
+ ... on LightsparkNode {
3238
+ __typename
3239
+ lightspark_node_id: id
3240
+ lightspark_node_created_at: created_at
3241
+ lightspark_node_updated_at: updated_at
3242
+ lightspark_node_alias: alias
3243
+ lightspark_node_bitcoin_network: bitcoin_network
3244
+ lightspark_node_color: color
3245
+ lightspark_node_conductivity: conductivity
3246
+ lightspark_node_display_name: display_name
3247
+ lightspark_node_public_key: public_key
3248
+ lightspark_node_account: account {
3249
+ id
3250
+ }
3251
+ lightspark_node_owner: owner {
3252
+ id
3253
+ }
3254
+ lightspark_node_blockchain_balance: blockchain_balance {
3255
+ __typename
3256
+ blockchain_balance_total_balance: total_balance {
3257
+ __typename
3258
+ currency_amount_original_value: original_value
3259
+ currency_amount_original_unit: original_unit
3260
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3261
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3262
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3263
+ }
3264
+ blockchain_balance_confirmed_balance: confirmed_balance {
3265
+ __typename
3266
+ currency_amount_original_value: original_value
3267
+ currency_amount_original_unit: original_unit
3268
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3269
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3270
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3271
+ }
3272
+ blockchain_balance_unconfirmed_balance: unconfirmed_balance {
3273
+ __typename
3274
+ currency_amount_original_value: original_value
3275
+ currency_amount_original_unit: original_unit
3276
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3277
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3278
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3279
+ }
3280
+ blockchain_balance_locked_balance: locked_balance {
3281
+ __typename
3282
+ currency_amount_original_value: original_value
3283
+ currency_amount_original_unit: original_unit
3284
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3285
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3286
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3287
+ }
3288
+ blockchain_balance_required_reserve: required_reserve {
3289
+ __typename
3290
+ currency_amount_original_value: original_value
3291
+ currency_amount_original_unit: original_unit
3292
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3293
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3294
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3295
+ }
3296
+ blockchain_balance_available_balance: available_balance {
3297
+ __typename
3298
+ currency_amount_original_value: original_value
3299
+ currency_amount_original_unit: original_unit
3300
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3301
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3302
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3303
+ }
3304
+ }
3305
+ lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
3306
+ __typename
3307
+ secret_encrypted_value: encrypted_value
3308
+ secret_cipher: cipher
3309
+ }
3310
+ lightspark_node_total_balance: total_balance {
3311
+ __typename
3312
+ currency_amount_original_value: original_value
3313
+ currency_amount_original_unit: original_unit
3314
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3315
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3316
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3317
+ }
3318
+ lightspark_node_total_local_balance: total_local_balance {
3319
+ __typename
3320
+ currency_amount_original_value: original_value
3321
+ currency_amount_original_unit: original_unit
3322
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3323
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3324
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3325
+ }
3326
+ lightspark_node_local_balance: local_balance {
3327
+ __typename
3328
+ currency_amount_original_value: original_value
3329
+ currency_amount_original_unit: original_unit
3330
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3331
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3332
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3333
+ }
3334
+ lightspark_node_purpose: purpose
3335
+ lightspark_node_remote_balance: remote_balance {
3336
+ __typename
3337
+ currency_amount_original_value: original_value
3338
+ currency_amount_original_unit: original_unit
3339
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3340
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3341
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3342
+ }
3343
+ lightspark_node_status: status
3344
+ }
3345
+ }
3346
+ }
3347
+ }
3348
+ outgoing_payment_failure_reason: failure_reason
3349
+ outgoing_payment_failure_message: failure_message {
3350
+ __typename
3351
+ rich_text_text: text
3352
+ }
3353
+ }
3354
+ ... on RoutingTransaction {
3355
+ __typename
3356
+ routing_transaction_id: id
3357
+ routing_transaction_created_at: created_at
3358
+ routing_transaction_updated_at: updated_at
3359
+ routing_transaction_status: status
3360
+ routing_transaction_resolved_at: resolved_at
3361
+ routing_transaction_amount: amount {
3362
+ __typename
3363
+ currency_amount_original_value: original_value
3364
+ currency_amount_original_unit: original_unit
3365
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3366
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3367
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3368
+ }
3369
+ routing_transaction_transaction_hash: transaction_hash
3370
+ routing_transaction_incoming_channel: incoming_channel {
3371
+ id
3372
+ }
3373
+ routing_transaction_outgoing_channel: outgoing_channel {
3374
+ id
3375
+ }
3376
+ routing_transaction_fees: fees {
3377
+ __typename
3378
+ currency_amount_original_value: original_value
3379
+ currency_amount_original_unit: original_unit
3380
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3381
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3382
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3383
+ }
3384
+ routing_transaction_failure_message: failure_message {
3385
+ __typename
3386
+ rich_text_text: text
3387
+ }
3388
+ routing_transaction_failure_reason: failure_reason
3389
+ }
3390
+ ... on Withdrawal {
3391
+ __typename
3392
+ withdrawal_id: id
3393
+ withdrawal_created_at: created_at
3394
+ withdrawal_updated_at: updated_at
3395
+ withdrawal_status: status
3396
+ withdrawal_resolved_at: resolved_at
3397
+ withdrawal_amount: amount {
3398
+ __typename
3399
+ currency_amount_original_value: original_value
3400
+ currency_amount_original_unit: original_unit
3401
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3402
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3403
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3404
+ }
3405
+ withdrawal_transaction_hash: transaction_hash
3406
+ withdrawal_fees: fees {
3407
+ __typename
3408
+ currency_amount_original_value: original_value
3409
+ currency_amount_original_unit: original_unit
3410
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3411
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3412
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3413
+ }
3414
+ withdrawal_block_hash: block_hash
3415
+ withdrawal_block_height: block_height
3416
+ withdrawal_destination_addresses: destination_addresses
3417
+ withdrawal_num_confirmations: num_confirmations
3418
+ withdrawal_origin: origin {
3419
+ id
3420
+ }
3421
+ }
3422
+ }
3423
+ }
3424
+ }
3425
+ }
3426
+ }
3427
+ `,
3428
+ variables: {
3429
+ entity_id: this.id,
3430
+ first,
3431
+ after,
3432
+ created_after_date: createdAfterDate,
3433
+ created_before_date: createdBeforeDate,
3434
+ statuses,
3435
+ types
3436
+ },
3437
+ constructObject: (json) => {
3438
+ const connection = json["entity"]["transactions"];
3439
+ return WalletToTransactionsConnectionFromJson(connection);
3440
+ }
3441
+ });
3442
+ }
3443
+ async getPaymentRequests(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0) {
3444
+ return await client.executeRawQuery({
3445
+ queryPayload: `
3446
+ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $after: ID, $created_after_date: DateTime, $created_before_date: DateTime) {
3447
+ entity(id: $entity_id) {
3448
+ ... on Wallet {
3449
+ payment_requests(, first: $first, after: $after, created_after_date: $created_after_date, created_before_date: $created_before_date) {
3450
+ __typename
3451
+ wallet_to_payment_requests_connection_count: count
3452
+ wallet_to_payment_requests_connection_page_info: page_info {
3453
+ __typename
3454
+ page_info_has_next_page: has_next_page
3455
+ page_info_has_previous_page: has_previous_page
3456
+ page_info_start_cursor: start_cursor
3457
+ page_info_end_cursor: end_cursor
3458
+ }
3459
+ wallet_to_payment_requests_connection_entities: entities {
3460
+ __typename
3461
+ ... on Invoice {
3462
+ __typename
3463
+ invoice_id: id
3464
+ invoice_created_at: created_at
3465
+ invoice_updated_at: updated_at
3466
+ invoice_data: data {
3467
+ __typename
3468
+ invoice_data_encoded_payment_request: encoded_payment_request
3469
+ invoice_data_bitcoin_network: bitcoin_network
3470
+ invoice_data_payment_hash: payment_hash
3471
+ invoice_data_amount: amount {
3472
+ __typename
3473
+ currency_amount_original_value: original_value
3474
+ currency_amount_original_unit: original_unit
3475
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3476
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3477
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3478
+ }
3479
+ invoice_data_created_at: created_at
3480
+ invoice_data_expires_at: expires_at
3481
+ invoice_data_memo: memo
3482
+ invoice_data_destination: destination {
3483
+ __typename
3484
+ ... on GraphNode {
3485
+ __typename
3486
+ graph_node_id: id
3487
+ graph_node_created_at: created_at
3488
+ graph_node_updated_at: updated_at
3489
+ graph_node_alias: alias
3490
+ graph_node_bitcoin_network: bitcoin_network
3491
+ graph_node_color: color
3492
+ graph_node_conductivity: conductivity
3493
+ graph_node_display_name: display_name
3494
+ graph_node_public_key: public_key
3495
+ }
3496
+ ... on LightsparkNode {
3497
+ __typename
3498
+ lightspark_node_id: id
3499
+ lightspark_node_created_at: created_at
3500
+ lightspark_node_updated_at: updated_at
3501
+ lightspark_node_alias: alias
3502
+ lightspark_node_bitcoin_network: bitcoin_network
3503
+ lightspark_node_color: color
3504
+ lightspark_node_conductivity: conductivity
3505
+ lightspark_node_display_name: display_name
3506
+ lightspark_node_public_key: public_key
3507
+ lightspark_node_account: account {
3508
+ id
3509
+ }
3510
+ lightspark_node_owner: owner {
3511
+ id
3512
+ }
3513
+ lightspark_node_blockchain_balance: blockchain_balance {
3514
+ __typename
3515
+ blockchain_balance_total_balance: total_balance {
3516
+ __typename
3517
+ currency_amount_original_value: original_value
3518
+ currency_amount_original_unit: original_unit
3519
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3520
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3521
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3522
+ }
3523
+ blockchain_balance_confirmed_balance: confirmed_balance {
3524
+ __typename
3525
+ currency_amount_original_value: original_value
3526
+ currency_amount_original_unit: original_unit
3527
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3528
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3529
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3530
+ }
3531
+ blockchain_balance_unconfirmed_balance: unconfirmed_balance {
3532
+ __typename
3533
+ currency_amount_original_value: original_value
3534
+ currency_amount_original_unit: original_unit
3535
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3536
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3537
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3538
+ }
3539
+ blockchain_balance_locked_balance: locked_balance {
3540
+ __typename
3541
+ currency_amount_original_value: original_value
3542
+ currency_amount_original_unit: original_unit
3543
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3544
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3545
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3546
+ }
3547
+ blockchain_balance_required_reserve: required_reserve {
3548
+ __typename
3549
+ currency_amount_original_value: original_value
3550
+ currency_amount_original_unit: original_unit
3551
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3552
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3553
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3554
+ }
3555
+ blockchain_balance_available_balance: available_balance {
3556
+ __typename
3557
+ currency_amount_original_value: original_value
3558
+ currency_amount_original_unit: original_unit
3559
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3560
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3561
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3562
+ }
3563
+ }
3564
+ lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key {
3565
+ __typename
3566
+ secret_encrypted_value: encrypted_value
3567
+ secret_cipher: cipher
3568
+ }
3569
+ lightspark_node_total_balance: total_balance {
3570
+ __typename
3571
+ currency_amount_original_value: original_value
3572
+ currency_amount_original_unit: original_unit
3573
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3574
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3575
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3576
+ }
3577
+ lightspark_node_total_local_balance: total_local_balance {
3578
+ __typename
3579
+ currency_amount_original_value: original_value
3580
+ currency_amount_original_unit: original_unit
3581
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3582
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3583
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3584
+ }
3585
+ lightspark_node_local_balance: local_balance {
3586
+ __typename
3587
+ currency_amount_original_value: original_value
3588
+ currency_amount_original_unit: original_unit
3589
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3590
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3591
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3592
+ }
3593
+ lightspark_node_purpose: purpose
3594
+ lightspark_node_remote_balance: remote_balance {
3595
+ __typename
3596
+ currency_amount_original_value: original_value
3597
+ currency_amount_original_unit: original_unit
3598
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3599
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3600
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3601
+ }
3602
+ lightspark_node_status: status
3603
+ }
3604
+ }
3605
+ }
3606
+ invoice_status: status
3607
+ invoice_amount_paid: amount_paid {
3608
+ __typename
3609
+ currency_amount_original_value: original_value
3610
+ currency_amount_original_unit: original_unit
3611
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3612
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3613
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3614
+ }
3615
+ }
3616
+ }
3617
+ }
3618
+ }
3619
+ }
3620
+ }
3621
+ `,
3622
+ variables: {
3623
+ entity_id: this.id,
3624
+ first,
3625
+ after,
3626
+ created_after_date: createdAfterDate,
3627
+ created_before_date: createdBeforeDate
3628
+ },
3629
+ constructObject: (json) => {
3630
+ const connection = json["entity"]["payment_requests"];
3631
+ return WalletToPaymentRequestsConnectionFromJson(connection);
3632
+ }
3633
+ });
3634
+ }
3635
+ async getTotalAmountReceived(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
3636
+ return await client.executeRawQuery({
3637
+ queryPayload: `
3638
+ query FetchWalletTotalAmountReceived($entity_id: ID!, $created_after_date: DateTime, $created_before_date: DateTime) {
3639
+ entity(id: $entity_id) {
3640
+ ... on Wallet {
3641
+ total_amount_received(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
3642
+ __typename
3643
+ currency_amount_original_value: original_value
3644
+ currency_amount_original_unit: original_unit
3645
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3646
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3647
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3648
+ }
3649
+ }
3650
+ }
3651
+ }
3652
+ `,
3653
+ variables: {
3654
+ entity_id: this.id,
3655
+ created_after_date: createdAfterDate,
3656
+ created_before_date: createdBeforeDate
3657
+ },
3658
+ constructObject: (json) => {
3659
+ const connection = json["entity"]["total_amount_received"];
3660
+ return CurrencyAmountFromJson(connection);
3661
+ }
3662
+ });
3663
+ }
3664
+ async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
3665
+ return await client.executeRawQuery({
3666
+ queryPayload: `
3667
+ query FetchWalletTotalAmountSent($entity_id: ID!, $created_after_date: DateTime, $created_before_date: DateTime) {
3668
+ entity(id: $entity_id) {
3669
+ ... on Wallet {
3670
+ total_amount_sent(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
3671
+ __typename
3672
+ currency_amount_original_value: original_value
3673
+ currency_amount_original_unit: original_unit
3674
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3675
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3676
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3677
+ }
3678
+ }
3679
+ }
3680
+ }
3681
+ `,
3682
+ variables: {
3683
+ entity_id: this.id,
3684
+ created_after_date: createdAfterDate,
3685
+ created_before_date: createdBeforeDate
3686
+ },
3687
+ constructObject: (json) => {
3688
+ const connection = json["entity"]["total_amount_sent"];
3689
+ return CurrencyAmountFromJson(connection);
3690
+ }
3691
+ });
3692
+ }
3693
+ static getWalletQuery(id) {
3694
+ return {
3695
+ queryPayload: `
3696
+ query GetWallet($id: ID!) {
3697
+ entity(id: $id) {
3698
+ ... on Wallet {
3699
+ ...WalletFragment
3700
+ }
3701
+ }
3702
+ }
3703
+
3704
+ ${FRAGMENT15}
3705
+ `,
3706
+ variables: { id },
3707
+ constructObject: (data) => WalletFromJson(data.entity)
3708
+ };
3709
+ }
3710
+ };
3711
+ var WalletFromJson = (obj) => {
3712
+ return new Wallet(
3713
+ obj["wallet_id"],
3714
+ obj["wallet_created_at"],
3715
+ obj["wallet_updated_at"],
3716
+ obj["wallet_third_party_identifier"],
3717
+ WalletStatus_default[obj["wallet_status"]] ?? WalletStatus_default.FUTURE_VALUE,
3718
+ "Wallet",
3719
+ obj["wallet_last_login_at"],
3720
+ !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
3721
+ );
3722
+ };
3723
+ var FRAGMENT15 = `
3724
+ fragment WalletFragment on Wallet {
3725
+ __typename
3726
+ wallet_id: id
3727
+ wallet_created_at: created_at
3728
+ wallet_updated_at: updated_at
3729
+ wallet_last_login_at: last_login_at
3730
+ wallet_balances: balances {
3731
+ __typename
3732
+ balances_owned_balance: owned_balance {
3733
+ __typename
3734
+ currency_amount_original_value: original_value
3735
+ currency_amount_original_unit: original_unit
3736
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3737
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3738
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3739
+ }
3740
+ balances_available_to_send_balance: available_to_send_balance {
3741
+ __typename
3742
+ currency_amount_original_value: original_value
3743
+ currency_amount_original_unit: original_unit
3744
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3745
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3746
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3747
+ }
3748
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
3749
+ __typename
3750
+ currency_amount_original_value: original_value
3751
+ currency_amount_original_unit: original_unit
3752
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3753
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3754
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3755
+ }
3756
+ }
3757
+ wallet_third_party_identifier: third_party_identifier
3758
+ wallet_status: status
3759
+ }`;
3760
+ var Wallet_default = Wallet;
3761
+
3762
+ // src/objects/AccountToWalletsConnection.ts
3763
+ var AccountToWalletsConnectionFromJson = (obj) => {
3764
+ return {
3765
+ count: obj["account_to_wallets_connection_count"],
3766
+ pageInfo: PageInfoFromJson(obj["account_to_wallets_connection_page_info"]),
3767
+ entities: obj["account_to_wallets_connection_entities"].map(
3768
+ (e) => WalletFromJson(e)
3769
+ ),
3770
+ typename: "AccountToWalletsConnection"
3771
+ };
3772
+ };
3773
+
3774
+ // src/objects/Account.ts
3775
+ var Account = class {
3776
+ constructor(id, createdAt, updatedAt, typename, name) {
3777
+ this.id = id;
3778
+ this.createdAt = createdAt;
3779
+ this.updatedAt = updatedAt;
3780
+ this.typename = typename;
3781
+ this.name = name;
3782
+ autoBind10(this);
3783
+ }
3784
+ async getApiTokens(client, first = void 0, after = void 0) {
3785
+ return await client.executeRawQuery({
3786
+ queryPayload: `
3787
+ query FetchAccountToApiTokensConnection($first: Int, $after: String) {
3788
+ current_account {
3789
+ ... on Account {
3790
+ api_tokens(, first: $first, after: $after) {
3791
+ __typename
3792
+ account_to_api_tokens_connection_count: count
3793
+ account_to_api_tokens_connection_page_info: page_info {
3794
+ __typename
3795
+ page_info_has_next_page: has_next_page
3796
+ page_info_has_previous_page: has_previous_page
3797
+ page_info_start_cursor: start_cursor
3798
+ page_info_end_cursor: end_cursor
3799
+ }
3800
+ account_to_api_tokens_connection_entities: entities {
3801
+ __typename
3802
+ api_token_id: id
3803
+ api_token_created_at: created_at
3804
+ api_token_updated_at: updated_at
3805
+ api_token_client_id: client_id
3806
+ api_token_name: name
3807
+ api_token_permissions: permissions
3808
+ }
3809
+ }
3810
+ }
3811
+ }
3812
+ }
3813
+ `,
3814
+ variables: { first, after },
3815
+ constructObject: (json) => {
3816
+ const connection = json["current_account"]["api_tokens"];
3817
+ return AccountToApiTokensConnectionFromJson(connection);
3818
+ }
3819
+ });
3820
+ }
3821
+ async getBlockchainBalance(client, bitcoinNetworks = void 0, nodeIds = void 0) {
3822
+ return await client.executeRawQuery({
3823
+ queryPayload: `
3824
+ query FetchAccountBlockchainBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
3825
+ current_account {
3826
+ ... on Account {
3827
+ blockchain_balance(, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
3828
+ __typename
3829
+ blockchain_balance_total_balance: total_balance {
3830
+ __typename
3831
+ currency_amount_original_value: original_value
3153
3832
  currency_amount_original_unit: original_unit
3154
3833
  currency_amount_preferred_currency_unit: preferred_currency_unit
3155
3834
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
@@ -3250,14 +3929,15 @@ query FetchAccountLocalBalance($bitcoin_networks: [BitcoinNetwork!], $node_ids:
3250
3929
  }
3251
3930
  });
3252
3931
  }
3253
- async getNodes(client, first = void 0, bitcoinNetworks = void 0, nodeIds = void 0) {
3932
+ async getNodes(client, first = void 0, bitcoinNetworks = void 0, nodeIds = void 0, after = void 0) {
3254
3933
  return await client.executeRawQuery({
3255
3934
  queryPayload: `
3256
- query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!]) {
3935
+ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetwork!], $node_ids: [ID!], $after: String) {
3257
3936
  current_account {
3258
3937
  ... on Account {
3259
- nodes(, first: $first, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids) {
3938
+ nodes(, first: $first, bitcoin_networks: $bitcoin_networks, node_ids: $node_ids, after: $after) {
3260
3939
  __typename
3940
+ account_to_nodes_connection_count: count
3261
3941
  account_to_nodes_connection_page_info: page_info {
3262
3942
  __typename
3263
3943
  page_info_has_next_page: has_next_page
@@ -3265,7 +3945,6 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
3265
3945
  page_info_start_cursor: start_cursor
3266
3946
  page_info_end_cursor: end_cursor
3267
3947
  }
3268
- account_to_nodes_connection_count: count
3269
3948
  account_to_nodes_connection_purpose: purpose
3270
3949
  account_to_nodes_connection_entities: entities {
3271
3950
  __typename
@@ -3383,7 +4062,8 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
3383
4062
  variables: {
3384
4063
  first,
3385
4064
  bitcoin_networks: bitcoinNetworks,
3386
- node_ids: nodeIds
4065
+ node_ids: nodeIds,
4066
+ after
3387
4067
  },
3388
4068
  constructObject: (json) => {
3389
4069
  const connection = json["current_account"]["nodes"];
@@ -3568,6 +4248,14 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
3568
4248
  ... on Account {
3569
4249
  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) {
3570
4250
  __typename
4251
+ account_to_transactions_connection_count: count
4252
+ account_to_transactions_connection_page_info: page_info {
4253
+ __typename
4254
+ page_info_has_next_page: has_next_page
4255
+ page_info_has_previous_page: has_previous_page
4256
+ page_info_start_cursor: start_cursor
4257
+ page_info_end_cursor: end_cursor
4258
+ }
3571
4259
  account_to_transactions_connection_profit_loss: profit_loss {
3572
4260
  __typename
3573
4261
  currency_amount_original_value: original_value
@@ -3584,7 +4272,6 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
3584
4272
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3585
4273
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3586
4274
  }
3587
- account_to_transactions_connection_count: count
3588
4275
  account_to_transactions_connection_total_amount_transacted: total_amount_transacted {
3589
4276
  __typename
3590
4277
  currency_amount_original_value: original_value
@@ -3965,13 +4652,6 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
3965
4652
  }
3966
4653
  }
3967
4654
  }
3968
- account_to_transactions_connection_page_info: page_info {
3969
- __typename
3970
- page_info_has_next_page: has_next_page
3971
- page_info_has_previous_page: has_previous_page
3972
- page_info_start_cursor: start_cursor
3973
- page_info_end_cursor: end_cursor
3974
- }
3975
4655
  }
3976
4656
  }
3977
4657
  }
@@ -4003,6 +4683,13 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
4003
4683
  payment_requests(, first: $first, after: $after, after_date: $after_date, before_date: $before_date, bitcoin_network: $bitcoin_network, lightning_node_id: $lightning_node_id) {
4004
4684
  __typename
4005
4685
  account_to_payment_requests_connection_count: count
4686
+ account_to_payment_requests_connection_page_info: page_info {
4687
+ __typename
4688
+ page_info_has_next_page: has_next_page
4689
+ page_info_has_previous_page: has_previous_page
4690
+ page_info_start_cursor: start_cursor
4691
+ page_info_end_cursor: end_cursor
4692
+ }
4006
4693
  account_to_payment_requests_connection_entities: entities {
4007
4694
  __typename
4008
4695
  ... on Invoice {
@@ -4161,13 +4848,6 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
4161
4848
  }
4162
4849
  }
4163
4850
  }
4164
- account_to_payment_requests_connection_page_info: page_info {
4165
- __typename
4166
- page_info_has_next_page: has_next_page
4167
- page_info_has_previous_page: has_previous_page
4168
- page_info_start_cursor: start_cursor
4169
- page_info_end_cursor: end_cursor
4170
- }
4171
4851
  }
4172
4852
  }
4173
4853
  }
@@ -4187,14 +4867,15 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
4187
4867
  }
4188
4868
  });
4189
4869
  }
4190
- async getWallets(client, first = void 0) {
4870
+ async getWallets(client, first = void 0, after = void 0, thirdPartyIds = void 0) {
4191
4871
  return await client.executeRawQuery({
4192
4872
  queryPayload: `
4193
- query FetchAccountToWalletsConnection($first: Int) {
4873
+ query FetchAccountToWalletsConnection($first: Int, $after: String, $third_party_ids: [String!]) {
4194
4874
  current_account {
4195
4875
  ... on Account {
4196
- wallets(, first: $first) {
4876
+ wallets(, first: $first, after: $after, third_party_ids: $third_party_ids) {
4197
4877
  __typename
4878
+ account_to_wallets_connection_count: count
4198
4879
  account_to_wallets_connection_page_info: page_info {
4199
4880
  __typename
4200
4881
  page_info_has_next_page: has_next_page
@@ -4202,7 +4883,6 @@ query FetchAccountToWalletsConnection($first: Int) {
4202
4883
  page_info_start_cursor: start_cursor
4203
4884
  page_info_end_cursor: end_cursor
4204
4885
  }
4205
- account_to_wallets_connection_count: count
4206
4886
  account_to_wallets_connection_entities: entities {
4207
4887
  __typename
4208
4888
  wallet_id: id
@@ -4244,7 +4924,7 @@ query FetchAccountToWalletsConnection($first: Int) {
4244
4924
  }
4245
4925
  }
4246
4926
  `,
4247
- variables: { first },
4927
+ variables: { first, after, third_party_ids: thirdPartyIds },
4248
4928
  constructObject: (json) => {
4249
4929
  const connection = json["current_account"]["wallets"];
4250
4930
  return AccountToWalletsConnectionFromJson(connection);
@@ -4428,6 +5108,9 @@ ${FRAGMENT18}
4428
5108
  };
4429
5109
  };
4430
5110
 
5111
+ // src/objects/Connection.ts
5112
+ import { LightsparkException as LightsparkException5 } from "@lightsparkdev/core";
5113
+
4431
5114
  // src/objects/InvoiceType.ts
4432
5115
  var InvoiceType = /* @__PURE__ */ ((InvoiceType2) => {
4433
5116
  InvoiceType2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -4437,6 +5120,14 @@ var InvoiceType = /* @__PURE__ */ ((InvoiceType2) => {
4437
5120
  })(InvoiceType || {});
4438
5121
  var InvoiceType_default = InvoiceType;
4439
5122
 
5123
+ // src/objects/CryptoSanctionsScreeningProvider.ts
5124
+ var CryptoSanctionsScreeningProvider = /* @__PURE__ */ ((CryptoSanctionsScreeningProvider2) => {
5125
+ CryptoSanctionsScreeningProvider2["FUTURE_VALUE"] = "FUTURE_VALUE";
5126
+ CryptoSanctionsScreeningProvider2["CHAINALYSIS"] = "CHAINALYSIS";
5127
+ return CryptoSanctionsScreeningProvider2;
5128
+ })(CryptoSanctionsScreeningProvider || {});
5129
+ var CryptoSanctionsScreeningProvider_default = CryptoSanctionsScreeningProvider;
5130
+
4440
5131
  // src/objects/Deposit.ts
4441
5132
  var DepositFromJson = (obj) => {
4442
5133
  return {
@@ -4736,7 +5427,7 @@ fragment LightningFeeEstimateOutputFragment on LightningFeeEstimateOutput {
4736
5427
  }`;
4737
5428
 
4738
5429
  // src/objects/LightningTransaction.ts
4739
- import { LightsparkException as LightsparkException5 } from "@lightsparkdev/core";
5430
+ import { LightsparkException as LightsparkException6 } from "@lightsparkdev/core";
4740
5431
  var LightningTransactionFromJson = (obj) => {
4741
5432
  if (obj["__typename"] == "IncomingPayment") {
4742
5433
  return new IncomingPayment_default(
@@ -4790,7 +5481,7 @@ var LightningTransactionFromJson = (obj) => {
4790
5481
  failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
4791
5482
  };
4792
5483
  }
4793
- throw new LightsparkException5(
5484
+ throw new LightsparkException6(
4794
5485
  "DeserializationError",
4795
5486
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
4796
5487
  );
@@ -5059,7 +5750,7 @@ ${FRAGMENT23}
5059
5750
  };
5060
5751
 
5061
5752
  // src/objects/LightsparkNodeOwner.ts
5062
- import { LightsparkException as LightsparkException6 } from "@lightsparkdev/core";
5753
+ import { LightsparkException as LightsparkException7 } from "@lightsparkdev/core";
5063
5754
  var LightsparkNodeOwnerFromJson = (obj) => {
5064
5755
  if (obj["__typename"] == "Account") {
5065
5756
  return new Account_default(
@@ -5082,7 +5773,7 @@ var LightsparkNodeOwnerFromJson = (obj) => {
5082
5773
  !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
5083
5774
  );
5084
5775
  }
5085
- throw new LightsparkException6(
5776
+ throw new LightsparkException7(
5086
5777
  "DeserializationError",
5087
5778
  `Couldn't find a concrete type for interface LightsparkNodeOwner corresponding to the typename=${obj["__typename"]}`
5088
5779
  );
@@ -5153,7 +5844,7 @@ ${FRAGMENT24}
5153
5844
  };
5154
5845
 
5155
5846
  // src/objects/OnChainTransaction.ts
5156
- import { LightsparkException as LightsparkException7 } from "@lightsparkdev/core";
5847
+ import { LightsparkException as LightsparkException8 } from "@lightsparkdev/core";
5157
5848
  var OnChainTransactionFromJson = (obj) => {
5158
5849
  if (obj["__typename"] == "ChannelClosingTransaction") {
5159
5850
  return {
@@ -5227,7 +5918,7 @@ var OnChainTransactionFromJson = (obj) => {
5227
5918
  numConfirmations: obj["withdrawal_num_confirmations"]
5228
5919
  };
5229
5920
  }
5230
- throw new LightsparkException7(
5921
+ throw new LightsparkException8(
5231
5922
  "DeserializationError",
5232
5923
  `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
5233
5924
  );
@@ -5391,6 +6082,16 @@ var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
5391
6082
  })(WithdrawalMode || {});
5392
6083
  var WithdrawalMode_default = WithdrawalMode;
5393
6084
 
6085
+ // src/objects/RiskRating.ts
6086
+ var RiskRating = /* @__PURE__ */ ((RiskRating2) => {
6087
+ RiskRating2["FUTURE_VALUE"] = "FUTURE_VALUE";
6088
+ RiskRating2["HIGH_RISK"] = "HIGH_RISK";
6089
+ RiskRating2["LOW_RISK"] = "LOW_RISK";
6090
+ RiskRating2["UNKNOWN"] = "UNKNOWN";
6091
+ return RiskRating2;
6092
+ })(RiskRating || {});
6093
+ var RiskRating_default = RiskRating;
6094
+
5394
6095
  // src/objects/RoutingTransaction.ts
5395
6096
  var RoutingTransactionFromJson = (obj) => {
5396
6097
  return {
@@ -5523,6 +6224,7 @@ var WebhookEventType = /* @__PURE__ */ ((WebhookEventType2) => {
5523
6224
  WebhookEventType2["WALLET_INCOMING_PAYMENT_FINISHED"] = "WALLET_INCOMING_PAYMENT_FINISHED";
5524
6225
  WebhookEventType2["WALLET_WITHDRAWAL_FINISHED"] = "WALLET_WITHDRAWAL_FINISHED";
5525
6226
  WebhookEventType2["WALLET_FUNDS_RECEIVED"] = "WALLET_FUNDS_RECEIVED";
6227
+ WebhookEventType2["REMOTE_SIGNING"] = "REMOTE_SIGNING";
5526
6228
  return WebhookEventType2;
5527
6229
  })(WebhookEventType || {});
5528
6230
  var WebhookEventType_default = WebhookEventType;
@@ -5894,10 +6596,12 @@ export {
5894
6596
  Wallet_default,
5895
6597
  Account_default,
5896
6598
  InvoiceType_default,
6599
+ CryptoSanctionsScreeningProvider_default,
5897
6600
  getDepositQuery,
5898
6601
  getLightningTransactionQuery,
5899
6602
  getLightsparkNodeOwnerQuery,
5900
6603
  getOnChainTransactionQuery,
6604
+ RiskRating_default,
5901
6605
  getRoutingTransactionQuery,
5902
6606
  TransactionType_default,
5903
6607
  WebhookEventType,