@lightsparkdev/lightspark-sdk 1.1.7 → 1.2.1

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 (136) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{chunk-5RDIWPBE.js → chunk-D32EWIPX.js} +3 -1
  3. package/dist/{chunk-7UT6YX37.js → chunk-VTPDR6P4.js} +393 -275
  4. package/dist/env.cjs +3 -1
  5. package/dist/env.d.cts +17 -0
  6. package/dist/env.js +2 -2
  7. package/dist/{index-d31f4469.d.ts → index-5acc6526.d.ts} +1403 -408
  8. package/dist/index.cjs +424 -296
  9. package/dist/index.d.cts +41 -0
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +32 -27
  12. package/dist/objects/index.cjs +395 -277
  13. package/dist/objects/index.d.cts +4 -0
  14. package/dist/objects/index.d.ts +1 -1
  15. package/dist/objects/index.js +6 -6
  16. package/dist/{text-encoding-MDIPJAHL.js → text-encoding-26SMKBAQ.js} +3 -1
  17. package/package.json +5 -5
  18. package/src/auth/AccountTokenAuthProvider.ts +15 -11
  19. package/src/client.ts +7 -6
  20. package/src/helpers.ts +3 -1
  21. package/src/objects/Account.ts +21 -2
  22. package/src/objects/AccountToApiTokensConnection.ts +16 -5
  23. package/src/objects/AccountToChannelsConnection.ts +14 -0
  24. package/src/objects/AccountToNodesConnection.ts +19 -5
  25. package/src/objects/AccountToPaymentRequestsConnection.ts +21 -5
  26. package/src/objects/AccountToTransactionsConnection.ts +33 -9
  27. package/src/objects/AccountToWalletsConnection.ts +13 -4
  28. package/src/objects/ApiToken.ts +13 -3
  29. package/src/objects/Balances.ts +17 -3
  30. package/src/objects/BlockchainBalance.ts +34 -9
  31. package/src/objects/Channel.ts +92 -16
  32. package/src/objects/ChannelClosingTransaction.ts +81 -61
  33. package/src/objects/ChannelFees.ts +16 -5
  34. package/src/objects/ChannelOpeningTransaction.ts +81 -61
  35. package/src/objects/ChannelSnapshot.ts +32 -8
  36. package/src/objects/ChannelToTransactionsConnection.ts +26 -6
  37. package/src/objects/Connection.ts +205 -10
  38. package/src/objects/CreateApiTokenInput.ts +8 -2
  39. package/src/objects/CreateApiTokenOutput.ts +9 -3
  40. package/src/objects/CreateInvoiceInput.ts +14 -5
  41. package/src/objects/CreateInvoiceOutput.ts +7 -2
  42. package/src/objects/CreateLnurlInvoiceInput.ts +13 -3
  43. package/src/objects/CreateNodeWalletAddressInput.ts +9 -2
  44. package/src/objects/CreateNodeWalletAddressOutput.ts +10 -2
  45. package/src/objects/CreateTestModeInvoiceInput.ts +14 -4
  46. package/src/objects/CreateTestModeInvoiceOutput.ts +10 -2
  47. package/src/objects/CreateTestModePaymentInput.ts +12 -3
  48. package/src/objects/CreateTestModePaymentoutput.ts +12 -2
  49. package/src/objects/CreateUmaInvoiceInput.ts +13 -3
  50. package/src/objects/CurrencyAmount.ts +13 -2
  51. package/src/objects/DeclineToSignMessagesInput.ts +9 -2
  52. package/src/objects/DeclineToSignMessagesOutput.ts +15 -3
  53. package/src/objects/DeleteApiTokenInput.ts +7 -2
  54. package/src/objects/DeleteApiTokenOutput.ts +7 -2
  55. package/src/objects/Deposit.ts +77 -61
  56. package/src/objects/Entity.ts +2 -2
  57. package/src/objects/FeeEstimate.ts +12 -3
  58. package/src/objects/FundNodeInput.ts +9 -3
  59. package/src/objects/FundNodeOutput.ts +11 -3
  60. package/src/objects/GraphNode.ts +49 -5
  61. package/src/objects/Hop.ts +27 -9
  62. package/src/objects/IdAndSignature.ts +8 -2
  63. package/src/objects/IncomingPayment.ts +50 -7
  64. package/src/objects/IncomingPaymentAttempt.ts +21 -5
  65. package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -5
  66. package/src/objects/Invoice.ts +37 -24
  67. package/src/objects/InvoiceData.ts +21 -6
  68. package/src/objects/LightningFeeEstimateForInvoiceInput.ts +13 -3
  69. package/src/objects/LightningFeeEstimateForNodeInput.ts +12 -2
  70. package/src/objects/LightningFeeEstimateOutput.ts +15 -3
  71. package/src/objects/LightningTransaction.ts +117 -28
  72. package/src/objects/LightsparkNode.ts +250 -210
  73. package/src/objects/LightsparkNodeOwner.ts +35 -4
  74. package/src/objects/LightsparkNodeToChannelsConnection.ts +17 -4
  75. package/src/objects/LightsparkNodeWithOSK.ts +127 -17
  76. package/src/objects/LightsparkNodeWithRemoteSigning.ts +122 -15
  77. package/src/objects/Node.ts +209 -68
  78. package/src/objects/NodeAddress.ts +8 -2
  79. package/src/objects/NodeToAddressesConnection.ts +13 -3
  80. package/src/objects/OnChainTransaction.ts +156 -44
  81. package/src/objects/OutgoingPayment.ts +72 -14
  82. package/src/objects/OutgoingPaymentAttempt.ts +63 -8
  83. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +18 -5
  84. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +17 -4
  85. package/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts +12 -3
  86. package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +11 -2
  87. package/src/objects/PageInfo.ts +14 -6
  88. package/src/objects/PayInvoiceInput.ts +12 -3
  89. package/src/objects/PayInvoiceOutput.ts +7 -2
  90. package/src/objects/PayUmaInvoiceInput.ts +12 -3
  91. package/src/objects/PaymentRequest.ts +27 -5
  92. package/src/objects/PaymentRequestData.ts +27 -4
  93. package/src/objects/PostTransactionData.ts +12 -3
  94. package/src/objects/RegisterPaymentInput.ts +10 -2
  95. package/src/objects/RegisterPaymentOutput.ts +9 -2
  96. package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +13 -2
  97. package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +9 -2
  98. package/src/objects/ReleasePaymentPreimageInput.ts +10 -2
  99. package/src/objects/ReleasePaymentPreimageOutput.ts +9 -2
  100. package/src/objects/RequestWithdrawalInput.ts +12 -2
  101. package/src/objects/RequestWithdrawalOutput.ts +9 -2
  102. package/src/objects/RichText.ts +7 -2
  103. package/src/objects/RoutingTransaction.ts +62 -41
  104. package/src/objects/ScreenNodeInput.ts +8 -2
  105. package/src/objects/ScreenNodeOutput.ts +7 -2
  106. package/src/objects/Secret.ts +8 -2
  107. package/src/objects/SendPaymentInput.ts +11 -2
  108. package/src/objects/SendPaymentOutput.ts +7 -2
  109. package/src/objects/SetInvoicePaymentHashInput.ts +12 -3
  110. package/src/objects/SetInvoicePaymentHashOutput.ts +9 -2
  111. package/src/objects/SignInvoiceInput.ts +9 -2
  112. package/src/objects/SignInvoiceOutput.ts +7 -2
  113. package/src/objects/SignMessagesInput.ts +13 -3
  114. package/src/objects/SignMessagesOutput.ts +13 -3
  115. package/src/objects/Signable.ts +10 -3
  116. package/src/objects/SignablePayload.ts +18 -5
  117. package/src/objects/Transaction.ts +206 -9
  118. package/src/objects/TransactionFailures.ts +11 -4
  119. package/src/objects/UpdateChannelPerCommitmentPointInput.ts +13 -2
  120. package/src/objects/UpdateChannelPerCommitmentPointOutput.ts +9 -2
  121. package/src/objects/UpdateNodeSharedSecretInput.ts +10 -2
  122. package/src/objects/UpdateNodeSharedSecretOutput.ts +9 -2
  123. package/src/objects/Wallet.ts +34 -5
  124. package/src/objects/WalletToPaymentRequestsConnection.ts +21 -5
  125. package/src/objects/WalletToTransactionsConnection.ts +16 -5
  126. package/src/objects/Withdrawal.ts +77 -61
  127. package/src/objects/WithdrawalRequest.ts +42 -4
  128. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +19 -4
  129. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +19 -4
  130. package/src/objects/index.ts +5 -2
  131. package/src/tests/integration/constants.ts +13 -0
  132. package/src/tests/integration/general-regtest.test.ts +652 -0
  133. package/src/tests/serialization.test.ts +21 -0
  134. package/src/webhooks.ts +1 -1
  135. package/src/tests/integration/client.test.ts +0 -207
  136. /package/dist/{chunk-NIMBE7W3.js → chunk-BMTV3EA2.js} +0 -0
@@ -26,7 +26,7 @@ declare enum CurrencyUnit {
26
26
  }
27
27
 
28
28
  /** This object represents the value and unit for an amount of currency. **/
