@lightsparkdev/lightspark-sdk 1.5.3 → 1.5.4

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @lightsparkdev/lightspark-sdk
2
2
 
3
+ ## 1.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 66e76d3: - Regenerate GQL objects
8
+ - Updated dependencies [66e76d3]
9
+ - @lightsparkdev/core@1.0.15
10
+
3
11
  ## 1.5.3
4
12
 
5
13
  ### Patch Changes
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-K6SAUSAX.js";
4
4
 
5
5
  // src/objects/Account.ts
6
- import autoBind11 from "auto-bind";
6
+ import autoBind10 from "auto-bind";
7
7
 
8
8
  // src/objects/Permission.ts
9
9
  var Permission = /* @__PURE__ */ ((Permission2) => {
@@ -90,9 +90,6 @@ var AccountToApiTokensConnectionFromJson = (obj) => {
90
90
  };
91
91
  };
92
92
 
93
- // src/objects/AccountToChannelsConnection.ts
94
- import autoBind2 from "auto-bind";
95
-
96
93
  // src/objects/Channel.ts
97
94
  import autoBind from "auto-bind";
98
95
 
@@ -441,30 +438,16 @@ fragment ChannelFragment on Channel {
441
438
  var Channel_default = Channel;
442
439
 
443
440
  // src/objects/AccountToChannelsConnection.ts
444
- var AccountToChannelsConnection = class {
445
- constructor(count, entities) {
446
- this.count = count;
447
- this.entities = entities;
448
- autoBind2(this);
449
- }
450
- toJson() {
451
- return {
452
- account_to_channels_connection_count: this.count,
453
- account_to_channels_connection_entities: this.entities.map(
454
- (e) => e.toJson()
455
- )
456
- };
457
- }
458
- };
459
441
  var AccountToChannelsConnectionFromJson = (obj) => {
460
- return new AccountToChannelsConnection(
461
- obj["account_to_channels_connection_count"],
462
- obj["account_to_channels_connection_entities"].map(
442
+ return {
443
+ count: obj["account_to_channels_connection_count"],
444
+ pageInfo: PageInfoFromJson(obj["account_to_channels_connection_page_info"]),
445
+ entities: obj["account_to_channels_connection_entities"].map(
463
446
  (e) => ChannelFromJson(e)
464
- )
465
- );
447
+ ),
448
+ typename: "AccountToChannelsConnection"
449
+ };
466
450
  };
467
- var AccountToChannelsConnection_default = AccountToChannelsConnection;
468
451
 
469
452
  // src/objects/LightsparkNode.ts
470
453
  import { LightsparkException } from "@lightsparkdev/core";
@@ -533,7 +516,7 @@ var LightsparkNodeStatus = /* @__PURE__ */ ((LightsparkNodeStatus2) => {
533
516
  var LightsparkNodeStatus_default = LightsparkNodeStatus;
534
517
 
535
518
  // src/objects/LightsparkNodeWithOSK.ts
536
- import autoBind3 from "auto-bind";
519
+ import autoBind2 from "auto-bind";
537
520
 
538
521
  // src/objects/LightsparkNodeToChannelsConnection.ts
539
522
  var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
@@ -549,6 +532,34 @@ var LightsparkNodeToChannelsConnectionFromJson = (obj) => {
549
532
  };
550
533
  };
551
534
 
535
+ // src/objects/LightningPaymentDirection.ts
536
+ var LightningPaymentDirection = /* @__PURE__ */ ((LightningPaymentDirection2) => {
537
+ LightningPaymentDirection2["FUTURE_VALUE"] = "FUTURE_VALUE";
538
+ LightningPaymentDirection2["INCOMING"] = "INCOMING";
539
+ LightningPaymentDirection2["OUTGOING"] = "OUTGOING";
540
+ return LightningPaymentDirection2;
541
+ })(LightningPaymentDirection || {});
542
+ var LightningPaymentDirection_default = LightningPaymentDirection;
543
+
544
+ // src/objects/DailyLiquidityForecast.ts
545
+ var DailyLiquidityForecastFromJson = (obj) => {
546
+ return {
547
+ date: obj["daily_liquidity_forecast_date"],
548
+ direction: LightningPaymentDirection_default[obj["daily_liquidity_forecast_direction"]] ?? LightningPaymentDirection_default.FUTURE_VALUE,
549
+ amount: CurrencyAmountFromJson(obj["daily_liquidity_forecast_amount"])
550
+ };
551
+ };
552
+
553
+ // src/objects/LightsparkNodeToDailyLiquidityForecastsConnection.ts
554
+ var LightsparkNodeToDailyLiquidityForecastsConnectionFromJson = (obj) => {
555
+ return {
556
+ fromDate: obj["lightspark_node_to_daily_liquidity_forecasts_connection_from_date"],
557
+ toDate: obj["lightspark_node_to_daily_liquidity_forecasts_connection_to_date"],
558
+ direction: LightningPaymentDirection_default[obj["lightspark_node_to_daily_liquidity_forecasts_connection_direction"]] ?? LightningPaymentDirection_default.FUTURE_VALUE,
559
+ entities: obj["lightspark_node_to_daily_liquidity_forecasts_connection_entities"].map((e) => DailyLiquidityForecastFromJson(e))
560
+ };
561
+ };
562
+
552
563
  // src/objects/NodeAddressType.ts
553
564
  var NodeAddressType = /* @__PURE__ */ ((NodeAddressType2) => {
554
565
  NodeAddressType2["FUTURE_VALUE"] = "FUTURE_VALUE";
@@ -614,7 +625,7 @@ var LightsparkNodeWithOSK = class {
614
625
  this.blockchainBalance = blockchainBalance;
615
626
  this.balances = balances;
616
627
  this.encryptedSigningPrivateKey = encryptedSigningPrivateKey;
617
- autoBind3(this);
628
+ autoBind2(this);
618
629
  }
619
630
  async getAddresses(client, first = void 0, types = void 0) {
620
631
  return await client.executeRawQuery({
@@ -769,6 +780,49 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
769
780
  }
770
781
  });
771
782
  }
783
+ async getDailyLiquidityForecasts(client, fromDate, toDate, direction) {
784
+ return await client.executeRawQuery({
785
+ queryPayload: `
786
+ query FetchLightsparkNodeToDailyLiquidityForecastsConnection($entity_id: ID!, $from_date: Date!, $to_date: Date!, $direction: LightningPaymentDirection!) {
787
+ entity(id: $entity_id) {
788
+ ... on LightsparkNodeWithOSK {
789
+ daily_liquidity_forecasts(, from_date: $from_date, to_date: $to_date, direction: $direction) {
790
+ __typename
791
+ lightspark_node_to_daily_liquidity_forecasts_connection_from_date: from_date
792
+ lightspark_node_to_daily_liquidity_forecasts_connection_to_date: to_date
793
+ lightspark_node_to_daily_liquidity_forecasts_connection_direction: direction
794
+ lightspark_node_to_daily_liquidity_forecasts_connection_entities: entities {
795
+ __typename
796
+ daily_liquidity_forecast_date: date
797
+ daily_liquidity_forecast_direction: direction
798
+ daily_liquidity_forecast_amount: amount {
799
+ __typename
800
+ currency_amount_original_value: original_value
801
+ currency_amount_original_unit: original_unit
802
+ currency_amount_preferred_currency_unit: preferred_currency_unit
803
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
804
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
805
+ }
806
+ }
807
+ }
808
+ }
809
+ }
810
+ }
811
+ `,
812
+ variables: {
813
+ entity_id: this.id,
814
+ from_date: fromDate,
815
+ to_date: toDate,
816
+ direction
817
+ },
818
+ constructObject: (json) => {
819
+ const connection = json["entity"]["daily_liquidity_forecasts"];
820
+ return LightsparkNodeToDailyLiquidityForecastsConnectionFromJson(
821
+ connection
822
+ );
823
+ }
824
+ });
825
+ }
772
826
  static getLightsparkNodeWithOSKQuery(id) {
773
827
  return {
774
828
  queryPayload: `
@@ -977,7 +1031,7 @@ fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK {
977
1031
  var LightsparkNodeWithOSK_default = LightsparkNodeWithOSK;
978
1032
 
979
1033
  // src/objects/LightsparkNodeWithRemoteSigning.ts
980
- import autoBind4 from "auto-bind";
1034
+ import autoBind3 from "auto-bind";
981
1035
  var LightsparkNodeWithRemoteSigning = class {
982
1036
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, ownerId, umaPrescreeningUtxos, typename, alias, color, conductivity, publicKey, status, totalBalance, totalLocalBalance, localBalance, remoteBalance, blockchainBalance, balances) {
983
1037
  this.id = id;
@@ -999,7 +1053,7 @@ var LightsparkNodeWithRemoteSigning = class {
999
1053
  this.remoteBalance = remoteBalance;
1000
1054
  this.blockchainBalance = blockchainBalance;
1001
1055
  this.balances = balances;
1002
- autoBind4(this);
1056
+ autoBind3(this);
1003
1057
  }
1004
1058
  async getAddresses(client, first = void 0, types = void 0) {
1005
1059
  return await client.executeRawQuery({
@@ -1154,6 +1208,49 @@ query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $sta
1154
1208
  }
1155
1209
  });
1156
1210
  }
1211
+ async getDailyLiquidityForecasts(client, fromDate, toDate, direction) {
1212
+ return await client.executeRawQuery({
1213
+ queryPayload: `
1214
+ query FetchLightsparkNodeToDailyLiquidityForecastsConnection($entity_id: ID!, $from_date: Date!, $to_date: Date!, $direction: LightningPaymentDirection!) {
1215
+ entity(id: $entity_id) {
1216
+ ... on LightsparkNodeWithRemoteSigning {
1217
+ daily_liquidity_forecasts(, from_date: $from_date, to_date: $to_date, direction: $direction) {
1218
+ __typename
1219
+ lightspark_node_to_daily_liquidity_forecasts_connection_from_date: from_date
1220
+ lightspark_node_to_daily_liquidity_forecasts_connection_to_date: to_date
1221
+ lightspark_node_to_daily_liquidity_forecasts_connection_direction: direction
1222
+ lightspark_node_to_daily_liquidity_forecasts_connection_entities: entities {
1223
+ __typename
1224
+ daily_liquidity_forecast_date: date
1225
+ daily_liquidity_forecast_direction: direction
1226
+ daily_liquidity_forecast_amount: amount {
1227
+ __typename
1228
+ currency_amount_original_value: original_value
1229
+ currency_amount_original_unit: original_unit
1230
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1231
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1232
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1233
+ }
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ }
1239
+ `,
1240
+ variables: {
1241
+ entity_id: this.id,
1242
+ from_date: fromDate,
1243
+ to_date: toDate,
1244
+ direction
1245
+ },
1246
+ constructObject: (json) => {
1247
+ const connection = json["entity"]["daily_liquidity_forecasts"];
1248
+ return LightsparkNodeToDailyLiquidityForecastsConnectionFromJson(
1249
+ connection
1250
+ );
1251
+ }
1252
+ });
1253
+ }
1157
1254
  static getLightsparkNodeWithRemoteSigningQuery(id) {
1158
1255
  return {
1159
1256
  queryPayload: `
@@ -1734,7 +1831,7 @@ import { LightsparkException as LightsparkException3 } from "@lightsparkdev/core
1734
1831
  import { LightsparkException as LightsparkException2 } from "@lightsparkdev/core";
1735
1832
 
1736
1833
  // src/objects/GraphNode.ts
1737
- import autoBind5 from "auto-bind";
1834
+ import autoBind4 from "auto-bind";
1738
1835
  var GraphNode = class {
1739
1836
  constructor(id, createdAt, updatedAt, bitcoinNetwork, displayName, typename, alias, color, conductivity, publicKey) {
1740
1837
  this.id = id;
@@ -1747,7 +1844,7 @@ var GraphNode = class {
1747
1844
  this.color = color;
1748
1845
  this.conductivity = conductivity;
1749
1846
  this.publicKey = publicKey;
1750
- autoBind5(this);
1847
+ autoBind4(this);
1751
1848
  }
1752
1849
  async getAddresses(client, first = void 0, types = void 0) {
1753
1850
  return await client.executeRawQuery({
@@ -2975,7 +3072,7 @@ var AccountToPaymentRequestsConnectionFromJson = (obj) => {
2975
3072
  import { LightsparkException as LightsparkException5 } from "@lightsparkdev/core";
2976
3073
 
2977
3074
  // src/objects/IncomingPayment.ts
2978
- import autoBind6 from "auto-bind";
3075
+ import autoBind5 from "auto-bind";
2979
3076
 
2980
3077
  // src/objects/IncomingPaymentAttemptStatus.ts
2981
3078
  var IncomingPaymentAttemptStatus = /* @__PURE__ */ ((IncomingPaymentAttemptStatus2) => {
@@ -3094,7 +3191,7 @@ var IncomingPayment = class {
3094
3191
  this.transactionHash = transactionHash;
3095
3192
  this.paymentRequestId = paymentRequestId;
3096
3193
  this.umaPostTransactionData = umaPostTransactionData;
3097
- autoBind6(this);
3194
+ autoBind5(this);
3098
3195
  }
3099
3196
  async getAttempts(client, first = void 0, statuses = void 0, after = void 0) {
3100
3197
  return await client.executeRawQuery({
@@ -3237,10 +3334,10 @@ fragment IncomingPaymentFragment on IncomingPayment {
3237
3334
  var IncomingPayment_default = IncomingPayment;
3238
3335
 
3239
3336
  // src/objects/OutgoingPayment.ts
3240
- import autoBind8 from "auto-bind";
3337
+ import autoBind7 from "auto-bind";
3241
3338
 
3242
3339
  // src/objects/OutgoingPaymentAttempt.ts
3243
- import autoBind7 from "auto-bind";
3340
+ import autoBind6 from "auto-bind";
3244
3341
 
3245
3342
  // src/objects/ChannelSnapshot.ts
3246
3343
  var ChannelSnapshotFromJson = (obj) => {
@@ -3403,7 +3500,7 @@ var OutgoingPaymentAttempt = class {
3403
3500
  this.amount = amount;
3404
3501
  this.fees = fees;
3405
3502
  this.channelSnapshot = channelSnapshot;
3406
- autoBind7(this);
3503
+ autoBind6(this);
3407
3504
  }
3408
3505
  async getHops(client, first = void 0, after = void 0) {
3409
3506
  return await client.executeRawQuery({
@@ -3699,7 +3796,7 @@ var OutgoingPayment = class {
3699
3796
  this.failureMessage = failureMessage;
3700
3797
  this.umaPostTransactionData = umaPostTransactionData;
3701
3798
  this.paymentPreimage = paymentPreimage;
3702
- autoBind8(this);
3799
+ autoBind7(this);
3703
3800
  }
3704
3801
  async getAttempts(client, first = void 0, after = void 0) {
3705
3802
  return await client.executeRawQuery({
@@ -4947,7 +5044,7 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
4947
5044
  };
4948
5045
 
4949
5046
  // src/objects/Wallet.ts
4950
- import autoBind10 from "auto-bind";
5047
+ import autoBind9 from "auto-bind";
4951
5048
 
4952
5049
  // src/objects/WalletStatus.ts
4953
5050
  var WalletStatus = /* @__PURE__ */ ((WalletStatus2) => {
@@ -4994,7 +5091,7 @@ var WalletToTransactionsConnectionFromJson = (obj) => {
4994
5091
  };
4995
5092
 
4996
5093
  // src/objects/WithdrawalRequest.ts
4997
- import autoBind9 from "auto-bind";
5094
+ import autoBind8 from "auto-bind";
4998
5095
 
4999
5096
  // src/objects/WithdrawalMode.ts
5000
5097
  var WithdrawalMode = /* @__PURE__ */ ((WithdrawalMode2) => {
@@ -5194,7 +5291,7 @@ var WithdrawalRequest = class {
5194
5291
  this.amountWithdrawn = amountWithdrawn;
5195
5292
  this.completedAt = completedAt;
5196
5293
  this.withdrawalId = withdrawalId;
5197
- autoBind9(this);
5294
+ autoBind8(this);
5198
5295
  }
5199
5296
  async getChannelClosingTransactions(client, first = void 0) {
5200
5297
  return await client.executeRawQuery({
@@ -5448,7 +5545,7 @@ var Wallet = class {
5448
5545
  this.lastLoginAt = lastLoginAt;
5449
5546
  this.balances = balances;
5450
5547
  this.accountId = accountId;
5451
- autoBind10(this);
5548
+ autoBind9(this);
5452
5549
  }
5453
5550
  async getTransactions(client, first = void 0, after = void 0, createdAfterDate = void 0, createdBeforeDate = void 0, statuses = void 0, types = void 0) {
5454
5551
  return await client.executeRawQuery({
@@ -6632,7 +6729,7 @@ var Account = class {
6632
6729
  this.updatedAt = updatedAt;
6633
6730
  this.typename = typename;
6634
6731
  this.name = name;
6635
- autoBind11(this);
6732
+ autoBind10(this);
6636
6733
  }
6637
6734
  async getApiTokens(client, first = void 0, after = void 0) {
6638
6735
  return await client.executeRawQuery({
@@ -7125,15 +7222,22 @@ query FetchAccountUptimePercentage($after_date: DateTime, $before_date: DateTime
7125
7222
  }
7126
7223
  });
7127
7224
  }
7128
- async getChannels(client, bitcoinNetwork, lightningNodeId = void 0, afterDate = void 0, beforeDate = void 0, first = void 0) {
7225
+ async getChannels(client, bitcoinNetwork, lightningNodeId = void 0, afterDate = void 0, beforeDate = void 0, first = void 0, after = void 0) {
7129
7226
  return await client.executeRawQuery({
7130
7227
  queryPayload: `
7131
- query FetchAccountToChannelsConnection($bitcoin_network: BitcoinNetwork!, $lightning_node_id: ID, $after_date: DateTime, $before_date: DateTime, $first: Int) {
7228
+ query FetchAccountToChannelsConnection($bitcoin_network: BitcoinNetwork!, $lightning_node_id: ID, $after_date: DateTime, $before_date: DateTime, $first: Int, $after: String) {
7132
7229
  current_account {
7133
7230
  ... on Account {
7134
- channels(, bitcoin_network: $bitcoin_network, lightning_node_id: $lightning_node_id, after_date: $after_date, before_date: $before_date, first: $first) {
7231
+ channels(, bitcoin_network: $bitcoin_network, lightning_node_id: $lightning_node_id, after_date: $after_date, before_date: $before_date, first: $first, after: $after) {
7135
7232
  __typename
7136
7233
  account_to_channels_connection_count: count
7234
+ account_to_channels_connection_page_info: page_info {
7235
+ __typename
7236
+ page_info_has_next_page: has_next_page
7237
+ page_info_has_previous_page: has_previous_page
7238
+ page_info_start_cursor: start_cursor
7239
+ page_info_end_cursor: end_cursor
7240
+ }
7137
7241
  account_to_channels_connection_entities: entities {
7138
7242
  __typename
7139
7243
  channel_id: id
@@ -7238,7 +7342,8 @@ query FetchAccountToChannelsConnection($bitcoin_network: BitcoinNetwork!, $light
7238
7342
  lightning_node_id: lightningNodeId,
7239
7343
  after_date: afterDate,
7240
7344
  before_date: beforeDate,
7241
- first
7345
+ first,
7346
+ after
7242
7347
  },
7243
7348
  constructObject: (json) => {
7244
7349
  const connection = json["current_account"]["channels"];
@@ -10386,6 +10491,7 @@ export {
10386
10491
  LightsparkNodeStatus_default,
10387
10492
  ChannelStatus_default,
10388
10493
  Channel_default,
10494
+ LightningPaymentDirection_default,
10389
10495
  LightsparkNodeWithOSK_default,
10390
10496
  LightsparkNodeWithRemoteSigning_default,
10391
10497
  getNodeQuery,
@@ -10437,7 +10543,6 @@ export {
10437
10543
  FRAGMENT32 as FRAGMENT13,
10438
10544
  WithdrawalFeeEstimateOutputFromJson,
10439
10545
  FRAGMENT35 as FRAGMENT14,
10440
- AccountToChannelsConnection_default,
10441
10546
  getLightsparkNodeQuery,
10442
10547
  WalletStatus_default,
10443
10548
  Wallet_default,
@@ -236,6 +236,12 @@ interface AccountToApiTokensConnection {
236
236
  typename: string;
237
237
  }
238
238
 
239
+ /** This represents the fee policies set for a channel on the Lightning Network. **/
240
+ interface ChannelFees {
241
+ baseFee?: CurrencyAmount | undefined;
242
+ feeRatePerMil?: number | undefined;
243
+ }
244
+
239
245
  /** This is an enum representing the status of a channel on the Lightning Network. **/
240
246
  declare enum ChannelStatus {
241
247
  /**
@@ -274,12 +280,6 @@ declare enum ChannelStatus {
274
280
  ERROR = "ERROR"
275
281
  }
276
282
 
277
- /** This represents the fee policies set for a channel on the Lightning Network. **/
278
- interface ChannelFees {
279
- baseFee?: CurrencyAmount | undefined;
280
- feeRatePerMil?: number | undefined;
281
- }
282
-
283
283
  interface ChannelToTransactionsConnection {
284
284
  /**
285
285
  * The total count of objects in this connection, using the current filters. It is different
@@ -517,52 +517,18 @@ declare class Channel implements Entity {
517
517
  };
518
518
  }
519
519
 
520
- declare class AccountToChannelsConnection {
521
- /**
522
- * The total count of objects in this connection, using the current filters. It is different
523
- * from the number of objects returned in the current page (in the `entities` field).
524
- **/
525
- readonly count: number;
526
- /** The channels for the current page of this connection. **/
527
- readonly entities: Channel[];
528
- constructor(
520
+ interface AccountToChannelsConnection {
529
521
  /**
530
522
  * The total count of objects in this connection, using the current filters. It is different
531
523
  * from the number of objects returned in the current page (in the `entities` field).
532
524
  **/
533
- count: number,
525
+ count: number;
526
+ /** An object that holds pagination information about the objects in this connection. **/
527
+ pageInfo: PageInfo;
534
528
  /** The channels for the current page of this connection. **/
535
- entities: Channel[]);
536
- toJson(): {
537
- account_to_channels_connection_count: number;
538
- account_to_channels_connection_entities: {
539
- __typename: string;
540
- channel_id: string;
541
- channel_created_at: string;
542
- channel_updated_at: string;
543
- channel_funding_transaction: {
544
- id: string | undefined;
545
- };
546
- channel_capacity: any;
547
- channel_local_balance: any;
548
- channel_local_unsettled_balance: any;
549
- channel_remote_balance: any;
550
- channel_remote_unsettled_balance: any;
551
- channel_unsettled_balance: any;
552
- channel_total_balance: any;
553
- channel_status: ChannelStatus | undefined;
554
- channel_estimated_force_closure_wait_minutes: number | undefined;
555
- channel_commit_fee: any;
556
- channel_fees: any;
557
- channel_remote_node: {
558
- id: string | undefined;
559
- };
560
- channel_local_node: {
561
- id: string;
562
- };
563
- channel_short_channel_id: string | undefined;
564
- }[];
565
- };
529
+ entities: Channel[];
530
+ /** The typename of the object **/
531
+ typename: string;
566
532
  }
567
533
 
568
534
  /**
@@ -610,6 +576,19 @@ interface BlockchainBalance {
610
576
  availableBalance?: CurrencyAmount | undefined;
611
577
  }
612
578
 
579
+ /** This is an enum identifying the payment direction. **/
580
+ declare enum LightningPaymentDirection {
581
+ /**
582
+ * This is an enum value that represents values that could be added in the future.
583
+ * Clients should support unknown values as more of them could be added without notice.
584
+ */
585
+ FUTURE_VALUE = "FUTURE_VALUE",
586
+ /** A payment that is received by the node. **/
587
+ INCOMING = "INCOMING",
588
+ /** A payment that is sent by the node. **/
589
+ OUTGOING = "OUTGOING"
590
+ }
591
+
613
592
  interface LightsparkNodeToChannelsConnection {
614
593
  /**
615
594
  * The total count of objects in this connection, using the current filters. It is different
@@ -624,6 +603,26 @@ interface LightsparkNodeToChannelsConnection {
624
603
  typename: string;
625
604
  }
626
605
 
606
+ interface DailyLiquidityForecast {
607
+ /** The date for which this forecast was generated. **/
608
+ date: string;
609
+ /** The direction for which this forecast was generated. **/
610
+ direction: LightningPaymentDirection;
611
+ /**
612
+ * The value of the forecast. It represents the amount of msats that we think will be moved for
613
+ * that specified direction, for that node, on that date.
614
+ **/
615
+ amount: CurrencyAmount;
616
+ }
617
+
618
+ interface LightsparkNodeToDailyLiquidityForecastsConnection {
619
+ fromDate: string;
620
+ toDate: string;
621
+ direction: LightningPaymentDirection;
622
+ /** The daily liquidity forecasts for the current page of this connection. **/
623
+ entities: DailyLiquidityForecast[];
624
+ }
625
+
627
626
  /** This object represents the address of a node on the Lightning Network. **/
628
627
  interface NodeAddress {
629
628
  /** The string representation of the address. **/
@@ -736,6 +735,7 @@ interface LightsparkNode {
736
735
  balances?: Balances | undefined;
737
736
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
738
737
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
738
+ getDailyLiquidityForecasts(client: LightsparkClient, fromDate: string, toDate: string, direction: LightningPaymentDirection): Promise<LightsparkNodeToDailyLiquidityForecastsConnection>;
739
739
  }
740
740
  declare const getLightsparkNodeQuery: (id: string) => Query<LightsparkNode>;
741
741
 
@@ -1433,7 +1433,7 @@ declare class Account implements LightsparkNodeOwner, Entity {
1433
1433
  getNodes(client: LightsparkClient, first?: number | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined, after?: string | undefined): Promise<AccountToNodesConnection>;
1434
1434
  getRemoteBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<CurrencyAmount | null>;
1435
1435
  getUptimePercentage(client: LightsparkClient, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<number>;
1436
- getChannels(client: LightsparkClient, bitcoinNetwork: BitcoinNetwork, lightningNodeId?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, first?: number | undefined): Promise<AccountToChannelsConnection>;
1436
+ getChannels(client: LightsparkClient, bitcoinNetwork: BitcoinNetwork, lightningNodeId?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, first?: number | undefined, after?: string | undefined): Promise<AccountToChannelsConnection>;
1437
1437
  getTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined, types?: TransactionType[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined, statuses?: TransactionStatus[] | undefined, excludeFailures?: TransactionFailures | undefined): Promise<AccountToTransactionsConnection>;
1438
1438
  getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined): Promise<AccountToPaymentRequestsConnection>;
1439
1439
  getWithdrawalRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, statuses?: WithdrawalRequestStatus[] | undefined, nodeIds?: string[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<AccountToWithdrawalRequestsConnection>;
@@ -3804,6 +3804,7 @@ declare class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
3804
3804
  encryptedSigningPrivateKey?: Secret | undefined);
3805
3805
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
3806
3806
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
3807
+ getDailyLiquidityForecasts(client: LightsparkClient, fromDate: string, toDate: string, direction: LightningPaymentDirection): Promise<LightsparkNodeToDailyLiquidityForecastsConnection>;
3807
3808
  static getLightsparkNodeWithOSKQuery(id: string): Query<LightsparkNodeWithOSK>;
3808
3809
  toJson(): {
3809
3810
  __typename: string;
@@ -4002,6 +4003,7 @@ declare class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, E
4002
4003
  balances?: Balances | undefined);
4003
4004
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
4004
4005
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
4006
+ getDailyLiquidityForecasts(client: LightsparkClient, fromDate: string, toDate: string, direction: LightningPaymentDirection): Promise<LightsparkNodeToDailyLiquidityForecastsConnection>;
4005
4007
  static getLightsparkNodeWithRemoteSigningQuery(id: string): Query<LightsparkNodeWithRemoteSigning>;
4006
4008
  toJson(): {
4007
4009
  __typename: string;
@@ -4461,4 +4463,4 @@ interface WithdrawalFeeEstimateOutput {
4461
4463
  feeEstimate: CurrencyAmount;
4462
4464
  }
4463
4465
 
4464
- export { Deposit as $, Account as A, Balances as B, CancelInvoiceInput as C, CreateApiTokenInput as D, CreateApiTokenOutput as E, CreateInvitationWithIncentivesInput as F, CreateInvitationWithIncentivesOutput as G, CreateInvoiceInput as H, CreateInvoiceOutput as I, CreateLnurlInvoiceInput as J, CreateNodeWalletAddressInput as K, LightsparkClient as L, CreateNodeWalletAddressOutput as M, CreateTestModeInvoiceInput as N, CreateTestModeInvoiceOutput as O, CreateTestModePaymentInput as P, CreateTestModePaymentoutput as Q, CreateUmaInvitationInput as R, CreateUmaInvitationOutput as S, CreateUmaInvoiceInput as T, CurrencyAmount as U, CurrencyUnit as V, WebhookEventType as W, DeclineToSignMessagesInput as X, DeclineToSignMessagesOutput as Y, DeleteApiTokenInput as Z, DeleteApiTokenOutput as _, AccountToApiTokensConnection as a, ReleaseChannelPerCommitmentSecretInput as a$, getDepositQuery as a0, Entity as a1, FeeEstimate as a2, FundNodeInput as a3, FundNodeOutput as a4, GraphNode as a5, Hop as a6, getHopQuery as a7, HtlcAttemptFailureCode as a8, IdAndSignature as a9, NodeAddress as aA, NodeAddressType as aB, NodeToAddressesConnection as aC, OnChainTransaction as aD, getOnChainTransactionQuery as aE, OutgoingPayment as aF, OutgoingPaymentAttempt as aG, OutgoingPaymentAttemptStatus as aH, OutgoingPaymentAttemptToHopsConnection as aI, OutgoingPaymentToAttemptsConnection as aJ, OutgoingPaymentsForInvoiceQueryInput as aK, OutgoingPaymentsForInvoiceQueryOutput as aL, PageInfo as aM, PayInvoiceInput as aN, PayInvoiceOutput as aO, PayUmaInvoiceInput as aP, PaymentDirection as aQ, PaymentFailureReason as aR, PaymentRequest as aS, getPaymentRequestQuery as aT, PaymentRequestData as aU, PaymentRequestStatus as aV, Permission as aW, PostTransactionData as aX, RegionCode as aY, RegisterPaymentInput as aZ, RegisterPaymentOutput as a_, IncentivesIneligibilityReason as aa, IncentivesStatus as ab, IncomingPayment as ac, IncomingPaymentAttempt as ad, getIncomingPaymentAttemptQuery as ae, IncomingPaymentAttemptStatus as af, IncomingPaymentToAttemptsConnection as ag, Invoice as ah, getInvoiceQuery as ai, InvoiceData as aj, InvoiceType as ak, LightningFeeEstimateForInvoiceInput as al, LightningFeeEstimateForNodeInput as am, LightningFeeEstimateOutput as an, LightningTransaction as ao, getLightningTransactionQuery as ap, LightsparkNode as aq, getLightsparkNodeQuery as ar, LightsparkNodeOwner as as, getLightsparkNodeOwnerQuery as at, LightsparkNodeStatus as au, LightsparkNodeToChannelsConnection as av, LightsparkNodeWithOSK as aw, LightsparkNodeWithRemoteSigning as ax, Node as ay, getNodeQuery as az, AccountToChannelsConnection as b, ReleaseChannelPerCommitmentSecretOutput as b0, ReleasePaymentPreimageInput as b1, ReleasePaymentPreimageOutput as b2, RemoteSigningSubEventType as b3, RequestWithdrawalInput as b4, RequestWithdrawalOutput as b5, RichText as b6, RiskRating as b7, RoutingTransaction as b8, getRoutingTransactionQuery as b9, UpdateChannelPerCommitmentPointInput as bA, UpdateChannelPerCommitmentPointOutput as bB, UpdateNodeSharedSecretInput as bC, UpdateNodeSharedSecretOutput as bD, Wallet as bE, WalletStatus as bF, WalletToPaymentRequestsConnection as bG, WalletToTransactionsConnection as bH, WalletToWithdrawalRequestsConnection as bI, Withdrawal as bJ, getWithdrawalQuery as bK, WithdrawalFeeEstimateInput as bL, WithdrawalFeeEstimateOutput as bM, WithdrawalMode as bN, WithdrawalRequest as bO, WithdrawalRequestStatus as bP, WithdrawalRequestToChannelClosingTransactionsConnection as bQ, WithdrawalRequestToChannelOpeningTransactionsConnection as bR, RoutingTransactionFailureReason as ba, ScreenNodeInput as bb, ScreenNodeOutput as bc, Secret as bd, SendPaymentInput as be, SendPaymentOutput as bf, SetInvoicePaymentHashInput as bg, SetInvoicePaymentHashOutput as bh, SignInvoiceInput as bi, SignInvoiceOutput as bj, SignMessagesInput as bk, SignMessagesOutput as bl, Signable as bm, getSignableQuery as bn, SignablePayload as bo, getSignablePayloadQuery as bp, SignablePayloadStatus as bq, SingleNodeDashboard as br, Transaction as bs, getTransactionQuery as bt, TransactionFailures as bu, TransactionStatus as bv, TransactionType as bw, TransactionUpdate as bx, UmaInvitation as by, getUmaInvitationQuery as bz, AccountToNodesConnection as c, AccountToPaymentRequestsConnection as d, AccountToTransactionsConnection as e, AccountToWalletsConnection as f, AccountToWithdrawalRequestsConnection as g, ApiToken as h, getApiTokenQuery as i, BlockchainBalance as j, CancelInvoiceOutput as k, Channel as l, ChannelClosingTransaction as m, getChannelClosingTransactionQuery as n, ChannelFees as o, ChannelOpeningTransaction as p, getChannelOpeningTransactionQuery as q, ChannelSnapshot as r, ChannelStatus as s, ChannelToTransactionsConnection as t, ClaimUmaInvitationInput as u, ClaimUmaInvitationOutput as v, ClaimUmaInvitationWithIncentivesInput as w, ClaimUmaInvitationWithIncentivesOutput as x, ComplianceProvider as y, Connection as z };
4466
+ export { DeleteApiTokenOutput as $, Account as A, Balances as B, CancelInvoiceInput as C, CreateApiTokenInput as D, CreateApiTokenOutput as E, CreateInvitationWithIncentivesInput as F, CreateInvitationWithIncentivesOutput as G, CreateInvoiceInput as H, CreateInvoiceOutput as I, CreateLnurlInvoiceInput as J, CreateNodeWalletAddressInput as K, LightsparkClient as L, CreateNodeWalletAddressOutput as M, CreateTestModeInvoiceInput as N, CreateTestModeInvoiceOutput as O, CreateTestModePaymentInput as P, CreateTestModePaymentoutput as Q, CreateUmaInvitationInput as R, CreateUmaInvitationOutput as S, CreateUmaInvoiceInput as T, CurrencyAmount as U, CurrencyUnit as V, WebhookEventType as W, DailyLiquidityForecast as X, DeclineToSignMessagesInput as Y, DeclineToSignMessagesOutput as Z, DeleteApiTokenInput as _, AccountToApiTokensConnection as a, RegionCode as a$, Deposit as a0, getDepositQuery as a1, Entity as a2, FeeEstimate as a3, FundNodeInput as a4, FundNodeOutput as a5, GraphNode as a6, Hop as a7, getHopQuery as a8, HtlcAttemptFailureCode as a9, LightsparkNodeWithRemoteSigning as aA, Node as aB, getNodeQuery as aC, NodeAddress as aD, NodeAddressType as aE, NodeToAddressesConnection as aF, OnChainTransaction as aG, getOnChainTransactionQuery as aH, OutgoingPayment as aI, OutgoingPaymentAttempt as aJ, OutgoingPaymentAttemptStatus as aK, OutgoingPaymentAttemptToHopsConnection as aL, OutgoingPaymentToAttemptsConnection as aM, OutgoingPaymentsForInvoiceQueryInput as aN, OutgoingPaymentsForInvoiceQueryOutput as aO, PageInfo as aP, PayInvoiceInput as aQ, PayInvoiceOutput as aR, PayUmaInvoiceInput as aS, PaymentDirection as aT, PaymentFailureReason as aU, PaymentRequest as aV, getPaymentRequestQuery as aW, PaymentRequestData as aX, PaymentRequestStatus as aY, Permission as aZ, PostTransactionData as a_, IdAndSignature as aa, IncentivesIneligibilityReason as ab, IncentivesStatus as ac, IncomingPayment as ad, IncomingPaymentAttempt as ae, getIncomingPaymentAttemptQuery as af, IncomingPaymentAttemptStatus as ag, IncomingPaymentToAttemptsConnection as ah, Invoice as ai, getInvoiceQuery as aj, InvoiceData as ak, InvoiceType as al, LightningFeeEstimateForInvoiceInput as am, LightningFeeEstimateForNodeInput as an, LightningFeeEstimateOutput as ao, LightningPaymentDirection as ap, LightningTransaction as aq, getLightningTransactionQuery as ar, LightsparkNode as as, getLightsparkNodeQuery as at, LightsparkNodeOwner as au, getLightsparkNodeOwnerQuery as av, LightsparkNodeStatus as aw, LightsparkNodeToChannelsConnection as ax, LightsparkNodeToDailyLiquidityForecastsConnection as ay, LightsparkNodeWithOSK as az, AccountToChannelsConnection as b, RegisterPaymentInput as b0, RegisterPaymentOutput as b1, ReleaseChannelPerCommitmentSecretInput as b2, ReleaseChannelPerCommitmentSecretOutput as b3, ReleasePaymentPreimageInput as b4, ReleasePaymentPreimageOutput as b5, RemoteSigningSubEventType as b6, RequestWithdrawalInput as b7, RequestWithdrawalOutput as b8, RichText as b9, TransactionUpdate as bA, UmaInvitation as bB, getUmaInvitationQuery as bC, UpdateChannelPerCommitmentPointInput as bD, UpdateChannelPerCommitmentPointOutput as bE, UpdateNodeSharedSecretInput as bF, UpdateNodeSharedSecretOutput as bG, Wallet as bH, WalletStatus as bI, WalletToPaymentRequestsConnection as bJ, WalletToTransactionsConnection as bK, WalletToWithdrawalRequestsConnection as bL, Withdrawal as bM, getWithdrawalQuery as bN, WithdrawalFeeEstimateInput as bO, WithdrawalFeeEstimateOutput as bP, WithdrawalMode as bQ, WithdrawalRequest as bR, WithdrawalRequestStatus as bS, WithdrawalRequestToChannelClosingTransactionsConnection as bT, WithdrawalRequestToChannelOpeningTransactionsConnection as bU, RiskRating as ba, RoutingTransaction as bb, getRoutingTransactionQuery as bc, RoutingTransactionFailureReason as bd, ScreenNodeInput as be, ScreenNodeOutput as bf, Secret as bg, SendPaymentInput as bh, SendPaymentOutput as bi, SetInvoicePaymentHashInput as bj, SetInvoicePaymentHashOutput as bk, SignInvoiceInput as bl, SignInvoiceOutput as bm, SignMessagesInput as bn, SignMessagesOutput as bo, Signable as bp, getSignableQuery as bq, SignablePayload as br, getSignablePayloadQuery as bs, SignablePayloadStatus as bt, SingleNodeDashboard as bu, Transaction as bv, getTransactionQuery as bw, TransactionFailures as bx, TransactionStatus as by, TransactionType as bz, AccountToNodesConnection as c, AccountToPaymentRequestsConnection as d, AccountToTransactionsConnection as e, AccountToWalletsConnection as f, AccountToWithdrawalRequestsConnection as g, ApiToken as h, getApiTokenQuery as i, BlockchainBalance as j, CancelInvoiceOutput as k, Channel as l, ChannelClosingTransaction as m, getChannelClosingTransactionQuery as n, ChannelFees as o, ChannelOpeningTransaction as p, getChannelOpeningTransactionQuery as q, ChannelSnapshot as r, ChannelStatus as s, ChannelToTransactionsConnection as t, ClaimUmaInvitationInput as u, ClaimUmaInvitationOutput as v, ClaimUmaInvitationWithIncentivesInput as w, ClaimUmaInvitationWithIncentivesOutput as x, ComplianceProvider as y, Connection as z };