@lightsparkdev/lightspark-sdk 1.2.2 → 1.2.3

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 (117) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{BitcoinNetwork-a816c0be.d.ts → BitcoinNetwork-37e9f091.d.ts} +8 -3
  3. package/dist/env.d.cts +1 -1
  4. package/dist/env.d.ts +1 -1
  5. package/dist/{index-eb604025.d.ts → index-449c9f58.d.ts} +1461 -675
  6. package/dist/index.cjs +341 -307
  7. package/dist/index.d.cts +3 -3
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.js +323 -289
  10. package/dist/objects/index.d.cts +2 -2
  11. package/dist/objects/index.d.ts +2 -2
  12. package/dist/objects/index.js +1 -1
  13. package/package.json +4 -4
  14. package/src/NodeKeyLoaderCache.ts +4 -3
  15. package/src/SigningKeyLoader.ts +12 -7
  16. package/src/client.ts +99 -65
  17. package/src/env.ts +3 -1
  18. package/src/objects/Account.ts +7 -3
  19. package/src/objects/AccountToApiTokensConnection.ts +7 -3
  20. package/src/objects/AccountToChannelsConnection.ts +3 -2
  21. package/src/objects/AccountToNodesConnection.ts +7 -3
  22. package/src/objects/AccountToPaymentRequestsConnection.ts +7 -3
  23. package/src/objects/AccountToTransactionsConnection.ts +13 -9
  24. package/src/objects/AccountToWalletsConnection.ts +7 -3
  25. package/src/objects/ApiToken.ts +13 -7
  26. package/src/objects/Balances.ts +22 -12
  27. package/src/objects/BitcoinNetwork.ts +8 -3
  28. package/src/objects/BlockchainBalance.ts +4 -1
  29. package/src/objects/Channel.ts +37 -14
  30. package/src/objects/ChannelClosingTransaction.ts +22 -11
  31. package/src/objects/ChannelFees.ts +4 -1
  32. package/src/objects/ChannelOpeningTransaction.ts +22 -11
  33. package/src/objects/ChannelStatus.ts +33 -8
  34. package/src/objects/ChannelToTransactionsConnection.ts +9 -8
  35. package/src/objects/ComplianceProvider.ts +3 -2
  36. package/src/objects/Connection.ts +7 -3
  37. package/src/objects/CreateApiTokenInput.ts +4 -1
  38. package/src/objects/CreateApiTokenOutput.ts +3 -3
  39. package/src/objects/CreateLnurlInvoiceInput.ts +3 -2
  40. package/src/objects/CreateTestModePaymentInput.ts +2 -2
  41. package/src/objects/CreateTestModePaymentoutput.ts +5 -1
  42. package/src/objects/CurrencyAmount.ts +6 -4
  43. package/src/objects/CurrencyUnit.ts +36 -9
  44. package/src/objects/Deposit.ts +22 -11
  45. package/src/objects/Entity.ts +8 -3
  46. package/src/objects/FeeEstimate.ts +5 -1
  47. package/src/objects/GraphNode.ts +30 -14
  48. package/src/objects/Hop.ts +12 -4
  49. package/src/objects/HtlcAttemptFailureCode.ts +7 -3
  50. package/src/objects/IncentivesIneligibilityReason.ts +33 -9
  51. package/src/objects/IncentivesStatus.ts +14 -4
  52. package/src/objects/IncomingPayment.ts +18 -7
  53. package/src/objects/IncomingPaymentAttempt.ts +8 -3
  54. package/src/objects/IncomingPaymentAttemptStatus.ts +7 -3
  55. package/src/objects/IncomingPaymentToAttemptsConnection.ts +7 -3
  56. package/src/objects/Invoice.ts +2 -2
  57. package/src/objects/InvoiceData.ts +7 -3
  58. package/src/objects/InvoiceType.ts +3 -2
  59. package/src/objects/LightningFeeEstimateForInvoiceInput.ts +2 -2
  60. package/src/objects/LightningTransaction.ts +12 -4
  61. package/src/objects/LightsparkNode.ts +33 -18
  62. package/src/objects/LightsparkNodeOwner.ts +2 -2
  63. package/src/objects/LightsparkNodeStatus.ts +3 -2
  64. package/src/objects/LightsparkNodeToChannelsConnection.ts +7 -3
  65. package/src/objects/LightsparkNodeWithOSK.ts +35 -19
  66. package/src/objects/LightsparkNodeWithRemoteSigning.ts +31 -18
  67. package/src/objects/Node.ts +28 -14
  68. package/src/objects/NodeAddressType.ts +7 -3
  69. package/src/objects/NodeToAddressesConnection.ts +7 -3
  70. package/src/objects/OnChainTransaction.ts +23 -11
  71. package/src/objects/OutgoingPayment.ts +24 -7
  72. package/src/objects/OutgoingPaymentAttempt.ts +28 -13
  73. package/src/objects/OutgoingPaymentAttemptStatus.ts +7 -3
  74. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +12 -4
  75. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +7 -3
  76. package/src/objects/PageInfo.ts +6 -1
  77. package/src/objects/PayInvoiceInput.ts +6 -3
  78. package/src/objects/PaymentDirection.ts +3 -2
  79. package/src/objects/PaymentFailureReason.ts +7 -3
  80. package/src/objects/PaymentRequest.ts +8 -3
  81. package/src/objects/PaymentRequestData.ts +5 -1
  82. package/src/objects/PaymentRequestStatus.ts +7 -3
  83. package/src/objects/Permission.ts +7 -3
  84. package/src/objects/PostTransactionData.ts +6 -3
  85. package/src/objects/RegionCode.ts +43 -12
  86. package/src/objects/RegisterPaymentInput.ts +12 -7
  87. package/src/objects/RemoteSigningSubEventType.ts +7 -3
  88. package/src/objects/RequestWithdrawalInput.ts +2 -2
  89. package/src/objects/RiskRating.ts +8 -3
  90. package/src/objects/RoutingTransaction.ts +20 -7
  91. package/src/objects/RoutingTransactionFailureReason.ts +8 -3
  92. package/src/objects/ScreenNodeInput.ts +3 -2
  93. package/src/objects/SendPaymentInput.ts +4 -1
  94. package/src/objects/SetInvoicePaymentHashInput.ts +3 -2
  95. package/src/objects/Signable.ts +2 -2
  96. package/src/objects/SignablePayload.ts +6 -3
  97. package/src/objects/SignablePayloadStatus.ts +3 -2
  98. package/src/objects/Transaction.ts +14 -4
  99. package/src/objects/TransactionFailures.ts +4 -1
  100. package/src/objects/TransactionStatus.ts +16 -5
  101. package/src/objects/TransactionType.ts +30 -8
  102. package/src/objects/TransactionUpdate.ts +6 -3
  103. package/src/objects/UmaInvitation.ts +10 -4
  104. package/src/objects/Wallet.ts +13 -4
  105. package/src/objects/WalletStatus.ts +36 -9
  106. package/src/objects/WalletToPaymentRequestsConnection.ts +7 -3
  107. package/src/objects/WalletToTransactionsConnection.ts +7 -3
  108. package/src/objects/WebhookEventType.ts +7 -3
  109. package/src/objects/Withdrawal.ts +22 -11
  110. package/src/objects/WithdrawalMode.ts +7 -3
  111. package/src/objects/WithdrawalRequest.ts +15 -6
  112. package/src/objects/WithdrawalRequestStatus.ts +3 -2
  113. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +11 -4
  114. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +11 -4
  115. package/src/objects/index.ts +6 -6
  116. package/src/tests/integration/general-regtest.test.ts +1 -1
  117. /package/dist/{chunk-GLL4KTUT.js → chunk-NCPWHRFO.js} +0 -0