29
- type CurrencyAmount = {
29
+ interface CurrencyAmount {
30
30
  /** The original numeric value for this CurrencyAmount. **/
31
31
  originalValue: number;
32
32
  /** The original unit of currency for this CurrencyAmount. **/
@@ -43,7 +43,7 @@ type CurrencyAmount = {
43
43
  * currency. For example, for USD, the value will be in cents.
44
44
  **/
45
45
  preferredCurrencyValueApprox: number;
46
- };
46
+ }
47
47
 
48
48
  declare enum LightsparkNodeStatus {
49
49
  /**
@@ -108,21 +108,6 @@ type AccountDashboard = {
108
108
  remoteBalance: Maybe<CurrencyAmount>;
109
109
  };
110
110
 
111
- /** This interface is used by all the entities in the Lightspark system. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the `entity` query and its ID. **/
112
- type Entity = {
113
- /**
114
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
115
- * string.
116
- **/
117
- id: string;
118
- /** The date and time when the entity was first created. **/
119
- createdAt: string;
120
- /** The date and time when the entity was last updated. **/
121
- updatedAt: string;
122
- /** The typename of the object **/
123
- typename: string;
124
- };
125
-
126
111
  /** This is an enum of the potential permissions that a Lightspark user can have in regards to account management. **/
127
112
  declare enum Permission {
128
113
  /**
@@ -147,7 +132,7 @@ declare enum Permission {
147
132
  }
148
133
 
149
134
  /** This is an object representing a Lightspark API token, that can be used to authenticate this account when making API calls or using our SDKs. See the “Authentication” section of our API docs for more details on its usage. **/
150
- type ApiToken = Entity & {
135
+ interface ApiToken {
151
136
  /**
152
137
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
153
138
  * string.
@@ -171,30 +156,18 @@ type ApiToken = Entity & {
171
156
  permissions: Permission[];
172
157
  /** The typename of the object **/
173
158
  typename: string;
174
- };
159
+ }
175
160
  declare const getApiTokenQuery: (id: string) => Query<ApiToken>;
176
161
 
177
162
  /** This is an object representing information about a page returned by the Lightspark API. For more information, please see the “Pagination” section of our API docs for more information about its usage. **/
178
- type PageInfo = {
179
- hasNextPage?: boolean;
180
- hasPreviousPage?: boolean;
181
- startCursor?: string;
182
- endCursor?: string;
183
- };
184
-
185
- type Connection = {
186
- /**
187
- * The total count of objects in this connection, using the current filters. It is different from the
188
- * number of objects returned in the current page (in the `entities` field).
189
- **/
190
- count: number;
191
- /** An object that holds pagination information about the objects in this connection. **/
192
- pageInfo: PageInfo;
193
- /** The typename of the object **/
194
- typename: string;
195
- };
163
+ interface PageInfo {
164
+ hasNextPage?: boolean | undefined;
165
+ hasPreviousPage?: boolean | undefined;
166
+ startCursor?: string | undefined;
167
+ endCursor?: string | undefined;
168
+ }
196
169
 
197
- type AccountToApiTokensConnection = Connection & {
170
+ interface AccountToApiTokensConnection {
198
171
  /**
199
172
  * The total count of objects in this connection, using the current filters. It is different from the
200
173
  * number of objects returned in the current page (in the `entities` field).
@@ -206,13 +179,7 @@ type AccountToApiTokensConnection = Connection & {
206
179
  entities: ApiToken[];
207
180
  /** The typename of the object **/
208
181
  typename: string;
209
- };
210
-
211
- /** This represents the fee policies set for a channel on the Lightning Network. **/
212
- type ChannelFees = {
213
- baseFee?: CurrencyAmount;
214
- feeRatePerMil?: number;
215
- };
182
+ }
216
183
 
217
184
  /** This is an enum representing the status of a channel on the Lightning Network. **/
218
185
  declare enum ChannelStatus {
@@ -237,7 +204,13 @@ declare enum ChannelStatus {
237
204
  ERROR = "ERROR"
238
205
  }
239
206
 
240
- type ChannelToTransactionsConnection = {
207
+ /** This represents the fee policies set for a channel on the Lightning Network. **/
208
+ interface ChannelFees {
209
+ baseFee?: CurrencyAmount | undefined;
210
+ feeRatePerMil?: number | undefined;
211
+ }
212
+
213
+ interface ChannelToTransactionsConnection {
241
214
  /**
242
215
  * The total count of objects in this connection, using the current filters. It is different from the
243
216
  * number of objects returned in the current page (in the `entities` field).
@@ -247,18 +220,33 @@ type ChannelToTransactionsConnection = {
247
220
  * The average fee for the transactions that transited through this channel, according to the filters
248
221
  * and constraints of the connection.
249
222
  **/
250
- averageFee?: CurrencyAmount;
223
+ averageFee?: CurrencyAmount | undefined;
251
224
  /**
252
225
  * The total amount transacted for the transactions that transited through this channel, according to
253
226
  * the filters and constraints of the connection.
254
227
  **/
255
- totalAmountTransacted?: CurrencyAmount;
228
+ totalAmountTransacted?: CurrencyAmount | undefined;
256
229
  /**
257
230
  * The total amount of fees for the transactions that transited through this channel, according to the
258
231
  * filters and constraints of the connection.
259
232
  **/
260
- totalFees?: CurrencyAmount;
261
- };
233
+ totalFees?: CurrencyAmount | undefined;
234
+ }
235
+
236
+ /** This interface is used by all the entities in the Lightspark system. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the `entity` query and its ID. **/
237
+ interface Entity {
238
+ /**
239
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
240
+ * string.
241
+ **/
242
+ id: string;
243
+ /** The date and time when the entity was first created. **/
244
+ createdAt: string;
245
+ /** The date and time when the entity was last updated. **/
246
+ updatedAt: string;
247
+ /** The typename of the object **/
248
+ typename: string;
249
+ }
262
250
 
263
251
  /** This is an enum of the potential types of transactions that can be associated with your Lightspark Node. **/
264
252
  declare enum TransactionType {
@@ -291,39 +279,189 @@ declare enum TransactionType {
291
279
 
292
280
  /** This is an object representing a channel on the Lightning Network. You can retrieve this object to get detailed information on a specific Lightning Network channel. **/
293
281
  declare class Channel implements Entity {
282
+ /**
283
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
284
+ * string.
285
+ **/
294
286
  readonly id: string;
287
+ /** The date and time when the entity was first created. **/
295
288
  readonly createdAt: string;
289
+ /** The date and time when the entity was last updated. **/
296
290
  readonly updatedAt: string;
291
+ /** The local Lightspark node of the channel. **/
297
292
  readonly localNodeId: string;
293
+ /** The typename of the object **/
298
294
  readonly typename: string;
295
+ /** The transaction that funded the channel upon channel opening. **/
299
296
  readonly fundingTransactionId?: string | undefined;
297
+ /**
298
+ * The total amount of funds in this channel, including the channel balance on the local node, the
299
+ * channel balance on the remote node and the on-chain fees to close the channel.
300
+ **/
300
301
  readonly capacity?: CurrencyAmount | undefined;
302
+ /** The channel balance on the local node. **/
301
303
  readonly localBalance?: CurrencyAmount | undefined;
304
+ /** The channel balance on the local node that is currently allocated to in-progress payments. **/
302
305
  readonly localUnsettledBalance?: CurrencyAmount | undefined;
306
+ /** The channel balance on the remote node. **/
303
307
  readonly remoteBalance?: CurrencyAmount | undefined;
308
+ /** The channel balance on the remote node that is currently allocated to in-progress payments. **/
304
309
  readonly remoteUnsettledBalance?: CurrencyAmount | undefined;
310
+ /** The channel balance that is currently allocated to in-progress payments. **/
305
311
  readonly unsettledBalance?: CurrencyAmount | undefined;
312
+ /** The total balance in this channel, including the channel balance on both local and remote nodes. **/
306
313
  readonly totalBalance?: CurrencyAmount | undefined;
314
+ /** The current status of this channel. **/
307
315
  readonly status?: ChannelStatus | undefined;
316
+ /**
317
+ * The estimated time to wait for the channel's hash timelock contract to expire when force closing
318
+ * the channel. It is in unit of minutes.
319
+ **/
308
320
  readonly estimatedForceClosureWaitMinutes?: number | undefined;
321
+ /** The amount to be paid in fees for the current set of commitment transactions. **/
309
322
  readonly commitFee?: CurrencyAmount | undefined;
323
+ /** The fees charged for routing payments through this channel. **/
310
324
  readonly fees?: ChannelFees | undefined;
325
+ /** If known, the remote node of the channel. **/
311
326
  readonly remoteNodeId?: string | undefined;
327
+ /**
328
+ * The unique identifier of the channel on Lightning Network, which is the location in the chain that
329
+ * the channel was confirmed. The format is <block-height>:<tx-index>:<tx-output>.
330
+ **/
312
331
  readonly shortChannelId?: string | undefined;
313
- constructor(id: string, createdAt: string, updatedAt: string, localNodeId: string, typename: string, fundingTransactionId?: string | undefined, capacity?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, localUnsettledBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, remoteUnsettledBalance?: CurrencyAmount | undefined, unsettledBalance?: CurrencyAmount | undefined, totalBalance?: CurrencyAmount | undefined, status?: ChannelStatus | undefined, estimatedForceClosureWaitMinutes?: number | undefined, commitFee?: CurrencyAmount | undefined, fees?: ChannelFees | undefined, remoteNodeId?: string | undefined, shortChannelId?: string | undefined);
332
+ constructor(
333
+ /**
334
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
335
+ * string.
336
+ **/
337
+ id: string,
338
+ /** The date and time when the entity was first created. **/
339
+ createdAt: string,
340
+ /** The date and time when the entity was last updated. **/
341
+ updatedAt: string,
342
+ /** The local Lightspark node of the channel. **/
343
+ localNodeId: string,
344
+ /** The typename of the object **/
345
+ typename: string,
346
+ /** The transaction that funded the channel upon channel opening. **/
347
+ fundingTransactionId?: string | undefined,
348
+ /**
349
+ * The total amount of funds in this channel, including the channel balance on the local node, the
350
+ * channel balance on the remote node and the on-chain fees to close the channel.
351
+ **/
352
+ capacity?: CurrencyAmount | undefined,
353
+ /** The channel balance on the local node. **/
354
+ localBalance?: CurrencyAmount | undefined,
355
+ /** The channel balance on the local node that is currently allocated to in-progress payments. **/
356
+ localUnsettledBalance?: CurrencyAmount | undefined,
357
+ /** The channel balance on the remote node. **/
358
+ remoteBalance?: CurrencyAmount | undefined,
359
+ /** The channel balance on the remote node that is currently allocated to in-progress payments. **/
360
+ remoteUnsettledBalance?: CurrencyAmount | undefined,
361
+ /** The channel balance that is currently allocated to in-progress payments. **/
362
+ unsettledBalance?: CurrencyAmount | undefined,
363
+ /** The total balance in this channel, including the channel balance on both local and remote nodes. **/
364
+ totalBalance?: CurrencyAmount | undefined,
365
+ /** The current status of this channel. **/
366
+ status?: ChannelStatus | undefined,
367
+ /**
368
+ * The estimated time to wait for the channel's hash timelock contract to expire when force closing
369
+ * the channel. It is in unit of minutes.
370
+ **/
371
+ estimatedForceClosureWaitMinutes?: number | undefined,
372
+ /** The amount to be paid in fees for the current set of commitment transactions. **/
373
+ commitFee?: CurrencyAmount | undefined,
374
+ /** The fees charged for routing payments through this channel. **/
375
+ fees?: ChannelFees | undefined,
376
+ /** If known, the remote node of the channel. **/
377
+ remoteNodeId?: string | undefined,
378
+ /**
379
+ * The unique identifier of the channel on Lightning Network, which is the location in the chain that
380
+ * the channel was confirmed. The format is <block-height>:<tx-index>:<tx-output>.
381
+ **/
382
+ shortChannelId?: string | undefined);
314
383
  getUptimePercentage(client: LightsparkClient, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<number>;
315
384
  getTransactions(client: LightsparkClient, types?: TransactionType[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<ChannelToTransactionsConnection>;
316
385
  static getChannelQuery(id: string): Query<Channel>;
386
+ toJson(): {
387
+ __typename: string;
388
+ channel_id: string;
389
+ channel_created_at: string;
390
+ channel_updated_at: string;
391
+ channel_funding_transaction: {
392
+ id: string | undefined;
393
+ };
394
+ channel_capacity: any;
395
+ channel_local_balance: any;
396
+ channel_local_unsettled_balance: any;
397
+ channel_remote_balance: any;
398
+ channel_remote_unsettled_balance: any;
399
+ channel_unsettled_balance: any;
400
+ channel_total_balance: any;
401
+ channel_status: ChannelStatus | undefined;
402
+ channel_estimated_force_closure_wait_minutes: number | undefined;
403
+ channel_commit_fee: any;
404
+ channel_fees: any;
405
+ channel_remote_node: {
406
+ id: string | undefined;
407
+ };
408
+ channel_local_node: {
409
+ id: string;
410
+ };
411
+ channel_short_channel_id: string | undefined;
412
+ };
317
413
  }
318
414
 
319
415
  declare class AccountToChannelsConnection {
416
+ /**
417
+ * The total count of objects in this connection, using the current filters. It is different from the
418
+ * number of objects returned in the current page (in the `entities` field).
419
+ **/
320
420
  readonly count: number;
421
+ /** The channels for the current page of this connection. **/
321
422
  readonly entities: Channel[];
322
- constructor(count: number, entities: Channel[]);
423
+ constructor(
424
+ /**
425
+ * The total count of objects in this connection, using the current filters. It is different from the
426
+ * number of objects returned in the current page (in the `entities` field).
427
+ **/
428
+ count: number,
429
+ /** The channels for the current page of this connection. **/
430
+ entities: Channel[]);
431
+ toJson(): {
432
+ account_to_channels_connection_count: number;
433
+ account_to_channels_connection_entities: {
434
+ __typename: string;
435
+ channel_id: string;
436
+ channel_created_at: string;
437
+ channel_updated_at: string;
438
+ channel_funding_transaction: {
439
+ id: string | undefined;
440
+ };
441
+ channel_capacity: any;
442
+ channel_local_balance: any;
443
+ channel_local_unsettled_balance: any;
444
+ channel_remote_balance: any;
445
+ channel_remote_unsettled_balance: any;
446
+ channel_unsettled_balance: any;
447
+ channel_total_balance: any;
448
+ channel_status: ChannelStatus | undefined;
449
+ channel_estimated_force_closure_wait_minutes: number | undefined;
450
+ channel_commit_fee: any;
451
+ channel_fees: any;
452
+ channel_remote_node: {
453
+ id: string | undefined;
454
+ };
455
+ channel_local_node: {
456
+ id: string;
457
+ };
458
+ channel_short_channel_id: string | undefined;
459
+ }[];
460
+ };
323
461
  }
324
462
 
325
463
  /** This is an object representing the balance associated with your Lightspark account. You can retrieve this object to see your balance, which can be broken down into several different categorizations. **/
326
- type Balances = {
464
+ interface Balances {
327
465
  /**
328
466
  * This represents the balance that should be displayed when asked "how much do I own right now?". It
329
467
  * represents the amount currently owned, including things that may not be owned soon (e.g. in-flight
@@ -344,25 +482,25 @@ type Balances = {
344
482
  * likely succeed and therefore likely make your withdrawal fail).
345
483
  **/
346
484
  availableToWithdrawBalance: CurrencyAmount;
347
- };
485
+ }
348
486
 
349
487
  /** This is an object representing a detailed breakdown of the balance for a Lightspark Node. **/
350
- type BlockchainBalance = {
488
+ interface BlockchainBalance {
351
489
  /** The total wallet balance, including unconfirmed UTXOs. **/
352
- totalBalance?: CurrencyAmount;
490
+ totalBalance?: CurrencyAmount | undefined;
353
491
  /** The balance of confirmed UTXOs in the wallet. **/
354
- confirmedBalance?: CurrencyAmount;
492
+ confirmedBalance?: CurrencyAmount | undefined;
355
493
  /** The balance of unconfirmed UTXOs in the wallet. **/
356
- unconfirmedBalance?: CurrencyAmount;
494
+ unconfirmedBalance?: CurrencyAmount | undefined;
357
495
  /** The balance that's locked by an on-chain transaction. **/
358
- lockedBalance?: CurrencyAmount;
496
+ lockedBalance?: CurrencyAmount | undefined;
359
497
  /** Funds required to be held in reserve for channel bumping. **/
360
- requiredReserve?: CurrencyAmount;
498
+ requiredReserve?: CurrencyAmount | undefined;
361
499
  /** Funds available for creating channels or withdrawing. **/
362
- availableBalance?: CurrencyAmount;
363
- };
500
+ availableBalance?: CurrencyAmount | undefined;
501
+ }
364
502
 
365
- type LightsparkNodeToChannelsConnection = Connection & {
503
+ interface LightsparkNodeToChannelsConnection {
366
504
  /**
367
505
  * The total count of objects in this connection, using the current filters. It is different from the
368
506
  * number of objects returned in the current page (in the `entities` field).
@@ -374,18 +512,18 @@ type LightsparkNodeToChannelsConnection = Connection & {
374
512
  entities: Channel[];
375
513
  /** The typename of the object **/
376
514
  typename: string;
377
- };
515
+ }
378
516
 
379
517
  /** This object represents the address of a node on the Lightning Network. **/
380
- type NodeAddress = {
518
+ interface NodeAddress {
381
519
  /** The string representation of the address. **/
382
520
  address: string;
383
521
  /** The type, or protocol, of this address. **/
384
522
  type: NodeAddressType;
385
- };
523
+ }
386
524
 
387
525
  /** A connection between a node and the addresses it has announced for itself on Lightning Network. **/
388
- type NodeToAddressesConnection = {
526
+ interface NodeToAddressesConnection {
389
527
  /**
390
528
  * The total count of objects in this connection, using the current filters. It is different from the
391
529
  * number of objects returned in the current page (in the `entities` field).
@@ -393,54 +531,96 @@ type NodeToAddressesConnection = {
393
531
  count: number;
394
532
  /** The addresses for the current page of this connection. **/
395
533
  entities: NodeAddress[];
396
- };
397
-
398
- /** This object is an interface representing a Lightning Node on the Lightning Network, and could either be a Lightspark node or a node managed by a third party. **/
399
- declare class Node implements Entity {
400
- readonly id: string;
401
- readonly createdAt: string;
402
- readonly updatedAt: string;
403
- readonly bitcoinNetwork: BitcoinNetwork;
404
- readonly displayName: string;
405
- readonly typename: string;
406
- readonly alias?: string | undefined;
407
- readonly color?: string | undefined;
408
- readonly conductivity?: number | undefined;
409
- readonly publicKey?: string | undefined;
410
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined);
411
- getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
412
- static getNodeQuery(id: string): Query<Node>;
413
534
  }
414
535
 
415
536
  /** This is an object representing a node managed by Lightspark and owned by the current connected account. This object contains information about the node’s configuration, state, and metadata. **/
416
- declare class LightsparkNode implements Node {
417
- readonly id: string;
418
- readonly createdAt: string;
419
- readonly updatedAt: string;
420
- readonly bitcoinNetwork: BitcoinNetwork;
421
- readonly displayName: string;
422
- readonly ownerId: string;
423
- readonly umaPrescreeningUtxos: string[];
424
- readonly typename: string;
425
- readonly alias?: string | undefined;
426
- readonly color?: string | undefined;
427
- readonly conductivity?: number | undefined;
428
- readonly publicKey?: string | undefined;
429
- readonly status?: LightsparkNodeStatus | undefined;
430
- readonly totalBalance?: CurrencyAmount | undefined;
431
- readonly totalLocalBalance?: CurrencyAmount | undefined;
432
- readonly localBalance?: CurrencyAmount | undefined;
433
- readonly remoteBalance?: CurrencyAmount | undefined;
434
- readonly blockchainBalance?: BlockchainBalance | undefined;
435
- readonly balances?: Balances | undefined;
436
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined);
537
+ interface LightsparkNode {
538
+ /**
539
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
540
+ * string.
541
+ **/
542
+ id: string;
543
+ /** The date and time when the entity was first created. **/
544
+ createdAt: string;
545
+ /** The date and time when the entity was last updated. **/
546
+ updatedAt: string;
547
+ /** The Bitcoin Network this node is deployed in. **/
548
+ bitcoinNetwork: BitcoinNetwork;
549
+ /**
550
+ * The name of this node in the network. It will be the most human-readable option possible, depending
551
+ * on the data available for this node.
552
+ **/
553
+ displayName: string;
554
+ /** The owner of this LightsparkNode. **/
555
+ ownerId: string;
556
+ /**
557
+ * The utxos of the channels that are connected to this node. This is used in uma flow for
558
+ * pre-screening.
559
+ **/
560
+ umaPrescreeningUtxos: string[];
561
+ /** The typename of the object **/
562
+ typename: string;
563
+ /**
564
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
565
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
566
+ * any time by the node operator.
567
+ **/
568
+ alias?: string | undefined;
569
+ /**
570
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
571
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
572
+ * That color can be changed at any time by the node operator.
573
+ **/
574
+ color?: string | undefined;
575
+ /**
576
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
577
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
578
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
579
+ **/
580
+ conductivity?: number | undefined;
581
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
582
+ publicKey?: string | undefined;
583
+ /** The current status of this node. **/
584
+ status?: LightsparkNodeStatus | undefined;
585
+ /**
586
+ * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
587
+ *
588
+ * @deprecated Use `balances` instead.
589
+ **/
590
+ totalBalance?: CurrencyAmount | undefined;
591
+ /**
592
+ * The total sum of the channel balances (online and offline) on this node.
593
+ *
594
+ * @deprecated Use `balances` instead.
595
+ **/
596
+ totalLocalBalance?: CurrencyAmount | undefined;
597
+ /**
598
+ * The sum of the channel balances (online only) that are available to send on this node.
599
+ *
600
+ * @deprecated Use `balances` instead.
601
+ **/
602
+ localBalance?: CurrencyAmount | undefined;
603
+ /**
604
+ * The sum of the channel balances that are available to receive on this node.
605
+ *
606
+ * @deprecated Use `balances` instead.
607
+ **/
608
+ remoteBalance?: CurrencyAmount | undefined;
609
+ /**
610
+ * The details of the balance of this node on the Bitcoin Network.
611
+ *
612
+ * @deprecated Use `balances` instead.
613
+ **/
614
+ blockchainBalance?: BlockchainBalance | undefined;
615
+ /** The balances that describe the funds in this node. **/
616
+ balances?: Balances | undefined;
437
617
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
438
618
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
439
- static getLightsparkNodeQuery(id: string): Query<LightsparkNode>;
440
619
  }
620
+ declare const getLightsparkNodeQuery: (id: string) => Query<LightsparkNode>;
441
621
 
442
622
  /** A connection between an account and the nodes it manages. **/
443
- type AccountToNodesConnection = Connection & {
623
+ interface AccountToNodesConnection {
444
624
  /**
445
625
  * The total count of objects in this connection, using the current filters. It is different from the
446
626
  * number of objects returned in the current page (in the `entities` field).
@@ -452,15 +632,15 @@ type AccountToNodesConnection = Connection & {
452
632
  entities: LightsparkNode[];
453
633
  /** The typename of the object **/
454
634
  typename: string;
455
- };
635
+ }
456
636
 
457
637
  /** This object is an interface of a payment request on the Lightning Network (i.e., a Lightning Invoice). It contains data related to parsing the payment details of a Lightning Invoice. **/
458
- type PaymentRequestData = {
638
+ interface PaymentRequestData {
459
639
  encodedPaymentRequest: string;
460
640
  bitcoinNetwork: BitcoinNetwork;
461
641
  /** The typename of the object **/
462
642
  typename: string;
463
- };
643
+ }
464
644
 
465
645
  /** This is an enum of the potential states that a payment request on the Lightning Network can take. **/
466
646
  declare enum PaymentRequestStatus {
@@ -474,7 +654,7 @@ declare enum PaymentRequestStatus {
474
654
  }
475
655
 
476
656
  /** This object contains information related to a payment request generated or received by a LightsparkNode. You can retrieve this object to receive payment information about a specific invoice. **/
477
- type PaymentRequest = Entity & {
657
+ interface PaymentRequest {
478
658
  /**
479
659
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
480
660
  * string.
@@ -490,10 +670,10 @@ type PaymentRequest = Entity & {
490
670
  status: PaymentRequestStatus;
491
671
  /** The typename of the object **/
492
672
  typename: string;
493
- };
673
+ }
494
674
  declare const getPaymentRequestQuery: (id: string) => Query<PaymentRequest>;
495
675
 
496
- type AccountToPaymentRequestsConnection = Connection & {
676
+ interface AccountToPaymentRequestsConnection {
497
677
  /**
498
678
  * The total count of objects in this connection, using the current filters. It is different from the
499
679
  * number of objects returned in the current page (in the `entities` field).
@@ -505,7 +685,7 @@ type AccountToPaymentRequestsConnection = Connection & {
505
685
  entities: PaymentRequest[];
506
686
  /** The typename of the object **/
507
687
  typename: string;
508
- };
688
+ }
509
689
 
510
690
  /** This is an enum of the potential statuses a transaction associated with your Lightspark Node can take. **/
511
691
  declare enum TransactionStatus {
@@ -529,7 +709,7 @@ declare enum TransactionStatus {
529
709
  }
530
710
 
531
711
  /** This object represents a payment transaction. The transaction can occur either on a Bitcoin Network, or over the Lightning Network. You can retrieve this object to receive specific information about a particular transaction tied to your Lightspark Node. **/
532
- type Transaction = Entity & {
712
+ interface Transaction {
533
713
  /**
534
714
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
535
715
  * string.
@@ -546,13 +726,13 @@ type Transaction = Entity & {
546
726
  /** The typename of the object **/
547
727
  typename: string;
548
728
  /** The date and time when this transaction was completed or failed. **/
549
- resolvedAt?: string;
729
+ resolvedAt?: string | undefined;
550
730
  /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
551
- transactionHash?: string;
552
- };
731
+ transactionHash?: string | undefined;
732
+ }
553
733
  declare const getTransactionQuery: (id: string) => Query<Transaction>;
554
734
 
555
- type AccountToTransactionsConnection = Connection & {
735
+ interface AccountToTransactionsConnection {
556
736
  /**
557
737
  * The total count of objects in this connection, using the current filters. It is different from the
558
738
  * number of objects returned in the current page (in the `entities` field).
@@ -568,21 +748,21 @@ type AccountToTransactionsConnection = Connection & {
568
748
  * Profit (or loss) generated by the transactions in this connection, with the set of filters and
569
749
  * constraints provided.
570
750
  **/
571
- profitLoss?: CurrencyAmount;
751
+ profitLoss?: CurrencyAmount | undefined;
572
752
  /**
573
753
  * Average fee earned for the transactions in this connection, with the set of filters and constraints
574
754
  * provided.
575
755
  **/
576
- averageFeeEarned?: CurrencyAmount;
756
+ averageFeeEarned?: CurrencyAmount | undefined;
577
757
  /**
578
758
  * Total amount transacted by the transactions in this connection, with the set of filters and
579
759
  * constraints provided.
580
760
  **/
581
- totalAmountTransacted?: CurrencyAmount;
582
- };
761
+ totalAmountTransacted?: CurrencyAmount | undefined;
762
+ }
583
763
 
584
764
  /** This is an object representing the owner of a LightsparkNode. **/
585
- type LightsparkNodeOwner = Entity & {
765
+ interface LightsparkNodeOwner {
586
766
  /**
587
767
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
588
768
  * string.
@@ -594,7 +774,7 @@ type LightsparkNodeOwner = Entity & {
594
774
  updatedAt: string;
595
775
  /** The typename of the object **/
596
776
  typename: string;
597
- };
777
+ }
598
778
  declare const getLightsparkNodeOwnerQuery: (id: string) => Query<LightsparkNodeOwner>;
599
779
 
600
780
  /** This is an enum of the potential statuses that your Lightspark wallet can take. **/
@@ -624,7 +804,7 @@ declare enum WalletStatus {
624
804
  TERMINATED = "TERMINATED"
625
805
  }
626
806
 
627
- type WalletToPaymentRequestsConnection = Connection & {
807
+ interface WalletToPaymentRequestsConnection {
628
808
  /**
629
809
  * The total count of objects in this connection, using the current filters. It is different from the
630
810
  * number of objects returned in the current page (in the `entities` field).
@@ -636,9 +816,9 @@ type WalletToPaymentRequestsConnection = Connection & {
636
816
  entities: PaymentRequest[];
637
817
  /** The typename of the object **/
638
818
  typename: string;
639
- };
819
+ }
640
820
 
641
- type WalletToTransactionsConnection = Connection & {
821
+ interface WalletToTransactionsConnection {
642
822
  /**
643
823
  * The total count of objects in this connection, using the current filters. It is different from the
644
824
  * number of objects returned in the current page (in the `entities` field).
@@ -650,28 +830,74 @@ type WalletToTransactionsConnection = Connection & {
650
830
  entities: Transaction[];
651
831
  /** The typename of the object **/
652
832
  typename: string;
653
- };
833
+ }
654
834
 
655
835
  /** This object represents a Lightspark Wallet, tied to your Lightspark account. Wallets can be used to send or receive funds over the Lightning Network. You can retrieve this object to receive information about a specific wallet tied to your Lightspark account. **/
656
- declare class Wallet implements LightsparkNodeOwner {
836
+ declare class Wallet implements LightsparkNodeOwner, Entity {
837
+ /**
838
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
839
+ * string.
840
+ **/
657
841
  readonly id: string;
842
+ /** The date and time when the entity was first created. **/
658
843
  readonly createdAt: string;
844
+ /** The date and time when the entity was last updated. **/
659
845
  readonly updatedAt: string;
846
+ /** The unique identifier of this wallet, as provided by the Lightspark Customer during login. **/
660
847
  readonly thirdPartyIdentifier: string;
848
+ /** The status of this wallet. **/
661
849
  readonly status: WalletStatus;
850
+ /** The typename of the object **/
662
851
  readonly typename: string;
852
+ /** The date and time when the wallet user last logged in. **/
663
853
  readonly lastLoginAt?: string | undefined;
854
+ /** The balances that describe the funds in this wallet. **/
664
855
  readonly balances?: Balances | undefined;
856
+ /** The account this wallet belongs to. **/
665
857
  readonly accountId?: string | undefined;
666
- constructor(id: string, createdAt: string, updatedAt: string, thirdPartyIdentifier: string, status: WalletStatus, typename: string, lastLoginAt?: string | undefined, balances?: Balances | undefined, accountId?: string | undefined);
858
+ constructor(
859
+ /**
860
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
861
+ * string.
862
+ **/
863
+ id: string,
864
+ /** The date and time when the entity was first created. **/
865
+ createdAt: string,
866
+ /** The date and time when the entity was last updated. **/
867
+ updatedAt: string,
868
+ /** The unique identifier of this wallet, as provided by the Lightspark Customer during login. **/
869
+ thirdPartyIdentifier: string,
870
+ /** The status of this wallet. **/
871
+ status: WalletStatus,
872
+ /** The typename of the object **/
873
+ typename: string,
874
+ /** The date and time when the wallet user last logged in. **/
875
+ lastLoginAt?: string | undefined,
876
+ /** The balances that describe the funds in this wallet. **/
877
+ balances?: Balances | undefined,
878
+ /** The account this wallet belongs to. **/
879
+ accountId?: string | undefined);
667
880
  getTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined, statuses?: TransactionStatus[] | undefined, types?: TransactionType[] | undefined): Promise<WalletToTransactionsConnection>;
668
881
  getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<WalletToPaymentRequestsConnection>;
669
882
  getTotalAmountReceived(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
670
883
  getTotalAmountSent(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
671
884
  static getWalletQuery(id: string): Query<Wallet>;
885
+ toJson(): {
886
+ __typename: string;
887
+ wallet_id: string;
888
+ wallet_created_at: string;
889
+ wallet_updated_at: string;
890
+ wallet_last_login_at: string | undefined;
891
+ wallet_balances: any;
892
+ wallet_third_party_identifier: string;
893
+ wallet_account: {
894
+ id: string | undefined;
895
+ };
896
+ wallet_status: WalletStatus;
897
+ };
672
898
  }
673
899
 
674
- type AccountToWalletsConnection = Connection & {
900
+ interface AccountToWalletsConnection {
675
901
  /**
676
902
  * The total count of objects in this connection, using the current filters. It is different from the
677
903
  * number of objects returned in the current page (in the `entities` field).
@@ -683,7 +909,7 @@ type AccountToWalletsConnection = Connection & {
683
909
  entities: Wallet[];
684
910
  /** The typename of the object **/
685
911
  typename: string;
686
- };
912
+ }
687
913
 
688
914
  /** This is an enum of the potential reasons why an OutgoingPayment sent from a Lightspark Node may have failed. **/
689
915
  declare enum PaymentFailureReason {
@@ -717,19 +943,40 @@ declare enum RoutingTransactionFailureReason {
717
943
  }
718
944
 
719
945
  /** This object represents payment failures associated with your Lightspark Node. **/
720
- type TransactionFailures = {
721
- paymentFailures?: PaymentFailureReason[];
722
- routingTransactionFailures?: RoutingTransactionFailureReason[];
723
- };
946
+ interface TransactionFailures {
947
+ paymentFailures?: PaymentFailureReason[] | undefined;
948
+ routingTransactionFailures?: RoutingTransactionFailureReason[] | undefined;
949
+ }
724
950
 
725
951
  /** This is an object representing the connected Lightspark account. You can retrieve this object to see your account information and objects tied to your account. **/
726
- declare class Account implements LightsparkNodeOwner {
952
+ declare class Account implements LightsparkNodeOwner, Entity {
953
+ /**
954
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
955
+ * string.
956
+ **/
727
957
  readonly id: string;
958
+ /** The date and time when the entity was first created. **/
728
959
  readonly createdAt: string;
960
+ /** The date and time when the entity was last updated. **/
729
961
  readonly updatedAt: string;
962
+ /** The typename of the object **/
730
963
  readonly typename: string;
964
+ /** The name of this account. **/
731
965
  readonly name?: string | undefined;
732
- constructor(id: string, createdAt: string, updatedAt: string, typename: string, name?: string | undefined);
966
+ constructor(
967
+ /**
968
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
969
+ * string.
970
+ **/
971
+ id: string,
972
+ /** The date and time when the entity was first created. **/
973
+ createdAt: string,
974
+ /** The date and time when the entity was last updated. **/
975
+ updatedAt: string,
976
+ /** The typename of the object **/
977
+ typename: string,
978
+ /** The name of this account. **/
979
+ name?: string | undefined);
733
980
  getApiTokens(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<AccountToApiTokensConnection>;
734
981
  getBlockchainBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<BlockchainBalance | null>;
735
982
  getConductivity(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<number>;
@@ -742,9 +989,16 @@ declare class Account implements LightsparkNodeOwner {
742
989
  getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined): Promise<AccountToPaymentRequestsConnection>;
743
990
  getWallets(client: LightsparkClient, first?: number | undefined, after?: string | undefined, thirdPartyIds?: string[] | undefined): Promise<AccountToWalletsConnection>;
744
991
  static getAccountQuery(): Query<Account>;
992
+ toJson(): {
993
+ __typename: string;
994
+ account_id: string;
995
+ account_created_at: string;
996
+ account_updated_at: string;
997
+ account_name: string | undefined;
998
+ };
745
999
  }
746
1000
 
747
- type CreateApiTokenOutput = {
1001
+ interface CreateApiTokenOutput {
748
1002
  /** The API Token that has been created. **/
749
1003
  apiToken: ApiToken;
750
1004
  /**
@@ -753,13 +1007,13 @@ type CreateApiTokenOutput = {
753
1007
  * account.
754
1008
  **/
755
1009
  clientSecret: string;
756
- };
1010
+ }
757
1011
 
758
1012
  /** This object represents the estimated L1 transaction fees for the Bitcoin network. Fee estimates are separated by potential confirmation speeds for settlement. **/
759
- type FeeEstimate = {
1013
+ interface FeeEstimate {
760
1014
  feeFast: CurrencyAmount;
761
1015
  feeMin: CurrencyAmount;
762
- };
1016
+ }
763
1017
 
764
1018
  /** This is an enum that enumerates all potential statuses for an incoming payment attempt. **/
765
1019
  declare enum IncomingPaymentAttemptStatus {
@@ -775,7 +1029,7 @@ declare enum IncomingPaymentAttemptStatus {
775
1029
  }
776
1030
 
777
1031
  /** This object represents any attempted payment sent to a Lightspark node on the Lightning Network. You can retrieve this object to receive payment related information about a specific incoming payment attempt. **/
778
- type IncomingPaymentAttempt = Entity & {
1032
+ interface IncomingPaymentAttempt {
779
1033
  /**
780
1034
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
781
1035
  * string.
@@ -794,12 +1048,12 @@ type IncomingPaymentAttempt = Entity & {
794
1048
  /** The typename of the object **/
795
1049
  typename: string;
796
1050
  /** The time the incoming payment attempt failed or succeeded. **/
797
- resolvedAt?: string;
798
- };
1051
+ resolvedAt?: string | undefined;
1052
+ }
799
1053
  declare const getIncomingPaymentAttemptQuery: (id: string) => Query<IncomingPaymentAttempt>;
800
1054
 
801
1055
  /** The connection from incoming payment to all attempts. **/
802
- type IncomingPaymentToAttemptsConnection = Connection & {
1056
+ interface IncomingPaymentToAttemptsConnection {
803
1057
  /**
804
1058
  * The total count of objects in this connection, using the current filters. It is different from the
805
1059
  * number of objects returned in the current page (in the `entities` field).
@@ -811,10 +1065,10 @@ type IncomingPaymentToAttemptsConnection = Connection & {
811
1065
  entities: IncomingPaymentAttempt[];
812
1066
  /** The typename of the object **/
813
1067
  typename: string;
814
- };
1068
+ }
815
1069
 
816
1070
  /** This is an object representing a transaction made over the Lightning Network. You can retrieve this object to receive information about a specific transaction made over Lightning for a Lightspark node. **/
817
- type LightningTransaction = Transaction & Entity & {
1071
+ interface LightningTransaction {
818
1072
  /**
819
1073
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
820
1074
  * string.
@@ -831,14 +1085,14 @@ type LightningTransaction = Transaction & Entity & {
831
1085
  /** The typename of the object **/
832
1086
  typename: string;
833
1087
  /** The date and time when this transaction was completed or failed. **/
834
- resolvedAt?: string;
1088
+ resolvedAt?: string | undefined;
835
1089
  /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
836
- transactionHash?: string;
837
- };
1090
+ transactionHash?: string | undefined;
1091
+ }
838
1092
  declare const getLightningTransactionQuery: (id: string) => Query<LightningTransaction>;
839
1093
 
840
1094
  /** This object represents post-transaction data that could be used to register payment for KYT. **/
841
- type PostTransactionData = {
1095
+ interface PostTransactionData {
842
1096
  /**
843
1097
  * The utxo of the channel over which the payment went through in the format of
844
1098
  * <transaction_hash>:<output_index>.
@@ -846,31 +1100,137 @@ type PostTransactionData = {
846
1100
  utxo: string;
847
1101
  /** The amount of funds transferred in the payment. **/
848
1102
  amount: CurrencyAmount;
849
- };
1103
+ }
850
1104
 
851
1105
  /** This object represents any payment sent to a Lightspark node on the Lightning Network. You can retrieve this object to receive payment related information about a specific payment received by a Lightspark node. **/
852
- declare class IncomingPayment implements LightningTransaction {
1106
+ declare class IncomingPayment implements LightningTransaction, Transaction, Entity {
1107
+ /**
1108
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1109
+ * string.
1110
+ **/
853
1111
  readonly id: string;
1112
+ /** The date and time when this transaction was initiated. **/
854
1113
  readonly createdAt: string;
1114
+ /** The date and time when the entity was last updated. **/
855
1115
  readonly updatedAt: string;
1116
+ /** The current status of this transaction. **/
856
1117
  readonly status: TransactionStatus;
1118
+ /** The amount of money involved in this transaction. **/
857
1119
  readonly amount: CurrencyAmount;
1120
+ /** The recipient Lightspark node this payment was sent to. **/
858
1121
  readonly destinationId: string;
1122
+ /** The typename of the object **/
859
1123
  readonly typename: string;
1124
+ /** The date and time when this transaction was completed or failed. **/
860
1125
  readonly resolvedAt?: string | undefined;
1126
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
861
1127
  readonly transactionHash?: string | undefined;
1128
+ /**
1129
+ * The optional payment request for this incoming payment, which will be null if the payment is sent
1130
+ * through keysend.
1131
+ **/
862
1132
  readonly paymentRequestId?: string | undefined;
1133
+ /** The post transaction data which can be used in KYT payment registration. **/
863
1134
  readonly umaPostTransactionData?: PostTransactionData[] | undefined;
864
- constructor(id: string, createdAt: string, updatedAt: string, status: TransactionStatus, amount: CurrencyAmount, destinationId: string, typename: string, resolvedAt?: string | undefined, transactionHash?: string | undefined, paymentRequestId?: string | undefined, umaPostTransactionData?: PostTransactionData[] | undefined);
865
- getAttempts(client: LightsparkClient, first?: number | undefined, statuses?: IncomingPaymentAttemptStatus[] | undefined, after?: string | undefined): Promise<IncomingPaymentToAttemptsConnection>;
866
- static getIncomingPaymentQuery(id: string): Query<IncomingPayment>;
867
- }
868
-
869
- /** This object represents the data associated with a BOLT #11 invoice. You can retrieve this object to receive the relevant data associated with a specific invoice. **/
870
- type InvoiceData = PaymentRequestData & {
871
- encodedPaymentRequest: string;
872
- bitcoinNetwork: BitcoinNetwork;
873
- /** The payment hash of this invoice. **/
1135
+ constructor(
1136
+ /**
1137
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1138
+ * string.
1139
+ **/
1140
+ id: string,
1141
+ /** The date and time when this transaction was initiated. **/
1142
+ createdAt: string,
1143
+ /** The date and time when the entity was last updated. **/
1144
+ updatedAt: string,
1145
+ /** The current status of this transaction. **/
1146
+ status: TransactionStatus,
1147
+ /** The amount of money involved in this transaction. **/
1148
+ amount: CurrencyAmount,
1149
+ /** The recipient Lightspark node this payment was sent to. **/
1150
+ destinationId: string,
1151
+ /** The typename of the object **/
1152
+ typename: string,
1153
+ /** The date and time when this transaction was completed or failed. **/
1154
+ resolvedAt?: string | undefined,
1155
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1156
+ transactionHash?: string | undefined,
1157
+ /**
1158
+ * The optional payment request for this incoming payment, which will be null if the payment is sent
1159
+ * through keysend.
1160
+ **/
1161
+ paymentRequestId?: string | undefined,
1162
+ /** The post transaction data which can be used in KYT payment registration. **/
1163
+ umaPostTransactionData?: PostTransactionData[] | undefined);
1164
+ getAttempts(client: LightsparkClient, first?: number | undefined, statuses?: IncomingPaymentAttemptStatus[] | undefined, after?: string | undefined): Promise<IncomingPaymentToAttemptsConnection>;
1165
+ static getIncomingPaymentQuery(id: string): Query<IncomingPayment>;
1166
+ toJson(): {
1167
+ __typename: string;
1168
+ incoming_payment_id: string;
1169
+ incoming_payment_created_at: string;
1170
+ incoming_payment_updated_at: string;
1171
+ incoming_payment_status: TransactionStatus;
1172
+ incoming_payment_resolved_at: string | undefined;
1173
+ incoming_payment_amount: any;
1174
+ incoming_payment_transaction_hash: string | undefined;
1175
+ incoming_payment_destination: {
1176
+ id: string;
1177
+ };
1178
+ incoming_payment_payment_request: {
1179
+ id: string | undefined;
1180
+ };
1181
+ incoming_payment_uma_post_transaction_data: any[] | undefined;
1182
+ };
1183
+ }
1184
+
1185
+ /** This object is an interface representing a Lightning Node on the Lightning Network, and could either be a Lightspark node or a node managed by a third party. **/
1186
+ interface Node {
1187
+ /**
1188
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1189
+ * string.
1190
+ **/
1191
+ id: string;
1192
+ /** The date and time when the entity was first created. **/
1193
+ createdAt: string;
1194
+ /** The date and time when the entity was last updated. **/
1195
+ updatedAt: string;
1196
+ /** The Bitcoin Network this node is deployed in. **/
1197
+ bitcoinNetwork: BitcoinNetwork;
1198
+ /**
1199
+ * The name of this node in the network. It will be the most human-readable option possible, depending
1200
+ * on the data available for this node.
1201
+ **/
1202
+ displayName: string;
1203
+ /** The typename of the object **/
1204
+ typename: string;
1205
+ /**
1206
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
1207
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
1208
+ * any time by the node operator.
1209
+ **/
1210
+ alias?: string | undefined;
1211
+ /**
1212
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
1213
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
1214
+ * That color can be changed at any time by the node operator.
1215
+ **/
1216
+ color?: string | undefined;
1217
+ /**
1218
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
1219
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
1220
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
1221
+ **/
1222
+ conductivity?: number | undefined;
1223
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
1224
+ publicKey?: string | undefined;
1225
+ getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
1226
+ }
1227
+ declare const getNodeQuery: (id: string) => Query<Node>;
1228
+
1229
+ /** This object represents the data associated with a BOLT #11 invoice. You can retrieve this object to receive the relevant data associated with a specific invoice. **/
1230
+ interface InvoiceData {
1231
+ encodedPaymentRequest: string;
1232
+ bitcoinNetwork: BitcoinNetwork;
1233
+ /** The payment hash of this invoice. **/
874
1234
  paymentHash: string;
875
1235
  /**
876
1236
  * The requested amount in this invoice. If it is equal to 0, the sender should choose the amount to
@@ -886,11 +1246,11 @@ type InvoiceData = PaymentRequestData & {
886
1246
  /** The typename of the object **/
887
1247
  typename: string;
888
1248
  /** A short, UTF-8 encoded, description of the purpose of this invoice. **/
889
- memo?: string;
890
- };
1249
+ memo?: string | undefined;
1250
+ }
891
1251
 
892
1252
  /** This object represents a BOLT #11 invoice (https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) created by a Lightspark Node. You can retrieve this object to receive relevant payment information for a specific invoice generated by a Lightspark node. **/
893
- type Invoice = PaymentRequest & Entity & {
1253
+ interface Invoice {
894
1254
  /**
895
1255
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
896
1256
  * string.
@@ -907,8 +1267,8 @@ type Invoice = PaymentRequest & Entity & {
907
1267
  /** The typename of the object **/
908
1268
  typename: string;
909
1269
  /** The total amount that has been paid to this invoice. **/
910
- amountPaid?: CurrencyAmount;
911
- };
1270
+ amountPaid?: CurrencyAmount | undefined;
1271
+ }
912
1272
  declare const getInvoiceQuery: (id: string) => Query<Invoice>;
913
1273
 
914
1274
  /** This is an enum for potential invoice types. **/
@@ -924,15 +1284,15 @@ declare enum InvoiceType {
924
1284
  AMP = "AMP"
925
1285
  }
926
1286
 
927
- type ChannelSnapshot = {
1287
+ interface ChannelSnapshot {
928
1288
  channelId: string;
929
1289
  timestamp: string;
930
- localBalance?: CurrencyAmount;
931
- localUnsettledBalance?: CurrencyAmount;
932
- localChannelReserve?: CurrencyAmount;
933
- remoteBalance?: CurrencyAmount;
934
- remoteUnsettledBalance?: CurrencyAmount;
935
- };
1290
+ localBalance?: CurrencyAmount | undefined;
1291
+ localUnsettledBalance?: CurrencyAmount | undefined;
1292
+ localChannelReserve?: CurrencyAmount | undefined;
1293
+ remoteBalance?: CurrencyAmount | undefined;
1294
+ remoteUnsettledBalance?: CurrencyAmount | undefined;
1295
+ }
936
1296
 
937
1297
  /** This is an enum representing a particular reason why an htlc sent over the Lightning Network may have failed. **/
938
1298
  declare enum HtlcAttemptFailureCode {
@@ -984,7 +1344,7 @@ declare enum OutgoingPaymentAttemptStatus {
984
1344
  }
985
1345
 
986
1346
  /** This object represents a specific node that existed on a particular payment route. You can retrieve this object to get information about a node on a particular payment path and all payment-relevant information for that node. **/
987
- type Hop = Entity & {
1347
+ interface Hop {
988
1348
  /**
989
1349
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
990
1350
  * string.
@@ -999,20 +1359,20 @@ type Hop = Entity & {
999
1359
  /** The typename of the object **/
1000
1360
  typename: string;
1001
1361
  /** The destination node of the hop. **/
1002
- destinationId?: string;
1362
+ destinationId?: string | undefined;
1003
1363
  /** The public key of the node to which the hop is bound. **/
1004
- publicKey?: string;
1364
+ publicKey?: string | undefined;
1005
1365
  /** The amount that is to be forwarded to the destination node. **/
1006
- amountToForward?: CurrencyAmount;
1366
+ amountToForward?: CurrencyAmount | undefined;
1007
1367
  /** The fees to be collected by the source node for forwarding the payment over the hop. **/
1008
- fee?: CurrencyAmount;
1368
+ fee?: CurrencyAmount | undefined;
1009
1369
  /** The block height at which an unsettled HTLC is considered expired. **/
1010
- expiryBlockHeight?: number;
1011
- };
1370
+ expiryBlockHeight?: number | undefined;
1371
+ }
1012
1372
  declare const getHopQuery: (id: string) => Query<Hop>;
1013
1373
 
1014
1374
  /** The connection from an outgoing payment attempt to the list of sequential hops that define the path from sender node to recipient node. **/
1015
- type OutgoingPaymentAttemptToHopsConnection = Connection & {
1375
+ interface OutgoingPaymentAttemptToHopsConnection {
1016
1376
  /**
1017
1377
  * The total count of objects in this connection, using the current filters. It is different from the
1018
1378
  * number of objects returned in the current page (in the `entities` field).
@@ -1024,29 +1384,109 @@ type OutgoingPaymentAttemptToHopsConnection = Connection & {
1024
1384
  entities: Hop[];
1025
1385
  /** The typename of the object **/
1026
1386
  typename: string;
1027
- };
1387
+ }
1028
1388
 
1029
1389
  /** This object represents an attempted Lightning Network payment sent from a Lightspark Node. You can retrieve this object to receive payment related information about any payment attempt sent from your Lightspark Node on the Lightning Network, including any potential reasons the payment may have failed. **/
1030
1390
  declare class OutgoingPaymentAttempt implements Entity {
1391
+ /**
1392
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1393
+ * string.
1394
+ **/
1031
1395
  readonly id: string;
1396
+ /** The date and time when the attempt was initiated. **/
1032
1397
  readonly createdAt: string;
1398
+ /** The date and time when the entity was last updated. **/
1033
1399
  readonly updatedAt: string;
1400
+ /** The status of an outgoing payment attempt. **/
1034
1401
  readonly status: OutgoingPaymentAttemptStatus;
1402
+ /** The outgoing payment for this attempt. **/
1035
1403
  readonly outgoingPaymentId: string;
1404
+ /** The typename of the object **/
1036
1405
  readonly typename: string;
1406
+ /** If the payment attempt failed, then this contains the Bolt #4 failure code. **/
1037
1407
  readonly failureCode?: HtlcAttemptFailureCode | undefined;
1408
+ /**
1409
+ * If the payment attempt failed, then this contains the index of the hop at which the problem
1410
+ * occurred.
1411
+ **/
1038
1412
  readonly failureSourceIndex?: number | undefined;
1413
+ /** The time the outgoing payment attempt failed or succeeded. **/
1039
1414
  readonly resolvedAt?: string | undefined;
1415
+ /**
1416
+ * The total amount of funds required to complete a payment over this route. This value includes the
1417
+ * cumulative fees for each hop. As a result, the attempt extended to the first-hop in the route will
1418
+ * need to have at least this much value, otherwise the route will fail at an intermediate node due to
1419
+ * an insufficient amount.
1420
+ **/
1040
1421
  readonly amount?: CurrencyAmount | undefined;
1422
+ /**
1423
+ * The sum of the fees paid at each hop within the route of this attempt. In the case of a one-hop
1424
+ * payment, this value will be zero as we don't need to pay a fee to ourselves.
1425
+ **/
1041
1426
  readonly fees?: CurrencyAmount | undefined;
1427
+ /** The channel snapshot at the time the outgoing payment attempt was made. **/
1042
1428
  readonly channelSnapshot?: ChannelSnapshot | undefined;
1043
- constructor(id: string, createdAt: string, updatedAt: string, status: OutgoingPaymentAttemptStatus, outgoingPaymentId: string, typename: string, failureCode?: HtlcAttemptFailureCode | undefined, failureSourceIndex?: number | undefined, resolvedAt?: string | undefined, amount?: CurrencyAmount | undefined, fees?: CurrencyAmount | undefined, channelSnapshot?: ChannelSnapshot | undefined);
1429
+ constructor(
1430
+ /**
1431
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1432
+ * string.
1433
+ **/
1434
+ id: string,
1435
+ /** The date and time when the attempt was initiated. **/
1436
+ createdAt: string,
1437
+ /** The date and time when the entity was last updated. **/
1438
+ updatedAt: string,
1439
+ /** The status of an outgoing payment attempt. **/
1440
+ status: OutgoingPaymentAttemptStatus,
1441
+ /** The outgoing payment for this attempt. **/
1442
+ outgoingPaymentId: string,
1443
+ /** The typename of the object **/
1444
+ typename: string,
1445
+ /** If the payment attempt failed, then this contains the Bolt #4 failure code. **/
1446
+ failureCode?: HtlcAttemptFailureCode | undefined,
1447
+ /**
1448
+ * If the payment attempt failed, then this contains the index of the hop at which the problem
1449
+ * occurred.
1450
+ **/
1451
+ failureSourceIndex?: number | undefined,
1452
+ /** The time the outgoing payment attempt failed or succeeded. **/
1453
+ resolvedAt?: string | undefined,
1454
+ /**
1455
+ * The total amount of funds required to complete a payment over this route. This value includes the
1456
+ * cumulative fees for each hop. As a result, the attempt extended to the first-hop in the route will
1457
+ * need to have at least this much value, otherwise the route will fail at an intermediate node due to
1458
+ * an insufficient amount.
1459
+ **/
1460
+ amount?: CurrencyAmount | undefined,
1461
+ /**
1462
+ * The sum of the fees paid at each hop within the route of this attempt. In the case of a one-hop
1463
+ * payment, this value will be zero as we don't need to pay a fee to ourselves.
1464
+ **/
1465
+ fees?: CurrencyAmount | undefined,
1466
+ /** The channel snapshot at the time the outgoing payment attempt was made. **/
1467
+ channelSnapshot?: ChannelSnapshot | undefined);
1044
1468
  getHops(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentAttemptToHopsConnection>;
1045
1469
  static getOutgoingPaymentAttemptQuery(id: string): Query<OutgoingPaymentAttempt>;
1470
+ toJson(): {
1471
+ __typename: string;
1472
+ outgoing_payment_attempt_id: string;
1473
+ outgoing_payment_attempt_created_at: string;
1474
+ outgoing_payment_attempt_updated_at: string;
1475
+ outgoing_payment_attempt_status: OutgoingPaymentAttemptStatus;
1476
+ outgoing_payment_attempt_failure_code: HtlcAttemptFailureCode | undefined;
1477
+ outgoing_payment_attempt_failure_source_index: number | undefined;
1478
+ outgoing_payment_attempt_resolved_at: string | undefined;
1479
+ outgoing_payment_attempt_amount: any;
1480
+ outgoing_payment_attempt_fees: any;
1481
+ outgoing_payment_attempt_outgoing_payment: {
1482
+ id: string;
1483
+ };
1484
+ outgoing_payment_attempt_channel_snapshot: any;
1485
+ };
1046
1486
  }
1047
1487
 
1048
1488
  /** The connection from outgoing payment to all attempts. **/
1049
- type OutgoingPaymentToAttemptsConnection = Connection & {
1489
+ interface OutgoingPaymentToAttemptsConnection {
1050
1490
  /**
1051
1491
  * The total count of objects in this connection, using the current filters. It is different from the
1052
1492
  * number of objects returned in the current page (in the `entities` field).
@@ -1058,33 +1498,109 @@ type OutgoingPaymentToAttemptsConnection = Connection & {
1058
1498
  entities: OutgoingPaymentAttempt[];
1059
1499
  /** The typename of the object **/
1060
1500
  typename: string;
1061
- };
1501
+ }
1062
1502
 
1063
- type RichText = {
1503
+ interface RichText {
1064
1504
  text: string;
1065
- };
1505
+ }
1066
1506
 
1067
1507
  /** This object represents a Lightning Network payment sent from a Lightspark Node. You can retrieve this object to receive payment related information about any payment sent from your Lightspark Node on the Lightning Network. **/
1068
- declare class OutgoingPayment implements LightningTransaction {
1508
+ declare class OutgoingPayment implements LightningTransaction, Transaction, Entity {
1509
+ /**
1510
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1511
+ * string.
1512
+ **/
1069
1513
  readonly id: string;
1514
+ /** The date and time when this transaction was initiated. **/
1070
1515
  readonly createdAt: string;
1516
+ /** The date and time when the entity was last updated. **/
1071
1517
  readonly updatedAt: string;
1518
+ /** The current status of this transaction. **/
1072
1519
  readonly status: TransactionStatus;
1520
+ /** The amount of money involved in this transaction. **/
1073
1521
  readonly amount: CurrencyAmount;
1522
+ /** The Lightspark node this payment originated from. **/
1074
1523
  readonly originId: string;
1524
+ /** The typename of the object **/
1075
1525
  readonly typename: string;
1526
+ /** The date and time when this transaction was completed or failed. **/
1076
1527
  readonly resolvedAt?: string | undefined;
1528
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1077
1529
  readonly transactionHash?: string | undefined;
1530
+ /** If known, the final recipient node this payment was sent to. **/
1078
1531
  readonly destinationId?: string | undefined;
1532
+ /** The fees paid by the sender node to send the payment. **/
1079
1533
  readonly fees?: CurrencyAmount | undefined;
1534
+ /** The data of the payment request that was paid by this transaction, if known. **/
1080
1535
  readonly paymentRequestData?: PaymentRequestData | undefined;
1536
+ /** If applicable, the reason why the payment failed. **/
1081
1537
  readonly failureReason?: PaymentFailureReason | undefined;
1538
+ /** If applicable, user-facing error message describing why the payment failed. **/
1082
1539
  readonly failureMessage?: RichText | undefined;
1540
+ /** The post transaction data which can be used in KYT payment registration. **/
1083
1541
  readonly umaPostTransactionData?: PostTransactionData[] | undefined;
1542
+ /** The preimage of the payment. **/
1084
1543
  readonly paymentPreimage?: string | undefined;
1085
- constructor(id: string, createdAt: string, updatedAt: string, status: TransactionStatus, amount: CurrencyAmount, originId: string, typename: string, resolvedAt?: string | undefined, transactionHash?: string | undefined, destinationId?: string | undefined, fees?: CurrencyAmount | undefined, paymentRequestData?: PaymentRequestData | undefined, failureReason?: PaymentFailureReason | undefined, failureMessage?: RichText | undefined, umaPostTransactionData?: PostTransactionData[] | undefined, paymentPreimage?: string | undefined);
1544
+ constructor(
1545
+ /**
1546
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1547
+ * string.
1548
+ **/
1549
+ id: string,
1550
+ /** The date and time when this transaction was initiated. **/
1551
+ createdAt: string,
1552
+ /** The date and time when the entity was last updated. **/
1553
+ updatedAt: string,
1554
+ /** The current status of this transaction. **/
1555
+ status: TransactionStatus,
1556
+ /** The amount of money involved in this transaction. **/
1557
+ amount: CurrencyAmount,
1558
+ /** The Lightspark node this payment originated from. **/
1559
+ originId: string,
1560
+ /** The typename of the object **/
1561
+ typename: string,
1562
+ /** The date and time when this transaction was completed or failed. **/
1563
+ resolvedAt?: string | undefined,
1564
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1565
+ transactionHash?: string | undefined,
1566
+ /** If known, the final recipient node this payment was sent to. **/
1567
+ destinationId?: string | undefined,
1568
+ /** The fees paid by the sender node to send the payment. **/
1569
+ fees?: CurrencyAmount | undefined,
1570
+ /** The data of the payment request that was paid by this transaction, if known. **/
1571
+ paymentRequestData?: PaymentRequestData | undefined,
1572
+ /** If applicable, the reason why the payment failed. **/
1573
+ failureReason?: PaymentFailureReason | undefined,
1574
+ /** If applicable, user-facing error message describing why the payment failed. **/
1575
+ failureMessage?: RichText | undefined,
1576
+ /** The post transaction data which can be used in KYT payment registration. **/
1577
+ umaPostTransactionData?: PostTransactionData[] | undefined,
1578
+ /** The preimage of the payment. **/
1579
+ paymentPreimage?: string | undefined);
1086
1580
  getAttempts(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentToAttemptsConnection>;
1087
1581
  static getOutgoingPaymentQuery(id: string): Query<OutgoingPayment>;
1582
+ toJson(): {
1583
+ __typename: string;
1584
+ outgoing_payment_id: string;
1585
+ outgoing_payment_created_at: string;
1586
+ outgoing_payment_updated_at: string;
1587
+ outgoing_payment_status: TransactionStatus;
1588
+ outgoing_payment_resolved_at: string | undefined;
1589
+ outgoing_payment_amount: any;
1590
+ outgoing_payment_transaction_hash: string | undefined;
1591
+ outgoing_payment_origin: {
1592
+ id: string;
1593
+ };
1594
+ outgoing_payment_destination: {
1595
+ id: string | undefined;
1596
+ };
1597
+ outgoing_payment_fees: any;
1598
+ outgoing_payment_payment_request_data: any;
1599
+ outgoing_payment_failure_reason: PaymentFailureReason | undefined;
1600
+ outgoing_payment_failure_message: any;
1601
+ outgoing_payment_uma_post_transaction_data: any[] | undefined;
1602
+ outgoing_payment_payment_preimage: string | undefined;
1603
+ };
1088
1604
  }
1089
1605
 
1090
1606
  type SingleNodeDashboard = {
@@ -1156,51 +1672,8 @@ declare enum WithdrawalRequestStatus {
1156
1672
  SUCCESSFUL = "SUCCESSFUL"
1157
1673
  }
1158
1674
 
1159
- /** This object represents an L1 transaction that occurred on the Bitcoin Network. You can retrieve this object to receive information about a specific on-chain transaction made on the Lightning Network associated with your Lightspark Node. **/
1160
- type OnChainTransaction = Transaction & Entity & {
1161
- /**
1162
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1163
- * string.
1164
- **/
1165
- id: string;
1166
- /** The date and time when this transaction was initiated. **/
1167
- createdAt: string;
1168
- /** The date and time when the entity was last updated. **/
1169
- updatedAt: string;
1170
- /** The current status of this transaction. **/
1171
- status: TransactionStatus;
1172
- /** The amount of money involved in this transaction. **/
1173
- amount: CurrencyAmount;
1174
- /**
1175
- * The height of the block that included this transaction. This will be zero for unconfirmed
1176
- * transactions.
1177
- **/
1178
- blockHeight: number;
1179
- /** The Bitcoin blockchain addresses this transaction was sent to. **/
1180
- destinationAddresses: string[];
1181
- /** The typename of the object **/
1182
- typename: string;
1183
- /** The date and time when this transaction was completed or failed. **/
1184
- resolvedAt?: string;
1185
- /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1186
- transactionHash?: string;
1187
- /**
1188
- * The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
1189
- * blockchain.
1190
- **/
1191
- fees?: CurrencyAmount;
1192
- /**
1193
- * The hash of the block that included this transaction. This will be null for unconfirmed
1194
- * transactions.
1195
- **/
1196
- blockHash?: string;
1197
- /** The number of blockchain confirmations for this transaction in real time. **/
1198
- numConfirmations?: number;
1199
- };
1200
- declare const getOnChainTransactionQuery: (id: string) => Query<OnChainTransaction>;
1201
-
1202
1675
  /** This is an object representing a transaction which closes a channel on the Lightning Network. This operation allocates balances back to the local and remote nodes. **/
1203
- type ChannelClosingTransaction = OnChainTransaction & Transaction & Entity & {
1676
+ interface ChannelClosingTransaction {
1204
1677
  /**
1205
1678
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1206
1679
  * string.
@@ -1224,27 +1697,27 @@ type ChannelClosingTransaction = OnChainTransaction & Transaction & Entity & {
1224
1697
  /** The typename of the object **/
1225
1698
  typename: string;
1226
1699
  /** The date and time when this transaction was completed or failed. **/
1227
- resolvedAt?: string;
1700
+ resolvedAt?: string | undefined;
1228
1701
  /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1229
- transactionHash?: string;
1702
+ transactionHash?: string | undefined;
1230
1703
  /**
1231
1704
  * The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
1232
1705
  * blockchain.
1233
1706
  **/
1234
- fees?: CurrencyAmount;
1707
+ fees?: CurrencyAmount | undefined;
1235
1708
  /**
1236
1709
  * The hash of the block that included this transaction. This will be null for unconfirmed
1237
1710
  * transactions.
1238
1711
  **/
1239
- blockHash?: string;
1712
+ blockHash?: string | undefined;
1240
1713
  /** The number of blockchain confirmations for this transaction in real time. **/
1241
- numConfirmations?: number;
1714
+ numConfirmations?: number | undefined;
1242
1715
  /** If known, the channel this transaction is closing. **/
1243
- channelId?: string;
1244
- };
1716
+ channelId?: string | undefined;
1717
+ }
1245
1718
  declare const getChannelClosingTransactionQuery: (id: string) => Query<ChannelClosingTransaction>;
1246
1719
 
1247
- type WithdrawalRequestToChannelClosingTransactionsConnection = {
1720
+ interface WithdrawalRequestToChannelClosingTransactionsConnection {
1248
1721
  /** An object that holds pagination information about the objects in this connection. **/
1249
1722
  pageInfo: PageInfo;
1250
1723
  /**
@@ -1254,10 +1727,10 @@ type WithdrawalRequestToChannelClosingTransactionsConnection = {
1254
1727
  count: number;
1255
1728
  /** The channel closing transactions for the current page of this connection. **/
1256
1729
  entities: ChannelClosingTransaction[];
1257
- };
1730
+ }
1258
1731
 
1259
1732
  /** This is an object representing a transaction which opens a channel on the Lightning Network. This object occurs only for channels funded by the local Lightspark node. **/
1260
- type ChannelOpeningTransaction = OnChainTransaction & Transaction & Entity & {
1733
+ interface ChannelOpeningTransaction {
1261
1734
  /**
1262
1735
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1263
1736
  * string.
@@ -1281,27 +1754,27 @@ type ChannelOpeningTransaction = OnChainTransaction & Transaction & Entity & {
1281
1754
  /** The typename of the object **/
1282
1755
  typename: string;
1283
1756
  /** The date and time when this transaction was completed or failed. **/
1284
- resolvedAt?: string;
1757
+ resolvedAt?: string | undefined;
1285
1758
  /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1286
- transactionHash?: string;
1759
+ transactionHash?: string | undefined;
1287
1760
  /**
1288
1761
  * The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
1289
1762
  * blockchain.
1290
1763
  **/
1291
- fees?: CurrencyAmount;
1764
+ fees?: CurrencyAmount | undefined;
1292
1765
  /**
1293
1766
  * The hash of the block that included this transaction. This will be null for unconfirmed
1294
1767
  * transactions.
1295
1768
  **/
1296
- blockHash?: string;
1769
+ blockHash?: string | undefined;
1297
1770
  /** The number of blockchain confirmations for this transaction in real time. **/
1298
- numConfirmations?: number;
1771
+ numConfirmations?: number | undefined;
1299
1772
  /** If known, the channel this transaction is opening. **/
1300
- channelId?: string;
1301
- };
1773
+ channelId?: string | undefined;
1774
+ }
1302
1775
  declare const getChannelOpeningTransactionQuery: (id: string) => Query<ChannelOpeningTransaction>;
1303
1776
 
1304
- type WithdrawalRequestToChannelOpeningTransactionsConnection = {
1777
+ interface WithdrawalRequestToChannelOpeningTransactionsConnection {
1305
1778
  /** An object that holds pagination information about the objects in this connection. **/
1306
1779
  pageInfo: PageInfo;
1307
1780
  /**
@@ -1311,25 +1784,85 @@ type WithdrawalRequestToChannelOpeningTransactionsConnection = {
1311
1784
  count: number;
1312
1785
  /** The channel opening transactions for the current page of this connection. **/
1313
1786
  entities: ChannelOpeningTransaction[];
1314
- };
1787
+ }
1315
1788
 
1316
1789
  /** This object represents a request made for an L1 withdrawal from your Lightspark Node to any Bitcoin wallet. You can retrieve this object to receive detailed information about any withdrawal request made from your Lightspark account. **/
1317
1790
  declare class WithdrawalRequest implements Entity {
1791
+ /**
1792
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1793
+ * string.
1794
+ **/
1318
1795
  readonly id: string;
1796
+ /** The date and time when the entity was first created. **/
1319
1797
  readonly createdAt: string;
1798
+ /** The date and time when the entity was last updated. **/
1320
1799
  readonly updatedAt: string;
1800
+ /** The amount of money that should be withdrawn in this request. **/
1321
1801
  readonly amount: CurrencyAmount;
1802
+ /** The bitcoin address where the funds should be sent. **/
1322
1803
  readonly bitcoinAddress: string;
1804
+ /** The strategy that should be used to withdraw the funds from the account. **/
1323
1805
  readonly withdrawalMode: WithdrawalMode;
1806
+ /** The current status of this withdrawal request. **/
1324
1807
  readonly status: WithdrawalRequestStatus;
1808
+ /** The typename of the object **/
1325
1809
  readonly typename: string;
1810
+ /**
1811
+ * If the requested amount is `-1` (i.e. everything), this field may contain an estimate of the amount
1812
+ * for the withdrawal.
1813
+ **/
1326
1814
  readonly estimatedAmount?: CurrencyAmount | undefined;
1815
+ /** The time at which this request was completed. **/
1327
1816
  readonly completedAt?: string | undefined;
1817
+ /** The withdrawal transaction that has been generated by this request. **/
1328
1818
  readonly withdrawalId?: string | undefined;
1329
- constructor(id: string, createdAt: string, updatedAt: string, amount: CurrencyAmount, bitcoinAddress: string, withdrawalMode: WithdrawalMode, status: WithdrawalRequestStatus, typename: string, estimatedAmount?: CurrencyAmount | undefined, completedAt?: string | undefined, withdrawalId?: string | undefined);
1819
+ constructor(
1820
+ /**
1821
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1822
+ * string.
1823
+ **/
1824
+ id: string,
1825
+ /** The date and time when the entity was first created. **/
1826
+ createdAt: string,
1827
+ /** The date and time when the entity was last updated. **/
1828
+ updatedAt: string,
1829
+ /** The amount of money that should be withdrawn in this request. **/
1830
+ amount: CurrencyAmount,
1831
+ /** The bitcoin address where the funds should be sent. **/
1832
+ bitcoinAddress: string,
1833
+ /** The strategy that should be used to withdraw the funds from the account. **/
1834
+ withdrawalMode: WithdrawalMode,
1835
+ /** The current status of this withdrawal request. **/
1836
+ status: WithdrawalRequestStatus,
1837
+ /** The typename of the object **/
1838
+ typename: string,
1839
+ /**
1840
+ * If the requested amount is `-1` (i.e. everything), this field may contain an estimate of the amount
1841
+ * for the withdrawal.
1842
+ **/
1843
+ estimatedAmount?: CurrencyAmount | undefined,
1844
+ /** The time at which this request was completed. **/
1845
+ completedAt?: string | undefined,
1846
+ /** The withdrawal transaction that has been generated by this request. **/
1847
+ withdrawalId?: string | undefined);
1330
1848
  getChannelClosingTransactions(client: LightsparkClient, first?: number | undefined): Promise<WithdrawalRequestToChannelClosingTransactionsConnection>;
1331
1849
  getChannelOpeningTransactions(client: LightsparkClient, first?: number | undefined): Promise<WithdrawalRequestToChannelOpeningTransactionsConnection>;
1332
1850
  static getWithdrawalRequestQuery(id: string): Query<WithdrawalRequest>;
1851
+ toJson(): {
1852
+ __typename: string;
1853
+ withdrawal_request_id: string;
1854
+ withdrawal_request_created_at: string;
1855
+ withdrawal_request_updated_at: string;
1856
+ withdrawal_request_amount: any;
1857
+ withdrawal_request_estimated_amount: any;
1858
+ withdrawal_request_bitcoin_address: string;
1859
+ withdrawal_request_withdrawal_mode: WithdrawalMode;
1860
+ withdrawal_request_status: WithdrawalRequestStatus;
1861
+ withdrawal_request_completed_at: string | undefined;
1862
+ withdrawal_request_withdrawal: {
1863
+ id: string | undefined;
1864
+ };
1865
+ };
1333
1866
  }
1334
1867
 
1335
1868
  /**
@@ -1387,7 +1920,8 @@ declare class LightsparkClient {
1387
1920
  /**
1388
1921
  * Constructs a new LightsparkClient.
1389
1922
  *
1390
- * @param authProvider The auth provider to use for authentication. Defaults to a stub auth provider. For server-side
1923
+ * @param authProvider The auth provider to use for authentication. Defaults to a stub auth provider.
1924
+ * For server-side
1391
1925
  * use, you should use the `AccountTokenAuthProvider`.
1392
1926
  * @param serverUrl The base URL of the server to connect to. Defaults to lightspark production.
1393
1927
  * @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
@@ -1416,7 +1950,7 @@ declare class LightsparkClient {
1416
1950
  *
1417
1951
  * @param authProvider
1418
1952
  */
1419
- setAuthProvider(authProvider: AuthProvider): Promise<void>;
1953
+ setAuthProvider(authProvider: AuthProvider): void;
1420
1954
  /**
1421
1955
  * @returns Whether or not the client is authorized. This is useful for determining if the user is logged in or not.
1422
1956
  */
@@ -1599,7 +2133,7 @@ declare class LightsparkClient {
1599
2133
  * @param transactionId The ID of the transaction to wait for
1600
2134
  * @param pollTimeoutSecs The timeout in seconds that we will wait before throwing an exception
1601
2135
  */
1602
- waitForTransactionComplete(transactionId: string, pollTimeoutSecs?: number): Promise<Transaction>;
2136
+ waitForTransactionComplete<T = Transaction>(transactionId: string, pollTimeoutSecs?: number): Promise<T>;
1603
2137
  /**
1604
2138
  * Sends a payment directly to a node on the Lightning Network through the public key of the node without an invoice.
1605
2139
  *
@@ -1703,29 +2237,41 @@ declare enum ComplianceProvider {
1703
2237
  CHAINALYSIS = "CHAINALYSIS"
1704
2238
  }
1705
2239
 
1706
- type CreateApiTokenInput = {
2240
+ interface Connection {
2241
+ /**
2242
+ * The total count of objects in this connection, using the current filters. It is different from the
2243
+ * number of objects returned in the current page (in the `entities` field).
2244
+ **/
2245
+ count: number;
2246
+ /** An object that holds pagination information about the objects in this connection. **/
2247
+ pageInfo: PageInfo;
2248
+ /** The typename of the object **/
2249
+ typename: string;
2250
+ }
2251
+
2252
+ interface CreateApiTokenInput {
1707
2253
  /** An arbitrary name that the user can choose to identify the API token in a list. **/
1708
2254
  name: string;
1709
2255
  /** List of permissions to grant to the API token **/
1710
2256
  permissions: Permission[];
1711
- };
2257
+ }
1712
2258
 
1713
- type CreateInvoiceInput = {
2259
+ interface CreateInvoiceInput {
1714
2260
  /** The node from which to create the invoice. **/
1715
2261
  nodeId: string;
1716
2262
  /** The amount for which the invoice should be created, in millisatoshis. **/
1717
2263
  amountMsats: number;
1718
- memo?: string;
1719
- invoiceType?: InvoiceType;
2264
+ memo?: string | undefined;
2265
+ invoiceType?: InvoiceType | undefined;
1720
2266
  /** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
1721
- expirySecs?: number;
1722
- };
2267
+ expirySecs?: number | undefined;
2268
+ }
1723
2269
 
1724
- type CreateInvoiceOutput = {
2270
+ interface CreateInvoiceOutput {
1725
2271
  invoiceId: string;
1726
- };
2272
+ }
1727
2273
 
1728
- type CreateLnurlInvoiceInput = {
2274
+ interface CreateLnurlInvoiceInput {
1729
2275
  /** The node from which to create the invoice. **/
1730
2276
  nodeId: string;
1731
2277
  /** The amount for which the invoice should be created, in millisatoshis. **/
@@ -1736,30 +2282,30 @@ type CreateLnurlInvoiceInput = {
1736
2282
  **/
1737
2283
  metadataHash: string;
1738
2284
  /** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
1739
- expirySecs?: number;
1740
- };
2285
+ expirySecs?: number | undefined;
2286
+ }
1741
2287
 
1742
- type CreateNodeWalletAddressInput = {
2288
+ interface CreateNodeWalletAddressInput {
1743
2289
  nodeId: string;
1744
- };
2290
+ }
1745
2291
 
1746
- type CreateNodeWalletAddressOutput = {
2292
+ interface CreateNodeWalletAddressOutput {
1747
2293
  nodeId: string;
1748
2294
  walletAddress: string;
1749
- };
2295
+ }
1750
2296
 
1751
- type CreateTestModeInvoiceInput = {
2297
+ interface CreateTestModeInvoiceInput {
1752
2298
  localNodeId: string;
1753
2299
  amountMsats: number;
1754
- memo?: string;
1755
- invoiceType?: InvoiceType;
1756
- };
2300
+ memo?: string | undefined;
2301
+ invoiceType?: InvoiceType | undefined;
2302
+ }
1757
2303
 
1758
- type CreateTestModeInvoiceOutput = {
2304
+ interface CreateTestModeInvoiceOutput {
1759
2305
  encodedPaymentRequest: string;
1760
- };
2306
+ }
1761
2307
 
1762
- type CreateTestModePaymentInput = {
2308
+ interface CreateTestModePaymentInput {
1763
2309
  /** The node to where you want to send the payment. **/
1764
2310
  localNodeId: string;
1765
2311
  /** The invoice you want to be paid (as defined by the BOLT11 standard). **/
@@ -1768,11 +2314,11 @@ type CreateTestModePaymentInput = {
1768
2314
  * The amount you will be paid for this invoice, expressed in msats. It should ONLY be set when the
1769
2315
  * invoice amount is zero.
1770
2316
  **/
1771
- amountMsats?: number;
1772
- };
2317
+ amountMsats?: number | undefined;
2318
+ }
1773
2319
 
1774
2320
  /** This is an object identifying the output of a test mode payment. This object can be used to retrieve the associated payment made from a Test Mode Payment call. **/
1775
- type CreateTestModePaymentoutput = {
2321
+ interface CreateTestModePaymentoutput {
1776
2322
  /**
1777
2323
  * The payment that has been sent.
1778
2324
  *
@@ -1781,19 +2327,19 @@ type CreateTestModePaymentoutput = {
1781
2327
  paymentId: string;
1782
2328
  /** The payment that has been received. **/
1783
2329
  incomingPaymentId: string;
1784
- };
2330
+ }
1785
2331
 
1786
- type CreateUmaInvoiceInput = {
2332
+ interface CreateUmaInvoiceInput {
1787
2333
  nodeId: string;
1788
2334
  amountMsats: number;
1789
2335
  metadataHash: string;
1790
- expirySecs?: number;
1791
- };
2336
+ expirySecs?: number | undefined;
2337
+ }
1792
2338
 
1793
- type DeclineToSignMessagesInput = {
2339
+ interface DeclineToSignMessagesInput {
1794
2340
  /** List of payload ids to decline to sign because validation failed. **/
1795
2341
  payloadIds: string[];
1796
- };
2342
+ }
1797
2343
 
1798
2344
  declare enum SignablePayloadStatus {
1799
2345
  /**
@@ -1807,7 +2353,7 @@ declare enum SignablePayloadStatus {
1807
2353
  INVALID_SIGNATURE = "INVALID_SIGNATURE"
1808
2354
  }
1809
2355
 
1810
- type SignablePayload = Entity & {
2356
+ interface SignablePayload {
1811
2357
  /**
1812
2358
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1813
2359
  * string.
@@ -1828,26 +2374,26 @@ type SignablePayload = Entity & {
1828
2374
  /** The typename of the object **/
1829
2375
  typename: string;
1830
2376
  /** The tweak value to add. **/
1831
- addTweak?: string;
2377
+ addTweak?: string | undefined;
1832
2378
  /** The tweak value to multiply. **/
1833
- mulTweak?: string;
1834
- };
2379
+ mulTweak?: string | undefined;
2380
+ }
1835
2381
  declare const getSignablePayloadQuery: (id: string) => Query<SignablePayload>;
1836
2382
 
1837
- type DeclineToSignMessagesOutput = {
2383
+ interface DeclineToSignMessagesOutput {
1838
2384
  declinedPayloads: SignablePayload[];
1839
- };
2385
+ }
1840
2386
 
1841
- type DeleteApiTokenInput = {
2387
+ interface DeleteApiTokenInput {
1842
2388
  apiTokenId: string;
1843
- };
2389
+ }
1844
2390
 
1845
- type DeleteApiTokenOutput = {
2391
+ interface DeleteApiTokenOutput {
1846
2392
  accountId: string;
1847
- };
2393
+ }
1848
2394
 
1849
2395
  /** This object represents a Deposit made to a Lightspark node wallet. This operation occurs for any L1 funding transaction to the wallet. You can retrieve this object to receive detailed information about the deposit. **/
1850
- type Deposit = OnChainTransaction & Transaction & Entity & {
2396
+ interface Deposit {
1851
2397
  /**
1852
2398
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
1853
2399
  * string.
@@ -1873,58 +2419,136 @@ type Deposit = OnChainTransaction & Transaction & Entity & {
1873
2419
  /** The typename of the object **/
1874
2420
  typename: string;
1875
2421
  /** The date and time when this transaction was completed or failed. **/
1876
- resolvedAt?: string;
2422
+ resolvedAt?: string | undefined;
1877
2423
  /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1878
- transactionHash?: string;
2424
+ transactionHash?: string | undefined;
1879
2425
  /**
1880
2426
  * The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
1881
2427
  * blockchain.
1882
2428
  **/
1883
- fees?: CurrencyAmount;
2429
+ fees?: CurrencyAmount | undefined;
1884
2430
  /**
1885
2431
  * The hash of the block that included this transaction. This will be null for unconfirmed
1886
2432
  * transactions.
1887
2433
  **/
1888
- blockHash?: string;
2434
+ blockHash?: string | undefined;
1889
2435
  /** The number of blockchain confirmations for this transaction in real time. **/
1890
- numConfirmations?: number;
1891
- };
2436
+ numConfirmations?: number | undefined;
2437
+ }
1892
2438
  declare const getDepositQuery: (id: string) => Query<Deposit>;
1893
2439
 
1894
- type FundNodeInput = {
2440
+ interface FundNodeInput {
1895
2441
  nodeId: string;
1896
- amountSats?: number;
1897
- };
2442
+ amountSats?: number | undefined;
2443
+ }
1898
2444
 
1899
- type FundNodeOutput = {
2445
+ interface FundNodeOutput {
1900
2446
  amount: CurrencyAmount;
1901
- };
2447
+ }
1902
2448
 
1903
2449
  /** This object represents a node that exists on the Lightning Network, including nodes not managed by Lightspark. You can retrieve this object to get publicly available information about any node on the Lightning Network. **/
1904
- declare class GraphNode implements Node {
2450
+ declare class GraphNode implements Node, Entity {
2451
+ /**
2452
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2453
+ * string.
2454
+ **/
1905
2455
  readonly id: string;
2456
+ /** The date and time when the entity was first created. **/
1906
2457
  readonly createdAt: string;
2458
+ /** The date and time when the entity was last updated. **/
1907
2459
  readonly updatedAt: string;
2460
+ /** The Bitcoin Network this node is deployed in. **/
1908
2461
  readonly bitcoinNetwork: BitcoinNetwork;
2462
+ /**
2463
+ * The name of this node in the network. It will be the most human-readable option possible, depending
2464
+ * on the data available for this node.
2465
+ **/
1909
2466
  readonly displayName: string;
2467
+ /** The typename of the object **/
1910
2468
  readonly typename: string;
2469
+ /**
2470
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
2471
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
2472
+ * any time by the node operator.
2473
+ **/
1911
2474
  readonly alias?: string | undefined;
2475
+ /**
2476
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
2477
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
2478
+ * That color can be changed at any time by the node operator.
2479
+ **/
1912
2480
  readonly color?: string | undefined;
2481
+ /**
2482
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
2483
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
2484
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
2485
+ **/
1913
2486
  readonly conductivity?: number | undefined;
2487
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
1914
2488
  readonly publicKey?: string | undefined;
1915
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined);
2489
+ constructor(
2490
+ /**
2491
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2492
+ * string.
2493
+ **/
2494
+ id: string,
2495
+ /** The date and time when the entity was first created. **/
2496
+ createdAt: string,
2497
+ /** The date and time when the entity was last updated. **/
2498
+ updatedAt: string,
2499
+ /** The Bitcoin Network this node is deployed in. **/
2500
+ bitcoinNetwork: BitcoinNetwork,
2501
+ /**
2502
+ * The name of this node in the network. It will be the most human-readable option possible, depending
2503
+ * on the data available for this node.
2504
+ **/
2505
+ displayName: string,
2506
+ /** The typename of the object **/
2507
+ typename: string,
2508
+ /**
2509
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
2510
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
2511
+ * any time by the node operator.
2512
+ **/
2513
+ alias?: string | undefined,
2514
+ /**
2515
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
2516
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
2517
+ * That color can be changed at any time by the node operator.
2518
+ **/
2519
+ color?: string | undefined,
2520
+ /**
2521
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
2522
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
2523
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
2524
+ **/
2525
+ conductivity?: number | undefined,
2526
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
2527
+ publicKey?: string | undefined);
1916
2528
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
1917
2529
  static getGraphNodeQuery(id: string): Query<GraphNode>;
2530
+ toJson(): {
2531
+ __typename: string;
2532
+ graph_node_id: string;
2533
+ graph_node_created_at: string;
2534
+ graph_node_updated_at: string;
2535
+ graph_node_alias: string | undefined;
2536
+ graph_node_bitcoin_network: BitcoinNetwork;
2537
+ graph_node_color: string | undefined;
2538
+ graph_node_conductivity: number | undefined;
2539
+ graph_node_display_name: string;
2540
+ graph_node_public_key: string | undefined;
2541
+ };
1918
2542
  }
1919
2543
 
1920
- type IdAndSignature = {
2544
+ interface IdAndSignature {
1921
2545
  /** The id of the message. **/
1922
2546
  id: string;
1923
2547
  /** The signature of the message. **/
1924
2548
  signature: string;
1925
- };
2549
+ }
1926
2550
 
1927
- type LightningFeeEstimateForInvoiceInput = {
2551
+ interface LightningFeeEstimateForInvoiceInput {
1928
2552
  /** The node from where you want to send the payment. **/
1929
2553
  nodeId: string;
1930
2554
  /** The invoice you want to pay (as defined by the BOLT11 standard). **/
@@ -1933,95 +2557,466 @@ type LightningFeeEstimateForInvoiceInput = {
1933
2557
  * If the invoice does not specify a payment amount, then the amount that you wish to pay, expressed
1934
2558
  * in msats.
1935
2559
  **/
1936
- amountMsats?: number;
1937
- };
2560
+ amountMsats?: number | undefined;
2561
+ }
1938
2562
 
1939
- type LightningFeeEstimateForNodeInput = {
2563
+ interface LightningFeeEstimateForNodeInput {
1940
2564
  /** The node from where you want to send the payment. **/
1941
2565
  nodeId: string;
1942
2566
  /** The public key of the node that you want to pay. **/
1943
2567
  destinationNodePublicKey: string;
1944
2568
  /** The payment amount expressed in msats. **/
1945
2569
  amountMsats: number;
1946
- };
2570
+ }
1947
2571
 
1948
- type LightningFeeEstimateOutput = {
2572
+ interface LightningFeeEstimateOutput {
1949
2573
  /** The estimated fees for the payment. **/
1950
2574
  feeEstimate: CurrencyAmount;
1951
- };
2575
+ }
1952
2576
 
1953
- type Secret = {
2577
+ interface Secret {
1954
2578
  encryptedValue: string;
1955
2579
  cipher: string;
1956
- };
2580
+ }
1957
2581
 
1958
2582
  /** This is a Lightspark node with OSK. **/
1959
- declare class LightsparkNodeWithOSK implements LightsparkNode {
2583
+ declare class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
2584
+ /**
2585
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2586
+ * string.
2587
+ **/
1960
2588
  readonly id: string;
2589
+ /** The date and time when the entity was first created. **/
1961
2590
  readonly createdAt: string;
2591
+ /** The date and time when the entity was last updated. **/
1962
2592
  readonly updatedAt: string;
2593
+ /** The Bitcoin Network this node is deployed in. **/
1963
2594
  readonly bitcoinNetwork: BitcoinNetwork;
2595
+ /**
2596
+ * The name of this node in the network. It will be the most human-readable option possible, depending
2597
+ * on the data available for this node.
2598
+ **/
1964
2599
  readonly displayName: string;
2600
+ /** The owner of this LightsparkNode. **/
1965
2601
  readonly ownerId: string;
2602
+ /**
2603
+ * The utxos of the channels that are connected to this node. This is used in uma flow for
2604
+ * pre-screening.
2605
+ **/
1966
2606
  readonly umaPrescreeningUtxos: string[];
2607
+ /** The typename of the object **/
1967
2608
  readonly typename: string;
2609
+ /**
2610
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
2611
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
2612
+ * any time by the node operator.
2613
+ **/
1968
2614
  readonly alias?: string | undefined;
2615
+ /**
2616
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
2617
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
2618
+ * That color can be changed at any time by the node operator.
2619
+ **/
1969
2620
  readonly color?: string | undefined;
2621
+ /**
2622
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
2623
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
2624
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
2625
+ **/
1970
2626
  readonly conductivity?: number | undefined;
2627
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
1971
2628
  readonly publicKey?: string | undefined;
2629
+ /** The current status of this node. **/
1972
2630
  readonly status?: LightsparkNodeStatus | undefined;
2631
+ /**
2632
+ * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
2633
+ *
2634
+ * @deprecated Use `balances` instead.
2635
+ **/
1973
2636
  readonly totalBalance?: CurrencyAmount | undefined;
2637
+ /**
2638
+ * The total sum of the channel balances (online and offline) on this node.
2639
+ *
2640
+ * @deprecated Use `balances` instead.
2641
+ **/
1974
2642
  readonly totalLocalBalance?: CurrencyAmount | undefined;
2643
+ /**
2644
+ * The sum of the channel balances (online only) that are available to send on this node.
2645
+ *
2646
+ * @deprecated Use `balances` instead.
2647
+ **/
1975
2648
  readonly localBalance?: CurrencyAmount | undefined;
2649
+ /**
2650
+ * The sum of the channel balances that are available to receive on this node.
2651
+ *
2652
+ * @deprecated Use `balances` instead.
2653
+ **/
1976
2654
  readonly remoteBalance?: CurrencyAmount | undefined;
2655
+ /**
2656
+ * The details of the balance of this node on the Bitcoin Network.
2657
+ *
2658
+ * @deprecated Use `balances` instead.
2659
+ **/
1977
2660
  readonly blockchainBalance?: BlockchainBalance | undefined;
2661
+ /** The balances that describe the funds in this node. **/
1978
2662
  readonly balances?: Balances | undefined;
2663
+ /** The private key client is using to sign a GraphQL request which will be verified at server side. **/
1979
2664
  readonly encryptedSigningPrivateKey?: Secret | undefined;
1980
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined, encryptedSigningPrivateKey?: Secret | undefined);
2665
+ constructor(
2666
+ /**
2667
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2668
+ * string.
2669
+ **/
2670
+ id: string,
2671
+ /** The date and time when the entity was first created. **/
2672
+ createdAt: string,
2673
+ /** The date and time when the entity was last updated. **/
2674
+ updatedAt: string,
2675
+ /** The Bitcoin Network this node is deployed in. **/
2676
+ bitcoinNetwork: BitcoinNetwork,
2677
+ /**
2678
+ * The name of this node in the network. It will be the most human-readable option possible, depending
2679
+ * on the data available for this node.
2680
+ **/
2681
+ displayName: string,
2682
+ /** The owner of this LightsparkNode. **/
2683
+ ownerId: string,
2684
+ /**
2685
+ * The utxos of the channels that are connected to this node. This is used in uma flow for
2686
+ * pre-screening.
2687
+ **/
2688
+ umaPrescreeningUtxos: string[],
2689
+ /** The typename of the object **/
2690
+ typename: string,
2691
+ /**
2692
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
2693
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
2694
+ * any time by the node operator.
2695
+ **/
2696
+ alias?: string | undefined,
2697
+ /**
2698
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
2699
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
2700
+ * That color can be changed at any time by the node operator.
2701
+ **/
2702
+ color?: string | undefined,
2703
+ /**
2704
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
2705
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
2706
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
2707
+ **/
2708
+ conductivity?: number | undefined,
2709
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
2710
+ publicKey?: string | undefined,
2711
+ /** The current status of this node. **/
2712
+ status?: LightsparkNodeStatus | undefined,
2713
+ /**
2714
+ * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
2715
+ *
2716
+ * @deprecated Use `balances` instead.
2717
+ **/
2718
+ totalBalance?: CurrencyAmount | undefined,
2719
+ /**
2720
+ * The total sum of the channel balances (online and offline) on this node.
2721
+ *
2722
+ * @deprecated Use `balances` instead.
2723
+ **/
2724
+ totalLocalBalance?: CurrencyAmount | undefined,
2725
+ /**
2726
+ * The sum of the channel balances (online only) that are available to send on this node.
2727
+ *
2728
+ * @deprecated Use `balances` instead.
2729
+ **/
2730
+ localBalance?: CurrencyAmount | undefined,
2731
+ /**
2732
+ * The sum of the channel balances that are available to receive on this node.
2733
+ *
2734
+ * @deprecated Use `balances` instead.
2735
+ **/
2736
+ remoteBalance?: CurrencyAmount | undefined,
2737
+ /**
2738
+ * The details of the balance of this node on the Bitcoin Network.
2739
+ *
2740
+ * @deprecated Use `balances` instead.
2741
+ **/
2742
+ blockchainBalance?: BlockchainBalance | undefined,
2743
+ /** The balances that describe the funds in this node. **/
2744
+ balances?: Balances | undefined,
2745
+ /** The private key client is using to sign a GraphQL request which will be verified at server side. **/
2746
+ encryptedSigningPrivateKey?: Secret | undefined);
1981
2747
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
1982
2748
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
1983
2749
  static getLightsparkNodeWithOSKQuery(id: string): Query<LightsparkNodeWithOSK>;
2750
+ toJson(): {
2751
+ __typename: string;
2752
+ lightspark_node_with_o_s_k_id: string;
2753
+ lightspark_node_with_o_s_k_created_at: string;
2754
+ lightspark_node_with_o_s_k_updated_at: string;
2755
+ lightspark_node_with_o_s_k_alias: string | undefined;
2756
+ lightspark_node_with_o_s_k_bitcoin_network: BitcoinNetwork;
2757
+ lightspark_node_with_o_s_k_color: string | undefined;
2758
+ lightspark_node_with_o_s_k_conductivity: number | undefined;
2759
+ lightspark_node_with_o_s_k_display_name: string;
2760
+ lightspark_node_with_o_s_k_public_key: string | undefined;
2761
+ lightspark_node_with_o_s_k_owner: {
2762
+ id: string;
2763
+ };
2764
+ lightspark_node_with_o_s_k_status: LightsparkNodeStatus | undefined;
2765
+ lightspark_node_with_o_s_k_total_balance: any;
2766
+ lightspark_node_with_o_s_k_total_local_balance: any;
2767
+ lightspark_node_with_o_s_k_local_balance: any;
2768
+ lightspark_node_with_o_s_k_remote_balance: any;
2769
+ lightspark_node_with_o_s_k_blockchain_balance: any;
2770
+ lightspark_node_with_o_s_k_uma_prescreening_utxos: string[];
2771
+ lightspark_node_with_o_s_k_balances: any;
2772
+ lightspark_node_with_o_s_k_encrypted_signing_private_key: any;
2773
+ };
1984
2774
  }
1985
2775
 
1986
2776
  /** This is a Lightspark node with remote signing. **/
1987
- declare class LightsparkNodeWithRemoteSigning implements LightsparkNode {
2777
+ declare class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
2778
+ /**
2779
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2780
+ * string.
2781
+ **/
1988
2782
  readonly id: string;
2783
+ /** The date and time when the entity was first created. **/
1989
2784
  readonly createdAt: string;
2785
+ /** The date and time when the entity was last updated. **/
1990
2786
  readonly updatedAt: string;
2787
+ /** The Bitcoin Network this node is deployed in. **/
1991
2788
  readonly bitcoinNetwork: BitcoinNetwork;
2789
+ /**
2790
+ * The name of this node in the network. It will be the most human-readable option possible, depending
2791
+ * on the data available for this node.
2792
+ **/
1992
2793
  readonly displayName: string;
2794
+ /** The owner of this LightsparkNode. **/
1993
2795
  readonly ownerId: string;
2796
+ /**
2797
+ * The utxos of the channels that are connected to this node. This is used in uma flow for
2798
+ * pre-screening.
2799
+ **/
1994
2800
  readonly umaPrescreeningUtxos: string[];
2801
+ /** The typename of the object **/
1995
2802
  readonly typename: string;
2803
+ /**
2804
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
2805
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
2806
+ * any time by the node operator.
2807
+ **/
1996
2808
  readonly alias?: string | undefined;
2809
+ /**
2810
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
2811
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
2812
+ * That color can be changed at any time by the node operator.
2813
+ **/
1997
2814
  readonly color?: string | undefined;
2815
+ /**
2816
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
2817
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
2818
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
2819
+ **/
1998
2820
  readonly conductivity?: number | undefined;
2821
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
1999
2822
  readonly publicKey?: string | undefined;
2823
+ /** The current status of this node. **/
2000
2824
  readonly status?: LightsparkNodeStatus | undefined;
2825
+ /**
2826
+ * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
2827
+ *
2828
+ * @deprecated Use `balances` instead.
2829
+ **/
2001
2830
  readonly totalBalance?: CurrencyAmount | undefined;
2831
+ /**
2832
+ * The total sum of the channel balances (online and offline) on this node.
2833
+ *
2834
+ * @deprecated Use `balances` instead.
2835
+ **/
2002
2836
  readonly totalLocalBalance?: CurrencyAmount | undefined;
2837
+ /**
2838
+ * The sum of the channel balances (online only) that are available to send on this node.
2839
+ *
2840
+ * @deprecated Use `balances` instead.
2841
+ **/
2003
2842
  readonly localBalance?: CurrencyAmount | undefined;
2843
+ /**
2844
+ * The sum of the channel balances that are available to receive on this node.
2845
+ *
2846
+ * @deprecated Use `balances` instead.
2847
+ **/
2004
2848
  readonly remoteBalance?: CurrencyAmount | undefined;
2849
+ /**
2850
+ * The details of the balance of this node on the Bitcoin Network.
2851
+ *
2852
+ * @deprecated Use `balances` instead.
2853
+ **/
2005
2854
  readonly blockchainBalance?: BlockchainBalance | undefined;
2855
+ /** The balances that describe the funds in this node. **/
2006
2856
  readonly balances?: Balances | undefined;
2007
- constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined);
2857
+ constructor(
2858
+ /**
2859
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2860
+ * string.
2861
+ **/
2862
+ id: string,
2863
+ /** The date and time when the entity was first created. **/
2864
+ createdAt: string,
2865
+ /** The date and time when the entity was last updated. **/
2866
+ updatedAt: string,
2867
+ /** The Bitcoin Network this node is deployed in. **/
2868
+ bitcoinNetwork: BitcoinNetwork,
2869
+ /**
2870
+ * The name of this node in the network. It will be the most human-readable option possible, depending
2871
+ * on the data available for this node.
2872
+ **/
2873
+ displayName: string,
2874
+ /** The owner of this LightsparkNode. **/
2875
+ ownerId: string,
2876
+ /**
2877
+ * The utxos of the channels that are connected to this node. This is used in uma flow for
2878
+ * pre-screening.
2879
+ **/
2880
+ umaPrescreeningUtxos: string[],
2881
+ /** The typename of the object **/
2882
+ typename: string,
2883
+ /**
2884
+ * A name that identifies the node. It has no importance in terms of operating the node, it is just a
2885
+ * way to identify and search for commercial services or popular nodes. This alias can be changed at
2886
+ * any time by the node operator.
2887
+ **/
2888
+ alias?: string | undefined,
2889
+ /**
2890
+ * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
2891
+ * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
2892
+ * That color can be changed at any time by the node operator.
2893
+ **/
2894
+ color?: string | undefined,
2895
+ /**
2896
+ * A summary metric used to capture how well positioned a node is to send, receive, or route
2897
+ * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
2898
+ * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
2899
+ **/
2900
+ conductivity?: number | undefined,
2901
+ /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
2902
+ publicKey?: string | undefined,
2903
+ /** The current status of this node. **/
2904
+ status?: LightsparkNodeStatus | undefined,
2905
+ /**
2906
+ * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
2907
+ *
2908
+ * @deprecated Use `balances` instead.
2909
+ **/
2910
+ totalBalance?: CurrencyAmount | undefined,
2911
+ /**
2912
+ * The total sum of the channel balances (online and offline) on this node.
2913
+ *
2914
+ * @deprecated Use `balances` instead.
2915
+ **/
2916
+ totalLocalBalance?: CurrencyAmount | undefined,
2917
+ /**
2918
+ * The sum of the channel balances (online only) that are available to send on this node.
2919
+ *
2920
+ * @deprecated Use `balances` instead.
2921
+ **/
2922
+ localBalance?: CurrencyAmount | undefined,
2923
+ /**
2924
+ * The sum of the channel balances that are available to receive on this node.
2925
+ *
2926
+ * @deprecated Use `balances` instead.
2927
+ **/
2928
+ remoteBalance?: CurrencyAmount | undefined,
2929
+ /**
2930
+ * The details of the balance of this node on the Bitcoin Network.
2931
+ *
2932
+ * @deprecated Use `balances` instead.
2933
+ **/
2934
+ blockchainBalance?: BlockchainBalance | undefined,
2935
+ /** The balances that describe the funds in this node. **/
2936
+ balances?: Balances | undefined);
2008
2937
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
2009
2938
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
2010
2939
  static getLightsparkNodeWithRemoteSigningQuery(id: string): Query<LightsparkNodeWithRemoteSigning>;
2940
+ toJson(): {
2941
+ __typename: string;
2942
+ lightspark_node_with_remote_signing_id: string;
2943
+ lightspark_node_with_remote_signing_created_at: string;
2944
+ lightspark_node_with_remote_signing_updated_at: string;
2945
+ lightspark_node_with_remote_signing_alias: string | undefined;
2946
+ lightspark_node_with_remote_signing_bitcoin_network: BitcoinNetwork;
2947
+ lightspark_node_with_remote_signing_color: string | undefined;
2948
+ lightspark_node_with_remote_signing_conductivity: number | undefined;
2949
+ lightspark_node_with_remote_signing_display_name: string;
2950
+ lightspark_node_with_remote_signing_public_key: string | undefined;
2951
+ lightspark_node_with_remote_signing_owner: {
2952
+ id: string;
2953
+ };
2954
+ lightspark_node_with_remote_signing_status: LightsparkNodeStatus | undefined;
2955
+ lightspark_node_with_remote_signing_total_balance: any;
2956
+ lightspark_node_with_remote_signing_total_local_balance: any;
2957
+ lightspark_node_with_remote_signing_local_balance: any;
2958
+ lightspark_node_with_remote_signing_remote_balance: any;
2959
+ lightspark_node_with_remote_signing_blockchain_balance: any;
2960
+ lightspark_node_with_remote_signing_uma_prescreening_utxos: string[];
2961
+ lightspark_node_with_remote_signing_balances: any;
2962
+ };
2011
2963
  }
2012
2964
 
2013
- type OutgoingPaymentsForInvoiceQueryInput = {
2965
+ /** This object represents an L1 transaction that occurred on the Bitcoin Network. You can retrieve this object to receive information about a specific on-chain transaction made on the Lightning Network associated with your Lightspark Node. **/
2966
+ interface OnChainTransaction {
2967
+ /**
2968
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2969
+ * string.
2970
+ **/
2971
+ id: string;
2972
+ /** The date and time when this transaction was initiated. **/
2973
+ createdAt: string;
2974
+ /** The date and time when the entity was last updated. **/
2975
+ updatedAt: string;
2976
+ /** The current status of this transaction. **/
2977
+ status: TransactionStatus;
2978
+ /** The amount of money involved in this transaction. **/
2979
+ amount: CurrencyAmount;
2980
+ /**
2981
+ * The height of the block that included this transaction. This will be zero for unconfirmed
2982
+ * transactions.
2983
+ **/
2984
+ blockHeight: number;
2985
+ /** The Bitcoin blockchain addresses this transaction was sent to. **/
2986
+ destinationAddresses: string[];
2987
+ /** The typename of the object **/
2988
+ typename: string;
2989
+ /** The date and time when this transaction was completed or failed. **/
2990
+ resolvedAt?: string | undefined;
2991
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
2992
+ transactionHash?: string | undefined;
2993
+ /**
2994
+ * The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
2995
+ * blockchain.
2996
+ **/
2997
+ fees?: CurrencyAmount | undefined;
2998
+ /**
2999
+ * The hash of the block that included this transaction. This will be null for unconfirmed
3000
+ * transactions.
3001
+ **/
3002
+ blockHash?: string | undefined;
3003
+ /** The number of blockchain confirmations for this transaction in real time. **/
3004
+ numConfirmations?: number | undefined;
3005
+ }
3006
+ declare const getOnChainTransactionQuery: (id: string) => Query<OnChainTransaction>;
3007
+
3008
+ interface OutgoingPaymentsForInvoiceQueryInput {
2014
3009
  /** The encoded invoice that the outgoing payments paid to. **/
2015
3010
  encodedInvoice: string;
2016
3011
  /** An optional filter to only query outgoing payments of given statuses. **/
2017
- statuses?: TransactionStatus[];
2018
- };
3012
+ statuses?: TransactionStatus[] | undefined;
3013
+ }
2019
3014
 
2020
- type OutgoingPaymentsForInvoiceQueryOutput = {
3015
+ interface OutgoingPaymentsForInvoiceQueryOutput {
2021
3016
  payments: OutgoingPayment[];
2022
- };
3017
+ }
2023
3018
 
2024
- type PayInvoiceInput = {
3019
+ interface PayInvoiceInput {
2025
3020
  /** The node from where you want to send the payment. **/
2026
3021
  nodeId: string;
2027
3022
  /** The invoice you want to pay (as defined by the BOLT11 standard). **/
@@ -2034,13 +3029,13 @@ type PayInvoiceInput = {
2034
3029
  * The amount you will pay for this invoice, expressed in msats. It should ONLY be set when the
2035
3030
  * invoice amount is zero.
2036
3031
  **/
2037
- amountMsats?: number;
2038
- };
3032
+ amountMsats?: number | undefined;
3033
+ }
2039
3034
 
2040
- type PayInvoiceOutput = {
3035
+ interface PayInvoiceOutput {
2041
3036
  /** The payment that has been sent. **/
2042
3037
  paymentId: string;
2043
- };
3038
+ }
2044
3039
 
2045
3040
  /** This is an enum indicating the direction of the payment. **/
2046
3041
  declare enum PaymentDirection {
@@ -2053,15 +3048,15 @@ declare enum PaymentDirection {
2053
3048
  RECEIVED = "RECEIVED"
2054
3049
  }
2055
3050
 
2056
- type PayUmaInvoiceInput = {
3051
+ interface PayUmaInvoiceInput {
2057
3052
  nodeId: string;
2058
3053
  encodedInvoice: string;
2059
3054
  timeoutSecs: number;
2060
3055
  maximumFeesMsats: number;
2061
- amountMsats?: number;
2062
- };
3056
+ amountMsats?: number | undefined;
3057
+ }
2063
3058
 
2064
- type RegisterPaymentInput = {
3059
+ interface RegisterPaymentInput {
2065
3060
  /**
2066
3061
  * The compliance provider that is going to screen the node. You need to be a customer of the selected
2067
3062
  * provider and store the API key on the Lightspark account setting page.
@@ -2080,37 +3075,37 @@ type RegisterPaymentInput = {
2080
3075
  nodePubkey: string;
2081
3076
  /** Indicates whether this payment is an OutgoingPayment or an IncomingPayment. **/
2082
3077
  direction: PaymentDirection;
2083
- };
3078
+ }
2084
3079
 
2085
- type RegisterPaymentOutput = {
3080
+ interface RegisterPaymentOutput {
2086
3081
  paymentId: string;
2087
- };
3082
+ }
2088
3083
 
2089
- type ReleaseChannelPerCommitmentSecretInput = {
3084
+ interface ReleaseChannelPerCommitmentSecretInput {
2090
3085
  /** The unique identifier of the channel. **/
2091
3086
  channelId: string;
2092
3087
  /** The per-commitment secret to be released. **/
2093
3088
  perCommitmentSecret: string;
2094
3089
  /** The index associated with the per-commitment secret. **/
2095
3090
  perCommitmentIndex: number;
2096
- };
3091
+ }
2097
3092
 
2098
- type ReleaseChannelPerCommitmentSecretOutput = {
3093
+ interface ReleaseChannelPerCommitmentSecretOutput {
2099
3094
  /** The channel object after the per-commitment secret release operation. **/
2100
3095
  channelId: string;
2101
- };
3096
+ }
2102
3097
 
2103
- type ReleasePaymentPreimageInput = {
3098
+ interface ReleasePaymentPreimageInput {
2104
3099
  /** The invoice the preimage belongs to. **/
2105
3100
  invoiceId: string;
2106
3101
  /** The preimage to release. **/
2107
3102
  paymentPreimage: string;
2108
- };
3103
+ }
2109
3104
 
2110
- type ReleasePaymentPreimageOutput = {
3105
+ interface ReleasePaymentPreimageOutput {
2111
3106
  /** The invoice of the transaction. **/
2112
3107
  invoiceId: string;
2113
- };
3108
+ }
2114
3109
 
2115
3110
  /** This is an enum of the potential sub-event types for Remote Signing webook events. **/
2116
3111
  declare enum RemoteSigningSubEventType {
@@ -2129,7 +3124,7 @@ declare enum RemoteSigningSubEventType {
2129
3124
  REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"
2130
3125
  }
2131
3126
 
2132
- type RequestWithdrawalInput = {
3127
+ interface RequestWithdrawalInput {
2133
3128
  /** The node from which you'd like to make the withdrawal. **/
2134
3129
  nodeId: string;
2135
3130
  /** The bitcoin address where the withdrawal should be sent. **/
@@ -2141,12 +3136,12 @@ type RequestWithdrawalInput = {
2141
3136
  amountSats: number;
2142
3137
  /** The strategy that should be used to withdraw the funds from this node. **/
2143
3138
  withdrawalMode: WithdrawalMode;
2144
- };
3139
+ }
2145
3140
 
2146
- type RequestWithdrawalOutput = {
3141
+ interface RequestWithdrawalOutput {
2147
3142
  /** The request that is created for this withdrawal. **/
2148
3143
  requestId: string;
2149
- };
3144
+ }
2150
3145
 
2151
3146
  /** This is an enum of the potential risk ratings related to a transaction made over the Lightning Network. These risk ratings are returned from the CryptoSanctionScreeningProvider. **/
2152
3147
  declare enum RiskRating {
@@ -2161,7 +3156,7 @@ declare enum RiskRating {
2161
3156
  }
2162
3157
 
2163
3158
  /** This object represents a transaction that was forwarded through a Lightspark node on the Lightning Network, i.e., a routed transaction. You can retrieve this object to receive information about any transaction routed through your Lightspark Node. **/
2164
- type RoutingTransaction = LightningTransaction & Transaction & Entity & {
3159
+ interface RoutingTransaction {
2165
3160
  /**
2166
3161
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2167
3162
  * string.
@@ -2178,26 +3173,26 @@ type RoutingTransaction = LightningTransaction & Transaction & Entity & {
2178
3173
  /** The typename of the object **/
2179
3174
  typename: string;
2180
3175
  /** The date and time when this transaction was completed or failed. **/
2181
- resolvedAt?: string;
3176
+ resolvedAt?: string | undefined;
2182
3177
  /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
2183
- transactionHash?: string;
3178
+ transactionHash?: string | undefined;
2184
3179
  /** If known, the channel this transaction was received from. **/
2185
- incomingChannelId?: string;
3180
+ incomingChannelId?: string | undefined;
2186
3181
  /** If known, the channel this transaction was forwarded to. **/
2187
- outgoingChannelId?: string;
3182
+ outgoingChannelId?: string | undefined;
2188
3183
  /**
2189
3184
  * The fees collected by the node when routing this transaction. We subtract the outgoing amount to
2190
3185
  * the incoming amount to determine how much fees were collected.
2191
3186
  **/
2192
- fees?: CurrencyAmount;
3187
+ fees?: CurrencyAmount | undefined;
2193
3188
  /** If applicable, user-facing error message describing why the routing failed. **/
2194
- failureMessage?: RichText;
3189
+ failureMessage?: RichText | undefined;
2195
3190
  /** If applicable, the reason why the routing failed. **/
2196
- failureReason?: RoutingTransactionFailureReason;
2197
- };
3191
+ failureReason?: RoutingTransactionFailureReason | undefined;
3192
+ }
2198
3193
  declare const getRoutingTransactionQuery: (id: string) => Query<RoutingTransaction>;
2199
3194
 
2200
- type ScreenNodeInput = {
3195
+ interface ScreenNodeInput {
2201
3196
  /**
2202
3197
  * The compliance provider that is going to screen the node. You need to be a customer of the selected
2203
3198
  * provider and store the API key on the Lightspark account setting page.
@@ -2205,13 +3200,13 @@ type ScreenNodeInput = {
2205
3200
  provider: ComplianceProvider;
2206
3201
  /** The public key of the lightning node that needs to be screened. **/
2207
3202
  nodePubkey: string;
2208
- };
3203
+ }
2209
3204
 
2210
- type ScreenNodeOutput = {
3205
+ interface ScreenNodeOutput {
2211
3206
  rating: RiskRating;
2212
- };
3207
+ }
2213
3208
 
2214
- type SendPaymentInput = {
3209
+ interface SendPaymentInput {
2215
3210
  /** The node from where you want to send the payment. **/
2216
3211
  nodeId: string;
2217
3212
  /** The public key of the destination node. **/
@@ -2222,14 +3217,14 @@ type SendPaymentInput = {
2222
3217
  amountMsats: number;
2223
3218
  /** The maximum amount of fees that you want to pay for this payment to be sent, expressed in msats. **/
2224
3219
  maximumFeesMsats: number;
2225
- };
3220
+ }
2226
3221
 
2227
- type SendPaymentOutput = {
3222
+ interface SendPaymentOutput {
2228
3223
  /** The payment that has been sent. **/
2229
3224
  paymentId: string;
2230
- };
3225
+ }
2231
3226
 
2232
- type SetInvoicePaymentHashInput = {
3227
+ interface SetInvoicePaymentHashInput {
2233
3228
  /** The invoice that needs to be updated. **/
2234
3229
  invoiceId: string;
2235
3230
  /** The 32-byte hash of the payment preimage. **/
@@ -2238,14 +3233,14 @@ type SetInvoicePaymentHashInput = {
2238
3233
  * The 32-byte nonce used to generate the invoice preimage if applicable. It will later be included in
2239
3234
  * RELEASE_PAYMENT_PREIMAGE webhook to help recover the raw preimage.
2240
3235
  **/
2241
- preimageNonce?: string;
2242
- };
3236
+ preimageNonce?: string | undefined;
3237
+ }
2243
3238
 
2244
- type SetInvoicePaymentHashOutput = {
3239
+ interface SetInvoicePaymentHashOutput {
2245
3240
  invoiceId: string;
2246
- };
3241
+ }
2247
3242
 
2248
- type Signable = Entity & {
3243
+ interface Signable {
2249
3244
  /**
2250
3245
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2251
3246
  * string.
@@ -2257,51 +3252,51 @@ type Signable = Entity & {
2257
3252
  updatedAt: string;
2258
3253
  /** The typename of the object **/
2259
3254
  typename: string;
2260
- };
3255
+ }
2261
3256
  declare const getSignableQuery: (id: string) => Query<Signable>;
2262
3257
 
2263
- type SignInvoiceInput = {
3258
+ interface SignInvoiceInput {
2264
3259
  /** The unique identifier of the invoice to be signed. **/
2265
3260
  invoiceId: string;
2266
3261
  /** The cryptographic signature for the invoice. **/
2267
3262
  signature: string;
2268
3263
  /** The recovery identifier for the signature. **/
2269
3264
  recoveryId: number;
2270
- };
3265
+ }
2271
3266
 
2272
- type SignInvoiceOutput = {
3267
+ interface SignInvoiceOutput {
2273
3268
  /** The signed invoice object. **/
2274
3269
  invoiceId: string;
2275
- };
3270
+ }
2276
3271
 
2277
- type SignMessagesInput = {
3272
+ interface SignMessagesInput {
2278
3273
  /** The list of the message ids and signatures. **/
2279
3274
  signatures: IdAndSignature[];
2280
- };
3275
+ }
2281
3276
 
2282
- type SignMessagesOutput = {
3277
+ interface SignMessagesOutput {
2283
3278
  /** The list of signed payloads. **/
2284
3279
  signedPayloads: SignablePayload[];
2285
- };
3280
+ }
2286
3281
 
2287
- type UpdateChannelPerCommitmentPointInput = {
3282
+ interface UpdateChannelPerCommitmentPointInput {
2288
3283
  channelId: string;
2289
3284
  perCommitmentPoint: string;
2290
3285
  perCommitmentPointIndex: number;
2291
- };
3286
+ }
2292
3287
 
2293
- type UpdateChannelPerCommitmentPointOutput = {
3288
+ interface UpdateChannelPerCommitmentPointOutput {
2294
3289
  channelId: string;
2295
- };
3290
+ }
2296
3291
 
2297
- type UpdateNodeSharedSecretInput = {
3292
+ interface UpdateNodeSharedSecretInput {
2298
3293
  nodeId: string;
2299
3294
  sharedSecret: string;
2300
- };
3295
+ }
2301
3296
 
2302
- type UpdateNodeSharedSecretOutput = {
3297
+ interface UpdateNodeSharedSecretOutput {
2303
3298
  nodeId: string;
2304
- };
3299
+ }
2305
3300
 
2306
3301
  /** This is an enum of the potential event types that can be associated with your Lightspark wallets. **/
2307
3302
  declare enum WebhookEventType {
@@ -2324,7 +3319,7 @@ declare enum WebhookEventType {
2324
3319
  }
2325
3320
 
2326
3321
  /** This object represents an L1 withdrawal from your Lightspark Node to any Bitcoin wallet. You can retrieve this object to receive detailed information about any L1 withdrawal associated with your Lightspark Node or account. **/
2327
- type Withdrawal = OnChainTransaction & Transaction & Entity & {
3322
+ interface Withdrawal {
2328
3323
  /**
2329
3324
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
2330
3325
  * string.
@@ -2350,22 +3345,22 @@ type Withdrawal = OnChainTransaction & Transaction & Entity & {
2350
3345
  /** The typename of the object **/
2351
3346
  typename: string;
2352
3347
  /** The date and time when this transaction was completed or failed. **/
2353
- resolvedAt?: string;
3348
+ resolvedAt?: string | undefined;
2354
3349
  /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
2355
- transactionHash?: string;
3350
+ transactionHash?: string | undefined;
2356
3351
  /**
2357
3352
  * The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
2358
3353
  * blockchain.
2359
3354
  **/
2360
- fees?: CurrencyAmount;
3355
+ fees?: CurrencyAmount | undefined;
2361
3356
  /**
2362
3357
  * The hash of the block that included this transaction. This will be null for unconfirmed
2363
3358
  * transactions.
2364
3359
  **/
2365
- blockHash?: string;
3360
+ blockHash?: string | undefined;
2366
3361
  /** The number of blockchain confirmations for this transaction in real time. **/
2367
- numConfirmations?: number;
2368
- };
3362
+ numConfirmations?: number | undefined;
3363
+ }
2369
3364
  declare const getWithdrawalQuery: (id: string) => Query<Withdrawal>;
2370
3365
 
2371
- export { IncomingPayment as $, Account as A, Balances as B, Channel as C, CreateTestModeInvoiceInput as D, CreateTestModeInvoiceOutput as E, CreateTestModePaymentInput as F, CreateTestModePaymentoutput as G, CreateUmaInvoiceInput as H, CurrencyAmount as I, CurrencyUnit as J, DeclineToSignMessagesInput as K, LightsparkClient as L, DeclineToSignMessagesOutput as M, DeleteApiTokenInput as N, DeleteApiTokenOutput as O, Deposit as P, getDepositQuery as Q, Entity as R, FeeEstimate as S, FundNodeInput as T, FundNodeOutput as U, GraphNode as V, WebhookEventType as W, Hop as X, getHopQuery as Y, HtlcAttemptFailureCode as Z, IdAndSignature as _, AccountToApiTokensConnection as a, SendPaymentOutput as a$, IncomingPaymentAttempt as a0, getIncomingPaymentAttemptQuery as a1, IncomingPaymentAttemptStatus as a2, IncomingPaymentToAttemptsConnection as a3, Invoice as a4, getInvoiceQuery as a5, InvoiceData as a6, InvoiceType as a7, LightningFeeEstimateForInvoiceInput as a8, LightningFeeEstimateForNodeInput as a9, PaymentDirection as aA, PaymentFailureReason as aB, PaymentRequest as aC, getPaymentRequestQuery as aD, PaymentRequestData as aE, PaymentRequestStatus as aF, PayUmaInvoiceInput as aG, Permission as aH, PostTransactionData as aI, RegisterPaymentInput as aJ, RegisterPaymentOutput as aK, ReleaseChannelPerCommitmentSecretInput as aL, ReleaseChannelPerCommitmentSecretOutput as aM, ReleasePaymentPreimageInput as aN, ReleasePaymentPreimageOutput as aO, RemoteSigningSubEventType as aP, RequestWithdrawalInput as aQ, RequestWithdrawalOutput as aR, RichText as aS, RiskRating as aT, RoutingTransaction as aU, getRoutingTransactionQuery as aV, RoutingTransactionFailureReason as aW, ScreenNodeInput as aX, ScreenNodeOutput as aY, Secret as aZ, SendPaymentInput as a_, LightningFeeEstimateOutput as aa, LightningTransaction as ab, getLightningTransactionQuery as ac, LightsparkNode as ad, LightsparkNodeOwner as ae, getLightsparkNodeOwnerQuery as af, LightsparkNodeStatus as ag, LightsparkNodeToChannelsConnection as ah, LightsparkNodeWithOSK as ai, LightsparkNodeWithRemoteSigning as aj, Node as ak, NodeAddress as al, NodeAddressType as am, NodeToAddressesConnection as an, OnChainTransaction as ao, getOnChainTransactionQuery as ap, OutgoingPayment as aq, OutgoingPaymentAttempt as ar, OutgoingPaymentAttemptStatus as as, OutgoingPaymentAttemptToHopsConnection as at, OutgoingPaymentsForInvoiceQueryInput as au, OutgoingPaymentsForInvoiceQueryOutput as av, OutgoingPaymentToAttemptsConnection as aw, PageInfo as ax, PayInvoiceInput as ay, PayInvoiceOutput as az, AccountToChannelsConnection as b, SetInvoicePaymentHashInput as b0, SetInvoicePaymentHashOutput as b1, Signable as b2, getSignableQuery as b3, SignablePayload as b4, getSignablePayloadQuery as b5, SignablePayloadStatus as b6, SignInvoiceInput as b7, SignInvoiceOutput as b8, SignMessagesInput as b9, SignMessagesOutput as ba, SingleNodeDashboard as bb, Transaction as bc, getTransactionQuery as bd, TransactionFailures as be, TransactionStatus as bf, TransactionType as bg, TransactionUpdate as bh, UpdateChannelPerCommitmentPointInput as bi, UpdateChannelPerCommitmentPointOutput as bj, UpdateNodeSharedSecretInput as bk, UpdateNodeSharedSecretOutput as bl, Wallet as bm, WalletStatus as bn, WalletToPaymentRequestsConnection as bo, WalletToTransactionsConnection as bp, Withdrawal as bq, getWithdrawalQuery as br, WithdrawalMode as bs, WithdrawalRequest as bt, WithdrawalRequestStatus as bu, WithdrawalRequestToChannelClosingTransactionsConnection as bv, WithdrawalRequestToChannelOpeningTransactionsConnection as bw, AccountToNodesConnection as c, AccountToPaymentRequestsConnection as d, AccountToTransactionsConnection as e, AccountToWalletsConnection as f, ApiToken as g, getApiTokenQuery as h, BlockchainBalance as i, ChannelClosingTransaction as j, getChannelClosingTransactionQuery as k, ChannelFees as l, ChannelOpeningTransaction as m, getChannelOpeningTransactionQuery as n, ChannelSnapshot as o, ChannelStatus as p, ChannelToTransactionsConnection as q, ComplianceProvider as r, Connection as s, CreateApiTokenInput as t, CreateApiTokenOutput as u, CreateInvoiceInput as v, CreateInvoiceOutput as w, CreateLnurlInvoiceInput as x, CreateNodeWalletAddressInput as y, CreateNodeWalletAddressOutput as z };
3366
+ export { IncomingPayment as $, Account as A, Balances as B, Channel as C, CreateTestModeInvoiceInput as D, CreateTestModeInvoiceOutput as E, CreateTestModePaymentInput as F, CreateTestModePaymentoutput as G, CreateUmaInvoiceInput as H, CurrencyAmount as I, CurrencyUnit as J, DeclineToSignMessagesInput as K, LightsparkClient as L, DeclineToSignMessagesOutput as M, DeleteApiTokenInput as N, DeleteApiTokenOutput as O, Deposit as P, getDepositQuery as Q, Entity as R, FeeEstimate as S, FundNodeInput as T, FundNodeOutput as U, GraphNode as V, WebhookEventType as W, Hop as X, getHopQuery as Y, HtlcAttemptFailureCode as Z, IdAndSignature as _, AccountToApiTokensConnection as a, Secret as a$, IncomingPaymentAttempt as a0, getIncomingPaymentAttemptQuery as a1, IncomingPaymentAttemptStatus as a2, IncomingPaymentToAttemptsConnection as a3, Invoice as a4, getInvoiceQuery as a5, InvoiceData as a6, InvoiceType as a7, LightningFeeEstimateForInvoiceInput as a8, LightningFeeEstimateForNodeInput as a9, PayInvoiceInput as aA, PayInvoiceOutput as aB, PaymentDirection as aC, PaymentFailureReason as aD, PaymentRequest as aE, getPaymentRequestQuery as aF, PaymentRequestData as aG, PaymentRequestStatus as aH, PayUmaInvoiceInput as aI, Permission as aJ, PostTransactionData as aK, RegisterPaymentInput as aL, RegisterPaymentOutput as aM, ReleaseChannelPerCommitmentSecretInput as aN, ReleaseChannelPerCommitmentSecretOutput as aO, ReleasePaymentPreimageInput as aP, ReleasePaymentPreimageOutput as aQ, RemoteSigningSubEventType as aR, RequestWithdrawalInput as aS, RequestWithdrawalOutput as aT, RichText as aU, RiskRating as aV, RoutingTransaction as aW, getRoutingTransactionQuery as aX, RoutingTransactionFailureReason as aY, ScreenNodeInput as aZ, ScreenNodeOutput as a_, LightningFeeEstimateOutput as aa, LightningTransaction as ab, getLightningTransactionQuery as ac, LightsparkNode as ad, getLightsparkNodeQuery as ae, LightsparkNodeOwner as af, getLightsparkNodeOwnerQuery as ag, LightsparkNodeStatus as ah, LightsparkNodeToChannelsConnection as ai, LightsparkNodeWithOSK as aj, LightsparkNodeWithRemoteSigning as ak, Node as al, getNodeQuery as am, NodeAddress as an, NodeAddressType as ao, NodeToAddressesConnection as ap, OnChainTransaction as aq, getOnChainTransactionQuery as ar, OutgoingPayment as as, OutgoingPaymentAttempt as at, OutgoingPaymentAttemptStatus as au, OutgoingPaymentAttemptToHopsConnection as av, OutgoingPaymentsForInvoiceQueryInput as aw, OutgoingPaymentsForInvoiceQueryOutput as ax, OutgoingPaymentToAttemptsConnection as ay, PageInfo as az, AccountToChannelsConnection as b, SendPaymentInput as b0, SendPaymentOutput as b1, SetInvoicePaymentHashInput as b2, SetInvoicePaymentHashOutput as b3, Signable as b4, getSignableQuery as b5, SignablePayload as b6, getSignablePayloadQuery as b7, SignablePayloadStatus as b8, SignInvoiceInput as b9, SignInvoiceOutput as ba, SignMessagesInput as bb, SignMessagesOutput as bc, SingleNodeDashboard as bd, Transaction as be, getTransactionQuery as bf, TransactionFailures as bg, TransactionStatus as bh, TransactionType as bi, TransactionUpdate as bj, UpdateChannelPerCommitmentPointInput as bk, UpdateChannelPerCommitmentPointOutput as bl, UpdateNodeSharedSecretInput as bm, UpdateNodeSharedSecretOutput as bn, Wallet as bo, WalletStatus as bp, WalletToPaymentRequestsConnection as bq, WalletToTransactionsConnection as br, Withdrawal as bs, getWithdrawalQuery as bt, WithdrawalMode as bu, WithdrawalRequest as bv, WithdrawalRequestStatus as bw, WithdrawalRequestToChannelClosingTransactionsConnection as bx, WithdrawalRequestToChannelOpeningTransactionsConnection as by, AccountToNodesConnection as c, AccountToPaymentRequestsConnection as d, AccountToTransactionsConnection as e, AccountToWalletsConnection as f, ApiToken as g, getApiTokenQuery as h, BlockchainBalance as i, ChannelClosingTransaction as j, getChannelClosingTransactionQuery as k, ChannelFees as l, ChannelOpeningTransaction as m, getChannelOpeningTransactionQuery as n, ChannelSnapshot as o, ChannelStatus as p, ChannelToTransactionsConnection as q, ComplianceProvider as r, Connection as s, CreateApiTokenInput as t, CreateApiTokenOutput as u, CreateInvoiceInput as v, CreateInvoiceOutput as w, CreateLnurlInvoiceInput as x, CreateNodeWalletAddressInput as y, CreateNodeWalletAddressOutput as z };