@lightsparkdev/lightspark-sdk 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/{chunk-7UNNCH5S.js → chunk-VTPDR6P4.js} +1270 -342
- package/dist/{index-5235e43b.d.ts → index-f040db9f.d.ts} +707 -407
- package/dist/index.cjs +1247 -319
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/objects/index.cjs +1180 -306
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +5 -5
- package/package.json +2 -2
- package/src/objects/Account.ts +175 -2
- package/src/objects/AccountToApiTokensConnection.ts +16 -5
- package/src/objects/AccountToChannelsConnection.ts +9 -0
- package/src/objects/AccountToNodesConnection.ts +19 -5
- package/src/objects/AccountToPaymentRequestsConnection.ts +21 -5
- package/src/objects/AccountToTransactionsConnection.ts +33 -9
- package/src/objects/AccountToWalletsConnection.ts +13 -4
- package/src/objects/ApiToken.ts +13 -3
- package/src/objects/Balances.ts +17 -3
- package/src/objects/BlockchainBalance.ts +34 -9
- package/src/objects/Channel.ts +61 -16
- package/src/objects/ChannelClosingTransaction.ts +81 -61
- package/src/objects/ChannelFees.ts +16 -5
- package/src/objects/ChannelOpeningTransaction.ts +81 -61
- package/src/objects/ChannelSnapshot.ts +66 -6
- package/src/objects/ChannelToTransactionsConnection.ts +26 -6
- package/src/objects/Connection.ts +205 -10
- package/src/objects/CreateApiTokenInput.ts +8 -2
- package/src/objects/CreateApiTokenOutput.ts +9 -3
- package/src/objects/CreateInvoiceInput.ts +14 -5
- package/src/objects/CreateInvoiceOutput.ts +7 -2
- package/src/objects/CreateLnurlInvoiceInput.ts +13 -3
- package/src/objects/CreateNodeWalletAddressInput.ts +9 -2
- package/src/objects/CreateNodeWalletAddressOutput.ts +10 -2
- package/src/objects/CreateTestModeInvoiceInput.ts +14 -4
- package/src/objects/CreateTestModeInvoiceOutput.ts +10 -2
- package/src/objects/CreateTestModePaymentInput.ts +12 -3
- package/src/objects/CreateTestModePaymentoutput.ts +12 -2
- package/src/objects/CreateUmaInvoiceInput.ts +13 -3
- package/src/objects/CurrencyAmount.ts +13 -2
- package/src/objects/DeclineToSignMessagesInput.ts +9 -2
- package/src/objects/DeclineToSignMessagesOutput.ts +15 -3
- package/src/objects/DeleteApiTokenInput.ts +7 -2
- package/src/objects/DeleteApiTokenOutput.ts +7 -2
- package/src/objects/Deposit.ts +77 -61
- package/src/objects/Entity.ts +184 -2
- package/src/objects/FeeEstimate.ts +12 -3
- package/src/objects/FundNodeInput.ts +9 -3
- package/src/objects/FundNodeOutput.ts +11 -3
- package/src/objects/GraphNode.ts +21 -5
- package/src/objects/Hop.ts +27 -9
- package/src/objects/HtlcAttemptFailureCode.ts +2 -0
- package/src/objects/IdAndSignature.ts +8 -2
- package/src/objects/IncomingPayment.ts +33 -7
- package/src/objects/IncomingPaymentAttempt.ts +21 -5
- package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -5
- package/src/objects/Invoice.ts +91 -24
- package/src/objects/InvoiceData.ts +75 -6
- package/src/objects/LightningFeeEstimateForInvoiceInput.ts +13 -3
- package/src/objects/LightningFeeEstimateForNodeInput.ts +12 -2
- package/src/objects/LightningFeeEstimateOutput.ts +15 -3
- package/src/objects/LightningTransaction.ts +171 -28
- package/src/objects/LightsparkNode.ts +311 -208
- package/src/objects/LightsparkNodeOwner.ts +35 -4
- package/src/objects/LightsparkNodeToChannelsConnection.ts +17 -4
- package/src/objects/LightsparkNodeWithOSK.ts +97 -15
- package/src/objects/LightsparkNodeWithRemoteSigning.ts +93 -13
- package/src/objects/Node.ts +269 -67
- package/src/objects/NodeAddress.ts +8 -2
- package/src/objects/NodeToAddressesConnection.ts +13 -3
- package/src/objects/OnChainTransaction.ts +156 -44
- package/src/objects/OutgoingPayment.ts +127 -14
- package/src/objects/OutgoingPaymentAttempt.ts +57 -8
- package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +18 -5
- package/src/objects/OutgoingPaymentToAttemptsConnection.ts +17 -4
- package/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts +12 -3
- package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +11 -2
- package/src/objects/PageInfo.ts +14 -6
- package/src/objects/PayInvoiceInput.ts +12 -3
- package/src/objects/PayInvoiceOutput.ts +7 -2
- package/src/objects/PayUmaInvoiceInput.ts +12 -3
- package/src/objects/PaymentRequest.ts +81 -5
- package/src/objects/PaymentRequestData.ts +81 -4
- package/src/objects/PostTransactionData.ts +12 -3
- package/src/objects/RegisterPaymentInput.ts +10 -2
- package/src/objects/RegisterPaymentOutput.ts +9 -2
- package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +13 -2
- package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +9 -2
- package/src/objects/ReleasePaymentPreimageInput.ts +10 -2
- package/src/objects/ReleasePaymentPreimageOutput.ts +9 -2
- package/src/objects/RequestWithdrawalInput.ts +12 -2
- package/src/objects/RequestWithdrawalOutput.ts +9 -2
- package/src/objects/RichText.ts +7 -2
- package/src/objects/RoutingTransaction.ts +62 -41
- package/src/objects/ScreenNodeInput.ts +8 -2
- package/src/objects/ScreenNodeOutput.ts +7 -2
- package/src/objects/Secret.ts +8 -2
- package/src/objects/SendPaymentInput.ts +11 -2
- package/src/objects/SendPaymentOutput.ts +7 -2
- package/src/objects/SetInvoicePaymentHashInput.ts +12 -3
- package/src/objects/SetInvoicePaymentHashOutput.ts +9 -2
- package/src/objects/SignInvoiceInput.ts +9 -2
- package/src/objects/SignInvoiceOutput.ts +7 -2
- package/src/objects/SignMessagesInput.ts +13 -3
- package/src/objects/SignMessagesOutput.ts +13 -3
- package/src/objects/Signable.ts +10 -3
- package/src/objects/SignablePayload.ts +18 -5
- package/src/objects/Transaction.ts +260 -9
- package/src/objects/TransactionFailures.ts +11 -4
- package/src/objects/UpdateChannelPerCommitmentPointInput.ts +13 -2
- package/src/objects/UpdateChannelPerCommitmentPointOutput.ts +9 -2
- package/src/objects/UpdateNodeSharedSecretInput.ts +10 -2
- package/src/objects/UpdateNodeSharedSecretOutput.ts +9 -2
- package/src/objects/Wallet.ts +130 -5
- package/src/objects/WalletToPaymentRequestsConnection.ts +21 -5
- package/src/objects/WalletToTransactionsConnection.ts +16 -5
- package/src/objects/Withdrawal.ts +77 -61
- package/src/objects/WithdrawalRequest.ts +25 -4
- package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +19 -4
- package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +19 -4
- package/src/objects/index.ts +5 -2
- package/src/tests/integration/client.test.ts +46 -7
- package/src/tests/serialization.test.ts +18 -0
|
@@ -26,7 +26,7 @@ declare enum CurrencyUnit {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/** This object represents the value and unit for an amount of currency. **/
|
|
29
|
-
|
|
29
|
+
interface CurrencyAmount {
|
|
30
30
|
/** The original numeric value for this CurrencyAmount. **/
|
|
31
31
|
originalValue: number;
|
|
32
32
|
/** The original unit of currency for this CurrencyAmount. **/
|
|
@@ -43,7 +43,7 @@ type CurrencyAmount = {
|
|
|
43
43
|
* currency. For example, for USD, the value will be in cents.
|
|
44
44
|
**/
|
|
45
45
|
preferredCurrencyValueApprox: number;
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
47
|
|
|
48
48
|
declare enum LightsparkNodeStatus {
|
|
49
49
|
/**
|
|
@@ -108,21 +108,6 @@ type AccountDashboard = {
|
|
|
108
108
|
remoteBalance: Maybe<CurrencyAmount>;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
/** This interface is used by all the entities in the Lightspark system. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the `entity` query and its ID. **/
|
|
112
|
-
type Entity = {
|
|
113
|
-
/**
|
|
114
|
-
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
115
|
-
* string.
|
|
116
|
-
**/
|
|
117
|
-
id: string;
|
|
118
|
-
/** The date and time when the entity was first created. **/
|
|
119
|
-
createdAt: string;
|
|
120
|
-
/** The date and time when the entity was last updated. **/
|
|
121
|
-
updatedAt: string;
|
|
122
|
-
/** The typename of the object **/
|
|
123
|
-
typename: string;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
111
|
/** This is an enum of the potential permissions that a Lightspark user can have in regards to account management. **/
|
|
127
112
|
declare enum Permission {
|
|
128
113
|
/**
|
|
@@ -147,7 +132,7 @@ declare enum Permission {
|
|
|
147
132
|
}
|
|
148
133
|
|
|
149
134
|
/** This is an object representing a Lightspark API token, that can be used to authenticate this account when making API calls or using our SDKs. See the “Authentication” section of our API docs for more details on its usage. **/
|
|
150
|
-
|
|
135
|
+
interface ApiToken {
|
|
151
136
|
/**
|
|
152
137
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
153
138
|
* string.
|
|
@@ -171,30 +156,18 @@ type ApiToken = Entity & {
|
|
|
171
156
|
permissions: Permission[];
|
|
172
157
|
/** The typename of the object **/
|
|
173
158
|
typename: string;
|
|
174
|
-
}
|
|
159
|
+
}
|
|
175
160
|
declare const getApiTokenQuery: (id: string) => Query<ApiToken>;
|
|
176
161
|
|
|
177
162
|
/** This is an object representing information about a page returned by the Lightspark API. For more information, please see the “Pagination” section of our API docs for more information about its usage. **/
|
|
178
|
-
|
|
179
|
-
hasNextPage?: boolean;
|
|
180
|
-
hasPreviousPage?: boolean;
|
|
181
|
-
startCursor?: string;
|
|
182
|
-
endCursor?: string;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
type Connection = {
|
|
186
|
-
/**
|
|
187
|
-
* The total count of objects in this connection, using the current filters. It is different from the
|
|
188
|
-
* number of objects returned in the current page (in the `entities` field).
|
|
189
|
-
**/
|
|
190
|
-
count: number;
|
|
191
|
-
/** An object that holds pagination information about the objects in this connection. **/
|
|
192
|
-
pageInfo: PageInfo;
|
|
193
|
-
/** The typename of the object **/
|
|
194
|
-
typename: string;
|
|
195
|
-
};
|
|
163
|
+
interface PageInfo {
|
|
164
|
+
hasNextPage?: boolean | undefined;
|
|
165
|
+
hasPreviousPage?: boolean | undefined;
|
|
166
|
+
startCursor?: string | undefined;
|
|
167
|
+
endCursor?: string | undefined;
|
|
168
|
+
}
|
|
196
169
|
|
|
197
|
-
|
|
170
|
+
interface AccountToApiTokensConnection {
|
|
198
171
|
/**
|
|
199
172
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
200
173
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -206,13 +179,7 @@ type AccountToApiTokensConnection = Connection & {
|
|
|
206
179
|
entities: ApiToken[];
|
|
207
180
|
/** The typename of the object **/
|
|
208
181
|
typename: string;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/** This represents the fee policies set for a channel on the Lightning Network. **/
|
|
212
|
-
type ChannelFees = {
|
|
213
|
-
baseFee?: CurrencyAmount;
|
|
214
|
-
feeRatePerMil?: number;
|
|
215
|
-
};
|
|
182
|
+
}
|
|
216
183
|
|
|
217
184
|
/** This is an enum representing the status of a channel on the Lightning Network. **/
|
|
218
185
|
declare enum ChannelStatus {
|
|
@@ -237,7 +204,13 @@ declare enum ChannelStatus {
|
|
|
237
204
|
ERROR = "ERROR"
|
|
238
205
|
}
|
|
239
206
|
|
|
240
|
-
|
|
207
|
+
/** This represents the fee policies set for a channel on the Lightning Network. **/
|
|
208
|
+
interface ChannelFees {
|
|
209
|
+
baseFee?: CurrencyAmount | undefined;
|
|
210
|
+
feeRatePerMil?: number | undefined;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
interface ChannelToTransactionsConnection {
|
|
241
214
|
/**
|
|
242
215
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
243
216
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -247,18 +220,33 @@ type ChannelToTransactionsConnection = {
|
|
|
247
220
|
* The average fee for the transactions that transited through this channel, according to the filters
|
|
248
221
|
* and constraints of the connection.
|
|
249
222
|
**/
|
|
250
|
-
averageFee?: CurrencyAmount;
|
|
223
|
+
averageFee?: CurrencyAmount | undefined;
|
|
251
224
|
/**
|
|
252
225
|
* The total amount transacted for the transactions that transited through this channel, according to
|
|
253
226
|
* the filters and constraints of the connection.
|
|
254
227
|
**/
|
|
255
|
-
totalAmountTransacted?: CurrencyAmount;
|
|
228
|
+
totalAmountTransacted?: CurrencyAmount | undefined;
|
|
256
229
|
/**
|
|
257
230
|
* The total amount of fees for the transactions that transited through this channel, according to the
|
|
258
231
|
* filters and constraints of the connection.
|
|
259
232
|
**/
|
|
260
|
-
totalFees?: CurrencyAmount;
|
|
261
|
-
}
|
|
233
|
+
totalFees?: CurrencyAmount | undefined;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** This interface is used by all the entities in the Lightspark system. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the `entity` query and its ID. **/
|
|
237
|
+
interface Entity {
|
|
238
|
+
/**
|
|
239
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
240
|
+
* string.
|
|
241
|
+
**/
|
|
242
|
+
id: string;
|
|
243
|
+
/** The date and time when the entity was first created. **/
|
|
244
|
+
createdAt: string;
|
|
245
|
+
/** The date and time when the entity was last updated. **/
|
|
246
|
+
updatedAt: string;
|
|
247
|
+
/** The typename of the object **/
|
|
248
|
+
typename: string;
|
|
249
|
+
}
|
|
262
250
|
|
|
263
251
|
/** This is an enum of the potential types of transactions that can be associated with your Lightspark Node. **/
|
|
264
252
|
declare enum TransactionType {
|
|
@@ -314,31 +302,112 @@ declare class Channel implements Entity {
|
|
|
314
302
|
getUptimePercentage(client: LightsparkClient, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<number>;
|
|
315
303
|
getTransactions(client: LightsparkClient, types?: TransactionType[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined): Promise<ChannelToTransactionsConnection>;
|
|
316
304
|
static getChannelQuery(id: string): Query<Channel>;
|
|
305
|
+
toJson(): {
|
|
306
|
+
__typename: string;
|
|
307
|
+
channel_id: string;
|
|
308
|
+
channel_created_at: string;
|
|
309
|
+
channel_updated_at: string;
|
|
310
|
+
channel_funding_transaction: {
|
|
311
|
+
id: string | undefined;
|
|
312
|
+
};
|
|
313
|
+
channel_capacity: any;
|
|
314
|
+
channel_local_balance: any;
|
|
315
|
+
channel_local_unsettled_balance: any;
|
|
316
|
+
channel_remote_balance: any;
|
|
317
|
+
channel_remote_unsettled_balance: any;
|
|
318
|
+
channel_unsettled_balance: any;
|
|
319
|
+
channel_total_balance: any;
|
|
320
|
+
channel_status: ChannelStatus | undefined;
|
|
321
|
+
channel_estimated_force_closure_wait_minutes: number | undefined;
|
|
322
|
+
channel_commit_fee: any;
|
|
323
|
+
channel_fees: any;
|
|
324
|
+
channel_remote_node: {
|
|
325
|
+
id: string | undefined;
|
|
326
|
+
};
|
|
327
|
+
channel_local_node: {
|
|
328
|
+
id: string;
|
|
329
|
+
};
|
|
330
|
+
channel_short_channel_id: string | undefined;
|
|
331
|
+
};
|
|
317
332
|
}
|
|
318
333
|
|
|
319
334
|
declare class AccountToChannelsConnection {
|
|
320
335
|
readonly count: number;
|
|
321
336
|
readonly entities: Channel[];
|
|
322
337
|
constructor(count: number, entities: Channel[]);
|
|
338
|
+
toJson(): {
|
|
339
|
+
account_to_channels_connection_count: number;
|
|
340
|
+
account_to_channels_connection_entities: {
|
|
341
|
+
__typename: string;
|
|
342
|
+
channel_id: string;
|
|
343
|
+
channel_created_at: string;
|
|
344
|
+
channel_updated_at: string;
|
|
345
|
+
channel_funding_transaction: {
|
|
346
|
+
id: string | undefined;
|
|
347
|
+
};
|
|
348
|
+
channel_capacity: any;
|
|
349
|
+
channel_local_balance: any;
|
|
350
|
+
channel_local_unsettled_balance: any;
|
|
351
|
+
channel_remote_balance: any;
|
|
352
|
+
channel_remote_unsettled_balance: any;
|
|
353
|
+
channel_unsettled_balance: any;
|
|
354
|
+
channel_total_balance: any;
|
|
355
|
+
channel_status: ChannelStatus | undefined;
|
|
356
|
+
channel_estimated_force_closure_wait_minutes: number | undefined;
|
|
357
|
+
channel_commit_fee: any;
|
|
358
|
+
channel_fees: any;
|
|
359
|
+
channel_remote_node: {
|
|
360
|
+
id: string | undefined;
|
|
361
|
+
};
|
|
362
|
+
channel_local_node: {
|
|
363
|
+
id: string;
|
|
364
|
+
};
|
|
365
|
+
channel_short_channel_id: string | undefined;
|
|
366
|
+
}[];
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/** This is an object representing the balance associated with your Lightspark account. You can retrieve this object to see your balance, which can be broken down into several different categorizations. **/
|
|
371
|
+
interface Balances {
|
|
372
|
+
/**
|
|
373
|
+
* This represents the balance that should be displayed when asked "how much do I own right now?". It
|
|
374
|
+
* represents the amount currently owned, including things that may not be owned soon (e.g. in-flight
|
|
375
|
+
* outgoing payments, in-flight withdrawals, commit fees, etc.). It really is a snapshot of what is
|
|
376
|
+
* officially owned at this instant.
|
|
377
|
+
**/
|
|
378
|
+
ownedBalance: CurrencyAmount;
|
|
379
|
+
/**
|
|
380
|
+
* This represents the balance that should be displayed when asked "how much can I send on Lightning
|
|
381
|
+
* right now?". It represents the amount currently available to be sent on the Lightning network. We
|
|
382
|
+
* remove from the balance all the funds that are temporarily locked (e.g. channel reserves).
|
|
383
|
+
**/
|
|
384
|
+
availableToSendBalance: CurrencyAmount;
|
|
385
|
+
/**
|
|
386
|
+
* This represents the balance that should be displayed when asked "how much money can I withdraw on
|
|
387
|
+
* the Bitcoin network right now?". It represents the amount currently available to withdraw and is
|
|
388
|
+
* usually equal to the `owned_balance` but it does not include in-flight operations (which would
|
|
389
|
+
* likely succeed and therefore likely make your withdrawal fail).
|
|
390
|
+
**/
|
|
391
|
+
availableToWithdrawBalance: CurrencyAmount;
|
|
323
392
|
}
|
|
324
393
|
|
|
325
394
|
/** This is an object representing a detailed breakdown of the balance for a Lightspark Node. **/
|
|
326
|
-
|
|
395
|
+
interface BlockchainBalance {
|
|
327
396
|
/** The total wallet balance, including unconfirmed UTXOs. **/
|
|
328
|
-
totalBalance?: CurrencyAmount;
|
|
397
|
+
totalBalance?: CurrencyAmount | undefined;
|
|
329
398
|
/** The balance of confirmed UTXOs in the wallet. **/
|
|
330
|
-
confirmedBalance?: CurrencyAmount;
|
|
399
|
+
confirmedBalance?: CurrencyAmount | undefined;
|
|
331
400
|
/** The balance of unconfirmed UTXOs in the wallet. **/
|
|
332
|
-
unconfirmedBalance?: CurrencyAmount;
|
|
401
|
+
unconfirmedBalance?: CurrencyAmount | undefined;
|
|
333
402
|
/** The balance that's locked by an on-chain transaction. **/
|
|
334
|
-
lockedBalance?: CurrencyAmount;
|
|
403
|
+
lockedBalance?: CurrencyAmount | undefined;
|
|
335
404
|
/** Funds required to be held in reserve for channel bumping. **/
|
|
336
|
-
requiredReserve?: CurrencyAmount;
|
|
405
|
+
requiredReserve?: CurrencyAmount | undefined;
|
|
337
406
|
/** Funds available for creating channels or withdrawing. **/
|
|
338
|
-
availableBalance?: CurrencyAmount;
|
|
339
|
-
}
|
|
407
|
+
availableBalance?: CurrencyAmount | undefined;
|
|
408
|
+
}
|
|
340
409
|
|
|
341
|
-
|
|
410
|
+
interface LightsparkNodeToChannelsConnection {
|
|
342
411
|
/**
|
|
343
412
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
344
413
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -350,18 +419,18 @@ type LightsparkNodeToChannelsConnection = Connection & {
|
|
|
350
419
|
entities: Channel[];
|
|
351
420
|
/** The typename of the object **/
|
|
352
421
|
typename: string;
|
|
353
|
-
}
|
|
422
|
+
}
|
|
354
423
|
|
|
355
424
|
/** This object represents the address of a node on the Lightning Network. **/
|
|
356
|
-
|
|
425
|
+
interface NodeAddress {
|
|
357
426
|
/** The string representation of the address. **/
|
|
358
427
|
address: string;
|
|
359
428
|
/** The type, or protocol, of this address. **/
|
|
360
429
|
type: NodeAddressType;
|
|
361
|
-
}
|
|
430
|
+
}
|
|
362
431
|
|
|
363
432
|
/** A connection between a node and the addresses it has announced for itself on Lightning Network. **/
|
|
364
|
-
|
|
433
|
+
interface NodeToAddressesConnection {
|
|
365
434
|
/**
|
|
366
435
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
367
436
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -369,53 +438,96 @@ type NodeToAddressesConnection = {
|
|
|
369
438
|
count: number;
|
|
370
439
|
/** The addresses for the current page of this connection. **/
|
|
371
440
|
entities: NodeAddress[];
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
/** This object is an interface representing a Lightning Node on the Lightning Network, and could either be a Lightspark node or a node managed by a third party. **/
|
|
375
|
-
declare class Node implements Entity {
|
|
376
|
-
readonly id: string;
|
|
377
|
-
readonly createdAt: string;
|
|
378
|
-
readonly updatedAt: string;
|
|
379
|
-
readonly bitcoinNetwork: BitcoinNetwork;
|
|
380
|
-
readonly displayName: string;
|
|
381
|
-
readonly typename: string;
|
|
382
|
-
readonly alias?: string | undefined;
|
|
383
|
-
readonly color?: string | undefined;
|
|
384
|
-
readonly conductivity?: number | undefined;
|
|
385
|
-
readonly publicKey?: string | undefined;
|
|
386
|
-
constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined);
|
|
387
|
-
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
388
|
-
static getNodeQuery(id: string): Query<Node>;
|
|
389
441
|
}
|
|
390
442
|
|
|
391
443
|
/** This is an object representing a node managed by Lightspark and owned by the current connected account. This object contains information about the node’s configuration, state, and metadata. **/
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
444
|
+
interface LightsparkNode {
|
|
445
|
+
/**
|
|
446
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
447
|
+
* string.
|
|
448
|
+
**/
|
|
449
|
+
id: string;
|
|
450
|
+
/** The date and time when the entity was first created. **/
|
|
451
|
+
createdAt: string;
|
|
452
|
+
/** The date and time when the entity was last updated. **/
|
|
453
|
+
updatedAt: string;
|
|
454
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
455
|
+
bitcoinNetwork: BitcoinNetwork;
|
|
456
|
+
/**
|
|
457
|
+
* The name of this node in the network. It will be the most human-readable option possible, depending
|
|
458
|
+
* on the data available for this node.
|
|
459
|
+
**/
|
|
460
|
+
displayName: string;
|
|
461
|
+
/** The owner of this LightsparkNode. **/
|
|
462
|
+
ownerId: string;
|
|
463
|
+
/**
|
|
464
|
+
* The utxos of the channels that are connected to this node. This is used in uma flow for
|
|
465
|
+
* pre-screening.
|
|
466
|
+
**/
|
|
467
|
+
umaPrescreeningUtxos: string[];
|
|
468
|
+
/** The typename of the object **/
|
|
469
|
+
typename: string;
|
|
470
|
+
/**
|
|
471
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is just a
|
|
472
|
+
* way to identify and search for commercial services or popular nodes. This alias can be changed at
|
|
473
|
+
* any time by the node operator.
|
|
474
|
+
**/
|
|
475
|
+
alias?: string | undefined;
|
|
476
|
+
/**
|
|
477
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
|
|
478
|
+
* has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
|
|
479
|
+
* That color can be changed at any time by the node operator.
|
|
480
|
+
**/
|
|
481
|
+
color?: string | undefined;
|
|
482
|
+
/**
|
|
483
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
484
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
485
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
486
|
+
**/
|
|
487
|
+
conductivity?: number | undefined;
|
|
488
|
+
/** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
|
|
489
|
+
publicKey?: string | undefined;
|
|
490
|
+
/** The current status of this node. **/
|
|
491
|
+
status?: LightsparkNodeStatus | undefined;
|
|
492
|
+
/**
|
|
493
|
+
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
|
|
494
|
+
*
|
|
495
|
+
* @deprecated Use `balances` instead.
|
|
496
|
+
**/
|
|
497
|
+
totalBalance?: CurrencyAmount | undefined;
|
|
498
|
+
/**
|
|
499
|
+
* The total sum of the channel balances (online and offline) on this node.
|
|
500
|
+
*
|
|
501
|
+
* @deprecated Use `balances` instead.
|
|
502
|
+
**/
|
|
503
|
+
totalLocalBalance?: CurrencyAmount | undefined;
|
|
504
|
+
/**
|
|
505
|
+
* The sum of the channel balances (online only) that are available to send on this node.
|
|
506
|
+
*
|
|
507
|
+
* @deprecated Use `balances` instead.
|
|
508
|
+
**/
|
|
509
|
+
localBalance?: CurrencyAmount | undefined;
|
|
510
|
+
/**
|
|
511
|
+
* The sum of the channel balances that are available to receive on this node.
|
|
512
|
+
*
|
|
513
|
+
* @deprecated Use `balances` instead.
|
|
514
|
+
**/
|
|
515
|
+
remoteBalance?: CurrencyAmount | undefined;
|
|
516
|
+
/**
|
|
517
|
+
* The details of the balance of this node on the Bitcoin Network.
|
|
518
|
+
*
|
|
519
|
+
* @deprecated Use `balances` instead.
|
|
520
|
+
**/
|
|
521
|
+
blockchainBalance?: BlockchainBalance | undefined;
|
|
522
|
+
/** The balances that describe the funds in this node. **/
|
|
523
|
+
balances?: Balances | undefined;
|
|
412
524
|
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
413
525
|
getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
414
|
-
static getLightsparkNodeQuery(id: string): Query<LightsparkNode>;
|
|
415
526
|
}
|
|
527
|
+
declare const getLightsparkNodeQuery: (id: string) => Query<LightsparkNode>;
|
|
416
528
|
|
|
417
529
|
/** A connection between an account and the nodes it manages. **/
|
|
418
|
-
|
|
530
|
+
interface AccountToNodesConnection {
|
|
419
531
|
/**
|
|
420
532
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
421
533
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -427,15 +539,15 @@ type AccountToNodesConnection = Connection & {
|
|
|
427
539
|
entities: LightsparkNode[];
|
|
428
540
|
/** The typename of the object **/
|
|
429
541
|
typename: string;
|
|
430
|
-
}
|
|
542
|
+
}
|
|
431
543
|
|
|
432
544
|
/** This object is an interface of a payment request on the Lightning Network (i.e., a Lightning Invoice). It contains data related to parsing the payment details of a Lightning Invoice. **/
|
|
433
|
-
|
|
545
|
+
interface PaymentRequestData {
|
|
434
546
|
encodedPaymentRequest: string;
|
|
435
547
|
bitcoinNetwork: BitcoinNetwork;
|
|
436
548
|
/** The typename of the object **/
|
|
437
549
|
typename: string;
|
|
438
|
-
}
|
|
550
|
+
}
|
|
439
551
|
|
|
440
552
|
/** This is an enum of the potential states that a payment request on the Lightning Network can take. **/
|
|
441
553
|
declare enum PaymentRequestStatus {
|
|
@@ -449,7 +561,7 @@ declare enum PaymentRequestStatus {
|
|
|
449
561
|
}
|
|
450
562
|
|
|
451
563
|
/** This object contains information related to a payment request generated or received by a LightsparkNode. You can retrieve this object to receive payment information about a specific invoice. **/
|
|
452
|
-
|
|
564
|
+
interface PaymentRequest {
|
|
453
565
|
/**
|
|
454
566
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
455
567
|
* string.
|
|
@@ -465,10 +577,10 @@ type PaymentRequest = Entity & {
|
|
|
465
577
|
status: PaymentRequestStatus;
|
|
466
578
|
/** The typename of the object **/
|
|
467
579
|
typename: string;
|
|
468
|
-
}
|
|
580
|
+
}
|
|
469
581
|
declare const getPaymentRequestQuery: (id: string) => Query<PaymentRequest>;
|
|
470
582
|
|
|
471
|
-
|
|
583
|
+
interface AccountToPaymentRequestsConnection {
|
|
472
584
|
/**
|
|
473
585
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
474
586
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -480,7 +592,7 @@ type AccountToPaymentRequestsConnection = Connection & {
|
|
|
480
592
|
entities: PaymentRequest[];
|
|
481
593
|
/** The typename of the object **/
|
|
482
594
|
typename: string;
|
|
483
|
-
}
|
|
595
|
+
}
|
|
484
596
|
|
|
485
597
|
/** This is an enum of the potential statuses a transaction associated with your Lightspark Node can take. **/
|
|
486
598
|
declare enum TransactionStatus {
|
|
@@ -504,7 +616,7 @@ declare enum TransactionStatus {
|
|
|
504
616
|
}
|
|
505
617
|
|
|
506
618
|
/** This object represents a payment transaction. The transaction can occur either on a Bitcoin Network, or over the Lightning Network. You can retrieve this object to receive specific information about a particular transaction tied to your Lightspark Node. **/
|
|
507
|
-
|
|
619
|
+
interface Transaction {
|
|
508
620
|
/**
|
|
509
621
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
510
622
|
* string.
|
|
@@ -521,13 +633,13 @@ type Transaction = Entity & {
|
|
|
521
633
|
/** The typename of the object **/
|
|
522
634
|
typename: string;
|
|
523
635
|
/** The date and time when this transaction was completed or failed. **/
|
|
524
|
-
resolvedAt?: string;
|
|
636
|
+
resolvedAt?: string | undefined;
|
|
525
637
|
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
526
|
-
transactionHash?: string;
|
|
527
|
-
}
|
|
638
|
+
transactionHash?: string | undefined;
|
|
639
|
+
}
|
|
528
640
|
declare const getTransactionQuery: (id: string) => Query<Transaction>;
|
|
529
641
|
|
|
530
|
-
|
|
642
|
+
interface AccountToTransactionsConnection {
|
|
531
643
|
/**
|
|
532
644
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
533
645
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -543,45 +655,21 @@ type AccountToTransactionsConnection = Connection & {
|
|
|
543
655
|
* Profit (or loss) generated by the transactions in this connection, with the set of filters and
|
|
544
656
|
* constraints provided.
|
|
545
657
|
**/
|
|
546
|
-
profitLoss?: CurrencyAmount;
|
|
658
|
+
profitLoss?: CurrencyAmount | undefined;
|
|
547
659
|
/**
|
|
548
660
|
* Average fee earned for the transactions in this connection, with the set of filters and constraints
|
|
549
661
|
* provided.
|
|
550
662
|
**/
|
|
551
|
-
averageFeeEarned?: CurrencyAmount;
|
|
663
|
+
averageFeeEarned?: CurrencyAmount | undefined;
|
|
552
664
|
/**
|
|
553
665
|
* Total amount transacted by the transactions in this connection, with the set of filters and
|
|
554
666
|
* constraints provided.
|
|
555
667
|
**/
|
|
556
|
-
totalAmountTransacted?: CurrencyAmount;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
/** This is an object representing the balance associated with your Lightspark account. You can retrieve this object to see your balance, which can be broken down into several different categorizations. **/
|
|
560
|
-
type Balances = {
|
|
561
|
-
/**
|
|
562
|
-
* This represents the balance that should be displayed when asked "how much do I own right now?". It
|
|
563
|
-
* represents the amount currently owned, including things that may not be owned soon (e.g. in-flight
|
|
564
|
-
* outgoing payments, in-flight withdrawals, commit fees, etc.). It really is a snapshot of what is
|
|
565
|
-
* officially owned at this instant.
|
|
566
|
-
**/
|
|
567
|
-
ownedBalance: CurrencyAmount;
|
|
568
|
-
/**
|
|
569
|
-
* This represents the balance that should be displayed when asked "how much can I send on Lightning
|
|
570
|
-
* right now?". It represents the amount currently available to be sent on the Lightning network. We
|
|
571
|
-
* remove from the balance all the funds that are temporarily locked (e.g. channel reserves).
|
|
572
|
-
**/
|
|
573
|
-
availableToSendBalance: CurrencyAmount;
|
|
574
|
-
/**
|
|
575
|
-
* This represents the balance that should be displayed when asked "how much money can I withdraw on
|
|
576
|
-
* the Bitcoin network right now?". It represents the amount currently available to withdraw and is
|
|
577
|
-
* usually equal to the `owned_balance` but it does not include in-flight operations (which would
|
|
578
|
-
* likely succeed and therefore likely make your withdrawal fail).
|
|
579
|
-
**/
|
|
580
|
-
availableToWithdrawBalance: CurrencyAmount;
|
|
581
|
-
};
|
|
668
|
+
totalAmountTransacted?: CurrencyAmount | undefined;
|
|
669
|
+
}
|
|
582
670
|
|
|
583
671
|
/** This is an object representing the owner of a LightsparkNode. **/
|
|
584
|
-
|
|
672
|
+
interface LightsparkNodeOwner {
|
|
585
673
|
/**
|
|
586
674
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
587
675
|
* string.
|
|
@@ -593,7 +681,7 @@ type LightsparkNodeOwner = Entity & {
|
|
|
593
681
|
updatedAt: string;
|
|
594
682
|
/** The typename of the object **/
|
|
595
683
|
typename: string;
|
|
596
|
-
}
|
|
684
|
+
}
|
|
597
685
|
declare const getLightsparkNodeOwnerQuery: (id: string) => Query<LightsparkNodeOwner>;
|
|
598
686
|
|
|
599
687
|
/** This is an enum of the potential statuses that your Lightspark wallet can take. **/
|
|
@@ -623,7 +711,7 @@ declare enum WalletStatus {
|
|
|
623
711
|
TERMINATED = "TERMINATED"
|
|
624
712
|
}
|
|
625
713
|
|
|
626
|
-
|
|
714
|
+
interface WalletToPaymentRequestsConnection {
|
|
627
715
|
/**
|
|
628
716
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
629
717
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -635,9 +723,9 @@ type WalletToPaymentRequestsConnection = Connection & {
|
|
|
635
723
|
entities: PaymentRequest[];
|
|
636
724
|
/** The typename of the object **/
|
|
637
725
|
typename: string;
|
|
638
|
-
}
|
|
726
|
+
}
|
|
639
727
|
|
|
640
|
-
|
|
728
|
+
interface WalletToTransactionsConnection {
|
|
641
729
|
/**
|
|
642
730
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
643
731
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -649,10 +737,10 @@ type WalletToTransactionsConnection = Connection & {
|
|
|
649
737
|
entities: Transaction[];
|
|
650
738
|
/** The typename of the object **/
|
|
651
739
|
typename: string;
|
|
652
|
-
}
|
|
740
|
+
}
|
|
653
741
|
|
|
654
742
|
/** This object represents a Lightspark Wallet, tied to your Lightspark account. Wallets can be used to send or receive funds over the Lightning Network. You can retrieve this object to receive information about a specific wallet tied to your Lightspark account. **/
|
|
655
|
-
declare class Wallet implements LightsparkNodeOwner {
|
|
743
|
+
declare class Wallet implements LightsparkNodeOwner, Entity {
|
|
656
744
|
readonly id: string;
|
|
657
745
|
readonly createdAt: string;
|
|
658
746
|
readonly updatedAt: string;
|
|
@@ -668,9 +756,22 @@ declare class Wallet implements LightsparkNodeOwner {
|
|
|
668
756
|
getTotalAmountReceived(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
|
|
669
757
|
getTotalAmountSent(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
|
|
670
758
|
static getWalletQuery(id: string): Query<Wallet>;
|
|
759
|
+
toJson(): {
|
|
760
|
+
__typename: string;
|
|
761
|
+
wallet_id: string;
|
|
762
|
+
wallet_created_at: string;
|
|
763
|
+
wallet_updated_at: string;
|
|
764
|
+
wallet_last_login_at: string | undefined;
|
|
765
|
+
wallet_balances: any;
|
|
766
|
+
wallet_third_party_identifier: string;
|
|
767
|
+
wallet_account: {
|
|
768
|
+
id: string | undefined;
|
|
769
|
+
};
|
|
770
|
+
wallet_status: WalletStatus;
|
|
771
|
+
};
|
|
671
772
|
}
|
|
672
773
|
|
|
673
|
-
|
|
774
|
+
interface AccountToWalletsConnection {
|
|
674
775
|
/**
|
|
675
776
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
676
777
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -682,7 +783,7 @@ type AccountToWalletsConnection = Connection & {
|
|
|
682
783
|
entities: Wallet[];
|
|
683
784
|
/** The typename of the object **/
|
|
684
785
|
typename: string;
|
|
685
|
-
}
|
|
786
|
+
}
|
|
686
787
|
|
|
687
788
|
/** This is an enum of the potential reasons why an OutgoingPayment sent from a Lightspark Node may have failed. **/
|
|
688
789
|
declare enum PaymentFailureReason {
|
|
@@ -716,13 +817,13 @@ declare enum RoutingTransactionFailureReason {
|
|
|
716
817
|
}
|
|
717
818
|
|
|
718
819
|
/** This object represents payment failures associated with your Lightspark Node. **/
|
|
719
|
-
|
|
720
|
-
paymentFailures?: PaymentFailureReason[];
|
|
721
|
-
routingTransactionFailures?: RoutingTransactionFailureReason[];
|
|
722
|
-
}
|
|
820
|
+
interface TransactionFailures {
|
|
821
|
+
paymentFailures?: PaymentFailureReason[] | undefined;
|
|
822
|
+
routingTransactionFailures?: RoutingTransactionFailureReason[] | undefined;
|
|
823
|
+
}
|
|
723
824
|
|
|
724
825
|
/** This is an object representing the connected Lightspark account. You can retrieve this object to see your account information and objects tied to your account. **/
|
|
725
|
-
declare class Account implements LightsparkNodeOwner {
|
|
826
|
+
declare class Account implements LightsparkNodeOwner, Entity {
|
|
726
827
|
readonly id: string;
|
|
727
828
|
readonly createdAt: string;
|
|
728
829
|
readonly updatedAt: string;
|
|
@@ -741,9 +842,16 @@ declare class Account implements LightsparkNodeOwner {
|
|
|
741
842
|
getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined): Promise<AccountToPaymentRequestsConnection>;
|
|
742
843
|
getWallets(client: LightsparkClient, first?: number | undefined, after?: string | undefined, thirdPartyIds?: string[] | undefined): Promise<AccountToWalletsConnection>;
|
|
743
844
|
static getAccountQuery(): Query<Account>;
|
|
845
|
+
toJson(): {
|
|
846
|
+
__typename: string;
|
|
847
|
+
account_id: string;
|
|
848
|
+
account_created_at: string;
|
|
849
|
+
account_updated_at: string;
|
|
850
|
+
account_name: string | undefined;
|
|
851
|
+
};
|
|
744
852
|
}
|
|
745
853
|
|
|
746
|
-
|
|
854
|
+
interface CreateApiTokenOutput {
|
|
747
855
|
/** The API Token that has been created. **/
|
|
748
856
|
apiToken: ApiToken;
|
|
749
857
|
/**
|
|
@@ -752,13 +860,13 @@ type CreateApiTokenOutput = {
|
|
|
752
860
|
* account.
|
|
753
861
|
**/
|
|
754
862
|
clientSecret: string;
|
|
755
|
-
}
|
|
863
|
+
}
|
|
756
864
|
|
|
757
865
|
/** This object represents the estimated L1 transaction fees for the Bitcoin network. Fee estimates are separated by potential confirmation speeds for settlement. **/
|
|
758
|
-
|
|
866
|
+
interface FeeEstimate {
|
|
759
867
|
feeFast: CurrencyAmount;
|
|
760
868
|
feeMin: CurrencyAmount;
|
|
761
|
-
}
|
|
869
|
+
}
|
|
762
870
|
|
|
763
871
|
/** This is an enum that enumerates all potential statuses for an incoming payment attempt. **/
|
|
764
872
|
declare enum IncomingPaymentAttemptStatus {
|
|
@@ -774,7 +882,7 @@ declare enum IncomingPaymentAttemptStatus {
|
|
|
774
882
|
}
|
|
775
883
|
|
|
776
884
|
/** This object represents any attempted payment sent to a Lightspark node on the Lightning Network. You can retrieve this object to receive payment related information about a specific incoming payment attempt. **/
|
|
777
|
-
|
|
885
|
+
interface IncomingPaymentAttempt {
|
|
778
886
|
/**
|
|
779
887
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
780
888
|
* string.
|
|
@@ -793,12 +901,12 @@ type IncomingPaymentAttempt = Entity & {
|
|
|
793
901
|
/** The typename of the object **/
|
|
794
902
|
typename: string;
|
|
795
903
|
/** The time the incoming payment attempt failed or succeeded. **/
|
|
796
|
-
resolvedAt?: string;
|
|
797
|
-
}
|
|
904
|
+
resolvedAt?: string | undefined;
|
|
905
|
+
}
|
|
798
906
|
declare const getIncomingPaymentAttemptQuery: (id: string) => Query<IncomingPaymentAttempt>;
|
|
799
907
|
|
|
800
908
|
/** The connection from incoming payment to all attempts. **/
|
|
801
|
-
|
|
909
|
+
interface IncomingPaymentToAttemptsConnection {
|
|
802
910
|
/**
|
|
803
911
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
804
912
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -810,10 +918,10 @@ type IncomingPaymentToAttemptsConnection = Connection & {
|
|
|
810
918
|
entities: IncomingPaymentAttempt[];
|
|
811
919
|
/** The typename of the object **/
|
|
812
920
|
typename: string;
|
|
813
|
-
}
|
|
921
|
+
}
|
|
814
922
|
|
|
815
923
|
/** This is an object representing a transaction made over the Lightning Network. You can retrieve this object to receive information about a specific transaction made over Lightning for a Lightspark node. **/
|
|
816
|
-
|
|
924
|
+
interface LightningTransaction {
|
|
817
925
|
/**
|
|
818
926
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
819
927
|
* string.
|
|
@@ -830,14 +938,14 @@ type LightningTransaction = Transaction & Entity & {
|
|
|
830
938
|
/** The typename of the object **/
|
|
831
939
|
typename: string;
|
|
832
940
|
/** The date and time when this transaction was completed or failed. **/
|
|
833
|
-
resolvedAt?: string;
|
|
941
|
+
resolvedAt?: string | undefined;
|
|
834
942
|
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
835
|
-
transactionHash?: string;
|
|
836
|
-
}
|
|
943
|
+
transactionHash?: string | undefined;
|
|
944
|
+
}
|
|
837
945
|
declare const getLightningTransactionQuery: (id: string) => Query<LightningTransaction>;
|
|
838
946
|
|
|
839
947
|
/** This object represents post-transaction data that could be used to register payment for KYT. **/
|
|
840
|
-
|
|
948
|
+
interface PostTransactionData {
|
|
841
949
|
/**
|
|
842
950
|
* The utxo of the channel over which the payment went through in the format of
|
|
843
951
|
* <transaction_hash>:<output_index>.
|
|
@@ -845,10 +953,10 @@ type PostTransactionData = {
|
|
|
845
953
|
utxo: string;
|
|
846
954
|
/** The amount of funds transferred in the payment. **/
|
|
847
955
|
amount: CurrencyAmount;
|
|
848
|
-
}
|
|
956
|
+
}
|
|
849
957
|
|
|
850
958
|
/** This object represents any payment sent to a Lightspark node on the Lightning Network. You can retrieve this object to receive payment related information about a specific payment received by a Lightspark node. **/
|
|
851
|
-
declare class IncomingPayment implements LightningTransaction {
|
|
959
|
+
declare class IncomingPayment implements LightningTransaction, Transaction, Entity {
|
|
852
960
|
readonly id: string;
|
|
853
961
|
readonly createdAt: string;
|
|
854
962
|
readonly updatedAt: string;
|
|
@@ -863,10 +971,71 @@ declare class IncomingPayment implements LightningTransaction {
|
|
|
863
971
|
constructor(id: string, createdAt: string, updatedAt: string, status: TransactionStatus, amount: CurrencyAmount, destinationId: string, typename: string, resolvedAt?: string | undefined, transactionHash?: string | undefined, paymentRequestId?: string | undefined, umaPostTransactionData?: PostTransactionData[] | undefined);
|
|
864
972
|
getAttempts(client: LightsparkClient, first?: number | undefined, statuses?: IncomingPaymentAttemptStatus[] | undefined, after?: string | undefined): Promise<IncomingPaymentToAttemptsConnection>;
|
|
865
973
|
static getIncomingPaymentQuery(id: string): Query<IncomingPayment>;
|
|
974
|
+
toJson(): {
|
|
975
|
+
__typename: string;
|
|
976
|
+
incoming_payment_id: string;
|
|
977
|
+
incoming_payment_created_at: string;
|
|
978
|
+
incoming_payment_updated_at: string;
|
|
979
|
+
incoming_payment_status: TransactionStatus;
|
|
980
|
+
incoming_payment_resolved_at: string | undefined;
|
|
981
|
+
incoming_payment_amount: any;
|
|
982
|
+
incoming_payment_transaction_hash: string | undefined;
|
|
983
|
+
incoming_payment_destination: {
|
|
984
|
+
id: string;
|
|
985
|
+
};
|
|
986
|
+
incoming_payment_payment_request: {
|
|
987
|
+
id: string | undefined;
|
|
988
|
+
};
|
|
989
|
+
incoming_payment_uma_post_transaction_data: any[] | undefined;
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
/** This object is an interface representing a Lightning Node on the Lightning Network, and could either be a Lightspark node or a node managed by a third party. **/
|
|
994
|
+
interface Node {
|
|
995
|
+
/**
|
|
996
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
997
|
+
* string.
|
|
998
|
+
**/
|
|
999
|
+
id: string;
|
|
1000
|
+
/** The date and time when the entity was first created. **/
|
|
1001
|
+
createdAt: string;
|
|
1002
|
+
/** The date and time when the entity was last updated. **/
|
|
1003
|
+
updatedAt: string;
|
|
1004
|
+
/** The Bitcoin Network this node is deployed in. **/
|
|
1005
|
+
bitcoinNetwork: BitcoinNetwork;
|
|
1006
|
+
/**
|
|
1007
|
+
* The name of this node in the network. It will be the most human-readable option possible, depending
|
|
1008
|
+
* on the data available for this node.
|
|
1009
|
+
**/
|
|
1010
|
+
displayName: string;
|
|
1011
|
+
/** The typename of the object **/
|
|
1012
|
+
typename: string;
|
|
1013
|
+
/**
|
|
1014
|
+
* A name that identifies the node. It has no importance in terms of operating the node, it is just a
|
|
1015
|
+
* way to identify and search for commercial services or popular nodes. This alias can be changed at
|
|
1016
|
+
* any time by the node operator.
|
|
1017
|
+
**/
|
|
1018
|
+
alias?: string | undefined;
|
|
1019
|
+
/**
|
|
1020
|
+
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
|
|
1021
|
+
* has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
|
|
1022
|
+
* That color can be changed at any time by the node operator.
|
|
1023
|
+
**/
|
|
1024
|
+
color?: string | undefined;
|
|
1025
|
+
/**
|
|
1026
|
+
* A summary metric used to capture how well positioned a node is to send, receive, or route
|
|
1027
|
+
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
|
|
1028
|
+
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
|
|
1029
|
+
**/
|
|
1030
|
+
conductivity?: number | undefined;
|
|
1031
|
+
/** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
|
|
1032
|
+
publicKey?: string | undefined;
|
|
1033
|
+
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
866
1034
|
}
|
|
1035
|
+
declare const getNodeQuery: (id: string) => Query<Node>;
|
|
867
1036
|
|
|
868
1037
|
/** This object represents the data associated with a BOLT #11 invoice. You can retrieve this object to receive the relevant data associated with a specific invoice. **/
|
|
869
|
-
|
|
1038
|
+
interface InvoiceData {
|
|
870
1039
|
encodedPaymentRequest: string;
|
|
871
1040
|
bitcoinNetwork: BitcoinNetwork;
|
|
872
1041
|
/** The payment hash of this invoice. **/
|
|
@@ -885,11 +1054,11 @@ type InvoiceData = PaymentRequestData & {
|
|
|
885
1054
|
/** The typename of the object **/
|
|
886
1055
|
typename: string;
|
|
887
1056
|
/** A short, UTF-8 encoded, description of the purpose of this invoice. **/
|
|
888
|
-
memo?: string;
|
|
889
|
-
}
|
|
1057
|
+
memo?: string | undefined;
|
|
1058
|
+
}
|
|
890
1059
|
|
|
891
1060
|
/** 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. **/
|
|
892
|
-
|
|
1061
|
+
interface Invoice {
|
|
893
1062
|
/**
|
|
894
1063
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
895
1064
|
* string.
|
|
@@ -906,8 +1075,8 @@ type Invoice = PaymentRequest & Entity & {
|
|
|
906
1075
|
/** The typename of the object **/
|
|
907
1076
|
typename: string;
|
|
908
1077
|
/** The total amount that has been paid to this invoice. **/
|
|
909
|
-
amountPaid?: CurrencyAmount;
|
|
910
|
-
}
|
|
1078
|
+
amountPaid?: CurrencyAmount | undefined;
|
|
1079
|
+
}
|
|
911
1080
|
declare const getInvoiceQuery: (id: string) => Query<Invoice>;
|
|
912
1081
|
|
|
913
1082
|
/** This is an enum for potential invoice types. **/
|
|
@@ -923,11 +1092,15 @@ declare enum InvoiceType {
|
|
|
923
1092
|
AMP = "AMP"
|
|
924
1093
|
}
|
|
925
1094
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1095
|
+
interface ChannelSnapshot {
|
|
1096
|
+
channelId: string;
|
|
1097
|
+
timestamp: string;
|
|
1098
|
+
localBalance?: CurrencyAmount | undefined;
|
|
1099
|
+
localUnsettledBalance?: CurrencyAmount | undefined;
|
|
1100
|
+
localChannelReserve?: CurrencyAmount | undefined;
|
|
1101
|
+
remoteBalance?: CurrencyAmount | undefined;
|
|
1102
|
+
remoteUnsettledBalance?: CurrencyAmount | undefined;
|
|
1103
|
+
}
|
|
931
1104
|
|
|
932
1105
|
/** This is an enum representing a particular reason why an htlc sent over the Lightning Network may have failed. **/
|
|
933
1106
|
declare enum HtlcAttemptFailureCode {
|
|
@@ -960,6 +1133,7 @@ declare enum HtlcAttemptFailureCode {
|
|
|
960
1133
|
EXPIRY_TOO_FAR = "EXPIRY_TOO_FAR",
|
|
961
1134
|
MPP_TIMEOUT = "MPP_TIMEOUT",
|
|
962
1135
|
INVALID_ONION_PAYLOAD = "INVALID_ONION_PAYLOAD",
|
|
1136
|
+
INVALID_ONION_BLINDING = "INVALID_ONION_BLINDING",
|
|
963
1137
|
INTERNAL_FAILURE = "INTERNAL_FAILURE",
|
|
964
1138
|
UNKNOWN_FAILURE = "UNKNOWN_FAILURE",
|
|
965
1139
|
UNREADABLE_FAILURE = "UNREADABLE_FAILURE"
|
|
@@ -978,7 +1152,7 @@ declare enum OutgoingPaymentAttemptStatus {
|
|
|
978
1152
|
}
|
|
979
1153
|
|
|
980
1154
|
/** This object represents a specific node that existed on a particular payment route. You can retrieve this object to get information about a node on a particular payment path and all payment-relevant information for that node. **/
|
|
981
|
-
|
|
1155
|
+
interface Hop {
|
|
982
1156
|
/**
|
|
983
1157
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
984
1158
|
* string.
|
|
@@ -993,20 +1167,20 @@ type Hop = Entity & {
|
|
|
993
1167
|
/** The typename of the object **/
|
|
994
1168
|
typename: string;
|
|
995
1169
|
/** The destination node of the hop. **/
|
|
996
|
-
destinationId?: string;
|
|
1170
|
+
destinationId?: string | undefined;
|
|
997
1171
|
/** The public key of the node to which the hop is bound. **/
|
|
998
|
-
publicKey?: string;
|
|
1172
|
+
publicKey?: string | undefined;
|
|
999
1173
|
/** The amount that is to be forwarded to the destination node. **/
|
|
1000
|
-
amountToForward?: CurrencyAmount;
|
|
1174
|
+
amountToForward?: CurrencyAmount | undefined;
|
|
1001
1175
|
/** The fees to be collected by the source node for forwarding the payment over the hop. **/
|
|
1002
|
-
fee?: CurrencyAmount;
|
|
1176
|
+
fee?: CurrencyAmount | undefined;
|
|
1003
1177
|
/** The block height at which an unsettled HTLC is considered expired. **/
|
|
1004
|
-
expiryBlockHeight?: number;
|
|
1005
|
-
}
|
|
1178
|
+
expiryBlockHeight?: number | undefined;
|
|
1179
|
+
}
|
|
1006
1180
|
declare const getHopQuery: (id: string) => Query<Hop>;
|
|
1007
1181
|
|
|
1008
1182
|
/** The connection from an outgoing payment attempt to the list of sequential hops that define the path from sender node to recipient node. **/
|
|
1009
|
-
|
|
1183
|
+
interface OutgoingPaymentAttemptToHopsConnection {
|
|
1010
1184
|
/**
|
|
1011
1185
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
1012
1186
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -1018,7 +1192,7 @@ type OutgoingPaymentAttemptToHopsConnection = Connection & {
|
|
|
1018
1192
|
entities: Hop[];
|
|
1019
1193
|
/** The typename of the object **/
|
|
1020
1194
|
typename: string;
|
|
1021
|
-
}
|
|
1195
|
+
}
|
|
1022
1196
|
|
|
1023
1197
|
/** This object represents an attempted Lightning Network payment sent from a Lightspark Node. You can retrieve this object to receive payment related information about any payment attempt sent from your Lightspark Node on the Lightning Network, including any potential reasons the payment may have failed. **/
|
|
1024
1198
|
declare class OutgoingPaymentAttempt implements Entity {
|
|
@@ -1037,10 +1211,26 @@ declare class OutgoingPaymentAttempt implements Entity {
|
|
|
1037
1211
|
constructor(id: string, createdAt: string, updatedAt: string, status: OutgoingPaymentAttemptStatus, outgoingPaymentId: string, typename: string, failureCode?: HtlcAttemptFailureCode | undefined, failureSourceIndex?: number | undefined, resolvedAt?: string | undefined, amount?: CurrencyAmount | undefined, fees?: CurrencyAmount | undefined, channelSnapshot?: ChannelSnapshot | undefined);
|
|
1038
1212
|
getHops(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentAttemptToHopsConnection>;
|
|
1039
1213
|
static getOutgoingPaymentAttemptQuery(id: string): Query<OutgoingPaymentAttempt>;
|
|
1214
|
+
toJson(): {
|
|
1215
|
+
__typename: string;
|
|
1216
|
+
outgoing_payment_attempt_id: string;
|
|
1217
|
+
outgoing_payment_attempt_created_at: string;
|
|
1218
|
+
outgoing_payment_attempt_updated_at: string;
|
|
1219
|
+
outgoing_payment_attempt_status: OutgoingPaymentAttemptStatus;
|
|
1220
|
+
outgoing_payment_attempt_failure_code: HtlcAttemptFailureCode | undefined;
|
|
1221
|
+
outgoing_payment_attempt_failure_source_index: number | undefined;
|
|
1222
|
+
outgoing_payment_attempt_resolved_at: string | undefined;
|
|
1223
|
+
outgoing_payment_attempt_amount: any;
|
|
1224
|
+
outgoing_payment_attempt_fees: any;
|
|
1225
|
+
outgoing_payment_attempt_outgoing_payment: {
|
|
1226
|
+
id: string;
|
|
1227
|
+
};
|
|
1228
|
+
outgoing_payment_attempt_channel_snapshot: any;
|
|
1229
|
+
};
|
|
1040
1230
|
}
|
|
1041
1231
|
|
|
1042
1232
|
/** The connection from outgoing payment to all attempts. **/
|
|
1043
|
-
|
|
1233
|
+
interface OutgoingPaymentToAttemptsConnection {
|
|
1044
1234
|
/**
|
|
1045
1235
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
1046
1236
|
* number of objects returned in the current page (in the `entities` field).
|
|
@@ -1052,14 +1242,14 @@ type OutgoingPaymentToAttemptsConnection = Connection & {
|
|
|
1052
1242
|
entities: OutgoingPaymentAttempt[];
|
|
1053
1243
|
/** The typename of the object **/
|
|
1054
1244
|
typename: string;
|
|
1055
|
-
}
|
|
1245
|
+
}
|
|
1056
1246
|
|
|
1057
|
-
|
|
1247
|
+
interface RichText {
|
|
1058
1248
|
text: string;
|
|
1059
|
-
}
|
|
1249
|
+
}
|
|
1060
1250
|
|
|
1061
1251
|
/** This object represents a Lightning Network payment sent from a Lightspark Node. You can retrieve this object to receive payment related information about any payment sent from your Lightspark Node on the Lightning Network. **/
|
|
1062
|
-
declare class OutgoingPayment implements LightningTransaction {
|
|
1252
|
+
declare class OutgoingPayment implements LightningTransaction, Transaction, Entity {
|
|
1063
1253
|
readonly id: string;
|
|
1064
1254
|
readonly createdAt: string;
|
|
1065
1255
|
readonly updatedAt: string;
|
|
@@ -1079,6 +1269,28 @@ declare class OutgoingPayment implements LightningTransaction {
|
|
|
1079
1269
|
constructor(id: string, createdAt: string, updatedAt: string, status: TransactionStatus, amount: CurrencyAmount, originId: string, typename: string, resolvedAt?: string | undefined, transactionHash?: string | undefined, destinationId?: string | undefined, fees?: CurrencyAmount | undefined, paymentRequestData?: PaymentRequestData | undefined, failureReason?: PaymentFailureReason | undefined, failureMessage?: RichText | undefined, umaPostTransactionData?: PostTransactionData[] | undefined, paymentPreimage?: string | undefined);
|
|
1080
1270
|
getAttempts(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentToAttemptsConnection>;
|
|
1081
1271
|
static getOutgoingPaymentQuery(id: string): Query<OutgoingPayment>;
|
|
1272
|
+
toJson(): {
|
|
1273
|
+
__typename: string;
|
|
1274
|
+
outgoing_payment_id: string;
|
|
1275
|
+
outgoing_payment_created_at: string;
|
|
1276
|
+
outgoing_payment_updated_at: string;
|
|
1277
|
+
outgoing_payment_status: TransactionStatus;
|
|
1278
|
+
outgoing_payment_resolved_at: string | undefined;
|
|
1279
|
+
outgoing_payment_amount: any;
|
|
1280
|
+
outgoing_payment_transaction_hash: string | undefined;
|
|
1281
|
+
outgoing_payment_origin: {
|
|
1282
|
+
id: string;
|
|
1283
|
+
};
|
|
1284
|
+
outgoing_payment_destination: {
|
|
1285
|
+
id: string | undefined;
|
|
1286
|
+
};
|
|
1287
|
+
outgoing_payment_fees: any;
|
|
1288
|
+
outgoing_payment_payment_request_data: any;
|
|
1289
|
+
outgoing_payment_failure_reason: PaymentFailureReason | undefined;
|
|
1290
|
+
outgoing_payment_failure_message: any;
|
|
1291
|
+
outgoing_payment_uma_post_transaction_data: any[] | undefined;
|
|
1292
|
+
outgoing_payment_payment_preimage: string | undefined;
|
|
1293
|
+
};
|
|
1082
1294
|
}
|
|
1083
1295
|
|
|
1084
1296
|
type SingleNodeDashboard = {
|
|
@@ -1150,51 +1362,8 @@ declare enum WithdrawalRequestStatus {
|
|
|
1150
1362
|
SUCCESSFUL = "SUCCESSFUL"
|
|
1151
1363
|
}
|
|
1152
1364
|
|
|
1153
|
-
/** This object represents an L1 transaction that occurred on the Bitcoin Network. You can retrieve this object to receive information about a specific on-chain transaction made on the Lightning Network associated with your Lightspark Node. **/
|
|
1154
|
-
type OnChainTransaction = Transaction & Entity & {
|
|
1155
|
-
/**
|
|
1156
|
-
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
1157
|
-
* string.
|
|
1158
|
-
**/
|
|
1159
|
-
id: string;
|
|
1160
|
-
/** The date and time when this transaction was initiated. **/
|
|
1161
|
-
createdAt: string;
|
|
1162
|
-
/** The date and time when the entity was last updated. **/
|
|
1163
|
-
updatedAt: string;
|
|
1164
|
-
/** The current status of this transaction. **/
|
|
1165
|
-
status: TransactionStatus;
|
|
1166
|
-
/** The amount of money involved in this transaction. **/
|
|
1167
|
-
amount: CurrencyAmount;
|
|
1168
|
-
/**
|
|
1169
|
-
* The height of the block that included this transaction. This will be zero for unconfirmed
|
|
1170
|
-
* transactions.
|
|
1171
|
-
**/
|
|
1172
|
-
blockHeight: number;
|
|
1173
|
-
/** The Bitcoin blockchain addresses this transaction was sent to. **/
|
|
1174
|
-
destinationAddresses: string[];
|
|
1175
|
-
/** The typename of the object **/
|
|
1176
|
-
typename: string;
|
|
1177
|
-
/** The date and time when this transaction was completed or failed. **/
|
|
1178
|
-
resolvedAt?: string;
|
|
1179
|
-
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1180
|
-
transactionHash?: string;
|
|
1181
|
-
/**
|
|
1182
|
-
* The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
|
|
1183
|
-
* blockchain.
|
|
1184
|
-
**/
|
|
1185
|
-
fees?: CurrencyAmount;
|
|
1186
|
-
/**
|
|
1187
|
-
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
1188
|
-
* transactions.
|
|
1189
|
-
**/
|
|
1190
|
-
blockHash?: string;
|
|
1191
|
-
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
1192
|
-
numConfirmations?: number;
|
|
1193
|
-
};
|
|
1194
|
-
declare const getOnChainTransactionQuery: (id: string) => Query<OnChainTransaction>;
|
|
1195
|
-
|
|
1196
1365
|
/** This is an object representing a transaction which closes a channel on the Lightning Network. This operation allocates balances back to the local and remote nodes. **/
|
|
1197
|
-
|
|
1366
|
+
interface ChannelClosingTransaction {
|
|
1198
1367
|
/**
|
|
1199
1368
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
1200
1369
|
* string.
|
|
@@ -1218,27 +1387,27 @@ type ChannelClosingTransaction = OnChainTransaction & Transaction & Entity & {
|
|
|
1218
1387
|
/** The typename of the object **/
|
|
1219
1388
|
typename: string;
|
|
1220
1389
|
/** The date and time when this transaction was completed or failed. **/
|
|
1221
|
-
resolvedAt?: string;
|
|
1390
|
+
resolvedAt?: string | undefined;
|
|
1222
1391
|
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1223
|
-
transactionHash?: string;
|
|
1392
|
+
transactionHash?: string | undefined;
|
|
1224
1393
|
/**
|
|
1225
1394
|
* The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
|
|
1226
1395
|
* blockchain.
|
|
1227
1396
|
**/
|
|
1228
|
-
fees?: CurrencyAmount;
|
|
1397
|
+
fees?: CurrencyAmount | undefined;
|
|
1229
1398
|
/**
|
|
1230
1399
|
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
1231
1400
|
* transactions.
|
|
1232
1401
|
**/
|
|
1233
|
-
blockHash?: string;
|
|
1402
|
+
blockHash?: string | undefined;
|
|
1234
1403
|
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
1235
|
-
numConfirmations?: number;
|
|
1404
|
+
numConfirmations?: number | undefined;
|
|
1236
1405
|
/** If known, the channel this transaction is closing. **/
|
|
1237
|
-
channelId?: string;
|
|
1238
|
-
}
|
|
1406
|
+
channelId?: string | undefined;
|
|
1407
|
+
}
|
|
1239
1408
|
declare const getChannelClosingTransactionQuery: (id: string) => Query<ChannelClosingTransaction>;
|
|
1240
1409
|
|
|
1241
|
-
|
|
1410
|
+
interface WithdrawalRequestToChannelClosingTransactionsConnection {
|
|
1242
1411
|
/** An object that holds pagination information about the objects in this connection. **/
|
|
1243
1412
|
pageInfo: PageInfo;
|
|
1244
1413
|
/**
|
|
@@ -1248,10 +1417,10 @@ type WithdrawalRequestToChannelClosingTransactionsConnection = {
|
|
|
1248
1417
|
count: number;
|
|
1249
1418
|
/** The channel closing transactions for the current page of this connection. **/
|
|
1250
1419
|
entities: ChannelClosingTransaction[];
|
|
1251
|
-
}
|
|
1420
|
+
}
|
|
1252
1421
|
|
|
1253
1422
|
/** This is an object representing a transaction which opens a channel on the Lightning Network. This object occurs only for channels funded by the local Lightspark node. **/
|
|
1254
|
-
|
|
1423
|
+
interface ChannelOpeningTransaction {
|
|
1255
1424
|
/**
|
|
1256
1425
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
1257
1426
|
* string.
|
|
@@ -1275,27 +1444,27 @@ type ChannelOpeningTransaction = OnChainTransaction & Transaction & Entity & {
|
|
|
1275
1444
|
/** The typename of the object **/
|
|
1276
1445
|
typename: string;
|
|
1277
1446
|
/** The date and time when this transaction was completed or failed. **/
|
|
1278
|
-
resolvedAt?: string;
|
|
1447
|
+
resolvedAt?: string | undefined;
|
|
1279
1448
|
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1280
|
-
transactionHash?: string;
|
|
1449
|
+
transactionHash?: string | undefined;
|
|
1281
1450
|
/**
|
|
1282
1451
|
* The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
|
|
1283
1452
|
* blockchain.
|
|
1284
1453
|
**/
|
|
1285
|
-
fees?: CurrencyAmount;
|
|
1454
|
+
fees?: CurrencyAmount | undefined;
|
|
1286
1455
|
/**
|
|
1287
1456
|
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
1288
1457
|
* transactions.
|
|
1289
1458
|
**/
|
|
1290
|
-
blockHash?: string;
|
|
1459
|
+
blockHash?: string | undefined;
|
|
1291
1460
|
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
1292
|
-
numConfirmations?: number;
|
|
1461
|
+
numConfirmations?: number | undefined;
|
|
1293
1462
|
/** If known, the channel this transaction is opening. **/
|
|
1294
|
-
channelId?: string;
|
|
1295
|
-
}
|
|
1463
|
+
channelId?: string | undefined;
|
|
1464
|
+
}
|
|
1296
1465
|
declare const getChannelOpeningTransactionQuery: (id: string) => Query<ChannelOpeningTransaction>;
|
|
1297
1466
|
|
|
1298
|
-
|
|
1467
|
+
interface WithdrawalRequestToChannelOpeningTransactionsConnection {
|
|
1299
1468
|
/** An object that holds pagination information about the objects in this connection. **/
|
|
1300
1469
|
pageInfo: PageInfo;
|
|
1301
1470
|
/**
|
|
@@ -1305,7 +1474,7 @@ type WithdrawalRequestToChannelOpeningTransactionsConnection = {
|
|
|
1305
1474
|
count: number;
|
|
1306
1475
|
/** The channel opening transactions for the current page of this connection. **/
|
|
1307
1476
|
entities: ChannelOpeningTransaction[];
|
|
1308
|
-
}
|
|
1477
|
+
}
|
|
1309
1478
|
|
|
1310
1479
|
/** This object represents a request made for an L1 withdrawal from your Lightspark Node to any Bitcoin wallet. You can retrieve this object to receive detailed information about any withdrawal request made from your Lightspark account. **/
|
|
1311
1480
|
declare class WithdrawalRequest implements Entity {
|
|
@@ -1324,6 +1493,21 @@ declare class WithdrawalRequest implements Entity {
|
|
|
1324
1493
|
getChannelClosingTransactions(client: LightsparkClient, first?: number | undefined): Promise<WithdrawalRequestToChannelClosingTransactionsConnection>;
|
|
1325
1494
|
getChannelOpeningTransactions(client: LightsparkClient, first?: number | undefined): Promise<WithdrawalRequestToChannelOpeningTransactionsConnection>;
|
|
1326
1495
|
static getWithdrawalRequestQuery(id: string): Query<WithdrawalRequest>;
|
|
1496
|
+
toJson(): {
|
|
1497
|
+
__typename: string;
|
|
1498
|
+
withdrawal_request_id: string;
|
|
1499
|
+
withdrawal_request_created_at: string;
|
|
1500
|
+
withdrawal_request_updated_at: string;
|
|
1501
|
+
withdrawal_request_amount: any;
|
|
1502
|
+
withdrawal_request_estimated_amount: any;
|
|
1503
|
+
withdrawal_request_bitcoin_address: string;
|
|
1504
|
+
withdrawal_request_withdrawal_mode: WithdrawalMode;
|
|
1505
|
+
withdrawal_request_status: WithdrawalRequestStatus;
|
|
1506
|
+
withdrawal_request_completed_at: string | undefined;
|
|
1507
|
+
withdrawal_request_withdrawal: {
|
|
1508
|
+
id: string | undefined;
|
|
1509
|
+
};
|
|
1510
|
+
};
|
|
1327
1511
|
}
|
|
1328
1512
|
|
|
1329
1513
|
/**
|
|
@@ -1697,29 +1881,41 @@ declare enum ComplianceProvider {
|
|
|
1697
1881
|
CHAINALYSIS = "CHAINALYSIS"
|
|
1698
1882
|
}
|
|
1699
1883
|
|
|
1700
|
-
|
|
1884
|
+
interface Connection {
|
|
1885
|
+
/**
|
|
1886
|
+
* The total count of objects in this connection, using the current filters. It is different from the
|
|
1887
|
+
* number of objects returned in the current page (in the `entities` field).
|
|
1888
|
+
**/
|
|
1889
|
+
count: number;
|
|
1890
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1891
|
+
pageInfo: PageInfo;
|
|
1892
|
+
/** The typename of the object **/
|
|
1893
|
+
typename: string;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
interface CreateApiTokenInput {
|
|
1701
1897
|
/** An arbitrary name that the user can choose to identify the API token in a list. **/
|
|
1702
1898
|
name: string;
|
|
1703
1899
|
/** List of permissions to grant to the API token **/
|
|
1704
1900
|
permissions: Permission[];
|
|
1705
|
-
}
|
|
1901
|
+
}
|
|
1706
1902
|
|
|
1707
|
-
|
|
1903
|
+
interface CreateInvoiceInput {
|
|
1708
1904
|
/** The node from which to create the invoice. **/
|
|
1709
1905
|
nodeId: string;
|
|
1710
1906
|
/** The amount for which the invoice should be created, in millisatoshis. **/
|
|
1711
1907
|
amountMsats: number;
|
|
1712
|
-
memo?: string;
|
|
1713
|
-
invoiceType?: InvoiceType;
|
|
1908
|
+
memo?: string | undefined;
|
|
1909
|
+
invoiceType?: InvoiceType | undefined;
|
|
1714
1910
|
/** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
|
|
1715
|
-
expirySecs?: number;
|
|
1716
|
-
}
|
|
1911
|
+
expirySecs?: number | undefined;
|
|
1912
|
+
}
|
|
1717
1913
|
|
|
1718
|
-
|
|
1914
|
+
interface CreateInvoiceOutput {
|
|
1719
1915
|
invoiceId: string;
|
|
1720
|
-
}
|
|
1916
|
+
}
|
|
1721
1917
|
|
|
1722
|
-
|
|
1918
|
+
interface CreateLnurlInvoiceInput {
|
|
1723
1919
|
/** The node from which to create the invoice. **/
|
|
1724
1920
|
nodeId: string;
|
|
1725
1921
|
/** The amount for which the invoice should be created, in millisatoshis. **/
|
|
@@ -1730,30 +1926,30 @@ type CreateLnurlInvoiceInput = {
|
|
|
1730
1926
|
**/
|
|
1731
1927
|
metadataHash: string;
|
|
1732
1928
|
/** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
|
|
1733
|
-
expirySecs?: number;
|
|
1734
|
-
}
|
|
1929
|
+
expirySecs?: number | undefined;
|
|
1930
|
+
}
|
|
1735
1931
|
|
|
1736
|
-
|
|
1932
|
+
interface CreateNodeWalletAddressInput {
|
|
1737
1933
|
nodeId: string;
|
|
1738
|
-
}
|
|
1934
|
+
}
|
|
1739
1935
|
|
|
1740
|
-
|
|
1936
|
+
interface CreateNodeWalletAddressOutput {
|
|
1741
1937
|
nodeId: string;
|
|
1742
1938
|
walletAddress: string;
|
|
1743
|
-
}
|
|
1939
|
+
}
|
|
1744
1940
|
|
|
1745
|
-
|
|
1941
|
+
interface CreateTestModeInvoiceInput {
|
|
1746
1942
|
localNodeId: string;
|
|
1747
1943
|
amountMsats: number;
|
|
1748
|
-
memo?: string;
|
|
1749
|
-
invoiceType?: InvoiceType;
|
|
1750
|
-
}
|
|
1944
|
+
memo?: string | undefined;
|
|
1945
|
+
invoiceType?: InvoiceType | undefined;
|
|
1946
|
+
}
|
|
1751
1947
|
|
|
1752
|
-
|
|
1948
|
+
interface CreateTestModeInvoiceOutput {
|
|
1753
1949
|
encodedPaymentRequest: string;
|
|
1754
|
-
}
|
|
1950
|
+
}
|
|
1755
1951
|
|
|
1756
|
-
|
|
1952
|
+
interface CreateTestModePaymentInput {
|
|
1757
1953
|
/** The node to where you want to send the payment. **/
|
|
1758
1954
|
localNodeId: string;
|
|
1759
1955
|
/** The invoice you want to be paid (as defined by the BOLT11 standard). **/
|
|
@@ -1762,11 +1958,11 @@ type CreateTestModePaymentInput = {
|
|
|
1762
1958
|
* The amount you will be paid for this invoice, expressed in msats. It should ONLY be set when the
|
|
1763
1959
|
* invoice amount is zero.
|
|
1764
1960
|
**/
|
|
1765
|
-
amountMsats?: number;
|
|
1766
|
-
}
|
|
1961
|
+
amountMsats?: number | undefined;
|
|
1962
|
+
}
|
|
1767
1963
|
|
|
1768
1964
|
/** This is an object identifying the output of a test mode payment. This object can be used to retrieve the associated payment made from a Test Mode Payment call. **/
|
|
1769
|
-
|
|
1965
|
+
interface CreateTestModePaymentoutput {
|
|
1770
1966
|
/**
|
|
1771
1967
|
* The payment that has been sent.
|
|
1772
1968
|
*
|
|
@@ -1775,19 +1971,19 @@ type CreateTestModePaymentoutput = {
|
|
|
1775
1971
|
paymentId: string;
|
|
1776
1972
|
/** The payment that has been received. **/
|
|
1777
1973
|
incomingPaymentId: string;
|
|
1778
|
-
}
|
|
1974
|
+
}
|
|
1779
1975
|
|
|
1780
|
-
|
|
1976
|
+
interface CreateUmaInvoiceInput {
|
|
1781
1977
|
nodeId: string;
|
|
1782
1978
|
amountMsats: number;
|
|
1783
1979
|
metadataHash: string;
|
|
1784
|
-
expirySecs?: number;
|
|
1785
|
-
}
|
|
1980
|
+
expirySecs?: number | undefined;
|
|
1981
|
+
}
|
|
1786
1982
|
|
|
1787
|
-
|
|
1983
|
+
interface DeclineToSignMessagesInput {
|
|
1788
1984
|
/** List of payload ids to decline to sign because validation failed. **/
|
|
1789
1985
|
payloadIds: string[];
|
|
1790
|
-
}
|
|
1986
|
+
}
|
|
1791
1987
|
|
|
1792
1988
|
declare enum SignablePayloadStatus {
|
|
1793
1989
|
/**
|
|
@@ -1801,7 +1997,7 @@ declare enum SignablePayloadStatus {
|
|
|
1801
1997
|
INVALID_SIGNATURE = "INVALID_SIGNATURE"
|
|
1802
1998
|
}
|
|
1803
1999
|
|
|
1804
|
-
|
|
2000
|
+
interface SignablePayload {
|
|
1805
2001
|
/**
|
|
1806
2002
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
1807
2003
|
* string.
|
|
@@ -1822,26 +2018,26 @@ type SignablePayload = Entity & {
|
|
|
1822
2018
|
/** The typename of the object **/
|
|
1823
2019
|
typename: string;
|
|
1824
2020
|
/** The tweak value to add. **/
|
|
1825
|
-
addTweak?: string;
|
|
2021
|
+
addTweak?: string | undefined;
|
|
1826
2022
|
/** The tweak value to multiply. **/
|
|
1827
|
-
mulTweak?: string;
|
|
1828
|
-
}
|
|
2023
|
+
mulTweak?: string | undefined;
|
|
2024
|
+
}
|
|
1829
2025
|
declare const getSignablePayloadQuery: (id: string) => Query<SignablePayload>;
|
|
1830
2026
|
|
|
1831
|
-
|
|
2027
|
+
interface DeclineToSignMessagesOutput {
|
|
1832
2028
|
declinedPayloads: SignablePayload[];
|
|
1833
|
-
}
|
|
2029
|
+
}
|
|
1834
2030
|
|
|
1835
|
-
|
|
2031
|
+
interface DeleteApiTokenInput {
|
|
1836
2032
|
apiTokenId: string;
|
|
1837
|
-
}
|
|
2033
|
+
}
|
|
1838
2034
|
|
|
1839
|
-
|
|
2035
|
+
interface DeleteApiTokenOutput {
|
|
1840
2036
|
accountId: string;
|
|
1841
|
-
}
|
|
2037
|
+
}
|
|
1842
2038
|
|
|
1843
2039
|
/** This object represents a Deposit made to a Lightspark node wallet. This operation occurs for any L1 funding transaction to the wallet. You can retrieve this object to receive detailed information about the deposit. **/
|
|
1844
|
-
|
|
2040
|
+
interface Deposit {
|
|
1845
2041
|
/**
|
|
1846
2042
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
1847
2043
|
* string.
|
|
@@ -1867,35 +2063,35 @@ type Deposit = OnChainTransaction & Transaction & Entity & {
|
|
|
1867
2063
|
/** The typename of the object **/
|
|
1868
2064
|
typename: string;
|
|
1869
2065
|
/** The date and time when this transaction was completed or failed. **/
|
|
1870
|
-
resolvedAt?: string;
|
|
2066
|
+
resolvedAt?: string | undefined;
|
|
1871
2067
|
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
1872
|
-
transactionHash?: string;
|
|
2068
|
+
transactionHash?: string | undefined;
|
|
1873
2069
|
/**
|
|
1874
2070
|
* The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
|
|
1875
2071
|
* blockchain.
|
|
1876
2072
|
**/
|
|
1877
|
-
fees?: CurrencyAmount;
|
|
2073
|
+
fees?: CurrencyAmount | undefined;
|
|
1878
2074
|
/**
|
|
1879
2075
|
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
1880
2076
|
* transactions.
|
|
1881
2077
|
**/
|
|
1882
|
-
blockHash?: string;
|
|
2078
|
+
blockHash?: string | undefined;
|
|
1883
2079
|
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
1884
|
-
numConfirmations?: number;
|
|
1885
|
-
}
|
|
2080
|
+
numConfirmations?: number | undefined;
|
|
2081
|
+
}
|
|
1886
2082
|
declare const getDepositQuery: (id: string) => Query<Deposit>;
|
|
1887
2083
|
|
|
1888
|
-
|
|
2084
|
+
interface FundNodeInput {
|
|
1889
2085
|
nodeId: string;
|
|
1890
|
-
amountSats?: number;
|
|
1891
|
-
}
|
|
2086
|
+
amountSats?: number | undefined;
|
|
2087
|
+
}
|
|
1892
2088
|
|
|
1893
|
-
|
|
2089
|
+
interface FundNodeOutput {
|
|
1894
2090
|
amount: CurrencyAmount;
|
|
1895
|
-
}
|
|
2091
|
+
}
|
|
1896
2092
|
|
|
1897
2093
|
/** This object represents a node that exists on the Lightning Network, including nodes not managed by Lightspark. You can retrieve this object to get publicly available information about any node on the Lightning Network. **/
|
|
1898
|
-
declare class GraphNode implements Node {
|
|
2094
|
+
declare class GraphNode implements Node, Entity {
|
|
1899
2095
|
readonly id: string;
|
|
1900
2096
|
readonly createdAt: string;
|
|
1901
2097
|
readonly updatedAt: string;
|
|
@@ -1909,16 +2105,28 @@ declare class GraphNode implements Node {
|
|
|
1909
2105
|
constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined);
|
|
1910
2106
|
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
1911
2107
|
static getGraphNodeQuery(id: string): Query<GraphNode>;
|
|
2108
|
+
toJson(): {
|
|
2109
|
+
__typename: string;
|
|
2110
|
+
graph_node_id: string;
|
|
2111
|
+
graph_node_created_at: string;
|
|
2112
|
+
graph_node_updated_at: string;
|
|
2113
|
+
graph_node_alias: string | undefined;
|
|
2114
|
+
graph_node_bitcoin_network: BitcoinNetwork;
|
|
2115
|
+
graph_node_color: string | undefined;
|
|
2116
|
+
graph_node_conductivity: number | undefined;
|
|
2117
|
+
graph_node_display_name: string;
|
|
2118
|
+
graph_node_public_key: string | undefined;
|
|
2119
|
+
};
|
|
1912
2120
|
}
|
|
1913
2121
|
|
|
1914
|
-
|
|
2122
|
+
interface IdAndSignature {
|
|
1915
2123
|
/** The id of the message. **/
|
|
1916
2124
|
id: string;
|
|
1917
2125
|
/** The signature of the message. **/
|
|
1918
2126
|
signature: string;
|
|
1919
|
-
}
|
|
2127
|
+
}
|
|
1920
2128
|
|
|
1921
|
-
|
|
2129
|
+
interface LightningFeeEstimateForInvoiceInput {
|
|
1922
2130
|
/** The node from where you want to send the payment. **/
|
|
1923
2131
|
nodeId: string;
|
|
1924
2132
|
/** The invoice you want to pay (as defined by the BOLT11 standard). **/
|
|
@@ -1927,30 +2135,30 @@ type LightningFeeEstimateForInvoiceInput = {
|
|
|
1927
2135
|
* If the invoice does not specify a payment amount, then the amount that you wish to pay, expressed
|
|
1928
2136
|
* in msats.
|
|
1929
2137
|
**/
|
|
1930
|
-
amountMsats?: number;
|
|
1931
|
-
}
|
|
2138
|
+
amountMsats?: number | undefined;
|
|
2139
|
+
}
|
|
1932
2140
|
|
|
1933
|
-
|
|
2141
|
+
interface LightningFeeEstimateForNodeInput {
|
|
1934
2142
|
/** The node from where you want to send the payment. **/
|
|
1935
2143
|
nodeId: string;
|
|
1936
2144
|
/** The public key of the node that you want to pay. **/
|
|
1937
2145
|
destinationNodePublicKey: string;
|
|
1938
2146
|
/** The payment amount expressed in msats. **/
|
|
1939
2147
|
amountMsats: number;
|
|
1940
|
-
}
|
|
2148
|
+
}
|
|
1941
2149
|
|
|
1942
|
-
|
|
2150
|
+
interface LightningFeeEstimateOutput {
|
|
1943
2151
|
/** The estimated fees for the payment. **/
|
|
1944
2152
|
feeEstimate: CurrencyAmount;
|
|
1945
|
-
}
|
|
2153
|
+
}
|
|
1946
2154
|
|
|
1947
|
-
|
|
2155
|
+
interface Secret {
|
|
1948
2156
|
encryptedValue: string;
|
|
1949
2157
|
cipher: string;
|
|
1950
|
-
}
|
|
2158
|
+
}
|
|
1951
2159
|
|
|
1952
2160
|
/** This is a Lightspark node with OSK. **/
|
|
1953
|
-
declare class LightsparkNodeWithOSK implements LightsparkNode {
|
|
2161
|
+
declare class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
|
|
1954
2162
|
readonly id: string;
|
|
1955
2163
|
readonly createdAt: string;
|
|
1956
2164
|
readonly updatedAt: string;
|
|
@@ -1969,15 +2177,40 @@ declare class LightsparkNodeWithOSK implements LightsparkNode {
|
|
|
1969
2177
|
readonly localBalance?: CurrencyAmount | undefined;
|
|
1970
2178
|
readonly remoteBalance?: CurrencyAmount | undefined;
|
|
1971
2179
|
readonly blockchainBalance?: BlockchainBalance | undefined;
|
|
2180
|
+
readonly balances?: Balances | undefined;
|
|
1972
2181
|
readonly encryptedSigningPrivateKey?: Secret | undefined;
|
|
1973
|
-
constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, encryptedSigningPrivateKey?: Secret | undefined);
|
|
2182
|
+
constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined, encryptedSigningPrivateKey?: Secret | undefined);
|
|
1974
2183
|
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
1975
2184
|
getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
1976
2185
|
static getLightsparkNodeWithOSKQuery(id: string): Query<LightsparkNodeWithOSK>;
|
|
2186
|
+
toJson(): {
|
|
2187
|
+
__typename: string;
|
|
2188
|
+
lightspark_node_with_o_s_k_id: string;
|
|
2189
|
+
lightspark_node_with_o_s_k_created_at: string;
|
|
2190
|
+
lightspark_node_with_o_s_k_updated_at: string;
|
|
2191
|
+
lightspark_node_with_o_s_k_alias: string | undefined;
|
|
2192
|
+
lightspark_node_with_o_s_k_bitcoin_network: BitcoinNetwork;
|
|
2193
|
+
lightspark_node_with_o_s_k_color: string | undefined;
|
|
2194
|
+
lightspark_node_with_o_s_k_conductivity: number | undefined;
|
|
2195
|
+
lightspark_node_with_o_s_k_display_name: string;
|
|
2196
|
+
lightspark_node_with_o_s_k_public_key: string | undefined;
|
|
2197
|
+
lightspark_node_with_o_s_k_owner: {
|
|
2198
|
+
id: string;
|
|
2199
|
+
};
|
|
2200
|
+
lightspark_node_with_o_s_k_status: LightsparkNodeStatus | undefined;
|
|
2201
|
+
lightspark_node_with_o_s_k_total_balance: any;
|
|
2202
|
+
lightspark_node_with_o_s_k_total_local_balance: any;
|
|
2203
|
+
lightspark_node_with_o_s_k_local_balance: any;
|
|
2204
|
+
lightspark_node_with_o_s_k_remote_balance: any;
|
|
2205
|
+
lightspark_node_with_o_s_k_blockchain_balance: any;
|
|
2206
|
+
lightspark_node_with_o_s_k_uma_prescreening_utxos: string[];
|
|
2207
|
+
lightspark_node_with_o_s_k_balances: any;
|
|
2208
|
+
lightspark_node_with_o_s_k_encrypted_signing_private_key: any;
|
|
2209
|
+
};
|
|
1977
2210
|
}
|
|
1978
2211
|
|
|
1979
2212
|
/** This is a Lightspark node with remote signing. **/
|
|
1980
|
-
declare class LightsparkNodeWithRemoteSigning implements LightsparkNode {
|
|
2213
|
+
declare class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
|
|
1981
2214
|
readonly id: string;
|
|
1982
2215
|
readonly createdAt: string;
|
|
1983
2216
|
readonly updatedAt: string;
|
|
@@ -1996,24 +2229,91 @@ declare class LightsparkNodeWithRemoteSigning implements LightsparkNode {
|
|
|
1996
2229
|
readonly localBalance?: CurrencyAmount | undefined;
|
|
1997
2230
|
readonly remoteBalance?: CurrencyAmount | undefined;
|
|
1998
2231
|
readonly blockchainBalance?: BlockchainBalance | undefined;
|
|
1999
|
-
|
|
2232
|
+
readonly balances?: Balances | undefined;
|
|
2233
|
+
constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, ownerId: string, umaPrescreeningUtxos: string[], typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, status?: LightsparkNodeStatus | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, remoteBalance?: CurrencyAmount | undefined, blockchainBalance?: BlockchainBalance | undefined, balances?: Balances | undefined);
|
|
2000
2234
|
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
2001
2235
|
getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
2002
2236
|
static getLightsparkNodeWithRemoteSigningQuery(id: string): Query<LightsparkNodeWithRemoteSigning>;
|
|
2237
|
+
toJson(): {
|
|
2238
|
+
__typename: string;
|
|
2239
|
+
lightspark_node_with_remote_signing_id: string;
|
|
2240
|
+
lightspark_node_with_remote_signing_created_at: string;
|
|
2241
|
+
lightspark_node_with_remote_signing_updated_at: string;
|
|
2242
|
+
lightspark_node_with_remote_signing_alias: string | undefined;
|
|
2243
|
+
lightspark_node_with_remote_signing_bitcoin_network: BitcoinNetwork;
|
|
2244
|
+
lightspark_node_with_remote_signing_color: string | undefined;
|
|
2245
|
+
lightspark_node_with_remote_signing_conductivity: number | undefined;
|
|
2246
|
+
lightspark_node_with_remote_signing_display_name: string;
|
|
2247
|
+
lightspark_node_with_remote_signing_public_key: string | undefined;
|
|
2248
|
+
lightspark_node_with_remote_signing_owner: {
|
|
2249
|
+
id: string;
|
|
2250
|
+
};
|
|
2251
|
+
lightspark_node_with_remote_signing_status: LightsparkNodeStatus | undefined;
|
|
2252
|
+
lightspark_node_with_remote_signing_total_balance: any;
|
|
2253
|
+
lightspark_node_with_remote_signing_total_local_balance: any;
|
|
2254
|
+
lightspark_node_with_remote_signing_local_balance: any;
|
|
2255
|
+
lightspark_node_with_remote_signing_remote_balance: any;
|
|
2256
|
+
lightspark_node_with_remote_signing_blockchain_balance: any;
|
|
2257
|
+
lightspark_node_with_remote_signing_uma_prescreening_utxos: string[];
|
|
2258
|
+
lightspark_node_with_remote_signing_balances: any;
|
|
2259
|
+
};
|
|
2003
2260
|
}
|
|
2004
2261
|
|
|
2005
|
-
|
|
2262
|
+
/** This object represents an L1 transaction that occurred on the Bitcoin Network. You can retrieve this object to receive information about a specific on-chain transaction made on the Lightning Network associated with your Lightspark Node. **/
|
|
2263
|
+
interface OnChainTransaction {
|
|
2264
|
+
/**
|
|
2265
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
2266
|
+
* string.
|
|
2267
|
+
**/
|
|
2268
|
+
id: string;
|
|
2269
|
+
/** The date and time when this transaction was initiated. **/
|
|
2270
|
+
createdAt: string;
|
|
2271
|
+
/** The date and time when the entity was last updated. **/
|
|
2272
|
+
updatedAt: string;
|
|
2273
|
+
/** The current status of this transaction. **/
|
|
2274
|
+
status: TransactionStatus;
|
|
2275
|
+
/** The amount of money involved in this transaction. **/
|
|
2276
|
+
amount: CurrencyAmount;
|
|
2277
|
+
/**
|
|
2278
|
+
* The height of the block that included this transaction. This will be zero for unconfirmed
|
|
2279
|
+
* transactions.
|
|
2280
|
+
**/
|
|
2281
|
+
blockHeight: number;
|
|
2282
|
+
/** The Bitcoin blockchain addresses this transaction was sent to. **/
|
|
2283
|
+
destinationAddresses: string[];
|
|
2284
|
+
/** The typename of the object **/
|
|
2285
|
+
typename: string;
|
|
2286
|
+
/** The date and time when this transaction was completed or failed. **/
|
|
2287
|
+
resolvedAt?: string | undefined;
|
|
2288
|
+
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
2289
|
+
transactionHash?: string | undefined;
|
|
2290
|
+
/**
|
|
2291
|
+
* The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
|
|
2292
|
+
* blockchain.
|
|
2293
|
+
**/
|
|
2294
|
+
fees?: CurrencyAmount | undefined;
|
|
2295
|
+
/**
|
|
2296
|
+
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
2297
|
+
* transactions.
|
|
2298
|
+
**/
|
|
2299
|
+
blockHash?: string | undefined;
|
|
2300
|
+
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
2301
|
+
numConfirmations?: number | undefined;
|
|
2302
|
+
}
|
|
2303
|
+
declare const getOnChainTransactionQuery: (id: string) => Query<OnChainTransaction>;
|
|
2304
|
+
|
|
2305
|
+
interface OutgoingPaymentsForInvoiceQueryInput {
|
|
2006
2306
|
/** The encoded invoice that the outgoing payments paid to. **/
|
|
2007
2307
|
encodedInvoice: string;
|
|
2008
2308
|
/** An optional filter to only query outgoing payments of given statuses. **/
|
|
2009
|
-
statuses?: TransactionStatus[];
|
|
2010
|
-
}
|
|
2309
|
+
statuses?: TransactionStatus[] | undefined;
|
|
2310
|
+
}
|
|
2011
2311
|
|
|
2012
|
-
|
|
2312
|
+
interface OutgoingPaymentsForInvoiceQueryOutput {
|
|
2013
2313
|
payments: OutgoingPayment[];
|
|
2014
|
-
}
|
|
2314
|
+
}
|
|
2015
2315
|
|
|
2016
|
-
|
|
2316
|
+
interface PayInvoiceInput {
|
|
2017
2317
|
/** The node from where you want to send the payment. **/
|
|
2018
2318
|
nodeId: string;
|
|
2019
2319
|
/** The invoice you want to pay (as defined by the BOLT11 standard). **/
|
|
@@ -2026,13 +2326,13 @@ type PayInvoiceInput = {
|
|
|
2026
2326
|
* The amount you will pay for this invoice, expressed in msats. It should ONLY be set when the
|
|
2027
2327
|
* invoice amount is zero.
|
|
2028
2328
|
**/
|
|
2029
|
-
amountMsats?: number;
|
|
2030
|
-
}
|
|
2329
|
+
amountMsats?: number | undefined;
|
|
2330
|
+
}
|
|
2031
2331
|
|
|
2032
|
-
|
|
2332
|
+
interface PayInvoiceOutput {
|
|
2033
2333
|
/** The payment that has been sent. **/
|
|
2034
2334
|
paymentId: string;
|
|
2035
|
-
}
|
|
2335
|
+
}
|
|
2036
2336
|
|
|
2037
2337
|
/** This is an enum indicating the direction of the payment. **/
|
|
2038
2338
|
declare enum PaymentDirection {
|
|
@@ -2045,15 +2345,15 @@ declare enum PaymentDirection {
|
|
|
2045
2345
|
RECEIVED = "RECEIVED"
|
|
2046
2346
|
}
|
|
2047
2347
|
|
|
2048
|
-
|
|
2348
|
+
interface PayUmaInvoiceInput {
|
|
2049
2349
|
nodeId: string;
|
|
2050
2350
|
encodedInvoice: string;
|
|
2051
2351
|
timeoutSecs: number;
|
|
2052
2352
|
maximumFeesMsats: number;
|
|
2053
|
-
amountMsats?: number;
|
|
2054
|
-
}
|
|
2353
|
+
amountMsats?: number | undefined;
|
|
2354
|
+
}
|
|
2055
2355
|
|
|
2056
|
-
|
|
2356
|
+
interface RegisterPaymentInput {
|
|
2057
2357
|
/**
|
|
2058
2358
|
* The compliance provider that is going to screen the node. You need to be a customer of the selected
|
|
2059
2359
|
* provider and store the API key on the Lightspark account setting page.
|
|
@@ -2072,37 +2372,37 @@ type RegisterPaymentInput = {
|
|
|
2072
2372
|
nodePubkey: string;
|
|
2073
2373
|
/** Indicates whether this payment is an OutgoingPayment or an IncomingPayment. **/
|
|
2074
2374
|
direction: PaymentDirection;
|
|
2075
|
-
}
|
|
2375
|
+
}
|
|
2076
2376
|
|
|
2077
|
-
|
|
2377
|
+
interface RegisterPaymentOutput {
|
|
2078
2378
|
paymentId: string;
|
|
2079
|
-
}
|
|
2379
|
+
}
|
|
2080
2380
|
|
|
2081
|
-
|
|
2381
|
+
interface ReleaseChannelPerCommitmentSecretInput {
|
|
2082
2382
|
/** The unique identifier of the channel. **/
|
|
2083
2383
|
channelId: string;
|
|
2084
2384
|
/** The per-commitment secret to be released. **/
|
|
2085
2385
|
perCommitmentSecret: string;
|
|
2086
2386
|
/** The index associated with the per-commitment secret. **/
|
|
2087
2387
|
perCommitmentIndex: number;
|
|
2088
|
-
}
|
|
2388
|
+
}
|
|
2089
2389
|
|
|
2090
|
-
|
|
2390
|
+
interface ReleaseChannelPerCommitmentSecretOutput {
|
|
2091
2391
|
/** The channel object after the per-commitment secret release operation. **/
|
|
2092
2392
|
channelId: string;
|
|
2093
|
-
}
|
|
2393
|
+
}
|
|
2094
2394
|
|
|
2095
|
-
|
|
2395
|
+
interface ReleasePaymentPreimageInput {
|
|
2096
2396
|
/** The invoice the preimage belongs to. **/
|
|
2097
2397
|
invoiceId: string;
|
|
2098
2398
|
/** The preimage to release. **/
|
|
2099
2399
|
paymentPreimage: string;
|
|
2100
|
-
}
|
|
2400
|
+
}
|
|
2101
2401
|
|
|
2102
|
-
|
|
2402
|
+
interface ReleasePaymentPreimageOutput {
|
|
2103
2403
|
/** The invoice of the transaction. **/
|
|
2104
2404
|
invoiceId: string;
|
|
2105
|
-
}
|
|
2405
|
+
}
|
|
2106
2406
|
|
|
2107
2407
|
/** This is an enum of the potential sub-event types for Remote Signing webook events. **/
|
|
2108
2408
|
declare enum RemoteSigningSubEventType {
|
|
@@ -2121,7 +2421,7 @@ declare enum RemoteSigningSubEventType {
|
|
|
2121
2421
|
REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET = "REVEAL_COUNTERPARTY_PER_COMMITMENT_SECRET"
|
|
2122
2422
|
}
|
|
2123
2423
|
|
|
2124
|
-
|
|
2424
|
+
interface RequestWithdrawalInput {
|
|
2125
2425
|
/** The node from which you'd like to make the withdrawal. **/
|
|
2126
2426
|
nodeId: string;
|
|
2127
2427
|
/** The bitcoin address where the withdrawal should be sent. **/
|
|
@@ -2133,12 +2433,12 @@ type RequestWithdrawalInput = {
|
|
|
2133
2433
|
amountSats: number;
|
|
2134
2434
|
/** The strategy that should be used to withdraw the funds from this node. **/
|
|
2135
2435
|
withdrawalMode: WithdrawalMode;
|
|
2136
|
-
}
|
|
2436
|
+
}
|
|
2137
2437
|
|
|
2138
|
-
|
|
2438
|
+
interface RequestWithdrawalOutput {
|
|
2139
2439
|
/** The request that is created for this withdrawal. **/
|
|
2140
2440
|
requestId: string;
|
|
2141
|
-
}
|
|
2441
|
+
}
|
|
2142
2442
|
|
|
2143
2443
|
/** This is an enum of the potential risk ratings related to a transaction made over the Lightning Network. These risk ratings are returned from the CryptoSanctionScreeningProvider. **/
|
|
2144
2444
|
declare enum RiskRating {
|
|
@@ -2153,7 +2453,7 @@ declare enum RiskRating {
|
|
|
2153
2453
|
}
|
|
2154
2454
|
|
|
2155
2455
|
/** This object represents a transaction that was forwarded through a Lightspark node on the Lightning Network, i.e., a routed transaction. You can retrieve this object to receive information about any transaction routed through your Lightspark Node. **/
|
|
2156
|
-
|
|
2456
|
+
interface RoutingTransaction {
|
|
2157
2457
|
/**
|
|
2158
2458
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
2159
2459
|
* string.
|
|
@@ -2170,26 +2470,26 @@ type RoutingTransaction = LightningTransaction & Transaction & Entity & {
|
|
|
2170
2470
|
/** The typename of the object **/
|
|
2171
2471
|
typename: string;
|
|
2172
2472
|
/** The date and time when this transaction was completed or failed. **/
|
|
2173
|
-
resolvedAt?: string;
|
|
2473
|
+
resolvedAt?: string | undefined;
|
|
2174
2474
|
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
2175
|
-
transactionHash?: string;
|
|
2475
|
+
transactionHash?: string | undefined;
|
|
2176
2476
|
/** If known, the channel this transaction was received from. **/
|
|
2177
|
-
incomingChannelId?: string;
|
|
2477
|
+
incomingChannelId?: string | undefined;
|
|
2178
2478
|
/** If known, the channel this transaction was forwarded to. **/
|
|
2179
|
-
outgoingChannelId?: string;
|
|
2479
|
+
outgoingChannelId?: string | undefined;
|
|
2180
2480
|
/**
|
|
2181
2481
|
* The fees collected by the node when routing this transaction. We subtract the outgoing amount to
|
|
2182
2482
|
* the incoming amount to determine how much fees were collected.
|
|
2183
2483
|
**/
|
|
2184
|
-
fees?: CurrencyAmount;
|
|
2484
|
+
fees?: CurrencyAmount | undefined;
|
|
2185
2485
|
/** If applicable, user-facing error message describing why the routing failed. **/
|
|
2186
|
-
failureMessage?: RichText;
|
|
2486
|
+
failureMessage?: RichText | undefined;
|
|
2187
2487
|
/** If applicable, the reason why the routing failed. **/
|
|
2188
|
-
failureReason?: RoutingTransactionFailureReason;
|
|
2189
|
-
}
|
|
2488
|
+
failureReason?: RoutingTransactionFailureReason | undefined;
|
|
2489
|
+
}
|
|
2190
2490
|
declare const getRoutingTransactionQuery: (id: string) => Query<RoutingTransaction>;
|
|
2191
2491
|
|
|
2192
|
-
|
|
2492
|
+
interface ScreenNodeInput {
|
|
2193
2493
|
/**
|
|
2194
2494
|
* The compliance provider that is going to screen the node. You need to be a customer of the selected
|
|
2195
2495
|
* provider and store the API key on the Lightspark account setting page.
|
|
@@ -2197,13 +2497,13 @@ type ScreenNodeInput = {
|
|
|
2197
2497
|
provider: ComplianceProvider;
|
|
2198
2498
|
/** The public key of the lightning node that needs to be screened. **/
|
|
2199
2499
|
nodePubkey: string;
|
|
2200
|
-
}
|
|
2500
|
+
}
|
|
2201
2501
|
|
|
2202
|
-
|
|
2502
|
+
interface ScreenNodeOutput {
|
|
2203
2503
|
rating: RiskRating;
|
|
2204
|
-
}
|
|
2504
|
+
}
|
|
2205
2505
|
|
|
2206
|
-
|
|
2506
|
+
interface SendPaymentInput {
|
|
2207
2507
|
/** The node from where you want to send the payment. **/
|
|
2208
2508
|
nodeId: string;
|
|
2209
2509
|
/** The public key of the destination node. **/
|
|
@@ -2214,14 +2514,14 @@ type SendPaymentInput = {
|
|
|
2214
2514
|
amountMsats: number;
|
|
2215
2515
|
/** The maximum amount of fees that you want to pay for this payment to be sent, expressed in msats. **/
|
|
2216
2516
|
maximumFeesMsats: number;
|
|
2217
|
-
}
|
|
2517
|
+
}
|
|
2218
2518
|
|
|
2219
|
-
|
|
2519
|
+
interface SendPaymentOutput {
|
|
2220
2520
|
/** The payment that has been sent. **/
|
|
2221
2521
|
paymentId: string;
|
|
2222
|
-
}
|
|
2522
|
+
}
|
|
2223
2523
|
|
|
2224
|
-
|
|
2524
|
+
interface SetInvoicePaymentHashInput {
|
|
2225
2525
|
/** The invoice that needs to be updated. **/
|
|
2226
2526
|
invoiceId: string;
|
|
2227
2527
|
/** The 32-byte hash of the payment preimage. **/
|
|
@@ -2230,14 +2530,14 @@ type SetInvoicePaymentHashInput = {
|
|
|
2230
2530
|
* The 32-byte nonce used to generate the invoice preimage if applicable. It will later be included in
|
|
2231
2531
|
* RELEASE_PAYMENT_PREIMAGE webhook to help recover the raw preimage.
|
|
2232
2532
|
**/
|
|
2233
|
-
preimageNonce?: string;
|
|
2234
|
-
}
|
|
2533
|
+
preimageNonce?: string | undefined;
|
|
2534
|
+
}
|
|
2235
2535
|
|
|
2236
|
-
|
|
2536
|
+
interface SetInvoicePaymentHashOutput {
|
|
2237
2537
|
invoiceId: string;
|
|
2238
|
-
}
|
|
2538
|
+
}
|
|
2239
2539
|
|
|
2240
|
-
|
|
2540
|
+
interface Signable {
|
|
2241
2541
|
/**
|
|
2242
2542
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
2243
2543
|
* string.
|
|
@@ -2249,51 +2549,51 @@ type Signable = Entity & {
|
|
|
2249
2549
|
updatedAt: string;
|
|
2250
2550
|
/** The typename of the object **/
|
|
2251
2551
|
typename: string;
|
|
2252
|
-
}
|
|
2552
|
+
}
|
|
2253
2553
|
declare const getSignableQuery: (id: string) => Query<Signable>;
|
|
2254
2554
|
|
|
2255
|
-
|
|
2555
|
+
interface SignInvoiceInput {
|
|
2256
2556
|
/** The unique identifier of the invoice to be signed. **/
|
|
2257
2557
|
invoiceId: string;
|
|
2258
2558
|
/** The cryptographic signature for the invoice. **/
|
|
2259
2559
|
signature: string;
|
|
2260
2560
|
/** The recovery identifier for the signature. **/
|
|
2261
2561
|
recoveryId: number;
|
|
2262
|
-
}
|
|
2562
|
+
}
|
|
2263
2563
|
|
|
2264
|
-
|
|
2564
|
+
interface SignInvoiceOutput {
|
|
2265
2565
|
/** The signed invoice object. **/
|
|
2266
2566
|
invoiceId: string;
|
|
2267
|
-
}
|
|
2567
|
+
}
|
|
2268
2568
|
|
|
2269
|
-
|
|
2569
|
+
interface SignMessagesInput {
|
|
2270
2570
|
/** The list of the message ids and signatures. **/
|
|
2271
2571
|
signatures: IdAndSignature[];
|
|
2272
|
-
}
|
|
2572
|
+
}
|
|
2273
2573
|
|
|
2274
|
-
|
|
2574
|
+
interface SignMessagesOutput {
|
|
2275
2575
|
/** The list of signed payloads. **/
|
|
2276
2576
|
signedPayloads: SignablePayload[];
|
|
2277
|
-
}
|
|
2577
|
+
}
|
|
2278
2578
|
|
|
2279
|
-
|
|
2579
|
+
interface UpdateChannelPerCommitmentPointInput {
|
|
2280
2580
|
channelId: string;
|
|
2281
2581
|
perCommitmentPoint: string;
|
|
2282
2582
|
perCommitmentPointIndex: number;
|
|
2283
|
-
}
|
|
2583
|
+
}
|
|
2284
2584
|
|
|
2285
|
-
|
|
2585
|
+
interface UpdateChannelPerCommitmentPointOutput {
|
|
2286
2586
|
channelId: string;
|
|
2287
|
-
}
|
|
2587
|
+
}
|
|
2288
2588
|
|
|
2289
|
-
|
|
2589
|
+
interface UpdateNodeSharedSecretInput {
|
|
2290
2590
|
nodeId: string;
|
|
2291
2591
|
sharedSecret: string;
|
|
2292
|
-
}
|
|
2592
|
+
}
|
|
2293
2593
|
|
|
2294
|
-
|
|
2594
|
+
interface UpdateNodeSharedSecretOutput {
|
|
2295
2595
|
nodeId: string;
|
|
2296
|
-
}
|
|
2596
|
+
}
|
|
2297
2597
|
|
|
2298
2598
|
/** This is an enum of the potential event types that can be associated with your Lightspark wallets. **/
|
|
2299
2599
|
declare enum WebhookEventType {
|
|
@@ -2316,7 +2616,7 @@ declare enum WebhookEventType {
|
|
|
2316
2616
|
}
|
|
2317
2617
|
|
|
2318
2618
|
/** This object represents an L1 withdrawal from your Lightspark Node to any Bitcoin wallet. You can retrieve this object to receive detailed information about any L1 withdrawal associated with your Lightspark Node or account. **/
|
|
2319
|
-
|
|
2619
|
+
interface Withdrawal {
|
|
2320
2620
|
/**
|
|
2321
2621
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
2322
2622
|
* string.
|
|
@@ -2342,22 +2642,22 @@ type Withdrawal = OnChainTransaction & Transaction & Entity & {
|
|
|
2342
2642
|
/** The typename of the object **/
|
|
2343
2643
|
typename: string;
|
|
2344
2644
|
/** The date and time when this transaction was completed or failed. **/
|
|
2345
|
-
resolvedAt?: string;
|
|
2645
|
+
resolvedAt?: string | undefined;
|
|
2346
2646
|
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
|
|
2347
|
-
transactionHash?: string;
|
|
2647
|
+
transactionHash?: string | undefined;
|
|
2348
2648
|
/**
|
|
2349
2649
|
* The fees that were paid by the wallet sending the transaction to commit it to the Bitcoin
|
|
2350
2650
|
* blockchain.
|
|
2351
2651
|
**/
|
|
2352
|
-
fees?: CurrencyAmount;
|
|
2652
|
+
fees?: CurrencyAmount | undefined;
|
|
2353
2653
|
/**
|
|
2354
2654
|
* The hash of the block that included this transaction. This will be null for unconfirmed
|
|
2355
2655
|
* transactions.
|
|
2356
2656
|
**/
|
|
2357
|
-
blockHash?: string;
|
|
2657
|
+
blockHash?: string | undefined;
|
|
2358
2658
|
/** The number of blockchain confirmations for this transaction in real time. **/
|
|
2359
|
-
numConfirmations?: number;
|
|
2360
|
-
}
|
|
2659
|
+
numConfirmations?: number | undefined;
|
|
2660
|
+
}
|
|
2361
2661
|
declare const getWithdrawalQuery: (id: string) => Query<Withdrawal>;
|
|
2362
2662
|
|
|
2363
|
-
export { IncomingPayment as $, Account as A, Balances as B, Channel as C, CreateTestModeInvoiceInput as D, CreateTestModeInvoiceOutput as E, CreateTestModePaymentInput as F, CreateTestModePaymentoutput as G, CreateUmaInvoiceInput as H, CurrencyAmount as I, CurrencyUnit as J, DeclineToSignMessagesInput as K, LightsparkClient as L, DeclineToSignMessagesOutput as M, DeleteApiTokenInput as N, DeleteApiTokenOutput as O, Deposit as P, getDepositQuery as Q, Entity as R, FeeEstimate as S, FundNodeInput as T, FundNodeOutput as U, GraphNode as V, WebhookEventType as W, Hop as X, getHopQuery as Y, HtlcAttemptFailureCode as Z, IdAndSignature as _, AccountToApiTokensConnection as a,
|
|
2663
|
+
export { IncomingPayment as $, Account as A, Balances as B, Channel as C, CreateTestModeInvoiceInput as D, CreateTestModeInvoiceOutput as E, CreateTestModePaymentInput as F, CreateTestModePaymentoutput as G, CreateUmaInvoiceInput as H, CurrencyAmount as I, CurrencyUnit as J, DeclineToSignMessagesInput as K, LightsparkClient as L, DeclineToSignMessagesOutput as M, DeleteApiTokenInput as N, DeleteApiTokenOutput as O, Deposit as P, getDepositQuery as Q, Entity as R, FeeEstimate as S, FundNodeInput as T, FundNodeOutput as U, GraphNode as V, WebhookEventType as W, Hop as X, getHopQuery as Y, HtlcAttemptFailureCode as Z, IdAndSignature as _, AccountToApiTokensConnection as a, Secret as a$, IncomingPaymentAttempt as a0, getIncomingPaymentAttemptQuery as a1, IncomingPaymentAttemptStatus as a2, IncomingPaymentToAttemptsConnection as a3, Invoice as a4, getInvoiceQuery as a5, InvoiceData as a6, InvoiceType as a7, LightningFeeEstimateForInvoiceInput as a8, LightningFeeEstimateForNodeInput as a9, PayInvoiceInput as aA, PayInvoiceOutput as aB, PaymentDirection as aC, PaymentFailureReason as aD, PaymentRequest as aE, getPaymentRequestQuery as aF, PaymentRequestData as aG, PaymentRequestStatus as aH, PayUmaInvoiceInput as aI, Permission as aJ, PostTransactionData as aK, RegisterPaymentInput as aL, RegisterPaymentOutput as aM, ReleaseChannelPerCommitmentSecretInput as aN, ReleaseChannelPerCommitmentSecretOutput as aO, ReleasePaymentPreimageInput as aP, ReleasePaymentPreimageOutput as aQ, RemoteSigningSubEventType as aR, RequestWithdrawalInput as aS, RequestWithdrawalOutput as aT, RichText as aU, RiskRating as aV, RoutingTransaction as aW, getRoutingTransactionQuery as aX, RoutingTransactionFailureReason as aY, ScreenNodeInput as aZ, ScreenNodeOutput as a_, LightningFeeEstimateOutput as aa, LightningTransaction as ab, getLightningTransactionQuery as ac, LightsparkNode as ad, getLightsparkNodeQuery as ae, LightsparkNodeOwner as af, getLightsparkNodeOwnerQuery as ag, LightsparkNodeStatus as ah, LightsparkNodeToChannelsConnection as ai, LightsparkNodeWithOSK as aj, LightsparkNodeWithRemoteSigning as ak, Node as al, getNodeQuery as am, NodeAddress as an, NodeAddressType as ao, NodeToAddressesConnection as ap, OnChainTransaction as aq, getOnChainTransactionQuery as ar, OutgoingPayment as as, OutgoingPaymentAttempt as at, OutgoingPaymentAttemptStatus as au, OutgoingPaymentAttemptToHopsConnection as av, OutgoingPaymentsForInvoiceQueryInput as aw, OutgoingPaymentsForInvoiceQueryOutput as ax, OutgoingPaymentToAttemptsConnection as ay, PageInfo as az, AccountToChannelsConnection as b, SendPaymentInput as b0, SendPaymentOutput as b1, SetInvoicePaymentHashInput as b2, SetInvoicePaymentHashOutput as b3, Signable as b4, getSignableQuery as b5, SignablePayload as b6, getSignablePayloadQuery as b7, SignablePayloadStatus as b8, SignInvoiceInput as b9, SignInvoiceOutput as ba, SignMessagesInput as bb, SignMessagesOutput as bc, SingleNodeDashboard as bd, Transaction as be, getTransactionQuery as bf, TransactionFailures as bg, TransactionStatus as bh, TransactionType as bi, TransactionUpdate as bj, UpdateChannelPerCommitmentPointInput as bk, UpdateChannelPerCommitmentPointOutput as bl, UpdateNodeSharedSecretInput as bm, UpdateNodeSharedSecretOutput as bn, Wallet as bo, WalletStatus as bp, WalletToPaymentRequestsConnection as bq, WalletToTransactionsConnection as br, Withdrawal as bs, getWithdrawalQuery as bt, WithdrawalMode as bu, WithdrawalRequest as bv, WithdrawalRequestStatus as bw, WithdrawalRequestToChannelClosingTransactionsConnection as bx, WithdrawalRequestToChannelOpeningTransactionsConnection as by, AccountToNodesConnection as c, AccountToPaymentRequestsConnection as d, AccountToTransactionsConnection as e, AccountToWalletsConnection as f, ApiToken as g, getApiTokenQuery as h, BlockchainBalance as i, ChannelClosingTransaction as j, getChannelClosingTransactionQuery as k, ChannelFees as l, ChannelOpeningTransaction as m, getChannelOpeningTransactionQuery as n, ChannelSnapshot as o, ChannelStatus as p, ChannelToTransactionsConnection as q, ComplianceProvider as r, Connection as s, CreateApiTokenInput as t, CreateApiTokenOutput as u, CreateInvoiceInput as v, CreateInvoiceOutput as w, CreateLnurlInvoiceInput as x, CreateNodeWalletAddressInput as y, CreateNodeWalletAddressOutput as z };
|