@lightsparkdev/lightspark-sdk 1.2.0 → 1.2.1

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 (35) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{chunk-5RDIWPBE.js → chunk-D32EWIPX.js} +3 -1
  3. package/dist/env.cjs +3 -1
  4. package/dist/env.d.cts +17 -0
  5. package/dist/env.js +2 -2
  6. package/dist/{index-f040db9f.d.ts → index-5acc6526.d.ts} +717 -14
  7. package/dist/index.cjs +29 -19
  8. package/dist/index.d.cts +41 -0
  9. package/dist/index.d.ts +3 -3
  10. package/dist/index.js +26 -21
  11. package/dist/objects/index.d.cts +4 -0
  12. package/dist/objects/index.d.ts +1 -1
  13. package/dist/objects/index.js +1 -1
  14. package/dist/{text-encoding-MDIPJAHL.js → text-encoding-26SMKBAQ.js} +3 -1
  15. package/package.json +4 -4
  16. package/src/auth/AccountTokenAuthProvider.ts +15 -11
  17. package/src/client.ts +7 -6
  18. package/src/helpers.ts +3 -1
  19. package/src/objects/Account.ts +8 -0
  20. package/src/objects/AccountToChannelsConnection.ts +5 -0
  21. package/src/objects/Channel.ts +31 -0
  22. package/src/objects/GraphNode.ts +28 -0
  23. package/src/objects/IncomingPayment.ts +17 -0
  24. package/src/objects/LightsparkNodeWithOSK.ts +61 -0
  25. package/src/objects/LightsparkNodeWithRemoteSigning.ts +60 -0
  26. package/src/objects/OutgoingPayment.ts +19 -0
  27. package/src/objects/OutgoingPaymentAttempt.ts +26 -0
  28. package/src/objects/Wallet.ts +12 -0
  29. package/src/objects/WithdrawalRequest.ts +17 -0
  30. package/src/tests/integration/constants.ts +13 -0
  31. package/src/tests/integration/general-regtest.test.ts +652 -0
  32. package/src/tests/serialization.test.ts +5 -2
  33. package/src/webhooks.ts +1 -1
  34. package/src/tests/integration/client.test.ts +0 -207
  35. /package/dist/{chunk-NIMBE7W3.js → chunk-BMTV3EA2.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @lightsparkdev/lightspark-sdk
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - aefe52c: Update tsup to latest
8
+ - 219f60f: Add descriptions and deprecation tags to JS class definitions. LIG-3794
9
+ - 09dfcee: Prevent ts compile of test files for builds and update lint configuration
10
+ - Updated dependencies [aefe52c]
11
+ - Updated dependencies [09dfcee]
12
+ - @lightsparkdev/core@1.0.10
13
+
3
14
  ## 1.2.0
4
15
 
5
16
  ### Minor Changes
@@ -11,7 +11,9 @@ var isBitcoinNetwork = (bitcoinNetwork) => {
11
11
  var assertValidBitcoinNetwork = (bitcoinNetwork) => {
12
12
  if (!isBitcoinNetwork(bitcoinNetwork)) {
13
13
  throw new Error(
14
- `Invalid bitcoin network ${bitcoinNetwork}. Valid networks: ${BITCOIN_NETWORKS}`
14
+ `Invalid bitcoin network ${bitcoinNetwork}. Valid networks: ${BITCOIN_NETWORKS.join(
15
+ ", "
16
+ )}`
15
17
  );
16
18
  }
17
19
  };
package/dist/env.cjs CHANGED
@@ -49,7 +49,9 @@ var isBitcoinNetwork = (bitcoinNetwork) => {
49
49
  var assertValidBitcoinNetwork = (bitcoinNetwork) => {
50
50
  if (!isBitcoinNetwork(bitcoinNetwork)) {
51
51
  throw new Error(
52
- `Invalid bitcoin network ${bitcoinNetwork}. Valid networks: ${BITCOIN_NETWORKS}`
52
+ `Invalid bitcoin network ${bitcoinNetwork}. Valid networks: ${BITCOIN_NETWORKS.join(
53
+ ", "
54
+ )}`
53
55
  );
54
56
  }
55
57
  };
package/dist/env.d.cts ADDED
@@ -0,0 +1,17 @@
1
+ import { B as BitcoinNetwork } from './BitcoinNetwork-a816c0be.js';
2
+
3
+ type EnvCredentials = {
4
+ apiTokenClientId: string;
5
+ apiTokenClientSecret: string;
6
+ bitcoinNetwork: BitcoinNetwork;
7
+ testNodePassword: string;
8
+ baseUrl: string;
9
+ };
10
+ declare enum RequiredCredentials {
11
+ ClientId = "LIGHTSPARK_API_TOKEN_CLIENT_ID",
12
+ ClientSecret = "LIGHTSPARK_API_TOKEN_CLIENT_SECRET",
13
+ BitcoinNetwork = "BITCOIN_NETWORK"
14
+ }
15
+ declare const getCredentialsFromEnvOrThrow: () => EnvCredentials;
16
+
17
+ export { EnvCredentials, RequiredCredentials, getCredentialsFromEnvOrThrow };
package/dist/env.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  getBitcoinNetworkOrThrow
3
- } from "./chunk-5RDIWPBE.js";
3
+ } from "./chunk-D32EWIPX.js";
4
4
  import "./chunk-K6SAUSAX.js";
5
- import "./chunk-NIMBE7W3.js";
5
+ import "./chunk-BMTV3EA2.js";
6
6
 
7
7
  // src/env.ts
8
8
  import dotenv from "dotenv";