@lightsparkdev/lightspark-sdk 0.2.3 → 0.2.4
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 +6 -0
- package/README.md +0 -1
- package/dist/.DS_Store +0 -0
- package/dist/{Withdrawal-cc441c06.d.ts → Withdrawal-f68ab02c.d.ts} +29 -29
- package/dist/{Withdrawal-bf5c1b52.d.ts → Withdrawal-f8570ed4.d.ts} +30 -29
- package/dist/{chunk-5Z7FB6OT.js → chunk-OKTW3ZBO.js} +257 -31
- package/dist/index.cjs +16 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -14
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/client.ts +13 -10
- package/src/objects/{WalletDashboard.ts → SingleNodeDashboard.ts} +2 -2
- package/src/objects/index.ts +1 -1
- package/dist/Withdrawal-27a4d10d.d.ts +0 -1672
- package/dist/Withdrawal-e042fa79.d.ts +0 -1740
- package/dist/Withdrawal-ebb4865c.d.ts +0 -1688
- package/dist/chunk-3VRI7CHE.js +0 -5508
- package/dist/chunk-XFOVS6EY.js +0 -5524
package/dist/objects/index.js
CHANGED
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
getRoutingTransactionQuery,
|
|
43
43
|
getTransactionQuery,
|
|
44
44
|
getWithdrawalQuery
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-OKTW3ZBO.js";
|
|
46
46
|
export {
|
|
47
47
|
Account_default as Account,
|
|
48
48
|
AccountToChannelsConnection_default as AccountToChannelsConnection,
|
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
package/src/client.ts
CHANGED
|
@@ -33,7 +33,7 @@ import { PayInvoice } from "./graphql/PayInvoice.js";
|
|
|
33
33
|
import { RecoverNodeSigningKey } from "./graphql/RecoverNodeSigningKey.js";
|
|
34
34
|
import { RequestWithdrawal } from "./graphql/RequestWithdrawal.js";
|
|
35
35
|
import { SendPayment } from "./graphql/SendPayment.js";
|
|
36
|
-
import { SingleNodeDashboard } from "./graphql/SingleNodeDashboard.js";
|
|
36
|
+
import { SingleNodeDashboard as SingleNodeDashboardQuery } from "./graphql/SingleNodeDashboard.js";
|
|
37
37
|
import { TransactionsForNode } from "./graphql/TransactionsForNode.js";
|
|
38
38
|
import { TransactionSubscription } from "./graphql/TransactionSubscription.js";
|
|
39
39
|
import Account from "./objects/Account.js";
|
|
@@ -50,11 +50,11 @@ import OutgoingPayment, {
|
|
|
50
50
|
OutgoingPaymentFromJson,
|
|
51
51
|
} from "./objects/OutgoingPayment.js";
|
|
52
52
|
import Permission from "./objects/Permission.js";
|
|
53
|
+
import SingleNodeDashboard from "./objects/SingleNodeDashboard.js";
|
|
53
54
|
import Transaction, { TransactionFromJson } from "./objects/Transaction.js";
|
|
54
55
|
import TransactionUpdate, {
|
|
55
56
|
TransactionUpdateFromJson,
|
|
56
57
|
} from "./objects/TransactionUpdate.js";
|
|
57
|
-
import WalletDashboard from "./objects/WalletDashboard.js";
|
|
58
58
|
import WithdrawalMode from "./objects/WithdrawalMode.js";
|
|
59
59
|
import WithdrawalRequest, {
|
|
60
60
|
WithdrawalRequestFromJson,
|
|
@@ -292,7 +292,7 @@ class LightsparkClient {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
/**
|
|
295
|
-
* Gets a basic dashboard for a single node, including recent transactions. See `
|
|
295
|
+
* Gets a basic dashboard for a single node, including recent transactions. See `SingleNodeDashboard` for which info is
|
|
296
296
|
* included.
|
|
297
297
|
*
|
|
298
298
|
* @param nodeId The node ID for which to get a dashboard.
|
|
@@ -305,13 +305,16 @@ class LightsparkClient {
|
|
|
305
305
|
nodeId: string,
|
|
306
306
|
bitcoinNetwork: BitcoinNetwork = BitcoinNetwork.MAINNET,
|
|
307
307
|
transactionsAfterDate: Maybe<string> = undefined
|
|
308
|
-
): Promise<
|
|
309
|
-
const response = await this.requester.makeRawRequest(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
308
|
+
): Promise<SingleNodeDashboard> {
|
|
309
|
+
const response = await this.requester.makeRawRequest(
|
|
310
|
+
SingleNodeDashboardQuery,
|
|
311
|
+
{
|
|
312
|
+
nodeId: nodeId,
|
|
313
|
+
network: bitcoinNetwork,
|
|
314
|
+
numTransactions: 20,
|
|
315
|
+
transactionsAfterDate,
|
|
316
|
+
}
|
|
317
|
+
);
|
|
315
318
|
if (!response.current_account) {
|
|
316
319
|
throw new LightsparkAuthException("No current account");
|
|
317
320
|
}
|
|
@@ -5,7 +5,7 @@ import LightsparkNodeStatus from "./LightsparkNodeStatus.js";
|
|
|
5
5
|
import NodeAddressType from "./NodeAddressType.js";
|
|
6
6
|
import Transaction from "./Transaction.js";
|
|
7
7
|
|
|
8
|
-
type
|
|
8
|
+
type SingleNodeDashboard = {
|
|
9
9
|
id: string;
|
|
10
10
|
displayName: string;
|
|
11
11
|
purpose: Maybe<LightsparkNodePurpose>;
|
|
@@ -29,4 +29,4 @@ type WalletDashboard = {
|
|
|
29
29
|
recentTransactions: Transaction[];
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export default
|
|
32
|
+
export default SingleNodeDashboard;
|
package/src/objects/index.ts
CHANGED
|
@@ -95,13 +95,13 @@ export { default as RoutingTransactionFailureReason } from "./RoutingTransaction
|
|
|
95
95
|
export { default as Secret } from "./Secret.js";
|
|
96
96
|
export { default as SendPaymentInput } from "./SendPaymentInput.js";
|
|
97
97
|
export { default as SendPaymentOutput } from "./SendPaymentOutput.js";
|
|
98
|
+
export { default as SingleNodeDashboard } from "./SingleNodeDashboard.js";
|
|
98
99
|
export { default as Transaction, getTransactionQuery } from "./Transaction.js";
|
|
99
100
|
export { default as TransactionFailures } from "./TransactionFailures.js";
|
|
100
101
|
export { default as TransactionStatus } from "./TransactionStatus.js";
|
|
101
102
|
export { default as TransactionType } from "./TransactionType.js";
|
|
102
103
|
export { default as TransactionUpdate } from "./TransactionUpdate.js";
|
|
103
104
|
export { default as Wallet } from "./Wallet.js";
|
|
104
|
-
export { default as WalletDashboard } from "./WalletDashboard.js";
|
|
105
105
|
export { default as WebhookEventType } from "./WebhookEventType.js";
|
|
106
106
|
export { default as Withdrawal, getWithdrawalQuery } from "./Withdrawal.js";
|
|
107
107
|
export { default as WithdrawalMode } from "./WithdrawalMode.js";
|