@lightsparkdev/lightspark-sdk 1.2.1 → 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 (132) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{BitcoinNetwork-a816c0be.d.ts → BitcoinNetwork-37e9f091.d.ts} +8 -3
  3. package/dist/{chunk-VTPDR6P4.js → chunk-NCPWHRFO.js} +353 -15
  4. package/dist/env.d.cts +1 -1
  5. package/dist/env.d.ts +1 -1
  6. package/dist/{index-5acc6526.d.ts → index-449c9f58.d.ts} +2089 -644
  7. package/dist/index.cjs +1082 -470
  8. package/dist/index.d.cts +3 -3
  9. package/dist/index.d.ts +3 -3
  10. package/dist/index.js +584 -302
  11. package/dist/objects/index.cjs +345 -5
  12. package/dist/objects/index.d.cts +2 -2
  13. package/dist/objects/index.d.ts +2 -2
  14. package/dist/objects/index.js +9 -1
  15. package/package.json +4 -4
  16. package/src/NodeKeyLoaderCache.ts +4 -3
  17. package/src/SigningKeyLoader.ts +12 -7
  18. package/src/client.ts +287 -60
  19. package/src/env.ts +3 -1
  20. package/src/graphql/ClaimUmaInvitation.ts +21 -0
  21. package/src/graphql/ClaimUmaInvitationWithIncentives.ts +25 -0
  22. package/src/graphql/CreateUmaInvitation.ts +19 -0
  23. package/src/graphql/CreateUmaInvitationWithIncentives.ts +23 -0
  24. package/src/graphql/FetchUmaInvitation.ts +15 -0
  25. package/src/objects/Account.ts +7 -3
  26. package/src/objects/AccountToApiTokensConnection.ts +7 -3
  27. package/src/objects/AccountToChannelsConnection.ts +3 -2
  28. package/src/objects/AccountToNodesConnection.ts +7 -3
  29. package/src/objects/AccountToPaymentRequestsConnection.ts +7 -3
  30. package/src/objects/AccountToTransactionsConnection.ts +13 -9
  31. package/src/objects/AccountToWalletsConnection.ts +7 -3
  32. package/src/objects/ApiToken.ts +13 -7
  33. package/src/objects/Balances.ts +22 -12
  34. package/src/objects/BitcoinNetwork.ts +8 -3
  35. package/src/objects/BlockchainBalance.ts +4 -1
  36. package/src/objects/Channel.ts +37 -14
  37. package/src/objects/ChannelClosingTransaction.ts +22 -11
  38. package/src/objects/ChannelFees.ts +4 -1
  39. package/src/objects/ChannelOpeningTransaction.ts +22 -11
  40. package/src/objects/ChannelStatus.ts +33 -8
  41. package/src/objects/ChannelToTransactionsConnection.ts +9 -8
  42. package/src/objects/ClaimUmaInvitationInput.ts +26 -0
  43. package/src/objects/ClaimUmaInvitationOutput.ts +30 -0
  44. package/src/objects/ClaimUmaInvitationWithIncentivesInput.ts +44 -0
  45. package/src/objects/ClaimUmaInvitationWithIncentivesOutput.ts +33 -0
  46. package/src/objects/ComplianceProvider.ts +3 -2
  47. package/src/objects/Connection.ts +7 -3
  48. package/src/objects/CreateApiTokenInput.ts +4 -1
  49. package/src/objects/CreateApiTokenOutput.ts +3 -3
  50. package/src/objects/CreateInvitationWithIncentivesInput.ts +37 -0
  51. package/src/objects/CreateInvitationWithIncentivesOutput.ts +32 -0
  52. package/src/objects/CreateLnurlInvoiceInput.ts +3 -2
  53. package/src/objects/CreateTestModePaymentInput.ts +2 -2
  54. package/src/objects/CreateTestModePaymentoutput.ts +5 -1
  55. package/src/objects/CreateUmaInvitationInput.ts +22 -0
  56. package/src/objects/CreateUmaInvitationOutput.ts +30 -0
  57. package/src/objects/CurrencyAmount.ts +6 -4
  58. package/src/objects/CurrencyUnit.ts +36 -9
  59. package/src/objects/Deposit.ts +22 -11
  60. package/src/objects/Entity.ts +21 -3
  61. package/src/objects/FeeEstimate.ts +5 -1
  62. package/src/objects/GraphNode.ts +30 -14
  63. package/src/objects/Hop.ts +12 -4
  64. package/src/objects/HtlcAttemptFailureCode.ts +7 -3
  65. package/src/objects/IncentivesIneligibilityReason.ts +48 -0
  66. package/src/objects/IncentivesStatus.ts +28 -0
  67. package/src/objects/IncomingPayment.ts +18 -7
  68. package/src/objects/IncomingPaymentAttempt.ts +8 -3
  69. package/src/objects/IncomingPaymentAttemptStatus.ts +7 -3
  70. package/src/objects/IncomingPaymentToAttemptsConnection.ts +7 -3
  71. package/src/objects/Invoice.ts +2 -2
  72. package/src/objects/InvoiceData.ts +7 -3
  73. package/src/objects/InvoiceType.ts +3 -2
  74. package/src/objects/LightningFeeEstimateForInvoiceInput.ts +2 -2
  75. package/src/objects/LightningTransaction.ts +12 -4
  76. package/src/objects/LightsparkNode.ts +33 -18
  77. package/src/objects/LightsparkNodeOwner.ts +2 -2
  78. package/src/objects/LightsparkNodeStatus.ts +3 -2
  79. package/src/objects/LightsparkNodeToChannelsConnection.ts +7 -3
  80. package/src/objects/LightsparkNodeWithOSK.ts +35 -19
  81. package/src/objects/LightsparkNodeWithRemoteSigning.ts +31 -18
  82. package/src/objects/Node.ts +28 -14
  83. package/src/objects/NodeAddressType.ts +7 -3
  84. package/src/objects/NodeToAddressesConnection.ts +7 -3
  85. package/src/objects/OnChainTransaction.ts +23 -11
  86. package/src/objects/OutgoingPayment.ts +25 -7
  87. package/src/objects/OutgoingPaymentAttempt.ts +34 -14
  88. package/src/objects/OutgoingPaymentAttemptStatus.ts +7 -3
  89. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +12 -4
  90. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +7 -3
  91. package/src/objects/PageInfo.ts +6 -1
  92. package/src/objects/PayInvoiceInput.ts +6 -3
  93. package/src/objects/PaymentDirection.ts +3 -2
  94. package/src/objects/PaymentFailureReason.ts +7 -3
  95. package/src/objects/PaymentRequest.ts +8 -3
  96. package/src/objects/PaymentRequestData.ts +5 -1
  97. package/src/objects/PaymentRequestStatus.ts +7 -3
  98. package/src/objects/Permission.ts +7 -3
  99. package/src/objects/PostTransactionData.ts +6 -3
  100. package/src/objects/RegionCode.ts +541 -0
  101. package/src/objects/RegisterPaymentInput.ts +12 -7
  102. package/src/objects/RemoteSigningSubEventType.ts +7 -3
  103. package/src/objects/RequestWithdrawalInput.ts +2 -2
  104. package/src/objects/RiskRating.ts +8 -3
  105. package/src/objects/RoutingTransaction.ts +20 -7
  106. package/src/objects/RoutingTransactionFailureReason.ts +8 -3
  107. package/src/objects/ScreenNodeInput.ts +3 -2
  108. package/src/objects/SendPaymentInput.ts +4 -1
  109. package/src/objects/SetInvoicePaymentHashInput.ts +3 -2
  110. package/src/objects/Signable.ts +2 -2
  111. package/src/objects/SignablePayload.ts +6 -3
  112. package/src/objects/SignablePayloadStatus.ts +3 -2
  113. package/src/objects/Transaction.ts +14 -4
  114. package/src/objects/TransactionFailures.ts +4 -1
  115. package/src/objects/TransactionStatus.ts +16 -5
  116. package/src/objects/TransactionType.ts +30 -8
  117. package/src/objects/TransactionUpdate.ts +6 -3
  118. package/src/objects/UmaInvitation.ts +119 -0
  119. package/src/objects/Wallet.ts +13 -4
  120. package/src/objects/WalletStatus.ts +36 -9
  121. package/src/objects/WalletToPaymentRequestsConnection.ts +7 -3
  122. package/src/objects/WalletToTransactionsConnection.ts +7 -3
  123. package/src/objects/WebhookEventType.ts +11 -3
  124. package/src/objects/Withdrawal.ts +22 -11
  125. package/src/objects/WithdrawalMode.ts +7 -3
  126. package/src/objects/WithdrawalRequest.ts +15 -6
  127. package/src/objects/WithdrawalRequestStatus.ts +3 -2
  128. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +11 -4
  129. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +11 -4
  130. package/src/objects/index.ts +21 -6
  131. package/src/tests/integration/constants.ts +0 -3
  132. package/src/tests/integration/general-regtest.test.ts +178 -197
