@chainstream-io/sdk 0.1.24 → 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.
@@ -1,4 +1,4 @@
1
- import { ho as Resolution, a as Configuration, U as DexApi, Y as DexPoolApi, bf as TokenApi, bU as WalletApi, bx as TradeApi, au as RankingApi, bN as TransactionApi, z as DefiSolanaMoonshotApi, K as DefiSolanaPumpfunApi, aT as RedPacketApi, a6 as IpfsApi, w as BlockchainApi, bW as WatchlistApi, a9 as JobsApi, ao as KYTApi, a4 as EndpointApi } from './WatchlistApi-DtNbXNQ2.js';
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.24";
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 { ho as Resolution, a as Configuration, U as DexApi, Y as DexPoolApi, bf as TokenApi, bU as WalletApi, bx as TradeApi, au as RankingApi, bN as TransactionApi, z as DefiSolanaMoonshotApi, K as DefiSolanaPumpfunApi, aT as RedPacketApi, a6 as IpfsApi, w as BlockchainApi, bW as WatchlistApi, a9 as JobsApi, ao as KYTApi, a4 as EndpointApi } from './WatchlistApi-DtNbXNQ2.cjs';
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.24";
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);
@@ -7457,127 +7381,6 @@ var TradeApi = class extends BaseAPI {
7457
7381
  const response = await this.getActivitiesRaw(requestParameters, initOverrides);
7458
7382
  return await response.value();
7459
7383
  }
7460
- /**
7461
- * CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
7462
- * CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
7463
- */
7464
- async getGainersLosersRaw(requestParameters, initOverrides) {
7465
- if (requestParameters["chain"] == null) {
7466
- throw new RequiredError(
7467
- "chain",
7468
- 'Required parameter "chain" was null or undefined when calling getGainersLosers().'
7469
- );
7470
- }
7471
- const queryParameters = {};
7472
- if (requestParameters["cursor"] != null) {
7473
- queryParameters["cursor"] = requestParameters["cursor"];
7474
- }
7475
- if (requestParameters["limit"] != null) {
7476
- queryParameters["limit"] = requestParameters["limit"];
7477
- }
7478
- if (requestParameters["direction"] != null) {
7479
- queryParameters["direction"] = requestParameters["direction"];
7480
- }
7481
- if (requestParameters["type"] != null) {
7482
- queryParameters["type"] = requestParameters["type"];
7483
- }
7484
- if (requestParameters["sortBy"] != null) {
7485
- queryParameters["sortBy"] = requestParameters["sortBy"];
7486
- }
7487
- if (requestParameters["sortType"] != null) {
7488
- queryParameters["sortType"] = requestParameters["sortType"];
7489
- }
7490
- const headerParameters = {};
7491
- if (this.configuration && this.configuration.accessToken) {
7492
- const token = this.configuration.accessToken;
7493
- const tokenString = await token("bearer", []);
7494
- if (tokenString) {
7495
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
7496
- }
7497
- }
7498
- let urlPath = `/v1/trade/{chain}/gainers-losers`;
7499
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
7500
- const response = await this.request({
7501
- path: urlPath,
7502
- method: "GET",
7503
- headers: headerParameters,
7504
- query: queryParameters
7505
- }, initOverrides);
7506
- return new JSONApiResponse(response, (jsonValue) => GainersAndLosersPageFromJSON(jsonValue));
7507
- }
7508
- /**
7509
- * CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
7510
- * CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
7511
- */
7512
- async getGainersLosers(requestParameters, initOverrides) {
7513
- const response = await this.getGainersLosersRaw(requestParameters, initOverrides);
7514
- return await response.value();
7515
- }
7516
- /**
7517
- * CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
7518
- * CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
7519
- */
7520
- async getTopTradersRaw(requestParameters, initOverrides) {
7521
- if (requestParameters["chain"] == null) {
7522
- throw new RequiredError(
7523
- "chain",
7524
- 'Required parameter "chain" was null or undefined when calling getTopTraders().'
7525
- );
7526
- }
7527
- if (requestParameters["tokenAddress"] == null) {
7528
- throw new RequiredError(
7529
- "tokenAddress",
7530
- 'Required parameter "tokenAddress" was null or undefined when calling getTopTraders().'
7531
- );
7532
- }
7533
- const queryParameters = {};
7534
- if (requestParameters["cursor"] != null) {
7535
- queryParameters["cursor"] = requestParameters["cursor"];
7536
- }
7537
- if (requestParameters["limit"] != null) {
7538
- queryParameters["limit"] = requestParameters["limit"];
7539
- }
7540
- if (requestParameters["direction"] != null) {
7541
- queryParameters["direction"] = requestParameters["direction"];
7542
- }
7543
- if (requestParameters["tokenAddress"] != null) {
7544
- queryParameters["tokenAddress"] = requestParameters["tokenAddress"];
7545
- }
7546
- if (requestParameters["timeFrame"] != null) {
7547
- queryParameters["timeFrame"] = requestParameters["timeFrame"];
7548
- }
7549
- if (requestParameters["sortType"] != null) {
7550
- queryParameters["sortType"] = requestParameters["sortType"];
7551
- }
7552
- if (requestParameters["sortBy"] != null) {
7553
- queryParameters["sortBy"] = requestParameters["sortBy"];
7554
- }
7555
- const headerParameters = {};
7556
- if (this.configuration && this.configuration.accessToken) {
7557
- const token = this.configuration.accessToken;
7558
- const tokenString = await token("bearer", []);
7559
- if (tokenString) {
7560
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
7561
- }
7562
- }
7563
- let urlPath = `/v1/trade/{chain}/top-traders`;
7564
- urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
7565
- const response = await this.request({
7566
- path: urlPath,
7567
- method: "GET",
7568
- headers: headerParameters,
7569
- query: queryParameters
7570
- }, initOverrides);
7571
- return new JSONApiResponse(response, (jsonValue) => TopTradersPageFromJSON(jsonValue));
7572
- }
7573
- /**
7574
- * CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
7575
- * CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
7576
- */
7577
- async getTopTraders(requestParameters, initOverrides) {
7578
- const response = await this.getTopTradersRaw(requestParameters, initOverrides);
7579
- return await response.value();
7580
- }
7581
7384
  /**
7582
7385
  * CONTROLLER.TRADE.GET.TOKEN.DESCRIPTION
7583
7386
  * CONTROLLER.TRADE.GET.TOKEN.SUMMARY
@@ -8037,7 +7840,7 @@ var WatchlistApi = class extends BaseAPI {
8037
7840
 
8038
7841
  // src/index.ts
8039
7842
  var import_event_source_polyfill = require("event-source-polyfill");
8040
- var LIB_VERSION = "0.1.24";
7843
+ var LIB_VERSION = "0.1.25";
8041
7844
  var UserAgentMiddleware = class {
8042
7845
  async pre(context) {
8043
7846
  if (!context.init.headers) {