@lightsparkdev/lightspark-sdk 0.4.8 → 0.4.10
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 +12 -0
- package/dist/{chunk-YTXDF6SQ.js → chunk-NXUFC5J7.js} +950 -246
- package/dist/{index-adeff42d.d.ts → index-3ffe9e7b.d.ts} +194 -56
- package/dist/index.cjs +962 -254
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -9
- package/dist/objects/index.cjs +952 -246
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +5 -1
- package/package.json +1 -2
- package/src/client.ts +13 -14
- package/src/objects/Account.ts +36 -30
- package/src/objects/AccountToApiTokensConnection.ts +11 -6
- package/src/objects/AccountToNodesConnection.ts +11 -6
- package/src/objects/AccountToPaymentRequestsConnection.ts +20 -15
- package/src/objects/AccountToTransactionsConnection.ts +19 -14
- package/src/objects/AccountToWalletsConnection.ts +11 -6
- package/src/objects/ApiToken.ts +2 -1
- package/src/objects/Balances.ts +1 -0
- package/src/objects/BitcoinNetwork.ts +2 -1
- package/src/objects/BlockchainBalance.ts +1 -1
- package/src/objects/Channel.ts +2 -2
- package/src/objects/ChannelClosingTransaction.ts +2 -2
- package/src/objects/ChannelFees.ts +1 -0
- package/src/objects/ChannelOpeningTransaction.ts +2 -2
- package/src/objects/ChannelStatus.ts +1 -0
- package/src/objects/Connection.ts +387 -0
- package/src/objects/CreateInvoiceInput.ts +12 -0
- package/src/objects/CreateLnurlInvoiceInput.ts +10 -0
- package/src/objects/CreateTestModePaymentoutput.ts +1 -0
- package/src/objects/CryptoSanctionsScreeningProvider.ts +14 -0
- package/src/objects/CurrencyAmount.ts +1 -1
- package/src/objects/CurrencyUnit.ts +1 -0
- package/src/objects/Deposit.ts +2 -2
- package/src/objects/Entity.ts +1 -1
- package/src/objects/FeeEstimate.ts +1 -0
- package/src/objects/GraphNode.ts +2 -2
- package/src/objects/Hop.ts +2 -2
- package/src/objects/HtlcAttemptFailureCode.ts +1 -0
- package/src/objects/IncomingPayment.ts +19 -6
- package/src/objects/IncomingPaymentAttempt.ts +2 -2
- package/src/objects/IncomingPaymentAttemptStatus.ts +1 -1
- package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -1
- package/src/objects/Invoice.ts +2 -2
- package/src/objects/InvoiceData.ts +1 -1
- package/src/objects/InvoiceType.ts +1 -0
- package/src/objects/LightningTransaction.ts +2 -2
- package/src/objects/LightsparkNode.ts +12 -6
- package/src/objects/LightsparkNodeOwner.ts +2 -2
- package/src/objects/LightsparkNodePurpose.ts +1 -0
- package/src/objects/LightsparkNodeToChannelsConnection.ts +11 -6
- package/src/objects/Node.ts +2 -3
- package/src/objects/NodeAddress.ts +1 -1
- package/src/objects/NodeAddressType.ts +1 -1
- package/src/objects/OnChainTransaction.ts +2 -3
- package/src/objects/OutgoingPayment.ts +14 -6
- package/src/objects/OutgoingPaymentAttempt.ts +14 -6
- package/src/objects/OutgoingPaymentAttemptStatus.ts +1 -1
- package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +21 -1
- package/src/objects/OutgoingPaymentToAttemptsConnection.ts +21 -1
- package/src/objects/PageInfo.ts +1 -0
- package/src/objects/PaymentFailureReason.ts +1 -0
- package/src/objects/PaymentRequest.ts +2 -2
- package/src/objects/PaymentRequestData.ts +1 -1
- package/src/objects/PaymentRequestStatus.ts +1 -0
- package/src/objects/Permission.ts +1 -0
- package/src/objects/RiskRating.ts +18 -0
- package/src/objects/RoutingTransaction.ts +2 -2
- package/src/objects/RoutingTransactionFailureReason.ts +1 -0
- package/src/objects/ScreenBitcoinAddressesInput.ts +23 -0
- package/src/objects/ScreenBitcoinAddressesOutput.ts +25 -0
- package/src/objects/Transaction.ts +2 -2
- package/src/objects/TransactionFailures.ts +1 -0
- package/src/objects/TransactionStatus.ts +1 -0
- package/src/objects/TransactionType.ts +1 -0
- package/src/objects/Wallet.ts +632 -7
- package/src/objects/WalletStatus.ts +1 -0
- package/src/objects/WalletToPaymentRequestsConnection.ts +57 -0
- package/src/objects/WalletToTransactionsConnection.ts +57 -0
- package/src/objects/WebhookEventType.ts +3 -0
- package/src/objects/Withdrawal.ts +2 -2
- package/src/objects/WithdrawalMode.ts +1 -0
- package/src/objects/WithdrawalRequest.ts +2 -1
- package/src/objects/WithdrawalRequestStatus.ts +1 -0
- package/src/objects/index.ts +7 -0
- package/src/objects/.eslintrc.cjs +0 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Maybe, Query, AuthProvider, CryptoInterface, KeyOrAliasType } from '@lightsparkdev/core';
|
|
2
2
|
import Observable from 'zen-observable';
|
|
3
3
|
|
|
4
|
+
/** This enum identifies the unit of currency associated with a CurrencyAmount. **/
|
|
4
5
|
declare enum CurrencyUnit {
|
|
5
6
|
/**
|
|
6
7
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -23,7 +24,7 @@ declare enum CurrencyUnit {
|
|
|
23
24
|
MILLIBITCOIN = "MILLIBITCOIN"
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
/**
|
|
27
|
+
/** This object represents the value and unit for an amount of currency. **/
|
|
27
28
|
type CurrencyAmount = {
|
|
28
29
|
/** The original numeric value for this CurrencyAmount. **/
|
|
29
30
|
originalValue: number;
|
|
@@ -43,6 +44,7 @@ type CurrencyAmount = {
|
|
|
43
44
|
preferredCurrencyValueApprox: number;
|
|
44
45
|
};
|
|
45
46
|
|
|
47
|
+
/** This is an enum of potential purposes set by a user for a Lightspark node. **/
|
|
46
48
|
declare enum LightsparkNodePurpose {
|
|
47
49
|
/**
|
|
48
50
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -72,7 +74,7 @@ declare enum LightsparkNodeStatus {
|
|
|
72
74
|
FAILED_TO_DEPLOY = "FAILED_TO_DEPLOY"
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
/**
|
|
77
|
+
/** This is an enum of the potential types of addresses that a node on the Lightning Network can have. **/
|
|
76
78
|
declare enum NodeAddressType {
|
|
77
79
|
/**
|
|
78
80
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -118,7 +120,7 @@ type AccountDashboard = {
|
|
|
118
120
|
remoteBalance: Maybe<CurrencyAmount>;
|
|
119
121
|
};
|
|
120
122
|
|
|
121
|
-
/** This interface is used by all the entities in the Lightspark
|
|
123
|
+
/** 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. **/
|
|
122
124
|
type Entity = {
|
|
123
125
|
/**
|
|
124
126
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -133,6 +135,7 @@ type Entity = {
|
|
|
133
135
|
typename: string;
|
|
134
136
|
};
|
|
135
137
|
|
|
138
|
+
/** This is an enum of the potential permissions that a Lightspark user can have in regards to account management. **/
|
|
136
139
|
declare enum Permission {
|
|
137
140
|
/**
|
|
138
141
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -155,6 +158,7 @@ declare enum Permission {
|
|
|
155
158
|
ACCOUNT_MANAGE = "ACCOUNT_MANAGE"
|
|
156
159
|
}
|
|
157
160
|
|
|
161
|
+
/** 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. **/
|
|
158
162
|
type ApiToken = Entity & {
|
|
159
163
|
/**
|
|
160
164
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -182,6 +186,7 @@ type ApiToken = Entity & {
|
|
|
182
186
|
};
|
|
183
187
|
declare const getApiTokenQuery: (id: string) => Query<ApiToken>;
|
|
184
188
|
|
|
189
|
+
/** 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. **/
|
|
185
190
|
type PageInfo = {
|
|
186
191
|
hasNextPage?: boolean;
|
|
187
192
|
hasPreviousPage?: boolean;
|
|
@@ -189,23 +194,39 @@ type PageInfo = {
|
|
|
189
194
|
endCursor?: string;
|
|
190
195
|
};
|
|
191
196
|
|
|
192
|
-
type
|
|
197
|
+
type Connection = {
|
|
198
|
+
/**
|
|
199
|
+
* The total count of objects in this connection, using the current filters. It is different from the
|
|
200
|
+
* number of objects returned in the current page (in the `entities` field).
|
|
201
|
+
**/
|
|
202
|
+
count: number;
|
|
193
203
|
/** An object that holds pagination information about the objects in this connection. **/
|
|
194
204
|
pageInfo: PageInfo;
|
|
205
|
+
/** The typename of the object **/
|
|
206
|
+
typename: string;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
type AccountToApiTokensConnection = Connection & {
|
|
195
210
|
/**
|
|
196
211
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
197
212
|
* number of objects returned in the current page (in the `entities` field).
|
|
198
213
|
**/
|
|
199
214
|
count: number;
|
|
215
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
216
|
+
pageInfo: PageInfo;
|
|
200
217
|
/** The API tokens for the current page of this connection. **/
|
|
201
218
|
entities: ApiToken[];
|
|
219
|
+
/** The typename of the object **/
|
|
220
|
+
typename: string;
|
|
202
221
|
};
|
|
203
222
|
|
|
223
|
+
/** This represents the fee policies set for a channel on the Lightning Network. **/
|
|
204
224
|
type ChannelFees = {
|
|
205
225
|
baseFee?: CurrencyAmount;
|
|
206
226
|
feeRatePerMil?: number;
|
|
207
227
|
};
|
|
208
228
|
|
|
229
|
+
/** This is an enum representing the status of a channel on the Lightning Network. **/
|
|
209
230
|
declare enum ChannelStatus {
|
|
210
231
|
/**
|
|
211
232
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -251,6 +272,7 @@ type ChannelToTransactionsConnection = {
|
|
|
251
272
|
totalFees?: CurrencyAmount;
|
|
252
273
|
};
|
|
253
274
|
|
|
275
|
+
/** This is an enum of the potential types of transactions that can be associated with your Lightspark Node. **/
|
|
254
276
|
declare enum TransactionType {
|
|
255
277
|
/**
|
|
256
278
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -279,7 +301,7 @@ declare enum TransactionType {
|
|
|
279
301
|
ROUTE = "ROUTE"
|
|
280
302
|
}
|
|
281
303
|
|
|
282
|
-
/**
|
|
304
|
+
/** This is an object representing a channel on the Lightning Network. You can retrieve this object to get detailed information on a specific Lightning Network channel. **/
|
|
283
305
|
declare class Channel implements Entity {
|
|
284
306
|
readonly id: string;
|
|
285
307
|
readonly createdAt: string;
|
|
@@ -312,6 +334,7 @@ declare class AccountToChannelsConnection {
|
|
|
312
334
|
constructor(count: number, entities: Channel[]);
|
|
313
335
|
}
|
|
314
336
|
|
|
337
|
+
/** This is an enum identifying a particular Bitcoin Network. **/
|
|
315
338
|
declare enum BitcoinNetwork {
|
|
316
339
|
/**
|
|
317
340
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -324,11 +347,11 @@ declare enum BitcoinNetwork {
|
|
|
324
347
|
REGTEST = "REGTEST",
|
|
325
348
|
/** A test version of the Bitcoin Blockchain, maintained by a centralized organization. Not in use at Lightspark. **/
|
|
326
349
|
SIGNET = "SIGNET",
|
|
327
|
-
/** A test version of the Bitcoin Blockchain,
|
|
350
|
+
/** A test version of the Bitcoin Blockchain, publicly available. **/
|
|
328
351
|
TESTNET = "TESTNET"
|
|
329
352
|
}
|
|
330
353
|
|
|
331
|
-
/** This object
|
|
354
|
+
/** This is an object representing a detailed breakdown of the balance for a Lightspark Node. **/
|
|
332
355
|
type BlockchainBalance = {
|
|
333
356
|
/** The total wallet balance, including unconfirmed UTXOs. **/
|
|
334
357
|
totalBalance?: CurrencyAmount;
|
|
@@ -344,19 +367,21 @@ type BlockchainBalance = {
|
|
|
344
367
|
availableBalance?: CurrencyAmount;
|
|
345
368
|
};
|
|
346
369
|
|
|
347
|
-
type LightsparkNodeToChannelsConnection = {
|
|
348
|
-
/** An object that holds pagination information about the objects in this connection. **/
|
|
349
|
-
pageInfo: PageInfo;
|
|
370
|
+
type LightsparkNodeToChannelsConnection = Connection & {
|
|
350
371
|
/**
|
|
351
372
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
352
373
|
* number of objects returned in the current page (in the `entities` field).
|
|
353
374
|
**/
|
|
354
375
|
count: number;
|
|
376
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
377
|
+
pageInfo: PageInfo;
|
|
355
378
|
/** The channels for the current page of this connection. **/
|
|
356
379
|
entities: Channel[];
|
|
380
|
+
/** The typename of the object **/
|
|
381
|
+
typename: string;
|
|
357
382
|
};
|
|
358
383
|
|
|
359
|
-
/**
|
|
384
|
+
/** This object represents the address of a node on the Lightning Network. **/
|
|
360
385
|
type NodeAddress = {
|
|
361
386
|
/** The string representation of the address. **/
|
|
362
387
|
address: string;
|
|
@@ -375,7 +400,7 @@ type NodeToAddressesConnection = {
|
|
|
375
400
|
entities: NodeAddress[];
|
|
376
401
|
};
|
|
377
402
|
|
|
378
|
-
/** This interface
|
|
403
|
+
/** 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. **/
|
|
379
404
|
declare class Node implements Entity {
|
|
380
405
|
readonly id: string;
|
|
381
406
|
readonly createdAt: string;
|
|
@@ -421,21 +446,23 @@ declare class LightsparkNode implements Node {
|
|
|
421
446
|
readonly status?: LightsparkNodeStatus | undefined;
|
|
422
447
|
constructor(id: string, createdAt: string, updatedAt: string, bitcoinNetwork: BitcoinNetwork, displayName: string, accountId: string, ownerId: string, typename: string, alias?: string | undefined, color?: string | undefined, conductivity?: number | undefined, publicKey?: string | undefined, blockchainBalance?: BlockchainBalance | undefined, encryptedSigningPrivateKey?: Secret | undefined, totalBalance?: CurrencyAmount | undefined, totalLocalBalance?: CurrencyAmount | undefined, localBalance?: CurrencyAmount | undefined, purpose?: LightsparkNodePurpose | undefined, remoteBalance?: CurrencyAmount | undefined, status?: LightsparkNodeStatus | undefined);
|
|
423
448
|
getAddresses(client: LightsparkClient, first?: number | undefined, types?: NodeAddressType[] | undefined): Promise<NodeToAddressesConnection>;
|
|
424
|
-
getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
449
|
+
getChannels(client: LightsparkClient, first?: number | undefined, statuses?: ChannelStatus[] | undefined, after?: string | undefined): Promise<LightsparkNodeToChannelsConnection>;
|
|
425
450
|
static getLightsparkNodeQuery(id: string): Query<LightsparkNode>;
|
|
426
451
|
}
|
|
427
452
|
|
|
428
453
|
/** A connection between an account and the nodes it manages. **/
|
|
429
|
-
type AccountToNodesConnection = {
|
|
430
|
-
/** An object that holds pagination information about the objects in this connection. **/
|
|
431
|
-
pageInfo: PageInfo;
|
|
454
|
+
type AccountToNodesConnection = Connection & {
|
|
432
455
|
/**
|
|
433
456
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
434
457
|
* number of objects returned in the current page (in the `entities` field).
|
|
435
458
|
**/
|
|
436
459
|
count: number;
|
|
460
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
461
|
+
pageInfo: PageInfo;
|
|
437
462
|
/** The nodes for the current page of this connection. **/
|
|
438
463
|
entities: LightsparkNode[];
|
|
464
|
+
/** The typename of the object **/
|
|
465
|
+
typename: string;
|
|
439
466
|
/**
|
|
440
467
|
* The main purpose for the selected set of nodes. It is automatically determined from the nodes that
|
|
441
468
|
* are selected in this connection and is used for optimization purposes, as well as to determine the
|
|
@@ -444,7 +471,7 @@ type AccountToNodesConnection = {
|
|
|
444
471
|
purpose?: LightsparkNodePurpose;
|
|
445
472
|
};
|
|
446
473
|
|
|
447
|
-
/**
|
|
474
|
+
/** 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. **/
|
|
448
475
|
type PaymentRequestData = {
|
|
449
476
|
encodedPaymentRequest: string;
|
|
450
477
|
bitcoinNetwork: BitcoinNetwork;
|
|
@@ -452,6 +479,7 @@ type PaymentRequestData = {
|
|
|
452
479
|
typename: string;
|
|
453
480
|
};
|
|
454
481
|
|
|
482
|
+
/** This is an enum of the potential states that a payment request on the Lightning Network can take. **/
|
|
455
483
|
declare enum PaymentRequestStatus {
|
|
456
484
|
/**
|
|
457
485
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -462,6 +490,7 @@ declare enum PaymentRequestStatus {
|
|
|
462
490
|
CLOSED = "CLOSED"
|
|
463
491
|
}
|
|
464
492
|
|
|
493
|
+
/** 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. **/
|
|
465
494
|
type PaymentRequest = Entity & {
|
|
466
495
|
/**
|
|
467
496
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -481,18 +510,21 @@ type PaymentRequest = Entity & {
|
|
|
481
510
|
};
|
|
482
511
|
declare const getPaymentRequestQuery: (id: string) => Query<PaymentRequest>;
|
|
483
512
|
|
|
484
|
-
type AccountToPaymentRequestsConnection = {
|
|
485
|
-
/** The payment requests for the current page of this connection. **/
|
|
486
|
-
entities: PaymentRequest[];
|
|
487
|
-
/** An object that holds pagination information about the objects in this connection. **/
|
|
488
|
-
pageInfo: PageInfo;
|
|
513
|
+
type AccountToPaymentRequestsConnection = Connection & {
|
|
489
514
|
/**
|
|
490
515
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
491
516
|
* number of objects returned in the current page (in the `entities` field).
|
|
492
517
|
**/
|
|
493
|
-
count
|
|
518
|
+
count: number;
|
|
519
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
520
|
+
pageInfo: PageInfo;
|
|
521
|
+
/** The payment requests for the current page of this connection. **/
|
|
522
|
+
entities: PaymentRequest[];
|
|
523
|
+
/** The typename of the object **/
|
|
524
|
+
typename: string;
|
|
494
525
|
};
|
|
495
526
|
|
|
527
|
+
/** This is an enum of the potential statuses a transaction associated with your Lightspark Node can take. **/
|
|
496
528
|
declare enum TransactionStatus {
|
|
497
529
|
/**
|
|
498
530
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -513,6 +545,7 @@ declare enum TransactionStatus {
|
|
|
513
545
|
CANCELLED = "CANCELLED"
|
|
514
546
|
}
|
|
515
547
|
|
|
548
|
+
/** 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. **/
|
|
516
549
|
type Transaction = Entity & {
|
|
517
550
|
/**
|
|
518
551
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -536,16 +569,18 @@ type Transaction = Entity & {
|
|
|
536
569
|
};
|
|
537
570
|
declare const getTransactionQuery: (id: string) => Query<Transaction>;
|
|
538
571
|
|
|
539
|
-
type AccountToTransactionsConnection = {
|
|
572
|
+
type AccountToTransactionsConnection = Connection & {
|
|
540
573
|
/**
|
|
541
574
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
542
575
|
* number of objects returned in the current page (in the `entities` field).
|
|
543
576
|
**/
|
|
544
577
|
count: number;
|
|
545
|
-
/** The transactions for the current page of this connection. **/
|
|
546
|
-
entities: Transaction[];
|
|
547
578
|
/** An object that holds pagination information about the objects in this connection. **/
|
|
548
579
|
pageInfo: PageInfo;
|
|
580
|
+
/** The transactions for the current page of this connection. **/
|
|
581
|
+
entities: Transaction[];
|
|
582
|
+
/** The typename of the object **/
|
|
583
|
+
typename: string;
|
|
549
584
|
/**
|
|
550
585
|
* Profit (or loss) generated by the transactions in this connection, with the set of filters and
|
|
551
586
|
* constraints provided.
|
|
@@ -563,6 +598,7 @@ type AccountToTransactionsConnection = {
|
|
|
563
598
|
totalAmountTransacted?: CurrencyAmount;
|
|
564
599
|
};
|
|
565
600
|
|
|
601
|
+
/** 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. **/
|
|
566
602
|
type Balances = {
|
|
567
603
|
/**
|
|
568
604
|
* This represents the balance that should be displayed when asked "how much do I own right now?". It
|
|
@@ -586,6 +622,7 @@ type Balances = {
|
|
|
586
622
|
availableToWithdrawBalance: CurrencyAmount;
|
|
587
623
|
};
|
|
588
624
|
|
|
625
|
+
/** This is an object representing the owner of a LightsparkNode. **/
|
|
589
626
|
type LightsparkNodeOwner = Entity & {
|
|
590
627
|
/**
|
|
591
628
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -601,6 +638,7 @@ type LightsparkNodeOwner = Entity & {
|
|
|
601
638
|
};
|
|
602
639
|
declare const getLightsparkNodeOwnerQuery: (id: string) => Query<LightsparkNodeOwner>;
|
|
603
640
|
|
|
641
|
+
/** This is an enum of the potential statuses that your Lightspark wallet can take. **/
|
|
604
642
|
declare enum WalletStatus {
|
|
605
643
|
/**
|
|
606
644
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -627,6 +665,35 @@ declare enum WalletStatus {
|
|
|
627
665
|
TERMINATED = "TERMINATED"
|
|
628
666
|
}
|
|
629
667
|
|
|
668
|
+
type WalletToPaymentRequestsConnection = Connection & {
|
|
669
|
+
/**
|
|
670
|
+
* The total count of objects in this connection, using the current filters. It is different from the
|
|
671
|
+
* number of objects returned in the current page (in the `entities` field).
|
|
672
|
+
**/
|
|
673
|
+
count: number;
|
|
674
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
675
|
+
pageInfo: PageInfo;
|
|
676
|
+
/** The payment requests for the current page of this connection. **/
|
|
677
|
+
entities: PaymentRequest[];
|
|
678
|
+
/** The typename of the object **/
|
|
679
|
+
typename: string;
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
type WalletToTransactionsConnection = Connection & {
|
|
683
|
+
/**
|
|
684
|
+
* The total count of objects in this connection, using the current filters. It is different from the
|
|
685
|
+
* number of objects returned in the current page (in the `entities` field).
|
|
686
|
+
**/
|
|
687
|
+
count: number;
|
|
688
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
689
|
+
pageInfo: PageInfo;
|
|
690
|
+
/** The transactions for the current page of this connection. **/
|
|
691
|
+
entities: Transaction[];
|
|
692
|
+
/** The typename of the object **/
|
|
693
|
+
typename: string;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
/** 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. **/
|
|
630
697
|
declare class Wallet implements LightsparkNodeOwner {
|
|
631
698
|
readonly id: string;
|
|
632
699
|
readonly createdAt: string;
|
|
@@ -637,23 +704,28 @@ declare class Wallet implements LightsparkNodeOwner {
|
|
|
637
704
|
readonly lastLoginAt?: string | undefined;
|
|
638
705
|
readonly balances?: Balances | undefined;
|
|
639
706
|
constructor(id: string, createdAt: string, updatedAt: string, thirdPartyIdentifier: string, status: WalletStatus, typename: string, lastLoginAt?: string | undefined, balances?: Balances | undefined);
|
|
707
|
+
getTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined, statuses?: TransactionStatus[] | undefined, types?: TransactionType[] | undefined): Promise<WalletToTransactionsConnection>;
|
|
708
|
+
getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<WalletToPaymentRequestsConnection>;
|
|
640
709
|
getTotalAmountReceived(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
|
|
641
710
|
getTotalAmountSent(client: LightsparkClient, createdAfterDate?: string | undefined, createdBeforeDate?: string | undefined): Promise<CurrencyAmount>;
|
|
642
711
|
static getWalletQuery(id: string): Query<Wallet>;
|
|
643
712
|
}
|
|
644
713
|
|
|
645
|
-
type AccountToWalletsConnection = {
|
|
646
|
-
/** An object that holds pagination information about the objects in this connection. **/
|
|
647
|
-
pageInfo: PageInfo;
|
|
714
|
+
type AccountToWalletsConnection = Connection & {
|
|
648
715
|
/**
|
|
649
716
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
650
717
|
* number of objects returned in the current page (in the `entities` field).
|
|
651
718
|
**/
|
|
652
719
|
count: number;
|
|
720
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
721
|
+
pageInfo: PageInfo;
|
|
653
722
|
/** The wallets for the current page of this connection. **/
|
|
654
723
|
entities: Wallet[];
|
|
724
|
+
/** The typename of the object **/
|
|
725
|
+
typename: string;
|
|
655
726
|
};
|
|
656
727
|
|
|
728
|
+
/** This is an enum of the potential reasons why an OutgoingPayment sent from a Lightspark Node may have failed. **/
|
|
657
729
|
declare enum PaymentFailureReason {
|
|
658
730
|
/**
|
|
659
731
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -672,6 +744,7 @@ declare enum PaymentFailureReason {
|
|
|
672
744
|
RISK_SCREENING_FAILED = "RISK_SCREENING_FAILED"
|
|
673
745
|
}
|
|
674
746
|
|
|
747
|
+
/** This is an enum of the potential reasons that an attempted routed transaction through a Lightspark node may have failed. **/
|
|
675
748
|
declare enum RoutingTransactionFailureReason {
|
|
676
749
|
/**
|
|
677
750
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -683,11 +756,13 @@ declare enum RoutingTransactionFailureReason {
|
|
|
683
756
|
FORWARDING_FAILURE = "FORWARDING_FAILURE"
|
|
684
757
|
}
|
|
685
758
|
|
|
759
|
+
/** This object represents payment failures associated with your Lightspark Node. **/
|
|
686
760
|
type TransactionFailures = {
|
|
687
761
|
paymentFailures?: PaymentFailureReason[];
|
|
688
762
|
routingTransactionFailures?: RoutingTransactionFailureReason[];
|
|
689
763
|
};
|
|
690
764
|
|
|
765
|
+
/** 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. **/
|
|
691
766
|
declare class Account implements LightsparkNodeOwner {
|
|
692
767
|
readonly id: string;
|
|
693
768
|
readonly createdAt: string;
|
|
@@ -695,17 +770,17 @@ declare class Account implements LightsparkNodeOwner {
|
|
|
695
770
|
readonly typename: string;
|
|
696
771
|
readonly name?: string | undefined;
|
|
697
772
|
constructor(id: string, createdAt: string, updatedAt: string, typename: string, name?: string | undefined);
|
|
698
|
-
getApiTokens(client: LightsparkClient, first?: number | undefined): Promise<AccountToApiTokensConnection>;
|
|
773
|
+
getApiTokens(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<AccountToApiTokensConnection>;
|
|
699
774
|
getBlockchainBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<BlockchainBalance | null>;
|
|
700
775
|
getConductivity(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<number>;
|
|
701
776
|
getLocalBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<CurrencyAmount | null>;
|
|
702
|
-
getNodes(client: LightsparkClient, first?: number | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<AccountToNodesConnection>;
|
|
777
|
+
getNodes(client: LightsparkClient, first?: number | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined, after?: string | undefined): Promise<AccountToNodesConnection>;
|
|
703
778
|
getRemoteBalance(client: LightsparkClient, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<CurrencyAmount | null>;
|
|
704
779
|
getUptimePercentage(client: LightsparkClient, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetworks?: BitcoinNetwork[] | undefined, nodeIds?: string[] | undefined): Promise<number>;
|
|
705
780
|
getChannels(client: LightsparkClient, bitcoinNetwork: BitcoinNetwork, lightningNodeId?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, first?: number | undefined): Promise<AccountToChannelsConnection>;
|
|
706
781
|
getTransactions(client: LightsparkClient, first?: number | undefined, after?: string | undefined, types?: TransactionType[] | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined, statuses?: TransactionStatus[] | undefined, excludeFailures?: TransactionFailures | undefined): Promise<AccountToTransactionsConnection>;
|
|
707
782
|
getPaymentRequests(client: LightsparkClient, first?: number | undefined, after?: string | undefined, afterDate?: string | undefined, beforeDate?: string | undefined, bitcoinNetwork?: BitcoinNetwork | undefined, lightningNodeId?: string | undefined): Promise<AccountToPaymentRequestsConnection>;
|
|
708
|
-
getWallets(client: LightsparkClient, first?: number | undefined): Promise<AccountToWalletsConnection>;
|
|
783
|
+
getWallets(client: LightsparkClient, first?: number | undefined, after?: string | undefined, thirdPartyIds?: string[] | undefined): Promise<AccountToWalletsConnection>;
|
|
709
784
|
static getAccountQuery(): Query<Account>;
|
|
710
785
|
}
|
|
711
786
|
|
|
@@ -720,12 +795,13 @@ type CreateApiTokenOutput = {
|
|
|
720
795
|
clientSecret: string;
|
|
721
796
|
};
|
|
722
797
|
|
|
798
|
+
/** This object represents the estimated L1 transaction fees for the Bitcoin network. Fee estimates are separated by potential confirmation speeds for settlement. **/
|
|
723
799
|
type FeeEstimate = {
|
|
724
800
|
feeFast: CurrencyAmount;
|
|
725
801
|
feeMin: CurrencyAmount;
|
|
726
802
|
};
|
|
727
803
|
|
|
728
|
-
/** This object represents the BOLT #11 invoice
|
|
804
|
+
/** 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. **/
|
|
729
805
|
type InvoiceData = PaymentRequestData & {
|
|
730
806
|
encodedPaymentRequest: string;
|
|
731
807
|
bitcoinNetwork: BitcoinNetwork;
|
|
@@ -748,7 +824,7 @@ type InvoiceData = PaymentRequestData & {
|
|
|
748
824
|
memo?: string;
|
|
749
825
|
};
|
|
750
826
|
|
|
751
|
-
/** This object represents a BOLT #11 invoice (https://github.com/lightning/bolts/blob/master/11-payment-encoding.md)
|
|
827
|
+
/** 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. **/
|
|
752
828
|
type Invoice = PaymentRequest & Entity & {
|
|
753
829
|
/**
|
|
754
830
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -770,6 +846,7 @@ type Invoice = PaymentRequest & Entity & {
|
|
|
770
846
|
};
|
|
771
847
|
declare const getInvoiceQuery: (id: string) => Query<Invoice>;
|
|
772
848
|
|
|
849
|
+
/** This is an enum for potential invoice types. **/
|
|
773
850
|
declare enum InvoiceType {
|
|
774
851
|
/**
|
|
775
852
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -782,6 +859,7 @@ declare enum InvoiceType {
|
|
|
782
859
|
AMP = "AMP"
|
|
783
860
|
}
|
|
784
861
|
|
|
862
|
+
/** 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. **/
|
|
785
863
|
type LightningTransaction = Transaction & Entity & {
|
|
786
864
|
/**
|
|
787
865
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -805,6 +883,7 @@ type LightningTransaction = Transaction & Entity & {
|
|
|
805
883
|
};
|
|
806
884
|
declare const getLightningTransactionQuery: (id: string) => Query<LightningTransaction>;
|
|
807
885
|
|
|
886
|
+
/** This is an enum representing a particular reason why an htlc sent over the Lightning Network may have failed. **/
|
|
808
887
|
declare enum HtlcAttemptFailureCode {
|
|
809
888
|
/**
|
|
810
889
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -840,7 +919,7 @@ declare enum HtlcAttemptFailureCode {
|
|
|
840
919
|
UNREADABLE_FAILURE = "UNREADABLE_FAILURE"
|
|
841
920
|
}
|
|
842
921
|
|
|
843
|
-
/**
|
|
922
|
+
/** This is an enum of all potential statuses of a payment attempt made from a Lightspark Node. **/
|
|
844
923
|
declare enum OutgoingPaymentAttemptStatus {
|
|
845
924
|
/**
|
|
846
925
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -852,7 +931,7 @@ declare enum OutgoingPaymentAttemptStatus {
|
|
|
852
931
|
FAILED = "FAILED"
|
|
853
932
|
}
|
|
854
933
|
|
|
855
|
-
/**
|
|
934
|
+
/** 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. **/
|
|
856
935
|
type Hop = Entity & {
|
|
857
936
|
/**
|
|
858
937
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -881,17 +960,21 @@ type Hop = Entity & {
|
|
|
881
960
|
declare const getHopQuery: (id: string) => Query<Hop>;
|
|
882
961
|
|
|
883
962
|
/** The connection from an outgoing payment attempt to the list of sequential hops that define the path from sender node to recipient node. **/
|
|
884
|
-
type OutgoingPaymentAttemptToHopsConnection = {
|
|
963
|
+
type OutgoingPaymentAttemptToHopsConnection = Connection & {
|
|
885
964
|
/**
|
|
886
965
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
887
966
|
* number of objects returned in the current page (in the `entities` field).
|
|
888
967
|
**/
|
|
889
968
|
count: number;
|
|
969
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
970
|
+
pageInfo: PageInfo;
|
|
890
971
|
/** The hops for the current page of this connection. **/
|
|
891
972
|
entities: Hop[];
|
|
973
|
+
/** The typename of the object **/
|
|
974
|
+
typename: string;
|
|
892
975
|
};
|
|
893
976
|
|
|
894
|
-
/**
|
|
977
|
+
/** 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. **/
|
|
895
978
|
declare class OutgoingPaymentAttempt implements Entity {
|
|
896
979
|
readonly id: string;
|
|
897
980
|
readonly createdAt: string;
|
|
@@ -905,26 +988,30 @@ declare class OutgoingPaymentAttempt implements Entity {
|
|
|
905
988
|
readonly amount?: CurrencyAmount | undefined;
|
|
906
989
|
readonly fees?: CurrencyAmount | undefined;
|
|
907
990
|
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);
|
|
908
|
-
getHops(client: LightsparkClient, first?: number | undefined): Promise<OutgoingPaymentAttemptToHopsConnection>;
|
|
991
|
+
getHops(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentAttemptToHopsConnection>;
|
|
909
992
|
static getOutgoingPaymentAttemptQuery(id: string): Query<OutgoingPaymentAttempt>;
|
|
910
993
|
}
|
|
911
994
|
|
|
912
995
|
/** The connection from outgoing payment to all attempts. **/
|
|
913
|
-
type OutgoingPaymentToAttemptsConnection = {
|
|
996
|
+
type OutgoingPaymentToAttemptsConnection = Connection & {
|
|
914
997
|
/**
|
|
915
998
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
916
999
|
* number of objects returned in the current page (in the `entities` field).
|
|
917
1000
|
**/
|
|
918
1001
|
count: number;
|
|
1002
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1003
|
+
pageInfo: PageInfo;
|
|
919
1004
|
/** The attempts for the current page of this connection. **/
|
|
920
1005
|
entities: OutgoingPaymentAttempt[];
|
|
1006
|
+
/** The typename of the object **/
|
|
1007
|
+
typename: string;
|
|
921
1008
|
};
|
|
922
1009
|
|
|
923
1010
|
type RichText = {
|
|
924
1011
|
text: string;
|
|
925
1012
|
};
|
|
926
1013
|
|
|
927
|
-
/**
|
|
1014
|
+
/** 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. **/
|
|
928
1015
|
declare class OutgoingPayment implements LightningTransaction {
|
|
929
1016
|
readonly id: string;
|
|
930
1017
|
readonly createdAt: string;
|
|
@@ -941,7 +1028,7 @@ declare class OutgoingPayment implements LightningTransaction {
|
|
|
941
1028
|
readonly failureReason?: PaymentFailureReason | undefined;
|
|
942
1029
|
readonly failureMessage?: RichText | undefined;
|
|
943
1030
|
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);
|
|
944
|
-
getAttempts(client: LightsparkClient, first?: number | undefined): Promise<OutgoingPaymentToAttemptsConnection>;
|
|
1031
|
+
getAttempts(client: LightsparkClient, first?: number | undefined, after?: string | undefined): Promise<OutgoingPaymentToAttemptsConnection>;
|
|
945
1032
|
static getOutgoingPaymentQuery(id: string): Query<OutgoingPayment>;
|
|
946
1033
|
}
|
|
947
1034
|
|
|
@@ -991,6 +1078,7 @@ type TransactionUpdate = {
|
|
|
991
1078
|
transactionHash?: string;
|
|
992
1079
|
};
|
|
993
1080
|
|
|
1081
|
+
/** This is an enum of the potential modes that your Bitcoin withdrawal can take. **/
|
|
994
1082
|
declare enum WithdrawalMode {
|
|
995
1083
|
/**
|
|
996
1084
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -1001,6 +1089,7 @@ declare enum WithdrawalMode {
|
|
|
1001
1089
|
WALLET_THEN_CHANNELS = "WALLET_THEN_CHANNELS"
|
|
1002
1090
|
}
|
|
1003
1091
|
|
|
1092
|
+
/** This is an enum of the potential statuses that a Withdrawal can take. **/
|
|
1004
1093
|
declare enum WithdrawalRequestStatus {
|
|
1005
1094
|
/**
|
|
1006
1095
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -1012,7 +1101,7 @@ declare enum WithdrawalRequestStatus {
|
|
|
1012
1101
|
SUCCESSFUL = "SUCCESSFUL"
|
|
1013
1102
|
}
|
|
1014
1103
|
|
|
1015
|
-
/**
|
|
1104
|
+
/** 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. **/
|
|
1016
1105
|
type OnChainTransaction = Transaction & Entity & {
|
|
1017
1106
|
/**
|
|
1018
1107
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -1055,7 +1144,7 @@ type OnChainTransaction = Transaction & Entity & {
|
|
|
1055
1144
|
};
|
|
1056
1145
|
declare const getOnChainTransactionQuery: (id: string) => Query<OnChainTransaction>;
|
|
1057
1146
|
|
|
1058
|
-
/**
|
|
1147
|
+
/** 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. **/
|
|
1059
1148
|
type ChannelClosingTransaction = OnChainTransaction & Transaction & Entity & {
|
|
1060
1149
|
/**
|
|
1061
1150
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -1112,7 +1201,7 @@ type WithdrawalRequestToChannelClosingTransactionsConnection = {
|
|
|
1112
1201
|
entities: ChannelClosingTransaction[];
|
|
1113
1202
|
};
|
|
1114
1203
|
|
|
1115
|
-
/**
|
|
1204
|
+
/** 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. **/
|
|
1116
1205
|
type ChannelOpeningTransaction = OnChainTransaction & Transaction & Entity & {
|
|
1117
1206
|
/**
|
|
1118
1207
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -1169,6 +1258,7 @@ type WithdrawalRequestToChannelOpeningTransactionsConnection = {
|
|
|
1169
1258
|
entities: ChannelOpeningTransaction[];
|
|
1170
1259
|
};
|
|
1171
1260
|
|
|
1261
|
+
/** 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. **/
|
|
1172
1262
|
declare class WithdrawalRequest implements Entity {
|
|
1173
1263
|
readonly id: string;
|
|
1174
1264
|
readonly createdAt: string;
|
|
@@ -1475,10 +1565,16 @@ type CreateApiTokenInput = {
|
|
|
1475
1565
|
};
|
|
1476
1566
|
|
|
1477
1567
|
type CreateInvoiceInput = {
|
|
1568
|
+
/** The node from which to create the invoice. **/
|
|
1478
1569
|
nodeId: string;
|
|
1570
|
+
/** The amount for which the invoice should be created, in millisatoshis. **/
|
|
1479
1571
|
amountMsats: number;
|
|
1480
1572
|
memo?: string;
|
|
1481
1573
|
invoiceType?: InvoiceType;
|
|
1574
|
+
/** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
|
|
1575
|
+
expirySecs?: number;
|
|
1576
|
+
paymentHash?: string;
|
|
1577
|
+
preimageNonce?: string;
|
|
1482
1578
|
};
|
|
1483
1579
|
|
|
1484
1580
|
type CreateInvoiceOutput = {
|
|
@@ -1495,6 +1591,10 @@ type CreateLnurlInvoiceInput = {
|
|
|
1495
1591
|
* payment) of the resulting Bolt 11 invoice.
|
|
1496
1592
|
**/
|
|
1497
1593
|
metadataHash: string;
|
|
1594
|
+
/** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
|
|
1595
|
+
expirySecs?: number;
|
|
1596
|
+
paymentHash?: string;
|
|
1597
|
+
preimageNonce?: string;
|
|
1498
1598
|
};
|
|
1499
1599
|
|
|
1500
1600
|
type CreateNodeWalletAddressInput = {
|
|
@@ -1529,11 +1629,22 @@ type CreateTestModePaymentInput = {
|
|
|
1529
1629
|
amountMsats?: number;
|
|
1530
1630
|
};
|
|
1531
1631
|
|
|
1632
|
+
/** 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. **/
|
|
1532
1633
|
type CreateTestModePaymentoutput = {
|
|
1533
1634
|
/** The payment that has been sent. **/
|
|
1534
1635
|
paymentId: string;
|
|
1535
1636
|
};
|
|
1536
1637
|
|
|
1638
|
+
/** This is an enum identifying a type of crypto sanctions screening provider. **/
|
|
1639
|
+
declare enum CryptoSanctionsScreeningProvider {
|
|
1640
|
+
/**
|
|
1641
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1642
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1643
|
+
*/
|
|
1644
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1645
|
+
CHAINALYSIS = "CHAINALYSIS"
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1537
1648
|
type DeleteApiTokenInput = {
|
|
1538
1649
|
apiTokenId: string;
|
|
1539
1650
|
};
|
|
@@ -1542,7 +1653,7 @@ type DeleteApiTokenOutput = {
|
|
|
1542
1653
|
accountId: string;
|
|
1543
1654
|
};
|
|
1544
1655
|
|
|
1545
|
-
/**
|
|
1656
|
+
/** 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. **/
|
|
1546
1657
|
type Deposit = OnChainTransaction & Transaction & Entity & {
|
|
1547
1658
|
/**
|
|
1548
1659
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -1596,7 +1707,7 @@ type FundNodeOutput = {
|
|
|
1596
1707
|
amount: CurrencyAmount;
|
|
1597
1708
|
};
|
|
1598
1709
|
|
|
1599
|
-
/** This
|
|
1710
|
+
/** 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. **/
|
|
1600
1711
|
declare class GraphNode implements Node {
|
|
1601
1712
|
readonly id: string;
|
|
1602
1713
|
readonly createdAt: string;
|
|
@@ -1613,7 +1724,7 @@ declare class GraphNode implements Node {
|
|
|
1613
1724
|
static getGraphNodeQuery(id: string): Query<GraphNode>;
|
|
1614
1725
|
}
|
|
1615
1726
|
|
|
1616
|
-
/**
|
|
1727
|
+
/** This is an enum that enumerates all potential statuses for an incoming payment attempt. **/
|
|
1617
1728
|
declare enum IncomingPaymentAttemptStatus {
|
|
1618
1729
|
/**
|
|
1619
1730
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -1626,7 +1737,7 @@ declare enum IncomingPaymentAttemptStatus {
|
|
|
1626
1737
|
UNKNOWN = "UNKNOWN"
|
|
1627
1738
|
}
|
|
1628
1739
|
|
|
1629
|
-
/**
|
|
1740
|
+
/** 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. **/
|
|
1630
1741
|
type IncomingPaymentAttempt = Entity & {
|
|
1631
1742
|
/**
|
|
1632
1743
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -1651,17 +1762,21 @@ type IncomingPaymentAttempt = Entity & {
|
|
|
1651
1762
|
declare const getIncomingPaymentAttemptQuery: (id: string) => Query<IncomingPaymentAttempt>;
|
|
1652
1763
|
|
|
1653
1764
|
/** The connection from incoming payment to all attempts. **/
|
|
1654
|
-
type IncomingPaymentToAttemptsConnection = {
|
|
1765
|
+
type IncomingPaymentToAttemptsConnection = Connection & {
|
|
1655
1766
|
/**
|
|
1656
1767
|
* The total count of objects in this connection, using the current filters. It is different from the
|
|
1657
1768
|
* number of objects returned in the current page (in the `entities` field).
|
|
1658
1769
|
**/
|
|
1659
1770
|
count: number;
|
|
1771
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
1772
|
+
pageInfo: PageInfo;
|
|
1660
1773
|
/** The incoming payment attempts for the current page of this connection. **/
|
|
1661
1774
|
entities: IncomingPaymentAttempt[];
|
|
1775
|
+
/** The typename of the object **/
|
|
1776
|
+
typename: string;
|
|
1662
1777
|
};
|
|
1663
1778
|
|
|
1664
|
-
/**
|
|
1779
|
+
/** 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. **/
|
|
1665
1780
|
declare class IncomingPayment implements LightningTransaction {
|
|
1666
1781
|
readonly id: string;
|
|
1667
1782
|
readonly createdAt: string;
|
|
@@ -1675,7 +1790,7 @@ declare class IncomingPayment implements LightningTransaction {
|
|
|
1675
1790
|
readonly originId?: string | undefined;
|
|
1676
1791
|
readonly paymentRequestId?: string | undefined;
|
|
1677
1792
|
constructor(id: string, createdAt: string, updatedAt: string, status: TransactionStatus, amount: CurrencyAmount, destinationId: string, typename: string, resolvedAt?: string | undefined, transactionHash?: string | undefined, originId?: string | undefined, paymentRequestId?: string | undefined);
|
|
1678
|
-
getAttempts(client: LightsparkClient, first?: number | undefined, statuses?: IncomingPaymentAttemptStatus[] | undefined): Promise<IncomingPaymentToAttemptsConnection>;
|
|
1793
|
+
getAttempts(client: LightsparkClient, first?: number | undefined, statuses?: IncomingPaymentAttemptStatus[] | undefined, after?: string | undefined): Promise<IncomingPaymentToAttemptsConnection>;
|
|
1679
1794
|
static getIncomingPaymentQuery(id: string): Query<IncomingPayment>;
|
|
1680
1795
|
}
|
|
1681
1796
|
|
|
@@ -1745,7 +1860,19 @@ type RequestWithdrawalOutput = {
|
|
|
1745
1860
|
requestId: string;
|
|
1746
1861
|
};
|
|
1747
1862
|
|
|
1748
|
-
/**
|
|
1863
|
+
/** 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. **/
|
|
1864
|
+
declare enum RiskRating {
|
|
1865
|
+
/**
|
|
1866
|
+
* This is an enum value that represents values that could be added in the future.
|
|
1867
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
1868
|
+
*/
|
|
1869
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
1870
|
+
HIGH_RISK = "HIGH_RISK",
|
|
1871
|
+
LOW_RISK = "LOW_RISK",
|
|
1872
|
+
UNKNOWN = "UNKNOWN"
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
/** 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. **/
|
|
1749
1876
|
type RoutingTransaction = LightningTransaction & Transaction & Entity & {
|
|
1750
1877
|
/**
|
|
1751
1878
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -1782,6 +1909,15 @@ type RoutingTransaction = LightningTransaction & Transaction & Entity & {
|
|
|
1782
1909
|
};
|
|
1783
1910
|
declare const getRoutingTransactionQuery: (id: string) => Query<RoutingTransaction>;
|
|
1784
1911
|
|
|
1912
|
+
type ScreenBitcoinAddressesInput = {
|
|
1913
|
+
provider: CryptoSanctionsScreeningProvider;
|
|
1914
|
+
addresses: string[];
|
|
1915
|
+
};
|
|
1916
|
+
|
|
1917
|
+
type ScreenBitcoinAddressesOutput = {
|
|
1918
|
+
ratings: RiskRating[];
|
|
1919
|
+
};
|
|
1920
|
+
|
|
1785
1921
|
type SendPaymentInput = {
|
|
1786
1922
|
/** The node from where you want to send the payment. **/
|
|
1787
1923
|
nodeId: string;
|
|
@@ -1800,6 +1936,7 @@ type SendPaymentOutput = {
|
|
|
1800
1936
|
paymentId: string;
|
|
1801
1937
|
};
|
|
1802
1938
|
|
|
1939
|
+
/** This is an enum of the potential event types that can be associated with your Lightspark wallets. **/
|
|
1803
1940
|
declare enum WebhookEventType {
|
|
1804
1941
|
/**
|
|
1805
1942
|
* This is an enum value that represents values that could be added in the future.
|
|
@@ -1812,10 +1949,11 @@ declare enum WebhookEventType {
|
|
|
1812
1949
|
WALLET_OUTGOING_PAYMENT_FINISHED = "WALLET_OUTGOING_PAYMENT_FINISHED",
|
|
1813
1950
|
WALLET_INCOMING_PAYMENT_FINISHED = "WALLET_INCOMING_PAYMENT_FINISHED",
|
|
1814
1951
|
WALLET_WITHDRAWAL_FINISHED = "WALLET_WITHDRAWAL_FINISHED",
|
|
1815
|
-
WALLET_FUNDS_RECEIVED = "WALLET_FUNDS_RECEIVED"
|
|
1952
|
+
WALLET_FUNDS_RECEIVED = "WALLET_FUNDS_RECEIVED",
|
|
1953
|
+
REMOTE_SIGNING = "REMOTE_SIGNING"
|
|
1816
1954
|
}
|
|
1817
1955
|
|
|
1818
|
-
/**
|
|
1956
|
+
/** 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. **/
|
|
1819
1957
|
type Withdrawal = OnChainTransaction & Transaction & Entity & {
|
|
1820
1958
|
/**
|
|
1821
1959
|
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
@@ -1860,4 +1998,4 @@ type Withdrawal = OnChainTransaction & Transaction & Entity & {
|
|
|
1860
1998
|
};
|
|
1861
1999
|
declare const getWithdrawalQuery: (id: string) => Query<Withdrawal>;
|
|
1862
2000
|
|
|
1863
|
-
export {
|
|
2001
|
+
export { IncomingPaymentToAttemptsConnection as $, Account as A, Balances as B, Channel as C, CreateTestModeInvoiceOutput as D, CreateTestModePaymentInput as E, CreateTestModePaymentoutput as F, CryptoSanctionsScreeningProvider as G, CurrencyAmount as H, CurrencyUnit as I, DeleteApiTokenInput as J, DeleteApiTokenOutput as K, LightsparkClient as L, Deposit as M, getDepositQuery as N, Entity as O, FeeEstimate as P, FundNodeInput as Q, FundNodeOutput as R, GraphNode as S, Hop as T, getHopQuery as U, HtlcAttemptFailureCode as V, WebhookEventType as W, IncomingPayment as X, IncomingPaymentAttempt as Y, getIncomingPaymentAttemptQuery as Z, IncomingPaymentAttemptStatus as _, AccountToApiTokensConnection as a, WithdrawalRequestToChannelClosingTransactionsConnection as a$, Invoice as a0, getInvoiceQuery as a1, InvoiceData as a2, InvoiceType as a3, LightningFeeEstimateForInvoiceInput as a4, LightningFeeEstimateForNodeInput as a5, LightningFeeEstimateOutput as a6, LightningTransaction as a7, getLightningTransactionQuery as a8, LightsparkNode as a9, RequestWithdrawalOutput as aA, RichText as aB, RiskRating as aC, RoutingTransaction as aD, getRoutingTransactionQuery as aE, RoutingTransactionFailureReason as aF, ScreenBitcoinAddressesInput as aG, ScreenBitcoinAddressesOutput as aH, Secret as aI, SendPaymentInput as aJ, SendPaymentOutput as aK, SingleNodeDashboard as aL, Transaction as aM, getTransactionQuery as aN, TransactionFailures as aO, TransactionStatus as aP, TransactionType as aQ, TransactionUpdate as aR, Wallet as aS, WalletStatus as aT, WalletToPaymentRequestsConnection as aU, WalletToTransactionsConnection as aV, Withdrawal as aW, getWithdrawalQuery as aX, WithdrawalMode as aY, WithdrawalRequest as aZ, WithdrawalRequestStatus as a_, LightsparkNodeOwner as aa, getLightsparkNodeOwnerQuery as ab, LightsparkNodePurpose as ac, LightsparkNodeStatus as ad, LightsparkNodeToChannelsConnection as ae, Node as af, NodeAddress as ag, NodeAddressType as ah, NodeToAddressesConnection as ai, OnChainTransaction as aj, getOnChainTransactionQuery as ak, OutgoingPayment as al, OutgoingPaymentAttempt as am, OutgoingPaymentAttemptStatus as an, OutgoingPaymentAttemptToHopsConnection as ao, OutgoingPaymentToAttemptsConnection as ap, PageInfo as aq, PayInvoiceInput as ar, PayInvoiceOutput as as, PaymentFailureReason as at, PaymentRequest as au, getPaymentRequestQuery as av, PaymentRequestData as aw, PaymentRequestStatus as ax, Permission as ay, RequestWithdrawalInput as az, AccountToChannelsConnection as b, WithdrawalRequestToChannelOpeningTransactionsConnection as b0, AccountToNodesConnection as c, AccountToPaymentRequestsConnection as d, AccountToTransactionsConnection as e, AccountToWalletsConnection as f, ApiToken as g, getApiTokenQuery as h, BitcoinNetwork as i, BlockchainBalance as j, ChannelClosingTransaction as k, getChannelClosingTransactionQuery as l, ChannelFees as m, ChannelOpeningTransaction as n, getChannelOpeningTransactionQuery as o, ChannelStatus as p, ChannelToTransactionsConnection as q, Connection as r, CreateApiTokenInput as s, CreateApiTokenOutput as t, CreateInvoiceInput as u, CreateInvoiceOutput as v, CreateLnurlInvoiceInput as w, CreateNodeWalletAddressInput as x, CreateNodeWalletAddressOutput as y, CreateTestModeInvoiceInput as z };
|