@lightsparkdev/lightspark-sdk 1.2.3 → 1.3.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.
- package/CHANGELOG.md +19 -0
- package/dist/{BitcoinNetwork-37e9f091.d.ts → BitcoinNetwork-972b1d01.d.ts} +4 -6
- package/dist/{chunk-NCPWHRFO.js → chunk-Y55D3PD4.js} +11 -11
- package/dist/env.d.cts +1 -1
- package/dist/env.d.ts +1 -1
- package/dist/{index-449c9f58.d.ts → index-a5028d74.d.ts} +572 -943
- package/dist/index.cjs +266 -235
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +46 -15
- package/dist/objects/index.d.cts +2 -2
- package/dist/objects/index.d.ts +2 -2
- package/dist/objects/index.js +1 -1
- package/package.json +2 -2
- package/src/client.ts +21 -3
- package/src/graphql/CancelInvoice.ts +17 -0
- package/src/objects/Account.ts +2 -2
- package/src/objects/AccountToApiTokensConnection.ts +3 -6
- package/src/objects/AccountToChannelsConnection.ts +3 -3
- package/src/objects/AccountToNodesConnection.ts +3 -6
- package/src/objects/AccountToPaymentRequestsConnection.ts +3 -6
- package/src/objects/AccountToTransactionsConnection.ts +5 -8
- package/src/objects/AccountToWalletsConnection.ts +3 -6
- package/src/objects/ApiToken.ts +7 -8
- package/src/objects/Balances.ts +16 -18
- package/src/objects/BitcoinNetwork.ts +4 -6
- package/src/objects/BlockchainBalance.ts +1 -4
- package/src/objects/CancelInvoiceInput.ts +18 -0
- package/src/objects/CancelInvoiceOutput.ts +26 -0
- package/src/objects/Channel.ts +16 -25
- package/src/objects/ChannelClosingTransaction.ts +10 -17
- package/src/objects/ChannelFees.ts +1 -4
- package/src/objects/ChannelOpeningTransaction.ts +10 -17
- package/src/objects/ChannelStatus.ts +13 -19
- package/src/objects/ChannelToTransactionsConnection.ts +6 -6
- package/src/objects/ComplianceProvider.ts +2 -3
- package/src/objects/Connection.ts +3 -6
- package/src/objects/CreateApiTokenInput.ts +1 -4
- package/src/objects/CreateLnurlInvoiceInput.ts +2 -2
- package/src/objects/CreateTestModePaymentoutput.ts +2 -2
- package/src/objects/CurrencyAmount.ts +4 -6
- package/src/objects/CurrencyUnit.ts +7 -11
- package/src/objects/Deposit.ts +10 -16
- package/src/objects/Entity.ts +2 -2
- package/src/objects/FeeEstimate.ts +3 -3
- package/src/objects/GraphNode.ts +13 -20
- package/src/objects/Hop.ts +4 -7
- package/src/objects/HtlcAttemptFailureCode.ts +4 -5
- package/src/objects/IncentivesIneligibilityReason.ts +13 -25
- package/src/objects/IncentivesStatus.ts +5 -8
- package/src/objects/IncomingPayment.ts +5 -12
- package/src/objects/IncomingPaymentAttempt.ts +3 -4
- package/src/objects/IncomingPaymentAttemptStatus.ts +3 -7
- package/src/objects/IncomingPaymentToAttemptsConnection.ts +3 -6
- package/src/objects/InvoiceData.ts +2 -2
- package/src/objects/InvoiceType.ts +2 -3
- package/src/objects/LightningFeeEstimateForInvoiceInput.ts +2 -2
- package/src/objects/LightningTransaction.ts +4 -8
- package/src/objects/LightsparkNode.ts +19 -25
- package/src/objects/LightsparkNodeStatus.ts +2 -3
- package/src/objects/LightsparkNodeToChannelsConnection.ts +3 -6
- package/src/objects/LightsparkNodeWithOSK.ts +19 -27
- package/src/objects/LightsparkNodeWithRemoteSigning.ts +17 -25
- package/src/objects/Node.ts +13 -19
- package/src/objects/NodeAddressType.ts +4 -5
- package/src/objects/NodeToAddressesConnection.ts +4 -4
- package/src/objects/OnChainTransaction.ts +11 -18
- package/src/objects/OutgoingPayment.ts +7 -19
- package/src/objects/OutgoingPaymentAttempt.ts +11 -19
- package/src/objects/OutgoingPaymentAttemptStatus.ts +3 -7
- package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +5 -9
- package/src/objects/OutgoingPaymentToAttemptsConnection.ts +3 -6
- package/src/objects/PageInfo.ts +2 -3
- package/src/objects/PayInvoiceInput.ts +4 -4
- package/src/objects/PaymentDirection.ts +2 -3
- package/src/objects/PaymentFailureReason.ts +4 -5
- package/src/objects/PaymentRequest.ts +3 -4
- package/src/objects/PaymentRequestData.ts +3 -3
- package/src/objects/PaymentRequestStatus.ts +4 -5
- package/src/objects/Permission.ts +4 -5
- package/src/objects/PostTransactionData.ts +3 -6
- package/src/objects/RegionCode.ts +12 -43
- package/src/objects/RegisterPaymentInput.ts +5 -9
- package/src/objects/RemoteSigningSubEventType.ts +3 -7
- package/src/objects/RiskRating.ts +5 -6
- package/src/objects/RoutingTransaction.ts +8 -15
- package/src/objects/RoutingTransactionFailureReason.ts +4 -6
- package/src/objects/ScreenNodeInput.ts +2 -2
- package/src/objects/SendPaymentInput.ts +2 -2
- package/src/objects/SetInvoicePaymentHashInput.ts +2 -2
- package/src/objects/SignablePayload.ts +2 -2
- package/src/objects/SignablePayloadStatus.ts +2 -3
- package/src/objects/Transaction.ts +4 -9
- package/src/objects/TransactionFailures.ts +1 -4
- package/src/objects/TransactionStatus.ts +6 -11
- package/src/objects/TransactionType.ts +12 -22
- package/src/objects/UmaInvitation.ts +2 -8
- package/src/objects/Wallet.ts +3 -4
- package/src/objects/WalletStatus.ts +12 -25
- package/src/objects/WalletToPaymentRequestsConnection.ts +3 -6
- package/src/objects/WalletToTransactionsConnection.ts +3 -6
- package/src/objects/WebhookEventType.ts +4 -5
- package/src/objects/Withdrawal.ts +11 -18
- package/src/objects/WithdrawalMode.ts +3 -7
- package/src/objects/WithdrawalRequest.ts +3 -7
- package/src/objects/WithdrawalRequestStatus.ts +2 -3
- package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +4 -10
- package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +4 -10
- package/src/objects/index.ts +2 -0
- package/src/tests/integration/general-regtest.test.ts +14 -0
package/src/objects/GraphNode.ts
CHANGED
|
@@ -12,9 +12,8 @@ import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.j
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* This object represents a node that exists on the Lightning Network,
|
|
15
|
-
* including nodes not managed by Lightspark.
|
|
16
|
-
*
|
|
17
|
-
* node on the Lightning Network.
|
|
15
|
+
* including nodes not managed by Lightspark. You can retrieve this object to get publicly
|
|
16
|
+
* available information about any node on the Lightning Network.
|
|
18
17
|
* *
|
|
19
18
|
*/
|
|
20
19
|
class GraphNode implements Node, Entity {
|
|
@@ -31,40 +30,34 @@ class GraphNode implements Node, Entity {
|
|
|
31
30
|
/** The Bitcoin Network this node is deployed in. **/
|
|
32
31
|
public readonly bitcoinNetwork: BitcoinNetwork,
|
|
33
32
|
/**
|
|
34
|
-
* The name of this node in the network.
|
|
35
|
-
* It will be the most human-readable option possible,
|
|
33
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
36
34
|
* depending on the data available for this node.
|
|
37
35
|
**/
|
|
38
36
|
public readonly displayName: string,
|
|
39
37
|
/** The typename of the object **/
|
|
40
38
|
public readonly typename: string,
|
|
41
39
|
/**
|
|
42
|
-
* A name that identifies the node.
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* popular nodes. This alias can be changed at any time by the node
|
|
46
|
-
* operator.
|
|
40
|
+
* A name that identifies the node. It has no importance in terms of operating the node,
|
|
41
|
+
* it is just a way to identify and search for commercial services or popular nodes.
|
|
42
|
+
* This alias can be changed at any time by the node operator.
|
|
47
43
|
**/
|
|
48
44
|
public readonly alias?: string | undefined,
|
|
49
45
|
/**
|
|
50
|
-
* A hexadecimal string that describes a color. For example "#000000" is
|
|
51
|
-
*
|
|
52
|
-
* the node,
|
|
46
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
47
|
+
* white. It has no importance in terms of operating the node,
|
|
53
48
|
* it is just a way to visually differentiate nodes.
|
|
54
49
|
* That color can be changed at any time by the node operator.
|
|
55
50
|
**/
|
|
56
51
|
public readonly color?: string | undefined,
|
|
57
52
|
/**
|
|
58
|
-
* A summary metric used to capture how well positioned a node is to send,
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* capital efficient. The value is an integer ranging between 0 and 10
|
|
62
|
-
* (bounds included).
|
|
53
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
54
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
55
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
63
56
|
**/
|
|
64
57
|
public readonly conductivity?: number | undefined,
|
|
65
58
|
/**
|
|
66
|
-
* The public key of this node. It acts as a unique identifier of this node
|
|
67
|
-
*
|
|
59
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
60
|
+
* Network. *
|
|
68
61
|
*/
|
|
69
62
|
public readonly publicKey?: string | undefined,
|
|
70
63
|
) {
|
package/src/objects/Hop.ts
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./CurrencyAmount.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* This object represents a specific node that existed on a particular payment
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* This object represents a specific node that existed on a particular payment route.
|
|
12
|
+
* You can retrieve this object to get information about a node on a particular payment path and
|
|
13
|
+
* all payment-relevant information for that node.
|
|
14
14
|
* *
|
|
15
15
|
*/
|
|
16
16
|
interface Hop {
|
|
@@ -41,10 +41,7 @@ interface Hop {
|
|
|
41
41
|
/** The amount that is to be forwarded to the destination node. **/
|
|
42
42
|
amountToForward?: CurrencyAmount | undefined;
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* The fees to be collected by the source node for forwarding the payment
|
|
46
|
-
* over the hop. *
|
|
47
|
-
*/
|
|
44
|
+
/** The fees to be collected by the source node for forwarding the payment over the hop. **/
|
|
48
45
|
fee?: CurrencyAmount | undefined;
|
|
49
46
|
|
|
50
47
|
/** The block height at which an unsettled HTLC is considered expired. **/
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* This is an enum representing a particular reason why an htlc sent over the
|
|
5
|
-
*
|
|
4
|
+
* This is an enum representing a particular reason why an htlc sent over the Lightning Network may
|
|
5
|
+
* have failed. *
|
|
6
6
|
*/
|
|
7
7
|
export enum HtlcAttemptFailureCode {
|
|
8
8
|
/**
|
|
9
|
-
* This is an enum value that represents values that could be added in the
|
|
10
|
-
*
|
|
11
|
-
* added without notice.
|
|
9
|
+
* This is an enum value that represents values that could be added in the future.
|
|
10
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
12
11
|
*/
|
|
13
12
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
14
13
|
|
|
@@ -1,46 +1,34 @@
|
|
|
1
1
|
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Describes the reason for an invitation to not be eligible for incentives.
|
|
5
|
-
* *
|
|
6
|
-
*/
|
|
3
|
+
/** Describes the reason for an invitation to not be eligible for incentives. **/
|
|
7
4
|
export enum IncentivesIneligibilityReason {
|
|
8
5
|
/**
|
|
9
|
-
* This is an enum value that represents values that could be added in the
|
|
10
|
-
*
|
|
11
|
-
* added without notice.
|
|
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.
|
|
12
8
|
*/
|
|
13
9
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
14
10
|
/**
|
|
15
|
-
* This invitation is not eligible for incentives because it has been created
|
|
16
|
-
*
|
|
11
|
+
* This invitation is not eligible for incentives because it has been created outside of the
|
|
12
|
+
* incentives flow. *
|
|
17
13
|
*/
|
|
18
14
|
DISABLED = "DISABLED",
|
|
19
|
-
/**
|
|
20
|
-
* This invitation is not eligible for incentives because the sender is not
|
|
21
|
-
* eligible. *
|
|
22
|
-
*/
|
|
15
|
+
/** This invitation is not eligible for incentives because the sender is not eligible. **/
|
|
23
16
|
SENDER_NOT_ELIGIBLE = "SENDER_NOT_ELIGIBLE",
|
|
24
|
-
/**
|
|
25
|
-
* This invitation is not eligible for incentives because the receiver is not
|
|
26
|
-
* eligible. *
|
|
27
|
-
*/
|
|
17
|
+
/** This invitation is not eligible for incentives because the receiver is not eligible. **/
|
|
28
18
|
RECEIVER_NOT_ELIGIBLE = "RECEIVER_NOT_ELIGIBLE",
|
|
29
19
|
/**
|
|
30
|
-
* This invitation is not eligible for incentives because the sending VASP is
|
|
31
|
-
*
|
|
32
|
-
* *
|
|
20
|
+
* This invitation is not eligible for incentives because the sending VASP is not part of the
|
|
21
|
+
* incentives program. *
|
|
33
22
|
*/
|
|
34
23
|
SENDING_VASP_NOT_ELIGIBLE = "SENDING_VASP_NOT_ELIGIBLE",
|
|
35
24
|
/**
|
|
36
|
-
* This invitation is not eligible for incentives because the receiving VASP
|
|
37
|
-
*
|
|
38
|
-
* *
|
|
25
|
+
* This invitation is not eligible for incentives because the receiving VASP is not part of the
|
|
26
|
+
* incentives program. *
|
|
39
27
|
*/
|
|
40
28
|
RECEIVING_VASP_NOT_ELIGIBLE = "RECEIVING_VASP_NOT_ELIGIBLE",
|
|
41
29
|
/**
|
|
42
|
-
* This invitation is not eligible for incentives because the sender and
|
|
43
|
-
*
|
|
30
|
+
* This invitation is not eligible for incentives because the sender and receiver are in the same
|
|
31
|
+
* region. *
|
|
44
32
|
*/
|
|
45
33
|
NOT_CROSS_BORDER = "NOT_CROSS_BORDER",
|
|
46
34
|
}
|
|
@@ -3,23 +3,20 @@
|
|
|
3
3
|
/** Describes the status of the incentives for this invitation. **/
|
|
4
4
|
export enum IncentivesStatus {
|
|
5
5
|
/**
|
|
6
|
-
* This is an enum value that represents values that could be added in the
|
|
7
|
-
*
|
|
8
|
-
* added without notice.
|
|
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
8
|
*/
|
|
10
9
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
11
10
|
/**
|
|
12
|
-
* The invitation is eligible for incentives in its current state.
|
|
13
|
-
*
|
|
14
|
-
* *
|
|
11
|
+
* The invitation is eligible for incentives in its current state. When it is claimed, we will
|
|
12
|
+
* reassess. *
|
|
15
13
|
*/
|
|
16
14
|
PENDING = "PENDING",
|
|
17
15
|
/** The incentives have been validated. **/
|
|
18
16
|
VALIDATED = "VALIDATED",
|
|
19
17
|
/**
|
|
20
18
|
* This invitation is not eligible for incentives.
|
|
21
|
-
* A more detailed reason can be found in the
|
|
22
|
-
* `incentives_ineligibility_reason` field.
|
|
19
|
+
* A more detailed reason can be found in the `incentives_ineligibility_reason` field.
|
|
23
20
|
* *
|
|
24
21
|
*/
|
|
25
22
|
INELIGIBLE = "INELIGIBLE",
|
|
@@ -22,10 +22,9 @@ import type Transaction from "./Transaction.js";
|
|
|
22
22
|
import TransactionStatus from "./TransactionStatus.js";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* This object represents any payment sent to a Lightspark node on the
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* *
|
|
25
|
+
* This object represents any payment sent to a Lightspark node on the Lightning Network.
|
|
26
|
+
* You can retrieve this object to receive payment related information about a specific payment
|
|
27
|
+
* received by a Lightspark node. *
|
|
29
28
|
*/
|
|
30
29
|
class IncomingPayment implements LightningTransaction, Transaction, Entity {
|
|
31
30
|
constructor(
|
|
@@ -48,20 +47,14 @@ class IncomingPayment implements LightningTransaction, Transaction, Entity {
|
|
|
48
47
|
public readonly typename: string,
|
|
49
48
|
/** The date and time when this transaction was completed or failed. **/
|
|
50
49
|
public readonly resolvedAt?: string | undefined,
|
|
51
|
-
/**
|
|
52
|
-
* The hash of this transaction, so it can be uniquely identified on the
|
|
53
|
-
* Lightning Network. *
|
|
54
|
-
*/
|
|
50
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
55
51
|
public readonly transactionHash?: string | undefined,
|
|
56
52
|
/**
|
|
57
53
|
* The optional payment request for this incoming payment,
|
|
58
54
|
* which will be null if the payment is sent through keysend.
|
|
59
55
|
**/
|
|
60
56
|
public readonly paymentRequestId?: string | undefined,
|
|
61
|
-
/**
|
|
62
|
-
* The post transaction data which can be used in KYT payment registration.
|
|
63
|
-
* *
|
|
64
|
-
*/
|
|
57
|
+
/** The post transaction data which can be used in KYT payment registration. **/
|
|
65
58
|
public readonly umaPostTransactionData?: PostTransactionData[] | undefined,
|
|
66
59
|
) {
|
|
67
60
|
autoBind(this);
|
|
@@ -9,10 +9,9 @@ import {
|
|
|
9
9
|
import IncomingPaymentAttemptStatus from "./IncomingPaymentAttemptStatus.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* This object represents any attempted payment sent to a Lightspark node on
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* *
|
|
12
|
+
* This object represents any attempted payment sent to a Lightspark node on the Lightning Network.
|
|
13
|
+
* You can retrieve this object to receive payment related information about a specific incoming
|
|
14
|
+
* payment attempt. *
|
|
16
15
|
*/
|
|
17
16
|
interface IncomingPaymentAttempt {
|
|
18
17
|
/**
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* This is an enum that enumerates all potential statuses for an incoming
|
|
5
|
-
* payment attempt. *
|
|
6
|
-
*/
|
|
3
|
+
/** This is an enum that enumerates all potential statuses for an incoming payment attempt. **/
|
|
7
4
|
export enum IncomingPaymentAttemptStatus {
|
|
8
5
|
/**
|
|
9
|
-
* This is an enum value that represents values that could be added in the
|
|
10
|
-
*
|
|
11
|
-
* added without notice.
|
|
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.
|
|
12
8
|
*/
|
|
13
9
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
14
10
|
|
|
@@ -12,15 +12,12 @@ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
|
|
|
12
12
|
interface IncomingPaymentToAttemptsConnection {
|
|
13
13
|
/**
|
|
14
14
|
* The total count of objects in this connection, using the current filters.
|
|
15
|
-
* It is different from the number of objects returned in the current page
|
|
16
|
-
*
|
|
15
|
+
* It is different from the number of objects returned in the current page (in the `entities`
|
|
16
|
+
* field).
|
|
17
17
|
**/
|
|
18
18
|
count: number;
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* An object that holds pagination information about the objects in this
|
|
22
|
-
* connection. *
|
|
23
|
-
*/
|
|
20
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
24
21
|
pageInfo: PageInfo;
|
|
25
22
|
|
|
26
23
|
/** The incoming payment attempts for the current page of this connection. **/
|
|
@@ -11,8 +11,8 @@ import { NodeFromJson, NodeToJson } from "./Node.js";
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* This object represents the data associated with a BOLT #11 invoice.
|
|
14
|
-
* You can retrieve this object to receive the relevant data associated with a
|
|
15
|
-
*
|
|
14
|
+
* You can retrieve this object to receive the relevant data associated with a specific invoice.
|
|
15
|
+
* *
|
|
16
16
|
*/
|
|
17
17
|
interface InvoiceData {
|
|
18
18
|
encodedPaymentRequest: string;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
/** This is an enum for potential invoice types. **/
|
|
4
4
|
export enum InvoiceType {
|
|
5
5
|
/**
|
|
6
|
-
* This is an enum value that represents values that could be added in the
|
|
7
|
-
*
|
|
8
|
-
* added without notice.
|
|
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
8
|
*/
|
|
10
9
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
11
10
|
/** A standard Bolt 11 invoice. **/
|
|
@@ -8,8 +8,8 @@ interface LightningFeeEstimateForInvoiceInput {
|
|
|
8
8
|
encodedPaymentRequest: string;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* If the invoice does not specify a payment amount,
|
|
12
|
-
*
|
|
11
|
+
* If the invoice does not specify a payment amount, then the amount that you wish to pay,
|
|
12
|
+
* expressed in msats.
|
|
13
13
|
**/
|
|
14
14
|
amountMsats?: number | undefined;
|
|
15
15
|
}
|
|
@@ -23,10 +23,9 @@ import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.j
|
|
|
23
23
|
import TransactionStatus from "./TransactionStatus.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* This is an object representing a transaction made over the Lightning
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* *
|
|
26
|
+
* This is an object representing a transaction made over the Lightning Network.
|
|
27
|
+
* You can retrieve this object to receive information about a specific transaction made over
|
|
28
|
+
* Lightning for a Lightspark node. *
|
|
30
29
|
*/
|
|
31
30
|
interface LightningTransaction {
|
|
32
31
|
/**
|
|
@@ -53,10 +52,7 @@ interface LightningTransaction {
|
|
|
53
52
|
/** The date and time when this transaction was completed or failed. **/
|
|
54
53
|
resolvedAt?: string | undefined;
|
|
55
54
|
|
|
56
|
-
/**
|
|
57
|
-
* The hash of this transaction, so it can be uniquely identified on the
|
|
58
|
-
* Lightning Network. *
|
|
59
|
-
*/
|
|
55
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
60
56
|
transactionHash?: string | undefined;
|
|
61
57
|
}
|
|
62
58
|
|
|
@@ -25,9 +25,9 @@ import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
|
|
|
25
25
|
import { SecretFromJson, SecretToJson } from "./Secret.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* This is an object representing a node managed by Lightspark and owned by the
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* This is an object representing a node managed by Lightspark and owned by the current connected
|
|
29
|
+
* account. This object contains information about the node’s configuration, state, and metadata.
|
|
30
|
+
* *
|
|
31
31
|
*/
|
|
32
32
|
interface LightsparkNode {
|
|
33
33
|
/**
|
|
@@ -46,8 +46,7 @@ interface LightsparkNode {
|
|
|
46
46
|
bitcoinNetwork: BitcoinNetwork;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* The name of this node in the network.
|
|
50
|
-
* It will be the most human-readable option possible,
|
|
49
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
51
50
|
* depending on the data available for this node.
|
|
52
51
|
**/
|
|
53
52
|
displayName: string;
|
|
@@ -56,8 +55,8 @@ interface LightsparkNode {
|
|
|
56
55
|
ownerId: string;
|
|
57
56
|
|
|
58
57
|
/**
|
|
59
|
-
* The utxos of the channels that are connected to this node.
|
|
60
|
-
*
|
|
58
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
59
|
+
* pre-screening.
|
|
61
60
|
**/
|
|
62
61
|
umaPrescreeningUtxos: string[];
|
|
63
62
|
|
|
@@ -65,34 +64,30 @@ interface LightsparkNode {
|
|
|
65
64
|
typename: string;
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
|
-
* A name that identifies the node. It has no importance in terms of
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* node operator.
|
|
67
|
+
* A name that identifies the node. It has no importance in terms of operating the node,
|
|
68
|
+
* it is just a way to identify and search for commercial services or popular nodes.
|
|
69
|
+
* This alias can be changed at any time by the node operator.
|
|
72
70
|
**/
|
|
73
71
|
alias?: string | undefined;
|
|
74
72
|
|
|
75
73
|
/**
|
|
76
|
-
* A hexadecimal string that describes a color. For example "#000000" is
|
|
77
|
-
*
|
|
78
|
-
* node,
|
|
74
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
75
|
+
* white. It has no importance in terms of operating the node,
|
|
79
76
|
* it is just a way to visually differentiate nodes.
|
|
80
77
|
* That color can be changed at any time by the node operator.
|
|
81
78
|
**/
|
|
82
79
|
color?: string | undefined;
|
|
83
80
|
|
|
84
81
|
/**
|
|
85
|
-
* A summary metric used to capture how well positioned a node is to send,
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* efficient. The value is an integer ranging between 0 and 10 (bounds
|
|
89
|
-
* included).
|
|
82
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
83
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
84
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
90
85
|
**/
|
|
91
86
|
conductivity?: number | undefined;
|
|
92
87
|
|
|
93
88
|
/**
|
|
94
|
-
* The public key of this node. It acts as a unique identifier of this node
|
|
95
|
-
*
|
|
89
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
90
|
+
* Network. *
|
|
96
91
|
*/
|
|
97
92
|
publicKey?: string | undefined;
|
|
98
93
|
|
|
@@ -100,8 +95,8 @@ interface LightsparkNode {
|
|
|
100
95
|
status?: LightsparkNodeStatus | undefined;
|
|
101
96
|
|
|
102
97
|
/**
|
|
103
|
-
* The sum of the balance on the Bitcoin Network, channel balances,
|
|
104
|
-
*
|
|
98
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this
|
|
99
|
+
* node.
|
|
105
100
|
*
|
|
106
101
|
* @deprecated Use `balances` instead.
|
|
107
102
|
**/
|
|
@@ -115,8 +110,7 @@ interface LightsparkNode {
|
|
|
115
110
|
totalLocalBalance?: CurrencyAmount | undefined;
|
|
116
111
|
|
|
117
112
|
/**
|
|
118
|
-
* The sum of the channel balances (online only) that are available to send
|
|
119
|
-
* on this node.
|
|
113
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
120
114
|
*
|
|
121
115
|
* @deprecated Use `balances` instead.
|
|
122
116
|
**/
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
export enum LightsparkNodeStatus {
|
|
4
4
|
/**
|
|
5
|
-
* This is an enum value that represents values that could be added in the
|
|
6
|
-
*
|
|
7
|
-
* added without notice.
|
|
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.
|
|
8
7
|
*/
|
|
9
8
|
FUTURE_VALUE = "FUTURE_VALUE",
|
|
10
9
|
|
|
@@ -8,15 +8,12 @@ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
|
|
|
8
8
|
interface LightsparkNodeToChannelsConnection {
|
|
9
9
|
/**
|
|
10
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
|
-
*
|
|
11
|
+
* It is different from the number of objects returned in the current page (in the `entities`
|
|
12
|
+
* field).
|
|
13
13
|
**/
|
|
14
14
|
count: number;
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* An object that holds pagination information about the objects in this
|
|
18
|
-
* connection. *
|
|
19
|
-
*/
|
|
16
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
20
17
|
pageInfo: PageInfo;
|
|
21
18
|
|
|
22
19
|
/** The channels for the current page of this connection. **/
|
|
@@ -44,54 +44,48 @@ 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.
|
|
48
|
-
* It will be the most human-readable option possible,
|
|
47
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
49
48
|
* depending on the data available for this node.
|
|
50
49
|
**/
|
|
51
50
|
public readonly displayName: string,
|
|
52
51
|
/** The owner of this LightsparkNode. **/
|
|
53
52
|
public readonly ownerId: string,
|
|
54
53
|
/**
|
|
55
|
-
* The utxos of the channels that are connected to this node.
|
|
56
|
-
*
|
|
54
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
55
|
+
* pre-screening.
|
|
57
56
|
**/
|
|
58
57
|
public readonly umaPrescreeningUtxos: string[],
|
|
59
58
|
/** The typename of the object **/
|
|
60
59
|
public readonly typename: string,
|
|
61
60
|
/**
|
|
62
|
-
* A name that identifies the node.
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* popular nodes. This alias can be changed at any time by the node
|
|
66
|
-
* operator.
|
|
61
|
+
* A name that identifies the node. It has no importance in terms of operating the node,
|
|
62
|
+
* it is just a way to identify and search for commercial services or popular nodes.
|
|
63
|
+
* This alias can be changed at any time by the node operator.
|
|
67
64
|
**/
|
|
68
65
|
public readonly alias?: string | undefined,
|
|
69
66
|
/**
|
|
70
|
-
* A hexadecimal string that describes a color. For example "#000000" is
|
|
71
|
-
*
|
|
72
|
-
* the node,
|
|
67
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
68
|
+
* white. It has no importance in terms of operating the node,
|
|
73
69
|
* it is just a way to visually differentiate nodes.
|
|
74
70
|
* That color can be changed at any time by the node operator.
|
|
75
71
|
**/
|
|
76
72
|
public readonly color?: string | undefined,
|
|
77
73
|
/**
|
|
78
|
-
* A summary metric used to capture how well positioned a node is to send,
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* capital efficient. The value is an integer ranging between 0 and 10
|
|
82
|
-
* (bounds included).
|
|
74
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
75
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
76
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
83
77
|
**/
|
|
84
78
|
public readonly conductivity?: number | undefined,
|
|
85
79
|
/**
|
|
86
|
-
* The public key of this node. It acts as a unique identifier of this node
|
|
87
|
-
*
|
|
80
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
81
|
+
* Network. *
|
|
88
82
|
*/
|
|
89
83
|
public readonly publicKey?: string | undefined,
|
|
90
84
|
/** The current status of this node. **/
|
|
91
85
|
public readonly status?: LightsparkNodeStatus | undefined,
|
|
92
86
|
/**
|
|
93
|
-
* The sum of the balance on the Bitcoin Network, channel balances,
|
|
94
|
-
*
|
|
87
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this
|
|
88
|
+
* node.
|
|
95
89
|
*
|
|
96
90
|
* @deprecated Use `balances` instead.
|
|
97
91
|
**/
|
|
@@ -103,15 +97,13 @@ class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
|
|
|
103
97
|
**/
|
|
104
98
|
public readonly totalLocalBalance?: CurrencyAmount | undefined,
|
|
105
99
|
/**
|
|
106
|
-
* The sum of the channel balances (online only) that are available to send
|
|
107
|
-
* on this node.
|
|
100
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
108
101
|
*
|
|
109
102
|
* @deprecated Use `balances` instead.
|
|
110
103
|
**/
|
|
111
104
|
public readonly localBalance?: CurrencyAmount | undefined,
|
|
112
105
|
/**
|
|
113
|
-
* The sum of the channel balances that are available to receive on this
|
|
114
|
-
* node.
|
|
106
|
+
* The sum of the channel balances that are available to receive on this node.
|
|
115
107
|
*
|
|
116
108
|
* @deprecated Use `balances` instead.
|
|
117
109
|
**/
|
|
@@ -125,8 +117,8 @@ class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
|
|
|
125
117
|
/** The balances that describe the funds in this node. **/
|
|
126
118
|
public readonly balances?: Balances | undefined,
|
|
127
119
|
/**
|
|
128
|
-
* The private key client is using to sign a GraphQL request which will be
|
|
129
|
-
*
|
|
120
|
+
* The private key client is using to sign a GraphQL request which will be verified at server
|
|
121
|
+
* side. *
|
|
130
122
|
*/
|
|
131
123
|
public readonly encryptedSigningPrivateKey?: Secret | undefined,
|
|
132
124
|
) {
|