@chainstream-io/sdk 2.0.8 → 2.0.9
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/dist/{chainstream-Dwm2QHpn.d.cts → chainstream-LmorAvq7.d.cts} +7 -0
- package/dist/{chainstream-Dwm2QHpn.d.ts → chainstream-LmorAvq7.d.ts} +7 -0
- package/dist/chainstream.cjs +4 -1
- package/dist/chainstream.cjs.map +1 -1
- package/dist/chainstream.d.cts +1 -1
- package/dist/chainstream.d.ts +1 -1
- package/dist/chainstream.mjs +4 -1
- package/dist/chainstream.mjs.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/dist/stream/index.d.cts +1 -1
- package/dist/stream/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/chainstream.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as ChainStreamClient, y as ChainStreamClientOptions, z as ChainStreamRequestContext, gI as PostOptions, T as TokenProvider } from './chainstream-
|
|
1
|
+
export { C as ChainStreamClient, y as ChainStreamClientOptions, z as ChainStreamRequestContext, gI as PostOptions, T as TokenProvider } from './chainstream-LmorAvq7.cjs';
|
|
2
2
|
import 'axios';
|
package/dist/chainstream.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as ChainStreamClient, y as ChainStreamClientOptions, z as ChainStreamRequestContext, gI as PostOptions, T as TokenProvider } from './chainstream-
|
|
1
|
+
export { C as ChainStreamClient, y as ChainStreamClientOptions, z as ChainStreamRequestContext, gI as PostOptions, T as TokenProvider } from './chainstream-LmorAvq7.js';
|
|
2
2
|
import 'axios';
|
package/dist/chainstream.mjs
CHANGED
|
@@ -55,6 +55,8 @@ var configure = (options) => {
|
|
|
55
55
|
Object.entries(walletHeaders).forEach(([key, value]) => {
|
|
56
56
|
config.headers[key] = value;
|
|
57
57
|
});
|
|
58
|
+
} else if (options.apiKey) {
|
|
59
|
+
config.headers["X-API-KEY"] = options.apiKey;
|
|
58
60
|
} else if (options.accessToken) {
|
|
59
61
|
const token = typeof options.accessToken === "string" ? options.accessToken : await options.accessToken.getToken();
|
|
60
62
|
config.headers.Authorization = `Bearer ${token}`;
|
|
@@ -2331,7 +2333,8 @@ var ChainStreamClient = class {
|
|
|
2331
2333
|
const streamUrl = options.streamUrl ?? "wss://realtime-dex.chainstream.io/connection/websocket";
|
|
2332
2334
|
this.requestCtx = { baseUrl, streamUrl, accessToken };
|
|
2333
2335
|
configure({
|
|
2334
|
-
accessToken: options.walletSigner ? void 0 : accessToken,
|
|
2336
|
+
accessToken: options.walletSigner || options.apiKey ? void 0 : accessToken,
|
|
2337
|
+
apiKey: options.apiKey,
|
|
2335
2338
|
walletSigner: options.walletSigner,
|
|
2336
2339
|
basePath: baseUrl,
|
|
2337
2340
|
debugging: options.debug
|