@lightsparkdev/lightspark-sdk 0.2.4 → 0.2.6

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @lightsparkdev/lightspark-sdk
2
2
 
3
+ ## 0.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - f2c65f3: Release
8
+ - Regenerate the SDKs and fix a circular dep in the internal-sdk (#4762)
9
+
10
+ ## 0.2.5
11
+
12
+ ### Patch Changes
13
+
14
+ - 9491bd4: Bumping to the newest core patch version.
15
+
3
16
  ## 0.2.4
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # The Lightspark JS+TS SDK
2
2
 
3
+ ![npm (scoped)](https://img.shields.io/npm/v/@lightsparkdev/lightspark-sdk)
4
+
3
5
  This is the Lightspark Typescript SDK, which can be used either from a node or browser environment. It's used to manage accounts, nodes, wallets, etc. See the examples directory for some examples of how to use it!
4
6
 
5
7
  ## Getting started
@@ -1388,6 +1388,34 @@ type CreateNodeWalletAddressOutput = {
1388
1388
  walletAddress: string;
1389
1389
  };
1390
1390
 
1391
+ type CreateTestModeInvoiceInput = {
1392
+ localNodeId: string;
1393
+ amountMsats: number;
1394
+ memo?: string;
1395
+ invoiceType?: InvoiceType;
1396
+ };
1397
+
1398
+ type CreateTestModeInvoiceOutput = {
1399
+ encodedPaymentRequest: string;
1400
+ };
1401
+
1402
+ type CreateTestModePaymentInput = {
1403
+ /** The node to where you want to send the payment. **/
1404
+ localNodeId: string;
1405
+ /** The invoice you want to be paid (as defined by the BOLT11 standard). **/
1406
+ encodedInvoice: string;
1407
+ /**
1408
+ * The amount you will be paid for this invoice, expressed in msats. It should ONLY be set when the
1409
+ * invoice amount is zero.
1410
+ **/
1411
+ amountMsats?: number;
1412
+ };
1413
+
1414
+ type CreateTestModePaymentoutput = {
1415
+ /** The payment that has been sent. **/
1416
+ paymentId: string;
1417
+ };
1418
+
1391
1419
  type DeleteApiTokenInput = {
1392
1420
  apiTokenId: string;
1393
1421
  };
@@ -1736,4 +1764,4 @@ type Withdrawal = OnChainTransaction & Transaction & Entity & {
1736
1764
  };
1737
1765
  declare const getWithdrawalQuery: (id: string) => Query<Withdrawal>;
1738
1766
 
1739
- export { LightningTransaction as $, Account as A, Balances as B, Channel as C, DeleteApiTokenInput as D, Deposit as E, getDepositQuery as F, Entity as G, FeeEstimate as H, FundNodeInput as I, FundNodeOutput as J, GraphNode as K, LightsparkClient as L, Hop as M, getHopQuery as N, HtlcAttemptFailureCode as O, IncomingPayment as P, IncomingPaymentAttempt as Q, getIncomingPaymentAttemptQuery as R, IncomingPaymentAttemptStatus as S, IncomingPaymentToAttemptsConnection as T, Invoice as U, getInvoiceQuery as V, InvoiceData as W, InvoiceType as X, LightningFeeEstimateForInvoiceInput as Y, LightningFeeEstimateForNodeInput as Z, LightningFeeEstimateOutput as _, AccountToApiTokensConnection as a, getLightningTransactionQuery as a0, LightsparkNode as a1, LightsparkNodePurpose as a2, LightsparkNodeStatus as a3, LightsparkNodeToChannelsConnection as a4, Node as a5, NodeAddress as a6, NodeAddressType as a7, NodeToAddressesConnection as a8, OnChainTransaction as a9, getTransactionQuery as aA, TransactionFailures as aB, TransactionStatus as aC, TransactionType as aD, TransactionUpdate as aE, Wallet as aF, WebhookEventType as aG, Withdrawal as aH, getWithdrawalQuery as aI, WithdrawalMode as aJ, WithdrawalRequest as aK, WithdrawalRequestStatus as aL, WithdrawalRequestToChannelClosingTransactionsConnection as aM, WithdrawalRequestToChannelOpeningTransactionsConnection as aN, getOnChainTransactionQuery as aa, OutgoingPayment as ab, OutgoingPaymentAttempt as ac, OutgoingPaymentAttemptStatus as ad, OutgoingPaymentAttemptToHopsConnection as ae, OutgoingPaymentToAttemptsConnection as af, PageInfo as ag, PayInvoiceInput as ah, PayInvoiceOutput as ai, PaymentFailureReason as aj, PaymentRequest as ak, getPaymentRequestQuery as al, PaymentRequestData as am, PaymentRequestStatus as an, Permission as ao, RequestWithdrawalInput as ap, RequestWithdrawalOutput as aq, RichText as ar, RoutingTransaction as as, getRoutingTransactionQuery as at, RoutingTransactionFailureReason as au, Secret as av, SendPaymentInput as aw, SendPaymentOutput as ax, SingleNodeDashboard as ay, Transaction as az, AccountToChannelsConnection as b, 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, CreateApiTokenInput as r, CreateApiTokenOutput as s, CreateInvoiceInput as t, CreateInvoiceOutput as u, CreateNodeWalletAddressInput as v, CreateNodeWalletAddressOutput as w, CurrencyAmount as x, CurrencyUnit as y, DeleteApiTokenOutput as z };
1767
+ export { InvoiceType as $, Account as A, Balances as B, Channel as C, CreateTestModePaymentoutput as D, CurrencyAmount as E, CurrencyUnit as F, DeleteApiTokenInput as G, DeleteApiTokenOutput as H, Deposit as I, getDepositQuery as J, Entity as K, LightsparkClient as L, FeeEstimate as M, FundNodeInput as N, FundNodeOutput as O, GraphNode as P, Hop as Q, getHopQuery as R, HtlcAttemptFailureCode as S, IncomingPayment as T, IncomingPaymentAttempt as U, getIncomingPaymentAttemptQuery as V, IncomingPaymentAttemptStatus as W, IncomingPaymentToAttemptsConnection as X, Invoice as Y, getInvoiceQuery as Z, InvoiceData as _, AccountToApiTokensConnection as a, LightningFeeEstimateForInvoiceInput as a0, LightningFeeEstimateForNodeInput as a1, LightningFeeEstimateOutput as a2, LightningTransaction as a3, getLightningTransactionQuery as a4, LightsparkNode as a5, LightsparkNodePurpose as a6, LightsparkNodeStatus as a7, LightsparkNodeToChannelsConnection as a8, Node as a9, SendPaymentInput as aA, SendPaymentOutput as aB, SingleNodeDashboard as aC, Transaction as aD, getTransactionQuery as aE, TransactionFailures as aF, TransactionStatus as aG, TransactionType as aH, TransactionUpdate as aI, Wallet as aJ, WebhookEventType as aK, Withdrawal as aL, getWithdrawalQuery as aM, WithdrawalMode as aN, WithdrawalRequest as aO, WithdrawalRequestStatus as aP, WithdrawalRequestToChannelClosingTransactionsConnection as aQ, WithdrawalRequestToChannelOpeningTransactionsConnection as aR, NodeAddress as aa, NodeAddressType as ab, NodeToAddressesConnection as ac, OnChainTransaction as ad, getOnChainTransactionQuery as ae, OutgoingPayment as af, OutgoingPaymentAttempt as ag, OutgoingPaymentAttemptStatus as ah, OutgoingPaymentAttemptToHopsConnection as ai, OutgoingPaymentToAttemptsConnection as aj, PageInfo as ak, PayInvoiceInput as al, PayInvoiceOutput as am, PaymentFailureReason as an, PaymentRequest as ao, getPaymentRequestQuery as ap, PaymentRequestData as aq, PaymentRequestStatus as ar, Permission as as, RequestWithdrawalInput as at, RequestWithdrawalOutput as au, RichText as av, RoutingTransaction as aw, getRoutingTransactionQuery as ax, RoutingTransactionFailureReason as ay, Secret as az, AccountToChannelsConnection as b, 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, CreateApiTokenInput as r, CreateApiTokenOutput as s, CreateInvoiceInput as t, CreateInvoiceOutput as u, CreateNodeWalletAddressInput as v, CreateNodeWalletAddressOutput as w, CreateTestModeInvoiceInput as x, CreateTestModeInvoiceOutput as y, CreateTestModePaymentInput as z };
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ var require_package = __commonJS({
35
35
  "package.json"(exports, module2) {
36
36
  module2.exports = {
37
37
  name: "@lightsparkdev/lightspark-sdk",
38
- version: "0.2.3",
38
+ version: "0.2.6",
39
39
  description: "Lightspark JS SDK",
40
40
  author: "Lightspark Inc.",
41
41
  keywords: [
@@ -92,24 +92,25 @@ var require_package = __commonJS({
92
92
  ],
93
93
  scripts: {
94
94
  build: "tsup --entry src/index.ts --entry src/objects/index.ts --format cjs,esm --dts",
95
- "copy-static": "cp ./package.json ./README.md ./LICENSE ./dist/",
96
- dev: "yarn build -- --watch",
97
95
  clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
98
- lint: "npx prettier --check ./src",
96
+ dev: "yarn build -- --watch",
97
+ docs: "typedoc src",
99
98
  format: "npx prettier --write ./src",
99
+ lint: "npx prettier --check ./src",
100
+ postversion: "yarn build",
100
101
  test: "tsc --noEmit --project tsconfig-test.json && jest --no-cache --runInBand --bail",
101
- "type-check": "tsc --noEmit",
102
- postversion: "yarn build"
102
+ "type-check": "tsc --noEmit"
103
103
  },
104
104
  license: "Apache-2.0",
105
105
  dependencies: {
106
- "@lightsparkdev/core": "^0.2.2",
106
+ "@lightsparkdev/core": "0.2.3",
107
107
  "auto-bind": "^5.0.1",
108
108
  crypto: "^1.0.1",
109
109
  "crypto-browserify": "^3.12.0",
110
110
  dayjs: "^1.11.7",
111
111
  graphql: "^16.6.0",
112
112
  "graphql-ws": "^5.11.3",
113
+ typedoc: "^0.24.7",
113
114
  ws: "^8.12.1",
114
115
  "zen-observable-ts": "^1.1.0"
115
116
  },
@@ -121,8 +122,8 @@ var require_package = __commonJS({
121
122
  "prettier-plugin-organize-imports": "^3.2.2",
122
123
  "ts-jest": "^29.0.5",
123
124
  "ts-node": "^10.9.1",
124
- typescript: "^4.9.5",
125
- tsconfig: "*"
125
+ tsconfig: "*",
126
+ typescript: "^4.9.5"
126
127
  }
127
128
  };
128
129
  }
@@ -3561,9 +3562,9 @@ ${FRAGMENT18}
3561
3562
  };
3562
3563
  };
3563
3564
 
3564
- // src/graphql/SinglesNodeDashboard.ts
3565
- var SinglesNodeDashboard = `
3566
- query SinglesNodeDashboard(
3565
+ // src/graphql/SingleNodeDashboard.ts
3566
+ var SingleNodeDashboard = `
3567
+ query SingleNodeDashboard(
3567
3568
  $network: BitcoinNetwork!,
3568
3569
  $nodeId: ID!,
3569
3570
  $numTransactions: Int,
@@ -5558,7 +5559,7 @@ var LightsparkClient = class {
5558
5559
  };
5559
5560
  }
5560
5561
  /**
5561
- * Gets a basic dashboard for a single node, including recent transactions. See `SinglesNodeDashboard` for which info is
5562
+ * Gets a basic dashboard for a single node, including recent transactions. See `SingleNodeDashboard` for which info is
5562
5563
  * included.
5563
5564
  *
5564
5565
  * @param nodeId The node ID for which to get a dashboard.
@@ -5567,9 +5568,9 @@ var LightsparkClient = class {
5567
5568
  * Defaults to undefined (no limit).
5568
5569
  * @returns A basic dashboard for the given node ID.
5569
5570
  */
5570
- async getSinglesNodeDashboard(nodeId, bitcoinNetwork = BitcoinNetwork_default.MAINNET, transactionsAfterDate = void 0) {
5571
+ async getSingleNodeDashboard(nodeId, bitcoinNetwork = BitcoinNetwork_default.MAINNET, transactionsAfterDate = void 0) {
5571
5572
  const response = await this.requester.makeRawRequest(
5572
- SinglesNodeDashboard,
5573
+ SingleNodeDashboard,
5573
5574
  {
5574
5575
  nodeId,
5575
5576
  network: bitcoinNetwork,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AuthProvider } from '@lightsparkdev/core';
2
- export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as ApiToken, B as Balances, i as BitcoinNetwork, j as BlockchainBalance, C as Channel, k as ChannelClosingTransaction, m as ChannelFees, n as ChannelOpeningTransaction, p as ChannelStatus, q as ChannelToTransactionsConnection, r as CreateApiTokenInput, s as CreateApiTokenOutput, t as CreateInvoiceInput, u as CreateInvoiceOutput, v as CreateNodeWalletAddressInput, w as CreateNodeWalletAddressOutput, x as CurrencyAmount, y as CurrencyUnit, D as DeleteApiTokenInput, z as DeleteApiTokenOutput, E as Deposit, G as Entity, H as FeeEstimate, I as FundNodeInput, J as FundNodeOutput, K as GraphNode, M as Hop, O as HtlcAttemptFailureCode, P as IncomingPayment, Q as IncomingPaymentAttempt, S as IncomingPaymentAttemptStatus, T as IncomingPaymentToAttemptsConnection, U as Invoice, W as InvoiceData, X as InvoiceType, Y as LightningFeeEstimateForInvoiceInput, Z as LightningFeeEstimateForNodeInput, _ as LightningFeeEstimateOutput, $ as LightningTransaction, L as LightsparkClient, a1 as LightsparkNode, a2 as LightsparkNodePurpose, a3 as LightsparkNodeStatus, a4 as LightsparkNodeToChannelsConnection, a5 as Node, a6 as NodeAddress, a7 as NodeAddressType, a8 as NodeToAddressesConnection, a9 as OnChainTransaction, ab as OutgoingPayment, ac as OutgoingPaymentAttempt, ad as OutgoingPaymentAttemptStatus, ae as OutgoingPaymentAttemptToHopsConnection, af as OutgoingPaymentToAttemptsConnection, ag as PageInfo, ah as PayInvoiceInput, ai as PayInvoiceOutput, aj as PaymentFailureReason, ak as PaymentRequest, am as PaymentRequestData, an as PaymentRequestStatus, ao as Permission, ap as RequestWithdrawalInput, aq as RequestWithdrawalOutput, ar as RichText, as as RoutingTransaction, au as RoutingTransactionFailureReason, av as Secret, aw as SendPaymentInput, ax as SendPaymentOutput, ay as SinglesNodeDashboard, az as Transaction, aB as TransactionFailures, aC as TransactionStatus, aD as TransactionType, aE as TransactionUpdate, aF as Wallet, aG as WebhookEventType, aH as Withdrawal, aJ as WithdrawalMode, aK as WithdrawalRequest, aL as WithdrawalRequestStatus, aM as WithdrawalRequestToChannelClosingTransactionsConnection, aN as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, l as getChannelClosingTransactionQuery, o as getChannelOpeningTransactionQuery, F as getDepositQuery, N as getHopQuery, R as getIncomingPaymentAttemptQuery, V as getInvoiceQuery, a0 as getLightningTransactionQuery, aa as getOnChainTransactionQuery, al as getPaymentRequestQuery, at as getRoutingTransactionQuery, aA as getTransactionQuery, aI as getWithdrawalQuery } from './Withdrawal-f8570ed4.js';
2
+ export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as ApiToken, B as Balances, i as BitcoinNetwork, j as BlockchainBalance, C as Channel, k as ChannelClosingTransaction, m as ChannelFees, n as ChannelOpeningTransaction, p as ChannelStatus, q as ChannelToTransactionsConnection, r as CreateApiTokenInput, s as CreateApiTokenOutput, t as CreateInvoiceInput, u as CreateInvoiceOutput, v as CreateNodeWalletAddressInput, w as CreateNodeWalletAddressOutput, x as CreateTestModeInvoiceInput, y as CreateTestModeInvoiceOutput, z as CreateTestModePaymentInput, D as CreateTestModePaymentoutput, E as CurrencyAmount, F as CurrencyUnit, G as DeleteApiTokenInput, H as DeleteApiTokenOutput, I as Deposit, K as Entity, M as FeeEstimate, N as FundNodeInput, O as FundNodeOutput, P as GraphNode, Q as Hop, S as HtlcAttemptFailureCode, T as IncomingPayment, U as IncomingPaymentAttempt, W as IncomingPaymentAttemptStatus, X as IncomingPaymentToAttemptsConnection, Y as Invoice, _ as InvoiceData, $ as InvoiceType, a0 as LightningFeeEstimateForInvoiceInput, a1 as LightningFeeEstimateForNodeInput, a2 as LightningFeeEstimateOutput, a3 as LightningTransaction, L as LightsparkClient, a5 as LightsparkNode, a6 as LightsparkNodePurpose, a7 as LightsparkNodeStatus, a8 as LightsparkNodeToChannelsConnection, a9 as Node, aa as NodeAddress, ab as NodeAddressType, ac as NodeToAddressesConnection, ad as OnChainTransaction, af as OutgoingPayment, ag as OutgoingPaymentAttempt, ah as OutgoingPaymentAttemptStatus, ai as OutgoingPaymentAttemptToHopsConnection, aj as OutgoingPaymentToAttemptsConnection, ak as PageInfo, al as PayInvoiceInput, am as PayInvoiceOutput, an as PaymentFailureReason, ao as PaymentRequest, aq as PaymentRequestData, ar as PaymentRequestStatus, as as Permission, at as RequestWithdrawalInput, au as RequestWithdrawalOutput, av as RichText, aw as RoutingTransaction, ay as RoutingTransactionFailureReason, az as Secret, aA as SendPaymentInput, aB as SendPaymentOutput, aC as SingleNodeDashboard, aD as Transaction, aF as TransactionFailures, aG as TransactionStatus, aH as TransactionType, aI as TransactionUpdate, aJ as Wallet, aK as WebhookEventType, aL as Withdrawal, aN as WithdrawalMode, aO as WithdrawalRequest, aP as WithdrawalRequestStatus, aQ as WithdrawalRequestToChannelClosingTransactionsConnection, aR as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, l as getChannelClosingTransactionQuery, o as getChannelOpeningTransactionQuery, J as getDepositQuery, R as getHopQuery, V as getIncomingPaymentAttemptQuery, Z as getInvoiceQuery, a4 as getLightningTransactionQuery, ae as getOnChainTransactionQuery, ap as getPaymentRequestQuery, ax as getRoutingTransactionQuery, aE as getTransactionQuery, aM as getWithdrawalQuery } from './Withdrawal-82dbbfd6.js';
3
3
  import 'zen-observable';
4
4
 
5
5
  declare class AccountTokenAuthProvider implements AuthProvider {
package/dist/index.js CHANGED
@@ -60,14 +60,14 @@ import {
60
60
  getRoutingTransactionQuery,
61
61
  getTransactionQuery,
62
62
  getWithdrawalQuery
63
- } from "./chunk-OKTW3ZBO.js";
63
+ } from "./chunk-2T6E6TXJ.js";
64
64
 
65
65
  // package.json
66
66
  var require_package = __commonJS({
67
67
  "package.json"(exports, module) {
68
68
  module.exports = {
69
69
  name: "@lightsparkdev/lightspark-sdk",
70
- version: "0.2.3",
70
+ version: "0.2.6",
71
71
  description: "Lightspark JS SDK",
72
72
  author: "Lightspark Inc.",
73
73
  keywords: [
@@ -124,24 +124,25 @@ var require_package = __commonJS({
124
124
  ],
125
125
  scripts: {
126
126
  build: "tsup --entry src/index.ts --entry src/objects/index.ts --format cjs,esm --dts",
127
- "copy-static": "cp ./package.json ./README.md ./LICENSE ./dist/",
128
- dev: "yarn build -- --watch",
129
127
  clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
130
- lint: "npx prettier --check ./src",
128
+ dev: "yarn build -- --watch",
129
+ docs: "typedoc src",
131
130
  format: "npx prettier --write ./src",
131
+ lint: "npx prettier --check ./src",
132
+ postversion: "yarn build",
132
133
  test: "tsc --noEmit --project tsconfig-test.json && jest --no-cache --runInBand --bail",
133
- "type-check": "tsc --noEmit",
134
- postversion: "yarn build"
134
+ "type-check": "tsc --noEmit"
135
135
  },
136
136
  license: "Apache-2.0",
137
137
  dependencies: {
138
- "@lightsparkdev/core": "^0.2.2",
138
+ "@lightsparkdev/core": "0.2.3",
139
139
  "auto-bind": "^5.0.1",
140
140
  crypto: "^1.0.1",
141
141
  "crypto-browserify": "^3.12.0",
142
142
  dayjs: "^1.11.7",
143
143
  graphql: "^16.6.0",
144
144
  "graphql-ws": "^5.11.3",
145
+ typedoc: "^0.24.7",
145
146
  ws: "^8.12.1",
146
147
  "zen-observable-ts": "^1.1.0"
147
148
  },
@@ -153,8 +154,8 @@ var require_package = __commonJS({
153
154
  "prettier-plugin-organize-imports": "^3.2.2",
154
155
  "ts-jest": "^29.0.5",
155
156
  "ts-node": "^10.9.1",
156
- typescript: "^4.9.5",
157
- tsconfig: "*"
157
+ tsconfig: "*",
158
+ typescript: "^4.9.5"
158
159
  }
159
160
  };
160
161
  }
@@ -514,9 +515,9 @@ var SendPayment = `
514
515
  ${FRAGMENT6}
515
516
  `;
516
517
 
517
- // src/graphql/SinglesNodeDashboard.ts
518
- var SinglesNodeDashboard = `
519
- query SinglesNodeDashboard(
518
+ // src/graphql/SingleNodeDashboard.ts
519
+ var SingleNodeDashboard = `
520
+ query SingleNodeDashboard(
520
521
  $network: BitcoinNetwork!,
521
522
  $nodeId: ID!,
522
523
  $numTransactions: Int,
@@ -845,7 +846,7 @@ var LightsparkClient = class {
845
846
  };
846
847
  }
847
848
  /**
848
- * Gets a basic dashboard for a single node, including recent transactions. See `SinglesNodeDashboard` for which info is
849
+ * Gets a basic dashboard for a single node, including recent transactions. See `SingleNodeDashboard` for which info is
849
850
  * included.
850
851
  *
851
852
  * @param nodeId The node ID for which to get a dashboard.
@@ -854,9 +855,9 @@ var LightsparkClient = class {
854
855
  * Defaults to undefined (no limit).
855
856
  * @returns A basic dashboard for the given node ID.
856
857
  */
857
- async getSinglesNodeDashboard(nodeId, bitcoinNetwork = BitcoinNetwork_default.MAINNET, transactionsAfterDate = void 0) {
858
+ async getSingleNodeDashboard(nodeId, bitcoinNetwork = BitcoinNetwork_default.MAINNET, transactionsAfterDate = void 0) {
858
859
  const response = await this.requester.makeRawRequest(
859
- SinglesNodeDashboard,
860
+ SingleNodeDashboard,
860
861
  {
861
862
  nodeId,
862
863
  network: bitcoinNetwork,
@@ -1,3 +1,3 @@
1
- export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as ApiToken, B as Balances, i as BitcoinNetwork, j as BlockchainBalance, C as Channel, k as ChannelClosingTransaction, m as ChannelFees, n as ChannelOpeningTransaction, p as ChannelStatus, q as ChannelToTransactionsConnection, r as CreateApiTokenInput, s as CreateApiTokenOutput, t as CreateInvoiceInput, u as CreateInvoiceOutput, v as CreateNodeWalletAddressInput, w as CreateNodeWalletAddressOutput, x as CurrencyAmount, y as CurrencyUnit, D as DeleteApiTokenInput, z as DeleteApiTokenOutput, E as Deposit, G as Entity, H as FeeEstimate, I as FundNodeInput, J as FundNodeOutput, K as GraphNode, M as Hop, O as HtlcAttemptFailureCode, P as IncomingPayment, Q as IncomingPaymentAttempt, S as IncomingPaymentAttemptStatus, T as IncomingPaymentToAttemptsConnection, U as Invoice, W as InvoiceData, X as InvoiceType, Y as LightningFeeEstimateForInvoiceInput, Z as LightningFeeEstimateForNodeInput, _ as LightningFeeEstimateOutput, $ as LightningTransaction, a1 as LightsparkNode, a2 as LightsparkNodePurpose, a3 as LightsparkNodeStatus, a4 as LightsparkNodeToChannelsConnection, a5 as Node, a6 as NodeAddress, a7 as NodeAddressType, a8 as NodeToAddressesConnection, a9 as OnChainTransaction, ab as OutgoingPayment, ac as OutgoingPaymentAttempt, ad as OutgoingPaymentAttemptStatus, ae as OutgoingPaymentAttemptToHopsConnection, af as OutgoingPaymentToAttemptsConnection, ag as PageInfo, ah as PayInvoiceInput, ai as PayInvoiceOutput, aj as PaymentFailureReason, ak as PaymentRequest, am as PaymentRequestData, an as PaymentRequestStatus, ao as Permission, ap as RequestWithdrawalInput, aq as RequestWithdrawalOutput, ar as RichText, as as RoutingTransaction, au as RoutingTransactionFailureReason, av as Secret, aw as SendPaymentInput, ax as SendPaymentOutput, ay as SinglesNodeDashboard, az as Transaction, aB as TransactionFailures, aC as TransactionStatus, aD as TransactionType, aE as TransactionUpdate, aF as Wallet, aG as WebhookEventType, aH as Withdrawal, aJ as WithdrawalMode, aK as WithdrawalRequest, aL as WithdrawalRequestStatus, aM as WithdrawalRequestToChannelClosingTransactionsConnection, aN as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, l as getChannelClosingTransactionQuery, o as getChannelOpeningTransactionQuery, F as getDepositQuery, N as getHopQuery, R as getIncomingPaymentAttemptQuery, V as getInvoiceQuery, a0 as getLightningTransactionQuery, aa as getOnChainTransactionQuery, al as getPaymentRequestQuery, at as getRoutingTransactionQuery, aA as getTransactionQuery, aI as getWithdrawalQuery } from '../Withdrawal-f8570ed4.js';
1
+ export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as ApiToken, B as Balances, i as BitcoinNetwork, j as BlockchainBalance, C as Channel, k as ChannelClosingTransaction, m as ChannelFees, n as ChannelOpeningTransaction, p as ChannelStatus, q as ChannelToTransactionsConnection, r as CreateApiTokenInput, s as CreateApiTokenOutput, t as CreateInvoiceInput, u as CreateInvoiceOutput, v as CreateNodeWalletAddressInput, w as CreateNodeWalletAddressOutput, x as CreateTestModeInvoiceInput, y as CreateTestModeInvoiceOutput, z as CreateTestModePaymentInput, D as CreateTestModePaymentoutput, E as CurrencyAmount, F as CurrencyUnit, G as DeleteApiTokenInput, H as DeleteApiTokenOutput, I as Deposit, K as Entity, M as FeeEstimate, N as FundNodeInput, O as FundNodeOutput, P as GraphNode, Q as Hop, S as HtlcAttemptFailureCode, T as IncomingPayment, U as IncomingPaymentAttempt, W as IncomingPaymentAttemptStatus, X as IncomingPaymentToAttemptsConnection, Y as Invoice, _ as InvoiceData, $ as InvoiceType, a0 as LightningFeeEstimateForInvoiceInput, a1 as LightningFeeEstimateForNodeInput, a2 as LightningFeeEstimateOutput, a3 as LightningTransaction, a5 as LightsparkNode, a6 as LightsparkNodePurpose, a7 as LightsparkNodeStatus, a8 as LightsparkNodeToChannelsConnection, a9 as Node, aa as NodeAddress, ab as NodeAddressType, ac as NodeToAddressesConnection, ad as OnChainTransaction, af as OutgoingPayment, ag as OutgoingPaymentAttempt, ah as OutgoingPaymentAttemptStatus, ai as OutgoingPaymentAttemptToHopsConnection, aj as OutgoingPaymentToAttemptsConnection, ak as PageInfo, al as PayInvoiceInput, am as PayInvoiceOutput, an as PaymentFailureReason, ao as PaymentRequest, aq as PaymentRequestData, ar as PaymentRequestStatus, as as Permission, at as RequestWithdrawalInput, au as RequestWithdrawalOutput, av as RichText, aw as RoutingTransaction, ay as RoutingTransactionFailureReason, az as Secret, aA as SendPaymentInput, aB as SendPaymentOutput, aC as SingleNodeDashboard, aD as Transaction, aF as TransactionFailures, aG as TransactionStatus, aH as TransactionType, aI as TransactionUpdate, aJ as Wallet, aK as WebhookEventType, aL as Withdrawal, aN as WithdrawalMode, aO as WithdrawalRequest, aP as WithdrawalRequestStatus, aQ as WithdrawalRequestToChannelClosingTransactionsConnection, aR as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, l as getChannelClosingTransactionQuery, o as getChannelOpeningTransactionQuery, J as getDepositQuery, R as getHopQuery, V as getIncomingPaymentAttemptQuery, Z as getInvoiceQuery, a4 as getLightningTransactionQuery, ae as getOnChainTransactionQuery, ap as getPaymentRequestQuery, ax as getRoutingTransactionQuery, aE as getTransactionQuery, aM as getWithdrawalQuery } from '../Withdrawal-82dbbfd6.js';
2
2
  import '@lightsparkdev/core';
3
3
  import 'zen-observable';
@@ -42,7 +42,7 @@ import {
42
42
  getRoutingTransactionQuery,
43
43
  getTransactionQuery,
44
44
  getWithdrawalQuery
45
- } from "../chunk-OKTW3ZBO.js";
45
+ } from "../chunk-2T6E6TXJ.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.4",
3
+ "version": "0.2.6",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -57,24 +57,25 @@
57
57
  ],
58
58
  "scripts": {
59
59
  "build": "tsup --entry src/index.ts --entry src/objects/index.ts --format cjs,esm --dts",
60
- "copy-static": "cp ./package.json ./README.md ./LICENSE ./dist/",
61
- "dev": "yarn build -- --watch",
62
60
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
63
- "lint": "npx prettier --check ./src",
61
+ "dev": "yarn build -- --watch",
62
+ "docs": "typedoc src",
64
63
  "format": "npx prettier --write ./src",
64
+ "lint": "npx prettier --check ./src",
65
+ "postversion": "yarn build",
65
66
  "test": "tsc --noEmit --project tsconfig-test.json && jest --no-cache --runInBand --bail",
66
- "type-check": "tsc --noEmit",
67
- "postversion": "yarn build"
67
+ "type-check": "tsc --noEmit"
68
68
  },
69
69
  "license": "Apache-2.0",
70
70
  "dependencies": {
71
- "@lightsparkdev/core": "^0.2.2",
71
+ "@lightsparkdev/core": "0.2.3",
72
72
  "auto-bind": "^5.0.1",
73
73
  "crypto": "^1.0.1",
74
74
  "crypto-browserify": "^3.12.0",
75
75
  "dayjs": "^1.11.7",
76
76
  "graphql": "^16.6.0",
77
77
  "graphql-ws": "^5.11.3",
78
+ "typedoc": "^0.24.7",
78
79
  "ws": "^8.12.1",
79
80
  "zen-observable-ts": "^1.1.0"
80
81
  },
@@ -86,7 +87,7 @@
86
87
  "prettier-plugin-organize-imports": "^3.2.2",
87
88
  "ts-jest": "^29.0.5",
88
89
  "ts-node": "^10.9.1",
89
- "typescript": "^4.9.5",
90
- "tsconfig": "*"
90
+ "tsconfig": "*",
91
+ "typescript": "^4.9.5"
91
92
  }
92
93
  }
@@ -0,0 +1,29 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import InvoiceType from "./InvoiceType.js";
4
+
5
+ type CreateTestModeInvoiceInput = {
6
+ localNodeId: string;
7
+
8
+ amountMsats: number;
9
+
10
+ memo?: string;
11
+
12
+ invoiceType?: InvoiceType;
13
+ };
14
+
15
+ export const CreateTestModeInvoiceInputFromJson = (
16
+ obj: any
17
+ ): CreateTestModeInvoiceInput => {
18
+ return {
19
+ localNodeId: obj["create_test_mode_invoice_input_local_node_id"],
20
+ amountMsats: obj["create_test_mode_invoice_input_amount_msats"],
21
+ memo: obj["create_test_mode_invoice_input_memo"],
22
+ invoiceType: !!obj["create_test_mode_invoice_input_invoice_type"]
23
+ ? InvoiceType[obj["create_test_mode_invoice_input_invoice_type"]] ??
24
+ InvoiceType.FUTURE_VALUE
25
+ : null,
26
+ } as CreateTestModeInvoiceInput;
27
+ };
28
+
29
+ export default CreateTestModeInvoiceInput;
@@ -0,0 +1,22 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type CreateTestModeInvoiceOutput = {
4
+ encodedPaymentRequest: string;
5
+ };
6
+
7
+ export const CreateTestModeInvoiceOutputFromJson = (
8
+ obj: any
9
+ ): CreateTestModeInvoiceOutput => {
10
+ return {
11
+ encodedPaymentRequest:
12
+ obj["create_test_mode_invoice_output_encoded_payment_request"],
13
+ } as CreateTestModeInvoiceOutput;
14
+ };
15
+
16
+ export const FRAGMENT = `
17
+ fragment CreateTestModeInvoiceOutputFragment on CreateTestModeInvoiceOutput {
18
+ __typename
19
+ create_test_mode_invoice_output_encoded_payment_request: encoded_payment_request
20
+ }`;
21
+
22
+ export default CreateTestModeInvoiceOutput;
@@ -0,0 +1,27 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type CreateTestModePaymentInput = {
4
+ /** The node to where you want to send the payment. **/
5
+ localNodeId: string;
6
+
7
+ /** The invoice you want to be paid (as defined by the BOLT11 standard). **/
8
+ encodedInvoice: string;
9
+
10
+ /**
11
+ * The amount you will be paid for this invoice, expressed in msats. It should ONLY be set when the
12
+ * invoice amount is zero.
13
+ **/
14
+ amountMsats?: number;
15
+ };
16
+
17
+ export const CreateTestModePaymentInputFromJson = (
18
+ obj: any
19
+ ): CreateTestModePaymentInput => {
20
+ return {
21
+ localNodeId: obj["create_test_mode_payment_input_local_node_id"],
22
+ encodedInvoice: obj["create_test_mode_payment_input_encoded_invoice"],
23
+ amountMsats: obj["create_test_mode_payment_input_amount_msats"],
24
+ } as CreateTestModePaymentInput;
25
+ };
26
+
27
+ export default CreateTestModePaymentInput;
@@ -0,0 +1,24 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ type CreateTestModePaymentoutput = {
4
+ /** The payment that has been sent. **/
5
+ paymentId: string;
6
+ };
7
+
8
+ export const CreateTestModePaymentoutputFromJson = (
9
+ obj: any
10
+ ): CreateTestModePaymentoutput => {
11
+ return {
12
+ paymentId: obj["create_test_mode_paymentoutput_payment"].id,
13
+ } as CreateTestModePaymentoutput;
14
+ };
15
+
16
+ export const FRAGMENT = `
17
+ fragment CreateTestModePaymentoutputFragment on CreateTestModePaymentoutput {
18
+ __typename
19
+ create_test_mode_paymentoutput_payment: payment {
20
+ id
21
+ }
22
+ }`;
23
+
24
+ export default CreateTestModePaymentoutput;
@@ -27,6 +27,10 @@ export { default as CreateInvoiceInput } from "./CreateInvoiceInput.js";
27
27
  export { default as CreateInvoiceOutput } from "./CreateInvoiceOutput.js";
28
28
  export { default as CreateNodeWalletAddressInput } from "./CreateNodeWalletAddressInput.js";
29
29
  export { default as CreateNodeWalletAddressOutput } from "./CreateNodeWalletAddressOutput.js";
30
+ export { default as CreateTestModeInvoiceInput } from "./CreateTestModeInvoiceInput.js";
31
+ export { default as CreateTestModeInvoiceOutput } from "./CreateTestModeInvoiceOutput.js";
32
+ export { default as CreateTestModePaymentInput } from "./CreateTestModePaymentInput.js";
33
+ export { default as CreateTestModePaymentoutput } from "./CreateTestModePaymentoutput.js";
30
34
  export { default as CurrencyAmount } from "./CurrencyAmount.js";
31
35
  export { default as CurrencyUnit } from "./CurrencyUnit.js";
32
36
  export { default as DeleteApiTokenInput } from "./DeleteApiTokenInput.js";
package/dist/.DS_Store DELETED
Binary file