@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.
@@ -42,7 +42,7 @@ import {
42
42
  getRoutingTransactionQuery,
43
43
  getTransactionQuery,
44
44
  getWithdrawalQuery
45
- } from "../chunk-ZBDRJ7IU.js";
45
+ } from "../chunk-OKTW3ZBO.js";
46
46
  export {
47
47
  Account_default as Account,
48
48
  AccountToChannelsConnection_default as AccountToChannelsConnection,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
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 `WalletDashboard` for which info is
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<WalletDashboard> {
309
- const response = await this.requester.makeRawRequest(SingleNodeDashboard, {
310
- nodeId: nodeId,
311
- network: bitcoinNetwork,
312
- numTransactions: 20,
313
- transactionsAfterDate,
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 WalletDashboard = {
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 WalletDashboard;
32
+ export default SingleNodeDashboard;
@@ -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";