@chainstream-io/sdk 0.1.23 → 0.1.25
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/README.md +2 -2
- package/dist/{WatchlistApi-VmKx6Q1Q.d.cts → WatchlistApi-BG3KoB75.d.cts} +175 -540
- package/dist/{WatchlistApi-VmKx6Q1Q.d.ts → WatchlistApi-BG3KoB75.d.ts} +175 -540
- package/dist/{index-omaVsSSm.d.ts → index-C0qP5IcI.d.ts} +2 -2
- package/dist/{index-CjzuX57e.d.cts → index-DLgQWpoA.d.cts} +2 -2
- package/dist/index.cjs +19 -198
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +19 -198
- package/dist/index.mjs.map +1 -1
- package/dist/openapi/index.cjs +30 -388
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.mjs +28 -360
- package/dist/openapi/index.mjs.map +1 -1
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h2 as Resolution, a as Configuration, U as DexApi, Y as DexPoolApi, bf as TokenApi, bK as WalletApi, bv as TradeApi, au as RankingApi, bD as TransactionApi, z as DefiSolanaMoonshotApi, K as DefiSolanaPumpfunApi, aT as RedPacketApi, a6 as IpfsApi, w as BlockchainApi, bM as WatchlistApi, a9 as JobsApi, ao as KYTApi, a4 as EndpointApi } from './WatchlistApi-BG3KoB75.js';
|
|
2
2
|
|
|
3
3
|
declare enum TokenActivityType {
|
|
4
4
|
Sell = "sell",
|
|
@@ -509,7 +509,7 @@ interface DexAggregatorOptions {
|
|
|
509
509
|
*/
|
|
510
510
|
autoConnectWebSocket?: boolean;
|
|
511
511
|
}
|
|
512
|
-
declare const LIB_VERSION = "0.1.
|
|
512
|
+
declare const LIB_VERSION = "0.1.25";
|
|
513
513
|
declare class DexClient {
|
|
514
514
|
readonly requestCtx: DexRequestContext;
|
|
515
515
|
readonly _configuration: Configuration;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h2 as Resolution, a as Configuration, U as DexApi, Y as DexPoolApi, bf as TokenApi, bK as WalletApi, bv as TradeApi, au as RankingApi, bD as TransactionApi, z as DefiSolanaMoonshotApi, K as DefiSolanaPumpfunApi, aT as RedPacketApi, a6 as IpfsApi, w as BlockchainApi, bM as WatchlistApi, a9 as JobsApi, ao as KYTApi, a4 as EndpointApi } from './WatchlistApi-BG3KoB75.cjs';
|
|
2
2
|
|
|
3
3
|
declare enum TokenActivityType {
|
|
4
4
|
Sell = "sell",
|
|
@@ -509,7 +509,7 @@ interface DexAggregatorOptions {
|
|
|
509
509
|
*/
|
|
510
510
|
autoConnectWebSocket?: boolean;
|
|
511
511
|
}
|
|
512
|
-
declare const LIB_VERSION = "0.1.
|
|
512
|
+
declare const LIB_VERSION = "0.1.25";
|
|
513
513
|
declare class DexClient {
|
|
514
514
|
readonly requestCtx: DexRequestContext;
|
|
515
515
|
readonly _configuration: Configuration;
|
package/dist/index.cjs
CHANGED
|
@@ -2689,40 +2689,6 @@ function EstimateGasLimitResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2689
2689
|
};
|
|
2690
2690
|
}
|
|
2691
2691
|
|
|
2692
|
-
// src/openapi/models/GainersAndLosersDTO.ts
|
|
2693
|
-
function GainersAndLosersDTOFromJSON(json) {
|
|
2694
|
-
return GainersAndLosersDTOFromJSONTyped(json, false);
|
|
2695
|
-
}
|
|
2696
|
-
function GainersAndLosersDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
2697
|
-
if (json == null) {
|
|
2698
|
-
return json;
|
|
2699
|
-
}
|
|
2700
|
-
return {
|
|
2701
|
-
"address": json["address"],
|
|
2702
|
-
"pnl": json["pnl"],
|
|
2703
|
-
"tradeCount": json["tradeCount"],
|
|
2704
|
-
"volume": json["volume"]
|
|
2705
|
-
};
|
|
2706
|
-
}
|
|
2707
|
-
|
|
2708
|
-
// src/openapi/models/GainersAndLosersPage.ts
|
|
2709
|
-
function GainersAndLosersPageFromJSON(json) {
|
|
2710
|
-
return GainersAndLosersPageFromJSONTyped(json, false);
|
|
2711
|
-
}
|
|
2712
|
-
function GainersAndLosersPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
2713
|
-
if (json == null) {
|
|
2714
|
-
return json;
|
|
2715
|
-
}
|
|
2716
|
-
return {
|
|
2717
|
-
"hasNext": json["hasNext"] == null ? void 0 : json["hasNext"],
|
|
2718
|
-
"hasPrev": json["hasPrev"] == null ? void 0 : json["hasPrev"],
|
|
2719
|
-
"startCursor": json["startCursor"] == null ? void 0 : json["startCursor"],
|
|
2720
|
-
"endCursor": json["endCursor"] == null ? void 0 : json["endCursor"],
|
|
2721
|
-
"total": json["total"] == null ? void 0 : json["total"],
|
|
2722
|
-
"data": json["data"].map(GainersAndLosersDTOFromJSON)
|
|
2723
|
-
};
|
|
2724
|
-
}
|
|
2725
|
-
|
|
2726
2692
|
// src/openapi/models/GasPriceResponse.ts
|
|
2727
2693
|
function GasPriceResponseFromJSON(json) {
|
|
2728
2694
|
return GasPriceResponseFromJSONTyped(json, false);
|
|
@@ -3426,48 +3392,6 @@ function TokenTraderFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
3426
3392
|
};
|
|
3427
3393
|
}
|
|
3428
3394
|
|
|
3429
|
-
// src/openapi/models/TopTradersDTO.ts
|
|
3430
|
-
function TopTradersDTOFromJSON(json) {
|
|
3431
|
-
return TopTradersDTOFromJSONTyped(json, false);
|
|
3432
|
-
}
|
|
3433
|
-
function TopTradersDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
3434
|
-
if (json == null) {
|
|
3435
|
-
return json;
|
|
3436
|
-
}
|
|
3437
|
-
return {
|
|
3438
|
-
"tokenAddress": json["tokenAddress"],
|
|
3439
|
-
"owner": json["owner"],
|
|
3440
|
-
"tags": json["tags"],
|
|
3441
|
-
"type": json["type"],
|
|
3442
|
-
"volume": json["volume"],
|
|
3443
|
-
"trade": json["trade"],
|
|
3444
|
-
"tradeBuy": json["tradeBuy"],
|
|
3445
|
-
"tradeSell": json["tradeSell"],
|
|
3446
|
-
"volumeBuy": json["volumeBuy"],
|
|
3447
|
-
"volumeSell": json["volumeSell"],
|
|
3448
|
-
"isScaledUiToken": json["isScaledUiToken"],
|
|
3449
|
-
"multiplier": json["multiplier"] == null ? void 0 : json["multiplier"]
|
|
3450
|
-
};
|
|
3451
|
-
}
|
|
3452
|
-
|
|
3453
|
-
// src/openapi/models/TopTradersPage.ts
|
|
3454
|
-
function TopTradersPageFromJSON(json) {
|
|
3455
|
-
return TopTradersPageFromJSONTyped(json, false);
|
|
3456
|
-
}
|
|
3457
|
-
function TopTradersPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
3458
|
-
if (json == null) {
|
|
3459
|
-
return json;
|
|
3460
|
-
}
|
|
3461
|
-
return {
|
|
3462
|
-
"hasNext": json["hasNext"] == null ? void 0 : json["hasNext"],
|
|
3463
|
-
"hasPrev": json["hasPrev"] == null ? void 0 : json["hasPrev"],
|
|
3464
|
-
"startCursor": json["startCursor"] == null ? void 0 : json["startCursor"],
|
|
3465
|
-
"endCursor": json["endCursor"] == null ? void 0 : json["endCursor"],
|
|
3466
|
-
"total": json["total"] == null ? void 0 : json["total"],
|
|
3467
|
-
"data": json["data"].map(TopTradersDTOFromJSON)
|
|
3468
|
-
};
|
|
3469
|
-
}
|
|
3470
|
-
|
|
3471
3395
|
// src/openapi/models/TradeDetailDTO.ts
|
|
3472
3396
|
function TradeDetailDTOFromJSON(json) {
|
|
3473
3397
|
return TradeDetailDTOFromJSONTyped(json, false);
|
|
@@ -6408,6 +6332,24 @@ var TokenApi = class extends BaseAPI {
|
|
|
6408
6332
|
);
|
|
6409
6333
|
}
|
|
6410
6334
|
const queryParameters = {};
|
|
6335
|
+
if (requestParameters["sortBy"] != null) {
|
|
6336
|
+
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
6337
|
+
}
|
|
6338
|
+
if (requestParameters["sortDirection"] != null) {
|
|
6339
|
+
queryParameters["sortDirection"] = requestParameters["sortDirection"];
|
|
6340
|
+
}
|
|
6341
|
+
if (requestParameters["minTvlInSol"] != null) {
|
|
6342
|
+
queryParameters["minTvlInSol"] = requestParameters["minTvlInSol"];
|
|
6343
|
+
}
|
|
6344
|
+
if (requestParameters["maxTvlInSol"] != null) {
|
|
6345
|
+
queryParameters["maxTvlInSol"] = requestParameters["maxTvlInSol"];
|
|
6346
|
+
}
|
|
6347
|
+
if (requestParameters["minTvlInUsd"] != null) {
|
|
6348
|
+
queryParameters["minTvlInUsd"] = requestParameters["minTvlInUsd"];
|
|
6349
|
+
}
|
|
6350
|
+
if (requestParameters["maxTvlInUsd"] != null) {
|
|
6351
|
+
queryParameters["maxTvlInUsd"] = requestParameters["maxTvlInUsd"];
|
|
6352
|
+
}
|
|
6411
6353
|
const headerParameters = {};
|
|
6412
6354
|
if (this.configuration && this.configuration.accessToken) {
|
|
6413
6355
|
const token = this.configuration.accessToken;
|
|
@@ -7439,127 +7381,6 @@ var TradeApi = class extends BaseAPI {
|
|
|
7439
7381
|
const response = await this.getActivitiesRaw(requestParameters, initOverrides);
|
|
7440
7382
|
return await response.value();
|
|
7441
7383
|
}
|
|
7442
|
-
/**
|
|
7443
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
7444
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
7445
|
-
*/
|
|
7446
|
-
async getGainersLosersRaw(requestParameters, initOverrides) {
|
|
7447
|
-
if (requestParameters["chain"] == null) {
|
|
7448
|
-
throw new RequiredError(
|
|
7449
|
-
"chain",
|
|
7450
|
-
'Required parameter "chain" was null or undefined when calling getGainersLosers().'
|
|
7451
|
-
);
|
|
7452
|
-
}
|
|
7453
|
-
const queryParameters = {};
|
|
7454
|
-
if (requestParameters["cursor"] != null) {
|
|
7455
|
-
queryParameters["cursor"] = requestParameters["cursor"];
|
|
7456
|
-
}
|
|
7457
|
-
if (requestParameters["limit"] != null) {
|
|
7458
|
-
queryParameters["limit"] = requestParameters["limit"];
|
|
7459
|
-
}
|
|
7460
|
-
if (requestParameters["direction"] != null) {
|
|
7461
|
-
queryParameters["direction"] = requestParameters["direction"];
|
|
7462
|
-
}
|
|
7463
|
-
if (requestParameters["type"] != null) {
|
|
7464
|
-
queryParameters["type"] = requestParameters["type"];
|
|
7465
|
-
}
|
|
7466
|
-
if (requestParameters["sortBy"] != null) {
|
|
7467
|
-
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
7468
|
-
}
|
|
7469
|
-
if (requestParameters["sortType"] != null) {
|
|
7470
|
-
queryParameters["sortType"] = requestParameters["sortType"];
|
|
7471
|
-
}
|
|
7472
|
-
const headerParameters = {};
|
|
7473
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
7474
|
-
const token = this.configuration.accessToken;
|
|
7475
|
-
const tokenString = await token("bearer", []);
|
|
7476
|
-
if (tokenString) {
|
|
7477
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7478
|
-
}
|
|
7479
|
-
}
|
|
7480
|
-
let urlPath = `/v1/trade/{chain}/gainers-losers`;
|
|
7481
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
|
|
7482
|
-
const response = await this.request({
|
|
7483
|
-
path: urlPath,
|
|
7484
|
-
method: "GET",
|
|
7485
|
-
headers: headerParameters,
|
|
7486
|
-
query: queryParameters
|
|
7487
|
-
}, initOverrides);
|
|
7488
|
-
return new JSONApiResponse(response, (jsonValue) => GainersAndLosersPageFromJSON(jsonValue));
|
|
7489
|
-
}
|
|
7490
|
-
/**
|
|
7491
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
7492
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
7493
|
-
*/
|
|
7494
|
-
async getGainersLosers(requestParameters, initOverrides) {
|
|
7495
|
-
const response = await this.getGainersLosersRaw(requestParameters, initOverrides);
|
|
7496
|
-
return await response.value();
|
|
7497
|
-
}
|
|
7498
|
-
/**
|
|
7499
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
|
|
7500
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
|
|
7501
|
-
*/
|
|
7502
|
-
async getTopTradersRaw(requestParameters, initOverrides) {
|
|
7503
|
-
if (requestParameters["chain"] == null) {
|
|
7504
|
-
throw new RequiredError(
|
|
7505
|
-
"chain",
|
|
7506
|
-
'Required parameter "chain" was null or undefined when calling getTopTraders().'
|
|
7507
|
-
);
|
|
7508
|
-
}
|
|
7509
|
-
if (requestParameters["tokenAddress"] == null) {
|
|
7510
|
-
throw new RequiredError(
|
|
7511
|
-
"tokenAddress",
|
|
7512
|
-
'Required parameter "tokenAddress" was null or undefined when calling getTopTraders().'
|
|
7513
|
-
);
|
|
7514
|
-
}
|
|
7515
|
-
const queryParameters = {};
|
|
7516
|
-
if (requestParameters["cursor"] != null) {
|
|
7517
|
-
queryParameters["cursor"] = requestParameters["cursor"];
|
|
7518
|
-
}
|
|
7519
|
-
if (requestParameters["limit"] != null) {
|
|
7520
|
-
queryParameters["limit"] = requestParameters["limit"];
|
|
7521
|
-
}
|
|
7522
|
-
if (requestParameters["direction"] != null) {
|
|
7523
|
-
queryParameters["direction"] = requestParameters["direction"];
|
|
7524
|
-
}
|
|
7525
|
-
if (requestParameters["tokenAddress"] != null) {
|
|
7526
|
-
queryParameters["tokenAddress"] = requestParameters["tokenAddress"];
|
|
7527
|
-
}
|
|
7528
|
-
if (requestParameters["timeFrame"] != null) {
|
|
7529
|
-
queryParameters["timeFrame"] = requestParameters["timeFrame"];
|
|
7530
|
-
}
|
|
7531
|
-
if (requestParameters["sortType"] != null) {
|
|
7532
|
-
queryParameters["sortType"] = requestParameters["sortType"];
|
|
7533
|
-
}
|
|
7534
|
-
if (requestParameters["sortBy"] != null) {
|
|
7535
|
-
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
7536
|
-
}
|
|
7537
|
-
const headerParameters = {};
|
|
7538
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
7539
|
-
const token = this.configuration.accessToken;
|
|
7540
|
-
const tokenString = await token("bearer", []);
|
|
7541
|
-
if (tokenString) {
|
|
7542
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7543
|
-
}
|
|
7544
|
-
}
|
|
7545
|
-
let urlPath = `/v1/trade/{chain}/top-traders`;
|
|
7546
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
|
|
7547
|
-
const response = await this.request({
|
|
7548
|
-
path: urlPath,
|
|
7549
|
-
method: "GET",
|
|
7550
|
-
headers: headerParameters,
|
|
7551
|
-
query: queryParameters
|
|
7552
|
-
}, initOverrides);
|
|
7553
|
-
return new JSONApiResponse(response, (jsonValue) => TopTradersPageFromJSON(jsonValue));
|
|
7554
|
-
}
|
|
7555
|
-
/**
|
|
7556
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
|
|
7557
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
|
|
7558
|
-
*/
|
|
7559
|
-
async getTopTraders(requestParameters, initOverrides) {
|
|
7560
|
-
const response = await this.getTopTradersRaw(requestParameters, initOverrides);
|
|
7561
|
-
return await response.value();
|
|
7562
|
-
}
|
|
7563
7384
|
/**
|
|
7564
7385
|
* CONTROLLER.TRADE.GET.TOKEN.DESCRIPTION
|
|
7565
7386
|
* CONTROLLER.TRADE.GET.TOKEN.SUMMARY
|
|
@@ -8019,7 +7840,7 @@ var WatchlistApi = class extends BaseAPI {
|
|
|
8019
7840
|
|
|
8020
7841
|
// src/index.ts
|
|
8021
7842
|
var import_event_source_polyfill = require("event-source-polyfill");
|
|
8022
|
-
var LIB_VERSION = "0.1.
|
|
7843
|
+
var LIB_VERSION = "0.1.25";
|
|
8023
7844
|
var UserAgentMiddleware = class {
|
|
8024
7845
|
async pre(context) {
|
|
8025
7846
|
if (!context.init.headers) {
|