@lightsparkdev/lightspark-sdk 1.2.0 → 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 (35) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{chunk-5RDIWPBE.js → chunk-D32EWIPX.js} +3 -1
  3. package/dist/env.cjs +3 -1
  4. package/dist/env.d.cts +17 -0
  5. package/dist/env.js +2 -2
  6. package/dist/{index-f040db9f.d.ts → index-5acc6526.d.ts} +717 -14
  7. package/dist/index.cjs +29 -19
  8. package/dist/index.d.cts +41 -0
  9. package/dist/index.d.ts +3 -3
  10. package/dist/index.js +26 -21
  11. package/dist/objects/index.d.cts +4 -0
  12. package/dist/objects/index.d.ts +1 -1
  13. package/dist/objects/index.js +1 -1
  14. package/dist/{text-encoding-MDIPJAHL.js → text-encoding-26SMKBAQ.js} +3 -1
  15. package/package.json +4 -4
  16. package/src/auth/AccountTokenAuthProvider.ts +15 -11
  17. package/src/client.ts +7 -6
  18. package/src/helpers.ts +3 -1
  19. package/src/objects/Account.ts +8 -0
  20. package/src/objects/AccountToChannelsConnection.ts +5 -0
  21. package/src/objects/Channel.ts +31 -0
  22. package/src/objects/GraphNode.ts +28 -0
  23. package/src/objects/IncomingPayment.ts +17 -0
  24. package/src/objects/LightsparkNodeWithOSK.ts +61 -0
  25. package/src/objects/LightsparkNodeWithRemoteSigning.ts +60 -0
  26. package/src/objects/OutgoingPayment.ts +19 -0
  27. package/src/objects/OutgoingPaymentAttempt.ts +26 -0
  28. package/src/objects/Wallet.ts +12 -0
  29. package/src/objects/WithdrawalRequest.ts +17 -0
  30. package/src/tests/integration/constants.ts +13 -0
  31. package/src/tests/integration/general-regtest.test.ts +652 -0
  32. package/src/tests/serialization.test.ts +5 -2
  33. package/src/webhooks.ts +1 -1
  34. package/src/tests/integration/client.test.ts +0 -207
  35. /package/dist/{chunk-NIMBE7W3.js → chunk-BMTV3EA2.js} +0 -0
