@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.
- package/CHANGELOG.md +11 -0
- package/dist/{chunk-5RDIWPBE.js → chunk-D32EWIPX.js} +3 -1
- package/dist/env.cjs +3 -1
- package/dist/env.d.cts +17 -0
- package/dist/env.js +2 -2
- package/dist/{index-f040db9f.d.ts → index-5acc6526.d.ts} +717 -14
- package/dist/index.cjs +29 -19
- package/dist/index.d.cts +41 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +26 -21
- package/dist/objects/index.d.cts +4 -0
- package/dist/objects/index.d.ts +1 -1
- package/dist/objects/index.js +1 -1
- package/dist/{text-encoding-MDIPJAHL.js → text-encoding-26SMKBAQ.js} +3 -1
- package/package.json +4 -4
- package/src/auth/AccountTokenAuthProvider.ts +15 -11
- package/src/client.ts +7 -6
- package/src/helpers.ts +3 -1
- package/src/objects/Account.ts +8 -0
- package/src/objects/AccountToChannelsConnection.ts +5 -0
- package/src/objects/Channel.ts +31 -0
- package/src/objects/GraphNode.ts +28 -0
- package/src/objects/IncomingPayment.ts +17 -0
- package/src/objects/LightsparkNodeWithOSK.ts +61 -0
- package/src/objects/LightsparkNodeWithRemoteSigning.ts +60 -0
- package/src/objects/OutgoingPayment.ts +19 -0
- package/src/objects/OutgoingPaymentAttempt.ts +26 -0
- package/src/objects/Wallet.ts +12 -0
- package/src/objects/WithdrawalRequest.ts +17 -0
- package/src/tests/integration/constants.ts +13 -0
- package/src/tests/integration/general-regtest.test.ts +652 -0
- package/src/tests/serialization.test.ts +5 -2
- package/src/webhooks.ts +1 -1
- package/src/tests/integration/client.test.ts +0 -207
- /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