@lightsparkdev/lightspark-sdk 0.4.7 → 0.4.8

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.cjs +3 -3
  3. package/dist/index.js +3 -3
  4. package/package.json +3 -3
  5. package/src/auth/AccountTokenAuthProvider.ts +2 -1
  6. package/src/client.ts +29 -29
  7. package/src/graphql/MultiNodeDashboard.ts +6 -7
  8. package/src/objects/Account.ts +23 -29
  9. package/src/objects/AccountToApiTokensConnection.ts +4 -2
  10. package/src/objects/AccountToChannelsConnection.ts +2 -1
  11. package/src/objects/AccountToNodesConnection.ts +4 -2
  12. package/src/objects/AccountToPaymentRequestsConnection.ts +4 -2
  13. package/src/objects/AccountToTransactionsConnection.ts +6 -3
  14. package/src/objects/AccountToWalletsConnection.ts +4 -2
  15. package/src/objects/ApiToken.ts +2 -2
  16. package/src/objects/Balances.ts +2 -1
  17. package/src/objects/BlockchainBalance.ts +2 -1
  18. package/src/objects/Channel.ts +10 -9
  19. package/src/objects/ChannelClosingTransaction.ts +6 -5
  20. package/src/objects/ChannelFees.ts +2 -1
  21. package/src/objects/ChannelOpeningTransaction.ts +6 -5
  22. package/src/objects/ChannelToTransactionsConnection.ts +2 -1
  23. package/src/objects/CreateApiTokenOutput.ts +2 -1
  24. package/src/objects/Deposit.ts +6 -5
  25. package/src/objects/FeeEstimate.ts +2 -1
  26. package/src/objects/FundNodeOutput.ts +2 -1
  27. package/src/objects/GraphNode.ts +6 -7
  28. package/src/objects/Hop.ts +4 -3
  29. package/src/objects/IncomingPayment.ts +8 -8
  30. package/src/objects/IncomingPaymentAttempt.ts +4 -3
  31. package/src/objects/IncomingPaymentToAttemptsConnection.ts +2 -3
  32. package/src/objects/Invoice.ts +7 -5
  33. package/src/objects/InvoiceData.ts +5 -3
  34. package/src/objects/LightningFeeEstimateOutput.ts +2 -1
  35. package/src/objects/LightningTransaction.ts +7 -5
  36. package/src/objects/LightsparkNode.ts +15 -16
  37. package/src/objects/LightsparkNodeOwner.ts +3 -2
  38. package/src/objects/LightsparkNodeToChannelsConnection.ts +4 -2
  39. package/src/objects/Node.ts +7 -7
  40. package/src/objects/NodeToAddressesConnection.ts +2 -1
  41. package/src/objects/OnChainTransaction.ts +10 -8
  42. package/src/objects/OutgoingPayment.ts +11 -11
  43. package/src/objects/OutgoingPaymentAttempt.ts +7 -7
  44. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +2 -1
  45. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +2 -3
  46. package/src/objects/PaymentRequest.ts +5 -4
  47. package/src/objects/PaymentRequestData.ts +1 -1
  48. package/src/objects/RoutingTransaction.ts +8 -6
  49. package/src/objects/SingleNodeDashboard.ts +6 -6
  50. package/src/objects/Transaction.ts +10 -8
  51. package/src/objects/TransactionUpdate.ts +2 -1
  52. package/src/objects/Wallet.ts +7 -5
  53. package/src/objects/Withdrawal.ts +6 -5
  54. package/src/objects/WithdrawalRequest.ts +9 -10
  55. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +4 -4
  56. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @lightsparkdev/lightspark-sdk
2
2
 
3
+ ## 0.4.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 141d73a: Enable/fix consistent-type-imports lint rule
8
+ - Updated dependencies [141d73a]
9
+ - @lightsparkdev/core@0.3.10
10
+
3
11
  ## 0.4.7
4
12
 
5
13
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1927,7 +1927,7 @@ var import_crypto = require("crypto");
1927
1927
  // package.json
