@lightsparkdev/lightspark-sdk 1.3.1 → 1.4.0

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 (88) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{BitcoinNetwork-972b1d01.d.ts → BitcoinNetwork-4f6ea015.d.ts} +2 -2
  3. package/dist/{chunk-Y55D3PD4.js → chunk-LCDROGA5.js} +938 -725
  4. package/dist/env.d.cts +1 -1
  5. package/dist/env.d.ts +1 -1
  6. package/dist/{index-a5028d74.d.ts → index-6f544cad.d.ts} +711 -714
  7. package/dist/index.cjs +309 -2
  8. package/dist/index.d.cts +3 -3
  9. package/dist/index.d.ts +3 -3
  10. package/dist/index.js +96 -2
  11. package/dist/objects/index.cjs +1339 -1126
  12. package/dist/objects/index.d.cts +2 -2
  13. package/dist/objects/index.d.ts +2 -2
  14. package/dist/objects/index.js +1 -1
  15. package/package.json +1 -1
  16. package/src/client.ts +77 -1
  17. package/src/graphql/RegisterPayment.ts +21 -0
  18. package/src/graphql/ScreenNode.ts +15 -0
  19. package/src/objects/Account.ts +98 -5
  20. package/src/objects/AccountToApiTokensConnection.ts +2 -3
  21. package/src/objects/AccountToChannelsConnection.ts +2 -3
  22. package/src/objects/AccountToNodesConnection.ts +2 -3
  23. package/src/objects/AccountToPaymentRequestsConnection.ts +2 -3
  24. package/src/objects/AccountToTransactionsConnection.ts +6 -7
  25. package/src/objects/AccountToWalletsConnection.ts +2 -3
  26. package/src/objects/AccountToWithdrawalRequestsConnection.ts +71 -0
  27. package/src/objects/ApiToken.ts +5 -6
  28. package/src/objects/Balances.ts +9 -12
  29. package/src/objects/BitcoinNetwork.ts +2 -2
  30. package/src/objects/Channel.ts +7 -10
  31. package/src/objects/ChannelClosingTransaction.ts +3 -4
  32. package/src/objects/ChannelOpeningTransaction.ts +3 -4
  33. package/src/objects/ChannelStatus.ts +5 -9
  34. package/src/objects/ChannelToTransactionsConnection.ts +6 -7
  35. package/src/objects/Connection.ts +85 -3
  36. package/src/objects/CreateApiTokenOutput.ts +3 -3
  37. package/src/objects/CreateLnurlInvoiceInput.ts +2 -3
  38. package/src/objects/CreateTestModePaymentInput.ts +2 -2
  39. package/src/objects/CreateTestModePaymentoutput.ts +2 -3
  40. package/src/objects/CurrencyUnit.ts +11 -17
  41. package/src/objects/Deposit.ts +5 -6
  42. package/src/objects/Entity.ts +21 -6
  43. package/src/objects/FeeEstimate.ts +2 -3
  44. package/src/objects/GraphNode.ts +10 -12
  45. package/src/objects/Hop.ts +5 -6
  46. package/src/objects/IncentivesStatus.ts +2 -3
  47. package/src/objects/IncomingPayment.ts +7 -7
  48. package/src/objects/IncomingPaymentAttempt.ts +2 -2
  49. package/src/objects/IncomingPaymentToAttemptsConnection.ts +2 -3
  50. package/src/objects/Invoice.ts +2 -2
  51. package/src/objects/InvoiceData.ts +4 -5
  52. package/src/objects/LightningTransaction.ts +5 -5
  53. package/src/objects/LightsparkNode.ts +8 -10
  54. package/src/objects/LightsparkNodeOwner.ts +2 -2
  55. package/src/objects/LightsparkNodeToChannelsConnection.ts +2 -3
  56. package/src/objects/LightsparkNodeWithOSK.ts +7 -8
  57. package/src/objects/LightsparkNodeWithRemoteSigning.ts +7 -8
  58. package/src/objects/Node.ts +9 -11
  59. package/src/objects/NodeToAddressesConnection.ts +2 -3
  60. package/src/objects/OnChainTransaction.ts +5 -6
  61. package/src/objects/OutgoingPayment.ts +5 -6
  62. package/src/objects/OutgoingPaymentAttempt.ts +12 -14
  63. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +2 -3
  64. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +2 -3
  65. package/src/objects/PageInfo.ts +3 -3
  66. package/src/objects/PaymentRequest.ts +2 -2
  67. package/src/objects/PaymentRequestData.ts +1 -2
  68. package/src/objects/RegisterPaymentInput.ts +7 -8
  69. package/src/objects/RequestWithdrawalInput.ts +2 -2
  70. package/src/objects/RiskRating.ts +1 -2
  71. package/src/objects/RoutingTransaction.ts +6 -8
  72. package/src/objects/ScreenNodeInput.ts +2 -3
  73. package/src/objects/SetInvoicePaymentHashInput.ts +2 -3
  74. package/src/objects/Signable.ts +2 -2
  75. package/src/objects/SignablePayload.ts +2 -2
  76. package/src/objects/Transaction.ts +3 -4
  77. package/src/objects/TransactionStatus.ts +1 -2
  78. package/src/objects/UmaInvitation.ts +2 -2
  79. package/src/objects/Wallet.ts +97 -8
  80. package/src/objects/WalletStatus.ts +5 -7
  81. package/src/objects/WalletToPaymentRequestsConnection.ts +2 -3
  82. package/src/objects/WalletToTransactionsConnection.ts +2 -3
  83. package/src/objects/WalletToWithdrawalRequestsConnection.ts +70 -0
  84. package/src/objects/Withdrawal.ts +5 -5
  85. package/src/objects/WithdrawalRequest.ts +43 -7
  86. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +2 -3
  87. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +2 -3
  88. package/src/objects/index.ts +2 -0