@@ -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,
@@ -98,6 +115,7 @@ query FetchOutgoingPaymentToAttemptsConnection($entity_id: ID!, $first: Int, $af
98
115
  outgoing_payment_attempt_status: status
99
116
  outgoing_payment_attempt_failure_code: failure_code
100
117
  outgoing_payment_attempt_failure_source_index: failure_source_index
118
+ outgoing_payment_attempt_attempted_at: attempted_at
101
119
  outgoing_payment_attempt_resolved_at: resolved_at
102
120
  outgoing_payment_attempt_amount: amount {
103
121
  __typename
@@ -19,46 +19,63 @@ import OutgoingPaymentAttemptStatus from "./OutgoingPaymentAttemptStatus.js";
19
19
  import type OutgoingPaymentAttemptToHopsConnection from "./OutgoingPaymentAttemptToHopsConnection.js";
20
20
  import { OutgoingPaymentAttemptToHopsConnectionFromJson } from "./OutgoingPaymentAttemptToHopsConnection.js";
21
21
 
22
- /** 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. **/
22
+ /**
23
+ * This object represents an attempted Lightning Network payment sent from a
24
+ * Lightspark Node. You can retrieve this object to receive payment related
25
+ * information about any payment attempt sent from your Lightspark Node on the
26
+ * Lightning Network,
27
+ * including any potential reasons the payment may have failed.
28
+ * *
29
+ */
23
30
  class OutgoingPaymentAttempt implements Entity {
24
31
  constructor(
25
32
  /**
26
- * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
27
- * string.
33
+ * The unique identifier of this entity across all Lightspark systems.
34
+ * Should be treated as an opaque string.
28
35
  **/
29
36
  public readonly id: string,
30
- /** The date and time when the attempt was initiated. **/
37
+ /** The date and time when the entity was first created. **/
31
38
  public readonly createdAt: string,
32
39
  /** The date and time when the entity was last updated. **/
33
40
  public readonly updatedAt: string,
34
41
  /** The status of an outgoing payment attempt. **/
35
42
  public readonly status: OutgoingPaymentAttemptStatus,
43
+ /** The date and time when the attempt was initiated. **/
44
+ public readonly attemptedAt: string,
36
45
  /** The outgoing payment for this attempt. **/
37
46
  public readonly outgoingPaymentId: string,
38
47
  /** The typename of the object **/
39
48
  public readonly typename: string,
40
- /** If the payment attempt failed, then this contains the Bolt #4 failure code. **/
49
+ /**
50
+ * If the payment attempt failed, then this contains the Bolt #4 failure
51
+ * code. *
52
+ */
41
53
  public readonly failureCode?: HtlcAttemptFailureCode | undefined,
42
54
  /**
43
- * If the payment attempt failed, then this contains the index of the hop at which the problem
44
- * occurred.
55
+ * If the payment attempt failed, then this contains the index of the hop
56
+ * at which the problem occurred.
45
57
  **/
46
58
  public readonly failureSourceIndex?: number | undefined,
47
59
  /** The time the outgoing payment attempt failed or succeeded. **/
48
60
  public readonly resolvedAt?: string | undefined,
49
61
  /**
50
- * The total amount of funds required to complete a payment over this route. This value includes the
51
- * cumulative fees for each hop. As a result, the attempt extended to the first-hop in the route will
52
- * need to have at least this much value, otherwise the route will fail at an intermediate node due to
53
- * an insufficient amount.
62
+ * The total amount of funds required to complete a payment over this route.
63
+ * This value includes the cumulative fees for each hop. As a result,
64
+ * the attempt extended to the first-hop in the route will need to have at
65
+ * least this much value, otherwise the route will fail at an intermediate
66
+ * node due to an insufficient amount.
54
67
  **/
55
68
  public readonly amount?: CurrencyAmount | undefined,
56
69
  /**
57
- * The sum of the fees paid at each hop within the route of this attempt. In the case of a one-hop
58
- * payment, this value will be zero as we don't need to pay a fee to ourselves.
70
+ * The sum of the fees paid at each hop within the route of this attempt.
71
+ * In the case of a one-hop payment,
72
+ * this value will be zero as we don't need to pay a fee to ourselves.
59
73
  **/
60
74
  public readonly fees?: CurrencyAmount | undefined,
61
- /** The channel snapshot at the time the outgoing payment attempt was made. **/
75
+ /**
76
+ * The channel snapshot at the time the outgoing payment attempt was made.
77
+ * *
78
+ */
62
79
  public readonly channelSnapshot?: ChannelSnapshot | undefined,
63
80
  ) {
64
81
  autoBind(this);
@@ -155,6 +172,7 @@ ${FRAGMENT}
155
172
  outgoing_payment_attempt_status: this.status,
156
173
  outgoing_payment_attempt_failure_code: this.failureCode,
157
174
  outgoing_payment_attempt_failure_source_index: this.failureSourceIndex,
175
+ outgoing_payment_attempt_attempted_at: this.attemptedAt,
158
176
  outgoing_payment_attempt_resolved_at: this.resolvedAt,
159
177
  outgoing_payment_attempt_amount: this.amount
160
178
  ? CurrencyAmountToJson(this.amount)
@@ -179,6 +197,7 @@ export const OutgoingPaymentAttemptFromJson = (
179
197
  obj["outgoing_payment_attempt_updated_at"],
180
198
  OutgoingPaymentAttemptStatus[obj["outgoing_payment_attempt_status"]] ??
181
199
  OutgoingPaymentAttemptStatus.FUTURE_VALUE,
200
+ obj["outgoing_payment_attempt_attempted_at"],
182
201
  obj["outgoing_payment_attempt_outgoing_payment"].id,
183
202
  "OutgoingPaymentAttempt",
184
203
  !!obj["outgoing_payment_attempt_failure_code"]
@@ -210,6 +229,7 @@ fragment OutgoingPaymentAttemptFragment on OutgoingPaymentAttempt {
210
229
  outgoing_payment_attempt_status: status
211
230
  outgoing_payment_attempt_failure_code: failure_code
212
231
  outgoing_payment_attempt_failure_source_index: failure_source_index
232
+ outgoing_payment_attempt_attempted_at: attempted_at
213
233
  outgoing_payment_attempt_resolved_at: resolved_at
214
234
  outgoing_payment_attempt_amount: amount {
215
235
  __typename
@@ -1,10 +1,14 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- /** This is an enum of all potential statuses of a payment attempt made from a Lightspark Node. **/
3
+ /**
4
+ * This is an enum of all potential statuses of a payment attempt made from a
5
+ * Lightspark Node. *
6
+ */
4
7
  export enum OutgoingPaymentAttemptStatus {
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
 
@@ -5,15 +5,23 @@ import { HopFromJson, HopToJson } from "./Hop.js";
5
5
  import type PageInfo from "./PageInfo.js";
6
6
  import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
7
7
 
8
- /** The connection from an outgoing payment attempt to the list of sequential hops that define the path from sender node to recipient node. **/
8
+ /**
9
+ * The connection from an outgoing payment attempt to the list of sequential
10
+ * hops that define the path from sender node to recipient node.
11
+ * *
12
+ */
9
13
  interface OutgoingPaymentAttemptToHopsConnection {
10
14
  /**
11
- * The total count of objects in this connection, using the current filters. It is different from the
12
- * number of objects returned in the current page (in the `entities` field).
15
+ * The total count of objects in this connection, using the current filters.
16
+ * It is different from the number of objects returned in the current page
17
+ * (in the `entities` field).
13
18
  **/
14
19
  count: number;
15
20
 
16
- /** An object that holds pagination information about the objects in this connection. **/
21
+ /**
22
+ * An object that holds pagination information about the objects in this
23
+ * connection. *
24
+ */
17
25
  pageInfo: PageInfo;
18
26
 
19
27
  /** The hops for the current page of this connection. **/
@@ -8,12 +8,16 @@ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
8
8
  /** The connection from outgoing payment to all attempts. **/
9
9
  interface OutgoingPaymentToAttemptsConnection {
10
10
  /**
11
- * The total count of objects in this connection, using the current filters. It is different from the
12
- * number of objects returned in the current page (in the `entities` field).
11
+ * The total count of objects in this connection, using the current filters.
12
+ * It is different from the number of objects returned in the current page
13
+ * (in the `entities` field).
13
14
  **/
14
15
  count: number;
15
16
 
16
- /** An object that holds pagination information about the objects in this connection. **/
17
+ /**
18
+ * An object that holds pagination information about the objects in this
19
+ * connection. *
20
+ */
17
21
  pageInfo: PageInfo;
18
22
 
19
23
  /** The attempts for the current page of this connection. **/
@@ -1,6 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- /** This is an object representing information about a page returned by the Lightspark API. For more information, please see the “Pagination” section of our API docs for more information about its usage. **/
3
+ /**
4
+ * This is an object representing information about a page returned by the
5
+ * Lightspark API. For more information,
6
+ * please see the “Pagination” section of our API docs for more information
7
+ * about its usage. *
8
+ */
4
9
  interface PageInfo {
5
10
  hasNextPage?: boolean | undefined;
6
11