@lightsparkdev/lightspark-sdk 1.8.2 → 1.8.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.
- package/CHANGELOG.md +11 -0
- package/dist/BitcoinNetwork-CIfB1c0X.d.ts +21 -0
- package/dist/{chunk-4KFNQOMH.js → chunk-3SPTFEYJ.js} +1 -0
- package/dist/env.d.cts +2 -2
- package/dist/env.d.ts +2 -2
- package/dist/env.js +1 -1
- package/dist/index-B83OtHZi.d.cts +4819 -0
- package/dist/{index-27dad75b.d.ts → index-uoUldBPd.d.ts} +31 -18
- package/dist/index.cjs +20 -27
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -15
- package/dist/objects/index.cjs +1 -0
- package/dist/objects/index.d.cts +2 -2
- package/dist/objects/index.d.ts +2 -2
- package/dist/objects/index.js +2 -2
- package/dist/{text-encoding-26SMKBAQ.js → text-encoding-3OZOB4NR.js} +6 -11
- package/package.json +9 -12
- package/src/objects/Channel.ts +2 -3
- package/src/objects/ChannelClosingTransaction.ts +1 -1
- package/src/objects/ChannelOpeningTransaction.ts +1 -1
- package/src/objects/FundNodeInput.ts +4 -0
- package/src/objects/Hop.ts +1 -1
- package/src/objects/IncomingPayment.ts +1 -2
- package/src/objects/IncomingPaymentsForPaymentHashQueryInput.ts +34 -0
- package/src/objects/IncomingPaymentsForPaymentHashQueryOutput.ts +37 -0
- package/src/objects/InvoiceForPaymentHashOutput.ts +1 -1
- package/src/objects/LightningTransaction.ts +10 -8
- package/src/objects/LightsparkNodeOwner.ts +1 -1
- package/src/objects/OnChainTransaction.ts +6 -4
- package/src/objects/OutgoingPayment.ts +1 -1
- package/src/objects/OutgoingPaymentAttempt.ts +1 -2
- package/src/objects/OutgoingPaymentForIdempotencyKeyOutput.ts +1 -2
- package/src/objects/RoutingTransaction.ts +2 -4
- package/src/objects/Transaction.ts +16 -12
- package/src/objects/Wallet.ts +1 -1
- package/src/objects/WebhookEventType.ts +2 -0
- package/src/objects/WithdrawalRequest.ts +1 -1
- package/src/objects/index.ts +9 -7
- /package/dist/{BitcoinNetwork-4f6ea015.d.ts → BitcoinNetwork-CIfB1c0X.d.cts} +0 -0
- /package/dist/{chunk-BMTV3EA2.js → chunk-FTA5RKYX.js} +0 -0
|
@@ -0,0 +1,4819 @@
|
|
|
1
|
+
import { Maybe, Query, AuthProvider, CryptoInterface, SigningKey, KeyOrAliasType, LoggingLevel } from '@lightsparkdev/core';
|
|
2
|
+
import Observable from 'zen-observable';
|
|
3
|
+
import { B as BitcoinNetwork } from './BitcoinNetwork-CIfB1c0X.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Args for creating a new SigningKeyLoader. Must be one of the sub types.
|
|
7
|
+
*/
|
|
8
|
+
type SigningKeyLoaderArgs = NodeIdAndPasswordSigningKeyLoaderArgs | MasterSeedSigningKeyLoaderArgs;
|
|
9
|
+
/**
|
|
10
|
+
* Args for creating a new SigningKeyLoader from a node ID and password.
|
|
11
|
+
* This cannot be used if you are using remote signing.
|
|
12
|
+
* It is used to recover an RSA operation signing key using the password you
|
|
13
|
+
* chose when setting up your node. For REGTEST nodes, the password is
|
|
14
|
+
* "1234!@#$".
|
|
15
|
+
*/
|
|
16
|
+
interface NodeIdAndPasswordSigningKeyLoaderArgs {
|
|
17
|
+
password: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Args for creating a new SigningKeyLoader from a master seed and network.
|
|
21
|
+
* This should be used if you are using remote signing,
|
|
22
|
+
* rather than an RSA operation signing key.
|
|
23
|
+
*/
|
|
24
|
+
interface MasterSeedSigningKeyLoaderArgs {
|
|
25
|
+
masterSeed: Uint8Array;
|
|
26
|
+
network: BitcoinNetwork;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** This enum identifies the unit of currency associated with a CurrencyAmount. **/
|
|
30
|
+
declare enum CurrencyUnit {
|
|
31
|
+
/**
|
|
32
|
+
* This is an enum value that represents values that could be added in the future.
|
|
33
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
34
|
+
*/
|
|
35
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
36
|
+
/**
|
|
37
|
+
* Bitcoin is the cryptocurrency native to the Bitcoin network. It is used as the native medium
|
|
38
|
+
* for value transfer for the Lightning Network. *
|
|
39
|
+
*/
|
|
40
|
+
BITCOIN = "BITCOIN",
|
|
41
|
+
/**
|
|
42
|
+
* 0.00000001 (10e-8) Bitcoin or one hundred millionth of a Bitcoin. This is the unit most
|
|
43
|
+
* commonly used in Lightning transactions. *
|
|
44
|
+
*/
|
|
45
|
+
SATOSHI = "SATOSHI",
|
|
46
|
+
/**
|
|
47
|
+
* 0.001 Satoshi, or 10e-11 Bitcoin. We recommend using the Satoshi unit instead when possible. *
|
|
48
|
+
*/
|
|
49
|
+
MILLISATOSHI = "MILLISATOSHI",
|
|
50
|
+
/** United States Dollar. **/
|
|
51
|
+
USD = "USD",
|
|
52
|
+
/**
|
|
53
|
+
* 0.000000001 (10e-9) Bitcoin or a billionth of a Bitcoin. We recommend using the Satoshi unit
|
|
54
|
+
* instead when possible. *
|
|
55
|
+
*/
|
|
56
|
+
NANOBITCOIN = "NANOBITCOIN",
|
|
57
|
+
/**
|
|
58
|
+
* 0.000001 (10e-6) Bitcoin or a millionth of a Bitcoin. We recommend using the Satoshi unit
|
|
59
|
+
* instead when possible. *
|
|
60
|
+
*/
|
|
61
|
+
MICROBITCOIN = "MICROBITCOIN",
|
|
62
|
+
/**
|
|
63
|
+
* 0.001 (10e-3) Bitcoin or a thousandth of a Bitcoin. We recommend using the Satoshi unit instead
|
|
64
|
+
* when possible. *
|
|
65
|
+
*/
|
|
66
|
+
MILLIBITCOIN = "MILLIBITCOIN"
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** This object represents the value and unit for an amount of currency. **/
|
|
70
|
+
interface CurrencyAmount {
|
|
71
|
+
/** The original numeric value for this CurrencyAmount. **/
|
|
72
|
+
originalValue: number;
|
|
73
|
+
/** The original unit of currency for this CurrencyAmount. **/
|
|
74
|
+
originalUnit: CurrencyUnit;
|
|
75
|
+
/** The unit of user's preferred currency. **/
|
|
76
|
+
preferredCurrencyUnit: CurrencyUnit;
|
|
77
|
+
/**
|
|
78
|
+
* The rounded numeric value for this CurrencyAmount in the very base level of user's preferred
|
|
79
|
+
* currency. For example, for USD, the value will be in cents.
|
|
80
|
+
**/
|
|
81
|
+
preferredCurrencyValueRounded: number;
|
|
82
|
+
/**
|
|
83
|
+
* The approximate float value for this CurrencyAmount in the very base level of user's
|
|
84
|
+
* preferred currency. For example, for USD, the value will be in cents.
|
|
85
|
+
**/
|
|
86
|
+
preferredCurrencyValueApprox: number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare enum LightsparkNodeStatus {
|
|
90
|
+
/**
|
|
91
|
+
* This is an enum value that represents values that could be added in the future.
|
|
92
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
93
|
+
*/
|
|
94
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
95
|
+
CREATED = "CREATED",
|
|
96
|
+
DEPLOYED = "DEPLOYED",
|
|
97
|
+
STARTED = "STARTED",
|
|
98
|
+
SYNCING = "SYNCING",
|
|
99
|
+
READY = "READY",
|
|
100
|
+
STOPPED = "STOPPED",
|
|
101
|
+
TERMINATED = "TERMINATED",
|
|
102
|
+
TERMINATING = "TERMINATING",
|
|
103
|
+
WALLET_LOCKED = "WALLET_LOCKED",
|
|
104
|
+
FAILED_TO_DEPLOY = "FAILED_TO_DEPLOY"
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* This is an enum of the potential types of addresses that a node on the Lightning Network can
|
|
109
|
+
* have. *
|
|
110
|
+
*/
|
|
111
|
+
declare enum NodeAddressType {
|
|
112
|
+
/**
|
|
113
|
+
* This is an enum value that represents values that could be added in the future.
|
|
114
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
115
|
+
*/
|
|
116
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
117
|
+
IPV4 = "IPV4",
|
|
118
|
+
IPV6 = "IPV6",
|
|
119
|
+
TOR = "TOR"
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
type AccountDashboard = {
|
|
123
|
+
id: string;
|
|
124
|
+
name: Maybe<string>;
|
|
125
|
+
nodes: {
|
|
126
|
+
id: string;
|
|
127
|
+
color: Maybe<string>;
|
|
128
|
+
displayName: string;
|
|
129
|
+
publicKey: Maybe<string>;
|
|
130
|
+
status: Maybe<LightsparkNodeStatus>;
|
|
131
|
+
addresses: {
|
|
132
|
+
count: number;
|
|
133
|
+
entities: {
|
|
134
|
+
address: string;
|
|
135
|
+
type: NodeAddressType;
|
|
136
|
+
}[];
|
|
137
|
+
};
|
|
138
|
+
localBalance: Maybe<CurrencyAmount>;
|
|
139
|
+
remoteBalance: Maybe<CurrencyAmount>;
|
|
140
|
+
blockchainBalance: {
|
|
141
|
+
availableBalance: Maybe<CurrencyAmount>;
|
|
142
|
+
totalBalance: Maybe<CurrencyAmount>;
|
|
143
|
+
} | null;
|
|
144
|
+
}[];
|
|
145
|
+
blockchainBalance: Maybe<{
|
|
146
|
+
l1Balance: Maybe<CurrencyAmount>;
|
|
147
|
+
requiredReserve: Maybe<CurrencyAmount>;
|
|
148
|
+
availableBalance: Maybe<CurrencyAmount>;
|
|
149
|
+
unconfirmedBalance: Maybe<CurrencyAmount>;
|
|
150
|
+
}>;
|
|
151
|
+
localBalance: Maybe<CurrencyAmount>;
|
|
152
|
+
remoteBalance: Maybe<CurrencyAmount>;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* This is an enum of the potential permissions that a Lightspark user can have in regards to
|
|
157
|
+
* account management. *
|
|
158
|
+
*/
|
|
159
|
+
declare enum Permission {
|
|
160
|
+
/**
|
|
161
|
+
* This is an enum value that represents values that could be added in the future.
|
|
162
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
163
|
+
*/
|
|
164
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
165
|
+
ALL = "ALL",
|
|
166
|
+
MAINNET_VIEW = "MAINNET_VIEW",
|
|
167
|
+
MAINNET_TRANSACT = "MAINNET_TRANSACT",
|
|
168
|
+
MAINNET_MANAGE = "MAINNET_MANAGE",
|
|
169
|
+
TESTNET_VIEW = "TESTNET_VIEW",
|
|
170
|
+
TESTNET_TRANSACT = "TESTNET_TRANSACT",
|
|
171
|
+
TESTNET_MANAGE = "TESTNET_MANAGE",
|
|
172
|
+
REGTEST_VIEW = "REGTEST_VIEW",
|
|
173
|
+
REGTEST_TRANSACT = "REGTEST_TRANSACT",
|
|
174
|
+
REGTEST_MANAGE = "REGTEST_MANAGE",
|
|
175
|
+
USER_VIEW = "USER_VIEW",
|
|
176
|
+
USER_MANAGE = "USER_MANAGE",
|
|
177
|
+
ACCOUNT_VIEW = "ACCOUNT_VIEW",
|
|
178
|
+
ACCOUNT_MANAGE = "ACCOUNT_MANAGE"
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* This is an object representing a Lightspark API token, that can be used to authenticate this
|
|
183
|
+
* account when making API calls or using our SDKs. See the “Authentication” section of our API
|
|
184
|
+
* docs for more details on its usage. *
|
|
185
|
+
*/
|
|
186
|
+
interface ApiToken {
|
|
187
|
+
/**
|
|
188
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
189
|
+
* opaque string.
|
|
190
|
+
**/
|
|
191
|
+
id: string;
|
|
192
|
+
/** The date and time when the entity was first created. **/
|
|
193
|
+
createdAt: string;
|
|
194
|
+
/** The date and time when the entity was last updated. **/
|
|
195
|
+
updatedAt: string;
|
|
196
|
+
/**
|
|
197
|
+
* An opaque identifier that should be used as a client_id (or username) in the HTTP Basic
|
|
198
|
+
* Authentication scheme when issuing requests against the Lightspark API.
|
|
199
|
+
**/
|
|
200
|
+
clientId: string;
|
|
201
|
+
/**
|
|
202
|
+
* An arbitrary name chosen by the creator of the token to help identify the token in the list
|
|
203
|
+
* of tokens that have been created for the account.
|
|
204
|
+
**/
|
|
205
|
+
name: string;
|
|
206
|
+
/** A list of permissions granted to the token. **/
|
|
207
|
+
permissions: Permission[];
|
|
208
|
+
/** Whether the api token has been deleted. **/
|
|
209
|
+
isDeleted: boolean;
|
|
210
|
+
/** The typename of the object **/
|
|
211
|
+
typename: string;
|
|
212
|
+
}
|
|
213
|
+
declare const getApiTokenQuery: (id: string) => Query<ApiToken>;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* This is an object representing information about a page returned by the Lightspark API. For more
|
|
217
|
+
* information, please see the “Pagination” section of our API docs for more information about its
|
|
218
|
+
* usage. *
|
|
219
|
+
*/
|
|
220
|
+
interface PageInfo {
|
|
221
|
+
hasNextPage?: boolean | undefined;
|
|
222
|
+
hasPreviousPage?: boolean | undefined;
|
|
223
|
+
startCursor?: string | undefined;
|
|
224
|
+
endCursor?: string | undefined;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
interface AccountToApiTokensConnection {
|
|
228
|
+
/**
|
|
229
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
230
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
231
|
+
**/
|
|
232
|
+
count: number;
|
|
233
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
234
|
+
pageInfo: PageInfo;
|
|
235
|
+
/** The API tokens for the current page of this connection. **/
|
|
236
|
+
entities: ApiToken[];
|
|
237
|
+
/** The typename of the object **/
|
|
238
|
+
typename: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** This represents the fee policies set for a channel on the Lightning Network. **/
|
|
242
|
+
interface ChannelFees {
|
|
243
|
+
baseFee?: CurrencyAmount | undefined;
|
|
244
|
+
feeRatePerMil?: number | undefined;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** This is an enum representing the status of a channel on the Lightning Network. **/
|
|
248
|
+
declare enum ChannelStatus {
|
|
249
|
+
/**
|
|
250
|
+
* This is an enum value that represents values that could be added in the future.
|
|
251
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
252
|
+
*/
|
|
253
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
254
|
+
/** The channel is online and ready to send and receive funds. **/
|
|
255
|
+
OK = "OK",
|
|
256
|
+
/**
|
|
257
|
+
* The channel has been created, but the Bitcoin transaction that initiates it still needs to be
|
|
258
|
+
* confirmed on the Bitcoin blockchain. *
|
|
259
|
+
*/
|
|
260
|
+
PENDING = "PENDING",
|
|
261
|
+
/** The channel is not available, likely because the peer is not online. **/
|
|
262
|
+
OFFLINE = "OFFLINE",
|
|
263
|
+
/**
|
|
264
|
+
* The channel is behaving properly, but its remote balance is much higher than its local balance
|
|
265
|
+
* so it is not balanced properly for sending funds out. *
|
|
266
|
+
*/
|
|
267
|
+
UNBALANCED_FOR_SEND = "UNBALANCED_FOR_SEND",
|
|
268
|
+
/**
|
|
269
|
+
* The channel is behaving properly, but its remote balance is much lower than its local balance
|
|
270
|
+
* so it is not balanced properly for receiving funds. *
|
|
271
|
+
*/
|
|
272
|
+
UNBALANCED_FOR_RECEIVE = "UNBALANCED_FOR_RECEIVE",
|
|
273
|
+
/**
|
|
274
|
+
* The channel has been closed. Information about the channel is still available for historical
|
|
275
|
+
* purposes but the channel cannot be used anymore. *
|
|
276
|
+
*/
|
|
277
|
+
CLOSED = "CLOSED",
|
|
278
|
+
/**
|
|
279
|
+
* Something unexpected happened and we cannot determine the status of this channel. Please try
|
|
280
|
+
* again later or contact the support. *
|
|
281
|
+
*/
|
|
282
|
+
ERROR = "ERROR"
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
interface ChannelToTransactionsConnection {
|
|
286
|
+
/**
|
|
287
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
288
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
289
|
+
**/
|
|
290
|
+
count: number;
|
|
291
|
+
/**
|
|
292
|
+
* The average fee for the transactions that transited through this channel, according to the
|
|
293
|
+
* filters and constraints of the connection.
|
|
294
|
+
**/
|
|
295
|
+
averageFee?: CurrencyAmount | undefined;
|
|
296
|
+
/**
|
|
297
|
+
* The total amount transacted for the transactions that transited through this channel,
|
|
298
|
+
* according to the filters and constraints of the connection.
|
|
299
|
+
**/
|
|
300
|
+
totalAmountTransacted?: CurrencyAmount | undefined;
|
|
301
|
+
/**
|
|
302
|
+
* The total amount of fees for the transactions that transited through this channel, according
|
|
303
|
+
* to the filters and constraints of the connection.
|
|
304
|
+
**/
|
|
305
|
+
totalFees?: CurrencyAmount | undefined;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* This interface is used by all the entities in the Lightspark system. It defines a few core
|
|
310
|
+
* fields that are available everywhere. Any object that implements this interface can be queried
|
|
311
|
+
* using the `entity` query and its ID. *
|
|
312
|
+
*/
|
|
313
|
+
interface Entity {
|
|
314
|
+
/**
|
|
315
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
316
|
+
* opaque string.
|
|
317
|
+
**/
|
|
318
|
+
id: string;
|
|
319
|
+
/** The date and time when the entity was first created. **/
|
|
320
|
+
createdAt: string;
|
|
321
|
+
/** The date and time when the entity was last updated. **/
|
|
322
|
+
updatedAt: string;
|
|
323
|
+
/** The typename of the object **/
|
|
324
|
+
typename: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* This is an enum of the potential types of transactions that can be associated with your
|
|
329
|
+
* Lightspark Node. *
|
|
330
|
+
*/
|
|
331
|
+
declare enum TransactionType {
|
|
332
|
+
/**
|
|
333
|
+
* This is an enum value that represents values that could be added in the future.
|
|
334
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
335
|
+
*/
|
|
336
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
337
|
+
/** Transactions initiated from a Lightspark node on Lightning Network. **/
|
|
338
|
+
OUTGOING_PAYMENT = "OUTGOING_PAYMENT",
|
|
339
|
+
/** Transactions received by a Lightspark node on Lightning Network. **/
|
|
340
|
+
INCOMING_PAYMENT = "INCOMING_PAYMENT",
|
|
341
|
+
/** Transactions that forwarded payments through Lightspark nodes on Lightning Network. **/
|
|
342
|
+
ROUTED = "ROUTED",
|
|
343
|
+
/**
|
|
344
|
+
* Transactions on the Bitcoin blockchain to withdraw funds from a Lightspark node to a Bitcoin
|
|
345
|
+
* wallet. *
|
|
346
|
+
*/
|
|
347
|
+
L1_WITHDRAW = "L1_WITHDRAW",
|
|
348
|
+
/** Transactions on Bitcoin blockchain to fund a Lightspark node's wallet. **/
|
|
349
|
+
L1_DEPOSIT = "L1_DEPOSIT",
|
|
350
|
+
/**
|
|
351
|
+
* Transactions on Bitcoin blockchain to open a channel on Lightning Network funded by the local
|
|
352
|
+
* Lightspark node. *
|
|
353
|
+
*/
|
|
354
|
+
CHANNEL_OPEN = "CHANNEL_OPEN",
|
|
355
|
+
/**
|
|
356
|
+
* Transactions on Bitcoin blockchain to close a channel on Lightning Network where the balances
|
|
357
|
+
* are allocated back to local and remote nodes. *
|
|
358
|
+
*/
|
|
359
|
+
CHANNEL_CLOSE = "CHANNEL_CLOSE",
|
|
360
|
+
/** Transactions initiated from a Lightspark node on Lightning Network. **/
|
|
361
|
+
PAYMENT = "PAYMENT",
|
|
362
|
+
/** Payment requests from a Lightspark node on Lightning Network **/
|
|
363
|
+
PAYMENT_REQUEST = "PAYMENT_REQUEST",
|
|
364
|
+
/** Transactions that forwarded payments through Lightspark nodes on Lightning Network. **/
|
|
365
|
+
ROUTE = "ROUTE"
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* This is an object representing a channel on the Lightning Network. You can retrieve this object
|
|
370
|
+
* to get detailed information on a specific Lightning Network channel. *
|
|
371
|
+
*/
|
|
372
|
+
declare class Channel implements Entity {
|
|
373
|
+
/**
|
|
374
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
375
|
+
* opaque string.
|
|
376
|
+
**/
|
|
377
|
+
readonly id: string;
|
|
378
|
+
/** The date and time when the entity was first created. **/
|
|
379
|
+
readonly createdAt: string;
|
|
380
|
+
/** The date and time when the entity was last updated. **/
|
|
381
|
+
readonly updatedAt: string;
|
|
382
|
+
/** The local Lightspark node of the channel. **/
|
|
383
|
+
readonly localNodeId: string;
|
|
384
|
+
/** The typename of the object **/
|
|
385
|
+
readonly typename: string;
|
|
386
|
+
/** The transaction that funded the channel upon channel opening. **/
|
|
387
|
+
readonly fundingTransactionId?: string | undefined;
|
|
388
|
+
/**
|
|
389
|
+
* The total amount of funds in this channel, including the channel balance on the local node,
|
|
390
|
+
* the channel balance on the remote node and the on-chain fees to close the channel.
|
|
391
|
+
**/
|
|
392
|
+
readonly capacity?: CurrencyAmount | undefined;
|
|
393
|
+
/** The channel balance on the local node. **/
|
|
394
|
+
readonly localBalance?: CurrencyAmount | undefined;
|
|
395
|
+
/**
|
|
396
|
+
* The channel balance on the local node that is currently allocated to in-progress payments. *
|
|
397
|
+
*/
|
|
398
|
+
readonly localUnsettledBalance?: CurrencyAmount | undefined;
|
|
399
|
+
/** The channel balance on the remote node. **/
|
|
400
|
+
readonly remoteBalance?: CurrencyAmount | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* The channel balance on the remote node that is currently allocated to in-progress payments.
|
|
403
|
+
* *
|
|
404
|
+
*/
|
|
405
|
+
readonly remoteUnsettledBalance?: CurrencyAmount | undefined;
|
|
406
|
+
/** The channel balance that is currently allocated to in-progress payments. **/
|
|
407
|
+
readonly unsettledBalance?: CurrencyAmount | undefined;
|
|
408
|
+
/**
|
|
409
|
+
* The total balance in this channel, including the channel balance on both local and remote
|
|
410
|
+
* nodes. *
|
|
411
|
+
*/
|
|
412
|
+
readonly totalBalance?: CurrencyAmount | undefined;
|
|
413
|
+
/** The current status of this channel. **/
|
|
414
|
+
readonly status?: ChannelStatus | undefined;
|
|
415
|
+
/**
|
|
416
|
+
* The estimated time to wait for the channel's hash timelock contract to expire when force
|
|
417
|
+
* closing the channel. It is in unit of minutes.
|
|
418
|
+
**/
|
|
419
|
+
readonly estimatedForceClosureWaitMinutes?: number | undefined;
|
|
420
|
+
/** The amount to be paid in fees for the current set of commitment transactions. **/
|
|
421
|
+
readonly commitFee?: CurrencyAmount | undefined;
|
|
422
|
+
/** The fees charged for routing payments through this channel. **/
|
|
423
|
+
readonly fees?: ChannelFees | undefined;
|
|
424
|
+
/** If known, the remote node of the channel. **/
|
|
425
|
+
readonly remoteNodeId?: string | undefined;
|
|
426
|
+
/**
|
|
427
|
+
* The unique identifier of the channel on Lightning Network, which is the location in the
|
|
428
|
+
* chain that the channel was confirmed. The format is <block-height>:<tx-index>:<tx-output>.
|
|
429
|
+
**/
|
|
430
|
+
readonly shortChannelId?: string | undefined;
|
|
431
|
+
constructor(
|
|
432
|
+
/**
|
|
433
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
434
|
+
* opaque string.
|
|
435
|
+
**/
|
|
436
|
+
id: string,
|
|
437
|
+
/** The date and time when the entity was first created. **/
|
|
438
|
+
createdAt: string,
|
|
439
|
+
/** The date and time when the entity was last updated. **/
|
|
440
|
+
updatedAt: string,
|
|
441
|
+
/** The local Lightspark node of the channel. **/
|
|
442
|
+
localNodeId: string,
|
|
443
|
+
/** The typename of the object **/
|
|
444
|
+
typename: string,
|
|
445
|
+
/** The transaction that funded the channel upon channel opening. **/
|
|
446
|
+
fundingTransactionId?: string | undefined,
|
|
447
|
+
/**
|
|
448
|
+
* The total amount of funds in this channel, including the channel balance on the local node,
|
|
449
|
+
* the channel balance on the remote node and the on-chain fees to close the channel.
|
|
450
|
+
**/
|
|
451
|
+
capacity?: CurrencyAmount | undefined,
|
|
452
|
+
/** The channel balance on the local node. **/
|
|
453
|
+
localBalance?: CurrencyAmount | undefined,
|
|
454
|
+
/**
|
|
455
|
+
* The channel balance on the local node that is currently allocated to in-progress payments. *
|
|
456
|
+
*/
|
|
457
|
+
localUnsettledBalance?: CurrencyAmount | undefined,
|
|
458
|
+
/** The channel balance on the remote node. **/
|
|
459
|
+
remoteBalance?: CurrencyAmount | undefined,
|
|
460
|
+
/**
|
|
461
|
+
* The channel balance on the remote node that is currently allocated to in-progress payments.
|
|
462
|
+
* *
|
|
463
|
+
*/
|
|
464
|
+
remoteUnsettledBalance?: CurrencyAmount | undefined,
|
|
465
|
+
/** The channel balance that is currently allocated to in-progress payments. **/
|
|
466
|
+
unsettledBalance?: CurrencyAmount | undefined,
|
|
467
|
+
/**
|
|
468
|
+
* The total balance in this channel, including the channel balance on both local and remote
|
|
469
|
+
* nodes. *
|
|
470
|
+
*/
|
|
471
|
+
totalBalance?: CurrencyAmount | undefined,
|
|
472
|
+
/** The current status of this channel. **/
|
|
473
|
+
status?: ChannelStatus | undefined,
|
|
474
|
+
/**
|
|
475
|
+
* The estimated time to wait for the channel's hash timelock contract to expire when force
|
|
476
|
+
* closing the channel. It is in unit of minutes.
|
|
477
|
+
**/
|
|
478
|
+
estimatedForceClosureWaitMinutes?: number | undefined,
|
|
479
|
+
/** The amount to be paid in fees for the current set of commitment transactions. **/
|
|
480
|
+
commitFee?: CurrencyAmount | undefined,
|
|
481
|
+
/** The fees charged for routing payments through this channel. **/
|
|
482
|
+
fees?: ChannelFees | undefined,
|
|
483
|
+
/** If known, the remote node of the channel. **/
|
|
484
|
+
remoteNodeId?: string | undefined,
|
|
485
|
+
/**
|
|
486
|
+
* The unique identifier of the channel on Lightning Network, which is the location in the
|
|
487
|
+
* chain that the channel was confirmed. The format is <block-height>:<tx-index>:<tx-output>.
|
|
488
|
+
**/
|
|
489
|
+
shortChannelId?: string | undefined);
|
|
490
|
+
getUptimePercentage(client: LightsparkClient, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<number>;
|
|
491
|
+
getTransactions(client: LightsparkClient, types?: TransactionType[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<ChannelToTransactionsConnection>;
|
|
492
|
+
static getChannelQuery(id: string): Query<Channel>;
|
|
493
|
+
toJson(): {
|
|
494
|
+
__typename: string;
|
|
495
|
+
channel_id: string;
|
|
496
|
+
channel_created_at: string;
|
|
497
|
+
channel_updated_at: string;
|
|
498
|
+
channel_funding_transaction: {
|
|
499
|
+
id: string | undefined;
|
|
500
|
+
};
|
|
501
|
+
channel_capacity: any;
|
|
502
|
+
channel_local_balance: any;
|
|
503
|
+
channel_local_unsettled_balance: any;
|
|
504
|
+
channel_remote_balance: any;
|
|
505
|
+
channel_remote_unsettled_balance: any;
|
|
506
|
+
channel_unsettled_balance: any;
|
|
507
|
+
channel_total_balance: any;
|
|
508
|
+
channel_status: ChannelStatus | undefined;
|
|
509
|
+
channel_estimated_force_closure_wait_minutes: number | undefined;
|
|
510
|
+
channel_commit_fee: any;
|
|
511
|
+
channel_fees: any;
|
|
512
|
+
channel_remote_node: {
|
|
513
|
+
id: string | undefined;
|
|
514
|
+
};
|
|
515
|
+
channel_local_node: {
|
|
516
|
+
id: string;
|
|
517
|
+
};
|
|
518
|
+
channel_short_channel_id: string | undefined;
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
interface AccountToChannelsConnection {
|
|
523
|
+
/**
|
|
524
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
525
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
526
|
+
**/
|
|
527
|
+
count: number;
|
|
528
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
529
|
+
pageInfo: PageInfo;
|
|
530
|
+
/** The channels for the current page of this connection. **/
|
|
531
|
+
entities: Channel[];
|
|
532
|
+
/** The typename of the object **/
|
|
533
|
+
typename: string;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* This is an object representing the balance associated with your Lightspark account. You can
|
|
538
|
+
* retrieve this object to see your balance, which can be broken down into several different
|
|
539
|
+
* categorizations. *
|
|
540
|
+
*/
|
|
541
|
+
interface Balances {
|
|
542
|
+
/**
|
|
543
|
+
* This represents the balance that should be displayed when asked "how much do I own right
|
|
544
|
+
* now?". It represents the amount currently owned, including things that may not be owned soon
|
|
545
|
+
* (e.g. in-flight outgoing payments, in-flight withdrawals, commit fees, etc.). It really is a
|
|
546
|
+
* snapshot of what is officially owned at this instant.
|
|
547
|
+
**/
|
|
548
|
+
ownedBalance: CurrencyAmount;
|
|
549
|
+
/**
|
|
550
|
+
* This represents the balance that should be displayed when asked "how much can I send on
|
|
551
|
+
* Lightning right now?". It represents the amount currently available to be sent on the
|
|
552
|
+
* Lightning network. We remove from the balance all the funds that are temporarily locked
|
|
553
|
+
* (e.g. channel reserves).
|
|
554
|
+
**/
|
|
555
|
+
availableToSendBalance: CurrencyAmount;
|
|
556
|
+
/**
|
|
557
|
+
* This represents the balance that should be displayed when asked "how much money can I
|
|
558
|
+
* withdraw on the Bitcoin network right now?". It represents the amount currently available to
|
|
559
|
+
* withdraw and is usually equal to the `owned_balance` but it does not include in-flight
|
|
560
|
+
* operations (which would likely succeed and therefore likely make your withdrawal fail).
|
|
561
|
+
**/
|
|
562
|
+
availableToWithdrawBalance: CurrencyAmount;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/** This is an object representing a detailed breakdown of the balance for a Lightspark Node. **/
|
|
566
|
+
interface BlockchainBalance {
|
|
567
|
+
/** The total wallet balance, including unconfirmed UTXOs. **/
|
|
568
|
+
totalBalance?: CurrencyAmount | undefined;
|
|
569
|
+
/** The balance of confirmed UTXOs in the wallet. **/
|
|
570
|
+
confirmedBalance?: CurrencyAmount | undefined;
|
|
571
|
+
/** The balance of unconfirmed UTXOs in the wallet. **/
|
|
572
|
+
unconfirmedBalance?: CurrencyAmount | undefined;
|
|
573
|
+
/** The balance that's locked by an on-chain transaction. **/
|
|
574
|
+
lockedBalance?: CurrencyAmount | undefined;
|
|
575
|
+
/** Funds required to be held in reserve for channel bumping. **/
|
|
576
|
+
requiredReserve?: CurrencyAmount | undefined;
|
|
577
|
+
/** Funds available for creating channels or withdrawing. **/
|
|
578
|
+
availableBalance?: CurrencyAmount | undefined;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/** This is an enum identifying the payment direction. **/
|
|
582
|
+
declare enum LightningPaymentDirection {
|
|
583
|
+
/**
|
|
584
|
+
* This is an enum value that represents values that could be added in the future.
|
|
585
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
586
|
+
*/
|
|
587
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
588
|
+
/** A payment that is received by the node. **/
|
|
589
|
+
INCOMING = "INCOMING",
|
|
590
|
+
/** A payment that is sent by the node. **/
|
|
591
|
+
OUTGOING = "OUTGOING"
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
interface LightsparkNodeToChannelsConnection {
|
|
595
|
+
/**
|
|
596
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
597
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
598
|
+
**/
|
|
599
|
+
count: number;
|
|
600
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
601
|
+
pageInfo: PageInfo;
|
|
602
|
+
/** The channels for the current page of this connection. **/
|
|
603
|
+
entities: Channel[];
|
|
604
|
+
/** The typename of the object **/
|
|
605
|
+
typename: string;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
interface DailyLiquidityForecast {
|
|
609
|
+
/** The date for which this forecast was generated. **/
|
|
610
|
+
date: string;
|
|
611
|
+
/** The direction for which this forecast was generated. **/
|
|
612
|
+
direction: LightningPaymentDirection;
|
|
613
|
+
/**
|
|
614
|
+
* The value of the forecast. It represents the amount of msats that we think will be moved for
|
|
615
|
+
* that specified direction, for that node, on that date.
|
|
616
|
+
**/
|
|
617
|
+
amount: CurrencyAmount;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
interface LightsparkNodeToDailyLiquidityForecastsConnection {
|
|
621
|
+
fromDate: string;
|
|
622
|
+
toDate: string;
|
|
623
|
+
direction: LightningPaymentDirection;
|
|
624
|
+
/** The daily liquidity forecasts for the current page of this connection. **/
|
|
625
|
+
entities: DailyLiquidityForecast[];
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/** This object represents the address of a node on the Lightning Network. **/
|
|
629
|
+
interface NodeAddress {
|
|
630
|
+
/** The string representation of the address. **/
|
|
631
|
+
address: string;
|
|
632
|
+
/** The type, or protocol, of this address. **/
|
|
633
|
+
type: NodeAddressType;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* A connection between a node and the addresses it has announced for itself on Lightning Network.
|
|
638
|
+
* *
|
|
639
|
+
*/
|
|
640
|
+
interface NodeToAddressesConnection {
|
|
641
|
+
/**
|
|
642
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
643
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
644
|
+
**/
|
|
645
|
+
count: number;
|
|
646
|
+
/** The addresses for the current page of this connection. **/
|
|
647
|
+
entities: NodeAddress[];
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* This is an object representing a node managed by Lightspark and owned by the current connected
|
|
652
|
+
* account. This object contains information about the node’s configuration, state, and metadata. *
|
|
653
|
+
*/
|
|
654
|
+
interface LightsparkNode {
|
|
655
|
+
/**
|
|
656
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
657
|
+
* opaque string.
|
|
658
|
+
**/
|
|
659
|
+
id: string;
|
|
660
|
+
/** The date and time when the entity was first created. **/
|
|
661
|
+
createdAt: string;
|
|
662
|
+
/** The date and time when the entity was last updated. **/
|
|
663
|
+
updatedAt: string;
|
|
664
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
665
|
+
bitcoinNetwork: BitcoinNetwork;
|
|
666
|
+
/**
|
|
667
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
668
|
+
* depending on the data available for this node.
|
|
669
|
+
**/
|
|
670
|
+
displayName: string;
|
|
671
|
+
/** The owner of this LightsparkNode. **/
|
|
672
|
+
ownerId: string;
|
|
673
|
+
/**
|
|
674
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
675
|
+
* pre-screening.
|
|
676
|
+
**/
|
|
677
|
+
umaPrescreeningUtxos: string[];
|
|
678
|
+
/** The typename of the object **/
|
|
679
|
+
typename: string;
|
|
680
|
+
/**
|
|
681
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
682
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
683
|
+
* be changed at any time by the node operator.
|
|
684
|
+
**/
|
|
685
|
+
alias?: string | undefined;
|
|
686
|
+
/**
|
|
687
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
688
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
689
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
690
|
+
**/
|
|
691
|
+
color?: string | undefined;
|
|
692
|
+
/**
|
|
693
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
694
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
695
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
696
|
+
**/
|
|
697
|
+
conductivity?: number | undefined;
|
|
698
|
+
/**
|
|
699
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
700
|
+
* Network. *
|
|
701
|
+
*/
|
|
702
|
+
publicKey?: string | undefined;
|
|
703
|
+
/** The current status of this node. **/
|
|
704
|
+
status?: LightsparkNodeStatus | undefined;
|
|
705
|
+
/**
|
|
706
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this
|
|
707
|
+
* node.
|
|
708
|
+
*
|
|
709
|
+
* @deprecated Use `balances` instead.
|
|
710
|
+
**/
|
|
711
|
+
totalBalance?: CurrencyAmount | undefined;
|
|
712
|
+
/**
|
|
713
|
+
* The total sum of the channel balances (online and offline) on this node.
|
|
714
|
+
*
|
|
715
|
+
* @deprecated Use `balances` instead.
|
|
716
|
+
**/
|
|
717
|
+
totalLocalBalance?: CurrencyAmount | undefined;
|
|
718
|
+
/**
|
|
719
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
720
|
+
*
|
|
721
|
+
* @deprecated Use `balances` instead.
|
|
722
|
+
**/
|
|
723
|
+
localBalance?: CurrencyAmount | undefined;
|
|
724
|
+
/**
|
|
725
|
+
* The sum of the channel balances that are available to receive on this node.
|
|
726
|
+
*
|
|
727
|
+
* @deprecated Use `balances` instead.
|
|
728
|
+
**/
|
|
729
|
+
remoteBalance?: CurrencyAmount | undefined;
|
|
730
|
+
/**
|
|
731
|
+
* The details of the balance of this node on the Bitcoin Network.
|
|
732
|
+
*
|
|
733
|
+
* @deprecated Use `balances` instead.
|
|
734
|
+
**/
|
|
735
|
+
blockchainBalance?: BlockchainBalance | undefined;
|
|
736
|
+
/** The balances that describe the funds in this node. **/
|
|
737
|
+
balances?: Balances | undefined;
|
|
738
|
+
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
739
|
+
getChannels(client: LightsparkClient, first?: number | undefined, after?: string | undefined, beforeDate?: string | undefined, afterDate?: string | undefined, statuses?: ChannelStatus[] | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
740
|
+
getDailyLiquidityForecasts(client: LightsparkClient, fromDate: string, toDate: string, direction: LightningPaymentDirection): Promise<LightsparkNodeToDailyLiquidityForecastsConnection>;
|
|
741
|
+
}
|
|
742
|
+
declare const getLightsparkNodeQuery: (id: string) => Query<LightsparkNode>;
|
|
743
|
+
|
|
744
|
+
/** A connection between an account and the nodes it manages. **/
|
|
745
|
+
interface AccountToNodesConnection {
|
|
746
|
+
/**
|
|
747
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
748
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
749
|
+
**/
|
|
750
|
+
count: number;
|
|
751
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
752
|
+
pageInfo: PageInfo;
|
|
753
|
+
/** The nodes for the current page of this connection. **/
|
|
754
|
+
entities: LightsparkNode[];
|
|
755
|
+
/** The typename of the object **/
|
|
756
|
+
typename: string;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* This object is an interface of a payment request on the Lightning Network (i.e., a Lightning
|
|
761
|
+
* Invoice). It contains data related to parsing the payment details of a Lightning Invoice. *
|
|
762
|
+
*/
|
|
763
|
+
interface PaymentRequestData {
|
|
764
|
+
encodedPaymentRequest: string;
|
|
765
|
+
bitcoinNetwork: BitcoinNetwork;
|
|
766
|
+
/** The typename of the object **/
|
|
767
|
+
typename: string;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* This is an enum of the potential states that a payment request on the Lightning Network can
|
|
772
|
+
* take. *
|
|
773
|
+
*/
|
|
774
|
+
declare enum PaymentRequestStatus {
|
|
775
|
+
/**
|
|
776
|
+
* This is an enum value that represents values that could be added in the future.
|
|
777
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
778
|
+
*/
|
|
779
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
780
|
+
OPEN = "OPEN",
|
|
781
|
+
CLOSED = "CLOSED"
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* This object contains information related to a payment request generated or received by a
|
|
786
|
+
* LightsparkNode. You can retrieve this object to receive payment information about a specific
|
|
787
|
+
* invoice. *
|
|
788
|
+
*/
|
|
789
|
+
interface PaymentRequest {
|
|
790
|
+
/**
|
|
791
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
792
|
+
* opaque string.
|
|
793
|
+
**/
|
|
794
|
+
id: string;
|
|
795
|
+
/** The date and time when the entity was first created. **/
|
|
796
|
+
createdAt: string;
|
|
797
|
+
/** The date and time when the entity was last updated. **/
|
|
798
|
+
updatedAt: string;
|
|
799
|
+
/** The details of the payment request. **/
|
|
800
|
+
data: PaymentRequestData;
|
|
801
|
+
/** The status of the payment request. **/
|
|
802
|
+
status: PaymentRequestStatus;
|
|
803
|
+
/** The typename of the object **/
|
|
804
|
+
typename: string;
|
|
805
|
+
}
|
|
806
|
+
declare const getPaymentRequestQuery: (id: string) => Query<PaymentRequest>;
|
|
807
|
+
|
|
808
|
+
interface AccountToPaymentRequestsConnection {
|
|
809
|
+
/**
|
|
810
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
811
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
812
|
+
**/
|
|
813
|
+
count: number;
|
|
814
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
815
|
+
pageInfo: PageInfo;
|
|
816
|
+
/** The payment requests for the current page of this connection. **/
|
|
817
|
+
entities: PaymentRequest[];
|
|
818
|
+
/** The typename of the object **/
|
|
819
|
+
typename: string;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* This is an enum of the potential statuses a transaction associated with your Lightspark Node can
|
|
824
|
+
* take. *
|
|
825
|
+
*/
|
|
826
|
+
declare enum TransactionStatus {
|
|
827
|
+
/**
|
|
828
|
+
* This is an enum value that represents values that could be added in the future.
|
|
829
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
830
|
+
*/
|
|
831
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
832
|
+
/** Transaction succeeded. **/
|
|
833
|
+
SUCCESS = "SUCCESS",
|
|
834
|
+
/** Transaction failed. **/
|
|
835
|
+
FAILED = "FAILED",
|
|
836
|
+
/** Transaction has been initiated and is currently in-flight. **/
|
|
837
|
+
PENDING = "PENDING",
|
|
838
|
+
/**
|
|
839
|
+
* For transaction type PAYMENT_REQUEST only. No payments have been made to a payment request. *
|
|
840
|
+
*/
|
|
841
|
+
NOT_STARTED = "NOT_STARTED",
|
|
842
|
+
/** For transaction type PAYMENT_REQUEST only. A payment request has expired. **/
|
|
843
|
+
EXPIRED = "EXPIRED",
|
|
844
|
+
/** For transaction type PAYMENT_REQUEST only. **/
|
|
845
|
+
CANCELLED = "CANCELLED"
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* This object represents a payment transaction. The transaction can occur either on a Bitcoin
|
|
850
|
+
* Network, or over the Lightning Network. You can retrieve this object to receive specific
|
|
851
|
+
* information about a particular transaction tied to your Lightspark Node. *
|
|
852
|
+
*/
|
|
853
|
+
interface Transaction {
|
|
854
|
+
/**
|
|
855
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
856
|
+
* opaque string.
|
|
857
|
+
**/
|
|
858
|
+
id: string;
|
|
859
|
+
/** The date and time when this transaction was initiated. **/
|
|
860
|
+
createdAt: string;
|
|
861
|
+
/** The date and time when the entity was last updated. **/
|
|
862
|
+
updatedAt: string;
|
|
863
|
+
/** The current status of this transaction. **/
|
|
864
|
+
status: TransactionStatus;
|
|
865
|
+
/** The amount of money involved in this transaction. **/
|
|
866
|
+
amount: CurrencyAmount;
|
|
867
|
+
/** The typename of the object **/
|
|
868
|
+
typename: string;
|
|
869
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
870
|
+
resolvedAt?: string | undefined;
|
|
871
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
872
|
+
transactionHash?: string | undefined;
|
|
873
|
+
}
|
|
874
|
+
declare const getTransactionQuery: (id: string) => Query<Transaction>;
|
|
875
|
+
|
|
876
|
+
interface AccountToTransactionsConnection {
|
|
877
|
+
/**
|
|
878
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
879
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
880
|
+
**/
|
|
881
|
+
count: number;
|
|
882
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
883
|
+
pageInfo: PageInfo;
|
|
884
|
+
/** The transactions for the current page of this connection. **/
|
|
885
|
+
entities: Transaction[];
|
|
886
|
+
/** The typename of the object **/
|
|
887
|
+
typename: string;
|
|
888
|
+
/**
|
|
889
|
+
* Profit (or loss) generated by the transactions in this connection, with the set of filters
|
|
890
|
+
* and constraints provided.
|
|
891
|
+
**/
|
|
892
|
+
profitLoss?: CurrencyAmount | undefined;
|
|
893
|
+
/**
|
|
894
|
+
* Average fee earned for the transactions in this connection, with the set of filters and
|
|
895
|
+
* constraints provided.
|
|
896
|
+
**/
|
|
897
|
+
averageFeeEarned?: CurrencyAmount | undefined;
|
|
898
|
+
/**
|
|
899
|
+
* Total amount transacted by the transactions in this connection, with the set of filters and
|
|
900
|
+
* constraints provided.
|
|
901
|
+
**/
|
|
902
|
+
totalAmountTransacted?: CurrencyAmount | undefined;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/** This is an object representing the owner of a LightsparkNode. **/
|
|
906
|
+
interface LightsparkNodeOwner {
|
|
907
|
+
/**
|
|
908
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
909
|
+
* opaque string.
|
|
910
|
+
**/
|
|
911
|
+
id: string;
|
|
912
|
+
/** The date and time when the entity was first created. **/
|
|
913
|
+
createdAt: string;
|
|
914
|
+
/** The date and time when the entity was last updated. **/
|
|
915
|
+
updatedAt: string;
|
|
916
|
+
/** The typename of the object **/
|
|
917
|
+
typename: string;
|
|
918
|
+
}
|
|
919
|
+
declare const getLightsparkNodeOwnerQuery: (id: string) => Query<LightsparkNodeOwner>;
|
|
920
|
+
|
|
921
|
+
/** This is an enum of the potential statuses that your Lightspark wallet can take. **/
|
|
922
|
+
declare enum WalletStatus {
|
|
923
|
+
/**
|
|
924
|
+
* This is an enum value that represents values that could be added in the future.
|
|
925
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
926
|
+
*/
|
|
927
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
928
|
+
/**
|
|
929
|
+
* The wallet has not been set up yet and is ready to be deployed. This is the default status
|
|
930
|
+
* after the first login. *
|
|
931
|
+
*/
|
|
932
|
+
NOT_SETUP = "NOT_SETUP",
|
|
933
|
+
/** The wallet is currently being deployed in the Lightspark infrastructure. **/
|
|
934
|
+
DEPLOYING = "DEPLOYING",
|
|
935
|
+
/**
|
|
936
|
+
* The wallet has been deployed in the Lightspark infrastructure and is ready to be initialized. *
|
|
937
|
+
*/
|
|
938
|
+
DEPLOYED = "DEPLOYED",
|
|
939
|
+
/** The wallet is currently being initialized. **/
|
|
940
|
+
INITIALIZING = "INITIALIZING",
|
|
941
|
+
/** The wallet is available and ready to be used. **/
|
|
942
|
+
READY = "READY",
|
|
943
|
+
/** The wallet is temporarily available, due to a transient issue or a scheduled maintenance. **/
|
|
944
|
+
UNAVAILABLE = "UNAVAILABLE",
|
|
945
|
+
/**
|
|
946
|
+
* The wallet had an unrecoverable failure. This status is not expected to happend and will be
|
|
947
|
+
* investigated by the Lightspark team. *
|
|
948
|
+
*/
|
|
949
|
+
FAILED = "FAILED",
|
|
950
|
+
/** The wallet is being terminated. **/
|
|
951
|
+
TERMINATING = "TERMINATING",
|
|
952
|
+
/**
|
|
953
|
+
* The wallet has been terminated and is not available in the Lightspark infrastructure anymore.
|
|
954
|
+
* It is not connected to the Lightning network and its funds can only be accessed using the
|
|
955
|
+
* Funds Recovery flow. *
|
|
956
|
+
*/
|
|
957
|
+
TERMINATED = "TERMINATED"
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
interface WalletToPaymentRequestsConnection {
|
|
961
|
+
/**
|
|
962
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
963
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
964
|
+
**/
|
|
965
|
+
count: number;
|
|
966
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
967
|
+
pageInfo: PageInfo;
|
|
968
|
+
/** The payment requests for the current page of this connection. **/
|
|
969
|
+
entities: PaymentRequest[];
|
|
970
|
+
/** The typename of the object **/
|
|
971
|
+
typename: string;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
interface WalletToTransactionsConnection {
|
|
975
|
+
/**
|
|
976
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
977
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
978
|
+
**/
|
|
979
|
+
count: number;
|
|
980
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
981
|
+
pageInfo: PageInfo;
|
|
982
|
+
/** The transactions for the current page of this connection. **/
|
|
983
|
+
entities: Transaction[];
|
|
984
|
+
/** The typename of the object **/
|
|
985
|
+
typename: string;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
declare enum RequestInitiator {
|
|
989
|
+
/**
|
|
990
|
+
* This is an enum value that represents values that could be added in the future.
|
|
991
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
992
|
+
*/
|
|
993
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
994
|
+
CUSTOMER = "CUSTOMER",
|
|
995
|
+
LIGHTSPARK = "LIGHTSPARK"
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/** This is an enum of the potential modes that your Bitcoin withdrawal can take. **/
|
|
999
|
+
declare enum WithdrawalMode {
|
|
1000
|
+
/**
|
|
1001
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1002
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1003
|
+
*/
|
|
1004
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1005
|
+
WALLET_ONLY = "WALLET_ONLY",
|
|
1006
|
+
WALLET_THEN_CHANNELS = "WALLET_THEN_CHANNELS"
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/** This is an enum of the potential statuses that a Withdrawal can take. **/
|
|
1010
|
+
declare enum WithdrawalRequestStatus {
|
|
1011
|
+
/**
|
|
1012
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1013
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1014
|
+
*/
|
|
1015
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1016
|
+
CREATING = "CREATING",
|
|
1017
|
+
CREATED = "CREATED",
|
|
1018
|
+
FAILED = "FAILED",
|
|
1019
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
1020
|
+
SUCCESSFUL = "SUCCESSFUL",
|
|
1021
|
+
PARTIALLY_SUCCESSFUL = "PARTIALLY_SUCCESSFUL"
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* This is an object representing a transaction which closes a channel on the Lightning Network.
|
|
1026
|
+
* This operation allocates balances back to the local and remote nodes. *
|
|
1027
|
+
*/
|
|
1028
|
+
interface ChannelClosingTransaction {
|
|
1029
|
+
/**
|
|
1030
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1031
|
+
* opaque string.
|
|
1032
|
+
**/
|
|
1033
|
+
id: string;
|
|
1034
|
+
/** The date and time when this transaction was initiated. **/
|
|
1035
|
+
createdAt: string;
|
|
1036
|
+
/** The date and time when the entity was last updated. **/
|
|
1037
|
+
updatedAt: string;
|
|
1038
|
+
/** The current status of this transaction. **/
|
|
1039
|
+
status: TransactionStatus;
|
|
1040
|
+
/** The amount of money involved in this transaction. **/
|
|
1041
|
+
amount: CurrencyAmount;
|
|
1042
|
+
/**
|
|
1043
|
+
* The height of the block that included this transaction. This will be zero for unconfirmed
|
|
1044
|
+
* transactions.
|
|
1045
|
+
**/
|
|
1046
|
+
blockHeight: number;
|
|
1047
|
+
/** The Bitcoin blockchain addresses this transaction was sent to. **/
|
|
1048
|
+
destinationAddresses: string[];
|
|
1049
|
+
/** The typename of the object **/
|
|
1050
|
+
typename: string;
|
|
1051
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
1052
|
+
resolvedAt?: string | undefined;
|
|
1053
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1054
|
+
transactionHash?: string | undefined;
|
|
1055
|
+
/** The fees that were paid by the node for this transaction. **/
|
|
1056
|
+
fees?: CurrencyAmount | undefined;
|
|
1057
|
+
/**
|
|
1058
|
+
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
1059
|
+
* transactions.
|
|
1060
|
+
**/
|
|
1061
|
+
blockHash?: string | undefined;
|
|
1062
|
+
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
1063
|
+
numConfirmations?: number | undefined;
|
|
1064
|
+
/** If known, the channel this transaction is closing. **/
|
|
1065
|
+
channelId?: string | undefined;
|
|
1066
|
+
}
|
|
1067
|
+
declare const getChannelClosingTransactionQuery: (id: string) => Query<ChannelClosingTransaction>;
|
|
1068
|
+
|
|
1069
|
+
interface WithdrawalRequestToChannelClosingTransactionsConnection {
|
|
1070
|
+
/**
|
|
1071
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
1072
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
1073
|
+
**/
|
|
1074
|
+
count: number;
|
|
1075
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1076
|
+
pageInfo: PageInfo;
|
|
1077
|
+
/** The channel closing transactions for the current page of this connection. **/
|
|
1078
|
+
entities: ChannelClosingTransaction[];
|
|
1079
|
+
/** The typename of the object **/
|
|
1080
|
+
typename: string;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* This is an object representing a transaction which opens a channel on the Lightning Network.
|
|
1085
|
+
* This object occurs only for channels funded by the local Lightspark node. *
|
|
1086
|
+
*/
|
|
1087
|
+
interface ChannelOpeningTransaction {
|
|
1088
|
+
/**
|
|
1089
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1090
|
+
* opaque string.
|
|
1091
|
+
**/
|
|
1092
|
+
id: string;
|
|
1093
|
+
/** The date and time when this transaction was initiated. **/
|
|
1094
|
+
createdAt: string;
|
|
1095
|
+
/** The date and time when the entity was last updated. **/
|
|
1096
|
+
updatedAt: string;
|
|
1097
|
+
/** The current status of this transaction. **/
|
|
1098
|
+
status: TransactionStatus;
|
|
1099
|
+
/** The amount of money involved in this transaction. **/
|
|
1100
|
+
amount: CurrencyAmount;
|
|
1101
|
+
/**
|
|
1102
|
+
* The height of the block that included this transaction. This will be zero for unconfirmed
|
|
1103
|
+
* transactions.
|
|
1104
|
+
**/
|
|
1105
|
+
blockHeight: number;
|
|
1106
|
+
/** The Bitcoin blockchain addresses this transaction was sent to. **/
|
|
1107
|
+
destinationAddresses: string[];
|
|
1108
|
+
/** The typename of the object **/
|
|
1109
|
+
typename: string;
|
|
1110
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
1111
|
+
resolvedAt?: string | undefined;
|
|
1112
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1113
|
+
transactionHash?: string | undefined;
|
|
1114
|
+
/** The fees that were paid by the node for this transaction. **/
|
|
1115
|
+
fees?: CurrencyAmount | undefined;
|
|
1116
|
+
/**
|
|
1117
|
+
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
1118
|
+
* transactions.
|
|
1119
|
+
**/
|
|
1120
|
+
blockHash?: string | undefined;
|
|
1121
|
+
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
1122
|
+
numConfirmations?: number | undefined;
|
|
1123
|
+
/** If known, the channel this transaction is opening. **/
|
|
1124
|
+
channelId?: string | undefined;
|
|
1125
|
+
}
|
|
1126
|
+
declare const getChannelOpeningTransactionQuery: (id: string) => Query<ChannelOpeningTransaction>;
|
|
1127
|
+
|
|
1128
|
+
interface WithdrawalRequestToChannelOpeningTransactionsConnection {
|
|
1129
|
+
/**
|
|
1130
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
1131
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
1132
|
+
**/
|
|
1133
|
+
count: number;
|
|
1134
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1135
|
+
pageInfo: PageInfo;
|
|
1136
|
+
/** The channel opening transactions for the current page of this connection. **/
|
|
1137
|
+
entities: ChannelOpeningTransaction[];
|
|
1138
|
+
/** The typename of the object **/
|
|
1139
|
+
typename: string;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* This object represents an L1 withdrawal from your Lightspark Node to any Bitcoin wallet. You can
|
|
1144
|
+
* retrieve this object to receive detailed information about any L1 withdrawal associated with
|
|
1145
|
+
* your Lightspark Node or account. *
|
|
1146
|
+
*/
|
|
1147
|
+
interface Withdrawal {
|
|
1148
|
+
/**
|
|
1149
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1150
|
+
* opaque string.
|
|
1151
|
+
**/
|
|
1152
|
+
id: string;
|
|
1153
|
+
/** The date and time when this transaction was initiated. **/
|
|
1154
|
+
createdAt: string;
|
|
1155
|
+
/** The date and time when the entity was last updated. **/
|
|
1156
|
+
updatedAt: string;
|
|
1157
|
+
/** The current status of this transaction. **/
|
|
1158
|
+
status: TransactionStatus;
|
|
1159
|
+
/** The amount of money involved in this transaction. **/
|
|
1160
|
+
amount: CurrencyAmount;
|
|
1161
|
+
/**
|
|
1162
|
+
* The height of the block that included this transaction. This will be zero for unconfirmed
|
|
1163
|
+
* transactions.
|
|
1164
|
+
**/
|
|
1165
|
+
blockHeight: number;
|
|
1166
|
+
/** The Bitcoin blockchain addresses this transaction was sent to. **/
|
|
1167
|
+
destinationAddresses: string[];
|
|
1168
|
+
/** The Lightspark node this withdrawal originated from. **/
|
|
1169
|
+
originId: string;
|
|
1170
|
+
/** The typename of the object **/
|
|
1171
|
+
typename: string;
|
|
1172
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
1173
|
+
resolvedAt?: string | undefined;
|
|
1174
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1175
|
+
transactionHash?: string | undefined;
|
|
1176
|
+
/** The fees that were paid by the node for this transaction. **/
|
|
1177
|
+
fees?: CurrencyAmount | undefined;
|
|
1178
|
+
/**
|
|
1179
|
+
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
1180
|
+
* transactions.
|
|
1181
|
+
**/
|
|
1182
|
+
blockHash?: string | undefined;
|
|
1183
|
+
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
1184
|
+
numConfirmations?: number | undefined;
|
|
1185
|
+
}
|
|
1186
|
+
declare const getWithdrawalQuery: (id: string) => Query<Withdrawal>;
|
|
1187
|
+
|
|
1188
|
+
interface WithdrawalRequestToWithdrawalsConnection {
|
|
1189
|
+
/**
|
|
1190
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
1191
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
1192
|
+
**/
|
|
1193
|
+
count: number;
|
|
1194
|
+
/** The withdrawals for the current page of this connection. **/
|
|
1195
|
+
entities: Withdrawal[];
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* This object represents a request made for an L1 withdrawal from your Lightspark Node to any
|
|
1200
|
+
* Bitcoin wallet. You can retrieve this object to receive detailed information about any
|
|
1201
|
+
* withdrawal request made from your Lightspark account. *
|
|
1202
|
+
*/
|
|
1203
|
+
declare class WithdrawalRequest implements Entity {
|
|
1204
|
+
/**
|
|
1205
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1206
|
+
* opaque string.
|
|
1207
|
+
**/
|
|
1208
|
+
readonly id: string;
|
|
1209
|
+
/** The date and time when the entity was first created. **/
|
|
1210
|
+
readonly createdAt: string;
|
|
1211
|
+
/** The date and time when the entity was last updated. **/
|
|
1212
|
+
readonly updatedAt: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* The requested amount of money to be withdrawn. If the requested amount is -1, it means to
|
|
1215
|
+
* withdraw all.
|
|
1216
|
+
**/
|
|
1217
|
+
readonly requestedAmount: CurrencyAmount;
|
|
1218
|
+
/**
|
|
1219
|
+
* The amount of money that should be withdrawn in this request.
|
|
1220
|
+
*
|
|
1221
|
+
* @deprecated Use `requested_amount` instead
|
|
1222
|
+
**/
|
|
1223
|
+
readonly amount: CurrencyAmount;
|
|
1224
|
+
/** The bitcoin address where the funds should be sent. **/
|
|
1225
|
+
readonly bitcoinAddress: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* The strategy that should be used to withdraw the funds from the account.
|
|
1228
|
+
*
|
|
1229
|
+
* @deprecated It is always withdrawing from channels now.
|
|
1230
|
+
**/
|
|
1231
|
+
readonly withdrawalMode: WithdrawalMode;
|
|
1232
|
+
/** The current status of this withdrawal request. **/
|
|
1233
|
+
readonly status: WithdrawalRequestStatus;
|
|
1234
|
+
/** The initiator of the withdrawal. **/
|
|
1235
|
+
readonly initiator: RequestInitiator;
|
|
1236
|
+
/** The typename of the object **/
|
|
1237
|
+
readonly typename: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* If the requested amount is `-1` (i.e. everything), this field may contain an estimate of the
|
|
1240
|
+
* amount for the withdrawal.
|
|
1241
|
+
**/
|
|
1242
|
+
readonly estimatedAmount?: CurrencyAmount | undefined;
|
|
1243
|
+
/**
|
|
1244
|
+
* The actual amount that is withdrawn to the bitcoin address. It will be set once the request
|
|
1245
|
+
* is completed.
|
|
1246
|
+
**/
|
|
1247
|
+
readonly amountWithdrawn?: CurrencyAmount | undefined;
|
|
1248
|
+
/**
|
|
1249
|
+
* The total fees the node paid for the withdrawal. It will be set once the request is
|
|
1250
|
+
* completed. *
|
|
1251
|
+
*/
|
|
1252
|
+
readonly totalFees?: CurrencyAmount | undefined;
|
|
1253
|
+
/** The time at which this request was completed. **/
|
|
1254
|
+
readonly completedAt?: string | undefined;
|
|
1255
|
+
/**
|
|
1256
|
+
* The withdrawal transaction that has been generated by this request.
|
|
1257
|
+
*
|
|
1258
|
+
* @deprecated Use `withdrawals` instead.
|
|
1259
|
+
**/
|
|
1260
|
+
readonly withdrawalId?: string | undefined;
|
|
1261
|
+
/** The idempotency key of the withdrawal request. **/
|
|
1262
|
+
readonly idempotencyKey?: string | undefined;
|
|
1263
|
+
constructor(
|
|
1264
|
+
/**
|
|
1265
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1266
|
+
* opaque string.
|
|
1267
|
+
**/
|
|
1268
|
+
id: string,
|
|
1269
|
+
/** The date and time when the entity was first created. **/
|
|
1270
|
+
createdAt: string,
|
|
1271
|
+
/** The date and time when the entity was last updated. **/
|
|
1272
|
+
updatedAt: string,
|
|
1273
|
+
/**
|
|
1274
|
+
* The requested amount of money to be withdrawn. If the requested amount is -1, it means to
|
|
1275
|
+
* withdraw all.
|
|
1276
|
+
**/
|
|
1277
|
+
requestedAmount: CurrencyAmount,
|
|
1278
|
+
/**
|
|
1279
|
+
* The amount of money that should be withdrawn in this request.
|
|
1280
|
+
*
|
|
1281
|
+
* @deprecated Use `requested_amount` instead
|
|
1282
|
+
**/
|
|
1283
|
+
amount: CurrencyAmount,
|
|
1284
|
+
/** The bitcoin address where the funds should be sent. **/
|
|
1285
|
+
bitcoinAddress: string,
|
|
1286
|
+
/**
|
|
1287
|
+
* The strategy that should be used to withdraw the funds from the account.
|
|
1288
|
+
*
|
|
1289
|
+
* @deprecated It is always withdrawing from channels now.
|
|
1290
|
+
**/
|
|
1291
|
+
withdrawalMode: WithdrawalMode,
|
|
1292
|
+
/** The current status of this withdrawal request. **/
|
|
1293
|
+
status: WithdrawalRequestStatus,
|
|
1294
|
+
/** The initiator of the withdrawal. **/
|
|
1295
|
+
initiator: RequestInitiator,
|
|
1296
|
+
/** The typename of the object **/
|
|
1297
|
+
typename: string,
|
|
1298
|
+
/**
|
|
1299
|
+
* If the requested amount is `-1` (i.e. everything), this field may contain an estimate of the
|
|
1300
|
+
* amount for the withdrawal.
|
|
1301
|
+
**/
|
|
1302
|
+
estimatedAmount?: CurrencyAmount | undefined,
|
|
1303
|
+
/**
|
|
1304
|
+
* The actual amount that is withdrawn to the bitcoin address. It will be set once the request
|
|
1305
|
+
* is completed.
|
|
1306
|
+
**/
|
|
1307
|
+
amountWithdrawn?: CurrencyAmount | undefined,
|
|
1308
|
+
/**
|
|
1309
|
+
* The total fees the node paid for the withdrawal. It will be set once the request is
|
|
1310
|
+
* completed. *
|
|
1311
|
+
*/
|
|
1312
|
+
totalFees?: CurrencyAmount | undefined,
|
|
1313
|
+
/** The time at which this request was completed. **/
|
|
1314
|
+
completedAt?: string | undefined,
|
|
1315
|
+
/**
|
|
1316
|
+
* The withdrawal transaction that has been generated by this request.
|
|
1317
|
+
*
|
|
1318
|
+
* @deprecated Use `withdrawals` instead.
|
|
1319
|
+
**/
|
|
1320
|
+
withdrawalId?: string | undefined,
|
|
1321
|
+
/** The idempotency key of the withdrawal request. **/
|
|
1322
|
+
idempotencyKey?: string | undefined);
|
|
1323
|
+
getChannelClosingTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<WithdrawalRequestToChannelClosingTransactionsConnection>;
|
|
1324
|
+
getChannelOpeningTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<WithdrawalRequestToChannelOpeningTransactionsConnection>;
|
|
1325
|
+
getWithdrawals(client: LightsparkClient, first?: number | undefined): Promise<WithdrawalRequestToWithdrawalsConnection>;
|
|
1326
|
+
static getWithdrawalRequestQuery(id: string): Query<WithdrawalRequest>;
|
|
1327
|
+
toJson(): {
|
|
1328
|
+
__typename: string;
|
|
1329
|
+
withdrawal_request_id: string;
|
|
1330
|
+
withdrawal_request_created_at: string;
|
|
1331
|
+
withdrawal_request_updated_at: string;
|
|
1332
|
+
withdrawal_request_requested_amount: any;
|
|
1333
|
+
withdrawal_request_amount: any;
|
|
1334
|
+
withdrawal_request_estimated_amount: any;
|
|
1335
|
+
withdrawal_request_amount_withdrawn: any;
|
|
1336
|
+
withdrawal_request_total_fees: any;
|
|
1337
|
+
withdrawal_request_bitcoin_address: string;
|
|
1338
|
+
withdrawal_request_withdrawal_mode: WithdrawalMode;
|
|
1339
|
+
withdrawal_request_status: WithdrawalRequestStatus;
|
|
1340
|
+
withdrawal_request_completed_at: string | undefined;
|
|
1341
|
+
withdrawal_request_withdrawal: {
|
|
1342
|
+
id: string | undefined;
|
|
1343
|
+
};
|
|
1344
|
+
withdrawal_request_idempotency_key: string | undefined;
|
|
1345
|
+
withdrawal_request_initiator: RequestInitiator;
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
interface WalletToWithdrawalRequestsConnection {
|
|
1350
|
+
/**
|
|
1351
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
1352
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
1353
|
+
**/
|
|
1354
|
+
count: number;
|
|
1355
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1356
|
+
pageInfo: PageInfo;
|
|
1357
|
+
/** The withdrawal requests for the current page of this connection. **/
|
|
1358
|
+
entities: WithdrawalRequest[];
|
|
1359
|
+
/** The typename of the object **/
|
|
1360
|
+
typename: string;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* This object represents a Lightspark Wallet, tied to your Lightspark account. Wallets can be used
|
|
1365
|
+
* to send or receive funds over the Lightning Network. You can retrieve this object to receive
|
|
1366
|
+
* information about a specific wallet tied to your Lightspark account. *
|
|
1367
|
+
*/
|
|
1368
|
+
declare class Wallet implements LightsparkNodeOwner, Entity {
|
|
1369
|
+
/**
|
|
1370
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1371
|
+
* opaque string.
|
|
1372
|
+
**/
|
|
1373
|
+
readonly id: string;
|
|
1374
|
+
/** The date and time when the entity was first created. **/
|
|
1375
|
+
readonly createdAt: string;
|
|
1376
|
+
/** The date and time when the entity was last updated. **/
|
|
1377
|
+
readonly updatedAt: string;
|
|
1378
|
+
/**
|
|
1379
|
+
* The unique identifier of this wallet, as provided by the Lightspark Customer during login. *
|
|
1380
|
+
*/
|
|
1381
|
+
readonly thirdPartyIdentifier: string;
|
|
1382
|
+
/** The status of this wallet. **/
|
|
1383
|
+
readonly status: WalletStatus;
|
|
1384
|
+
/** The typename of the object **/
|
|
1385
|
+
readonly typename: string;
|
|
1386
|
+
/** The date and time when the wallet user last logged in. **/
|
|
1387
|
+
readonly lastLoginAt?: string | undefined;
|
|
1388
|
+
/** The balances that describe the funds in this wallet. **/
|
|
1389
|
+
readonly balances?: Balances | undefined;
|
|
1390
|
+
/** The account this wallet belongs to. **/
|
|
1391
|
+
readonly accountId?: string | undefined;
|
|
1392
|
+
constructor(
|
|
1393
|
+
/**
|
|
1394
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1395
|
+
* opaque string.
|
|
1396
|
+
**/
|
|
1397
|
+
id: string,
|
|
1398
|
+
/** The date and time when the entity was first created. **/
|
|
1399
|
+
createdAt: string,
|
|
1400
|
+
/** The date and time when the entity was last updated. **/
|
|
1401
|
+
updatedAt: string,
|
|
1402
|
+
/**
|
|
1403
|
+
* The unique identifier of this wallet, as provided by the Lightspark Customer during login. *
|
|
1404
|
+
*/
|
|
1405
|
+
thirdPartyIdentifier: string,
|
|
1406
|
+
/** The status of this wallet. **/
|
|
1407
|
+
status: WalletStatus,
|
|
1408
|
+
/** The typename of the object **/
|
|
1409
|
+
typename: string,
|
|
1410
|
+
/** The date and time when the wallet user last logged in. **/
|
|
1411
|
+
lastLoginAt?: string | undefined,
|
|
1412
|
+
/** The balances that describe the funds in this wallet. **/
|
|
1413
|
+
balances?: Balances | undefined,
|
|
1414
|
+
/** The account this wallet belongs to. **/
|
|
1415
|
+
accountId?: string | undefined);
|
|
1416
|
+
getTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined, statuses?: TransactionStatus[] | undefined, types?: TransactionType[] | undefined): Promise<WalletToTransactionsConnection>;
|
|
1417
|
+
getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<WalletToPaymentRequestsConnection>;
|
|
1418
|
+
getTotalAmountReceived(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
|
|
1419
|
+
getWithdrawalRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, statuses?: WithdrawalRequestStatus[] | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<WalletToWithdrawalRequestsConnection>;
|
|
1420
|
+
getTotalAmountSent(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
|
|
1421
|
+
static getWalletQuery(id: string): Query<Wallet>;
|
|
1422
|
+
toJson(): {
|
|
1423
|
+
__typename: string;
|
|
1424
|
+
wallet_id: string;
|
|
1425
|
+
wallet_created_at: string;
|
|
1426
|
+
wallet_updated_at: string;
|
|
1427
|
+
wallet_last_login_at: string | undefined;
|
|
1428
|
+
wallet_balances: any;
|
|
1429
|
+
wallet_third_party_identifier: string;
|
|
1430
|
+
wallet_account: {
|
|
1431
|
+
id: string | undefined;
|
|
1432
|
+
};
|
|
1433
|
+
wallet_status: WalletStatus;
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
interface AccountToWalletsConnection {
|
|
1438
|
+
/**
|
|
1439
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
1440
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
1441
|
+
**/
|
|
1442
|
+
count: number;
|
|
1443
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1444
|
+
pageInfo: PageInfo;
|
|
1445
|
+
/** The wallets for the current page of this connection. **/
|
|
1446
|
+
entities: Wallet[];
|
|
1447
|
+
/** The typename of the object **/
|
|
1448
|
+
typename: string;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
/** A connection between an account and its past and present withdrawal requests. **/
|
|
1452
|
+
interface AccountToWithdrawalRequestsConnection {
|
|
1453
|
+
/**
|
|
1454
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
1455
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
1456
|
+
**/
|
|
1457
|
+
count: number;
|
|
1458
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1459
|
+
pageInfo: PageInfo;
|
|
1460
|
+
/** The withdrawal requests for the current page of this connection. **/
|
|
1461
|
+
entities: WithdrawalRequest[];
|
|
1462
|
+
/** The typename of the object **/
|
|
1463
|
+
typename: string;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* This is an enum of the potential reasons why an OutgoingPayment sent from a Lightspark Node may
|
|
1468
|
+
* have failed. *
|
|
1469
|
+
*/
|
|
1470
|
+
declare enum PaymentFailureReason {
|
|
1471
|
+
/**
|
|
1472
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1473
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1474
|
+
*/
|
|
1475
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1476
|
+
NONE = "NONE",
|
|
1477
|
+
TIMEOUT = "TIMEOUT",
|
|
1478
|
+
NO_ROUTE = "NO_ROUTE",
|
|
1479
|
+
ERROR = "ERROR",
|
|
1480
|
+
INCORRECT_PAYMENT_DETAILS = "INCORRECT_PAYMENT_DETAILS",
|
|
1481
|
+
INSUFFICIENT_BALANCE = "INSUFFICIENT_BALANCE",
|
|
1482
|
+
INVOICE_ALREADY_PAID = "INVOICE_ALREADY_PAID",
|
|
1483
|
+
SELF_PAYMENT = "SELF_PAYMENT",
|
|
1484
|
+
INVOICE_EXPIRED = "INVOICE_EXPIRED",
|
|
1485
|
+
INVOICE_CANCELLED = "INVOICE_CANCELLED",
|
|
1486
|
+
RISK_SCREENING_FAILED = "RISK_SCREENING_FAILED",
|
|
1487
|
+
INSUFFICIENT_BALANCE_ON_SINGLE_PATH_INVOICE = "INSUFFICIENT_BALANCE_ON_SINGLE_PATH_INVOICE"
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* This is an enum of the potential reasons that an attempted routed transaction through a
|
|
1492
|
+
* Lightspark node may have failed. *
|
|
1493
|
+
*/
|
|
1494
|
+
declare enum RoutingTransactionFailureReason {
|
|
1495
|
+
/**
|
|
1496
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1497
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1498
|
+
*/
|
|
1499
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1500
|
+
INCOMING_LINK_FAILURE = "INCOMING_LINK_FAILURE",
|
|
1501
|
+
OUTGOING_LINK_FAILURE = "OUTGOING_LINK_FAILURE",
|
|
1502
|
+
FORWARDING_FAILURE = "FORWARDING_FAILURE"
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
/** This object represents payment failures associated with your Lightspark Node. **/
|
|
1506
|
+
interface TransactionFailures {
|
|
1507
|
+
paymentFailures?: PaymentFailureReason[] | undefined;
|
|
1508
|
+
routingTransactionFailures?: RoutingTransactionFailureReason[] | undefined;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* This is an object representing the connected Lightspark account. You can retrieve this object to
|
|
1513
|
+
* see your account information and objects tied to your account. *
|
|
1514
|
+
*/
|
|
1515
|
+
declare class Account implements LightsparkNodeOwner, Entity {
|
|
1516
|
+
/**
|
|
1517
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1518
|
+
* opaque string.
|
|
1519
|
+
**/
|
|
1520
|
+
readonly id: string;
|
|
1521
|
+
/** The date and time when the entity was first created. **/
|
|
1522
|
+
readonly createdAt: string;
|
|
1523
|
+
/** The date and time when the entity was last updated. **/
|
|
1524
|
+
readonly updatedAt: string;
|
|
1525
|
+
/** The typename of the object **/
|
|
1526
|
+
readonly typename: string;
|
|
1527
|
+
/** The name of this account. **/
|
|
1528
|
+
readonly name?: string | undefined;
|
|
1529
|
+
constructor(
|
|
1530
|
+
/**
|
|
1531
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1532
|
+
* opaque string.
|
|
1533
|
+
**/
|
|
1534
|
+
id: string,
|
|
1535
|
+
/** The date and time when the entity was first created. **/
|
|
1536
|
+
createdAt: string,
|
|
1537
|
+
/** The date and time when the entity was last updated. **/
|
|
1538
|
+
updatedAt: string,
|
|
1539
|
+
/** The typename of the object **/
|
|
1540
|
+
typename: string,
|
|
1541
|
+
/** The name of this account. **/
|
|
1542
|
+
name?: string | undefined);
|
|
1543
|
+
getApiTokens(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<AccountToApiTokensConnection>;
|
|
1544
|
+
getBlockchainBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<BlockchainBalance | null>;
|
|
1545
|
+
getConductivity(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<number>;
|
|
1546
|
+
getLocalBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<CurrencyAmount | null>;
|
|
1547
|
+
getNodes(client: LightsparkClient, first?: number | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined, after?: string | undefined): Promise<AccountToNodesConnection>;
|
|
1548
|
+
getRemoteBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<CurrencyAmount | null>;
|
|
1549
|
+
getUptimePercentage(client: LightsparkClient, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<number>;
|
|
1550
|
+
getChannels(client: LightsparkClient, bitcoinNetwork: BitcoinNetwork, lightningNodeId?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, first?: number | undefined, after?: string | undefined): Promise<AccountToChannelsConnection>;
|
|
1551
|
+
getTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined, types?: TransactionType[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined, statuses?: TransactionStatus[] | undefined, excludeFailures?: TransactionFailures | undefined): Promise<AccountToTransactionsConnection>;
|
|
1552
|
+
getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined): Promise<AccountToPaymentRequestsConnection>;
|
|
1553
|
+
getWithdrawalRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, statuses?: WithdrawalRequestStatus[] | undefined, nodeIds?: string[] | undefined, idempotencyKeys?: string[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<AccountToWithdrawalRequestsConnection>;
|
|
1554
|
+
getWallets(client: LightsparkClient, first?: number | undefined, after?: string | undefined, thirdPartyIds?: string[] | undefined): Promise<AccountToWalletsConnection>;
|
|
1555
|
+
static getAccountQuery(): Query<Account>;
|
|
1556
|
+
toJson(): {
|
|
1557
|
+
__typename: string;
|
|
1558
|
+
account_id: string;
|
|
1559
|
+
account_created_at: string;
|
|
1560
|
+
account_updated_at: string;
|
|
1561
|
+
account_name: string | undefined;
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
/** This is an enum identifying a type of compliance provider. **/
|
|
1566
|
+
declare enum ComplianceProvider {
|
|
1567
|
+
/**
|
|
1568
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1569
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1570
|
+
*/
|
|
1571
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1572
|
+
CHAINALYSIS = "CHAINALYSIS"
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
interface CreateApiTokenOutput {
|
|
1576
|
+
/** The API Token that has been created. **/
|
|
1577
|
+
apiToken: ApiToken;
|
|
1578
|
+
/**
|
|
1579
|
+
* The secret that should be used to authenticate against our API. This secret is not stored
|
|
1580
|
+
* and will never be available again after this. You must keep this secret secure as it grants
|
|
1581
|
+
* access to your account.
|
|
1582
|
+
**/
|
|
1583
|
+
clientSecret: string;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* This object represents the estimated L1 transaction fees for the Bitcoin network. Fee estimates
|
|
1588
|
+
* are separated by potential confirmation speeds for settlement. *
|
|
1589
|
+
*/
|
|
1590
|
+
interface FeeEstimate {
|
|
1591
|
+
feeFast: CurrencyAmount;
|
|
1592
|
+
feeMin: CurrencyAmount;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/** This is an enum that enumerates all potential statuses for an incoming payment attempt. **/
|
|
1596
|
+
declare enum IncomingPaymentAttemptStatus {
|
|
1597
|
+
/**
|
|
1598
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1599
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1600
|
+
*/
|
|
1601
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1602
|
+
ACCEPTED = "ACCEPTED",
|
|
1603
|
+
SETTLED = "SETTLED",
|
|
1604
|
+
CANCELED = "CANCELED",
|
|
1605
|
+
UNKNOWN = "UNKNOWN"
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* This object represents any attempted payment sent to a Lightspark node on the Lightning Network.
|
|
1610
|
+
* You can retrieve this object to receive payment related information about a specific incoming
|
|
1611
|
+
* payment attempt. *
|
|
1612
|
+
*/
|
|
1613
|
+
interface IncomingPaymentAttempt {
|
|
1614
|
+
/**
|
|
1615
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1616
|
+
* opaque string.
|
|
1617
|
+
**/
|
|
1618
|
+
id: string;
|
|
1619
|
+
/** The date and time when the entity was first created. **/
|
|
1620
|
+
createdAt: string;
|
|
1621
|
+
/** The date and time when the entity was last updated. **/
|
|
1622
|
+
updatedAt: string;
|
|
1623
|
+
/** The status of the incoming payment attempt. **/
|
|
1624
|
+
status: IncomingPaymentAttemptStatus;
|
|
1625
|
+
/** The total amount of that was attempted to send. **/
|
|
1626
|
+
amount: CurrencyAmount;
|
|
1627
|
+
/** The channel this attempt was made on. **/
|
|
1628
|
+
channelId: string;
|
|
1629
|
+
/** The typename of the object **/
|
|
1630
|
+
typename: string;
|
|
1631
|
+
/** The time the incoming payment attempt failed or succeeded. **/
|
|
1632
|
+
resolvedAt?: string | undefined;
|
|
1633
|
+
}
|
|
1634
|
+
declare const getIncomingPaymentAttemptQuery: (id: string) => Query<IncomingPaymentAttempt>;
|
|
1635
|
+
|
|
1636
|
+
/** The connection from incoming payment to all attempts. **/
|
|
1637
|
+
interface IncomingPaymentToAttemptsConnection {
|
|
1638
|
+
/**
|
|
1639
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
1640
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
1641
|
+
**/
|
|
1642
|
+
count: number;
|
|
1643
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1644
|
+
pageInfo: PageInfo;
|
|
1645
|
+
/** The incoming payment attempts for the current page of this connection. **/
|
|
1646
|
+
entities: IncomingPaymentAttempt[];
|
|
1647
|
+
/** The typename of the object **/
|
|
1648
|
+
typename: string;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* This is an object representing a transaction made over the Lightning Network. You can retrieve
|
|
1653
|
+
* this object to receive information about a specific transaction made over Lightning for a
|
|
1654
|
+
* Lightspark node. *
|
|
1655
|
+
*/
|
|
1656
|
+
interface LightningTransaction {
|
|
1657
|
+
/**
|
|
1658
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1659
|
+
* opaque string.
|
|
1660
|
+
**/
|
|
1661
|
+
id: string;
|
|
1662
|
+
/** The date and time when this transaction was initiated. **/
|
|
1663
|
+
createdAt: string;
|
|
1664
|
+
/** The date and time when the entity was last updated. **/
|
|
1665
|
+
updatedAt: string;
|
|
1666
|
+
/** The current status of this transaction. **/
|
|
1667
|
+
status: TransactionStatus;
|
|
1668
|
+
/** The amount of money involved in this transaction. **/
|
|
1669
|
+
amount: CurrencyAmount;
|
|
1670
|
+
/** The typename of the object **/
|
|
1671
|
+
typename: string;
|
|
1672
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
1673
|
+
resolvedAt?: string | undefined;
|
|
1674
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1675
|
+
transactionHash?: string | undefined;
|
|
1676
|
+
}
|
|
1677
|
+
declare const getLightningTransactionQuery: (id: string) => Query<LightningTransaction>;
|
|
1678
|
+
|
|
1679
|
+
/** This object represents post-transaction data that could be used to register payment for KYT. **/
|
|
1680
|
+
interface PostTransactionData {
|
|
1681
|
+
/**
|
|
1682
|
+
* The utxo of the channel over which the payment went through in the format of
|
|
1683
|
+
* <transaction_hash>:<output_index>.
|
|
1684
|
+
**/
|
|
1685
|
+
utxo: string;
|
|
1686
|
+
/** The amount of funds transferred in the payment. **/
|
|
1687
|
+
amount: CurrencyAmount;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* This object represents any payment sent to a Lightspark node on the Lightning Network. You can
|
|
1692
|
+
* retrieve this object to receive payment related information about a specific payment received by
|
|
1693
|
+
* a Lightspark node. *
|
|
1694
|
+
*/
|
|
1695
|
+
declare class IncomingPayment implements LightningTransaction, Transaction, Entity {
|
|
1696
|
+
/**
|
|
1697
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1698
|
+
* opaque string.
|
|
1699
|
+
**/
|
|
1700
|
+
readonly id: string;
|
|
1701
|
+
/** The date and time when this transaction was initiated. **/
|
|
1702
|
+
readonly createdAt: string;
|
|
1703
|
+
/** The date and time when the entity was last updated. **/
|
|
1704
|
+
readonly updatedAt: string;
|
|
1705
|
+
/** The current status of this transaction. **/
|
|
1706
|
+
readonly status: TransactionStatus;
|
|
1707
|
+
/** The amount of money involved in this transaction. **/
|
|
1708
|
+
readonly amount: CurrencyAmount;
|
|
1709
|
+
/**
|
|
1710
|
+
* Whether this payment is an UMA payment or not. NOTE: this field is only set if the invoice
|
|
1711
|
+
* that is being paid has been created using the recommended `create_uma_invoice` function.
|
|
1712
|
+
**/
|
|
1713
|
+
readonly isUma: boolean;
|
|
1714
|
+
/** The recipient Lightspark node this payment was sent to. **/
|
|
1715
|
+
readonly destinationId: string;
|
|
1716
|
+
/** Whether the payment is made from the same node. **/
|
|
1717
|
+
readonly isInternalPayment: boolean;
|
|
1718
|
+
/** The typename of the object **/
|
|
1719
|
+
readonly typename: string;
|
|
1720
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
1721
|
+
readonly resolvedAt?: string | undefined;
|
|
1722
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1723
|
+
readonly transactionHash?: string | undefined;
|
|
1724
|
+
/**
|
|
1725
|
+
* The optional payment request for this incoming payment, which will be null if the payment is
|
|
1726
|
+
* sent through keysend.
|
|
1727
|
+
**/
|
|
1728
|
+
readonly paymentRequestId?: string | undefined;
|
|
1729
|
+
/** The post transaction data which can be used in KYT payment registration. **/
|
|
1730
|
+
readonly umaPostTransactionData?: PostTransactionData[] | undefined;
|
|
1731
|
+
constructor(
|
|
1732
|
+
/**
|
|
1733
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1734
|
+
* opaque string.
|
|
1735
|
+
**/
|
|
1736
|
+
id: string,
|
|
1737
|
+
/** The date and time when this transaction was initiated. **/
|
|
1738
|
+
createdAt: string,
|
|
1739
|
+
/** The date and time when the entity was last updated. **/
|
|
1740
|
+
updatedAt: string,
|
|
1741
|
+
/** The current status of this transaction. **/
|
|
1742
|
+
status: TransactionStatus,
|
|
1743
|
+
/** The amount of money involved in this transaction. **/
|
|
1744
|
+
amount: CurrencyAmount,
|
|
1745
|
+
/**
|
|
1746
|
+
* Whether this payment is an UMA payment or not. NOTE: this field is only set if the invoice
|
|
1747
|
+
* that is being paid has been created using the recommended `create_uma_invoice` function.
|
|
1748
|
+
**/
|
|
1749
|
+
isUma: boolean,
|
|
1750
|
+
/** The recipient Lightspark node this payment was sent to. **/
|
|
1751
|
+
destinationId: string,
|
|
1752
|
+
/** Whether the payment is made from the same node. **/
|
|
1753
|
+
isInternalPayment: boolean,
|
|
1754
|
+
/** The typename of the object **/
|
|
1755
|
+
typename: string,
|
|
1756
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
1757
|
+
resolvedAt?: string | undefined,
|
|
1758
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1759
|
+
transactionHash?: string | undefined,
|
|
1760
|
+
/**
|
|
1761
|
+
* The optional payment request for this incoming payment, which will be null if the payment is
|
|
1762
|
+
* sent through keysend.
|
|
1763
|
+
**/
|
|
1764
|
+
paymentRequestId?: string | undefined,
|
|
1765
|
+
/** The post transaction data which can be used in KYT payment registration. **/
|
|
1766
|
+
umaPostTransactionData?: PostTransactionData[] | undefined);
|
|
1767
|
+
getAttempts(client: LightsparkClient, first?: number | undefined, statuses?: IncomingPaymentAttemptStatus[] | undefined, after?: string | undefined): Promise<IncomingPaymentToAttemptsConnection>;
|
|
1768
|
+
static getIncomingPaymentQuery(id: string): Query<IncomingPayment>;
|
|
1769
|
+
toJson(): {
|
|
1770
|
+
__typename: string;
|
|
1771
|
+
incoming_payment_id: string;
|
|
1772
|
+
incoming_payment_created_at: string;
|
|
1773
|
+
incoming_payment_updated_at: string;
|
|
1774
|
+
incoming_payment_status: TransactionStatus;
|
|
1775
|
+
incoming_payment_resolved_at: string | undefined;
|
|
1776
|
+
incoming_payment_amount: any;
|
|
1777
|
+
incoming_payment_transaction_hash: string | undefined;
|
|
1778
|
+
incoming_payment_is_uma: boolean;
|
|
1779
|
+
incoming_payment_destination: {
|
|
1780
|
+
id: string;
|
|
1781
|
+
};
|
|
1782
|
+
incoming_payment_payment_request: {
|
|
1783
|
+
id: string | undefined;
|
|
1784
|
+
};
|
|
1785
|
+
incoming_payment_uma_post_transaction_data: any[] | undefined;
|
|
1786
|
+
incoming_payment_is_internal_payment: boolean;
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* This object is an interface representing a Lightning Node on the Lightning Network, and could
|
|
1792
|
+
* either be a Lightspark node or a node managed by a third party. *
|
|
1793
|
+
*/
|
|
1794
|
+
interface Node {
|
|
1795
|
+
/**
|
|
1796
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1797
|
+
* opaque string.
|
|
1798
|
+
**/
|
|
1799
|
+
id: string;
|
|
1800
|
+
/** The date and time when the entity was first created. **/
|
|
1801
|
+
createdAt: string;
|
|
1802
|
+
/** The date and time when the entity was last updated. **/
|
|
1803
|
+
updatedAt: string;
|
|
1804
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
1805
|
+
bitcoinNetwork: BitcoinNetwork;
|
|
1806
|
+
/**
|
|
1807
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
1808
|
+
* depending on the data available for this node.
|
|
1809
|
+
**/
|
|
1810
|
+
displayName: string;
|
|
1811
|
+
/** The typename of the object **/
|
|
1812
|
+
typename: string;
|
|
1813
|
+
/**
|
|
1814
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
1815
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
1816
|
+
* be changed at any time by the node operator.
|
|
1817
|
+
**/
|
|
1818
|
+
alias?: string | undefined;
|
|
1819
|
+
/**
|
|
1820
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
1821
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
1822
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
1823
|
+
**/
|
|
1824
|
+
color?: string | undefined;
|
|
1825
|
+
/**
|
|
1826
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
1827
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
1828
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
1829
|
+
**/
|
|
1830
|
+
conductivity?: number | undefined;
|
|
1831
|
+
/**
|
|
1832
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
1833
|
+
* Network. *
|
|
1834
|
+
*/
|
|
1835
|
+
publicKey?: string | undefined;
|
|
1836
|
+
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
1837
|
+
}
|
|
1838
|
+
declare const getNodeQuery: (id: string) => Query<Node>;
|
|
1839
|
+
|
|
1840
|
+
/**
|
|
1841
|
+
* This object represents the data associated with a BOLT #11 invoice. You can retrieve this object
|
|
1842
|
+
* to receive the relevant data associated with a specific invoice. *
|
|
1843
|
+
*/
|
|
1844
|
+
interface InvoiceData {
|
|
1845
|
+
encodedPaymentRequest: string;
|
|
1846
|
+
bitcoinNetwork: BitcoinNetwork;
|
|
1847
|
+
/** The payment hash of this invoice. **/
|
|
1848
|
+
paymentHash: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* The requested amount in this invoice. If it is equal to 0, the sender should choose the
|
|
1851
|
+
* amount to send.
|
|
1852
|
+
**/
|
|
1853
|
+
amount: CurrencyAmount;
|
|
1854
|
+
/** The date and time when this invoice was created. **/
|
|
1855
|
+
createdAt: string;
|
|
1856
|
+
/** The date and time when this invoice will expire. **/
|
|
1857
|
+
expiresAt: string;
|
|
1858
|
+
/** The lightning node that will be paid when fulfilling this invoice. **/
|
|
1859
|
+
destination: Node;
|
|
1860
|
+
/** The typename of the object **/
|
|
1861
|
+
typename: string;
|
|
1862
|
+
/** A short, UTF-8 encoded, description of the purpose of this invoice. **/
|
|
1863
|
+
memo?: string | undefined;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
/** This object represents a BOLT #11 invoice (https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) created by a Lightspark Node. You can retrieve this object to receive relevant payment information for a specific invoice generated by a Lightspark node. **/
|
|
1867
|
+
interface Invoice {
|
|
1868
|
+
/**
|
|
1869
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1870
|
+
* opaque string.
|
|
1871
|
+
**/
|
|
1872
|
+
id: string;
|
|
1873
|
+
/** The date and time when the entity was first created. **/
|
|
1874
|
+
createdAt: string;
|
|
1875
|
+
/** The date and time when the entity was last updated. **/
|
|
1876
|
+
updatedAt: string;
|
|
1877
|
+
/** The details of the invoice. **/
|
|
1878
|
+
data: InvoiceData;
|
|
1879
|
+
/** The status of the payment request. **/
|
|
1880
|
+
status: PaymentRequestStatus;
|
|
1881
|
+
/** The typename of the object **/
|
|
1882
|
+
typename: string;
|
|
1883
|
+
/** The total amount that has been paid to this invoice. **/
|
|
1884
|
+
amountPaid?: CurrencyAmount | undefined;
|
|
1885
|
+
/**
|
|
1886
|
+
* Whether this invoice is an UMA invoice or not. NOTE: this field is only set if the invoice
|
|
1887
|
+
* was created using the recommended `create_uma_invoice` function.
|
|
1888
|
+
**/
|
|
1889
|
+
isUma?: boolean | undefined;
|
|
1890
|
+
/**
|
|
1891
|
+
* Whether this invoice is an LNURL invoice or not. NOTE: this field is only set if the invoice
|
|
1892
|
+
* was created using the recommended `create_lnurl_invoice` function.
|
|
1893
|
+
**/
|
|
1894
|
+
isLnurl?: boolean | undefined;
|
|
1895
|
+
}
|
|
1896
|
+
declare const getInvoiceQuery: (id: string) => Query<Invoice>;
|
|
1897
|
+
|
|
1898
|
+
/** This is an enum for potential invoice types. **/
|
|
1899
|
+
declare enum InvoiceType {
|
|
1900
|
+
/**
|
|
1901
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1902
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1903
|
+
*/
|
|
1904
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1905
|
+
/** A standard Bolt 11 invoice. **/
|
|
1906
|
+
STANDARD = "STANDARD",
|
|
1907
|
+
/** An AMP (Atomic Multi-path Payment) invoice. **/
|
|
1908
|
+
AMP = "AMP"
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* This is an enum representing a particular reason why an htlc sent over the Lightning Network may
|
|
1913
|
+
* have failed. *
|
|
1914
|
+
*/
|
|
1915
|
+
declare enum HtlcAttemptFailureCode {
|
|
1916
|
+
/**
|
|
1917
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1918
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1919
|
+
*/
|
|
1920
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1921
|
+
INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = "INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS",
|
|
1922
|
+
INCORRECT_PAYMENT_AMOUNT = "INCORRECT_PAYMENT_AMOUNT",
|
|
1923
|
+
FINAL_INCORRECT_CLTV_EXPIRY = "FINAL_INCORRECT_CLTV_EXPIRY",
|
|
1924
|
+
FINAL_INCORRECT_HTLC_AMOUNT = "FINAL_INCORRECT_HTLC_AMOUNT",
|
|
1925
|
+
FINAL_EXPIRY_TOO_SOON = "FINAL_EXPIRY_TOO_SOON",
|
|
1926
|
+
INVALID_REALM = "INVALID_REALM",
|
|
1927
|
+
EXPIRY_TOO_SOON = "EXPIRY_TOO_SOON",
|
|
1928
|
+
INVALID_ONION_VERSION = "INVALID_ONION_VERSION",
|
|
1929
|
+
INVALID_ONION_HMAC = "INVALID_ONION_HMAC",
|
|
1930
|
+
INVALID_ONION_KEY = "INVALID_ONION_KEY",
|
|
1931
|
+
AMOUNT_BELOW_MINIMUM = "AMOUNT_BELOW_MINIMUM",
|
|
1932
|
+
FEE_INSUFFICIENT = "FEE_INSUFFICIENT",
|
|
1933
|
+
INCORRECT_CLTV_EXPIRY = "INCORRECT_CLTV_EXPIRY",
|
|
1934
|
+
CHANNEL_DISABLED = "CHANNEL_DISABLED",
|
|
1935
|
+
TEMPORARY_CHANNEL_FAILURE = "TEMPORARY_CHANNEL_FAILURE",
|
|
1936
|
+
REQUIRED_NODE_FEATURE_MISSING = "REQUIRED_NODE_FEATURE_MISSING",
|
|
1937
|
+
REQUIRED_CHANNEL_FEATURE_MISSING = "REQUIRED_CHANNEL_FEATURE_MISSING",
|
|
1938
|
+
UNKNOWN_NEXT_PEER = "UNKNOWN_NEXT_PEER",
|
|
1939
|
+
TEMPORARY_NODE_FAILURE = "TEMPORARY_NODE_FAILURE",
|
|
1940
|
+
PERMANENT_NODE_FAILURE = "PERMANENT_NODE_FAILURE",
|
|
1941
|
+
PERMANENT_CHANNEL_FAILURE = "PERMANENT_CHANNEL_FAILURE",
|
|
1942
|
+
EXPIRY_TOO_FAR = "EXPIRY_TOO_FAR",
|
|
1943
|
+
MPP_TIMEOUT = "MPP_TIMEOUT",
|
|
1944
|
+
INVALID_ONION_PAYLOAD = "INVALID_ONION_PAYLOAD",
|
|
1945
|
+
INVALID_ONION_BLINDING = "INVALID_ONION_BLINDING",
|
|
1946
|
+
INTERNAL_FAILURE = "INTERNAL_FAILURE",
|
|
1947
|
+
UNKNOWN_FAILURE = "UNKNOWN_FAILURE",
|
|
1948
|
+
UNREADABLE_FAILURE = "UNREADABLE_FAILURE"
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
/** This is an enum of all potential statuses of a payment attempt made from a Lightspark Node. **/
|
|
1952
|
+
declare enum OutgoingPaymentAttemptStatus {
|
|
1953
|
+
/**
|
|
1954
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1955
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1956
|
+
*/
|
|
1957
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1958
|
+
IN_FLIGHT = "IN_FLIGHT",
|
|
1959
|
+
SUCCEEDED = "SUCCEEDED",
|
|
1960
|
+
FAILED = "FAILED"
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* This object represents a specific node that existed on a particular payment route. You can
|
|
1965
|
+
* retrieve this object to get information about a node on a particular payment path and all
|
|
1966
|
+
* payment-relevant information for that node. *
|
|
1967
|
+
*/
|
|
1968
|
+
interface Hop {
|
|
1969
|
+
/**
|
|
1970
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
1971
|
+
* opaque string.
|
|
1972
|
+
**/
|
|
1973
|
+
id: string;
|
|
1974
|
+
/** The date and time when the entity was first created. **/
|
|
1975
|
+
createdAt: string;
|
|
1976
|
+
/** The date and time when the entity was last updated. **/
|
|
1977
|
+
updatedAt: string;
|
|
1978
|
+
/** The zero-based index position of this hop in the path **/
|
|
1979
|
+
index: number;
|
|
1980
|
+
/** The typename of the object **/
|
|
1981
|
+
typename: string;
|
|
1982
|
+
/** The destination node of the hop. **/
|
|
1983
|
+
destinationId?: string | undefined;
|
|
1984
|
+
/** The public key of the node to which the hop is bound. **/
|
|
1985
|
+
publicKey?: string | undefined;
|
|
1986
|
+
/** The amount that is to be forwarded to the destination node. **/
|
|
1987
|
+
amountToForward?: CurrencyAmount | undefined;
|
|
1988
|
+
/** The fees to be collected by the source node for forwarding the payment over the hop. **/
|
|
1989
|
+
fee?: CurrencyAmount | undefined;
|
|
1990
|
+
/** The block height at which an unsettled HTLC is considered expired. **/
|
|
1991
|
+
expiryBlockHeight?: number | undefined;
|
|
1992
|
+
}
|
|
1993
|
+
declare const getHopQuery: (id: string) => Query<Hop>;
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
* The connection from an outgoing payment attempt to the list of sequential hops that define the
|
|
1997
|
+
* path from sender node to recipient node. *
|
|
1998
|
+
*/
|
|
1999
|
+
interface OutgoingPaymentAttemptToHopsConnection {
|
|
2000
|
+
/**
|
|
2001
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
2002
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
2003
|
+
**/
|
|
2004
|
+
count: number;
|
|
2005
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
2006
|
+
pageInfo: PageInfo;
|
|
2007
|
+
/** The hops for the current page of this connection. **/
|
|
2008
|
+
entities: Hop[];
|
|
2009
|
+
/** The typename of the object **/
|
|
2010
|
+
typename: string;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
/**
|
|
2014
|
+
* This object represents an attempted Lightning Network payment sent from a Lightspark Node. You
|
|
2015
|
+
* can retrieve this object to receive payment related information about any payment attempt sent
|
|
2016
|
+
* from your Lightspark Node on the Lightning Network, including any potential reasons the payment
|
|
2017
|
+
* may have failed. *
|
|
2018
|
+
*/
|
|
2019
|
+
declare class OutgoingPaymentAttempt implements Entity {
|
|
2020
|
+
/**
|
|
2021
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
2022
|
+
* opaque string.
|
|
2023
|
+
**/
|
|
2024
|
+
readonly id: string;
|
|
2025
|
+
/** The date and time when the entity was first created. **/
|
|
2026
|
+
readonly createdAt: string;
|
|
2027
|
+
/** The date and time when the entity was last updated. **/
|
|
2028
|
+
readonly updatedAt: string;
|
|
2029
|
+
/** The status of an outgoing payment attempt. **/
|
|
2030
|
+
readonly status: OutgoingPaymentAttemptStatus;
|
|
2031
|
+
/** The date and time when the attempt was initiated. **/
|
|
2032
|
+
readonly attemptedAt: string;
|
|
2033
|
+
/** The outgoing payment for this attempt. **/
|
|
2034
|
+
readonly outgoingPaymentId: string;
|
|
2035
|
+
/** The typename of the object **/
|
|
2036
|
+
readonly typename: string;
|
|
2037
|
+
/** If the payment attempt failed, then this contains the Bolt #4 failure code. **/
|
|
2038
|
+
readonly failureCode?: HtlcAttemptFailureCode | undefined;
|
|
2039
|
+
/**
|
|
2040
|
+
* If the payment attempt failed, then this contains the index of the hop at which the problem
|
|
2041
|
+
* occurred.
|
|
2042
|
+
**/
|
|
2043
|
+
readonly failureSourceIndex?: number | undefined;
|
|
2044
|
+
/** The time the outgoing payment attempt failed or succeeded. **/
|
|
2045
|
+
readonly resolvedAt?: string | undefined;
|
|
2046
|
+
/**
|
|
2047
|
+
* The total amount of funds required to complete a payment over this route. This value
|
|
2048
|
+
* includes the cumulative fees for each hop. As a result, the attempt extended to the
|
|
2049
|
+
* first-hop in the route will need to have at least this much value, otherwise the route will
|
|
2050
|
+
* fail at an intermediate node due to an insufficient amount.
|
|
2051
|
+
**/
|
|
2052
|
+
readonly amount?: CurrencyAmount | undefined;
|
|
2053
|
+
/**
|
|
2054
|
+
* The sum of the fees paid at each hop within the route of this attempt. In the case of a
|
|
2055
|
+
* one-hop payment, this value will be zero as we don't need to pay a fee to ourselves.
|
|
2056
|
+
**/
|
|
2057
|
+
readonly fees?: CurrencyAmount | undefined;
|
|
2058
|
+
/** The channel snapshot at the time the outgoing payment attempt was made. **/
|
|
2059
|
+
readonly channelSnapshotId?: string | undefined;
|
|
2060
|
+
constructor(
|
|
2061
|
+
/**
|
|
2062
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
2063
|
+
* opaque string.
|
|
2064
|
+
**/
|
|
2065
|
+
id: string,
|
|
2066
|
+
/** The date and time when the entity was first created. **/
|
|
2067
|
+
createdAt: string,
|
|
2068
|
+
/** The date and time when the entity was last updated. **/
|
|
2069
|
+
updatedAt: string,
|
|
2070
|
+
/** The status of an outgoing payment attempt. **/
|
|
2071
|
+
status: OutgoingPaymentAttemptStatus,
|
|
2072
|
+
/** The date and time when the attempt was initiated. **/
|
|
2073
|
+
attemptedAt: string,
|
|
2074
|
+
/** The outgoing payment for this attempt. **/
|
|
2075
|
+
outgoingPaymentId: string,
|
|
2076
|
+
/** The typename of the object **/
|
|
2077
|
+
typename: string,
|
|
2078
|
+
/** If the payment attempt failed, then this contains the Bolt #4 failure code. **/
|
|
2079
|
+
failureCode?: HtlcAttemptFailureCode | undefined,
|
|
2080
|
+
/**
|
|
2081
|
+
* If the payment attempt failed, then this contains the index of the hop at which the problem
|
|
2082
|
+
* occurred.
|
|
2083
|
+
**/
|
|
2084
|
+
failureSourceIndex?: number | undefined,
|
|
2085
|
+
/** The time the outgoing payment attempt failed or succeeded. **/
|
|
2086
|
+
resolvedAt?: string | undefined,
|
|
2087
|
+
/**
|
|
2088
|
+
* The total amount of funds required to complete a payment over this route. This value
|
|
2089
|
+
* includes the cumulative fees for each hop. As a result, the attempt extended to the
|
|
2090
|
+
* first-hop in the route will need to have at least this much value, otherwise the route will
|
|
2091
|
+
* fail at an intermediate node due to an insufficient amount.
|
|
2092
|
+
**/
|
|
2093
|
+
amount?: CurrencyAmount | undefined,
|
|
2094
|
+
/**
|
|
2095
|
+
* The sum of the fees paid at each hop within the route of this attempt. In the case of a
|
|
2096
|
+
* one-hop payment, this value will be zero as we don't need to pay a fee to ourselves.
|
|
2097
|
+
**/
|
|
2098
|
+
fees?: CurrencyAmount | undefined,
|
|
2099
|
+
/** The channel snapshot at the time the outgoing payment attempt was made. **/
|
|
2100
|
+
channelSnapshotId?: string | undefined);
|
|
2101
|
+
getHops(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentAttemptToHopsConnection>;
|
|
2102
|
+
static getOutgoingPaymentAttemptQuery(id: string): Query<OutgoingPaymentAttempt>;
|
|
2103
|
+
toJson(): {
|
|
2104
|
+
__typename: string;
|
|
2105
|
+
outgoing_payment_attempt_id: string;
|
|
2106
|
+
outgoing_payment_attempt_created_at: string;
|
|
2107
|
+
outgoing_payment_attempt_updated_at: string;
|
|
2108
|
+
outgoing_payment_attempt_status: OutgoingPaymentAttemptStatus;
|
|
2109
|
+
outgoing_payment_attempt_failure_code: HtlcAttemptFailureCode | undefined;
|
|
2110
|
+
outgoing_payment_attempt_failure_source_index: number | undefined;
|
|
2111
|
+
outgoing_payment_attempt_attempted_at: string;
|
|
2112
|
+
outgoing_payment_attempt_resolved_at: string | undefined;
|
|
2113
|
+
outgoing_payment_attempt_amount: any;
|
|
2114
|
+
outgoing_payment_attempt_fees: any;
|
|
2115
|
+
outgoing_payment_attempt_outgoing_payment: {
|
|
2116
|
+
id: string;
|
|
2117
|
+
};
|
|
2118
|
+
outgoing_payment_attempt_channel_snapshot: {
|
|
2119
|
+
id: string | undefined;
|
|
2120
|
+
};
|
|
2121
|
+
};
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
/** The connection from outgoing payment to all attempts. **/
|
|
2125
|
+
interface OutgoingPaymentToAttemptsConnection {
|
|
2126
|
+
/**
|
|
2127
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
2128
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
2129
|
+
**/
|
|
2130
|
+
count: number;
|
|
2131
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
2132
|
+
pageInfo: PageInfo;
|
|
2133
|
+
/** The attempts for the current page of this connection. **/
|
|
2134
|
+
entities: OutgoingPaymentAttempt[];
|
|
2135
|
+
/** The typename of the object **/
|
|
2136
|
+
typename: string;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
interface RichText {
|
|
2140
|
+
text: string;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* This object represents a Lightning Network payment sent from a Lightspark Node. You can retrieve
|
|
2145
|
+
* this object to receive payment related information about any payment sent from your Lightspark
|
|
2146
|
+
* Node on the Lightning Network. *
|
|
2147
|
+
*/
|
|
2148
|
+
declare class OutgoingPayment implements LightningTransaction, Transaction, Entity {
|
|
2149
|
+
/**
|
|
2150
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
2151
|
+
* opaque string.
|
|
2152
|
+
**/
|
|
2153
|
+
readonly id: string;
|
|
2154
|
+
/** The date and time when this transaction was initiated. **/
|
|
2155
|
+
readonly createdAt: string;
|
|
2156
|
+
/** The date and time when the entity was last updated. **/
|
|
2157
|
+
readonly updatedAt: string;
|
|
2158
|
+
/** The current status of this transaction. **/
|
|
2159
|
+
readonly status: TransactionStatus;
|
|
2160
|
+
/** The amount of money involved in this transaction. **/
|
|
2161
|
+
readonly amount: CurrencyAmount;
|
|
2162
|
+
/**
|
|
2163
|
+
* Whether this payment is an UMA payment or not. NOTE: this field is only set if the payment
|
|
2164
|
+
* has been sent using the recommended `pay_uma_invoice` function.
|
|
2165
|
+
**/
|
|
2166
|
+
readonly isUma: boolean;
|
|
2167
|
+
/** The Lightspark node this payment originated from. **/
|
|
2168
|
+
readonly originId: string;
|
|
2169
|
+
/** Whether the payment is made to the same node. **/
|
|
2170
|
+
readonly isInternalPayment: boolean;
|
|
2171
|
+
/** The typename of the object **/
|
|
2172
|
+
readonly typename: string;
|
|
2173
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
2174
|
+
readonly resolvedAt?: string | undefined;
|
|
2175
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
2176
|
+
readonly transactionHash?: string | undefined;
|
|
2177
|
+
/** If known, the final recipient node this payment was sent to. **/
|
|
2178
|
+
readonly destinationId?: string | undefined;
|
|
2179
|
+
/** The fees paid by the sender node to send the payment. **/
|
|
2180
|
+
readonly fees?: CurrencyAmount | undefined;
|
|
2181
|
+
/** The data of the payment request that was paid by this transaction, if known. **/
|
|
2182
|
+
readonly paymentRequestData?: PaymentRequestData | undefined;
|
|
2183
|
+
/** If applicable, the reason why the payment failed. **/
|
|
2184
|
+
readonly failureReason?: PaymentFailureReason | undefined;
|
|
2185
|
+
/** If applicable, user-facing error message describing why the payment failed. **/
|
|
2186
|
+
readonly failureMessage?: RichText | undefined;
|
|
2187
|
+
/** The post transaction data which can be used in KYT payment registration. **/
|
|
2188
|
+
readonly umaPostTransactionData?: PostTransactionData[] | undefined;
|
|
2189
|
+
/** The preimage of the payment. **/
|
|
2190
|
+
readonly paymentPreimage?: string | undefined;
|
|
2191
|
+
/** The idempotency key of the payment. **/
|
|
2192
|
+
readonly idempotencyKey?: string | undefined;
|
|
2193
|
+
constructor(
|
|
2194
|
+
/**
|
|
2195
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
2196
|
+
* opaque string.
|
|
2197
|
+
**/
|
|
2198
|
+
id: string,
|
|
2199
|
+
/** The date and time when this transaction was initiated. **/
|
|
2200
|
+
createdAt: string,
|
|
2201
|
+
/** The date and time when the entity was last updated. **/
|
|
2202
|
+
updatedAt: string,
|
|
2203
|
+
/** The current status of this transaction. **/
|
|
2204
|
+
status: TransactionStatus,
|
|
2205
|
+
/** The amount of money involved in this transaction. **/
|
|
2206
|
+
amount: CurrencyAmount,
|
|
2207
|
+
/**
|
|
2208
|
+
* Whether this payment is an UMA payment or not. NOTE: this field is only set if the payment
|
|
2209
|
+
* has been sent using the recommended `pay_uma_invoice` function.
|
|
2210
|
+
**/
|
|
2211
|
+
isUma: boolean,
|
|
2212
|
+
/** The Lightspark node this payment originated from. **/
|
|
2213
|
+
originId: string,
|
|
2214
|
+
/** Whether the payment is made to the same node. **/
|
|
2215
|
+
isInternalPayment: boolean,
|
|
2216
|
+
/** The typename of the object **/
|
|
2217
|
+
typename: string,
|
|
2218
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
2219
|
+
resolvedAt?: string | undefined,
|
|
2220
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
2221
|
+
transactionHash?: string | undefined,
|
|
2222
|
+
/** If known, the final recipient node this payment was sent to. **/
|
|
2223
|
+
destinationId?: string | undefined,
|
|
2224
|
+
/** The fees paid by the sender node to send the payment. **/
|
|
2225
|
+
fees?: CurrencyAmount | undefined,
|
|
2226
|
+
/** The data of the payment request that was paid by this transaction, if known. **/
|
|
2227
|
+
paymentRequestData?: PaymentRequestData | undefined,
|
|
2228
|
+
/** If applicable, the reason why the payment failed. **/
|
|
2229
|
+
failureReason?: PaymentFailureReason | undefined,
|
|
2230
|
+
/** If applicable, user-facing error message describing why the payment failed. **/
|
|
2231
|
+
failureMessage?: RichText | undefined,
|
|
2232
|
+
/** The post transaction data which can be used in KYT payment registration. **/
|
|
2233
|
+
umaPostTransactionData?: PostTransactionData[] | undefined,
|
|
2234
|
+
/** The preimage of the payment. **/
|
|
2235
|
+
paymentPreimage?: string | undefined,
|
|
2236
|
+
/** The idempotency key of the payment. **/
|
|
2237
|
+
idempotencyKey?: string | undefined);
|
|
2238
|
+
getAttempts(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentToAttemptsConnection>;
|
|
2239
|
+
static getOutgoingPaymentQuery(id: string): Query<OutgoingPayment>;
|
|
2240
|
+
toJson(): {
|
|
2241
|
+
__typename: string;
|
|
2242
|
+
outgoing_payment_id: string;
|
|
2243
|
+
outgoing_payment_created_at: string;
|
|
2244
|
+
outgoing_payment_updated_at: string;
|
|
2245
|
+
outgoing_payment_status: TransactionStatus;
|
|
2246
|
+
outgoing_payment_resolved_at: string | undefined;
|
|
2247
|
+
outgoing_payment_amount: any;
|
|
2248
|
+
outgoing_payment_transaction_hash: string | undefined;
|
|
2249
|
+
outgoing_payment_is_uma: boolean;
|
|
2250
|
+
outgoing_payment_origin: {
|
|
2251
|
+
id: string;
|
|
2252
|
+
};
|
|
2253
|
+
outgoing_payment_destination: {
|
|
2254
|
+
id: string | undefined;
|
|
2255
|
+
};
|
|
2256
|
+
outgoing_payment_fees: any;
|
|
2257
|
+
outgoing_payment_payment_request_data: any;
|
|
2258
|
+
outgoing_payment_failure_reason: PaymentFailureReason | undefined;
|
|
2259
|
+
outgoing_payment_failure_message: any;
|
|
2260
|
+
outgoing_payment_uma_post_transaction_data: any[] | undefined;
|
|
2261
|
+
outgoing_payment_payment_preimage: string | undefined;
|
|
2262
|
+
outgoing_payment_is_internal_payment: boolean;
|
|
2263
|
+
outgoing_payment_idempotency_key: string | undefined;
|
|
2264
|
+
};
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
/** This is an enum indicating the direction of the payment. **/
|
|
2268
|
+
declare enum PaymentDirection {
|
|
2269
|
+
/**
|
|
2270
|
+
* This is an enum value that represents values that could be added in the future.
|
|
2271
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
2272
|
+
*/
|
|
2273
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
2274
|
+
SENT = "SENT",
|
|
2275
|
+
RECEIVED = "RECEIVED"
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
/** The alpha-2 representation of a country, as defined by the ISO 3166-1 standard. **/
|
|
2279
|
+
declare enum RegionCode {
|
|
2280
|
+
/**
|
|
2281
|
+
* This is an enum value that represents values that could be added in the future.
|
|
2282
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
2283
|
+
*/
|
|
2284
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
2285
|
+
/** The code representing the country of Afghanistan. **/
|
|
2286
|
+
AF = "AF",
|
|
2287
|
+
/** The code representing the country of Åland Islands. **/
|
|
2288
|
+
AX = "AX",
|
|
2289
|
+
/** The code representing the country of Albania. **/
|
|
2290
|
+
AL = "AL",
|
|
2291
|
+
/** The code representing the country of Algeria. **/
|
|
2292
|
+
DZ = "DZ",
|
|
2293
|
+
/** The code representing the country of American Samoa. **/
|
|
2294
|
+
AS = "AS",
|
|
2295
|
+
/** The code representing the country of Andorra. **/
|
|
2296
|
+
AD = "AD",
|
|
2297
|
+
/** The code representing the country of Angola. **/
|
|
2298
|
+
AO = "AO",
|
|
2299
|
+
/** The code representing the country of Anguilla. **/
|
|
2300
|
+
AI = "AI",
|
|
2301
|
+
/** The code representing the country of Antarctica. **/
|
|
2302
|
+
AQ = "AQ",
|
|
2303
|
+
/** The code representing the country of Antigua and Barbuda. **/
|
|
2304
|
+
AG = "AG",
|
|
2305
|
+
/** The code representing the country of Argentina. **/
|
|
2306
|
+
AR = "AR",
|
|
2307
|
+
/** The code representing the country of Armenia. **/
|
|
2308
|
+
AM = "AM",
|
|
2309
|
+
/** The code representing the country of Aruba. **/
|
|
2310
|
+
AW = "AW",
|
|
2311
|
+
/** The code representing the country of Australia. **/
|
|
2312
|
+
AU = "AU",
|
|
2313
|
+
/** The code representing the country of Austria. **/
|
|
2314
|
+
AT = "AT",
|
|
2315
|
+
/** The code representing the country of Azerbaijan. **/
|
|
2316
|
+
AZ = "AZ",
|
|
2317
|
+
/** The code representing the country of Bahamas. **/
|
|
2318
|
+
BS = "BS",
|
|
2319
|
+
/** The code representing the country of Bahrain. **/
|
|
2320
|
+
BH = "BH",
|
|
2321
|
+
/** The code representing the country of Bangladesh. **/
|
|
2322
|
+
BD = "BD",
|
|
2323
|
+
/** The code representing the country of Barbados. **/
|
|
2324
|
+
BB = "BB",
|
|
2325
|
+
/** The code representing the country of Belarus. **/
|
|
2326
|
+
BY = "BY",
|
|
2327
|
+
/** The code representing the country of Belgium. **/
|
|
2328
|
+
BE = "BE",
|
|
2329
|
+
/** The code representing the country of Belize. **/
|
|
2330
|
+
BZ = "BZ",
|
|
2331
|
+
/** The code representing the country of Benin. **/
|
|
2332
|
+
BJ = "BJ",
|
|
2333
|
+
/** The code representing the country of Bermuda. **/
|
|
2334
|
+
BM = "BM",
|
|
2335
|
+
/** The code representing the country of Bhutan. **/
|
|
2336
|
+
BT = "BT",
|
|
2337
|
+
/** The code representing the country of The Plurinational State of Bolivia. **/
|
|
2338
|
+
BO = "BO",
|
|
2339
|
+
/** The code representing the country of Bonaire, Sint Eustatius, and Saba. **/
|
|
2340
|
+
BQ = "BQ",
|
|
2341
|
+
/** The code representing the country of Bosnia and Herzegovina. **/
|
|
2342
|
+
BA = "BA",
|
|
2343
|
+
/** The code representing the country of Botswana. **/
|
|
2344
|
+
BW = "BW",
|
|
2345
|
+
/** The code representing the country of Bouvet Island. **/
|
|
2346
|
+
BV = "BV",
|
|
2347
|
+
/** The code representing the country of Brazil. **/
|
|
2348
|
+
BR = "BR",
|
|
2349
|
+
/** The code representing the country of British Indian Ocean Territory. **/
|
|
2350
|
+
IO = "IO",
|
|
2351
|
+
/** The code representing the country of Brunei Darussalam. **/
|
|
2352
|
+
BN = "BN",
|
|
2353
|
+
/** The code representing the country of Bulgaria. **/
|
|
2354
|
+
BG = "BG",
|
|
2355
|
+
/** The code representing the country of Burkina Faso. **/
|
|
2356
|
+
BF = "BF",
|
|
2357
|
+
/** The code representing the country of Burundi. **/
|
|
2358
|
+
BI = "BI",
|
|
2359
|
+
/** The code representing the country of Cambodia. **/
|
|
2360
|
+
KH = "KH",
|
|
2361
|
+
/** The code representing the country of Cameroon. **/
|
|
2362
|
+
CM = "CM",
|
|
2363
|
+
/** The code representing the country of Canada. **/
|
|
2364
|
+
CA = "CA",
|
|
2365
|
+
/** The code representing the country of Cape Verde. **/
|
|
2366
|
+
CV = "CV",
|
|
2367
|
+
/** The code representing the country of Cayman Islands. **/
|
|
2368
|
+
KY = "KY",
|
|
2369
|
+
/** The code representing the country of Central African Republic. **/
|
|
2370
|
+
CF = "CF",
|
|
2371
|
+
/** The code representing the country of Chad. **/
|
|
2372
|
+
TD = "TD",
|
|
2373
|
+
/** The code representing the country of Chile. **/
|
|
2374
|
+
CL = "CL",
|
|
2375
|
+
/** The code representing the country of China. **/
|
|
2376
|
+
CN = "CN",
|
|
2377
|
+
/** The code representing the country of Christmas Island. **/
|
|
2378
|
+
CX = "CX",
|
|
2379
|
+
/** The code representing the country of Cocos (Keeling) Islands. **/
|
|
2380
|
+
CC = "CC",
|
|
2381
|
+
/** The code representing the country of Colombia. **/
|
|
2382
|
+
CO = "CO",
|
|
2383
|
+
/** The code representing the country of Comoros. **/
|
|
2384
|
+
KM = "KM",
|
|
2385
|
+
/** The code representing the country of Congo. **/
|
|
2386
|
+
CG = "CG",
|
|
2387
|
+
/** The code representing the country of The Democratic Republic of the Congo. **/
|
|
2388
|
+
CD = "CD",
|
|
2389
|
+
/** The code representing the country of Cook Islands. **/
|
|
2390
|
+
CK = "CK",
|
|
2391
|
+
/** The code representing the country of Costa Rica. **/
|
|
2392
|
+
CR = "CR",
|
|
2393
|
+
/** The code representing the country of Côte d'Ivoire. **/
|
|
2394
|
+
CI = "CI",
|
|
2395
|
+
/** The code representing the country of Croatia. **/
|
|
2396
|
+
HR = "HR",
|
|
2397
|
+
/** The code representing the country of Cuba. **/
|
|
2398
|
+
CU = "CU",
|
|
2399
|
+
/** The code representing the country of Curaçao. **/
|
|
2400
|
+
CW = "CW",
|
|
2401
|
+
/** The code representing the country of Cyprus. **/
|
|
2402
|
+
CY = "CY",
|
|
2403
|
+
/** The code representing the country of Czech Republic. **/
|
|
2404
|
+
CZ = "CZ",
|
|
2405
|
+
/** The code representing the country of Denmark. **/
|
|
2406
|
+
DK = "DK",
|
|
2407
|
+
/** The code representing the country of Djibouti. **/
|
|
2408
|
+
DJ = "DJ",
|
|
2409
|
+
/** The code representing the country of Dominica. **/
|
|
2410
|
+
DM = "DM",
|
|
2411
|
+
/** The code representing the country of Dominican Republic. **/
|
|
2412
|
+
DO = "DO",
|
|
2413
|
+
/** The code representing the country of Ecuador. **/
|
|
2414
|
+
EC = "EC",
|
|
2415
|
+
/** The code representing the country of Egypt. **/
|
|
2416
|
+
EG = "EG",
|
|
2417
|
+
/** The code representing the country of El Salvador. **/
|
|
2418
|
+
SV = "SV",
|
|
2419
|
+
/** The code representing the country of Equatorial Guinea. **/
|
|
2420
|
+
GQ = "GQ",
|
|
2421
|
+
/** The code representing the country of Eritrea. **/
|
|
2422
|
+
ER = "ER",
|
|
2423
|
+
/** The code representing the country of Estonia. **/
|
|
2424
|
+
EE = "EE",
|
|
2425
|
+
/** The code representing the country of Ethiopia. **/
|
|
2426
|
+
ET = "ET",
|
|
2427
|
+
/** The code representing the country of Falkland Islands (Malvinas). **/
|
|
2428
|
+
FK = "FK",
|
|
2429
|
+
/** The code representing the country of Faroe Islands. **/
|
|
2430
|
+
FO = "FO",
|
|
2431
|
+
/** The code representing the country of Fiji. **/
|
|
2432
|
+
FJ = "FJ",
|
|
2433
|
+
/** The code representing the country of Finland. **/
|
|
2434
|
+
FI = "FI",
|
|
2435
|
+
/** The code representing the country of France. **/
|
|
2436
|
+
FR = "FR",
|
|
2437
|
+
/** The code representing the country of French Guiana. **/
|
|
2438
|
+
GF = "GF",
|
|
2439
|
+
/** The code representing the country of French Polynesia. **/
|
|
2440
|
+
PF = "PF",
|
|
2441
|
+
/** The code representing the country of French Southern Territories. **/
|
|
2442
|
+
TF = "TF",
|
|
2443
|
+
/** The code representing the country of Gabon. **/
|
|
2444
|
+
GA = "GA",
|
|
2445
|
+
/** The code representing the country of Gambia. **/
|
|
2446
|
+
GM = "GM",
|
|
2447
|
+
/** The code representing the country of Georgia. **/
|
|
2448
|
+
GE = "GE",
|
|
2449
|
+
/** The code representing the country of Germany. **/
|
|
2450
|
+
DE = "DE",
|
|
2451
|
+
/** The code representing the country of Ghana. **/
|
|
2452
|
+
GH = "GH",
|
|
2453
|
+
/** The code representing the country of Gibraltar. **/
|
|
2454
|
+
GI = "GI",
|
|
2455
|
+
/** The code representing the country of Greece. **/
|
|
2456
|
+
GR = "GR",
|
|
2457
|
+
/** The code representing the country of Greenland. **/
|
|
2458
|
+
GL = "GL",
|
|
2459
|
+
/** The code representing the country of Grenada. **/
|
|
2460
|
+
GD = "GD",
|
|
2461
|
+
/** The code representing the country of Guadeloupe. **/
|
|
2462
|
+
GP = "GP",
|
|
2463
|
+
/** The code representing the country of Guam. **/
|
|
2464
|
+
GU = "GU",
|
|
2465
|
+
/** The code representing the country of Guatemala. **/
|
|
2466
|
+
GT = "GT",
|
|
2467
|
+
/** The code representing the country of Guernsey. **/
|
|
2468
|
+
GG = "GG",
|
|
2469
|
+
/** The code representing the country of Guinea. **/
|
|
2470
|
+
GN = "GN",
|
|
2471
|
+
/** The code representing the country of Guinea-Bissau. **/
|
|
2472
|
+
GW = "GW",
|
|
2473
|
+
/** The code representing the country of Guyana. **/
|
|
2474
|
+
GY = "GY",
|
|
2475
|
+
/** The code representing the country of Haiti. **/
|
|
2476
|
+
HT = "HT",
|
|
2477
|
+
/** The code representing the country of Heard Island and McDonald Islands. **/
|
|
2478
|
+
HM = "HM",
|
|
2479
|
+
/** The code representing the country of Holy See (Vatican City State). **/
|
|
2480
|
+
VA = "VA",
|
|
2481
|
+
/** The code representing the country of Honduras. **/
|
|
2482
|
+
HN = "HN",
|
|
2483
|
+
/** The code representing the country of Hong Kong. **/
|
|
2484
|
+
HK = "HK",
|
|
2485
|
+
/** The code representing the country of Hungary. **/
|
|
2486
|
+
HU = "HU",
|
|
2487
|
+
/** The code representing the country of Iceland. **/
|
|
2488
|
+
IS = "IS",
|
|
2489
|
+
/** The code representing the country of India. **/
|
|
2490
|
+
IN = "IN",
|
|
2491
|
+
/** The code representing the country of Indonesia. **/
|
|
2492
|
+
ID = "ID",
|
|
2493
|
+
/** The code representing the country of Islamic Republic of Iran. **/
|
|
2494
|
+
IR = "IR",
|
|
2495
|
+
/** The code representing the country of Iraq. **/
|
|
2496
|
+
IQ = "IQ",
|
|
2497
|
+
/** The code representing the country of Ireland. **/
|
|
2498
|
+
IE = "IE",
|
|
2499
|
+
/** The code representing the country of Isle of Man. **/
|
|
2500
|
+
IM = "IM",
|
|
2501
|
+
/** The code representing the country of Israel. **/
|
|
2502
|
+
IL = "IL",
|
|
2503
|
+
/** The code representing the country of Italy. **/
|
|
2504
|
+
IT = "IT",
|
|
2505
|
+
/** The code representing the country of Jamaica. **/
|
|
2506
|
+
JM = "JM",
|
|
2507
|
+
/** The code representing the country of Japan. **/
|
|
2508
|
+
JP = "JP",
|
|
2509
|
+
/** The code representing the country of Jersey. **/
|
|
2510
|
+
JE = "JE",
|
|
2511
|
+
/** The code representing the country of Jordan. **/
|
|
2512
|
+
JO = "JO",
|
|
2513
|
+
/** The code representing the country of Kazakhstan. **/
|
|
2514
|
+
KZ = "KZ",
|
|
2515
|
+
/** The code representing the country of Kenya. **/
|
|
2516
|
+
KE = "KE",
|
|
2517
|
+
/** The code representing the country of Kiribati. **/
|
|
2518
|
+
KI = "KI",
|
|
2519
|
+
/** The code representing the country of Democratic People's Republic ofKorea. **/
|
|
2520
|
+
KP = "KP",
|
|
2521
|
+
/** The code representing the country of Republic of Korea. **/
|
|
2522
|
+
KR = "KR",
|
|
2523
|
+
/** The code representing the country of Kuwait. **/
|
|
2524
|
+
KW = "KW",
|
|
2525
|
+
/** The code representing the country of Kyrgyzstan. **/
|
|
2526
|
+
KG = "KG",
|
|
2527
|
+
/** The code representing the country of Lao People's Democratic Republic. **/
|
|
2528
|
+
LA = "LA",
|
|
2529
|
+
/** The code representing the country of Latvia. **/
|
|
2530
|
+
LV = "LV",
|
|
2531
|
+
/** The code representing the country of Lebanon. **/
|
|
2532
|
+
LB = "LB",
|
|
2533
|
+
/** The code representing the country of Lesotho. **/
|
|
2534
|
+
LS = "LS",
|
|
2535
|
+
/** The code representing the country of Liberia. **/
|
|
2536
|
+
LR = "LR",
|
|
2537
|
+
/** The code representing the country of Libya. **/
|
|
2538
|
+
LY = "LY",
|
|
2539
|
+
/** The code representing the country of Liechtenstein. **/
|
|
2540
|
+
LI = "LI",
|
|
2541
|
+
/** The code representing the country of Lithuania. **/
|
|
2542
|
+
LT = "LT",
|
|
2543
|
+
/** The code representing the country of Luxembourg. **/
|
|
2544
|
+
LU = "LU",
|
|
2545
|
+
/** The code representing the country of Macao. **/
|
|
2546
|
+
MO = "MO",
|
|
2547
|
+
/** The code representing the country of The Former Yugoslav Republic of Macedonia. **/
|
|
2548
|
+
MK = "MK",
|
|
2549
|
+
/** The code representing the country of Madagascar. **/
|
|
2550
|
+
MG = "MG",
|
|
2551
|
+
/** The code representing the country of Malawi. **/
|
|
2552
|
+
MW = "MW",
|
|
2553
|
+
/** The code representing the country of Malaysia. **/
|
|
2554
|
+
MY = "MY",
|
|
2555
|
+
/** The code representing the country of Maldives. **/
|
|
2556
|
+
MV = "MV",
|
|
2557
|
+
/** The code representing the country of Mali. **/
|
|
2558
|
+
ML = "ML",
|
|
2559
|
+
/** The code representing the country of Malta. **/
|
|
2560
|
+
MT = "MT",
|
|
2561
|
+
/** The code representing the country of Marshall Islands. **/
|
|
2562
|
+
MH = "MH",
|
|
2563
|
+
/** The code representing the country of Martinique. **/
|
|
2564
|
+
MQ = "MQ",
|
|
2565
|
+
/** The code representing the country of Mauritania. **/
|
|
2566
|
+
MR = "MR",
|
|
2567
|
+
/** The code representing the country of Mauritius. **/
|
|
2568
|
+
MU = "MU",
|
|
2569
|
+
/** The code representing the country of Mayotte. **/
|
|
2570
|
+
YT = "YT",
|
|
2571
|
+
/** The code representing the country of Mexico. **/
|
|
2572
|
+
MX = "MX",
|
|
2573
|
+
/** The code representing the country of Federated States ofMicronesia. **/
|
|
2574
|
+
FM = "FM",
|
|
2575
|
+
/** The code representing the country of Republic of Moldova. **/
|
|
2576
|
+
MD = "MD",
|
|
2577
|
+
/** The code representing the country of Monaco. **/
|
|
2578
|
+
MC = "MC",
|
|
2579
|
+
/** The code representing the country of Mongolia. **/
|
|
2580
|
+
MN = "MN",
|
|
2581
|
+
/** The code representing the country of Montenegro. **/
|
|
2582
|
+
ME = "ME",
|
|
2583
|
+
/** The code representing the country of Montserrat. **/
|
|
2584
|
+
MS = "MS",
|
|
2585
|
+
/** The code representing the country of Morocco. **/
|
|
2586
|
+
MA = "MA",
|
|
2587
|
+
/** The code representing the country of Mozambique. **/
|
|
2588
|
+
MZ = "MZ",
|
|
2589
|
+
/** The code representing the country of Myanmar. **/
|
|
2590
|
+
MM = "MM",
|
|
2591
|
+
/** The code representing the country of Namibia. **/
|
|
2592
|
+
NA = "NA",
|
|
2593
|
+
/** The code representing the country of Nauru. **/
|
|
2594
|
+
NR = "NR",
|
|
2595
|
+
/** The code representing the country of Nepal. **/
|
|
2596
|
+
NP = "NP",
|
|
2597
|
+
/** The code representing the country of Netherlands. **/
|
|
2598
|
+
NL = "NL",
|
|
2599
|
+
/** The code representing the country of New Caledonia. **/
|
|
2600
|
+
NC = "NC",
|
|
2601
|
+
/** The code representing the country of New Zealand. **/
|
|
2602
|
+
NZ = "NZ",
|
|
2603
|
+
/** The code representing the country of Nicaragua. **/
|
|
2604
|
+
NI = "NI",
|
|
2605
|
+
/** The code representing the country of Niger. **/
|
|
2606
|
+
NE = "NE",
|
|
2607
|
+
/** The code representing the country of Nigeria. **/
|
|
2608
|
+
NG = "NG",
|
|
2609
|
+
/** The code representing the country of Niue. **/
|
|
2610
|
+
NU = "NU",
|
|
2611
|
+
/** The code representing the country of Norfolk Island. **/
|
|
2612
|
+
NF = "NF",
|
|
2613
|
+
/** The code representing the country of Northern Mariana Islands. **/
|
|
2614
|
+
MP = "MP",
|
|
2615
|
+
/** The code representing the country of Norway. **/
|
|
2616
|
+
NO = "NO",
|
|
2617
|
+
/** The code representing the country of Oman. **/
|
|
2618
|
+
OM = "OM",
|
|
2619
|
+
/** The code representing the country of Pakistan. **/
|
|
2620
|
+
PK = "PK",
|
|
2621
|
+
/** The code representing the country of Palau. **/
|
|
2622
|
+
PW = "PW",
|
|
2623
|
+
/** The code representing the country of State of Palestine. **/
|
|
2624
|
+
PS = "PS",
|
|
2625
|
+
/** The code representing the country of Panama. **/
|
|
2626
|
+
PA = "PA",
|
|
2627
|
+
/** The code representing the country of Papua New Guinea. **/
|
|
2628
|
+
PG = "PG",
|
|
2629
|
+
/** The code representing the country of Paraguay. **/
|
|
2630
|
+
PY = "PY",
|
|
2631
|
+
/** The code representing the country of Peru. **/
|
|
2632
|
+
PE = "PE",
|
|
2633
|
+
/** The code representing the country of Philippines. **/
|
|
2634
|
+
PH = "PH",
|
|
2635
|
+
/** The code representing the country of Pitcairn. **/
|
|
2636
|
+
PN = "PN",
|
|
2637
|
+
/** The code representing the country of Poland. **/
|
|
2638
|
+
PL = "PL",
|
|
2639
|
+
/** The code representing the country of Portugal. **/
|
|
2640
|
+
PT = "PT",
|
|
2641
|
+
/** The code representing the country of Puerto Rico. **/
|
|
2642
|
+
PR = "PR",
|
|
2643
|
+
/** The code representing the country of Qatar. **/
|
|
2644
|
+
QA = "QA",
|
|
2645
|
+
/** The code representing the country of Réunion. **/
|
|
2646
|
+
RE = "RE",
|
|
2647
|
+
/** The code representing the country of Romania. **/
|
|
2648
|
+
RO = "RO",
|
|
2649
|
+
/** The code representing the country of Russian Federation. **/
|
|
2650
|
+
RU = "RU",
|
|
2651
|
+
/** The code representing the country of Rwanda. **/
|
|
2652
|
+
RW = "RW",
|
|
2653
|
+
/** The code representing the country of Saint Barthélemy. **/
|
|
2654
|
+
BL = "BL",
|
|
2655
|
+
/** The code representing the country of Saint Helena Ascension and Tristan da Cunha. **/
|
|
2656
|
+
SH = "SH",
|
|
2657
|
+
/** The code representing the country of Saint Kitts and Nevis. **/
|
|
2658
|
+
KN = "KN",
|
|
2659
|
+
/** The code representing the country of Saint Lucia. **/
|
|
2660
|
+
LC = "LC",
|
|
2661
|
+
/** The code representing the country of Saint Martin (French part). **/
|
|
2662
|
+
MF = "MF",
|
|
2663
|
+
/** The code representing the country of Saint Pierre and Miquelon. **/
|
|
2664
|
+
PM = "PM",
|
|
2665
|
+
/** The code representing the country of Saint Vincent and the Grenadines. **/
|
|
2666
|
+
VC = "VC",
|
|
2667
|
+
/** The code representing the country of Samoa. **/
|
|
2668
|
+
WS = "WS",
|
|
2669
|
+
/** The code representing the country of San Marino. **/
|
|
2670
|
+
SM = "SM",
|
|
2671
|
+
/** The code representing the country of Sao Tome and Principe. **/
|
|
2672
|
+
ST = "ST",
|
|
2673
|
+
/** The code representing the country of Saudi Arabia. **/
|
|
2674
|
+
SA = "SA",
|
|
2675
|
+
/** The code representing the country of Senegal. **/
|
|
2676
|
+
SN = "SN",
|
|
2677
|
+
/** The code representing the country of Serbia. **/
|
|
2678
|
+
RS = "RS",
|
|
2679
|
+
/** The code representing the country of Seychelles. **/
|
|
2680
|
+
SC = "SC",
|
|
2681
|
+
/** The code representing the country of Sierra Leone. **/
|
|
2682
|
+
SL = "SL",
|
|
2683
|
+
/** The code representing the country of Singapore. **/
|
|
2684
|
+
SG = "SG",
|
|
2685
|
+
/** The code representing the country of Sint Maarten (Dutch part). **/
|
|
2686
|
+
SX = "SX",
|
|
2687
|
+
/** The code representing the country of Slovakia. **/
|
|
2688
|
+
SK = "SK",
|
|
2689
|
+
/** The code representing the country of Slovenia. **/
|
|
2690
|
+
SI = "SI",
|
|
2691
|
+
/** The code representing the country of Solomon Islands. **/
|
|
2692
|
+
SB = "SB",
|
|
2693
|
+
/** The code representing the country of Somalia. **/
|
|
2694
|
+
SO = "SO",
|
|
2695
|
+
/** The code representing the country of South Africa. **/
|
|
2696
|
+
ZA = "ZA",
|
|
2697
|
+
/** The code representing the country of South Georgia and the South Sandwich Islands. **/
|
|
2698
|
+
GS = "GS",
|
|
2699
|
+
/** The code representing the country of South Sudan. **/
|
|
2700
|
+
SS = "SS",
|
|
2701
|
+
/** The code representing the country of Spain. **/
|
|
2702
|
+
ES = "ES",
|
|
2703
|
+
/** The code representing the country of Sri Lanka. **/
|
|
2704
|
+
LK = "LK",
|
|
2705
|
+
/** The code representing the country of Sudan. **/
|
|
2706
|
+
SD = "SD",
|
|
2707
|
+
/** The code representing the country of Suriname. **/
|
|
2708
|
+
SR = "SR",
|
|
2709
|
+
/** The code representing the country of Svalbard and Jan Mayen. **/
|
|
2710
|
+
SJ = "SJ",
|
|
2711
|
+
/** The code representing the country of Swaziland. **/
|
|
2712
|
+
SZ = "SZ",
|
|
2713
|
+
/** The code representing the country of Sweden. **/
|
|
2714
|
+
SE = "SE",
|
|
2715
|
+
/** The code representing the country of Switzerland. **/
|
|
2716
|
+
CH = "CH",
|
|
2717
|
+
/** The code representing the country of Syrian Arab Republic. **/
|
|
2718
|
+
SY = "SY",
|
|
2719
|
+
/** The code representing the country of Taiwan, Province of China. **/
|
|
2720
|
+
TW = "TW",
|
|
2721
|
+
/** The code representing the country of Tajikistan. **/
|
|
2722
|
+
TJ = "TJ",
|
|
2723
|
+
/** The code representing the country of United Republic of Tanzania. **/
|
|
2724
|
+
TZ = "TZ",
|
|
2725
|
+
/** The code representing the country of Thailand. **/
|
|
2726
|
+
TH = "TH",
|
|
2727
|
+
/** The code representing the country of Timor-Leste. **/
|
|
2728
|
+
TL = "TL",
|
|
2729
|
+
/** The code representing the country of Togo. **/
|
|
2730
|
+
TG = "TG",
|
|
2731
|
+
/** The code representing the country of Tokelau. **/
|
|
2732
|
+
TK = "TK",
|
|
2733
|
+
/** The code representing the country of Tonga. **/
|
|
2734
|
+
TO = "TO",
|
|
2735
|
+
/** The code representing the country of Trinidad and Tobago. **/
|
|
2736
|
+
TT = "TT",
|
|
2737
|
+
/** The code representing the country of Tunisia. **/
|
|
2738
|
+
TN = "TN",
|
|
2739
|
+
/** The code representing the country of Turkey. **/
|
|
2740
|
+
TR = "TR",
|
|
2741
|
+
/** The code representing the country of Turkmenistan. **/
|
|
2742
|
+
TM = "TM",
|
|
2743
|
+
/** The code representing the country of Turks and Caicos Islands. **/
|
|
2744
|
+
TC = "TC",
|
|
2745
|
+
/** The code representing the country of Tuvalu. **/
|
|
2746
|
+
TV = "TV",
|
|
2747
|
+
/** The code representing the country of Uganda. **/
|
|
2748
|
+
UG = "UG",
|
|
2749
|
+
/** The code representing the country of Ukraine. **/
|
|
2750
|
+
UA = "UA",
|
|
2751
|
+
/** The code representing the country of United Arab Emirates. **/
|
|
2752
|
+
AE = "AE",
|
|
2753
|
+
/** The code representing the country of United Kingdom. **/
|
|
2754
|
+
GB = "GB",
|
|
2755
|
+
/** The code representing the country of United States. **/
|
|
2756
|
+
US = "US",
|
|
2757
|
+
/** The code representing the country of United States Minor Outlying Islands. **/
|
|
2758
|
+
UM = "UM",
|
|
2759
|
+
/** The code representing the country of Uruguay. **/
|
|
2760
|
+
UY = "UY",
|
|
2761
|
+
/** The code representing the country of Uzbekistan. **/
|
|
2762
|
+
UZ = "UZ",
|
|
2763
|
+
/** The code representing the country of Vanuatu. **/
|
|
2764
|
+
VU = "VU",
|
|
2765
|
+
/** The code representing the country of Bolivarian Republic of Venezuela. **/
|
|
2766
|
+
VE = "VE",
|
|
2767
|
+
/** The code representing the country of Viet Nam. **/
|
|
2768
|
+
VN = "VN",
|
|
2769
|
+
/** The code representing the country of British Virgin Islands. **/
|
|
2770
|
+
VG = "VG",
|
|
2771
|
+
/** The code representing the country of U.S. Virgin Islands. **/
|
|
2772
|
+
VI = "VI",
|
|
2773
|
+
/** The code representing the country of Wallis and Futuna. **/
|
|
2774
|
+
WF = "WF",
|
|
2775
|
+
/** The code representing the country of Western Sahara. **/
|
|
2776
|
+
EH = "EH",
|
|
2777
|
+
/** The code representing the country of Yemen. **/
|
|
2778
|
+
YE = "YE",
|
|
2779
|
+
/** The code representing the country of Zambia. **/
|
|
2780
|
+
ZM = "ZM",
|
|
2781
|
+
/** The code representing the country of Zimbabwe. **/
|
|
2782
|
+
ZW = "ZW",
|
|
2783
|
+
/** The code representing a fake region for testing. **/
|
|
2784
|
+
NN = "NN"
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
type SingleNodeDashboard = {
|
|
2788
|
+
id: string;
|
|
2789
|
+
displayName: string;
|
|
2790
|
+
color: Maybe<string>;
|
|
2791
|
+
publicKey: Maybe<string>;
|
|
2792
|
+
status: Maybe<LightsparkNodeStatus>;
|
|
2793
|
+
addresses: {
|
|
2794
|
+
address: string;
|
|
2795
|
+
type: NodeAddressType;
|
|
2796
|
+
}[];
|
|
2797
|
+
totalBalance: Maybe<CurrencyAmount>;
|
|
2798
|
+
totalLocalBalance: Maybe<CurrencyAmount>;
|
|
2799
|
+
onlineLocalBalance: Maybe<CurrencyAmount>;
|
|
2800
|
+
remoteBalance: Maybe<CurrencyAmount>;
|
|
2801
|
+
blockchainBalance: {
|
|
2802
|
+
availableBalance: Maybe<CurrencyAmount>;
|
|
2803
|
+
totalBalance: Maybe<CurrencyAmount>;
|
|
2804
|
+
confirmedBalance: Maybe<CurrencyAmount>;
|
|
2805
|
+
unconfirmedBalance: Maybe<CurrencyAmount>;
|
|
2806
|
+
} | null;
|
|
2807
|
+
recentTransactions: Transaction[];
|
|
2808
|
+
};
|
|
2809
|
+
|
|
2810
|
+
type TransactionUpdate = {
|
|
2811
|
+
/**
|
|
2812
|
+
* The unique identifier of this entity across all Lightspark systems.
|
|
2813
|
+
* Should be treated as an opaque string.
|
|
2814
|
+
**/
|
|
2815
|
+
id: string;
|
|
2816
|
+
/** The date and time when this transaction was initiated. **/
|
|
2817
|
+
createdAt: string;
|
|
2818
|
+
/** The date and time when the entity was last updated. **/
|
|
2819
|
+
updatedAt: string;
|
|
2820
|
+
/** The current status of this transaction. **/
|
|
2821
|
+
status: TransactionStatus;
|
|
2822
|
+
/** The amount of money involved in this transaction. **/
|
|
2823
|
+
amount: CurrencyAmount;
|
|
2824
|
+
/** The typename of the object **/
|
|
2825
|
+
typename: string;
|
|
2826
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
2827
|
+
resolvedAt?: string;
|
|
2828
|
+
/**
|
|
2829
|
+
* The hash of this transaction, so it can be uniquely identified on the
|
|
2830
|
+
* Lightning Network. *
|
|
2831
|
+
*/
|
|
2832
|
+
transactionHash?: string;
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
/** Describes the reason for an invitation to not be eligible for incentives. **/
|
|
2836
|
+
declare enum IncentivesIneligibilityReason {
|
|
2837
|
+
/**
|
|
2838
|
+
* This is an enum value that represents values that could be added in the future.
|
|
2839
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
2840
|
+
*/
|
|
2841
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
2842
|
+
/**
|
|
2843
|
+
* This invitation is not eligible for incentives because it has been created outside of the
|
|
2844
|
+
* incentives flow. *
|
|
2845
|
+
*/
|
|
2846
|
+
DISABLED = "DISABLED",
|
|
2847
|
+
/** This invitation is not eligible for incentives because the sender is not eligible. **/
|
|
2848
|
+
SENDER_NOT_ELIGIBLE = "SENDER_NOT_ELIGIBLE",
|
|
2849
|
+
/** This invitation is not eligible for incentives because the receiver is not eligible. **/
|
|
2850
|
+
RECEIVER_NOT_ELIGIBLE = "RECEIVER_NOT_ELIGIBLE",
|
|
2851
|
+
/**
|
|
2852
|
+
* This invitation is not eligible for incentives because the sending VASP is not part of the
|
|
2853
|
+
* incentives program. *
|
|
2854
|
+
*/
|
|
2855
|
+
SENDING_VASP_NOT_ELIGIBLE = "SENDING_VASP_NOT_ELIGIBLE",
|
|
2856
|
+
/**
|
|
2857
|
+
* This invitation is not eligible for incentives because the receiving VASP is not part of the
|
|
2858
|
+
* incentives program. *
|
|
2859
|
+
*/
|
|
2860
|
+
RECEIVING_VASP_NOT_ELIGIBLE = "RECEIVING_VASP_NOT_ELIGIBLE",
|
|
2861
|
+
/**
|
|
2862
|
+
* This invitation is not eligible for incentives because the sender and receiver are in the same
|
|
2863
|
+
* region. *
|
|
2864
|
+
*/
|
|
2865
|
+
NOT_CROSS_BORDER = "NOT_CROSS_BORDER"
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
/** Describes the status of the incentives for this invitation. **/
|
|
2869
|
+
declare enum IncentivesStatus {
|
|
2870
|
+
/**
|
|
2871
|
+
* This is an enum value that represents values that could be added in the future.
|
|
2872
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
2873
|
+
*/
|
|
2874
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
2875
|
+
/**
|
|
2876
|
+
* The invitation is eligible for incentives in its current state. When it is claimed, we will
|
|
2877
|
+
* reassess. *
|
|
2878
|
+
*/
|
|
2879
|
+
PENDING = "PENDING",
|
|
2880
|
+
/** The incentives have been validated. **/
|
|
2881
|
+
VALIDATED = "VALIDATED",
|
|
2882
|
+
/**
|
|
2883
|
+
* This invitation is not eligible for incentives. A more detailed reason can be found in the
|
|
2884
|
+
* `incentives_ineligibility_reason` field. *
|
|
2885
|
+
*/
|
|
2886
|
+
INELIGIBLE = "INELIGIBLE"
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
/** This is an object representing an UMA.ME invitation. **/
|
|
2890
|
+
interface UmaInvitation {
|
|
2891
|
+
/**
|
|
2892
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
2893
|
+
* opaque string.
|
|
2894
|
+
**/
|
|
2895
|
+
id: string;
|
|
2896
|
+
/** The date and time when the entity was first created. **/
|
|
2897
|
+
createdAt: string;
|
|
2898
|
+
/** The date and time when the entity was last updated. **/
|
|
2899
|
+
updatedAt: string;
|
|
2900
|
+
/** The code that uniquely identifies this invitation. **/
|
|
2901
|
+
code: string;
|
|
2902
|
+
/** The URL where this invitation can be claimed. **/
|
|
2903
|
+
url: string;
|
|
2904
|
+
/** The UMA of the user who created the invitation. **/
|
|
2905
|
+
inviterUma: string;
|
|
2906
|
+
/** The current status of the incentives that may be tied to this invitation. **/
|
|
2907
|
+
incentivesStatus: IncentivesStatus;
|
|
2908
|
+
/** The typename of the object **/
|
|
2909
|
+
typename: string;
|
|
2910
|
+
/** The UMA of the user who claimed the invitation. **/
|
|
2911
|
+
inviteeUma?: string | undefined;
|
|
2912
|
+
/** The reason why the invitation is not eligible for incentives, if applicable. **/
|
|
2913
|
+
incentivesIneligibilityReason?: IncentivesIneligibilityReason | undefined;
|
|
2914
|
+
}
|
|
2915
|
+
declare const getUmaInvitationQuery: (id: string) => Query<UmaInvitation>;
|
|
2916
|
+
|
|
2917
|
+
/**
|
|
2918
|
+
* The LightsparkClient is the main entrypoint for interacting with the
|
|
2919
|
+
* Lightspark API.
|
|
2920
|
+
*
|
|
2921
|
+
* ```ts
|
|
2922
|
+
* const lightsparkClient = new LightsparkClient(
|
|
2923
|
+
* new AccountTokenAuthProvider(TOKEN_ID, TOKEN_SECRET)
|
|
2924
|
+
* );
|
|
2925
|
+
* const encodedInvoice = await lightsparkClient.createInvoice(
|
|
2926
|
+
* RECEIVING_NODE_ID,
|
|
2927
|
+
* 100000,
|
|
2928
|
+
* "Whasssupppp",
|
|
2929
|
+
* InvoiceType.AMP,
|
|
2930
|
+
* );
|
|
2931
|
+
*
|
|
2932
|
+
* const invoiceDetails = await lightsparkClient.decodeInvoice(encodedInvoice);
|
|
2933
|
+
* console.log(invoiceDetails);
|
|
2934
|
+
*
|
|
2935
|
+
* const payment = await lightsparkClient.payInvoice(PAYING_NODE_ID, encodedInvoice, 100000);
|
|
2936
|
+
* console.log(payment);
|
|
2937
|
+
* ```
|
|
2938
|
+
*
|
|
2939
|
+
* @class LightsparkClient
|
|
2940
|
+
*/
|
|
2941
|
+
declare class LightsparkClient {
|
|
2942
|
+
private authProvider;
|
|
2943
|
+
private readonly serverUrl;
|
|
2944
|
+
private readonly cryptoImpl;
|
|
2945
|
+
private requester;
|
|
2946
|
+
private readonly nodeKeyCache;
|
|
2947
|
+
private readonly nodeKeyLoaderCache;
|
|
2948
|
+
private readonly LIGHTSPARK_SDK_ENDPOINT;
|
|
2949
|
+
/**
|
|
2950
|
+
* Constructs a new LightsparkClient.
|
|
2951
|
+
*
|
|
2952
|
+
* @param authProvider The auth provider to use for authentication. Defaults to a stub auth provider.
|
|
2953
|
+
* For server-side
|
|
2954
|
+
* use, you should use the `AccountTokenAuthProvider`.
|
|
2955
|
+
* @param serverUrl The base URL for the Lightspark environment you want to connect to. Your API credentials determine whether you're in test mode or live mode. Typically, you won't need to set this parameter unless you want to connect to a different Lightspark environment than the default production environment.
|
|
2956
|
+
* @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto.
|
|
2957
|
+
* For React Native, you should use the `ReactNativeCrypto`
|
|
2958
|
+
* implementation from `@lightsparkdev/react-native`.
|
|
2959
|
+
*/
|
|
2960
|
+
constructor(authProvider?: AuthProvider, serverUrl?: string, cryptoImpl?: CryptoInterface);
|
|
2961
|
+
/**
|
|
2962
|
+
* Sets the key loader for a node. This unlocks client operations that
|
|
2963
|
+
* require a private key. Passing in [NodeIdAndPasswordSigningKeyLoaderArgs]
|
|
2964
|
+
* loads the RSA key for an OSK node.
|
|
2965
|
+
* Passing in [MasterSeedSigningKeyLoaderArgs] loads the Secp256k1 key for a
|
|
2966
|
+
* remote signing node.
|
|
2967
|
+
*
|
|
2968
|
+
* @param nodeId The ID of the node the key is for
|
|
2969
|
+
* @param loader The loader for the key
|
|
2970
|
+
*/
|
|
2971
|
+
loadNodeSigningKey(nodeId: string, loaderArgs: SigningKeyLoaderArgs): Promise<boolean>;
|
|
2972
|
+
/**
|
|
2973
|
+
* Gets the signing key for a node. Must have previously called
|
|
2974
|
+
* [loadNodeSigningKey].
|
|
2975
|
+
*
|
|
2976
|
+
* @param nodeId The ID of the node the key is for
|
|
2977
|
+
* @returns The signing key for the node
|
|
2978
|
+
*/
|
|
2979
|
+
getNodeSigningKey(nodeId: string): Promise<SigningKey | undefined>;
|
|
2980
|
+
/**
|
|
2981
|
+
* Sets the auth provider for the client.
|
|
2982
|
+
* This is useful for switching between auth providers if you are using
|
|
2983
|
+
* multiple accounts or waiting for the user to log in.
|
|
2984
|
+
*
|
|
2985
|
+
* @param authProvider
|
|
2986
|
+
*/
|
|
2987
|
+
setAuthProvider(authProvider: AuthProvider): void;
|
|
2988
|
+
/**
|
|
2989
|
+
* @returns Whether or not the client is authorized. This is useful for determining if the user is logged in or not.
|
|
2990
|
+
*/
|
|
2991
|
+
isAuthorized(): Promise<boolean>;
|
|
2992
|
+
/**
|
|
2993
|
+
* @returns The current account, if one exists.
|
|
2994
|
+
*/
|
|
2995
|
+
getCurrentAccount(): Promise<Maybe<Account>>;
|
|
2996
|
+
/**
|
|
2997
|
+
* Retrieves the most recent transactions for a given node.
|
|
2998
|
+
*
|
|
2999
|
+
* @param nodeId The node ID for which to read transactions
|
|
3000
|
+
* @param numTransactions The maximum number of transactions to read. Defaults to 20.
|
|
3001
|
+
* @param bitcoinNetwork The bitcoin network on which to read transactions. Defaults to MAINNET.
|
|
3002
|
+
* @param afterDate Filters transactions to those after the given date. Defaults to undefined (no limit).
|
|
3003
|
+
* @returns An array of transactions for the given node ID.
|
|
3004
|
+
*/
|
|
3005
|
+
getRecentTransactions(nodeId: string, numTransactions?: number, bitcoinNetwork?: BitcoinNetwork, afterDate?: Maybe<string>): Promise<Transaction[]>;
|
|
3006
|
+
getTransaction(transactionId: string): Promise<Maybe<Transaction>>;
|
|
3007
|
+
/**
|
|
3008
|
+
* Retrieves the most recent payment requests for a given node.
|
|
3009
|
+
*
|
|
3010
|
+
* @param nodeId The node ID for which to read transactions
|
|
3011
|
+
* @param numTransactions The maximum number of transactions to read. Defaults to 20.
|
|
3012
|
+
* @param bitcoinNetwork The bitcoin network on which to read transactions. Defaults to MAINNET.
|
|
3013
|
+
* @param afterDate Filters transactions to those after the given date. Defaults to undefined (no limit).
|
|
3014
|
+
* @returns An array of payment requests for the given node ID.
|
|
3015
|
+
*/
|
|
3016
|
+
getRecentPaymentRequests(nodeId: string, numTransactions?: number, bitcoinNetwork?: BitcoinNetwork, afterDate?: Maybe<string>): Promise<Transaction[]>;
|
|
3017
|
+
/**
|
|
3018
|
+
* Starts listening for new transactions or updates to existing transactions
|
|
3019
|
+
* for a list of nodes.
|
|
3020
|
+
*
|
|
3021
|
+
* @param nodeIds The node IDs for which to listen to transactions.
|
|
3022
|
+
* @returns A zen-observable that emits transaction updates for the given node IDs.
|
|
3023
|
+
*/
|
|
3024
|
+
listenToTransactions(nodeIds: string[]): Observable<TransactionUpdate | undefined>;
|
|
3025
|
+
/**
|
|
3026
|
+
* Retrieves a dashboard of basic info for the authenticated account.
|
|
3027
|
+
* See `AccountDashboard` for which info is included.
|
|
3028
|
+
*
|
|
3029
|
+
* @param nodeIds The node IDs to include in the dashboard. Defaults to undefined (all nodes).
|
|
3030
|
+
* @param bitcoinNetwork The bitcoin network to include in the dashboard. Defaults to MAINNET.
|
|
3031
|
+
* @returns A basic account dashboard for the given node IDs.
|
|
3032
|
+
* @throws LightsparkAuthException if the user is not logged in or a LightsparkException if no nodes are found.
|
|
3033
|
+
*/
|
|
3034
|
+
getAccountDashboard(nodeIds?: string[] | undefined, bitcoinNetwork?: BitcoinNetwork): Promise<AccountDashboard>;
|
|
3035
|
+
/**
|
|
3036
|
+
* Gets a basic dashboard for a single node, including recent transactions.
|
|
3037
|
+
* See `SingleNodeDashboard` for which info is included.
|
|
3038
|
+
*
|
|
3039
|
+
* @param nodeId The node ID for which to get a dashboard.
|
|
3040
|
+
* @param bitcoinNetwork The bitcoin network for which to get a dashboard. Defaults to MAINNET.
|
|
3041
|
+
* @param transactionsAfterDate Filters recent transactions to those after the given date.
|
|
3042
|
+
* Defaults to undefined (no limit).
|
|
3043
|
+
* @returns A basic dashboard for the given node ID.
|
|
3044
|
+
*/
|
|
3045
|
+
getSingleNodeDashboard(nodeId: string, bitcoinNetwork?: BitcoinNetwork, transactionsAfterDate?: Maybe<string>): Promise<SingleNodeDashboard>;
|
|
3046
|
+
/**
|
|
3047
|
+
* Creates an invoice for the given node.
|
|
3048
|
+
*
|
|
3049
|
+
* Test mode note: You can simulate a payment of this invoice in test move
|
|
3050
|
+
* using [createTestModePayment].
|
|
3051
|
+
*
|
|
3052
|
+
* @param nodeId The node ID for which to create an invoice.
|
|
3053
|
+
* @param amountMsats The amount of the invoice in msats. You can create a zero-amount invoice to accept any payment amount.
|
|
3054
|
+
* @param memo A string memo to include in the invoice as a description.
|
|
3055
|
+
* @param type The type of invoice to create. Defaults to a normal payment invoice, but you can pass InvoiceType.AMP
|
|
3056
|
+
* to create an [AMP invoice](https://docs.lightning.engineering/lightning-network-tools/lnd/amp), which can be
|
|
3057
|
+
* paid multiple times.
|
|
3058
|
+
* @param expirySecs The number of seconds until the invoice expires. Defaults to 86400 (1 day).
|
|
3059
|
+
* @returns An encoded payment request for the invoice, or undefined if the invoice could not be created.
|
|
3060
|
+
*/
|
|
3061
|
+
createInvoice(nodeId: string, amountMsats: number, memo: string, type?: InvoiceType | undefined, expirySecs?: number | undefined): Promise<string | undefined>;
|
|
3062
|
+
/**
|
|
3063
|
+
* Generates a Lightning Invoice (follows the Bolt 11 specification) to
|
|
3064
|
+
* request a payment from another Lightning Node.
|
|
3065
|
+
* This should only be used for generating invoices for LNURLs,
|
|
3066
|
+
* with [createInvoice] preferred in the general case.
|
|
3067
|
+
*
|
|
3068
|
+
* Test mode note: You can simulate a payment of this invoice in test move
|
|
3069
|
+
* using [createTestModePayment].
|
|
3070
|
+
*
|
|
3071
|
+
* @param nodeId The node ID for which to create an invoice.
|
|
3072
|
+
* @param amountMsats The amount of the invoice in msats. You can create a zero-amount invoice to accept any payment amount.
|
|
3073
|
+
* @param metadata The LNURL metadata payload field in the initial payreq response. This wil be hashed and present in the
|
|
3074
|
+
* h-tag (SHA256 purpose of payment) of the resulting Bolt 11 invoice. See
|
|
3075
|
+
* [this spec](https://github.com/lnurl/luds/blob/luds/06.md#pay-to-static-qrnfclink) for details.
|
|
3076
|
+
* @param expirySecs The number of seconds until the invoice expires. Defaults to 86400 (1 day).
|
|
3077
|
+
* @returns An Invoice object representing the generated invoice.
|
|
3078
|
+
*/
|
|
3079
|
+
createLnurlInvoice(nodeId: string, amountMsats: number, metadata: string, expirySecs?: number | undefined): Promise<Invoice | undefined>;
|
|
3080
|
+
/**
|
|
3081
|
+
* Creates a new invoice for the UMA protocol.
|
|
3082
|
+
* The metadata is hashed and included in the invoice.
|
|
3083
|
+
* This API generates a Lightning Invoice (follows the Bolt 11 specification)
|
|
3084
|
+
* to request a payment from another Lightning Node.
|
|
3085
|
+
* This should only be used for generating invoices for UMA,
|
|
3086
|
+
* with `createInvoice` preferred in the general case.
|
|
3087
|
+
*
|
|
3088
|
+
* @param nodeId The node ID for which to create an invoice.
|
|
3089
|
+
* @param amountMsats The amount of the invoice in msats. You can create a zero-amount invoice to accept any payment amount.
|
|
3090
|
+
* @param metadata The LNURL metadata payload field in the initial payreq response. This wil be hashed and present in the
|
|
3091
|
+
* h-tag (SHA256 purpose of payment) of the resulting Bolt 11 invoice. See
|
|
3092
|
+
* [this spec](https://github.com/lnurl/luds/blob/luds/06.md#pay-to-static-qrnfclink) for details.
|
|
3093
|
+
* @param expirySecs The number of seconds until the invoice expires. Defaults to 3600 (1 hour).
|
|
3094
|
+
* @param signingPrivateKey The receiver's signing private key. Used to hash the receiver identifier.
|
|
3095
|
+
* @param receiverIdentifier Optional identifier of the receiver. If provided, this will be hashed using a
|
|
3096
|
+
* monthly-rotated seed and used for anonymized analysis.
|
|
3097
|
+
* @returns An Invoice object representing the generated invoice.
|
|
3098
|
+
*/
|
|
3099
|
+
createUmaInvoice(nodeId: string, amountMsats: number, metadata: string, expirySecs?: number | undefined, signingPrivateKey?: Uint8Array | undefined, receiverIdentifier?: string | undefined): Promise<Invoice | undefined>;
|
|
3100
|
+
/**
|
|
3101
|
+
* Cancels an existing unpaid invoice and returns that invoice. Cancelled invoices cannot be paid.
|
|
3102
|
+
*
|
|
3103
|
+
* @param invoiceId The ID of the invoice to cancel.
|
|
3104
|
+
* @returns The cancelled invoice, or undefined if the invoice could not be cancelled.
|
|
3105
|
+
*/
|
|
3106
|
+
cancelInvoice(invoiceId: string): Promise<Invoice | undefined>;
|
|
3107
|
+
/**
|
|
3108
|
+
* Decodes an encoded lightning invoice string.
|
|
3109
|
+
*
|
|
3110
|
+
* @param encodedInvoice The string encoded invoice to decode.
|
|
3111
|
+
* @returns Decoded invoice data.
|
|
3112
|
+
*/
|
|
3113
|
+
decodeInvoice(encodedInvoice: string): Promise<InvoiceData>;
|
|
3114
|
+
/**
|
|
3115
|
+
* Gets an estimate of the fee for sending a payment over the given bitcoin
|
|
3116
|
+
* network.
|
|
3117
|
+
*
|
|
3118
|
+
* @param bitcoinNetwork The bitcoin network for which to get a fee estimate. Defaults to MAINNET.
|
|
3119
|
+
* @returns A fee estimate for the given bitcoin network including a minimum fee rate, and a max-speed fee rate.
|
|
3120
|
+
*/
|
|
3121
|
+
getBitcoinFeeEstimate(bitcoinNetwork?: BitcoinNetwork): Promise<FeeEstimate>;
|
|
3122
|
+
/**
|
|
3123
|
+
* Gets an estimate of the fees that will be paid for a Lightning invoice.
|
|
3124
|
+
*
|
|
3125
|
+
* @param nodeId The node from where you want to send the payment.
|
|
3126
|
+
* @param encodedPaymentRequest The invoice you want to pay (as defined by the BOLT11 standard).
|
|
3127
|
+
* @param amountMsats If the invoice does not specify a payment amount, then the amount that you wish to pay,
|
|
3128
|
+
* expressed in msats.
|
|
3129
|
+
* @returns An estimate of the fees that will be paid for a Lightning invoice.
|
|
3130
|
+
*/
|
|
3131
|
+
getLightningFeeEstimateForInvoice(nodeId: string, encodedPaymentRequest: string, amountMsats?: number | undefined): Promise<CurrencyAmount>;
|
|
3132
|
+
/**
|
|
3133
|
+
* Returns an estimate of the fees that will be paid to send a payment to
|
|
3134
|
+
* another Lightning node.
|
|
3135
|
+
*
|
|
3136
|
+
* @param nodeId The node from where you want to send the payment.
|
|
3137
|
+
* @param destinationNodePublicKey The public key of the node that you want to pay.
|
|
3138
|
+
* @param amountMsats The payment amount expressed in msats.
|
|
3139
|
+
* @returns An estimate of the fees that will be paid to send a payment to another Lightning node.
|
|
3140
|
+
*/
|
|
3141
|
+
getLightningFeeEstimateForNode(nodeId: string, destinationNodePublicKey: string, amountMsats: number): Promise<CurrencyAmount>;
|
|
3142
|
+
/**
|
|
3143
|
+
* Returns an estimated amount for the L1 withdrawal fees for the specified node, amount, and
|
|
3144
|
+
* strategy.
|
|
3145
|
+
*
|
|
3146
|
+
* @param nodeId The node from which you'd like to make the withdrawal.
|
|
3147
|
+
* @param amountSats The amount you want to withdraw from this node in Satoshis. Use the special value -1 to withdrawal all funds from this node.
|
|
3148
|
+
* @param withdrawalMode The strategy that should be used to withdraw the funds from this node.
|
|
3149
|
+
* @returns An estimated amount for the L1 withdrawal fees for the specified node, amount, and strategy.
|
|
3150
|
+
*/
|
|
3151
|
+
getWithrawalFeeEstimate(nodeId: string, amountSats: number, withdrawalMode: WithdrawalMode): Promise<CurrencyAmount>;
|
|
3152
|
+
/**
|
|
3153
|
+
* Directly unlocks a node with a signing private key or alias.
|
|
3154
|
+
*
|
|
3155
|
+
* @param nodeId The ID of the node to unlock.
|
|
3156
|
+
* @param signingPrivateKeyPEM The PEM-encoded signing private key.
|
|
3157
|
+
*/
|
|
3158
|
+
loadNodeKey(nodeId: string, signingPrivateKeyOrAlias: KeyOrAliasType): Promise<void>;
|
|
3159
|
+
/**
|
|
3160
|
+
* Sends a lightning payment for a given invoice.
|
|
3161
|
+
*
|
|
3162
|
+
* Test mode note: For test mode, you can use the [createTestModeInvoice]
|
|
3163
|
+
* function to create an invoice you can pay in test mode.
|
|
3164
|
+
*
|
|
3165
|
+
* @param payerNodeId The ID of the node that will pay the invoice.
|
|
3166
|
+
* @param encodedInvoice The encoded invoice to pay.
|
|
3167
|
+
* @param maximumFeesMsats Maximum fees (in msats) to pay for the payment. This parameter is required.
|
|
3168
|
+
* As guidance, a maximum fee of 16 basis points should make almost all
|
|
3169
|
+
* transactions succeed. For example,
|
|
3170
|
+
* for a transaction between 10k sats and 100k sats,
|
|
3171
|
+
* this would mean a fee limit of 16 to 160 sats.
|
|
3172
|
+
* @param timeoutSecs A timeout for the payment in seconds. Defaults to 60 seconds.
|
|
3173
|
+
* @param amountMsats The amount to pay in msats for a zero-amount invoice. Defaults to the full amount of the
|
|
3174
|
+
* invoice. NOTE: This parameter can only be passed for a zero-amount
|
|
3175
|
+
* invoice. Otherwise, the call will fail.
|
|
3176
|
+
* @returns An `OutgoingPayment` object if the payment was successful, or undefined if the payment failed.
|
|
3177
|
+
*/
|
|
3178
|
+
payInvoice(payerNodeId: string, encodedInvoice: string, maximumFeesMsats: number, timeoutSecs?: number, amountMsats?: number | undefined): Promise<OutgoingPayment | undefined>;
|
|
3179
|
+
/**
|
|
3180
|
+
* sends an UMA payment to a node on the Lightning Network,
|
|
3181
|
+
* based on the invoice (as defined by the BOLT11 specification) that you
|
|
3182
|
+
* provide.
|
|
3183
|
+
* This should only be used for paying UMA invoices,
|
|
3184
|
+
* with `payInvoice` preferred in the general case.
|
|
3185
|
+
*
|
|
3186
|
+
* @param payerNodeId The ID of the node that will pay the invoice.
|
|
3187
|
+
* @param encodedInvoice The encoded invoice to pay.
|
|
3188
|
+
* @param maximumFeesMsats Maximum fees (in msats) to pay for the payment. This parameter is required.
|
|
3189
|
+
* As guidance, a maximum fee of 16 basis points should make almost all
|
|
3190
|
+
* transactions succeed. For example,
|
|
3191
|
+
* for a transaction between 10k sats and 100k sats,
|
|
3192
|
+
* this would mean a fee limit of 16 to 160 sats.
|
|
3193
|
+
* @param timeoutSecs A timeout for the payment in seconds. Defaults to 60 seconds.
|
|
3194
|
+
* @param amountMsats The amount to pay in msats for a zero-amount invoice. Defaults to the full amount of the
|
|
3195
|
+
* invoice. NOTE: This parameter can only be passed for a zero-amount
|
|
3196
|
+
* invoice. Otherwise, the call will fail.
|
|
3197
|
+
* @param signingPrivateKey The sender's signing private key. Used to hash the sender identifier.
|
|
3198
|
+
* @param senderIdentifier Optional identifier of the sender. If provided, this will be hashed using a
|
|
3199
|
+
* monthly-rotated seed and used for anonymized analysis.
|
|
3200
|
+
* @returns An `OutgoingPayment` object if the payment was successful, or undefined if the payment failed.
|
|
3201
|
+
*/
|
|
3202
|
+
payUmaInvoice(payerNodeId: string, encodedInvoice: string, maximumFeesMsats: number, timeoutSecs?: number, amountMsats?: number | undefined, signingPrivateKey?: Uint8Array | undefined, senderIdentifier?: string | undefined): Promise<OutgoingPayment | undefined>;
|
|
3203
|
+
/**
|
|
3204
|
+
* Waits for a transaction to have a completed status, and returns the
|
|
3205
|
+
* transaction.
|
|
3206
|
+
*
|
|
3207
|
+
* @param transactionId The ID of the transaction to wait for
|
|
3208
|
+
* @param pollTimeoutSecs The timeout in seconds that we will wait before throwing an exception
|
|
3209
|
+
*/
|
|
3210
|
+
waitForTransactionComplete<T = Transaction>(transactionId: string, pollTimeoutSecs?: number): Promise<T>;
|
|
3211
|
+
/**
|
|
3212
|
+
* Sends a payment directly to a node on the Lightning Network through the
|
|
3213
|
+
* public key of the node without an invoice.
|
|
3214
|
+
*
|
|
3215
|
+
* @param payerNodeId The ID of the node that will send the payment.
|
|
3216
|
+
* @param destinationPublicKey The public key of the destination node.
|
|
3217
|
+
* @param timeoutSecs The timeout in seconds that we will try to make the payment.
|
|
3218
|
+
* @param amountMsats The amount to pay in msats.
|
|
3219
|
+
* @param maximumFeesMsats Maximum fees (in msats) to pay for the payment. This parameter is required.
|
|
3220
|
+
* As guidance, a maximum fee of 15 basis points should make almost all
|
|
3221
|
+
* transactions succeed. For example,
|
|
3222
|
+
* for a transaction between 10k sats and 100k sats,
|
|
3223
|
+
* this would mean a fee limit of 15 to 150 sats.
|
|
3224
|
+
* @returns An `OutgoingPayment` object if the payment was successful, or undefined if the payment failed.
|
|
3225
|
+
*/
|
|
3226
|
+
sendPayment(payerNodeId: string, destinationPublicKey: string, timeoutSecs: number | undefined, amountMsats: number, maximumFeesMsats: number): Promise<OutgoingPayment | undefined>;
|
|
3227
|
+
/**
|
|
3228
|
+
* Creates an L1 Bitcoin wallet address for a given node which can be used to
|
|
3229
|
+
* deposit or withdraw funds.
|
|
3230
|
+
*
|
|
3231
|
+
* @param nodeId The ID of the node to create a wallet address for.
|
|
3232
|
+
* @returns A string containing the wallet address for the given node.
|
|
3233
|
+
*/
|
|
3234
|
+
createNodeWalletAddress(nodeId: string): Promise<string>;
|
|
3235
|
+
/**
|
|
3236
|
+
* Withdraws funds from the account and sends it to the requested bitcoin
|
|
3237
|
+
* address.
|
|
3238
|
+
*
|
|
3239
|
+
* Depending on the chosen mode, it will first take the funds from the
|
|
3240
|
+
* wallet, and if applicable, close channels appropriately to recover enough
|
|
3241
|
+
* funds and reopen channels with the remaining funds.
|
|
3242
|
+
* The process is asynchronous and may take up to a few minutes.
|
|
3243
|
+
* You can check the progress by polling the `WithdrawalRequest` that is
|
|
3244
|
+
* created, or by subscribing to a webhook.
|
|
3245
|
+
*
|
|
3246
|
+
* @param nodeId The ID of the node from which to withdraw funds.
|
|
3247
|
+
* @param amountSats The amount of funds to withdraw in satoshis.
|
|
3248
|
+
* @param bitcoinAddress The Bitcoin address to withdraw funds to.
|
|
3249
|
+
* @param mode The mode to use for the withdrawal. See `WithdrawalMode` for more information.
|
|
3250
|
+
*/
|
|
3251
|
+
requestWithdrawal(nodeId: string, amountSats: number, bitcoinAddress: string, mode: WithdrawalMode): Promise<WithdrawalRequest>;
|
|
3252
|
+
/**
|
|
3253
|
+
* Adds funds to a Lightspark node on the REGTEST network.
|
|
3254
|
+
* If the amount is not specified, 10,000,000 SATOSHI will be added.
|
|
3255
|
+
* This API only functions for nodes created on the REGTEST network and will
|
|
3256
|
+
* return an error when called for any non-REGTEST node.
|
|
3257
|
+
*
|
|
3258
|
+
* @param nodeId The ID of the node to fund. Must be a REGTEST node.
|
|
3259
|
+
* @param amountSats The amount of funds to add to the node in satoshis. Defaults to 10,000,000 SATOSHI.
|
|
3260
|
+
* @returns
|
|
3261
|
+
*/
|
|
3262
|
+
fundNode(nodeId: string, amountSats?: number | undefined): Promise<CurrencyAmount>;
|
|
3263
|
+
/**
|
|
3264
|
+
* Creates a new API token that can be used to authenticate requests for this
|
|
3265
|
+
* account when using the Lightspark APIs and SDKs.
|
|
3266
|
+
*
|
|
3267
|
+
* @param name Creates a new API token that can be used to authenticate requests for this account when using the
|
|
3268
|
+
* Lightspark APIs and SDKs.
|
|
3269
|
+
* @param transact Whether the token should be able to transact or only view data.
|
|
3270
|
+
* @param testMode True if the token should be able to access only testnet false to access only mainnet.
|
|
3271
|
+
* @returns An object containing the API token and client secret.
|
|
3272
|
+
*/
|
|
3273
|
+
createApiToken(name: string, transact?: boolean, testMode?: boolean): Promise<CreateApiTokenOutput>;
|
|
3274
|
+
/**
|
|
3275
|
+
* Deletes an existing API token from this account.
|
|
3276
|
+
*
|
|
3277
|
+
* @param id The ID of the API token to delete.
|
|
3278
|
+
*/
|
|
3279
|
+
deleteApiToken(id: string): Promise<void>;
|
|
3280
|
+
/**
|
|
3281
|
+
* In test mode, generates a Lightning Invoice which can be paid by a local
|
|
3282
|
+
* node. This call is only valid in test mode.
|
|
3283
|
+
* You can then pay the invoice using [payInvoice].
|
|
3284
|
+
*
|
|
3285
|
+
* @param localNodeId The ID of the node that will pay the invoice.
|
|
3286
|
+
* @param amountMsats The amount to pay in milli-satoshis.
|
|
3287
|
+
* @param memo An optional memo to attach to the invoice.
|
|
3288
|
+
* @param invoiceType The type of invoice to create.
|
|
3289
|
+
*/
|
|
3290
|
+
createTestModeInvoice(localNodeId: string, amountMsats: number, memo?: string | undefined, invoiceType?: InvoiceType): Promise<string | null>;
|
|
3291
|
+
/**
|
|
3292
|
+
* In test mode, simulates a payment of a Lightning Invoice from another
|
|
3293
|
+
* node. This can only be used in test mode and should be used with invoices
|
|
3294
|
+
* generated by [createInvoice].
|
|
3295
|
+
*
|
|
3296
|
+
* @param localNodeId The ID of the node that will receive the payment.
|
|
3297
|
+
* @param encodedInvoice The encoded invoice to pay.
|
|
3298
|
+
* @param amountMsats The amount to pay in milli-satoshis for 0-amount invoices. This should be null for non-zero
|
|
3299
|
+
* amount invoices.
|
|
3300
|
+
*/
|
|
3301
|
+
createTestModePayment(localNodeId: string, encodedInvoice: string, amountMsats?: number | undefined): Promise<IncomingPayment | null>;
|
|
3302
|
+
/**
|
|
3303
|
+
* Performs sanction screening on a lightning node against a given compliance provider.
|
|
3304
|
+
*
|
|
3305
|
+
* @param complianceProvider The provider that you want to use to perform the screening. You must have a valid
|
|
3306
|
+
* API token for the provider set in your Lightspark account settings.
|
|
3307
|
+
* @param nodePubKey The public key of the node that needs to be screened.
|
|
3308
|
+
* @returns A RiskRating for the node.
|
|
3309
|
+
*/
|
|
3310
|
+
screenNode(complianceProvider: ComplianceProvider, nodePubKey: string): Promise<RiskRating | null>;
|
|
3311
|
+
/**
|
|
3312
|
+
* Registers a succeeded payment with a compliance provider for monitoring.
|
|
3313
|
+
*
|
|
3314
|
+
* @param complianceProvider The provider that you want to use to register the payment. You must have
|
|
3315
|
+
* a valid API token for the provider set in your Lightspark account settings.
|
|
3316
|
+
* @param paymentId The unique ID of the payment
|
|
3317
|
+
* @param nodePubKey The public key of the counterparty node which is the recipient node if the
|
|
3318
|
+
* payment is an outgoing payment and the sender node if the payment is an incoming payment.
|
|
3319
|
+
* @param paymentDirection Indicates whether the payment is an incoming or outgoing payment.
|
|
3320
|
+
* @returns The ID of the payment that was registered.
|
|
3321
|
+
*/
|
|
3322
|
+
registerPayment(complianceProvider: ComplianceProvider, paymentId: string, nodePubKey: string, paymentDirection: PaymentDirection): Promise<string | null>;
|
|
3323
|
+
/**
|
|
3324
|
+
* Creates an UMA invitation. If you are part of the incentive program,
|
|
3325
|
+
* you should use [createUmaInvitationWithIncentives].
|
|
3326
|
+
*
|
|
3327
|
+
* @param inviterUma The UMA of the inviter.
|
|
3328
|
+
* @returns The invitation that was created.
|
|
3329
|
+
*/
|
|
3330
|
+
createUmaInvitation(inviterUma: string): Promise<UmaInvitation | null>;
|
|
3331
|
+
/**
|
|
3332
|
+
* Creates an UMA invitation as part of the incentive program.
|
|
3333
|
+
* @param inviterUma The UMA of the inviter.
|
|
3334
|
+
* @param inviterPhoneNumber The phone number of the inviter in E164 format.
|
|
3335
|
+
* @param inviterRegion The region of the inviter.
|
|
3336
|
+
* @returns The invitation that was created.
|
|
3337
|
+
*/
|
|
3338
|
+
createUmaInvitationWithIncentives(inviterUma: string, inviterPhoneNumber: string, inviterRegion: RegionCode): Promise<UmaInvitation | null>;
|
|
3339
|
+
/**
|
|
3340
|
+
* Claims an UMA invitation. If you are part of the incentive program,
|
|
3341
|
+
* you should use [claimUmaInvitationWithIncentives].
|
|
3342
|
+
*
|
|
3343
|
+
* @param invitationCode The invitation code to claim.
|
|
3344
|
+
* @param inviteeUma The UMA of the invitee.
|
|
3345
|
+
* @returns The invitation that was claimed.
|
|
3346
|
+
*/
|
|
3347
|
+
claimUmaInvitation(invitationCode: string, inviteeUma: string): Promise<UmaInvitation | null>;
|
|
3348
|
+
/**
|
|
3349
|
+
* Claims an UMA invitation as part of the incentive program.
|
|
3350
|
+
*
|
|
3351
|
+
* @param invitationCode The invitation code to claim.
|
|
3352
|
+
* @param inviteeUma The UMA of the invitee.
|
|
3353
|
+
* @param inviteePhoneNumber The phone number of the invitee in E164 format.
|
|
3354
|
+
* @param inviteeRegion The region of the invitee.
|
|
3355
|
+
* @returns The invitation that was claimed.
|
|
3356
|
+
*/
|
|
3357
|
+
claimUmaInvitationWithIncentives(invitationCode: string, inviteeUma: string, inviteePhoneNumber: string, inviteeRegion: RegionCode): Promise<UmaInvitation | null>;
|
|
3358
|
+
/**
|
|
3359
|
+
* Fetches an UMA invitation by its invitation code.
|
|
3360
|
+
*
|
|
3361
|
+
* @param invitationCode The code of the invitation to fetch.
|
|
3362
|
+
* @returns The invitation with the given code, or null if no invitation exists with that code.
|
|
3363
|
+
*/
|
|
3364
|
+
fetchUmaInvitation(invitationCode: string): Promise<UmaInvitation | null>;
|
|
3365
|
+
/**
|
|
3366
|
+
* Fetches a created invoice by its payment hash.
|
|
3367
|
+
*
|
|
3368
|
+
* @param paymentHash
|
|
3369
|
+
* @returns The invoice if there is one corresponding to the payment hash, or null if no invoice exists with that payment hash.
|
|
3370
|
+
*/
|
|
3371
|
+
invoiceForPaymentHash(paymentHash: string): Promise<Invoice | null>;
|
|
3372
|
+
/**
|
|
3373
|
+
* Fetches outgoing payments for a given payment hash if there are any.
|
|
3374
|
+
*
|
|
3375
|
+
* @param paymentHash
|
|
3376
|
+
* @param statuses Filter to only include payments with the given statuses. If not provided, all statuses are included.
|
|
3377
|
+
*/
|
|
3378
|
+
outgoingPaymentsForPaymentHash(paymentHash: string, statuses?: TransactionStatus[] | undefined): Promise<OutgoingPayment[]>;
|
|
3379
|
+
/**
|
|
3380
|
+
* Fetches Outgoing payments for a given invoice if there are any.
|
|
3381
|
+
*
|
|
3382
|
+
* @param encodedInvoice encoded invoice associated with outgoing payment
|
|
3383
|
+
* @param statuses Filter to only include payments with the given statuses. If not provided, all statuses are included.
|
|
3384
|
+
*/
|
|
3385
|
+
outgoingPaymentsForInvoice(encodedInvoice: string, statuses?: TransactionStatus[] | undefined): Promise<OutgoingPayment[]>;
|
|
3386
|
+
/**
|
|
3387
|
+
* Fetches Incoming payments for a given invoice if there are any.
|
|
3388
|
+
*
|
|
3389
|
+
* @param invoiceId id of associated invoice
|
|
3390
|
+
* @param statuses Filter to only include payments with the given statuses. If not provided, all statuses are included.
|
|
3391
|
+
*/
|
|
3392
|
+
incomingPaymentsForInvoice(invoiceId: string, statuses?: TransactionStatus[] | undefined): Promise<IncomingPayment[]>;
|
|
3393
|
+
private hashPhoneNumber;
|
|
3394
|
+
hashUmaIdentifier(identifier: string, signingPrivateKey: Uint8Array): Promise<string>;
|
|
3395
|
+
getUtcDateTime(): Date;
|
|
3396
|
+
/**
|
|
3397
|
+
* Executes a raw `Query` against the Lightspark API.
|
|
3398
|
+
*
|
|
3399
|
+
* This generally should not be used directly,
|
|
3400
|
+
* but is exposed for advanced use cases and for internal use to retrieve
|
|
3401
|
+
* complex fields from objects.
|
|
3402
|
+
*
|
|
3403
|
+
* @param query The `Query` to execute.
|
|
3404
|
+
* @returns The result of the query.
|
|
3405
|
+
*/
|
|
3406
|
+
executeRawQuery<T>(query: Query<T>): Promise<T | null>;
|
|
3407
|
+
/**
|
|
3408
|
+
* Enable logging for debugging purposes
|
|
3409
|
+
*
|
|
3410
|
+
* @param enabled Whether logging should be enabled.
|
|
3411
|
+
* @param level The logging level to use.
|
|
3412
|
+
* */
|
|
3413
|
+
setLoggingEnabled(enabled: boolean, level?: LoggingLevel): void;
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
/** Audit log actor who called the GraphQL mutation **/
|
|
3417
|
+
interface AuditLogActor {
|
|
3418
|
+
/**
|
|
3419
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
3420
|
+
* opaque string.
|
|
3421
|
+
**/
|
|
3422
|
+
id: string;
|
|
3423
|
+
/** The date and time when the entity was first created. **/
|
|
3424
|
+
createdAt: string;
|
|
3425
|
+
/** The date and time when the entity was last updated. **/
|
|
3426
|
+
updatedAt: string;
|
|
3427
|
+
/** The typename of the object **/
|
|
3428
|
+
typename: string;
|
|
3429
|
+
}
|
|
3430
|
+
declare const getAuditLogActorQuery: (id: string) => Query<AuditLogActor>;
|
|
3431
|
+
|
|
3432
|
+
/**
|
|
3433
|
+
* The unique identifier of the Invoice that should be cancelled. The invoice is supposed to be
|
|
3434
|
+
* open, not settled and not expired. *
|
|
3435
|
+
*/
|
|
3436
|
+
interface CancelInvoiceInput {
|
|
3437
|
+
invoiceId: string;
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
/**
|
|
3441
|
+
* The Invoice that was cancelled. If the invoice was already cancelled, the same invoice is
|
|
3442
|
+
* returned. *
|
|
3443
|
+
*/
|
|
3444
|
+
interface CancelInvoiceOutput {
|
|
3445
|
+
invoiceId: string;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
interface ChannelSnapshot {
|
|
3449
|
+
/**
|
|
3450
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
3451
|
+
* opaque string.
|
|
3452
|
+
**/
|
|
3453
|
+
id: string;
|
|
3454
|
+
/** The date and time when the entity was first created. **/
|
|
3455
|
+
createdAt: string;
|
|
3456
|
+
/** The date and time when the entity was last updated. **/
|
|
3457
|
+
updatedAt: string;
|
|
3458
|
+
channelId: string;
|
|
3459
|
+
/** The timestamp that was used to query the snapshot of the channel **/
|
|
3460
|
+
timestamp: string;
|
|
3461
|
+
/** The typename of the object **/
|
|
3462
|
+
typename: string;
|
|
3463
|
+
localBalance?: CurrencyAmount | undefined;
|
|
3464
|
+
localUnsettledBalance?: CurrencyAmount | undefined;
|
|
3465
|
+
remoteBalance?: CurrencyAmount | undefined;
|
|
3466
|
+
remoteUnsettledBalance?: CurrencyAmount | undefined;
|
|
3467
|
+
status?: string | undefined;
|
|
3468
|
+
localChannelReserve?: CurrencyAmount | undefined;
|
|
3469
|
+
}
|
|
3470
|
+
declare const getChannelSnapshotQuery: (id: string) => Query<ChannelSnapshot>;
|
|
3471
|
+
|
|
3472
|
+
interface ClaimUmaInvitationInput {
|
|
3473
|
+
/** The unique code that identifies this invitation and was shared by the inviter. **/
|
|
3474
|
+
invitationCode: string;
|
|
3475
|
+
/**
|
|
3476
|
+
* The UMA of the user claiming the invitation. It will be sent to the inviter so that they can
|
|
3477
|
+
* start transacting with the invitee.
|
|
3478
|
+
**/
|
|
3479
|
+
inviteeUma: string;
|
|
3480
|
+
}
|
|
3481
|
+
|
|
3482
|
+
interface ClaimUmaInvitationOutput {
|
|
3483
|
+
/** An UMA.ME invitation object. **/
|
|
3484
|
+
invitationId: string;
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
interface ClaimUmaInvitationWithIncentivesInput {
|
|
3488
|
+
/** The unique code that identifies this invitation and was shared by the inviter. **/
|
|
3489
|
+
invitationCode: string;
|
|
3490
|
+
/**
|
|
3491
|
+
* The UMA of the user claiming the invitation. It will be sent to the inviter so that they can
|
|
3492
|
+
* start transacting with the invitee.
|
|
3493
|
+
**/
|
|
3494
|
+
inviteeUma: string;
|
|
3495
|
+
/** The phone hash of the user getting the invitation. **/
|
|
3496
|
+
inviteePhoneHash: string;
|
|
3497
|
+
/** The region of the user getting the invitation. **/
|
|
3498
|
+
inviteeRegion: RegionCode;
|
|
3499
|
+
}
|
|
3500
|
+
|
|
3501
|
+
interface ClaimUmaInvitationWithIncentivesOutput {
|
|
3502
|
+
/** An UMA.ME invitation object. **/
|
|
3503
|
+
invitationId: string;
|
|
3504
|
+
}
|
|
3505
|
+
|
|
3506
|
+
interface Connection {
|
|
3507
|
+
/**
|
|
3508
|
+
* The total count of objects in this connection, using the current filters. It is different
|
|
3509
|
+
* from the number of objects returned in the current page (in the `entities` field).
|
|
3510
|
+
**/
|
|
3511
|
+
count: number;
|
|
3512
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
3513
|
+
pageInfo: PageInfo;
|
|
3514
|
+
/** The typename of the object **/
|
|
3515
|
+
typename: string;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
interface CreateApiTokenInput {
|
|
3519
|
+
/** An arbitrary name that the user can choose to identify the API token in a list. **/
|
|
3520
|
+
name: string;
|
|
3521
|
+
/** List of permissions to grant to the API token **/
|
|
3522
|
+
permissions: Permission[];
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
interface CreateInvitationWithIncentivesInput {
|
|
3526
|
+
/**
|
|
3527
|
+
* The UMA of the user creating the invitation. It will be used to identify the inviter when
|
|
3528
|
+
* receiving the invitation.
|
|
3529
|
+
**/
|
|
3530
|
+
inviterUma: string;
|
|
3531
|
+
/** The phone hash of the user creating the invitation. **/
|
|
3532
|
+
inviterPhoneHash: string;
|
|
3533
|
+
/** The region of the user creating the invitation. **/
|
|
3534
|
+
inviterRegion: RegionCode;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
interface CreateInvitationWithIncentivesOutput {
|
|
3538
|
+
/** The created invitation in the form of a string identifier. **/
|
|
3539
|
+
invitationId: string;
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
interface CreateInvoiceInput {
|
|
3543
|
+
/** The node from which to create the invoice. **/
|
|
3544
|
+
nodeId: string;
|
|
3545
|
+
/**
|
|
3546
|
+
* The amount for which the invoice should be created, in millisatoshis. Setting the amount to
|
|
3547
|
+
* 0 will allow the payer to specify an amount.
|
|
3548
|
+
**/
|
|
3549
|
+
amountMsats: number;
|
|
3550
|
+
memo?: string | undefined;
|
|
3551
|
+
invoiceType?: InvoiceType | undefined;
|
|
3552
|
+
/** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
|
|
3553
|
+
expirySecs?: number | undefined;
|
|
3554
|
+
}
|
|
3555
|
+
|
|
3556
|
+
interface CreateInvoiceOutput {
|
|
3557
|
+
invoiceId: string;
|
|
3558
|
+
}
|
|
3559
|
+
|
|
3560
|
+
interface CreateLnurlInvoiceInput {
|
|
3561
|
+
/** The node from which to create the invoice. **/
|
|
3562
|
+
nodeId: string;
|
|
3563
|
+
/** The amount for which the invoice should be created, in millisatoshis. **/
|
|
3564
|
+
amountMsats: number;
|
|
3565
|
+
/**
|
|
3566
|
+
* The SHA256 hash of the LNURL metadata payload. This will be present in the h-tag (SHA256
|
|
3567
|
+
* purpose of payment) of the resulting Bolt 11 invoice.
|
|
3568
|
+
**/
|
|
3569
|
+
metadataHash: string;
|
|
3570
|
+
/** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
|
|
3571
|
+
expirySecs?: number | undefined;
|
|
3572
|
+
/** An optional, monthly-rotated, unique hashed identifier corresponding to the receiver of the
|
|
3573
|
+
* payment. **/
|
|
3574
|
+
receiverHash?: string | undefined;
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
interface CreateNodeWalletAddressInput {
|
|
3578
|
+
nodeId: string;
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
interface MultiSigAddressValidationParameters {
|
|
3582
|
+
/** The counterparty funding public key used to create the 2-of-2 multisig for the address. **/
|
|
3583
|
+
counterpartyFundingPubkey: string;
|
|
3584
|
+
/**
|
|
3585
|
+
* The derivation path used to derive the funding public key for the 2-of-2 multisig address. *
|
|
3586
|
+
*/
|
|
3587
|
+
fundingPubkeyDerivationPath: string;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
interface CreateNodeWalletAddressOutput {
|
|
3591
|
+
nodeId: string;
|
|
3592
|
+
walletAddress: string;
|
|
3593
|
+
/**
|
|
3594
|
+
* Vaildation parameters for the 2-of-2 multisig address. None if the address is not a 2-of-2
|
|
3595
|
+
* multisig address.
|
|
3596
|
+
**/
|
|
3597
|
+
multisigWalletAddressValidationParameters?: MultiSigAddressValidationParameters | undefined;
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
interface CreateTestModeInvoiceInput {
|
|
3601
|
+
localNodeId: string;
|
|
3602
|
+
amountMsats: number;
|
|
3603
|
+
memo?: string | undefined;
|
|
3604
|
+
invoiceType?: InvoiceType | undefined;
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
interface CreateTestModeInvoiceOutput {
|
|
3608
|
+
encodedPaymentRequest: string;
|
|
3609
|
+
}
|
|
3610
|
+
|
|
3611
|
+
interface CreateTestModePaymentInput {
|
|
3612
|
+
/** The node to where you want to send the payment. **/
|
|
3613
|
+
localNodeId: string;
|
|
3614
|
+
/** The invoice you want to be paid (as defined by the BOLT11 standard). **/
|
|
3615
|
+
encodedInvoice: string;
|
|
3616
|
+
/**
|
|
3617
|
+
* The amount you will be paid for this invoice, expressed in msats. It should ONLY be set when
|
|
3618
|
+
* the invoice amount is zero.
|
|
3619
|
+
**/
|
|
3620
|
+
amountMsats?: number | undefined;
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3623
|
+
/**
|
|
3624
|
+
* This is an object identifying the output of a test mode payment. This object can be used to
|
|
3625
|
+
* retrieve the associated payment made from a Test Mode Payment call. *
|
|
3626
|
+
*/
|
|
3627
|
+
interface CreateTestModePaymentoutput {
|
|
3628
|
+
/**
|
|
3629
|
+
* The payment that has been sent.
|
|
3630
|
+
*
|
|
3631
|
+
* @deprecated Use incoming_payment instead.
|
|
3632
|
+
**/
|
|
3633
|
+
paymentId: string;
|
|
3634
|
+
/** The payment that has been received. **/
|
|
3635
|
+
incomingPaymentId: string;
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
interface CreateUmaInvitationInput {
|
|
3639
|
+
/**
|
|
3640
|
+
* The UMA of the user creating the invitation. It will be used to identify the inviter when
|
|
3641
|
+
* receiving the invitation.
|
|
3642
|
+
**/
|
|
3643
|
+
inviterUma: string;
|
|
3644
|
+
}
|
|
3645
|
+
|
|
3646
|
+
interface CreateUmaInvitationOutput {
|
|
3647
|
+
/** The created invitation in the form of a string identifier. **/
|
|
3648
|
+
invitationId: string;
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3651
|
+
interface CreateUmaInvoiceInput {
|
|
3652
|
+
nodeId: string;
|
|
3653
|
+
amountMsats: number;
|
|
3654
|
+
metadataHash: string;
|
|
3655
|
+
expirySecs?: number | undefined;
|
|
3656
|
+
receiverHash?: string | undefined;
|
|
3657
|
+
}
|
|
3658
|
+
|
|
3659
|
+
interface DeclineToSignMessagesInput {
|
|
3660
|
+
/** List of payload ids to decline to sign because validation failed. **/
|
|
3661
|
+
payloadIds: string[];
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3664
|
+
declare enum SignablePayloadStatus {
|
|
3665
|
+
/**
|
|
3666
|
+
* This is an enum value that represents values that could be added in the future.
|
|
3667
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
3668
|
+
*/
|
|
3669
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
3670
|
+
CREATED = "CREATED",
|
|
3671
|
+
SIGNED = "SIGNED",
|
|
3672
|
+
VALIDATION_FAILED = "VALIDATION_FAILED",
|
|
3673
|
+
INVALID_SIGNATURE = "INVALID_SIGNATURE"
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
interface SignablePayload {
|
|
3677
|
+
/**
|
|
3678
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
3679
|
+
* opaque string.
|
|
3680
|
+
**/
|
|
3681
|
+
id: string;
|
|
3682
|
+
/** The date and time when the entity was first created. **/
|
|
3683
|
+
createdAt: string;
|
|
3684
|
+
/** The date and time when the entity was last updated. **/
|
|
3685
|
+
updatedAt: string;
|
|
3686
|
+
/** The payload that needs to be signed. **/
|
|
3687
|
+
payload: string;
|
|
3688
|
+
/**
|
|
3689
|
+
* The consistent method for generating the same set of accounts and wallets for a given
|
|
3690
|
+
* private key *
|
|
3691
|
+
*/
|
|
3692
|
+
derivationPath: string;
|
|
3693
|
+
/** The status of the payload. **/
|
|
3694
|
+
status: SignablePayloadStatus;
|
|
3695
|
+
/** The signable this payload belongs to. **/
|
|
3696
|
+
signableId: string;
|
|
3697
|
+
/** The typename of the object **/
|
|
3698
|
+
typename: string;
|
|
3699
|
+
/** The tweak value to add. **/
|
|
3700
|
+
addTweak?: string | undefined;
|
|
3701
|
+
/** The tweak value to multiply. **/
|
|
3702
|
+
mulTweak?: string | undefined;
|
|
3703
|
+
}
|
|
3704
|
+
declare const getSignablePayloadQuery: (id: string) => Query<SignablePayload>;
|
|
3705
|
+
|
|
3706
|
+
interface DeclineToSignMessagesOutput {
|
|
3707
|
+
declinedPayloads: SignablePayload[];
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
interface DeleteApiTokenInput {
|
|
3711
|
+
apiTokenId: string;
|
|
3712
|
+
}
|
|
3713
|
+
|
|
3714
|
+
interface DeleteApiTokenOutput {
|
|
3715
|
+
accountId: string;
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* This object represents a Deposit made to a Lightspark node wallet. This operation occurs for any
|
|
3720
|
+
* L1 funding transaction to the wallet. You can retrieve this object to receive detailed
|
|
3721
|
+
* information about the deposit. *
|
|
3722
|
+
*/
|
|
3723
|
+
interface Deposit {
|
|
3724
|
+
/**
|
|
3725
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
3726
|
+
* opaque string.
|
|
3727
|
+
**/
|
|
3728
|
+
id: string;
|
|
3729
|
+
/** The date and time when this transaction was initiated. **/
|
|
3730
|
+
createdAt: string;
|
|
3731
|
+
/** The date and time when the entity was last updated. **/
|
|
3732
|
+
updatedAt: string;
|
|
3733
|
+
/** The current status of this transaction. **/
|
|
3734
|
+
status: TransactionStatus;
|
|
3735
|
+
/** The amount of money involved in this transaction. **/
|
|
3736
|
+
amount: CurrencyAmount;
|
|
3737
|
+
/**
|
|
3738
|
+
* The height of the block that included this transaction. This will be zero for unconfirmed
|
|
3739
|
+
* transactions.
|
|
3740
|
+
**/
|
|
3741
|
+
blockHeight: number;
|
|
3742
|
+
/** The Bitcoin blockchain addresses this transaction was sent to. **/
|
|
3743
|
+
destinationAddresses: string[];
|
|
3744
|
+
/** The recipient Lightspark node this deposit was sent to. **/
|
|
3745
|
+
destinationId: string;
|
|
3746
|
+
/** The typename of the object **/
|
|
3747
|
+
typename: string;
|
|
3748
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
3749
|
+
resolvedAt?: string | undefined;
|
|
3750
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
3751
|
+
transactionHash?: string | undefined;
|
|
3752
|
+
/** The fees that were paid by the node for this transaction. **/
|
|
3753
|
+
fees?: CurrencyAmount | undefined;
|
|
3754
|
+
/**
|
|
3755
|
+
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
3756
|
+
* transactions.
|
|
3757
|
+
**/
|
|
3758
|
+
blockHash?: string | undefined;
|
|
3759
|
+
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
3760
|
+
numConfirmations?: number | undefined;
|
|
3761
|
+
}
|
|
3762
|
+
declare const getDepositQuery: (id: string) => Query<Deposit>;
|
|
3763
|
+
|
|
3764
|
+
interface FailHtlcsInput {
|
|
3765
|
+
/** The id of invoice which the pending HTLCs that need to be failed are paying for. **/
|
|
3766
|
+
invoiceId: string;
|
|
3767
|
+
/**
|
|
3768
|
+
* Whether the invoice needs to be canceled after failing the htlcs. If yes, the invoice cannot
|
|
3769
|
+
* be paid anymore.
|
|
3770
|
+
**/
|
|
3771
|
+
cancelInvoice: boolean;
|
|
3772
|
+
}
|
|
3773
|
+
|
|
3774
|
+
interface FailHtlcsOutput {
|
|
3775
|
+
invoiceId: string;
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
interface FundNodeInput {
|
|
3779
|
+
nodeId: string;
|
|
3780
|
+
amountSats?: number | undefined;
|
|
3781
|
+
fundingAddress?: string | undefined;
|
|
3782
|
+
}
|
|
3783
|
+
|
|
3784
|
+
interface FundNodeOutput {
|
|
3785
|
+
amount: CurrencyAmount;
|
|
3786
|
+
}
|
|
3787
|
+
|
|
3788
|
+
/**
|
|
3789
|
+
* This object represents a node that exists on the Lightning Network, including nodes not managed
|
|
3790
|
+
* by Lightspark. You can retrieve this object to get publicly available information about any node
|
|
3791
|
+
* on the Lightning Network. *
|
|
3792
|
+
*/
|
|
3793
|
+
declare class GraphNode implements Node, Entity {
|
|
3794
|
+
/**
|
|
3795
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
3796
|
+
* opaque string.
|
|
3797
|
+
**/
|
|
3798
|
+
readonly id: string;
|
|
3799
|
+
/** The date and time when the entity was first created. **/
|
|
3800
|
+
readonly createdAt: string;
|
|
3801
|
+
/** The date and time when the entity was last updated. **/
|
|
3802
|
+
readonly updatedAt: string;
|
|
3803
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
3804
|
+
readonly bitcoinNetwork: BitcoinNetwork;
|
|
3805
|
+
/**
|
|
3806
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
3807
|
+
* depending on the data available for this node.
|
|
3808
|
+
**/
|
|
3809
|
+
readonly displayName: string;
|
|
3810
|
+
/** The typename of the object **/
|
|
3811
|
+
readonly typename: string;
|
|
3812
|
+
/**
|
|
3813
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
3814
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
3815
|
+
* be changed at any time by the node operator.
|
|
3816
|
+
**/
|
|
3817
|
+
readonly alias?: string | undefined;
|
|
3818
|
+
/**
|
|
3819
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
3820
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
3821
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
3822
|
+
**/
|
|
3823
|
+
readonly color?: string | undefined;
|
|
3824
|
+
/**
|
|
3825
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
3826
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
3827
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
3828
|
+
**/
|
|
3829
|
+
readonly conductivity?: number | undefined;
|
|
3830
|
+
/**
|
|
3831
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
3832
|
+
* Network. *
|
|
3833
|
+
*/
|
|
3834
|
+
readonly publicKey?: string | undefined;
|
|
3835
|
+
constructor(
|
|
3836
|
+
/**
|
|
3837
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
3838
|
+
* opaque string.
|
|
3839
|
+
**/
|
|
3840
|
+
id: string,
|
|
3841
|
+
/** The date and time when the entity was first created. **/
|
|
3842
|
+
createdAt: string,
|
|
3843
|
+
/** The date and time when the entity was last updated. **/
|
|
3844
|
+
updatedAt: string,
|
|
3845
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
3846
|
+
bitcoinNetwork: BitcoinNetwork,
|
|
3847
|
+
/**
|
|
3848
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
3849
|
+
* depending on the data available for this node.
|
|
3850
|
+
**/
|
|
3851
|
+
displayName: string,
|
|
3852
|
+
/** The typename of the object **/
|
|
3853
|
+
typename: string,
|
|
3854
|
+
/**
|
|
3855
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
3856
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
3857
|
+
* be changed at any time by the node operator.
|
|
3858
|
+
**/
|
|
3859
|
+
alias?: string | undefined,
|
|
3860
|
+
/**
|
|
3861
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
3862
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
3863
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
3864
|
+
**/
|
|
3865
|
+
color?: string | undefined,
|
|
3866
|
+
/**
|
|
3867
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
3868
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
3869
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
3870
|
+
**/
|
|
3871
|
+
conductivity?: number | undefined,
|
|
3872
|
+
/**
|
|
3873
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
3874
|
+
* Network. *
|
|
3875
|
+
*/
|
|
3876
|
+
publicKey?: string | undefined);
|
|
3877
|
+
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
3878
|
+
static getGraphNodeQuery(id: string): Query<GraphNode>;
|
|
3879
|
+
toJson(): {
|
|
3880
|
+
__typename: string;
|
|
3881
|
+
graph_node_id: string;
|
|
3882
|
+
graph_node_created_at: string;
|
|
3883
|
+
graph_node_updated_at: string;
|
|
3884
|
+
graph_node_alias: string | undefined;
|
|
3885
|
+
graph_node_bitcoin_network: BitcoinNetwork;
|
|
3886
|
+
graph_node_color: string | undefined;
|
|
3887
|
+
graph_node_conductivity: number | undefined;
|
|
3888
|
+
graph_node_display_name: string;
|
|
3889
|
+
graph_node_public_key: string | undefined;
|
|
3890
|
+
};
|
|
3891
|
+
}
|
|
3892
|
+
|
|
3893
|
+
interface IdAndSignature {
|
|
3894
|
+
/** The id of the message. **/
|
|
3895
|
+
id: string;
|
|
3896
|
+
/** The signature of the message. **/
|
|
3897
|
+
signature: string;
|
|
3898
|
+
}
|
|
3899
|
+
|
|
3900
|
+
interface IncomingPaymentsForInvoiceQueryInput {
|
|
3901
|
+
invoiceId: string;
|
|
3902
|
+
/** An optional filter to only query outgoing payments of given statuses. **/
|
|
3903
|
+
statuses?: TransactionStatus[] | undefined;
|
|
3904
|
+
}
|
|
3905
|
+
|
|
3906
|
+
interface IncomingPaymentsForInvoiceQueryOutput {
|
|
3907
|
+
payments: IncomingPayment[];
|
|
3908
|
+
}
|
|
3909
|
+
|
|
3910
|
+
interface IncomingPaymentsForPaymentHashQueryInput {
|
|
3911
|
+
/** The 32-byte hash of the payment preimage for which to fetch payments **/
|
|
3912
|
+
paymentHash: string;
|
|
3913
|
+
/** An optional filter to only query incoming payments of given statuses. **/
|
|
3914
|
+
statuses?: TransactionStatus[] | undefined;
|
|
3915
|
+
}
|
|
3916
|
+
|
|
3917
|
+
interface IncomingPaymentsForPaymentHashQueryOutput {
|
|
3918
|
+
payments: IncomingPayment[];
|
|
3919
|
+
}
|
|
3920
|
+
|
|
3921
|
+
interface InvoiceForPaymentHashInput {
|
|
3922
|
+
/** The 32-byte hash of the payment preimage for which to fetch an invoice. **/
|
|
3923
|
+
paymentHash: string;
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
interface InvoiceForPaymentHashOutput {
|
|
3927
|
+
invoiceId?: string | undefined;
|
|
3928
|
+
}
|
|
3929
|
+
|
|
3930
|
+
interface LightningFeeEstimateForInvoiceInput {
|
|
3931
|
+
/** The node from where you want to send the payment. **/
|
|
3932
|
+
nodeId: string;
|
|
3933
|
+
/** The invoice you want to pay (as defined by the BOLT11 standard). **/
|
|
3934
|
+
encodedPaymentRequest: string;
|
|
3935
|
+
/**
|
|
3936
|
+
* If the invoice does not specify a payment amount, then the amount that you wish to pay,
|
|
3937
|
+
* expressed in msats.
|
|
3938
|
+
**/
|
|
3939
|
+
amountMsats?: number | undefined;
|
|
3940
|
+
}
|
|
3941
|
+
|
|
3942
|
+
interface LightningFeeEstimateForNodeInput {
|
|
3943
|
+
/** The node from where you want to send the payment. **/
|
|
3944
|
+
nodeId: string;
|
|
3945
|
+
/** The public key of the node that you want to pay. **/
|
|
3946
|
+
destinationNodePublicKey: string;
|
|
3947
|
+
/** The payment amount expressed in msats. **/
|
|
3948
|
+
amountMsats: number;
|
|
3949
|
+
}
|
|
3950
|
+
|
|
3951
|
+
interface LightningFeeEstimateOutput {
|
|
3952
|
+
/** The estimated fees for the payment. **/
|
|
3953
|
+
feeEstimate: CurrencyAmount;
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3956
|
+
interface Secret {
|
|
3957
|
+
encryptedValue: string;
|
|
3958
|
+
cipher: string;
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
/** This is a Lightspark node with OSK. **/
|
|
3962
|
+
declare class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
|
|
3963
|
+
/**
|
|
3964
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
3965
|
+
* opaque string.
|
|
3966
|
+
**/
|
|
3967
|
+
readonly id: string;
|
|
3968
|
+
/** The date and time when the entity was first created. **/
|
|
3969
|
+
readonly createdAt: string;
|
|
3970
|
+
/** The date and time when the entity was last updated. **/
|
|
3971
|
+
readonly updatedAt: string;
|
|
3972
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
3973
|
+
readonly bitcoinNetwork: BitcoinNetwork;
|
|
3974
|
+
/**
|
|
3975
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
3976
|
+
* depending on the data available for this node.
|
|
3977
|
+
**/
|
|
3978
|
+
readonly displayName: string;
|
|
3979
|
+
/** The owner of this LightsparkNode. **/
|
|
3980
|
+
readonly ownerId: string;
|
|
3981
|
+
/**
|
|
3982
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
3983
|
+
* pre-screening.
|
|
3984
|
+
**/
|
|
3985
|
+
readonly umaPrescreeningUtxos: string[];
|
|
3986
|
+
/** The typename of the object **/
|
|
3987
|
+
readonly typename: string;
|
|
3988
|
+
/**
|
|
3989
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
3990
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
3991
|
+
* be changed at any time by the node operator.
|
|
3992
|
+
**/
|
|
3993
|
+
readonly alias?: string | undefined;
|
|
3994
|
+
/**
|
|
3995
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
3996
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
3997
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
3998
|
+
**/
|
|
3999
|
+
readonly color?: string | undefined;
|
|
4000
|
+
/**
|
|
4001
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
4002
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
4003
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
4004
|
+
**/
|
|
4005
|
+
readonly conductivity?: number | undefined;
|
|
4006
|
+
/**
|
|
4007
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
4008
|
+
* Network. *
|
|
4009
|
+
*/
|
|
4010
|
+
readonly publicKey?: string | undefined;
|
|
4011
|
+
/** The current status of this node. **/
|
|
4012
|
+
readonly status?: LightsparkNodeStatus | undefined;
|
|
4013
|
+
/**
|
|
4014
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this
|
|
4015
|
+
* node.
|
|
4016
|
+
*
|
|
4017
|
+
* @deprecated Use `balances` instead.
|
|
4018
|
+
**/
|
|
4019
|
+
readonly totalBalance?: CurrencyAmount | undefined;
|
|
4020
|
+
/**
|
|
4021
|
+
* The total sum of the channel balances (online and offline) on this node.
|
|
4022
|
+
*
|
|
4023
|
+
* @deprecated Use `balances` instead.
|
|
4024
|
+
**/
|
|
4025
|
+
readonly totalLocalBalance?: CurrencyAmount | undefined;
|
|
4026
|
+
/**
|
|
4027
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
4028
|
+
*
|
|
4029
|
+
* @deprecated Use `balances` instead.
|
|
4030
|
+
**/
|
|
4031
|
+
readonly localBalance?: CurrencyAmount | undefined;
|
|
4032
|
+
/**
|
|
4033
|
+
* The sum of the channel balances that are available to receive on this node.
|
|
4034
|
+
*
|
|
4035
|
+
* @deprecated Use `balances` instead.
|
|
4036
|
+
**/
|
|
4037
|
+
readonly remoteBalance?: CurrencyAmount | undefined;
|
|
4038
|
+
/**
|
|
4039
|
+
* The details of the balance of this node on the Bitcoin Network.
|
|
4040
|
+
*
|
|
4041
|
+
* @deprecated Use `balances` instead.
|
|
4042
|
+
**/
|
|
4043
|
+
readonly blockchainBalance?: BlockchainBalance | undefined;
|
|
4044
|
+
/** The balances that describe the funds in this node. **/
|
|
4045
|
+
readonly balances?: Balances | undefined;
|
|
4046
|
+
/**
|
|
4047
|
+
* The private key client is using to sign a GraphQL request which will be verified at server
|
|
4048
|
+
* side. *
|
|
4049
|
+
*/
|
|
4050
|
+
readonly encryptedSigningPrivateKey?: Secret | undefined;
|
|
4051
|
+
constructor(
|
|
4052
|
+
/**
|
|
4053
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
4054
|
+
* opaque string.
|
|
4055
|
+
**/
|
|
4056
|
+
id: string,
|
|
4057
|
+
/** The date and time when the entity was first created. **/
|
|
4058
|
+
createdAt: string,
|
|
4059
|
+
/** The date and time when the entity was last updated. **/
|
|
4060
|
+
updatedAt: string,
|
|
4061
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
4062
|
+
bitcoinNetwork: BitcoinNetwork,
|
|
4063
|
+
/**
|
|
4064
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
4065
|
+
* depending on the data available for this node.
|
|
4066
|
+
**/
|
|
4067
|
+
displayName: string,
|
|
4068
|
+
/** The owner of this LightsparkNode. **/
|
|
4069
|
+
ownerId: string,
|
|
4070
|
+
/**
|
|
4071
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
4072
|
+
* pre-screening.
|
|
4073
|
+
**/
|
|
4074
|
+
umaPrescreeningUtxos: string[],
|
|
4075
|
+
/** The typename of the object **/
|
|
4076
|
+
typename: string,
|
|
4077
|
+
/**
|
|
4078
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
4079
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
4080
|
+
* be changed at any time by the node operator.
|
|
4081
|
+
**/
|
|
4082
|
+
alias?: string | undefined,
|
|
4083
|
+
/**
|
|
4084
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
4085
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
4086
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
4087
|
+
**/
|
|
4088
|
+
color?: string | undefined,
|
|
4089
|
+
/**
|
|
4090
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
4091
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
4092
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
4093
|
+
**/
|
|
4094
|
+
conductivity?: number | undefined,
|
|
4095
|
+
/**
|
|
4096
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
4097
|
+
* Network. *
|
|
4098
|
+
*/
|
|
4099
|
+
publicKey?: string | undefined,
|
|
4100
|
+
/** The current status of this node. **/
|
|
4101
|
+
status?: LightsparkNodeStatus | undefined,
|
|
4102
|
+
/**
|
|
4103
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this
|
|
4104
|
+
* node.
|
|
4105
|
+
*
|
|
4106
|
+
* @deprecated Use `balances` instead.
|
|
4107
|
+
**/
|
|
4108
|
+
totalBalance?: CurrencyAmount | undefined,
|
|
4109
|
+
/**
|
|
4110
|
+
* The total sum of the channel balances (online and offline) on this node.
|
|
4111
|
+
*
|
|
4112
|
+
* @deprecated Use `balances` instead.
|
|
4113
|
+
**/
|
|
4114
|
+
totalLocalBalance?: CurrencyAmount | undefined,
|
|
4115
|
+
/**
|
|
4116
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
4117
|
+
*
|
|
4118
|
+
* @deprecated Use `balances` instead.
|
|
4119
|
+
**/
|
|
4120
|
+
localBalance?: CurrencyAmount | undefined,
|
|
4121
|
+
/**
|
|
4122
|
+
* The sum of the channel balances that are available to receive on this node.
|
|
4123
|
+
*
|
|
4124
|
+
* @deprecated Use `balances` instead.
|
|
4125
|
+
**/
|
|
4126
|
+
remoteBalance?: CurrencyAmount | undefined,
|
|
4127
|
+
/**
|
|
4128
|
+
* The details of the balance of this node on the Bitcoin Network.
|
|
4129
|
+
*
|
|
4130
|
+
* @deprecated Use `balances` instead.
|
|
4131
|
+
**/
|
|
4132
|
+
blockchainBalance?: BlockchainBalance | undefined,
|
|
4133
|
+
/** The balances that describe the funds in this node. **/
|
|
4134
|
+
balances?: Balances | undefined,
|
|
4135
|
+
/**
|
|
4136
|
+
* The private key client is using to sign a GraphQL request which will be verified at server
|
|
4137
|
+
* side. *
|
|
4138
|
+
*/
|
|
4139
|
+
encryptedSigningPrivateKey?: Secret | undefined);
|
|
4140
|
+
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
4141
|
+
getChannels(client: LightsparkClient, first?: number | undefined, after?: string | undefined, beforeDate?: string | undefined, afterDate?: string | undefined, statuses?: ChannelStatus[] | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
4142
|
+
getDailyLiquidityForecasts(client: LightsparkClient, fromDate: string, toDate: string, direction: LightningPaymentDirection): Promise<LightsparkNodeToDailyLiquidityForecastsConnection>;
|
|
4143
|
+
static getLightsparkNodeWithOSKQuery(id: string): Query<LightsparkNodeWithOSK>;
|
|
4144
|
+
toJson(): {
|
|
4145
|
+
__typename: string;
|
|
4146
|
+
lightspark_node_with_o_s_k_id: string;
|
|
4147
|
+
lightspark_node_with_o_s_k_created_at: string;
|
|
4148
|
+
lightspark_node_with_o_s_k_updated_at: string;
|
|
4149
|
+
lightspark_node_with_o_s_k_alias: string | undefined;
|
|
4150
|
+
lightspark_node_with_o_s_k_bitcoin_network: BitcoinNetwork;
|
|
4151
|
+
lightspark_node_with_o_s_k_color: string | undefined;
|
|
4152
|
+
lightspark_node_with_o_s_k_conductivity: number | undefined;
|
|
4153
|
+
lightspark_node_with_o_s_k_display_name: string;
|
|
4154
|
+
lightspark_node_with_o_s_k_public_key: string | undefined;
|
|
4155
|
+
lightspark_node_with_o_s_k_owner: {
|
|
4156
|
+
id: string;
|
|
4157
|
+
};
|
|
4158
|
+
lightspark_node_with_o_s_k_status: LightsparkNodeStatus | undefined;
|
|
4159
|
+
lightspark_node_with_o_s_k_total_balance: any;
|
|
4160
|
+
lightspark_node_with_o_s_k_total_local_balance: any;
|
|
4161
|
+
lightspark_node_with_o_s_k_local_balance: any;
|
|
4162
|
+
lightspark_node_with_o_s_k_remote_balance: any;
|
|
4163
|
+
lightspark_node_with_o_s_k_blockchain_balance: any;
|
|
4164
|
+
lightspark_node_with_o_s_k_uma_prescreening_utxos: string[];
|
|
4165
|
+
lightspark_node_with_o_s_k_balances: any;
|
|
4166
|
+
lightspark_node_with_o_s_k_encrypted_signing_private_key: any;
|
|
4167
|
+
};
|
|
4168
|
+
}
|
|
4169
|
+
|
|
4170
|
+
/** This is a Lightspark node with remote signing. **/
|
|
4171
|
+
declare class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
|
|
4172
|
+
/**
|
|
4173
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
4174
|
+
* opaque string.
|
|
4175
|
+
**/
|
|
4176
|
+
readonly id: string;
|
|
4177
|
+
/** The date and time when the entity was first created. **/
|
|
4178
|
+
readonly createdAt: string;
|
|
4179
|
+
/** The date and time when the entity was last updated. **/
|
|
4180
|
+
readonly updatedAt: string;
|
|
4181
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
4182
|
+
readonly bitcoinNetwork: BitcoinNetwork;
|
|
4183
|
+
/**
|
|
4184
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
4185
|
+
* depending on the data available for this node.
|
|
4186
|
+
**/
|
|
4187
|
+
readonly displayName: string;
|
|
4188
|
+
/** The owner of this LightsparkNode. **/
|
|
4189
|
+
readonly ownerId: string;
|
|
4190
|
+
/**
|
|
4191
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
4192
|
+
* pre-screening.
|
|
4193
|
+
**/
|
|
4194
|
+
readonly umaPrescreeningUtxos: string[];
|
|
4195
|
+
/** The typename of the object **/
|
|
4196
|
+
readonly typename: string;
|
|
4197
|
+
/**
|
|
4198
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
4199
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
4200
|
+
* be changed at any time by the node operator.
|
|
4201
|
+
**/
|
|
4202
|
+
readonly alias?: string | undefined;
|
|
4203
|
+
/**
|
|
4204
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
4205
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
4206
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
4207
|
+
**/
|
|
4208
|
+
readonly color?: string | undefined;
|
|
4209
|
+
/**
|
|
4210
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
4211
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
4212
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
4213
|
+
**/
|
|
4214
|
+
readonly conductivity?: number | undefined;
|
|
4215
|
+
/**
|
|
4216
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
4217
|
+
* Network. *
|
|
4218
|
+
*/
|
|
4219
|
+
readonly publicKey?: string | undefined;
|
|
4220
|
+
/** The current status of this node. **/
|
|
4221
|
+
readonly status?: LightsparkNodeStatus | undefined;
|
|
4222
|
+
/**
|
|
4223
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this
|
|
4224
|
+
* node.
|
|
4225
|
+
*
|
|
4226
|
+
* @deprecated Use `balances` instead.
|
|
4227
|
+
**/
|
|
4228
|
+
readonly totalBalance?: CurrencyAmount | undefined;
|
|
4229
|
+
/**
|
|
4230
|
+
* The total sum of the channel balances (online and offline) on this node.
|
|
4231
|
+
*
|
|
4232
|
+
* @deprecated Use `balances` instead.
|
|
4233
|
+
**/
|
|
4234
|
+
readonly totalLocalBalance?: CurrencyAmount | undefined;
|
|
4235
|
+
/**
|
|
4236
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
4237
|
+
*
|
|
4238
|
+
* @deprecated Use `balances` instead.
|
|
4239
|
+
**/
|
|
4240
|
+
readonly localBalance?: CurrencyAmount | undefined;
|
|
4241
|
+
/**
|
|
4242
|
+
* The sum of the channel balances that are available to receive on this node.
|
|
4243
|
+
*
|
|
4244
|
+
* @deprecated Use `balances` instead.
|
|
4245
|
+
**/
|
|
4246
|
+
readonly remoteBalance?: CurrencyAmount | undefined;
|
|
4247
|
+
/**
|
|
4248
|
+
* The details of the balance of this node on the Bitcoin Network.
|
|
4249
|
+
*
|
|
4250
|
+
* @deprecated Use `balances` instead.
|
|
4251
|
+
**/
|
|
4252
|
+
readonly blockchainBalance?: BlockchainBalance | undefined;
|
|
4253
|
+
/** The balances that describe the funds in this node. **/
|
|
4254
|
+
readonly balances?: Balances | undefined;
|
|
4255
|
+
constructor(
|
|
4256
|
+
/**
|
|
4257
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
4258
|
+
* opaque string.
|
|
4259
|
+
**/
|
|
4260
|
+
id: string,
|
|
4261
|
+
/** The date and time when the entity was first created. **/
|
|
4262
|
+
createdAt: string,
|
|
4263
|
+
/** The date and time when the entity was last updated. **/
|
|
4264
|
+
updatedAt: string,
|
|
4265
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
4266
|
+
bitcoinNetwork: BitcoinNetwork,
|
|
4267
|
+
/**
|
|
4268
|
+
* The name of this node in the network. It will be the most human-readable option possible,
|
|
4269
|
+
* depending on the data available for this node.
|
|
4270
|
+
**/
|
|
4271
|
+
displayName: string,
|
|
4272
|
+
/** The owner of this LightsparkNode. **/
|
|
4273
|
+
ownerId: string,
|
|
4274
|
+
/**
|
|
4275
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
4276
|
+
* pre-screening.
|
|
4277
|
+
**/
|
|
4278
|
+
umaPrescreeningUtxos: string[],
|
|
4279
|
+
/** The typename of the object **/
|
|
4280
|
+
typename: string,
|
|
4281
|
+
/**
|
|
4282
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is
|
|
4283
|
+
* just a way to identify and search for commercial services or popular nodes. This alias can
|
|
4284
|
+
* be changed at any time by the node operator.
|
|
4285
|
+
**/
|
|
4286
|
+
alias?: string | undefined,
|
|
4287
|
+
/**
|
|
4288
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is
|
|
4289
|
+
* white. It has no importance in terms of operating the node, it is just a way to visually
|
|
4290
|
+
* differentiate nodes. That color can be changed at any time by the node operator.
|
|
4291
|
+
**/
|
|
4292
|
+
color?: string | undefined,
|
|
4293
|
+
/**
|
|
4294
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
4295
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
4296
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
4297
|
+
**/
|
|
4298
|
+
conductivity?: number | undefined,
|
|
4299
|
+
/**
|
|
4300
|
+
* The public key of this node. It acts as a unique identifier of this node in the Lightning
|
|
4301
|
+
* Network. *
|
|
4302
|
+
*/
|
|
4303
|
+
publicKey?: string | undefined,
|
|
4304
|
+
/** The current status of this node. **/
|
|
4305
|
+
status?: LightsparkNodeStatus | undefined,
|
|
4306
|
+
/**
|
|
4307
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this
|
|
4308
|
+
* node.
|
|
4309
|
+
*
|
|
4310
|
+
* @deprecated Use `balances` instead.
|
|
4311
|
+
**/
|
|
4312
|
+
totalBalance?: CurrencyAmount | undefined,
|
|
4313
|
+
/**
|
|
4314
|
+
* The total sum of the channel balances (online and offline) on this node.
|
|
4315
|
+
*
|
|
4316
|
+
* @deprecated Use `balances` instead.
|
|
4317
|
+
**/
|
|
4318
|
+
totalLocalBalance?: CurrencyAmount | undefined,
|
|
4319
|
+
/**
|
|
4320
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
4321
|
+
*
|
|
4322
|
+
* @deprecated Use `balances` instead.
|
|
4323
|
+
**/
|
|
4324
|
+
localBalance?: CurrencyAmount | undefined,
|
|
4325
|
+
/**
|
|
4326
|
+
* The sum of the channel balances that are available to receive on this node.
|
|
4327
|
+
*
|
|
4328
|
+
* @deprecated Use `balances` instead.
|
|
4329
|
+
**/
|
|
4330
|
+
remoteBalance?: CurrencyAmount | undefined,
|
|
4331
|
+
/**
|
|
4332
|
+
* The details of the balance of this node on the Bitcoin Network.
|
|
4333
|
+
*
|
|
4334
|
+
* @deprecated Use `balances` instead.
|
|
4335
|
+
**/
|
|
4336
|
+
blockchainBalance?: BlockchainBalance | undefined,
|
|
4337
|
+
/** The balances that describe the funds in this node. **/
|
|
4338
|
+
balances?: Balances | undefined);
|
|
4339
|
+
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
4340
|
+
getChannels(client: LightsparkClient, first?: number | undefined, after?: string | undefined, beforeDate?: string | undefined, afterDate?: string | undefined, statuses?: ChannelStatus[] | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
4341
|
+
getDailyLiquidityForecasts(client: LightsparkClient, fromDate: string, toDate: string, direction: LightningPaymentDirection): Promise<LightsparkNodeToDailyLiquidityForecastsConnection>;
|
|
4342
|
+
static getLightsparkNodeWithRemoteSigningQuery(id: string): Query<LightsparkNodeWithRemoteSigning>;
|
|
4343
|
+
toJson(): {
|
|
4344
|
+
__typename: string;
|
|
4345
|
+
lightspark_node_with_remote_signing_id: string;
|
|
4346
|
+
lightspark_node_with_remote_signing_created_at: string;
|
|
4347
|
+
lightspark_node_with_remote_signing_updated_at: string;
|
|
4348
|
+
lightspark_node_with_remote_signing_alias: string | undefined;
|
|
4349
|
+
lightspark_node_with_remote_signing_bitcoin_network: BitcoinNetwork;
|
|
4350
|
+
lightspark_node_with_remote_signing_color: string | undefined;
|
|
4351
|
+
lightspark_node_with_remote_signing_conductivity: number | undefined;
|
|
4352
|
+
lightspark_node_with_remote_signing_display_name: string;
|
|
4353
|
+
lightspark_node_with_remote_signing_public_key: string | undefined;
|
|
4354
|
+
lightspark_node_with_remote_signing_owner: {
|
|
4355
|
+
id: string;
|
|
4356
|
+
};
|
|
4357
|
+
lightspark_node_with_remote_signing_status: LightsparkNodeStatus | undefined;
|
|
4358
|
+
lightspark_node_with_remote_signing_total_balance: any;
|
|
4359
|
+
lightspark_node_with_remote_signing_total_local_balance: any;
|
|
4360
|
+
lightspark_node_with_remote_signing_local_balance: any;
|
|
4361
|
+
lightspark_node_with_remote_signing_remote_balance: any;
|
|
4362
|
+
lightspark_node_with_remote_signing_blockchain_balance: any;
|
|
4363
|
+
lightspark_node_with_remote_signing_uma_prescreening_utxos: string[];
|
|
4364
|
+
lightspark_node_with_remote_signing_balances: any;
|
|
4365
|
+
};
|
|
4366
|
+
}
|
|
4367
|
+
|
|
4368
|
+
declare enum OnChainFeeTarget {
|
|
4369
|
+
/**
|
|
4370
|
+
* This is an enum value that represents values that could be added in the future.
|
|
4371
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
4372
|
+
*/
|
|
4373
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
4374
|
+
/** Transaction expected to be confirmed within 2 blocks. **/
|
|
4375
|
+
HIGH = "HIGH",
|
|
4376
|
+
/** Transaction expected to be confirmed within 6 blocks. **/
|
|
4377
|
+
MEDIUM = "MEDIUM",
|
|
4378
|
+
/** Transaction expected to be confirmed within 18 blocks. **/
|
|
4379
|
+
LOW = "LOW",
|
|
4380
|
+
/** Transaction expected to be confirmed within 50 blocks. **/
|
|
4381
|
+
BACKGROUND = "BACKGROUND"
|
|
4382
|
+
}
|
|
4383
|
+
|
|
4384
|
+
/**
|
|
4385
|
+
* This object represents an L1 transaction that occurred on the Bitcoin Network. You can retrieve
|
|
4386
|
+
* this object to receive information about a specific on-chain transaction made on the Lightning
|
|
4387
|
+
* Network associated with your Lightspark Node. *
|
|
4388
|
+
*/
|
|
4389
|
+
interface OnChainTransaction {
|
|
4390
|
+
/**
|
|
4391
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
4392
|
+
* opaque string.
|
|
4393
|
+
**/
|
|
4394
|
+
id: string;
|
|
4395
|
+
/** The date and time when this transaction was initiated. **/
|
|
4396
|
+
createdAt: string;
|
|
4397
|
+
/** The date and time when the entity was last updated. **/
|
|
4398
|
+
updatedAt: string;
|
|
4399
|
+
/** The current status of this transaction. **/
|
|
4400
|
+
status: TransactionStatus;
|
|
4401
|
+
/** The amount of money involved in this transaction. **/
|
|
4402
|
+
amount: CurrencyAmount;
|
|
4403
|
+
/**
|
|
4404
|
+
* The height of the block that included this transaction. This will be zero for unconfirmed
|
|
4405
|
+
* transactions.
|
|
4406
|
+
**/
|
|
4407
|
+
blockHeight: number;
|
|
4408
|
+
/** The Bitcoin blockchain addresses this transaction was sent to. **/
|
|
4409
|
+
destinationAddresses: string[];
|
|
4410
|
+
/** The typename of the object **/
|
|
4411
|
+
typename: string;
|
|
4412
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
4413
|
+
resolvedAt?: string | undefined;
|
|
4414
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
4415
|
+
transactionHash?: string | undefined;
|
|
4416
|
+
/** The fees that were paid by the node for this transaction. **/
|
|
4417
|
+
fees?: CurrencyAmount | undefined;
|
|
4418
|
+
/**
|
|
4419
|
+
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
4420
|
+
* transactions.
|
|
4421
|
+
**/
|
|
4422
|
+
blockHash?: string | undefined;
|
|
4423
|
+
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
4424
|
+
numConfirmations?: number | undefined;
|
|
4425
|
+
}
|
|
4426
|
+
declare const getOnChainTransactionQuery: (id: string) => Query<OnChainTransaction>;
|
|
4427
|
+
|
|
4428
|
+
interface OutgoingPaymentForIdempotencyKeyInput {
|
|
4429
|
+
idempotencyKey: string;
|
|
4430
|
+
}
|
|
4431
|
+
|
|
4432
|
+
interface OutgoingPaymentForIdempotencyKeyOutput {
|
|
4433
|
+
paymentId?: string | undefined;
|
|
4434
|
+
}
|
|
4435
|
+
|
|
4436
|
+
interface OutgoingPaymentsForInvoiceQueryInput {
|
|
4437
|
+
/** The encoded invoice that the outgoing payments paid to. **/
|
|
4438
|
+
encodedInvoice: string;
|
|
4439
|
+
/** An optional filter to only query outgoing payments of given statuses. **/
|
|
4440
|
+
statuses?: TransactionStatus[] | undefined;
|
|
4441
|
+
}
|
|
4442
|
+
|
|
4443
|
+
interface OutgoingPaymentsForInvoiceQueryOutput {
|
|
4444
|
+
payments: OutgoingPayment[];
|
|
4445
|
+
}
|
|
4446
|
+
|
|
4447
|
+
interface OutgoingPaymentsForPaymentHashQueryInput {
|
|
4448
|
+
/** The 32-byte hash of the payment preimage for which to fetch payments **/
|
|
4449
|
+
paymentHash: string;
|
|
4450
|
+
/** An optional filter to only query outgoing payments of given statuses. **/
|
|
4451
|
+
statuses?: TransactionStatus[] | undefined;
|
|
4452
|
+
}
|
|
4453
|
+
|
|
4454
|
+
interface OutgoingPaymentsForPaymentHashQueryOutput {
|
|
4455
|
+
payments: OutgoingPayment[];
|
|
4456
|
+
}
|
|
4457
|
+
|
|
4458
|
+
interface PayInvoiceInput {
|
|
4459
|
+
/** The node from where you want to send the payment. **/
|
|
4460
|
+
nodeId: string;
|
|
4461
|
+
/** The invoice you want to pay (as defined by the BOLT11 standard). **/
|
|
4462
|
+
encodedInvoice: string;
|
|
4463
|
+
/** The timeout in seconds that we will try to make the payment. **/
|
|
4464
|
+
timeoutSecs: number;
|
|
4465
|
+
/**
|
|
4466
|
+
* The maximum amount of fees that you want to pay for this payment to be sent, expressed in
|
|
4467
|
+
* msats. *
|
|
4468
|
+
*/
|
|
4469
|
+
maximumFeesMsats: number;
|
|
4470
|
+
/**
|
|
4471
|
+
* The amount you will pay for this invoice, expressed in msats. It should ONLY be set when the
|
|
4472
|
+
* invoice amount is zero.
|
|
4473
|
+
**/
|
|
4474
|
+
amountMsats?: number | undefined;
|
|
4475
|
+
/**
|
|
4476
|
+
* The idempotency key of the request. The same result will be returned for the same
|
|
4477
|
+
* idempotency key. *
|
|
4478
|
+
*/
|
|
4479
|
+
idempotencyKey?: string | undefined;
|
|
4480
|
+
}
|
|
4481
|
+
|
|
4482
|
+
interface PayInvoiceOutput {
|
|
4483
|
+
/** The payment that has been sent. **/
|
|
4484
|
+
paymentId: string;
|
|
4485
|
+
}
|
|
4486
|
+
|
|
4487
|
+
interface PayUmaInvoiceInput {
|
|
4488
|
+
nodeId: string;
|
|
4489
|
+
encodedInvoice: string;
|
|
4490
|
+
timeoutSecs: number;
|
|
4491
|
+
maximumFeesMsats: number;
|
|
4492
|
+
amountMsats?: number | undefined;
|
|
4493
|
+
idempotencyKey?: string | undefined;
|
|
4494
|
+
/**
|
|
4495
|
+
* An optional, monthly-rotated, unique hashed identifier corresponding to the sender of the
|
|
4496
|
+
* payment. *
|
|
4497
|
+
*/
|
|
4498
|
+
senderHash?: string | undefined;
|
|
4499
|
+
}
|
|
4500
|
+
|
|
4501
|
+
interface RegisterPaymentInput {
|
|
4502
|
+
/**
|
|
4503
|
+
* The compliance provider that is going to screen the node. You need to be a customer of the
|
|
4504
|
+
* selected provider and store the API key on the Lightspark account setting page.
|
|
4505
|
+
**/
|
|
4506
|
+
provider: ComplianceProvider;
|
|
4507
|
+
/**
|
|
4508
|
+
* The Lightspark ID of the lightning payment you want to register. It can be the id of either
|
|
4509
|
+
* an OutgoingPayment or an IncomingPayment.
|
|
4510
|
+
**/
|
|
4511
|
+
paymentId: string;
|
|
4512
|
+
/**
|
|
4513
|
+
* The public key of the counterparty lightning node, which would be the public key of the
|
|
4514
|
+
* recipient node if it is to register an outgoing payment, or the public key of the sender
|
|
4515
|
+
* node if it is to register an incoming payment.
|
|
4516
|
+
**/
|
|
4517
|
+
nodePubkey: string;
|
|
4518
|
+
/** Indicates whether this payment is an OutgoingPayment or an IncomingPayment. **/
|
|
4519
|
+
direction: PaymentDirection;
|
|
4520
|
+
}
|
|
4521
|
+
|
|
4522
|
+
interface RegisterPaymentOutput {
|
|
4523
|
+
paymentId: string;
|
|
4524
|
+
}
|
|
4525
|
+
|
|
4526
|
+
interface ReleaseChannelPerCommitmentSecretInput {
|
|
4527
|
+
/** The unique identifier of the channel. **/
|
|
4528
|
+
channelId: string;
|
|
4529
|
+
/** The per-commitment secret to be released. **/
|
|
4530
|
+
perCommitmentSecret: string;
|
|
4531
|
+
/** The index associated with the per-commitment secret. **/
|
|
4532
|
+
perCommitmentIndex: number;
|
|
4533
|
+
}
|
|
4534
|
+
|
|
4535
|
+
interface ReleaseChannelPerCommitmentSecretOutput {
|
|
4536
|
+
/** The channel object after the per-commitment secret release operation. **/
|
|
4537
|
+
channelId: string;
|
|
4538
|
+
}
|
|
4539
|
+
|
|
4540
|
+
interface ReleasePaymentPreimageInput {
|
|
4541
|
+
/** The invoice the preimage belongs to. **/
|
|
4542
|
+
invoiceId: string;
|
|
4543
|
+
/** The preimage to release. **/
|
|
4544
|
+
paymentPreimage: string;
|
|
4545
|
+
}
|
|
4546
|
+
|
|
4547
|
+
interface ReleasePaymentPreimageOutput {
|
|
4548
|
+
/** The invoice of the transaction. **/
|
|
4549
|
+
invoiceId: string;
|
|
4550
|
+
}
|
|
4551
|
+
|
|
4552
|
+
/** This is an enum of the potential sub-event types for Remote Signing webook events. **/
|
|
4553
|
+
declare enum RemoteSigningSubEventType {
|
|
4554
|
+
/**
|
|
4555
|
+
* This is an enum value that represents values that could be added in the future.
|
|
4556
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
4557
|
+
*/
|
|
4558
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
4559
|
+
ECDH = "ECDH",
|
|
4560
|
+
GET_PER_COMMITMENT_POINT = "GET_PER_COMMITMENT_POINT",
|
|
4561
|
+
RELEASE_PER_COMMITMENT_SECRET = "RELEASE_PER_COMMITMENT_SECRET",
|
|
4562
|
+
SIGN_INVOICE = "SIGN_INVOICE",
|
|
4563
|
+
DERIVE_KEY_AND_SIGN = "DERIVE_KEY_AND_SIGN",
|
|
4564
|
+
RELEASE_PAYMENT_PREIMAGE = "RELEASE_PAYMENT_PREIMAGE",
|
|
4565
|
+
REQUEST_INVOICE_PAYMENT_HASH = "REQUEST_INVOICE_PAYMENT_HASH",
|
|
4566
|
+
REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET",
|
|
4567
|
+
VLS_MESSAGE = "VLS_MESSAGE"
|
|
4568
|
+
}
|
|
4569
|
+
|
|
4570
|
+
interface RequestWithdrawalInput {
|
|
4571
|
+
/** The node from which you'd like to make the withdrawal. **/
|
|
4572
|
+
nodeId: string;
|
|
4573
|
+
/** The bitcoin address where the withdrawal should be sent. **/
|
|
4574
|
+
bitcoinAddress: string;
|
|
4575
|
+
/**
|
|
4576
|
+
* The amount you want to withdraw from this node in Satoshis. Use the special value -1 to
|
|
4577
|
+
* withdrawal all funds from this node.
|
|
4578
|
+
**/
|
|
4579
|
+
amountSats: number;
|
|
4580
|
+
/** The strategy that should be used to withdraw the funds from this node. **/
|
|
4581
|
+
withdrawalMode: WithdrawalMode;
|
|
4582
|
+
/**
|
|
4583
|
+
* The idempotency key of the request. The same result will be returned for the same
|
|
4584
|
+
* idempotency key. *
|
|
4585
|
+
*/
|
|
4586
|
+
idempotencyKey?: string | undefined;
|
|
4587
|
+
/**
|
|
4588
|
+
* The target of the fee that should be used when crafting the L1 transaction. You should only
|
|
4589
|
+
* set `fee_target` or `sats_per_vbyte`. If neither of them is set, default value of MEDIUM
|
|
4590
|
+
* will be used as `fee_target`.
|
|
4591
|
+
**/
|
|
4592
|
+
feeTarget?: OnChainFeeTarget | undefined;
|
|
4593
|
+
/**
|
|
4594
|
+
* A manual fee rate set in sat/vbyte that should be used when crafting the L1 transaction. You
|
|
4595
|
+
* should only set `fee_target` or `sats_per_vbyte`
|
|
4596
|
+
**/
|
|
4597
|
+
satsPerVbyte?: number | undefined;
|
|
4598
|
+
}
|
|
4599
|
+
|
|
4600
|
+
interface RequestWithdrawalOutput {
|
|
4601
|
+
/** The request that is created for this withdrawal. **/
|
|
4602
|
+
requestId: string;
|
|
4603
|
+
}
|
|
4604
|
+
|
|
4605
|
+
/**
|
|
4606
|
+
* This is an enum of the potential risk ratings related to a transaction made over the Lightning
|
|
4607
|
+
* Network. These risk ratings are returned from the CryptoSanctionScreeningProvider. *
|
|
4608
|
+
*/
|
|
4609
|
+
declare enum RiskRating {
|
|
4610
|
+
/**
|
|
4611
|
+
* This is an enum value that represents values that could be added in the future.
|
|
4612
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
4613
|
+
*/
|
|
4614
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
4615
|
+
HIGH_RISK = "HIGH_RISK",
|
|
4616
|
+
LOW_RISK = "LOW_RISK",
|
|
4617
|
+
UNKNOWN = "UNKNOWN"
|
|
4618
|
+
}
|
|
4619
|
+
|
|
4620
|
+
/**
|
|
4621
|
+
* This object represents a transaction that was forwarded through a Lightspark node on the
|
|
4622
|
+
* Lightning Network, i.e., a routed transaction. You can retrieve this object to receive
|
|
4623
|
+
* information about any transaction routed through your Lightspark Node. *
|
|
4624
|
+
*/
|
|
4625
|
+
interface RoutingTransaction {
|
|
4626
|
+
/**
|
|
4627
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
4628
|
+
* opaque string.
|
|
4629
|
+
**/
|
|
4630
|
+
id: string;
|
|
4631
|
+
/** The date and time when this transaction was initiated. **/
|
|
4632
|
+
createdAt: string;
|
|
4633
|
+
/** The date and time when the entity was last updated. **/
|
|
4634
|
+
updatedAt: string;
|
|
4635
|
+
/** The current status of this transaction. **/
|
|
4636
|
+
status: TransactionStatus;
|
|
4637
|
+
/** The amount of money involved in this transaction. **/
|
|
4638
|
+
amount: CurrencyAmount;
|
|
4639
|
+
/** The typename of the object **/
|
|
4640
|
+
typename: string;
|
|
4641
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
4642
|
+
resolvedAt?: string | undefined;
|
|
4643
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
4644
|
+
transactionHash?: string | undefined;
|
|
4645
|
+
/** If known, the channel this transaction was received from. **/
|
|
4646
|
+
incomingChannelId?: string | undefined;
|
|
4647
|
+
/** If known, the channel this transaction was forwarded to. **/
|
|
4648
|
+
outgoingChannelId?: string | undefined;
|
|
4649
|
+
/**
|
|
4650
|
+
* The fees collected by the node when routing this transaction. We subtract the outgoing
|
|
4651
|
+
* amount to the incoming amount to determine how much fees were collected.
|
|
4652
|
+
**/
|
|
4653
|
+
fees?: CurrencyAmount | undefined;
|
|
4654
|
+
/** If applicable, user-facing error message describing why the routing failed. **/
|
|
4655
|
+
failureMessage?: RichText | undefined;
|
|
4656
|
+
/** If applicable, the reason why the routing failed. **/
|
|
4657
|
+
failureReason?: RoutingTransactionFailureReason | undefined;
|
|
4658
|
+
}
|
|
4659
|
+
declare const getRoutingTransactionQuery: (id: string) => Query<RoutingTransaction>;
|
|
4660
|
+
|
|
4661
|
+
interface ScreenNodeInput {
|
|
4662
|
+
/**
|
|
4663
|
+
* The compliance provider that is going to screen the node. You need to be a customer of the
|
|
4664
|
+
* selected provider and store the API key on the Lightspark account setting page.
|
|
4665
|
+
**/
|
|
4666
|
+
provider: ComplianceProvider;
|
|
4667
|
+
/** The public key of the lightning node that needs to be screened. **/
|
|
4668
|
+
nodePubkey: string;
|
|
4669
|
+
}
|
|
4670
|
+
|
|
4671
|
+
interface ScreenNodeOutput {
|
|
4672
|
+
rating: RiskRating;
|
|
4673
|
+
}
|
|
4674
|
+
|
|
4675
|
+
interface SendPaymentInput {
|
|
4676
|
+
/** The node from where you want to send the payment. **/
|
|
4677
|
+
nodeId: string;
|
|
4678
|
+
/** The public key of the destination node. **/
|
|
4679
|
+
destinationPublicKey: string;
|
|
4680
|
+
/** The timeout in seconds that we will try to make the payment. **/
|
|
4681
|
+
timeoutSecs: number;
|
|
4682
|
+
/** The amount you will send to the destination node, expressed in msats. **/
|
|
4683
|
+
amountMsats: number;
|
|
4684
|
+
/**
|
|
4685
|
+
* The maximum amount of fees that you want to pay for this payment to be sent, expressed in
|
|
4686
|
+
* msats. *
|
|
4687
|
+
*/
|
|
4688
|
+
maximumFeesMsats: number;
|
|
4689
|
+
/**
|
|
4690
|
+
* The idempotency key of the request. The same result will be returned for the same
|
|
4691
|
+
* idempotency key. *
|
|
4692
|
+
*/
|
|
4693
|
+
idempotencyKey?: string | undefined;
|
|
4694
|
+
}
|
|
4695
|
+
|
|
4696
|
+
interface SendPaymentOutput {
|
|
4697
|
+
/** The payment that has been sent. **/
|
|
4698
|
+
paymentId: string;
|
|
4699
|
+
}
|
|
4700
|
+
|
|
4701
|
+
interface SetInvoicePaymentHashInput {
|
|
4702
|
+
/** The invoice that needs to be updated. **/
|
|
4703
|
+
invoiceId: string;
|
|
4704
|
+
/** The 32-byte hash of the payment preimage. **/
|
|
4705
|
+
paymentHash: string;
|
|
4706
|
+
/**
|
|
4707
|
+
* The 32-byte nonce used to generate the invoice preimage if applicable. It will later be
|
|
4708
|
+
* included in RELEASE_PAYMENT_PREIMAGE webhook to help recover the raw preimage.
|
|
4709
|
+
**/
|
|
4710
|
+
preimageNonce?: string | undefined;
|
|
4711
|
+
}
|
|
4712
|
+
|
|
4713
|
+
interface SetInvoicePaymentHashOutput {
|
|
4714
|
+
invoiceId: string;
|
|
4715
|
+
}
|
|
4716
|
+
|
|
4717
|
+
interface Signable {
|
|
4718
|
+
/**
|
|
4719
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an
|
|
4720
|
+
* opaque string.
|
|
4721
|
+
**/
|
|
4722
|
+
id: string;
|
|
4723
|
+
/** The date and time when the entity was first created. **/
|
|
4724
|
+
createdAt: string;
|
|
4725
|
+
/** The date and time when the entity was last updated. **/
|
|
4726
|
+
updatedAt: string;
|
|
4727
|
+
/** The typename of the object **/
|
|
4728
|
+
typename: string;
|
|
4729
|
+
}
|
|
4730
|
+
declare const getSignableQuery: (id: string) => Query<Signable>;
|
|
4731
|
+
|
|
4732
|
+
interface SignInvoiceInput {
|
|
4733
|
+
/** The unique identifier of the invoice to be signed. **/
|
|
4734
|
+
invoiceId: string;
|
|
4735
|
+
/** The cryptographic signature for the invoice. **/
|
|
4736
|
+
signature: string;
|
|
4737
|
+
/** The recovery identifier for the signature. **/
|
|
4738
|
+
recoveryId: number;
|
|
4739
|
+
}
|
|
4740
|
+
|
|
4741
|
+
interface SignInvoiceOutput {
|
|
4742
|
+
/** The signed invoice object. **/
|
|
4743
|
+
invoiceId: string;
|
|
4744
|
+
}
|
|
4745
|
+
|
|
4746
|
+
interface SignMessagesInput {
|
|
4747
|
+
/** The list of the message ids and signatures. **/
|
|
4748
|
+
signatures: IdAndSignature[];
|
|
4749
|
+
}
|
|
4750
|
+
|
|
4751
|
+
interface SignMessagesOutput {
|
|
4752
|
+
/** The list of signed payloads. **/
|
|
4753
|
+
signedPayloads: SignablePayload[];
|
|
4754
|
+
}
|
|
4755
|
+
|
|
4756
|
+
interface UpdateChannelPerCommitmentPointInput {
|
|
4757
|
+
channelId: string;
|
|
4758
|
+
perCommitmentPoint: string;
|
|
4759
|
+
perCommitmentPointIndex: number;
|
|
4760
|
+
}
|
|
4761
|
+
|
|
4762
|
+
interface UpdateChannelPerCommitmentPointOutput {
|
|
4763
|
+
channelId: string;
|
|
4764
|
+
}
|
|
4765
|
+
|
|
4766
|
+
interface UpdateNodeSharedSecretInput {
|
|
4767
|
+
nodeId: string;
|
|
4768
|
+
sharedSecret: string;
|
|
4769
|
+
}
|
|
4770
|
+
|
|
4771
|
+
interface UpdateNodeSharedSecretOutput {
|
|
4772
|
+
nodeId: string;
|
|
4773
|
+
}
|
|
4774
|
+
|
|
4775
|
+
/**
|
|
4776
|
+
* This is an enum of the potential event types that can be associated with your Lightspark
|
|
4777
|
+
* wallets. *
|
|
4778
|
+
*/
|
|
4779
|
+
declare enum WebhookEventType {
|
|
4780
|
+
/**
|
|
4781
|
+
* This is an enum value that represents values that could be added in the future.
|
|
4782
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
4783
|
+
*/
|
|
4784
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
4785
|
+
PAYMENT_FINISHED = "PAYMENT_FINISHED",
|
|
4786
|
+
FORCE_CLOSURE = "FORCE_CLOSURE",
|
|
4787
|
+
WITHDRAWAL_FINISHED = "WITHDRAWAL_FINISHED",
|
|
4788
|
+
FUNDS_RECEIVED = "FUNDS_RECEIVED",
|
|
4789
|
+
NODE_STATUS = "NODE_STATUS",
|
|
4790
|
+
UMA_INVITATION_CLAIMED = "UMA_INVITATION_CLAIMED",
|
|
4791
|
+
WALLET_STATUS = "WALLET_STATUS",
|
|
4792
|
+
WALLET_OUTGOING_PAYMENT_FINISHED = "WALLET_OUTGOING_PAYMENT_FINISHED",
|
|
4793
|
+
WALLET_INCOMING_PAYMENT_FINISHED = "WALLET_INCOMING_PAYMENT_FINISHED",
|
|
4794
|
+
WALLET_WITHDRAWAL_FINISHED = "WALLET_WITHDRAWAL_FINISHED",
|
|
4795
|
+
WALLET_FUNDS_RECEIVED = "WALLET_FUNDS_RECEIVED",
|
|
4796
|
+
REMOTE_SIGNING = "REMOTE_SIGNING",
|
|
4797
|
+
LOW_BALANCE = "LOW_BALANCE",
|
|
4798
|
+
HIGH_BALANCE = "HIGH_BALANCE",
|
|
4799
|
+
CHANNEL_OPENING_FEES = "CHANNEL_OPENING_FEES"
|
|
4800
|
+
}
|
|
4801
|
+
|
|
4802
|
+
interface WithdrawalFeeEstimateInput {
|
|
4803
|
+
/** The node from which you'd like to make the withdrawal. **/
|
|
4804
|
+
nodeId: string;
|
|
4805
|
+
/**
|
|
4806
|
+
* The amount you want to withdraw from this node in Satoshis. Use the special value -1 to
|
|
4807
|
+
* withdrawal all funds from this node.
|
|
4808
|
+
**/
|
|
4809
|
+
amountSats: number;
|
|
4810
|
+
/** The strategy that should be used to withdraw the funds from this node. **/
|
|
4811
|
+
withdrawalMode: WithdrawalMode;
|
|
4812
|
+
}
|
|
4813
|
+
|
|
4814
|
+
interface WithdrawalFeeEstimateOutput {
|
|
4815
|
+
/** The estimated fee for the withdrawal. **/
|
|
4816
|
+
feeEstimate: CurrencyAmount;
|
|
4817
|
+
}
|
|
4818
|
+
|
|
4819
|
+
export { type DeclineToSignMessagesInput as $, Account as A, type Balances as B, type CancelInvoiceInput as C, type ClaimUmaInvitationWithIncentivesOutput as D, ComplianceProvider as E, type Connection as F, type CreateApiTokenInput as G, type CreateApiTokenOutput as H, type CreateInvitationWithIncentivesInput as I, type CreateInvitationWithIncentivesOutput as J, type CreateInvoiceInput as K, LightsparkClient as L, type CreateInvoiceOutput as M, type CreateLnurlInvoiceInput as N, type CreateNodeWalletAddressInput as O, type CreateNodeWalletAddressOutput as P, type CreateTestModeInvoiceInput as Q, type CreateTestModeInvoiceOutput as R, type CreateTestModePaymentInput as S, type CreateTestModePaymentoutput as T, type CreateUmaInvitationInput as U, type CreateUmaInvitationOutput as V, WebhookEventType as W, type CreateUmaInvoiceInput as X, type CurrencyAmount as Y, CurrencyUnit as Z, type DailyLiquidityForecast as _, type AccountToApiTokensConnection as a, type OutgoingPaymentsForInvoiceQueryInput as a$, type DeclineToSignMessagesOutput as a0, type DeleteApiTokenInput as a1, type DeleteApiTokenOutput as a2, type Deposit as a3, getDepositQuery as a4, type Entity as a5, type FailHtlcsInput as a6, type FailHtlcsOutput as a7, type FeeEstimate as a8, type FundNodeInput as a9, LightningPaymentDirection as aA, type LightningTransaction as aB, getLightningTransactionQuery as aC, type LightsparkNode as aD, getLightsparkNodeQuery as aE, type LightsparkNodeOwner as aF, getLightsparkNodeOwnerQuery as aG, LightsparkNodeStatus as aH, type LightsparkNodeToChannelsConnection as aI, type LightsparkNodeToDailyLiquidityForecastsConnection as aJ, LightsparkNodeWithOSK as aK, LightsparkNodeWithRemoteSigning as aL, type MultiSigAddressValidationParameters as aM, type Node as aN, getNodeQuery as aO, type NodeAddress as aP, NodeAddressType as aQ, type NodeToAddressesConnection as aR, OnChainFeeTarget as aS, type OnChainTransaction as aT, getOnChainTransactionQuery as aU, OutgoingPayment as aV, OutgoingPaymentAttempt as aW, OutgoingPaymentAttemptStatus as aX, type OutgoingPaymentAttemptToHopsConnection as aY, type OutgoingPaymentForIdempotencyKeyInput as aZ, type OutgoingPaymentForIdempotencyKeyOutput as a_, type FundNodeOutput as aa, GraphNode as ab, type Hop as ac, getHopQuery as ad, HtlcAttemptFailureCode as ae, type IdAndSignature as af, IncentivesIneligibilityReason as ag, IncentivesStatus as ah, IncomingPayment as ai, type IncomingPaymentAttempt as aj, getIncomingPaymentAttemptQuery as ak, IncomingPaymentAttemptStatus as al, type IncomingPaymentsForInvoiceQueryInput as am, type IncomingPaymentsForInvoiceQueryOutput as an, type IncomingPaymentsForPaymentHashQueryInput as ao, type IncomingPaymentsForPaymentHashQueryOutput as ap, type IncomingPaymentToAttemptsConnection as aq, type Invoice as ar, getInvoiceQuery as as, type InvoiceData as at, type InvoiceForPaymentHashInput as au, type InvoiceForPaymentHashOutput as av, InvoiceType as aw, type LightningFeeEstimateForInvoiceInput as ax, type LightningFeeEstimateForNodeInput as ay, type LightningFeeEstimateOutput as az, type AccountToChannelsConnection as b, type WalletToPaymentRequestsConnection as b$, type OutgoingPaymentsForInvoiceQueryOutput as b0, type OutgoingPaymentsForPaymentHashQueryInput as b1, type OutgoingPaymentsForPaymentHashQueryOutput as b2, type OutgoingPaymentToAttemptsConnection as b3, type PageInfo as b4, type PayInvoiceInput as b5, type PayInvoiceOutput as b6, PaymentDirection as b7, PaymentFailureReason as b8, type PaymentRequest as b9, type SendPaymentOutput as bA, type SetInvoicePaymentHashInput as bB, type SetInvoicePaymentHashOutput as bC, type Signable as bD, getSignableQuery as bE, type SignablePayload as bF, getSignablePayloadQuery as bG, SignablePayloadStatus as bH, type SignInvoiceInput as bI, type SignInvoiceOutput as bJ, type SignMessagesInput as bK, type SignMessagesOutput as bL, type SingleNodeDashboard as bM, type Transaction as bN, getTransactionQuery as bO, type TransactionFailures as bP, TransactionStatus as bQ, TransactionType as bR, type TransactionUpdate as bS, type UmaInvitation as bT, getUmaInvitationQuery as bU, type UpdateChannelPerCommitmentPointInput as bV, type UpdateChannelPerCommitmentPointOutput as bW, type UpdateNodeSharedSecretInput as bX, type UpdateNodeSharedSecretOutput as bY, Wallet as bZ, WalletStatus as b_, getPaymentRequestQuery as ba, type PaymentRequestData as bb, PaymentRequestStatus as bc, type PayUmaInvoiceInput as bd, Permission as be, type PostTransactionData as bf, RegionCode as bg, type RegisterPaymentInput as bh, type RegisterPaymentOutput as bi, type ReleaseChannelPerCommitmentSecretInput as bj, type ReleaseChannelPerCommitmentSecretOutput as bk, type ReleasePaymentPreimageInput as bl, type ReleasePaymentPreimageOutput as bm, RemoteSigningSubEventType as bn, RequestInitiator as bo, type RequestWithdrawalInput as bp, type RequestWithdrawalOutput as bq, type RichText as br, RiskRating as bs, type RoutingTransaction as bt, getRoutingTransactionQuery as bu, RoutingTransactionFailureReason as bv, type ScreenNodeInput as bw, type ScreenNodeOutput as bx, type Secret as by, type SendPaymentInput as bz, type AccountToNodesConnection as c, type WalletToTransactionsConnection as c0, type WalletToWithdrawalRequestsConnection as c1, type Withdrawal as c2, getWithdrawalQuery as c3, type WithdrawalFeeEstimateInput as c4, type WithdrawalFeeEstimateOutput as c5, WithdrawalMode as c6, WithdrawalRequest as c7, WithdrawalRequestStatus as c8, type WithdrawalRequestToChannelClosingTransactionsConnection as c9, type WithdrawalRequestToChannelOpeningTransactionsConnection as ca, type WithdrawalRequestToWithdrawalsConnection as cb, type AccountToPaymentRequestsConnection as d, type AccountToTransactionsConnection as e, type AccountToWalletsConnection as f, type AccountToWithdrawalRequestsConnection as g, type ApiToken as h, getApiTokenQuery as i, type AuditLogActor as j, getAuditLogActorQuery as k, type BlockchainBalance as l, type CancelInvoiceOutput as m, Channel as n, type ChannelClosingTransaction as o, getChannelClosingTransactionQuery as p, type ChannelFees as q, type ChannelOpeningTransaction as r, getChannelOpeningTransactionQuery as s, type ChannelSnapshot as t, getChannelSnapshotQuery as u, ChannelStatus as v, type ChannelToTransactionsConnection as w, type ClaimUmaInvitationInput as x, type ClaimUmaInvitationOutput as y, type ClaimUmaInvitationWithIncentivesInput as z };
|