@@ -24,11 +24,15 @@ import type NodeAddressType from "./NodeAddressType.js";
24
24
  import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
25
25
  import { SecretFromJson, SecretToJson } from "./Secret.js";
26
26
 
27
- /** 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. **/
27
+ /**
28
+ * This is an object representing a node managed by Lightspark and owned by the
29
+ * current connected account. This object contains information about the node’s
30
+ * configuration, state, and metadata. *
31
+ */
28
32
  interface LightsparkNode {
29
33
  /**
30
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
31
- * string.
34
+ * The unique identifier of this entity across all Lightspark systems.
35
+ * Should be treated as an opaque string.
32
36
  **/
33
37
  id: string;
34
38
 
@@ -42,8 +46,9 @@ interface LightsparkNode {
42
46
  bitcoinNetwork: BitcoinNetwork;
43
47
 
44
48
  /**
45
- * The name of this node in the network. It will be the most human-readable option possible, depending
46
- * on the data available for this node.
49
+ * The name of this node in the network.
50
+ * It will be the most human-readable option possible,
51
+ * depending on the data available for this node.
47
52
  **/
48
53
  displayName: string;
49
54
 
@@ -51,8 +56,8 @@ interface LightsparkNode {
51
56
  ownerId: string;
52
57
 
53
58
  /**
54
- * The utxos of the channels that are connected to this node. This is used in uma flow for
55
- * pre-screening.
59
+ * The utxos of the channels that are connected to this node.
60
+ * This is used in uma flow for pre-screening.
56
61
  **/
57
62
  umaPrescreeningUtxos: string[];
58
63
 
@@ -60,34 +65,43 @@ interface LightsparkNode {
60
65
  typename: string;
61
66
 
62
67
  /**
63
- * A name that identifies the node. It has no importance in terms of operating the node, it is just a
64
- * way to identify and search for commercial services or popular nodes. This alias can be changed at
65
- * any time by the node operator.
68
+ * A name that identifies the node. It has no importance in terms of
69
+ * operating the node, it is just a way to identify and search for commercial
70
+ * services or popular nodes. This alias can be changed at any time by the
71
+ * node operator.
66
72
  **/
67
73
  alias?: string | undefined;
68
74
 
69
75
  /**
70
- * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
71
- * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
76
+ * A hexadecimal string that describes a color. For example "#000000" is
77
+ * black, "#FFFFFF" is white. It has no importance in terms of operating the
78
+ * node,
79
+ * it is just a way to visually differentiate nodes.
72
80
  * That color can be changed at any time by the node operator.
73
81
  **/
74
82
  color?: string | undefined;
75
83
 
76
84
  /**
77
- * A summary metric used to capture how well positioned a node is to send, receive, or route
78
- * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
79
- * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
85
+ * A summary metric used to capture how well positioned a node is to send,
86
+ * receive, or route transactions efficiently.
87
+ * Maximizing a node's conductivity helps a node’s transactions to be capital
88
+ * efficient. The value is an integer ranging between 0 and 10 (bounds
89
+ * included).
80
90
  **/
81
91
  conductivity?: number | undefined;
82
92
 
83
- /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
93
+ /**
94
+ * The public key of this node. It acts as a unique identifier of this node
95
+ * in the Lightning Network. *
96
+ */
84
97
  publicKey?: string | undefined;
85
98
 
86
99
  /** The current status of this node. **/
87
100
  status?: LightsparkNodeStatus | undefined;
88
101
 
89
102
  /**
90
- * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
103
+ * The sum of the balance on the Bitcoin Network, channel balances,
104
+ * and commit fees on this node.
91
105
  *
92
106
  * @deprecated Use `balances` instead.
93
107
  **/
@@ -101,7 +115,8 @@ interface LightsparkNode {
101
115
  totalLocalBalance?: CurrencyAmount | undefined;
102
116
 
103
117
  /**
104
- * The sum of the channel balances (online only) that are available to send on this node.
118
+ * The sum of the channel balances (online only) that are available to send
119
+ * on this node.
105
120
  *
106
121
  * @deprecated Use `balances` instead.
107
122
  **/
@@ -9,8 +9,8 @@ import WalletStatus from "./WalletStatus.js";
9
9
  /** This is an object representing the owner of a LightsparkNode. **/
10
10
  interface LightsparkNodeOwner {
11
11
  /**
12
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
13
- * string.
12
+ * The unique identifier of this entity across all Lightspark systems.
13
+ * Should be treated as an opaque string.
14
14
  **/
15
15
  id: string;
16
16
 
@@ -2,8 +2,9 @@
2
2
 
3
3
  export enum LightsparkNodeStatus {
4
4
  /**
5
- * This is an enum value that represents values that could be added in the future.
6
- * Clients should support unknown values as more of them could be added without notice.
5
+ * This is an enum value that represents values that could be added in the
6
+ * future. Clients should support unknown values as more of them could be
7
+ * added without notice.
7
8
  */
8
9
  FUTURE_VALUE = "FUTURE_VALUE",
9
10
 
@@ -7,12 +7,16 @@ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
7
7
 
8
8
  interface LightsparkNodeToChannelsConnection {
9
9
  /**
10
- * The total count of objects in this connection, using the current filters. It is different from the
11
- * number of objects returned in the current page (in the `entities` field).
10
+ * The total count of objects in this connection, using the current filters.
11
+ * It is different from the number of objects returned in the current page
12
+ * (in the `entities` field).
12
13
  **/
13
14
  count: number;
14
15
 
15
- /** An object that holds pagination information about the objects in this connection. **/
16
+ /**
17
+ * An object that holds pagination information about the objects in this
18
+ * connection. *
19
+ */
16
20
  pageInfo: PageInfo;
17
21
 
18
22
  /** The channels for the current page of this connection. **/
@@ -33,8 +33,8 @@ import { SecretFromJson, SecretToJson } from "./Secret.js";
33
33
  class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
34
34
  constructor(
35
35
  /**
36
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
37
- * string.
36
+ * The unique identifier of this entity across all Lightspark systems.
37
+ * Should be treated as an opaque string.
38
38
  **/
39
39
  public readonly id: string,
40
40
  /** The date and time when the entity was first created. **/
@@ -44,43 +44,54 @@ class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
44
44
  /** The Bitcoin Network this node is deployed in. **/
45
45
  public readonly bitcoinNetwork: BitcoinNetwork,
46
46
  /**
47
- * The name of this node in the network. It will be the most human-readable option possible, depending
48
- * on the data available for this node.
47
+ * The name of this node in the network.
48
+ * It will be the most human-readable option possible,
49
+ * depending on the data available for this node.
49
50
  **/
50
51
  public readonly displayName: string,
51
52
  /** The owner of this LightsparkNode. **/
52
53
  public readonly ownerId: string,
53
54
  /**
54
- * The utxos of the channels that are connected to this node. This is used in uma flow for
55
- * pre-screening.
55
+ * The utxos of the channels that are connected to this node.
56
+ * This is used in uma flow for pre-screening.
56
57
  **/
57
58
  public readonly umaPrescreeningUtxos: string[],
58
59
  /** The typename of the object **/
59
60
  public readonly typename: string,
60
61
  /**
61
- * A name that identifies the node. It has no importance in terms of operating the node, it is just a
62
- * way to identify and search for commercial services or popular nodes. This alias can be changed at
63
- * any time by the node operator.
62
+ * A name that identifies the node.
63
+ * It has no importance in terms of operating the node,
64
+ * it is just a way to identify and search for commercial services or
65
+ * popular nodes. This alias can be changed at any time by the node
66
+ * operator.
64
67
  **/
65
68
  public readonly alias?: string | undefined,
66
69
  /**
67
- * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
68
- * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
70
+ * A hexadecimal string that describes a color. For example "#000000" is
71
+ * black, "#FFFFFF" is white. It has no importance in terms of operating
72
+ * the node,
73
+ * it is just a way to visually differentiate nodes.
69
74
  * That color can be changed at any time by the node operator.
70
75
  **/
71
76
  public readonly color?: string | undefined,
72
77
  /**
73
- * A summary metric used to capture how well positioned a node is to send, receive, or route
74
- * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
75
- * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
78
+ * A summary metric used to capture how well positioned a node is to send,
79
+ * receive, or route transactions efficiently.
80
+ * Maximizing a node's conductivity helps a node’s transactions to be
81
+ * capital efficient. The value is an integer ranging between 0 and 10
82
+ * (bounds included).
76
83
  **/
77
84
  public readonly conductivity?: number | undefined,
78
- /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
85
+ /**
86
+ * The public key of this node. It acts as a unique identifier of this node
87
+ * in the Lightning Network. *
88
+ */
79
89
  public readonly publicKey?: string | undefined,
80
90
  /** The current status of this node. **/
81
91
  public readonly status?: LightsparkNodeStatus | undefined,
82
92
  /**
83
- * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
93
+ * The sum of the balance on the Bitcoin Network, channel balances,
94
+ * and commit fees on this node.
84
95
  *
85
96
  * @deprecated Use `balances` instead.
86
97
  **/
@@ -92,13 +103,15 @@ class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
92
103
  **/
93
104
  public readonly totalLocalBalance?: CurrencyAmount | undefined,
94
105
  /**
95
- * The sum of the channel balances (online only) that are available to send on this node.
106
+ * The sum of the channel balances (online only) that are available to send
107
+ * on this node.
96
108
  *
97
109
  * @deprecated Use `balances` instead.
98
110
  **/
99
111
  public readonly localBalance?: CurrencyAmount | undefined,
100
112
  /**
101
- * The sum of the channel balances that are available to receive on this node.
113
+ * The sum of the channel balances that are available to receive on this
114
+ * node.
102
115
  *
103
116
  * @deprecated Use `balances` instead.
104
117
  **/
@@ -111,7 +124,10 @@ class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
111
124
  public readonly blockchainBalance?: BlockchainBalance | undefined,
112
125
  /** The balances that describe the funds in this node. **/
113
126
  public readonly balances?: Balances | undefined,
114
- /** The private key client is using to sign a GraphQL request which will be verified at server side. **/
127
+ /**
128
+ * The private key client is using to sign a GraphQL request which will be
129
+ * verified at server side. *
130
+ */
115
131
  public readonly encryptedSigningPrivateKey?: Secret | undefined,
116
132
  ) {
117
133
  autoBind(this);
@@ -31,8 +31,8 @@ import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.j
31
31
  class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
32
32
  constructor(
33
33
  /**
34
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
35
- * string.
34
+ * The unique identifier of this entity across all Lightspark systems.
35
+ * Should be treated as an opaque string.
36
36
  **/
37
37
  public readonly id: string,
38
38
  /** The date and time when the entity was first created. **/
@@ -42,43 +42,54 @@ class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
42
42
  /** The Bitcoin Network this node is deployed in. **/
43
43
  public readonly bitcoinNetwork: BitcoinNetwork,
44
44
  /**
45
- * The name of this node in the network. It will be the most human-readable option possible, depending
46
- * on the data available for this node.
45
+ * The name of this node in the network.
46
+ * It will be the most human-readable option possible,
47
+ * depending on the data available for this node.
47
48
  **/
48
49
  public readonly displayName: string,
49
50
  /** The owner of this LightsparkNode. **/
50
51
  public readonly ownerId: string,
51
52
  /**
52
- * The utxos of the channels that are connected to this node. This is used in uma flow for
53
- * pre-screening.
53
+ * The utxos of the channels that are connected to this node.
54
+ * This is used in uma flow for pre-screening.
54
55
  **/
55
56
  public readonly umaPrescreeningUtxos: string[],
56
57
  /** The typename of the object **/
57
58
  public readonly typename: string,
58
59
  /**
59
- * A name that identifies the node. It has no importance in terms of operating the node, it is just a
60
- * way to identify and search for commercial services or popular nodes. This alias can be changed at
61
- * any time by the node operator.
60
+ * A name that identifies the node.
61
+ * It has no importance in terms of operating the node,
62
+ * it is just a way to identify and search for commercial services or
63
+ * popular nodes. This alias can be changed at any time by the node
64
+ * operator.
62
65
  **/
63
66
  public readonly alias?: string | undefined,
64
67
  /**
65
- * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
66
- * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
68
+ * A hexadecimal string that describes a color. For example "#000000" is
69
+ * black, "#FFFFFF" is white. It has no importance in terms of operating
70
+ * the node,
71
+ * it is just a way to visually differentiate nodes.
67
72
  * That color can be changed at any time by the node operator.
68
73
  **/
69
74
  public readonly color?: string | undefined,
70
75
  /**
71
- * A summary metric used to capture how well positioned a node is to send, receive, or route
72
- * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
73
- * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
76
+ * A summary metric used to capture how well positioned a node is to send,
77
+ * receive, or route transactions efficiently.
78
+ * Maximizing a node's conductivity helps a node’s transactions to be
79
+ * capital efficient. The value is an integer ranging between 0 and 10
80
+ * (bounds included).
74
81
  **/
75
82
  public readonly conductivity?: number | undefined,
76
- /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
83
+ /**
84
+ * The public key of this node. It acts as a unique identifier of this node
85
+ * in the Lightning Network. *
86
+ */
77
87
  public readonly publicKey?: string | undefined,
78
88
  /** The current status of this node. **/
79
89
  public readonly status?: LightsparkNodeStatus | undefined,
80
90
  /**
81
- * The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
91
+ * The sum of the balance on the Bitcoin Network, channel balances,
92
+ * and commit fees on this node.
82
93
  *
83
94
  * @deprecated Use `balances` instead.
84
95
  **/
@@ -90,13 +101,15 @@ class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
90
101
  **/
91
102
  public readonly totalLocalBalance?: CurrencyAmount | undefined,
92
103
  /**
93
- * The sum of the channel balances (online only) that are available to send on this node.
104
+ * The sum of the channel balances (online only) that are available to send
105
+ * on this node.
94
106
  *
95
107
  * @deprecated Use `balances` instead.
96
108
  **/
97
109
  public readonly localBalance?: CurrencyAmount | undefined,
98
110
  /**
99
- * The sum of the channel balances that are available to receive on this node.
111
+ * The sum of the channel balances that are available to receive on this
112
+ * node.
100
113
  *
101
114
  * @deprecated Use `balances` instead.
102
115
  **/
@@ -20,11 +20,16 @@ import type NodeAddressType from "./NodeAddressType.js";
20
20
  import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
21
21
  import { SecretFromJson, SecretToJson } from "./Secret.js";
22
22
 
23
- /** 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. **/
23
+ /**
24
+ * This object is an interface representing a Lightning Node on the Lightning
25
+ * Network, and could either be a Lightspark node or a node managed by a third
26
+ * party.
27
+ * *
28
+ */
24
29
  interface Node {
25
30
  /**
26
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
27
- * string.
31
+ * The unique identifier of this entity across all Lightspark systems.
32
+ * Should be treated as an opaque string.
28
33
  **/
29
34
  id: string;
30
35
 
@@ -38,8 +43,9 @@ interface Node {
38
43
  bitcoinNetwork: BitcoinNetwork;
39
44
 
40
45
  /**
41
- * The name of this node in the network. It will be the most human-readable option possible, depending
42
- * on the data available for this node.
46
+ * The name of this node in the network.
47
+ * It will be the most human-readable option possible,
48
+ * depending on the data available for this node.
43
49
  **/
44
50
  displayName: string;
45
51
 
@@ -47,27 +53,35 @@ interface Node {
47
53
  typename: string;
48
54
 
49
55
  /**
50
- * A name that identifies the node. It has no importance in terms of operating the node, it is just a
51
- * way to identify and search for commercial services or popular nodes. This alias can be changed at
52
- * any time by the node operator.
56
+ * A name that identifies the node. It has no importance in terms of
57
+ * operating the node, it is just a way to identify and search for commercial
58
+ * services or popular nodes. This alias can be changed at any time by the
59
+ * node operator.
53
60
  **/
54
61
  alias?: string | undefined;
55
62
 
56
63
  /**
57
- * A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
58
- * has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
64
+ * A hexadecimal string that describes a color. For example "#000000" is
65
+ * black, "#FFFFFF" is white. It has no importance in terms of operating the
66
+ * node,
67
+ * it is just a way to visually differentiate nodes.
59
68
  * That color can be changed at any time by the node operator.
60
69
  **/
61
70
  color?: string | undefined;
62
71
 
63
72
  /**
64
- * A summary metric used to capture how well positioned a node is to send, receive, or route
65
- * transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
66
- * capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
73
+ * A summary metric used to capture how well positioned a node is to send,
74
+ * receive, or route transactions efficiently.
75
+ * Maximizing a node's conductivity helps a node’s transactions to be capital
76
+ * efficient. The value is an integer ranging between 0 and 10 (bounds
77
+ * included).
67
78
  **/
68
79
  conductivity?: number | undefined;
69
80
 
70
- /** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
81
+ /**
82
+ * The public key of this node. It acts as a unique identifier of this node
83
+ * in the Lightning Network. *
84
+ */
71
85
  publicKey?: string | undefined;
72
86
 
73
87
  getAddresses(
@@ -1,10 +1,14 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- /** This is an enum of the potential types of addresses that a node on the Lightning Network can have. **/
3
+ /**
4
+ * This is an enum of the potential types of addresses that a node on the
5
+ * Lightning Network can have. *
6
+ */
4
7
  export enum NodeAddressType {
5
8
  /**
6
- * This is an enum value that represents values that could be added in the future.
7
- * Clients should support unknown values as more of them could be added without notice.
9
+ * This is an enum value that represents values that could be added in the
10
+ * future. Clients should support unknown values as more of them could be
11
+ * added without notice.
8
12
  */
9
13
  FUTURE_VALUE = "FUTURE_VALUE",
10
14
 
@@ -3,11 +3,15 @@
3
3
  import type NodeAddress from "./NodeAddress.js";
4
4
  import { NodeAddressFromJson, NodeAddressToJson } from "./NodeAddress.js";
5
5
 
6
- /** A connection between a node and the addresses it has announced for itself on Lightning Network. **/
6
+ /**
7
+ * A connection between a node and the addresses it has announced for itself on
8
+ * Lightning Network. *
9
+ */
7
10
  interface NodeToAddressesConnection {
8
11
  /**
9
- * The total count of objects in this connection, using the current filters. It is different from the
10
- * number of objects returned in the current page (in the `entities` field).
12
+ * The total count of objects in this connection, using the current filters.
13
+ * It is different from the number of objects returned in the current page
14
+ * (in the `entities` field).
11
15
  **/
12
16
  count: number;
13
17
 
@@ -12,11 +12,17 @@ import type Deposit from "./Deposit.js";
12
12
  import TransactionStatus from "./TransactionStatus.js";
13
13
  import type Withdrawal from "./Withdrawal.js";
14
14
 
15
- /** 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. **/
15
+ /**
16
+ * This object represents an L1 transaction that occurred on the Bitcoin
17
+ * Network. You can retrieve this object to receive information about a
18
+ * specific on-chain transaction made on the Lightning Network associated with
19
+ * your Lightspark Node.
20
+ * *
21
+ */
16
22
  interface OnChainTransaction {
17
23
  /**
18
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
19
- * string.
24
+ * The unique identifier of this entity across all Lightspark systems.
25
+ * Should be treated as an opaque string.
20
26
  **/
21
27
  id: string;
22
28
 
@@ -33,8 +39,8 @@ interface OnChainTransaction {
33
39
  amount: CurrencyAmount;
34
40
 
35
41
  /**
36
- * The height of the block that included this transaction. This will be zero for unconfirmed
37
- * transactions.
42
+ * The height of the block that included this transaction.
43
+ * This will be zero for unconfirmed transactions.
38
44
  **/
39
45
  blockHeight: number;
40
46
 
@@ -47,22 +53,28 @@ interface OnChainTransaction {
47
53
  /** The date and time when this transaction was completed or failed. **/
48
54
  resolvedAt?: string | undefined;
49
55
 
50
- /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
56
+ /**
57
+ * The hash of this transaction, so it can be uniquely identified on the
58
+ * Lightning Network. *
59
+ */
51
60
  transactionHash?: string | undefined;
52
61
 
53
62
  /**
54
- * The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
55
- * blockchain.
63
+ * The fees that were paid by the wallet sending the transaction to commit it
64
+ * to the Bitcoin blockchain.
56
65
  **/
57
66
  fees?: CurrencyAmount | undefined;
58
67
 
59
68
  /**
60
- * The hash of the block that included this transaction. This will be null for unconfirmed
61
- * transactions.
69
+ * The hash of the block that included this transaction.
70
+ * This will be null for unconfirmed transactions.
62
71
  **/
63
72
  blockHash?: string | undefined;
64
73
 
65
- /** The number of blockchain confirmations for this transaction in real time. **/
74
+ /**
75
+ * The number of blockchain confirmations for this transaction in real time.
76
+ * *
77
+ */
66
78
  numConfirmations?: number | undefined;
67
79
  }
68
80
 
@@ -28,12 +28,17 @@ import { RichTextFromJson, RichTextToJson } from "./RichText.js";
28
28
  import type Transaction from "./Transaction.js";
29
29
  import TransactionStatus from "./TransactionStatus.js";
30
30
 
31
- /** 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. **/
31
+ /**
32
+ * This object represents a Lightning Network payment sent from a Lightspark
33
+ * Node. You can retrieve this object to receive payment related information
34
+ * about any payment sent from your Lightspark Node on the Lightning Network.
35
+ * *
36
+ */
32
37
  class OutgoingPayment implements LightningTransaction, Transaction, Entity {
33
38
  constructor(
34
39
  /**
35
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
36
- * string.
40
+ * The unique identifier of this entity across all Lightspark systems.
41
+ * Should be treated as an opaque string.
37
42
  **/
38
43
  public readonly id: string,
39
44
  /** The date and time when this transaction was initiated. **/
@@ -50,19 +55,31 @@ class OutgoingPayment implements LightningTransaction, Transaction, Entity {
50
55
  public readonly typename: string,
51
56
  /** The date and time when this transaction was completed or failed. **/
52
57
  public readonly resolvedAt?: string | undefined,
53
- /** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
58
+ /**
59
+ * The hash of this transaction, so it can be uniquely identified on the
60
+ * Lightning Network. *
61
+ */
54
62
  public readonly transactionHash?: string | undefined,
55
63
  /** If known, the final recipient node this payment was sent to. **/
56
64
  public readonly destinationId?: string | undefined,
57
65
  /** The fees paid by the sender node to send the payment. **/
58
66
  public readonly fees?: CurrencyAmount | undefined,
59
- /** The data of the payment request that was paid by this transaction, if known. **/
67
+ /**
68
+ * The data of the payment request that was paid by this transaction, if
69
+ * known. *
70
+ */
60
71
  public readonly paymentRequestData?: PaymentRequestData | undefined,
61
72
  /** If applicable, the reason why the payment failed. **/
62
73
  public readonly failureReason?: PaymentFailureReason | undefined,
63
- /** If applicable, user-facing error message describing why the payment failed. **/
74
+ /**
75
+ * If applicable, user-facing error message describing why the payment
76
+ * failed. *
77
+ */
64
78
  public readonly failureMessage?: RichText | undefined,
65
- /** The post transaction data which can be used in KYT payment registration. **/
79
+ /**
80
+ * The post transaction data which can be used in KYT payment registration.
81
+ * *
82
+ */
66
83
  public readonly umaPostTransactionData?: PostTransactionData[] | undefined,
67
84
  /** The preimage of the payment. **/
68
85
  public readonly paymentPreimage?: string | undefined,