1928
1928
  var package_default = {
1929
1929
  name: "@lightsparkdev/lightspark-sdk",
1930
- version: "0.4.7",
1930
+ version: "0.4.8",
1931
1931
  description: "Lightspark JS SDK",
1932
1932
  author: "Lightspark Inc.",
1933
1933
  keywords: [
@@ -1999,7 +1999,7 @@ var package_default = {
1999
1999
  },
2000
2000
  license: "Apache-2.0",
2001
2001
  dependencies: {
2002
- "@lightsparkdev/core": "0.3.9",
2002
+ "@lightsparkdev/core": "0.3.10",
2003
2003
  "auto-bind": "^5.0.1",
2004
2004
  crypto: "^1.0.1",
2005
2005
  "crypto-browserify": "^3.12.0",
@@ -2011,7 +2011,7 @@ var package_default = {
2011
2011
  },
2012
2012
  devDependencies: {
2013
2013
  "@lightsparkdev/eslint-config": "*",
2014
- "@lightsparkdev/gql": "0.0.1",
2014
+ "@lightsparkdev/gql": "0.0.2",
2015
2015
  "@lightsparkdev/tsconfig": "0.0.0",
2016
2016
  "@types/crypto-js": "^4.1.1",
2017
2017
  "@types/jest": "^29.5.2",
package/dist/index.js CHANGED
@@ -115,7 +115,7 @@ import { createHash } from "crypto";
115
115
  // package.json
116
116
  var package_default = {
117
117
  name: "@lightsparkdev/lightspark-sdk",
118
- version: "0.4.7",
118
+ version: "0.4.8",
119
119
  description: "Lightspark JS SDK",
120
120
  author: "Lightspark Inc.",
121
121
  keywords: [
@@ -187,7 +187,7 @@ var package_default = {
187
187
  },
188
188
  license: "Apache-2.0",
189
189
  dependencies: {
190
- "@lightsparkdev/core": "0.3.9",
190
+ "@lightsparkdev/core": "0.3.10",
191
191
  "auto-bind": "^5.0.1",
192
192
  crypto: "^1.0.1",
193
193
  "crypto-browserify": "^3.12.0",
@@ -199,7 +199,7 @@ var package_default = {
199
199
  },
200
200
  devDependencies: {
201
201
  "@lightsparkdev/eslint-config": "*",
202
- "@lightsparkdev/gql": "0.0.1",
202
+ "@lightsparkdev/gql": "0.0.2",
203
203
  "@lightsparkdev/tsconfig": "0.0.0",
204
204
  "@types/crypto-js": "^4.1.1",
205
205
  "@types/jest": "^29.5.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "license": "Apache-2.0",
74
74
  "dependencies": {
75
- "@lightsparkdev/core": "0.3.9",
75
+ "@lightsparkdev/core": "0.3.10",
76
76
  "auto-bind": "^5.0.1",
77
77
  "crypto": "^1.0.1",
78
78
  "crypto-browserify": "^3.12.0",
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "devDependencies": {
86
86
  "@lightsparkdev/eslint-config": "*",
87
- "@lightsparkdev/gql": "0.0.1",
87
+ "@lightsparkdev/gql": "0.0.2",
88
88
  "@lightsparkdev/tsconfig": "0.0.0",
89
89
  "@types/crypto-js": "^4.1.1",
90
90
  "@types/jest": "^29.5.2",
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { AuthProvider, b64encode } from "@lightsparkdev/core";
3
+ import type { AuthProvider } from "@lightsparkdev/core";
4
+ import { b64encode } from "@lightsparkdev/core";
4
5
  import autoBind from "auto-bind";
5
6
 
6
7
  class AccountTokenAuthProvider implements AuthProvider {
package/src/client.ts CHANGED
@@ -1,21 +1,23 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
3
  import autoBind from "auto-bind";
4
- import Observable from "zen-observable";
4
+ import type Observable from "zen-observable";
5
5
 
6
- import {
6
+ import type {
7
7
  AuthProvider,
8
- b64encode,
9
8
  CryptoInterface,
9
+ KeyOrAliasType,
10
+ Maybe,
11
+ Query,
12
+ } from "@lightsparkdev/core";
13
+ import {
14
+ b64encode,
10
15
  DefaultCrypto,
11
16
  KeyOrAlias,
12
- KeyOrAliasType,
13
17
  LightsparkAuthException,
14
18
  LightsparkException,
15
19
  LightsparkSigningException,
16
- Maybe,
17
20
  NodeKeyCache,
18
- Query,
19
21
  Requester,
20
22
  StubAuthProvider,
21
23
  } from "@lightsparkdev/core";
@@ -37,10 +39,8 @@ import { DeleteApiToken } from "./graphql/DeleteApiToken.js";
37
39
  import { FundNode } from "./graphql/FundNode.js";
38
40
  import { LightningFeeEstimateForInvoice } from "./graphql/LightningFeeEstimateForInvoice.js";
39
41
  import { LightningFeeEstimateForNode } from "./graphql/LightningFeeEstimateForNode.js";
40
- import {
41
- AccountDashboard,
42
- MultiNodeDashboard,
43
- } from "./graphql/MultiNodeDashboard.js";
42
+ import type { AccountDashboard } from "./graphql/MultiNodeDashboard.js";
43
+ import { MultiNodeDashboard } from "./graphql/MultiNodeDashboard.js";
44
44
  import { PayInvoice } from "./graphql/PayInvoice.js";
45
45
  import { RecoverNodeSigningKey } from "./graphql/RecoverNodeSigningKey.js";
46
46
  import { RequestWithdrawal } from "./graphql/RequestWithdrawal.js";
@@ -51,27 +51,27 @@ import { TransactionSubscription } from "./graphql/TransactionSubscription.js";
51
51
  import Account from "./objects/Account.js";
52
52
  import { ApiTokenFromJson } from "./objects/ApiToken.js";
53
53
  import BitcoinNetwork from "./objects/BitcoinNetwork.js";
54
- import CreateApiTokenOutput from "./objects/CreateApiTokenOutput.js";
55
- import CurrencyAmount, {
56
- CurrencyAmountFromJson,
57
- } from "./objects/CurrencyAmount.js";
58
- import FeeEstimate, { FeeEstimateFromJson } from "./objects/FeeEstimate.js";
59
- import Invoice, { InvoiceFromJson } from "./objects/Invoice.js";
60
- import InvoiceData, { InvoiceDataFromJson } from "./objects/InvoiceData.js";
54
+ import type CreateApiTokenOutput from "./objects/CreateApiTokenOutput.js";
55
+ import type CurrencyAmount from "./objects/CurrencyAmount.js";
56
+ import { CurrencyAmountFromJson } from "./objects/CurrencyAmount.js";
57
+ import type FeeEstimate from "./objects/FeeEstimate.js";
58
+ import { FeeEstimateFromJson } from "./objects/FeeEstimate.js";
59
+ import type Invoice from "./objects/Invoice.js";
60
+ import { InvoiceFromJson } from "./objects/Invoice.js";
61
+ import type InvoiceData from "./objects/InvoiceData.js";
62
+ import { InvoiceDataFromJson } from "./objects/InvoiceData.js";
61
63
  import InvoiceType from "./objects/InvoiceType.js";
62
- import OutgoingPayment, {
63
- OutgoingPaymentFromJson,
64
- } from "./objects/OutgoingPayment.js";
64
+ import type OutgoingPayment from "./objects/OutgoingPayment.js";
65
+ import { OutgoingPaymentFromJson } from "./objects/OutgoingPayment.js";
65
66
  import Permission from "./objects/Permission.js";
66
- import SingleNodeDashboard from "./objects/SingleNodeDashboard.js";
67
- import Transaction, { TransactionFromJson } from "./objects/Transaction.js";
68
- import TransactionUpdate, {
69
- TransactionUpdateFromJson,
70
- } from "./objects/TransactionUpdate.js";
71
- import WithdrawalMode from "./objects/WithdrawalMode.js";
72
- import WithdrawalRequest, {
73
- WithdrawalRequestFromJson,
74
- } from "./objects/WithdrawalRequest.js";
67
+ import type SingleNodeDashboard from "./objects/SingleNodeDashboard.js";
68
+ import type Transaction from "./objects/Transaction.js";
69
+ import { TransactionFromJson } from "./objects/Transaction.js";
70
+ import type TransactionUpdate from "./objects/TransactionUpdate.js";
71
+ import { TransactionUpdateFromJson } from "./objects/TransactionUpdate.js";
72
+ import type WithdrawalMode from "./objects/WithdrawalMode.js";
73
+ import type WithdrawalRequest from "./objects/WithdrawalRequest.js";
74
+ import { WithdrawalRequestFromJson } from "./objects/WithdrawalRequest.js";
75
75
 
76
76
  const sdkVersion = packageJson.version;
77
77
 
@@ -1,12 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Maybe } from "@lightsparkdev/core";
4
- import CurrencyAmount, {
5
- FRAGMENT as CurrencyAmountFragment,
6
- } from "../objects/CurrencyAmount.js";
7
- import LightsparkNodePurpose from "../objects/LightsparkNodePurpose.js";
8
- import LightsparkNodeStatus from "../objects/LightsparkNodeStatus.js";
9
- import NodeAddressType from "../objects/NodeAddressType.js";
3
+ import type { Maybe } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "../objects/CurrencyAmount.js";
5
+ import { FRAGMENT as CurrencyAmountFragment } from "../objects/CurrencyAmount.js";
6
+ import type LightsparkNodePurpose from "../objects/LightsparkNodePurpose.js";
7
+ import type LightsparkNodeStatus from "../objects/LightsparkNodeStatus.js";
8
+ import type NodeAddressType from "../objects/NodeAddressType.js";
10
9
 
11
10
  export type AccountDashboard = {
12
11
  id: string;
@@ -1,35 +1,29 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
- import AccountToApiTokensConnection, {
7
- AccountToApiTokensConnectionFromJson,
8
- } from "./AccountToApiTokensConnection.js";
9
- import AccountToChannelsConnection, {
10
- AccountToChannelsConnectionFromJson,
11
- } from "./AccountToChannelsConnection.js";
12
- import AccountToNodesConnection, {
13
- AccountToNodesConnectionFromJson,
14
- } from "./AccountToNodesConnection.js";
15
- import AccountToPaymentRequestsConnection, {
16
- AccountToPaymentRequestsConnectionFromJson,
17
- } from "./AccountToPaymentRequestsConnection.js";
18
- import AccountToTransactionsConnection, {
19
- AccountToTransactionsConnectionFromJson,
20
- } from "./AccountToTransactionsConnection.js";
21
- import AccountToWalletsConnection, {
22
- AccountToWalletsConnectionFromJson,
23
- } from "./AccountToWalletsConnection.js";
24
- import BitcoinNetwork from "./BitcoinNetwork.js";
25
- import BlockchainBalance, {
26
- BlockchainBalanceFromJson,
27
- } from "./BlockchainBalance.js";
28
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
29
- import LightsparkNodeOwner from "./LightsparkNodeOwner.js";
30
- import TransactionFailures from "./TransactionFailures.js";
31
- import TransactionStatus from "./TransactionStatus.js";
32
- import TransactionType from "./TransactionType.js";
5
+ import type LightsparkClient from "../client.js";
6
+ import type AccountToApiTokensConnection from "./AccountToApiTokensConnection.js";
7
+ import { AccountToApiTokensConnectionFromJson } from "./AccountToApiTokensConnection.js";
8
+ import type AccountToChannelsConnection from "./AccountToChannelsConnection.js";
9
+ import { AccountToChannelsConnectionFromJson } from "./AccountToChannelsConnection.js";
10
+ import type AccountToNodesConnection from "./AccountToNodesConnection.js";
11
+ import { AccountToNodesConnectionFromJson } from "./AccountToNodesConnection.js";
12
+ import type AccountToPaymentRequestsConnection from "./AccountToPaymentRequestsConnection.js";
13
+ import { AccountToPaymentRequestsConnectionFromJson } from "./AccountToPaymentRequestsConnection.js";
14
+ import type AccountToTransactionsConnection from "./AccountToTransactionsConnection.js";
15
+ import { AccountToTransactionsConnectionFromJson } from "./AccountToTransactionsConnection.js";
16
+ import type AccountToWalletsConnection from "./AccountToWalletsConnection.js";
17
+ import { AccountToWalletsConnectionFromJson } from "./AccountToWalletsConnection.js";
18
+ import type BitcoinNetwork from "./BitcoinNetwork.js";
19
+ import type BlockchainBalance from "./BlockchainBalance.js";
20
+ import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
21
+ import type CurrencyAmount from "./CurrencyAmount.js";
22
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
23
+ import type LightsparkNodeOwner from "./LightsparkNodeOwner.js";
24
+ import type TransactionFailures from "./TransactionFailures.js";
25
+ import type TransactionStatus from "./TransactionStatus.js";
26
+ import type TransactionType from "./TransactionType.js";
33
27
 
34
28
  class Account implements LightsparkNodeOwner {
35
29
  constructor(
@@ -1,7 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import ApiToken, { ApiTokenFromJson } from "./ApiToken.js";
4
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
3
+ import type ApiToken from "./ApiToken.js";
4
+ import { ApiTokenFromJson } from "./ApiToken.js";
5
+ import type PageInfo from "./PageInfo.js";
6
+ import { PageInfoFromJson } from "./PageInfo.js";
5
7
 
6
8
  type AccountToApiTokensConnection = {
7
9
  /** An object that holds pagination information about the objects in this connection. **/
@@ -1,7 +1,8 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
3
  import autoBind from "auto-bind";
4
- import Channel, { ChannelFromJson } from "./Channel.js";
4
+ import type Channel from "./Channel.js";
5
+ import { ChannelFromJson } from "./Channel.js";
5
6
 
6
7
  class AccountToChannelsConnection {
7
8
  constructor(
@@ -1,8 +1,10 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import LightsparkNode, { LightsparkNodeFromJson } from "./LightsparkNode.js";
3
+ import type LightsparkNode from "./LightsparkNode.js";
4
+ import { LightsparkNodeFromJson } from "./LightsparkNode.js";
4
5
  import LightsparkNodePurpose from "./LightsparkNodePurpose.js";
5
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
6
+ import type PageInfo from "./PageInfo.js";
7
+ import { PageInfoFromJson } from "./PageInfo.js";
6
8
 
7
9
  /** A connection between an account and the nodes it manages. **/
8
10
  type AccountToNodesConnection = {
@@ -1,7 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
4
- import PaymentRequest, { PaymentRequestFromJson } from "./PaymentRequest.js";
3
+ import type PageInfo from "./PageInfo.js";
4
+ import { PageInfoFromJson } from "./PageInfo.js";
5
+ import type PaymentRequest from "./PaymentRequest.js";
6
+ import { PaymentRequestFromJson } from "./PaymentRequest.js";
5
7
 
6
8
  type AccountToPaymentRequestsConnection = {
7
9
  /** The payment requests for the current page of this connection. **/
@@ -1,8 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
5
- import Transaction, { TransactionFromJson } from "./Transaction.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
+ import type PageInfo from "./PageInfo.js";
6
+ import { PageInfoFromJson } from "./PageInfo.js";
7
+ import type Transaction from "./Transaction.js";
8
+ import { TransactionFromJson } from "./Transaction.js";
6
9
 
7
10
  type AccountToTransactionsConnection = {
8
11
  /**
@@ -1,7 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
4
- import Wallet, { WalletFromJson } from "./Wallet.js";
3
+ import type PageInfo from "./PageInfo.js";
4
+ import { PageInfoFromJson } from "./PageInfo.js";
5
+ import type Wallet from "./Wallet.js";
6
+ import { WalletFromJson } from "./Wallet.js";
5
7
 
6
8
  type AccountToWalletsConnection = {
7
9
  /** An object that holds pagination information about the objects in this connection. **/
@@ -1,7 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import Entity from "./Entity.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type Entity from "./Entity.js";
5
5
  import Permission from "./Permission.js";
6
6
 
7
7
  type ApiToken = Entity & {
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
 
5
6
  type Balances = {
6
7
  /**
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
 
5
6
  /** This object provides a detailed breakdown of a `LightsparkNode`'s current balance on the Bitcoin Network. **/
6
7
  type BlockchainBalance = {
@@ -1,16 +1,17 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
- import ChannelFees, { ChannelFeesFromJson } from "./ChannelFees.js";
5
+ import type LightsparkClient from "../client.js";
6
+ import type ChannelFees from "./ChannelFees.js";
7
+ import { ChannelFeesFromJson } from "./ChannelFees.js";
7
8
  import ChannelStatus from "./ChannelStatus.js";
8
- import ChannelToTransactionsConnection, {
9
- ChannelToTransactionsConnectionFromJson,
10
- } from "./ChannelToTransactionsConnection.js";
11
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
12
- import Entity from "./Entity.js";
13
- import TransactionType from "./TransactionType.js";
9
+ import type ChannelToTransactionsConnection from "./ChannelToTransactionsConnection.js";
10
+ import { ChannelToTransactionsConnectionFromJson } from "./ChannelToTransactionsConnection.js";
11
+ import type CurrencyAmount from "./CurrencyAmount.js";
12
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
13
+ import type Entity from "./Entity.js";
14
+ import type TransactionType from "./TransactionType.js";
14
15
 
15
16
  /** An object that represents a payment channel between two nodes in the Lightning Network. **/
16
17
  class Channel implements Entity {
@@ -1,10 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
6
- import OnChainTransaction from "./OnChainTransaction.js";
7
- import Transaction from "./Transaction.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
7
+ import type OnChainTransaction from "./OnChainTransaction.js";
8
+ import type Transaction from "./Transaction.js";
8
9
  import TransactionStatus from "./TransactionStatus.js";
9
10
 
10
11
  /** The transaction on Bitcoin blockchain to close a channel on Lightning Network where the balances are allocated back to local and remote nodes. **/
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
 
5
6
  type ChannelFees = {
6
7
  baseFee?: CurrencyAmount;
@@ -1,10 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
6
- import OnChainTransaction from "./OnChainTransaction.js";
7
- import Transaction from "./Transaction.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
7
+ import type OnChainTransaction from "./OnChainTransaction.js";
8
+ import type Transaction from "./Transaction.js";
8
9
  import TransactionStatus from "./TransactionStatus.js";
9
10
 
10
11
  /** The transaction on Bitcoin blockchain to open a channel on Lightning Network funded by the local Lightspark node. **/
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
 
5
6
  type ChannelToTransactionsConnection = {
6
7
  /**
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import ApiToken, { ApiTokenFromJson } from "./ApiToken.js";
3
+ import type ApiToken from "./ApiToken.js";
4
+ import { ApiTokenFromJson } from "./ApiToken.js";
4
5
 
5
6
  type CreateApiTokenOutput = {
6
7
  /** The API Token that has been created. **/
@@ -1,10 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
6
- import OnChainTransaction from "./OnChainTransaction.js";
7
- import Transaction from "./Transaction.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
7
+ import type OnChainTransaction from "./OnChainTransaction.js";
8
+ import type Transaction from "./Transaction.js";
8
9
  import TransactionStatus from "./TransactionStatus.js";
9
10
 
10
11
  /** The transaction on Bitcoin blockchain to fund the Lightspark node's wallet. **/
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
 
5
6
  type FeeEstimate = {
6
7
  feeFast: CurrencyAmount;
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
 
5
6
  type FundNodeOutput = {
6
7
  amount: CurrencyAmount;
@@ -1,14 +1,13 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
5
+ import type LightsparkClient from "../client.js";
6
6
  import BitcoinNetwork from "./BitcoinNetwork.js";
7
- import Node from "./Node.js";
8
- import NodeAddressType from "./NodeAddressType.js";
9
- import NodeToAddressesConnection, {
10
- NodeToAddressesConnectionFromJson,
11
- } from "./NodeToAddressesConnection.js";
7
+ import type Node from "./Node.js";
8
+ import type NodeAddressType from "./NodeAddressType.js";
9
+ import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
10
+ import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js";
12
11
 
13
12
  /** This is a node on the Lightning Network, managed by a third party. The information about this node is public data that has been obtained by observing the Lightning Network. **/
14
13
  class GraphNode implements Node {
@@ -1,8 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
6
7
 
7
8
  /** One hop signifies a payment moving one node ahead on a payment route; a list of sequential hops defines the path from sender node to recipient node for a payment attempt. **/
8
9
  type Hop = Entity & {
@@ -1,14 +1,14 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
- import IncomingPaymentAttemptStatus from "./IncomingPaymentAttemptStatus.js";
8
- import IncomingPaymentToAttemptsConnection, {
9
- IncomingPaymentToAttemptsConnectionFromJson,
10
- } from "./IncomingPaymentToAttemptsConnection.js";
11
- import LightningTransaction from "./LightningTransaction.js";
5
+ import type LightsparkClient from "../client.js";
6
+ import type CurrencyAmount from "./CurrencyAmount.js";
7
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
8
+ import type IncomingPaymentAttemptStatus from "./IncomingPaymentAttemptStatus.js";
9
+ import type IncomingPaymentToAttemptsConnection from "./IncomingPaymentToAttemptsConnection.js";
10
+ import { IncomingPaymentToAttemptsConnectionFromJson } from "./IncomingPaymentToAttemptsConnection.js";
11
+ import type LightningTransaction from "./LightningTransaction.js";
12
12
  import TransactionStatus from "./TransactionStatus.js";
13
13
 
14
14
  /** A transaction that was sent to a Lightspark node on the Lightning Network. **/
@@ -1,8 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
6
7
  import IncomingPaymentAttemptStatus from "./IncomingPaymentAttemptStatus.js";
7
8
 
8
9
  /** An attempt for a payment over a route from sender node to recipient node. **/
@@ -1,8 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import IncomingPaymentAttempt, {
4
- IncomingPaymentAttemptFromJson,
5
- } from "./IncomingPaymentAttempt.js";
3
+ import type IncomingPaymentAttempt from "./IncomingPaymentAttempt.js";
4
+ import { IncomingPaymentAttemptFromJson } from "./IncomingPaymentAttempt.js";
6
5
 
7
6
  /** The connection from incoming payment to all attempts. **/
8
7
  type IncomingPaymentToAttemptsConnection = {
@@ -1,10 +1,12 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
6
- import InvoiceData, { InvoiceDataFromJson } from "./InvoiceData.js";
7
- import PaymentRequest from "./PaymentRequest.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
7
+ import type InvoiceData from "./InvoiceData.js";
8
+ import { InvoiceDataFromJson } from "./InvoiceData.js";
9
+ import type PaymentRequest from "./PaymentRequest.js";
8
10
  import PaymentRequestStatus from "./PaymentRequestStatus.js";
9
11
 
10
12
  /** This object represents a BOLT #11 invoice (https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) initiated by a Lightspark Node. **/
@@ -1,9 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
3
  import BitcoinNetwork from "./BitcoinNetwork.js";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Node, { NodeFromJson } from "./Node.js";
6
- import PaymentRequestData from "./PaymentRequestData.js";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Node from "./Node.js";
7
+ import { NodeFromJson } from "./Node.js";
8
+ import type PaymentRequestData from "./PaymentRequestData.js";
7
9
 
8
10
  /** This object represents the BOLT #11 invoice protocol for Lightning Payments. See https://github.com/lightning/bolts/blob/master/11-payment-encoding.md. **/
9
11
  type InvoiceData = PaymentRequestData & {
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
 
5
6
  type LightningFeeEstimateOutput = {
6
7
  /** The estimated fees for the payment. **/
@@ -1,16 +1,18 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { LightsparkException, Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import { LightsparkException } from "@lightsparkdev/core";
5
+ import type CurrencyAmount from "./CurrencyAmount.js";
6
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
+ import type Entity from "./Entity.js";
6
8
  import IncomingPayment from "./IncomingPayment.js";
7
9
  import OutgoingPayment from "./OutgoingPayment.js";
8
10
  import PaymentFailureReason from "./PaymentFailureReason.js";
9
11
  import { PaymentRequestDataFromJson } from "./PaymentRequestData.js";
10
12
  import { RichTextFromJson } from "./RichText.js";
11
- import RoutingTransaction from "./RoutingTransaction.js";
13
+ import type RoutingTransaction from "./RoutingTransaction.js";
12
14
  import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.js";
13
- import Transaction from "./Transaction.js";
15
+ import type Transaction from "./Transaction.js";
14
16
  import TransactionStatus from "./TransactionStatus.js";
15
17
 
16
18
  type LightningTransaction = Transaction &
@@ -1,25 +1,24 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
5
+ import type LightsparkClient from "../client.js";
6
6
  import BitcoinNetwork from "./BitcoinNetwork.js";
7
- import BlockchainBalance, {
8
- BlockchainBalanceFromJson,
9
- } from "./BlockchainBalance.js";
10
- import ChannelStatus from "./ChannelStatus.js";
11
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
+ import type BlockchainBalance from "./BlockchainBalance.js";
8
+ import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
9
+ import type ChannelStatus from "./ChannelStatus.js";
10
+ import type CurrencyAmount from "./CurrencyAmount.js";
11
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
12
12
  import LightsparkNodePurpose from "./LightsparkNodePurpose.js";
13
13
  import LightsparkNodeStatus from "./LightsparkNodeStatus.js";
14
- import LightsparkNodeToChannelsConnection, {
15
- LightsparkNodeToChannelsConnectionFromJson,
16
- } from "./LightsparkNodeToChannelsConnection.js";
17
- import Node from "./Node.js";
18
- import NodeAddressType from "./NodeAddressType.js";
19
- import NodeToAddressesConnection, {
20
- NodeToAddressesConnectionFromJson,
21
- } from "./NodeToAddressesConnection.js";
22
- import Secret, { SecretFromJson } from "./Secret.js";
14
+ import type LightsparkNodeToChannelsConnection from "./LightsparkNodeToChannelsConnection.js";
15
+ import { LightsparkNodeToChannelsConnectionFromJson } from "./LightsparkNodeToChannelsConnection.js";
16
+ import type Node from "./Node.js";
17
+ import type NodeAddressType from "./NodeAddressType.js";
18
+ import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
19
+ import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js";
20
+ import type Secret from "./Secret.js";
21
+ import { SecretFromJson } from "./Secret.js";
23
22
 
24
23
  /** This is a node that is managed by Lightspark and is managed within the current connected account. It contains many details about the node configuration, state, and metadata. **/
25
24
  class LightsparkNode implements Node {
@@ -1,9 +1,10 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { LightsparkException, Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import { LightsparkException } from "@lightsparkdev/core";
4
5
  import Account from "./Account.js";
5
6
  import { BalancesFromJson } from "./Balances.js";
6
- import Entity from "./Entity.js";
7
+ import type Entity from "./Entity.js";
7
8
  import Wallet from "./Wallet.js";
8
9
  import WalletStatus from "./WalletStatus.js";
9
10
 
@@ -1,7 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import Channel, { ChannelFromJson } from "./Channel.js";
4
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
3
+ import type Channel from "./Channel.js";
4
+ import { ChannelFromJson } from "./Channel.js";
5
+ import type PageInfo from "./PageInfo.js";
6
+ import { PageInfoFromJson } from "./PageInfo.js";
5
7
 
6
8
  type LightsparkNodeToChannelsConnection = {
7
9
  /** An object that holds pagination information about the objects in this connection. **/
@@ -1,20 +1,20 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { LightsparkException, Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import { LightsparkException } from "@lightsparkdev/core";
4
5
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
+ import type LightsparkClient from "../client.js";
6
7
  import BitcoinNetwork from "./BitcoinNetwork.js";
7
8
  import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
8
9
  import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
9
- import Entity from "./Entity.js";
10
+ import type Entity from "./Entity.js";
10
11
  import GraphNode from "./GraphNode.js";
11
12
  import LightsparkNode from "./LightsparkNode.js";
12
13
  import LightsparkNodePurpose from "./LightsparkNodePurpose.js";
13
14
  import LightsparkNodeStatus from "./LightsparkNodeStatus.js";
14
- import NodeAddressType from "./NodeAddressType.js";
15
- import NodeToAddressesConnection, {
16
- NodeToAddressesConnectionFromJson,
17
- } from "./NodeToAddressesConnection.js";
15
+ import type NodeAddressType from "./NodeAddressType.js";
16
+ import type NodeToAddressesConnection from "./NodeToAddressesConnection.js";
17
+ import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js";
18
18
  import { SecretFromJson } from "./Secret.js";
19
19
 
20
20
  /** This interface represents a lightning node that can be connected to the Lightning Network to send and receive transactions. **/
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import NodeAddress, { NodeAddressFromJson } from "./NodeAddress.js";
3
+ import type NodeAddress from "./NodeAddress.js";
4
+ import { NodeAddressFromJson } from "./NodeAddress.js";
4
5
 
5
6
  /** A connection between a node and the addresses it has announced for itself on Lightning Network. **/
6
7
  type NodeToAddressesConnection = {
@@ -1,14 +1,16 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { LightsparkException, Query } from "@lightsparkdev/core";
4
- import ChannelClosingTransaction from "./ChannelClosingTransaction.js";
5
- import ChannelOpeningTransaction from "./ChannelOpeningTransaction.js";
6
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
- import Deposit from "./Deposit.js";
8
- import Entity from "./Entity.js";
9
- import Transaction from "./Transaction.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import { LightsparkException } from "@lightsparkdev/core";
5
+ import type ChannelClosingTransaction from "./ChannelClosingTransaction.js";
6
+ import type ChannelOpeningTransaction from "./ChannelOpeningTransaction.js";
7
+ import type CurrencyAmount from "./CurrencyAmount.js";
8
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
9
+ import type Deposit from "./Deposit.js";
10
+ import type Entity from "./Entity.js";
11
+ import type Transaction from "./Transaction.js";
10
12
  import TransactionStatus from "./TransactionStatus.js";
11
- import Withdrawal from "./Withdrawal.js";
13
+ import type Withdrawal from "./Withdrawal.js";
12
14
 
13
15
  /** Transaction happened on Bitcoin blockchain. **/
14
16
  type OnChainTransaction = Transaction &
@@ -1,18 +1,18 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
- import LightningTransaction from "./LightningTransaction.js";
8
- import OutgoingPaymentToAttemptsConnection, {
9
- OutgoingPaymentToAttemptsConnectionFromJson,
10
- } from "./OutgoingPaymentToAttemptsConnection.js";
5
+ import type LightsparkClient from "../client.js";
6
+ import type CurrencyAmount from "./CurrencyAmount.js";
7
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
8
+ import type LightningTransaction from "./LightningTransaction.js";
9
+ import type OutgoingPaymentToAttemptsConnection from "./OutgoingPaymentToAttemptsConnection.js";
10
+ import { OutgoingPaymentToAttemptsConnectionFromJson } from "./OutgoingPaymentToAttemptsConnection.js";
11
11
  import PaymentFailureReason from "./PaymentFailureReason.js";
12
- import PaymentRequestData, {
13
- PaymentRequestDataFromJson,
14
- } from "./PaymentRequestData.js";
15
- import RichText, { RichTextFromJson } from "./RichText.js";
12
+ import type PaymentRequestData from "./PaymentRequestData.js";
13
+ import { PaymentRequestDataFromJson } from "./PaymentRequestData.js";
14
+ import type RichText from "./RichText.js";
15
+ import { RichTextFromJson } from "./RichText.js";
16
16
  import TransactionStatus from "./TransactionStatus.js";
17
17
 
18
18
  /** A transaction that was sent from a Lightspark node on the Lightning Network. **/
@@ -1,15 +1,15 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
- import Entity from "./Entity.js";
5
+ import type LightsparkClient from "../client.js";
6
+ import type CurrencyAmount from "./CurrencyAmount.js";
7
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
8
+ import type Entity from "./Entity.js";
8
9
  import HtlcAttemptFailureCode from "./HtlcAttemptFailureCode.js";
9
10
  import OutgoingPaymentAttemptStatus from "./OutgoingPaymentAttemptStatus.js";
10
- import OutgoingPaymentAttemptToHopsConnection, {
11
- OutgoingPaymentAttemptToHopsConnectionFromJson,
12
- } from "./OutgoingPaymentAttemptToHopsConnection.js";
11
+ import type OutgoingPaymentAttemptToHopsConnection from "./OutgoingPaymentAttemptToHopsConnection.js";
12
+ import { OutgoingPaymentAttemptToHopsConnectionFromJson } from "./OutgoingPaymentAttemptToHopsConnection.js";
13
13
 
14
14
  /** An attempt for a payment over a route from sender node to recipient node. **/
15
15
  class OutgoingPaymentAttempt implements Entity {
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import Hop, { HopFromJson } from "./Hop.js";
3
+ import type Hop from "./Hop.js";
4
+ import { HopFromJson } from "./Hop.js";
4
5
 
5
6
  /** The connection from an outgoing payment attempt to the list of sequential hops that define the path from sender node to recipient node. **/
6
7
  type OutgoingPaymentAttemptToHopsConnection = {
@@ -1,8 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import OutgoingPaymentAttempt, {
4
- OutgoingPaymentAttemptFromJson,
5
- } from "./OutgoingPaymentAttempt.js";
3
+ import type OutgoingPaymentAttempt from "./OutgoingPaymentAttempt.js";
4
+ import { OutgoingPaymentAttemptFromJson } from "./OutgoingPaymentAttempt.js";
6
5
 
7
6
  /** The connection from outgoing payment to all attempts. **/
8
7
  type OutgoingPaymentToAttemptsConnection = {
@@ -1,11 +1,12 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { LightsparkException, Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import { LightsparkException } from "@lightsparkdev/core";
4
5
  import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
6
- import Invoice from "./Invoice.js";
6
+ import type Entity from "./Entity.js";
7
+ import type Invoice from "./Invoice.js";
7
8
  import { InvoiceDataFromJson } from "./InvoiceData.js";
8
- import PaymentRequestData from "./PaymentRequestData.js";
9
+ import type PaymentRequestData from "./PaymentRequestData.js";
9
10
  import PaymentRequestStatus from "./PaymentRequestStatus.js";
10
11
 
11
12
  type PaymentRequest = Entity & {
@@ -3,7 +3,7 @@
3
3
  import { LightsparkException } from "@lightsparkdev/core";
4
4
  import BitcoinNetwork from "./BitcoinNetwork.js";
5
5
  import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
- import InvoiceData from "./InvoiceData.js";
6
+ import type InvoiceData from "./InvoiceData.js";
7
7
  import { NodeFromJson } from "./Node.js";
8
8
 
9
9
  /** The interface of a payment request on the Lightning Network (a.k.a. Lightning Invoice). **/
@@ -1,12 +1,14 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
6
- import LightningTransaction from "./LightningTransaction.js";
7
- import RichText, { RichTextFromJson } from "./RichText.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
7
+ import type LightningTransaction from "./LightningTransaction.js";
8
+ import type RichText from "./RichText.js";
9
+ import { RichTextFromJson } from "./RichText.js";
8
10
  import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.js";
9
- import Transaction from "./Transaction.js";
11
+ import type Transaction from "./Transaction.js";
10
12
  import TransactionStatus from "./TransactionStatus.js";
11
13
 
12
14
  /** A transaction that was forwarded through a Lightspark node on the Lightning Network. **/
@@ -1,9 +1,9 @@
1
- import { Maybe } from "@lightsparkdev/core";
2
- import CurrencyAmount from "./CurrencyAmount.js";
3
- import LightsparkNodePurpose from "./LightsparkNodePurpose.js";
4
- import LightsparkNodeStatus from "./LightsparkNodeStatus.js";
5
- import NodeAddressType from "./NodeAddressType.js";
6
- import Transaction from "./Transaction.js";
1
+ import type { Maybe } from "@lightsparkdev/core";
2
+ import type CurrencyAmount from "./CurrencyAmount.js";
3
+ import type LightsparkNodePurpose from "./LightsparkNodePurpose.js";
4
+ import type LightsparkNodeStatus from "./LightsparkNodeStatus.js";
5
+ import type NodeAddressType from "./NodeAddressType.js";
6
+ import type Transaction from "./Transaction.js";
7
7
 
8
8
  type SingleNodeDashboard = {
9
9
  id: string;
@@ -1,20 +1,22 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { LightsparkException, Query } from "@lightsparkdev/core";
4
- import ChannelClosingTransaction from "./ChannelClosingTransaction.js";
5
- import ChannelOpeningTransaction from "./ChannelOpeningTransaction.js";
6
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
- import Deposit from "./Deposit.js";
8
- import Entity from "./Entity.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import { LightsparkException } from "@lightsparkdev/core";
5
+ import type ChannelClosingTransaction from "./ChannelClosingTransaction.js";
6
+ import type ChannelOpeningTransaction from "./ChannelOpeningTransaction.js";
7
+ import type CurrencyAmount from "./CurrencyAmount.js";
8
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
9
+ import type Deposit from "./Deposit.js";
10
+ import type Entity from "./Entity.js";
9
11
  import IncomingPayment from "./IncomingPayment.js";
10
12
  import OutgoingPayment from "./OutgoingPayment.js";
11
13
  import PaymentFailureReason from "./PaymentFailureReason.js";
12
14
  import { PaymentRequestDataFromJson } from "./PaymentRequestData.js";
13
15
  import { RichTextFromJson } from "./RichText.js";
14
- import RoutingTransaction from "./RoutingTransaction.js";
16
+ import type RoutingTransaction from "./RoutingTransaction.js";
15
17
  import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.js";
16
18
  import TransactionStatus from "./TransactionStatus.js";
17
- import Withdrawal from "./Withdrawal.js";
19
+ import type Withdrawal from "./Withdrawal.js";
18
20
 
19
21
  type Transaction = Entity & {
20
22
  /**
@@ -1,6 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
3
+ import type CurrencyAmount from "./CurrencyAmount.js";
4
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
5
  import TransactionStatus from "./TransactionStatus.js";
5
6
 
6
7
  type TransactionUpdate = {
@@ -1,11 +1,13 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
- import Balances, { BalancesFromJson } from "./Balances.js";
7
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
8
- import LightsparkNodeOwner from "./LightsparkNodeOwner.js";
5
+ import type LightsparkClient from "../client.js";
6
+ import type Balances from "./Balances.js";
7
+ import { BalancesFromJson } from "./Balances.js";
8
+ import type CurrencyAmount from "./CurrencyAmount.js";
9
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
10
+ import type LightsparkNodeOwner from "./LightsparkNodeOwner.js";
9
11
  import WalletStatus from "./WalletStatus.js";
10
12
 
11
13
  class Wallet implements LightsparkNodeOwner {
@@ -1,10 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
4
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
5
- import Entity from "./Entity.js";
6
- import OnChainTransaction from "./OnChainTransaction.js";
7
- import Transaction from "./Transaction.js";
3
+ import type { Query } from "@lightsparkdev/core";
4
+ import type CurrencyAmount from "./CurrencyAmount.js";
5
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
6
+ import type Entity from "./Entity.js";
7
+ import type OnChainTransaction from "./OnChainTransaction.js";
8
+ import type Transaction from "./Transaction.js";
8
9
  import TransactionStatus from "./TransactionStatus.js";
9
10
 
10
11
  /** The transaction on the Bitcoin blockchain to withdraw funds from the Lightspark node to a Bitcoin wallet. **/
@@ -1,18 +1,17 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import { Query } from "@lightsparkdev/core";
3
+ import type { Query } from "@lightsparkdev/core";
4
4
  import autoBind from "auto-bind";
5
- import LightsparkClient from "../client.js";
6
- import CurrencyAmount, { CurrencyAmountFromJson } from "./CurrencyAmount.js";
7
- import Entity from "./Entity.js";
5
+ import type LightsparkClient from "../client.js";
6
+ import type CurrencyAmount from "./CurrencyAmount.js";
7
+ import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
8
+ import type Entity from "./Entity.js";
8
9
  import WithdrawalMode from "./WithdrawalMode.js";
9
10
  import WithdrawalRequestStatus from "./WithdrawalRequestStatus.js";
10
- import WithdrawalRequestToChannelClosingTransactionsConnection, {
11
- WithdrawalRequestToChannelClosingTransactionsConnectionFromJson,
12
- } from "./WithdrawalRequestToChannelClosingTransactionsConnection.js";
13
- import WithdrawalRequestToChannelOpeningTransactionsConnection, {
14
- WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson,
15
- } from "./WithdrawalRequestToChannelOpeningTransactionsConnection.js";
11
+ import type WithdrawalRequestToChannelClosingTransactionsConnection from "./WithdrawalRequestToChannelClosingTransactionsConnection.js";
12
+ import { WithdrawalRequestToChannelClosingTransactionsConnectionFromJson } from "./WithdrawalRequestToChannelClosingTransactionsConnection.js";
13
+ import type WithdrawalRequestToChannelOpeningTransactionsConnection from "./WithdrawalRequestToChannelOpeningTransactionsConnection.js";
14
+ import { WithdrawalRequestToChannelOpeningTransactionsConnectionFromJson } from "./WithdrawalRequestToChannelOpeningTransactionsConnection.js";
16
15
 
17
16
  class WithdrawalRequest implements Entity {
18
17
  constructor(
@@ -1,9 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import ChannelClosingTransaction, {
4
- ChannelClosingTransactionFromJson,
5
- } from "./ChannelClosingTransaction.js";
6
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
3
+ import type ChannelClosingTransaction from "./ChannelClosingTransaction.js";
4
+ import { ChannelClosingTransactionFromJson } from "./ChannelClosingTransaction.js";
5
+ import type PageInfo from "./PageInfo.js";
6
+ import { PageInfoFromJson } from "./PageInfo.js";
7
7
 
8
8
  type WithdrawalRequestToChannelClosingTransactionsConnection = {
9
9
  /** An object that holds pagination information about the objects in this connection. **/
@@ -1,9 +1,9 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import ChannelOpeningTransaction, {
4
- ChannelOpeningTransactionFromJson,
5
- } from "./ChannelOpeningTransaction.js";
6
- import PageInfo, { PageInfoFromJson } from "./PageInfo.js";
3
+ import type ChannelOpeningTransaction from "./ChannelOpeningTransaction.js";
4
+ import { ChannelOpeningTransactionFromJson } from "./ChannelOpeningTransaction.js";
5
+ import type PageInfo from "./PageInfo.js";
6
+ import { PageInfoFromJson } from "./PageInfo.js";
7
7
 
8
8
  type WithdrawalRequestToChannelOpeningTransactionsConnection = {
9
9
  /** An object that holds pagination information about the objects in this connection. **/