@@ -279,26 +279,107 @@ declare enum TransactionType {
279
279
 
280
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. **/
281
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
+ **/
282
286
  readonly id: string;
287
+ /** The date and time when the entity was first created. **/
283
288
  readonly createdAt: string;
289
+ /** The date and time when the entity was last updated. **/
284
290
  readonly updatedAt: string;
291
+ /** The local Lightspark node of the channel. **/
285
292
  readonly localNodeId: string;
293
+ /** The typename of the object **/
286
294
  readonly typename: string;
295
+ /** The transaction that funded the channel upon channel opening. **/
287
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
+ **/
288
301
  readonly capacity?: CurrencyAmount | undefined;
302
+ /** The channel balance on the local node. **/
289
303
  readonly localBalance?: CurrencyAmount | undefined;
304
+ /** The channel balance on the local node that is currently allocated to in-progress payments. **/
290
305
  readonly localUnsettledBalance?: CurrencyAmount | undefined;
306
+ /** The channel balance on the remote node. **/
291
307
  readonly remoteBalance?: CurrencyAmount | undefined;
308
+ /** The channel balance on the remote node that is currently allocated to in-progress payments. **/
292
309
  readonly remoteUnsettledBalance?: CurrencyAmount | undefined;
310
+ /** The channel balance that is currently allocated to in-progress payments. **/
293
311
  readonly unsettledBalance?: CurrencyAmount | undefined;
312
+ /** The total balance in this channel, including the channel balance on both local and remote nodes. **/
294
313
  readonly totalBalance?: CurrencyAmount | undefined;
314
+ /** The current status of this channel. **/
295
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
+ **/
296
320
  readonly estimatedForceClosureWaitMinutes?: number | undefined;
321
+ /** The amount to be paid in fees for the current set of commitment transactions. **/
297
322
  readonly commitFee?: CurrencyAmount | undefined;
323
+ /** The fees charged for routing payments through this channel. **/
298
324
  readonly fees?: ChannelFees | undefined;
325
+ /** If known, the remote node of the channel. **/
299
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
+ **/
300
331
  readonly shortChannelId?: string | undefined;
301
- 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);
302
383
  getUptimePercentage(client: LightsparkClient, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<number>;
303
384
  getTransactions(client: LightsparkClient, types?: TransactionType[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<ChannelToTransactionsConnection>;
304
385
  static getChannelQuery(id: string): Query<Channel>;
@@ -332,9 +413,21 @@ declare class Channel implements Entity {
332
413
  }
333
414
 
334
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
+ **/
335
420
  readonly count: number;
421
+ /** The channels for the current page of this connection. **/
336
422
  readonly entities: Channel[];
337
- 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[]);
338
431
  toJson(): {
339
432
  account_to_channels_connection_count: number;
340
433
  account_to_channels_connection_entities: {
@@ -741,16 +834,49 @@ interface WalletToTransactionsConnection {
741
834
 
742
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. **/
743
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
+ **/
744
841
  readonly id: string;
842
+ /** The date and time when the entity was first created. **/
745
843
  readonly createdAt: string;
844
+ /** The date and time when the entity was last updated. **/
746
845
  readonly updatedAt: string;
846
+ /** The unique identifier of this wallet, as provided by the Lightspark Customer during login. **/
747
847
  readonly thirdPartyIdentifier: string;
848
+ /** The status of this wallet. **/
748
849
  readonly status: WalletStatus;
850
+ /** The typename of the object **/
749
851
  readonly typename: string;
852
+ /** The date and time when the wallet user last logged in. **/
750
853
  readonly lastLoginAt?: string | undefined;
854
+ /** The balances that describe the funds in this wallet. **/
751
855
  readonly balances?: Balances | undefined;
856
+ /** The account this wallet belongs to. **/
752
857
  readonly accountId?: string | undefined;
753
- 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);
754
880
  getTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined, statuses?: TransactionStatus[] | undefined, types?: TransactionType[] | undefined): Promise<WalletToTransactionsConnection>;
755
881
  getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<WalletToPaymentRequestsConnection>;
756
882
  getTotalAmountReceived(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
@@ -824,12 +950,33 @@ interface TransactionFailures {
824
950
 
825
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. **/
826
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
+ **/
827
957
  readonly id: string;
958
+ /** The date and time when the entity was first created. **/
828
959
  readonly createdAt: string;
960
+ /** The date and time when the entity was last updated. **/
829
961
  readonly updatedAt: string;
962
+ /** The typename of the object **/
830
963
  readonly typename: string;
964
+ /** The name of this account. **/
831
965
  readonly name?: string | undefined;
832
- 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);
833
980
  getApiTokens(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<AccountToApiTokensConnection>;
834
981
  getBlockchainBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<BlockchainBalance | null>;
835
982
  getConductivity(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<number>;
@@ -957,18 +1104,63 @@ interface PostTransactionData {
957
1104
 
958
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. **/
959
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
+ **/
960
1111
  readonly id: string;
1112
+ /** The date and time when this transaction was initiated. **/
961
1113
  readonly createdAt: string;
1114
+ /** The date and time when the entity was last updated. **/
962
1115
  readonly updatedAt: string;
1116
+ /** The current status of this transaction. **/
963
1117
  readonly status: TransactionStatus;
1118
+ /** The amount of money involved in this transaction. **/
964
1119
  readonly amount: CurrencyAmount;
1120
+ /** The recipient Lightspark node this payment was sent to. **/
965
1121
  readonly destinationId: string;
1122
+ /** The typename of the object **/
966
1123
  readonly typename: string;
1124
+ /** The date and time when this transaction was completed or failed. **/
967
1125
  readonly resolvedAt?: string | undefined;
1126
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
968
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
+ **/
969
1132
  readonly paymentRequestId?: string | undefined;
1133
+ /** The post transaction data which can be used in KYT payment registration. **/
970
1134
  readonly umaPostTransactionData?: PostTransactionData[] | undefined;
971
- 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);
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);
972
1164
  getAttempts(client: LightsparkClient, first?: number | undefined, statuses?: IncomingPaymentAttemptStatus[] | undefined, after?: string | undefined): Promise<IncomingPaymentToAttemptsConnection>;
973
1165
  static getIncomingPaymentQuery(id: string): Query<IncomingPayment>;
974
1166
  toJson(): {
@@ -1196,19 +1388,83 @@ interface OutgoingPaymentAttemptToHopsConnection {
1196
1388
 
1197
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. **/
1198
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
+ **/
1199
1395
  readonly id: string;
1396
+ /** The date and time when the attempt was initiated. **/
1200
1397
  readonly createdAt: string;
1398
+ /** The date and time when the entity was last updated. **/
1201
1399
  readonly updatedAt: string;
1400
+ /** The status of an outgoing payment attempt. **/
1202
1401
  readonly status: OutgoingPaymentAttemptStatus;
1402
+ /** The outgoing payment for this attempt. **/
1203
1403
  readonly outgoingPaymentId: string;
1404
+ /** The typename of the object **/
1204
1405
  readonly typename: string;
1406
+ /** If the payment attempt failed, then this contains the Bolt #4 failure code. **/
1205
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
+ **/
1206
1412
  readonly failureSourceIndex?: number | undefined;
1413
+ /** The time the outgoing payment attempt failed or succeeded. **/
1207
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
+ **/
1208
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
+ **/
1209
1426
  readonly fees?: CurrencyAmount | undefined;
1427
+ /** The channel snapshot at the time the outgoing payment attempt was made. **/
1210
1428
  readonly channelSnapshot?: ChannelSnapshot | undefined;
1211
- 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);
1212
1468
  getHops(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentAttemptToHopsConnection>;
1213
1469
  static getOutgoingPaymentAttemptQuery(id: string): Query<OutgoingPaymentAttempt>;
1214
1470
  toJson(): {
@@ -1250,23 +1506,77 @@ interface RichText {
1250
1506
 
1251
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. **/
1252
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
+ **/
1253
1513
  readonly id: string;
1514
+ /** The date and time when this transaction was initiated. **/
1254
1515
  readonly createdAt: string;
1516
+ /** The date and time when the entity was last updated. **/
1255
1517
  readonly updatedAt: string;
1518
+ /** The current status of this transaction. **/
1256
1519
  readonly status: TransactionStatus;
1520
+ /** The amount of money involved in this transaction. **/
1257
1521
  readonly amount: CurrencyAmount;
1522
+ /** The Lightspark node this payment originated from. **/
1258
1523
  readonly originId: string;
1524
+ /** The typename of the object **/
1259
1525
  readonly typename: string;
1526
+ /** The date and time when this transaction was completed or failed. **/
1260
1527
  readonly resolvedAt?: string | undefined;
1528
+ /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
1261
1529
  readonly transactionHash?: string | undefined;
1530
+ /** If known, the final recipient node this payment was sent to. **/
1262
1531
  readonly destinationId?: string | undefined;
1532
+ /** The fees paid by the sender node to send the payment. **/
1263
1533
  readonly fees?: CurrencyAmount | undefined;
1534
+ /** The data of the payment request that was paid by this transaction, if known. **/
1264
1535
  readonly paymentRequestData?: PaymentRequestData | undefined;
1536
+ /** If applicable, the reason why the payment failed. **/
1265
1537
  readonly failureReason?: PaymentFailureReason | undefined;
1538
+ /** If applicable, user-facing error message describing why the payment failed. **/
1266
1539
  readonly failureMessage?: RichText | undefined;
1540
+ /** The post transaction data which can be used in KYT payment registration. **/
1267
1541
  readonly umaPostTransactionData?: PostTransactionData[] | undefined;
1542
+ /** The preimage of the payment. **/
1268
1543
  readonly paymentPreimage?: string | undefined;
1269
- 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);
1270
1580
  getAttempts(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentToAttemptsConnection>;
1271
1581
  static getOutgoingPaymentQuery(id: string): Query<OutgoingPayment>;
1272
1582
  toJson(): {
@@ -1478,18 +1788,63 @@ interface WithdrawalRequestToChannelOpeningTransactionsConnection {
1478
1788
 
1479
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. **/
1480
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
+ **/
1481
1795
  readonly id: string;
1796
+ /** The date and time when the entity was first created. **/
1482
1797
  readonly createdAt: string;
1798
+ /** The date and time when the entity was last updated. **/
1483
1799
  readonly updatedAt: string;
1800
+ /** The amount of money that should be withdrawn in this request. **/
1484
1801
  readonly amount: CurrencyAmount;
1802
+ /** The bitcoin address where the funds should be sent. **/
1485
1803
  readonly bitcoinAddress: string;
1804
+ /** The strategy that should be used to withdraw the funds from the account. **/
1486
1805
  readonly withdrawalMode: WithdrawalMode;
1806
+ /** The current status of this withdrawal request. **/
1487
1807
  readonly status: WithdrawalRequestStatus;
1808
+ /** The typename of the object **/
1488
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
+ **/
1489
1814
  readonly estimatedAmount?: CurrencyAmount | undefined;
1815
+ /** The time at which this request was completed. **/
1490
1816
  readonly completedAt?: string | undefined;
1817
+ /** The withdrawal transaction that has been generated by this request. **/
1491
1818
  readonly withdrawalId?: string | undefined;
1492
- 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);
1493
1848
  getChannelClosingTransactions(client: LightsparkClient, first?: number | undefined): Promise<WithdrawalRequestToChannelClosingTransactionsConnection>;
1494
1849
  getChannelOpeningTransactions(client: LightsparkClient, first?: number | undefined): Promise<WithdrawalRequestToChannelOpeningTransactionsConnection>;
1495
1850
  static getWithdrawalRequestQuery(id: string): Query<WithdrawalRequest>;
@@ -1565,7 +1920,8 @@ declare class LightsparkClient {
1565
1920
  /**
1566
1921
  * Constructs a new LightsparkClient.
1567
1922
  *
1568
- * @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
1569
1925
  * use, you should use the `AccountTokenAuthProvider`.
1570
1926
  * @param serverUrl The base URL of the server to connect to. Defaults to lightspark production.
1571
1927
  * @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
@@ -1594,7 +1950,7 @@ declare class LightsparkClient {
1594
1950
  *
1595
1951
  * @param authProvider
1596
1952
  */
1597
- setAuthProvider(authProvider: AuthProvider): Promise<void>;
1953
+ setAuthProvider(authProvider: AuthProvider): void;
1598
1954
  /**
1599
1955
  * @returns Whether or not the client is authorized. This is useful for determining if the user is logged in or not.
1600
1956
  */
@@ -1777,7 +2133,7 @@ declare class LightsparkClient {
1777
2133
  * @param transactionId The ID of the transaction to wait for
1778
2134
  * @param pollTimeoutSecs The timeout in seconds that we will wait before throwing an exception
1779
2135
  */
1780
- waitForTransactionComplete(transactionId: string, pollTimeoutSecs?: number): Promise<Transaction>;
2136
+ waitForTransactionComplete<T = Transaction>(transactionId: string, pollTimeoutSecs?: number): Promise<T>;
1781
2137
  /**
1782
2138
  * Sends a payment directly to a node on the Lightning Network through the public key of the node without an invoice.
1783
2139
  *
@@ -2092,17 +2448,83 @@ interface FundNodeOutput {
2092
2448
 
2093
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. **/
2094
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
+ **/
2095
2455
  readonly id: string;
2456
+ /** The date and time when the entity was first created. **/
2096
2457
  readonly createdAt: string;
2458
+ /** The date and time when the entity was last updated. **/
2097
2459
  readonly updatedAt: string;
2460
+ /** The Bitcoin Network this node is deployed in. **/
2098
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
+ **/
2099
2466
  readonly displayName: string;
2467
+ /** The typename of the object **/
2100
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
+ **/
2101
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
+ **/
2102
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
+ **/
2103
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. **/
2104
2488
  readonly publicKey?: string | undefined;
2105
- 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);
2106
2528
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
2107
2529
  static getGraphNodeQuery(id: string): Query<GraphNode>;
2108
2530
  toJson(): {
@@ -2159,27 +2581,169 @@ interface Secret {
2159
2581
 
2160
2582
  /** This is a Lightspark node with OSK. **/
2161
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
+ **/
2162
2588
  readonly id: string;
2589
+ /** The date and time when the entity was first created. **/
2163
2590
  readonly createdAt: string;
2591
+ /** The date and time when the entity was last updated. **/
2164
2592
  readonly updatedAt: string;
2593
+ /** The Bitcoin Network this node is deployed in. **/
2165
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
+ **/
2166
2599
  readonly displayName: string;
2600
+ /** The owner of this LightsparkNode. **/
2167
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
+ **/
2168
2606
  readonly umaPrescreeningUtxos: string[];
2607
+ /** The typename of the object **/
2169
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
+ **/
2170
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
+ **/
2171
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
+ **/
2172
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. **/
2173
2628
  readonly publicKey?: string | undefined;
2629
+ /** The current status of this node. **/
2174
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
+ **/
2175
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
+ **/
2176
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
+ **/
2177
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
+ **/
2178
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
+ **/
2179
2660
  readonly blockchainBalance?: BlockchainBalance | undefined;
2661
+ /** The balances that describe the funds in this node. **/
2180
2662
  readonly balances?: Balances | undefined;
2663
+ /** The private key client is using to sign a GraphQL request which will be verified at server side. **/
2181
2664
  readonly encryptedSigningPrivateKey?: Secret | undefined;
2182
- 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);
2183
2747
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
2184
2748
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
2185
2749
  static getLightsparkNodeWithOSKQuery(id: string): Query<LightsparkNodeWithOSK>;
@@ -2211,26 +2775,165 @@ declare class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
2211
2775
 
2212
2776
  /** This is a Lightspark node with remote signing. **/
2213
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
+ **/
2214
2782
  readonly id: string;
2783
+ /** The date and time when the entity was first created. **/
2215
2784
  readonly createdAt: string;
2785
+ /** The date and time when the entity was last updated. **/
2216
2786
  readonly updatedAt: string;
2787
+ /** The Bitcoin Network this node is deployed in. **/
2217
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
+ **/
2218
2793
  readonly displayName: string;
2794
+ /** The owner of this LightsparkNode. **/
2219
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
+ **/
2220
2800
  readonly umaPrescreeningUtxos: string[];
2801
+ /** The typename of the object **/
2221
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
+ **/
2222
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
+ **/
2223
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
+ **/
2224
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. **/
2225
2822
  readonly publicKey?: string | undefined;
2823
+ /** The current status of this node. **/
2226
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
+ **/
2227
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
+ **/
2228
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
+ **/
2229
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
+ **/
2230
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
+ **/
2231
2854
  readonly blockchainBalance?: BlockchainBalance | undefined;
2855
+ /** The balances that describe the funds in this node. **/
2232
2856
  readonly balances?: Balances | undefined;
2233
- 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);
2234
2937
  getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
2235
2938
  getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
2236
2939
  static getLightsparkNodeWithRemoteSigningQuery(id: string): Query<LightsparkNodeWithRemoteSigning>;