@lightsparkdev/lightspark-sdk 1.3.1 → 1.4.0
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 +7 -0
- package/dist/{BitcoinNetwork-972b1d01.d.ts → BitcoinNetwork-4f6ea015.d.ts} +2 -2
- package/dist/{chunk-Y55D3PD4.js → chunk-LCDROGA5.js} +938 -725
- package/dist/env.d.cts +1 -1
- package/dist/env.d.ts +1 -1
- package/dist/{index-a5028d74.d.ts → index-6f544cad.d.ts} +711 -714
- package/dist/index.cjs +309 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +96 -2
- package/dist/objects/index.cjs +1339 -1126
- 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 +1 -1
- package/src/client.ts +77 -1
- package/src/graphql/RegisterPayment.ts +21 -0
- package/src/graphql/ScreenNode.ts +15 -0
- package/src/objects/Account.ts +98 -5
- package/src/objects/AccountToApiTokensConnection.ts +2 -3
- package/src/objects/AccountToChannelsConnection.ts +2 -3
- package/src/objects/AccountToNodesConnection.ts +2 -3
- package/src/objects/AccountToPaymentRequestsConnection.ts +2 -3
- package/src/objects/AccountToTransactionsConnection.ts +6 -7
- package/src/objects/AccountToWalletsConnection.ts +2 -3
- package/src/objects/AccountToWithdrawalRequestsConnection.ts +71 -0
- package/src/objects/ApiToken.ts +5 -6
- package/src/objects/Balances.ts +9 -12
- package/src/objects/BitcoinNetwork.ts +2 -2
- package/src/objects/Channel.ts +7 -10
- package/src/objects/ChannelClosingTransaction.ts +3 -4
- package/src/objects/ChannelOpeningTransaction.ts +3 -4
- package/src/objects/ChannelStatus.ts +5 -9
- package/src/objects/ChannelToTransactionsConnection.ts +6 -7
- package/src/objects/Connection.ts +85 -3
- package/src/objects/CreateApiTokenOutput.ts +3 -3
- package/src/objects/CreateLnurlInvoiceInput.ts +2 -3
- package/src/objects/CreateTestModePaymentInput.ts +2 -2
- package/src/objects/CreateTestModePaymentoutput.ts +2 -3
- package/src/objects/CurrencyUnit.ts +11 -17
- package/src/objects/Deposit.ts +5 -6
- package/src/objects/Entity.ts +21 -6
- package/src/objects/FeeEstimate.ts +2 -3
- package/src/objects/GraphNode.ts +10 -12
- package/src/objects/Hop.ts +5 -6
- package/src/objects/IncentivesStatus.ts +2 -3
- package/src/objects/IncomingPayment.ts +7 -7
- package/src/objects/IncomingPaymentAttempt.ts +2 -2
- package/src/objects/IncomingPaymentToAttemptsConnection.ts +2 -3
- package/src/objects/Invoice.ts +2 -2
- package/src/objects/InvoiceData.ts +4 -5
- package/src/objects/LightningTransaction.ts +5 -5
- package/src/objects/LightsparkNode.ts +8 -10
- package/src/objects/LightsparkNodeOwner.ts +2 -2
- package/src/objects/LightsparkNodeToChannelsConnection.ts +2 -3
- package/src/objects/LightsparkNodeWithOSK.ts +7 -8
- package/src/objects/LightsparkNodeWithRemoteSigning.ts +7 -8
- package/src/objects/Node.ts +9 -11
- package/src/objects/NodeToAddressesConnection.ts +2 -3
- package/src/objects/OnChainTransaction.ts +5 -6
- package/src/objects/OutgoingPayment.ts +5 -6
- package/src/objects/OutgoingPaymentAttempt.ts +12 -14
- package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +2 -3
- package/src/objects/OutgoingPaymentToAttemptsConnection.ts +2 -3
- package/src/objects/PageInfo.ts +3 -3
- package/src/objects/PaymentRequest.ts +2 -2
- package/src/objects/PaymentRequestData.ts +1 -2
- package/src/objects/RegisterPaymentInput.ts +7 -8
- package/src/objects/RequestWithdrawalInput.ts +2 -2
- package/src/objects/RiskRating.ts +1 -2
- package/src/objects/RoutingTransaction.ts +6 -8
- package/src/objects/ScreenNodeInput.ts +2 -3
- package/src/objects/SetInvoicePaymentHashInput.ts +2 -3
- package/src/objects/Signable.ts +2 -2
- package/src/objects/SignablePayload.ts +2 -2
- package/src/objects/Transaction.ts +3 -4
- package/src/objects/TransactionStatus.ts +1 -2
- package/src/objects/UmaInvitation.ts +2 -2
- package/src/objects/Wallet.ts +97 -8
- package/src/objects/WalletStatus.ts +5 -7
- package/src/objects/WalletToPaymentRequestsConnection.ts +2 -3
- package/src/objects/WalletToTransactionsConnection.ts +2 -3
- package/src/objects/WalletToWithdrawalRequestsConnection.ts +70 -0
- package/src/objects/Withdrawal.ts +5 -5
- package/src/objects/WithdrawalRequest.ts +43 -7
- package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +2 -3
- package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +2 -3
- package/src/objects/index.ts +2 -0
|
@@ -23,14 +23,14 @@ 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 Network.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* This is an object representing a transaction made over the Lightning Network. You can retrieve
|
|
27
|
+
* this object to receive information about a specific transaction made over Lightning for a
|
|
28
|
+
* Lightspark node. *
|
|
29
29
|
*/
|
|
30
30
|
interface LightningTransaction {
|
|
31
31
|
/**
|
|
32
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
33
|
-
*
|
|
32
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
33
|
+
* opaque string.
|
|
34
34
|
**/
|
|
35
35
|
id: string;
|
|
36
36
|
|
|
@@ -26,13 +26,12 @@ import { SecretFromJson, SecretToJson } from "./Secret.js";
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
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
|
-
* *
|
|
29
|
+
* account. This object contains information about the node’s configuration, state, and metadata. *
|
|
31
30
|
*/
|
|
32
31
|
interface LightsparkNode {
|
|
33
32
|
/**
|
|
34
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
35
|
-
*
|
|
33
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
34
|
+
* opaque string.
|
|
36
35
|
**/
|
|
37
36
|
id: string;
|
|
38
37
|
|
|
@@ -64,17 +63,16 @@ interface LightsparkNode {
|
|
|
64
63
|
typename: string;
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
|
-
* A name that identifies the node. It has no importance in terms of operating the node,
|
|
68
|
-
*
|
|
69
|
-
*
|
|
66
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
67
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
68
|
+
* be changed at any time by the node operator.
|
|
70
69
|
**/
|
|
71
70
|
alias?: string | undefined;
|
|
72
71
|
|
|
73
72
|
/**
|
|
74
73
|
* 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,
|
|
76
|
-
*
|
|
77
|
-
* That color can be changed at any time by the node operator.
|
|
74
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
75
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
78
76
|
**/
|
|
79
77
|
color?: string | undefined;
|
|
80
78
|
|
|
@@ -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.
|
|
13
|
-
*
|
|
12
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
13
|
+
* opaque string.
|
|
14
14
|
**/
|
|
15
15
|
id: string;
|
|
16
16
|
|
|
@@ -7,9 +7,8 @@ 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.
|
|
11
|
-
*
|
|
12
|
-
* field).
|
|
10
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
11
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
13
12
|
**/
|
|
14
13
|
count: number;
|
|
15
14
|
|
|
@@ -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.
|
|
37
|
-
*
|
|
36
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
37
|
+
* opaque string.
|
|
38
38
|
**/
|
|
39
39
|
public readonly id: string,
|
|
40
40
|
/** The date and time when the entity was first created. **/
|
|
@@ -58,16 +58,15 @@ class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
|
|
|
58
58
|
/** The typename of the object **/
|
|
59
59
|
public readonly typename: string,
|
|
60
60
|
/**
|
|
61
|
-
* A name that identifies the node. It has no importance in terms of operating the node,
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
62
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
63
|
+
* be changed at any time by the node operator.
|
|
64
64
|
**/
|
|
65
65
|
public readonly alias?: string | undefined,
|
|
66
66
|
/**
|
|
67
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,
|
|
69
|
-
*
|
|
70
|
-
* That color can be changed at any time by the node operator.
|
|
68
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
69
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
71
70
|
**/
|
|
72
71
|
public readonly color?: string | undefined,
|
|
73
72
|
/**
|
|
@@ -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.
|
|
35
|
-
*
|
|
34
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
35
|
+
* opaque string.
|
|
36
36
|
**/
|
|
37
37
|
public readonly id: string,
|
|
38
38
|
/** The date and time when the entity was first created. **/
|
|
@@ -56,16 +56,15 @@ class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
|
|
|
56
56
|
/** The typename of the object **/
|
|
57
57
|
public readonly typename: string,
|
|
58
58
|
/**
|
|
59
|
-
* A name that identifies the node. It has no importance in terms of operating the node,
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
60
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
61
|
+
* be changed at any time by the node operator.
|
|
62
62
|
**/
|
|
63
63
|
public readonly alias?: string | undefined,
|
|
64
64
|
/**
|
|
65
65
|
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
66
|
-
* white. It has no importance in terms of operating the node,
|
|
67
|
-
*
|
|
68
|
-
* That color can be changed at any time by the node operator.
|
|
66
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
67
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
69
68
|
**/
|
|
70
69
|
public readonly color?: string | undefined,
|
|
71
70
|
/**
|
package/src/objects/Node.ts
CHANGED
|
@@ -21,14 +21,13 @@ import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
|
|
|
21
21
|
import { SecretFromJson, SecretToJson } from "./Secret.js";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* This object is an interface representing a Lightning Node on the Lightning Network,
|
|
25
|
-
*
|
|
26
|
-
* *
|
|
24
|
+
* This object is an interface representing a Lightning Node on the Lightning Network, and could
|
|
25
|
+
* either be a Lightspark node or a node managed by a third party. *
|
|
27
26
|
*/
|
|
28
27
|
interface Node {
|
|
29
28
|
/**
|
|
30
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
31
|
-
*
|
|
29
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
30
|
+
* opaque string.
|
|
32
31
|
**/
|
|
33
32
|
id: string;
|
|
34
33
|
|
|
@@ -51,17 +50,16 @@ interface Node {
|
|
|
51
50
|
typename: string;
|
|
52
51
|
|
|
53
52
|
/**
|
|
54
|
-
* A name that identifies the node. It has no importance in terms of operating the node,
|
|
55
|
-
*
|
|
56
|
-
*
|
|
53
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
54
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
55
|
+
* be changed at any time by the node operator.
|
|
57
56
|
**/
|
|
58
57
|
alias?: string | undefined;
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
60
|
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
62
|
-
* white. It has no importance in terms of operating the node,
|
|
63
|
-
*
|
|
64
|
-
* That color can be changed at any time by the node operator.
|
|
61
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
62
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
65
63
|
**/
|
|
66
64
|
color?: string | undefined;
|
|
67
65
|
|
|
@@ -9,9 +9,8 @@ import { NodeAddressFromJson, NodeAddressToJson } from "./NodeAddress.js";
|
|
|
9
9
|
*/
|
|
10
10
|
interface NodeToAddressesConnection {
|
|
11
11
|
/**
|
|
12
|
-
* The total count of objects in this connection, using the current filters.
|
|
13
|
-
*
|
|
14
|
-
* field).
|
|
12
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
13
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
15
14
|
**/
|
|
16
15
|
count: number;
|
|
17
16
|
|
|
@@ -13,15 +13,14 @@ import TransactionStatus from "./TransactionStatus.js";
|
|
|
13
13
|
import type Withdrawal from "./Withdrawal.js";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* This object represents an L1 transaction that occurred on the Bitcoin Network.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* *
|
|
16
|
+
* This object represents an L1 transaction that occurred on the Bitcoin Network. You can retrieve
|
|
17
|
+
* this object to receive information about a specific on-chain transaction made on the Lightning
|
|
18
|
+
* Network associated with your Lightspark Node. *
|
|
20
19
|
*/
|
|
21
20
|
interface OnChainTransaction {
|
|
22
21
|
/**
|
|
23
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
24
|
-
*
|
|
22
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
23
|
+
* opaque string.
|
|
25
24
|
**/
|
|
26
25
|
id: string;
|
|
27
26
|
|
|
@@ -29,16 +29,15 @@ import type Transaction from "./Transaction.js";
|
|
|
29
29
|
import TransactionStatus from "./TransactionStatus.js";
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* This object represents a Lightning Network payment sent from a Lightspark Node.
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* *
|
|
32
|
+
* This object represents a Lightning Network payment sent from a Lightspark Node. You can retrieve
|
|
33
|
+
* this object to receive payment related information about any payment sent from your Lightspark
|
|
34
|
+
* Node on the Lightning Network. *
|
|
36
35
|
*/
|
|
37
36
|
class OutgoingPayment implements LightningTransaction, Transaction, Entity {
|
|
38
37
|
constructor(
|
|
39
38
|
/**
|
|
40
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
41
|
-
*
|
|
39
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
40
|
+
* opaque string.
|
|
42
41
|
**/
|
|
43
42
|
public readonly id: string,
|
|
44
43
|
/** The date and time when this transaction was initiated. **/
|
|
@@ -20,17 +20,16 @@ import type OutgoingPaymentAttemptToHopsConnection from "./OutgoingPaymentAttemp
|
|
|
20
20
|
import { OutgoingPaymentAttemptToHopsConnectionFromJson } from "./OutgoingPaymentAttemptToHopsConnection.js";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* This object represents an attempted Lightning Network payment sent from a Lightspark Node.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* *
|
|
23
|
+
* This object represents an attempted Lightning Network payment sent from a Lightspark Node. You
|
|
24
|
+
* can retrieve this object to receive payment related information about any payment attempt sent
|
|
25
|
+
* from your Lightspark Node on the Lightning Network, including any potential reasons the payment
|
|
26
|
+
* may have failed. *
|
|
28
27
|
*/
|
|
29
28
|
class OutgoingPaymentAttempt implements Entity {
|
|
30
29
|
constructor(
|
|
31
30
|
/**
|
|
32
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
33
|
-
*
|
|
31
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
32
|
+
* opaque string.
|
|
34
33
|
**/
|
|
35
34
|
public readonly id: string,
|
|
36
35
|
/** The date and time when the entity was first created. **/
|
|
@@ -55,16 +54,15 @@ class OutgoingPaymentAttempt implements Entity {
|
|
|
55
54
|
/** The time the outgoing payment attempt failed or succeeded. **/
|
|
56
55
|
public readonly resolvedAt?: string | undefined,
|
|
57
56
|
/**
|
|
58
|
-
* The total amount of funds required to complete a payment over this route.
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
57
|
+
* The total amount of funds required to complete a payment over this route. This value
|
|
58
|
+
* includes the cumulative fees for each hop. As a result, the attempt extended to the
|
|
59
|
+
* first-hop in the route will need to have at least this much value, otherwise the route will
|
|
60
|
+
* fail at an intermediate node due to an insufficient amount.
|
|
62
61
|
**/
|
|
63
62
|
public readonly amount?: CurrencyAmount | undefined,
|
|
64
63
|
/**
|
|
65
|
-
* The sum of the fees paid at each hop within the route of this attempt.
|
|
66
|
-
*
|
|
67
|
-
* ourselves.
|
|
64
|
+
* The sum of the fees paid at each hop within the route of this attempt. In the case of a
|
|
65
|
+
* one-hop payment, this value will be zero as we don't need to pay a fee to ourselves.
|
|
68
66
|
**/
|
|
69
67
|
public readonly fees?: CurrencyAmount | undefined,
|
|
70
68
|
/** The channel snapshot at the time the outgoing payment attempt was made. **/
|
|
@@ -11,9 +11,8 @@ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
|
|
|
11
11
|
*/
|
|
12
12
|
interface OutgoingPaymentAttemptToHopsConnection {
|
|
13
13
|
/**
|
|
14
|
-
* The total count of objects in this connection, using the current filters.
|
|
15
|
-
*
|
|
16
|
-
* field).
|
|
14
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
15
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
17
16
|
**/
|
|
18
17
|
count: number;
|
|
19
18
|
|
|
@@ -8,9 +8,8 @@ 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.
|
|
12
|
-
*
|
|
13
|
-
* field).
|
|
11
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
12
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
14
13
|
**/
|
|
15
14
|
count: number;
|
|
16
15
|
|
package/src/objects/PageInfo.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* This is an object representing information about a page returned by the Lightspark API.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* This is an object representing information about a page returned by the Lightspark API. For more
|
|
5
|
+
* information, please see the “Pagination” section of our API docs for more information about its
|
|
6
|
+
* usage. *
|
|
7
7
|
*/
|
|
8
8
|
interface PageInfo {
|
|
9
9
|
hasNextPage?: boolean | undefined;
|
|
@@ -17,8 +17,8 @@ import PaymentRequestStatus from "./PaymentRequestStatus.js";
|
|
|
17
17
|
*/
|
|
18
18
|
interface PaymentRequest {
|
|
19
19
|
/**
|
|
20
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
21
|
-
*
|
|
20
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
21
|
+
* opaque string.
|
|
22
22
|
**/
|
|
23
23
|
id: string;
|
|
24
24
|
|
|
@@ -11,8 +11,7 @@ import { NodeFromJson, NodeToJson } from "./Node.js";
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* This object is an interface of a payment request on the Lightning Network (i.e., a Lightning
|
|
14
|
-
* Invoice). It contains data related to parsing the payment details of a Lightning Invoice.
|
|
15
|
-
* *
|
|
14
|
+
* Invoice). It contains data related to parsing the payment details of a Lightning Invoice. *
|
|
16
15
|
*/
|
|
17
16
|
interface PaymentRequestData {
|
|
18
17
|
encodedPaymentRequest: string;
|
|
@@ -5,22 +5,21 @@ import PaymentDirection from "./PaymentDirection.js";
|
|
|
5
5
|
|
|
6
6
|
interface RegisterPaymentInput {
|
|
7
7
|
/**
|
|
8
|
-
* The compliance provider that is going to screen the node.
|
|
9
|
-
*
|
|
10
|
-
* account setting page.
|
|
8
|
+
* The compliance provider that is going to screen the node. You need to be a customer of the
|
|
9
|
+
* selected provider and store the API key on the Lightspark account setting page.
|
|
11
10
|
**/
|
|
12
11
|
provider: ComplianceProvider;
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
|
-
* The Lightspark ID of the lightning payment you want to register.
|
|
16
|
-
*
|
|
14
|
+
* The Lightspark ID of the lightning payment you want to register. It can be the id of either
|
|
15
|
+
* an OutgoingPayment or an IncomingPayment.
|
|
17
16
|
**/
|
|
18
17
|
paymentId: string;
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
|
-
* The public key of the counterparty lightning node,
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* The public key of the counterparty lightning node, which would be the public key of the
|
|
21
|
+
* recipient node if it is to register an outgoing payment, or the public key of the sender
|
|
22
|
+
* node if it is to register an incoming payment.
|
|
24
23
|
**/
|
|
25
24
|
nodePubkey: string;
|
|
26
25
|
|
|
@@ -10,8 +10,8 @@ interface RequestWithdrawalInput {
|
|
|
10
10
|
bitcoinAddress: string;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* The amount you want to withdraw from this node in Satoshis.
|
|
14
|
-
*
|
|
13
|
+
* The amount you want to withdraw from this node in Satoshis. Use the special value -1 to
|
|
14
|
+
* withdrawal all funds from this node.
|
|
15
15
|
**/
|
|
16
16
|
amountSats: number;
|
|
17
17
|
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This is an enum of the potential risk ratings related to a transaction made over the Lightning
|
|
5
|
-
* Network. These risk ratings are returned from the CryptoSanctionScreeningProvider.
|
|
6
|
-
* *
|
|
5
|
+
* Network. These risk ratings are returned from the CryptoSanctionScreeningProvider. *
|
|
7
6
|
*/
|
|
8
7
|
export enum RiskRating {
|
|
9
8
|
/**
|
|
@@ -13,14 +13,13 @@ import TransactionStatus from "./TransactionStatus.js";
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* This object represents a transaction that was forwarded through a Lightspark node on the
|
|
16
|
-
* Lightning Network, i.e., a routed transaction.
|
|
17
|
-
*
|
|
18
|
-
* Lightspark Node. *
|
|
16
|
+
* Lightning Network, i.e., a routed transaction. You can retrieve this object to receive
|
|
17
|
+
* information about any transaction routed through your Lightspark Node. *
|
|
19
18
|
*/
|
|
20
19
|
interface RoutingTransaction {
|
|
21
20
|
/**
|
|
22
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
23
|
-
*
|
|
21
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
22
|
+
* opaque string.
|
|
24
23
|
**/
|
|
25
24
|
id: string;
|
|
26
25
|
|
|
@@ -52,9 +51,8 @@ interface RoutingTransaction {
|
|
|
52
51
|
outgoingChannelId?: string | undefined;
|
|
53
52
|
|
|
54
53
|
/**
|
|
55
|
-
* The fees collected by the node when routing this transaction.
|
|
56
|
-
*
|
|
57
|
-
* collected.
|
|
54
|
+
* The fees collected by the node when routing this transaction. We subtract the outgoing
|
|
55
|
+
* amount to the incoming amount to determine how much fees were collected.
|
|
58
56
|
**/
|
|
59
57
|
fees?: CurrencyAmount | undefined;
|
|
60
58
|
|
|
@@ -4,9 +4,8 @@ import ComplianceProvider from "./ComplianceProvider.js";
|
|
|
4
4
|
|
|
5
5
|
interface ScreenNodeInput {
|
|
6
6
|
/**
|
|
7
|
-
* The compliance provider that is going to screen the node.
|
|
8
|
-
*
|
|
9
|
-
* account setting page.
|
|
7
|
+
* The compliance provider that is going to screen the node. You need to be a customer of the
|
|
8
|
+
* selected provider and store the API key on the Lightspark account setting page.
|
|
10
9
|
**/
|
|
11
10
|
provider: ComplianceProvider;
|
|
12
11
|
|
|
@@ -8,9 +8,8 @@ interface SetInvoicePaymentHashInput {
|
|
|
8
8
|
paymentHash: string;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* The 32-byte nonce used to generate the invoice preimage if applicable.
|
|
12
|
-
*
|
|
13
|
-
* preimage.
|
|
11
|
+
* The 32-byte nonce used to generate the invoice preimage if applicable. It will later be
|
|
12
|
+
* included in RELEASE_PAYMENT_PREIMAGE webhook to help recover the raw preimage.
|
|
14
13
|
**/
|
|
15
14
|
preimageNonce?: string | undefined;
|
|
16
15
|
}
|
package/src/objects/Signable.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { type Query } from "@lightsparkdev/core";
|
|
|
4
4
|
|
|
5
5
|
interface Signable {
|
|
6
6
|
/**
|
|
7
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
8
|
-
*
|
|
7
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
8
|
+
* opaque string.
|
|
9
9
|
**/
|
|
10
10
|
id: string;
|
|
11
11
|
|
|
@@ -5,8 +5,8 @@ import SignablePayloadStatus from "./SignablePayloadStatus.js";
|
|
|
5
5
|
|
|
6
6
|
interface SignablePayload {
|
|
7
7
|
/**
|
|
8
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
9
|
-
*
|
|
8
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
9
|
+
* opaque string.
|
|
10
10
|
**/
|
|
11
11
|
id: string;
|
|
12
12
|
|
|
@@ -29,13 +29,12 @@ import type Withdrawal from "./Withdrawal.js";
|
|
|
29
29
|
/**
|
|
30
30
|
* This object represents a payment transaction. The transaction can occur either on a Bitcoin
|
|
31
31
|
* Network, or over the Lightning Network. You can retrieve this object to receive specific
|
|
32
|
-
* information about a particular transaction tied to your Lightspark Node.
|
|
33
|
-
* *
|
|
32
|
+
* information about a particular transaction tied to your Lightspark Node. *
|
|
34
33
|
*/
|
|
35
34
|
interface Transaction {
|
|
36
35
|
/**
|
|
37
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
38
|
-
*
|
|
36
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
37
|
+
* opaque string.
|
|
39
38
|
**/
|
|
40
39
|
id: string;
|
|
41
40
|
|
|
@@ -17,8 +17,7 @@ export enum TransactionStatus {
|
|
|
17
17
|
/** Transaction has been initiated and is currently in-flight. **/
|
|
18
18
|
PENDING = "PENDING",
|
|
19
19
|
/**
|
|
20
|
-
* For transaction type PAYMENT_REQUEST only. No payments have been made to a payment request.
|
|
21
|
-
* *
|
|
20
|
+
* For transaction type PAYMENT_REQUEST only. No payments have been made to a payment request. *
|
|
22
21
|
*/
|
|
23
22
|
NOT_STARTED = "NOT_STARTED",
|
|
24
23
|
/** For transaction type PAYMENT_REQUEST only. A payment request has expired. **/
|
|
@@ -7,8 +7,8 @@ import IncentivesStatus from "./IncentivesStatus.js";
|
|
|
7
7
|
/** This is an object representing an UMA.ME invitation. **/
|
|
8
8
|
interface UmaInvitation {
|
|
9
9
|
/**
|
|
10
|
-
* The unique identifier of this entity across all Lightspark systems.
|
|
11
|
-
*
|
|
10
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
11
|
+
* opaque string.
|
|
12
12
|
**/
|
|
13
13
|
id: string;
|
|
14
14
|
|