@@ -16,18 +16,20 @@ import type WalletToPaymentRequestsConnection from "./WalletToPaymentRequestsCon
16
16
  import { WalletToPaymentRequestsConnectionFromJson } from "./WalletToPaymentRequestsConnection.js";
17
17
  import type WalletToTransactionsConnection from "./WalletToTransactionsConnection.js";
18
18
  import { WalletToTransactionsConnectionFromJson } from "./WalletToTransactionsConnection.js";
19
+ import type WalletToWithdrawalRequestsConnection from "./WalletToWithdrawalRequestsConnection.js";
20
+ import { WalletToWithdrawalRequestsConnectionFromJson } from "./WalletToWithdrawalRequestsConnection.js";
21
+ import type WithdrawalRequestStatus from "./WithdrawalRequestStatus.js";
19
22
 
20
23
  /**
21
- * This object represents a Lightspark Wallet, tied to your Lightspark account.
22
- * Wallets can be used to send or receive funds over the Lightning Network.
23
- * You can retrieve this object to receive information about a specific wallet tied to your
24
- * Lightspark account. *
24
+ * This object represents a Lightspark Wallet, tied to your Lightspark account. Wallets can be used
25
+ * to send or receive funds over the Lightning Network. You can retrieve this object to receive
26
+ * information about a specific wallet tied to your Lightspark account. *
25
27
  */
26
28
  class Wallet implements LightsparkNodeOwner, Entity {
27
29
  constructor(
28
30
  /**
29
- * The unique identifier of this entity across all Lightspark systems.
30
- * Should be treated as an opaque string.
31
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an
32
+ * opaque string.
31
33
  **/
32
34
  public readonly id: string,
33
35
  /** The date and time when the entity was first created. **/
@@ -35,8 +37,7 @@ class Wallet implements LightsparkNodeOwner, Entity {
35
37
  /** The date and time when the entity was last updated. **/
36
38
  public readonly updatedAt: string,
37
39
  /**
38
- * The unique identifier of this wallet, as provided by the Lightspark Customer during login.
39
- * *
40
+ * The unique identifier of this wallet, as provided by the Lightspark Customer during login. *
40
41
  */
41
42
  public readonly thirdPartyIdentifier: string,
42
43
  /** The status of this wallet. **/
@@ -1027,6 +1028,94 @@ query FetchWalletTotalAmountReceived($entity_id: ID!, $created_after_date: DateT
1027
1028
  }))!;
1028
1029
  }
1029
1030
 
1031
+ public async getWithdrawalRequests(
1032
+ client: LightsparkClient,
1033
+ first: number | undefined = undefined,
1034
+ after: string | undefined = undefined,
1035
+ statuses: WithdrawalRequestStatus[] | undefined = undefined,
1036
+ createdAfterDate: string | undefined = undefined,
1037
+ createdBeforeDate: string | undefined = undefined,
1038
+ ): Promise<WalletToWithdrawalRequestsConnection> {
1039
+ return (await client.executeRawQuery({
1040
+ queryPayload: `
1041
+ query FetchWalletToWithdrawalRequestsConnection($entity_id: ID!, $first: Int, $after: ID, $statuses: [WithdrawalRequestStatus!], $created_after_date: DateTime, $created_before_date: DateTime) {
1042
+ entity(id: $entity_id) {
1043
+ ... on Wallet {
1044
+ withdrawal_requests(, first: $first, after: $after, statuses: $statuses, created_after_date: $created_after_date, created_before_date: $created_before_date) {
1045
+ __typename
1046
+ wallet_to_withdrawal_requests_connection_count: count
1047
+ wallet_to_withdrawal_requests_connection_page_info: page_info {
1048
+ __typename
1049
+ page_info_has_next_page: has_next_page
1050
+ page_info_has_previous_page: has_previous_page
1051
+ page_info_start_cursor: start_cursor
1052
+ page_info_end_cursor: end_cursor
1053
+ }
1054
+ wallet_to_withdrawal_requests_connection_entities: entities {
1055
+ __typename
1056
+ withdrawal_request_id: id
1057
+ withdrawal_request_created_at: created_at
1058
+ withdrawal_request_updated_at: updated_at
1059
+ withdrawal_request_requested_amount: requested_amount {
1060
+ __typename
1061
+ currency_amount_original_value: original_value
1062
+ currency_amount_original_unit: original_unit
1063
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1064
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1065
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1066
+ }
1067
+ withdrawal_request_amount: amount {
1068
+ __typename
1069
+ currency_amount_original_value: original_value
1070
+ currency_amount_original_unit: original_unit
1071
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1072
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1073
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1074
+ }
1075
+ withdrawal_request_estimated_amount: estimated_amount {
1076
+ __typename
1077
+ currency_amount_original_value: original_value
1078
+ currency_amount_original_unit: original_unit
1079
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1080
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1081
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1082
+ }
1083
+ withdrawal_request_amount_withdrawn: amount_withdrawn {
1084
+ __typename
1085
+ currency_amount_original_value: original_value
1086
+ currency_amount_original_unit: original_unit
1087
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1088
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1089
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1090
+ }
1091
+ withdrawal_request_bitcoin_address: bitcoin_address
1092
+ withdrawal_request_withdrawal_mode: withdrawal_mode
1093
+ withdrawal_request_status: status
1094
+ withdrawal_request_completed_at: completed_at
1095
+ withdrawal_request_withdrawal: withdrawal {
1096
+ id
1097
+ }
1098
+ }
1099
+ }
1100
+ }
1101
+ }
1102
+ }
1103
+ `,
1104
+ variables: {
1105
+ entity_id: this.id,
1106
+ first: first,
1107
+ after: after,
1108
+ statuses: statuses,
1109
+ created_after_date: createdAfterDate,
1110
+ created_before_date: createdBeforeDate,
1111
+ },
1112
+ constructObject: (json) => {
1113
+ const connection = json["entity"]["withdrawal_requests"];
1114
+ return WalletToWithdrawalRequestsConnectionFromJson(connection);
1115
+ },
1116
+ }))!;
1117
+ }
1118
+
1030
1119
  public async getTotalAmountSent(
1031
1120
  client: LightsparkClient,
1032
1121
  createdAfterDate: string | undefined = undefined,
@@ -8,16 +8,14 @@ export enum WalletStatus {
8
8
  */
9
9
  FUTURE_VALUE = "FUTURE_VALUE",
10
10
  /**
11
- * The wallet has not been set up yet and is ready to be deployed.
12
- * This is the default status after the first login.
13
- * *
11
+ * The wallet has not been set up yet and is ready to be deployed. This is the default status
12
+ * after the first login. *
14
13
  */
15
14
  NOT_SETUP = "NOT_SETUP",
16
15
  /** The wallet is currently being deployed in the Lightspark infrastructure. **/
17
16
  DEPLOYING = "DEPLOYING",
18
17
  /**
19
- * The wallet has been deployed in the Lightspark infrastructure and is ready to be initialized.
20
- * *
18
+ * The wallet has been deployed in the Lightspark infrastructure and is ready to be initialized. *
21
19
  */
22
20
  DEPLOYED = "DEPLOYED",
23
21
  /** The wallet is currently being initialized. **/
@@ -35,8 +33,8 @@ export enum WalletStatus {
35
33
  TERMINATING = "TERMINATING",
36
34
  /**
37
35
  * The wallet has been terminated and is not available in the Lightspark infrastructure anymore.
38
- * It is not connected to the Lightning network and its funds can only be accessed using the Funds
39
- * Recovery flow. *
36
+ * It is not connected to the Lightning network and its funds can only be accessed using the
37
+ * Funds Recovery flow. *
40
38
  */
41
39
  TERMINATED = "TERMINATED",
42
40
  }
@@ -10,9 +10,8 @@ import {
10
10
 
11
11
  interface WalletToPaymentRequestsConnection {
12
12
  /**
13
- * The total count of objects in this connection, using the current filters.
14
- * It is different from the number of objects returned in the current page (in the `entities`
15
- * field).
13
+ * The total count of objects in this connection, using the current filters. It is different
14
+ * from the number of objects returned in the current page (in the `entities` field).
16
15
  **/
17
16
  count: number;
18
17
 
@@ -7,9 +7,8 @@ import { TransactionFromJson, TransactionToJson } from "./Transaction.js";
7
7
 
8
8
  interface WalletToTransactionsConnection {
9
9
  /**
10
- * The total count of objects in this connection, using the current filters.
11
- * It is different from the number of objects returned in the current page (in the `entities`
12
- * field).
10
+ * The total count of objects in this connection, using the current filters. It is different
11
+ * from the number of objects returned in the current page (in the `entities` field).
13
12
  **/
14
13
  count: number;
15
14
 
@@ -0,0 +1,70 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import type PageInfo from "./PageInfo.js";
4
+ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
5
+ import type WithdrawalRequest from "./WithdrawalRequest.js";
6
+ import { WithdrawalRequestFromJson } from "./WithdrawalRequest.js";
7
+
8
+ interface WalletToWithdrawalRequestsConnection {
9
+ /**
10
+ * The total count of objects in this connection, using the current filters. It is different
11
+ * from the number of objects returned in the current page (in the `entities` field).
12
+ **/
13
+ count: number;
14
+
15
+ /** An object that holds pagination information about the objects in this connection. **/
16
+ pageInfo: PageInfo;
17
+
18
+ /** The withdrawal requests for the current page of this connection. **/
19
+ entities: WithdrawalRequest[];
20
+
21
+ /** The typename of the object **/
22
+ typename: string;
23
+ }
24
+
25
+ export const WalletToWithdrawalRequestsConnectionFromJson = (
26
+ obj: any,
27
+ ): WalletToWithdrawalRequestsConnection => {
28
+ return {
29
+ count: obj["wallet_to_withdrawal_requests_connection_count"],
30
+ pageInfo: PageInfoFromJson(
31
+ obj["wallet_to_withdrawal_requests_connection_page_info"],
32
+ ),
33
+ entities: obj["wallet_to_withdrawal_requests_connection_entities"].map(
34
+ (e) => WithdrawalRequestFromJson(e),
35
+ ),
36
+ typename: "WalletToWithdrawalRequestsConnection",
37
+ } as WalletToWithdrawalRequestsConnection;
38
+ };
39
+ export const WalletToWithdrawalRequestsConnectionToJson = (
40
+ obj: WalletToWithdrawalRequestsConnection,
41
+ ): any => {
42
+ return {
43
+ __typename: "WalletToWithdrawalRequestsConnection",
44
+ wallet_to_withdrawal_requests_connection_count: obj.count,
45
+ wallet_to_withdrawal_requests_connection_page_info: PageInfoToJson(
46
+ obj.pageInfo,
47
+ ),
48
+ wallet_to_withdrawal_requests_connection_entities: obj.entities.map((e) =>
49
+ e.toJson(),
50
+ ),
51
+ };
52
+ };
53
+
54
+ export const FRAGMENT = `
55
+ fragment WalletToWithdrawalRequestsConnectionFragment on WalletToWithdrawalRequestsConnection {
56
+ __typename
57
+ wallet_to_withdrawal_requests_connection_count: count
58
+ wallet_to_withdrawal_requests_connection_page_info: page_info {
59
+ __typename
60
+ page_info_has_next_page: has_next_page
61
+ page_info_has_previous_page: has_previous_page
62
+ page_info_start_cursor: start_cursor
63
+ page_info_end_cursor: end_cursor
64
+ }
65
+ wallet_to_withdrawal_requests_connection_entities: entities {
66
+ id
67
+ }
68
+ }`;
69
+
70
+ export default WalletToWithdrawalRequestsConnection;
@@ -9,14 +9,14 @@ import {
9
9
  import TransactionStatus from "./TransactionStatus.js";
10
10
 
11
11
  /**
12
- * This object represents an L1 withdrawal from your Lightspark Node to any Bitcoin wallet.
13
- * You can retrieve this object to receive detailed information about any L1 withdrawal associated
14
- * with your Lightspark Node or account. *
12
+ * This object represents an L1 withdrawal from your Lightspark Node to any Bitcoin wallet. You can
13
+ * retrieve this object to receive detailed information about any L1 withdrawal associated with
14
+ * your Lightspark Node or account. *
15
15
  */
16
16
  interface Withdrawal {
17
17
  /**
18
- * The unique identifier of this entity across all Lightspark systems.
19
- * Should be treated as an opaque string.
18
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an
19
+ * opaque string.
20
20
  **/
21
21
  id: string;
22
22
 
@@ -19,21 +19,29 @@ import { WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson } from
19
19
  /**
20
20
  * This object represents a request made for an L1 withdrawal from your Lightspark Node to any
21
21
  * Bitcoin wallet. You can retrieve this object to receive detailed information about any
22
- * withdrawal request made from your Lightspark account.
23
- * *
22
+ * withdrawal request made from your Lightspark account. *
24
23
  */
25
24
  class WithdrawalRequest implements Entity {
26
25
  constructor(
27
26
  /**
28
- * The unique identifier of this entity across all Lightspark systems.
29
- * Should be treated as an opaque string.
27
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an
28
+ * opaque string.
30
29
  **/
31
30
  public readonly id: string,
32
31
  /** The date and time when the entity was first created. **/
33
32
  public readonly createdAt: string,
34
33
  /** The date and time when the entity was last updated. **/
35
34
  public readonly updatedAt: string,
36
- /** The amount of money that should be withdrawn in this request. **/
35
+ /**
36
+ * The requested amount of money to be withdrawn. If the requested amount is -1, it means to
37
+ * withdraw all.
38
+ **/
39
+ public readonly requestedAmount: CurrencyAmount,
40
+ /**
41
+ * The amount of money that should be withdrawn in this request.
42
+ *
43
+ * @deprecated Use `requested_amount` instead
44
+ **/
37
45
  public readonly amount: CurrencyAmount,
38
46
  /** The bitcoin address where the funds should be sent. **/
39
47
  public readonly bitcoinAddress: string,
@@ -44,10 +52,12 @@ class WithdrawalRequest implements Entity {
44
52
  /** The typename of the object **/
45
53
  public readonly typename: string,
46
54
  /**
47
- * If the requested amount is `-1` (i.e. everything),
48
- * this field may contain an estimate of the amount for the withdrawal.
55
+ * If the requested amount is `-1` (i.e. everything), this field may contain an estimate of the
56
+ * amount for the withdrawal.
49
57
  **/
50
58
  public readonly estimatedAmount?: CurrencyAmount | undefined,
59
+ /** The actual amount that is withdrawn. It will be set once the request is completed. **/
60
+ public readonly amountWithdrawn?: CurrencyAmount | undefined,
51
61
  /** The time at which this request was completed. **/
52
62
  public readonly completedAt?: string | undefined,
53
63
  /** The withdrawal transaction that has been generated by this request. **/
@@ -212,10 +222,16 @@ ${FRAGMENT}
212
222
  withdrawal_request_id: this.id,
213
223
  withdrawal_request_created_at: this.createdAt,
214
224
  withdrawal_request_updated_at: this.updatedAt,
225
+ withdrawal_request_requested_amount: CurrencyAmountToJson(
226
+ this.requestedAmount,
227
+ ),
215
228
  withdrawal_request_amount: CurrencyAmountToJson(this.amount),
216
229
  withdrawal_request_estimated_amount: this.estimatedAmount
217
230
  ? CurrencyAmountToJson(this.estimatedAmount)
218
231
  : undefined,
232
+ withdrawal_request_amount_withdrawn: this.amountWithdrawn
233
+ ? CurrencyAmountToJson(this.amountWithdrawn)
234
+ : undefined,
219
235
  withdrawal_request_bitcoin_address: this.bitcoinAddress,
220
236
  withdrawal_request_withdrawal_mode: this.withdrawalMode,
221
237
  withdrawal_request_status: this.status,
@@ -230,6 +246,7 @@ export const WithdrawalRequestFromJson = (obj: any): WithdrawalRequest => {
230
246
  obj["withdrawal_request_id"],
231
247
  obj["withdrawal_request_created_at"],
232
248
  obj["withdrawal_request_updated_at"],
249
+ CurrencyAmountFromJson(obj["withdrawal_request_requested_amount"]),
233
250
  CurrencyAmountFromJson(obj["withdrawal_request_amount"]),
234
251
  obj["withdrawal_request_bitcoin_address"],
235
252
  WithdrawalMode[obj["withdrawal_request_withdrawal_mode"]] ??
@@ -240,6 +257,9 @@ export const WithdrawalRequestFromJson = (obj: any): WithdrawalRequest => {
240
257
  !!obj["withdrawal_request_estimated_amount"]
241
258
  ? CurrencyAmountFromJson(obj["withdrawal_request_estimated_amount"])
242
259
  : undefined,
260
+ !!obj["withdrawal_request_amount_withdrawn"]
261
+ ? CurrencyAmountFromJson(obj["withdrawal_request_amount_withdrawn"])
262
+ : undefined,
243
263
  obj["withdrawal_request_completed_at"],
244
264
  obj["withdrawal_request_withdrawal"]?.id ?? undefined,
245
265
  );
@@ -251,6 +271,14 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
251
271
  withdrawal_request_id: id
252
272
  withdrawal_request_created_at: created_at
253
273
  withdrawal_request_updated_at: updated_at
274
+ withdrawal_request_requested_amount: requested_amount {
275
+ __typename
276
+ currency_amount_original_value: original_value
277
+ currency_amount_original_unit: original_unit
278
+ currency_amount_preferred_currency_unit: preferred_currency_unit
279
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
280
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
281
+ }
254
282
  withdrawal_request_amount: amount {
255
283
  __typename
256
284
  currency_amount_original_value: original_value
@@ -267,6 +295,14 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
267
295
  currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
268
296
  currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
269
297
  }
298
+ withdrawal_request_amount_withdrawn: amount_withdrawn {
299
+ __typename
300
+ currency_amount_original_value: original_value
301
+ currency_amount_original_unit: original_unit
302
+ currency_amount_preferred_currency_unit: preferred_currency_unit
303
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
304
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
305
+ }
270
306
  withdrawal_request_bitcoin_address: bitcoin_address
271
307
  withdrawal_request_withdrawal_mode: withdrawal_mode
272
308
  withdrawal_request_status: status
@@ -13,9 +13,8 @@ interface WithdrawalRequestToChannelClosingTransactionsConnection {
13
13
  pageInfo: PageInfo;
14
14
 
15
15
  /**
16
- * The total count of objects in this connection, using the current filters.
17
- * It is different from the number of objects returned in the current page (in the `entities`
18
- * field).
16
+ * The total count of objects in this connection, using the current filters. It is different
17
+ * from the number of objects returned in the current page (in the `entities` field).
19
18
  **/
20
19
  count: number;
21
20
 
@@ -13,9 +13,8 @@ interface WithdrawalRequestToChannelOpeningTransactionsConnection {
13
13
  pageInfo: PageInfo;
14
14
 
15
15
  /**
16
- * The total count of objects in this connection, using the current filters.
17
- * It is different from the number of objects returned in the current page (in the `entities`
18
- * field).
16
+ * The total count of objects in this connection, using the current filters. It is different
17
+ * from the number of objects returned in the current page (in the `entities` field).
19
18
  **/
20
19
  count: number;
21
20
 
@@ -5,6 +5,7 @@ export { default as AccountToNodesConnection } from "./AccountToNodesConnection.
5
5
  export { default as AccountToPaymentRequestsConnection } from "./AccountToPaymentRequestsConnection.js";
6
6
  export { default as AccountToTransactionsConnection } from "./AccountToTransactionsConnection.js";
7
7
  export { default as AccountToWalletsConnection } from "./AccountToWalletsConnection.js";
8
+ export { default as AccountToWithdrawalRequestsConnection } from "./AccountToWithdrawalRequestsConnection.js";
8
9
  export { default as ApiToken, getApiTokenQuery } from "./ApiToken.js";
9
10
  export { default as Balances } from "./Balances.js";
10
11
  export { default as BitcoinNetwork } from "./BitcoinNetwork.js";
@@ -173,6 +174,7 @@ export { default as Wallet } from "./Wallet.js";
173
174
  export { default as WalletStatus } from "./WalletStatus.js";
174
175
  export { default as WalletToPaymentRequestsConnection } from "./WalletToPaymentRequestsConnection.js";
175
176
  export { default as WalletToTransactionsConnection } from "./WalletToTransactionsConnection.js";
177
+ export { default as WalletToWithdrawalRequestsConnection } from "./WalletToWithdrawalRequestsConnection.js";
176
178
  export { default as WebhookEventType } from "./WebhookEventType.js";
177
179
  export { default as Withdrawal, getWithdrawalQuery } from "./Withdrawal.js";
178
180
  export { default as WithdrawalMode } from "./WithdrawalMode.js";