@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.
- package/README.md +2 -2
- package/dist/{WatchlistApi-DtNbXNQ2.d.cts → WatchlistApi-BG3KoB75.d.cts} +161 -548
- package/dist/{WatchlistApi-DtNbXNQ2.d.ts → WatchlistApi-BG3KoB75.d.ts} +161 -548
- package/dist/{index-Dv24PgY3.d.ts → index-C0qP5IcI.d.ts} +2 -2
- package/dist/{index-BRgfeoOg.d.cts → index-DLgQWpoA.d.cts} +2 -2
- package/dist/index.cjs +1 -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 +1 -198
- package/dist/index.mjs.map +1 -1
- package/dist/openapi/index.cjs +0 -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 +0 -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
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-
|
|
2
|
-
import './WatchlistApi-
|
|
1
|
+
export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-DLgQWpoA.cjs';
|
|
2
|
+
import './WatchlistApi-BG3KoB75.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-
|
|
2
|
-
import './WatchlistApi-
|
|
1
|
+
export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-C0qP5IcI.js';
|
|
2
|
+
import './WatchlistApi-BG3KoB75.js';
|
package/dist/index.mjs
CHANGED
|
@@ -2664,40 +2664,6 @@ function EstimateGasLimitResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2664
2664
|
};
|
|
2665
2665
|
}
|
|
2666
2666
|
|
|
2667
|
-
// src/openapi/models/GainersAndLosersDTO.ts
|
|
2668
|
-
function GainersAndLosersDTOFromJSON(json) {
|
|
2669
|
-
return GainersAndLosersDTOFromJSONTyped(json, false);
|
|
2670
|
-
}
|
|
2671
|
-
function GainersAndLosersDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
2672
|
-
if (json == null) {
|
|
2673
|
-
return json;
|
|
2674
|
-
}
|
|
2675
|
-
return {
|
|
2676
|
-
"address": json["address"],
|
|
2677
|
-
"pnl": json["pnl"],
|
|
2678
|
-
"tradeCount": json["tradeCount"],
|
|
2679
|
-
"volume": json["volume"]
|
|
2680
|
-
};
|
|
2681
|
-
}
|
|
2682
|
-
|
|
2683
|
-
// src/openapi/models/GainersAndLosersPage.ts
|
|
2684
|
-
function GainersAndLosersPageFromJSON(json) {
|
|
2685
|
-
return GainersAndLosersPageFromJSONTyped(json, false);
|
|
2686
|
-
}
|
|
2687
|
-
function GainersAndLosersPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
2688
|
-
if (json == null) {
|
|
2689
|
-
return json;
|
|
2690
|
-
}
|
|
2691
|
-
return {
|
|
2692
|
-
"hasNext": json["hasNext"] == null ? void 0 : json["hasNext"],
|
|
2693
|
-
"hasPrev": json["hasPrev"] == null ? void 0 : json["hasPrev"],
|
|
2694
|
-
"startCursor": json["startCursor"] == null ? void 0 : json["startCursor"],
|
|
2695
|
-
"endCursor": json["endCursor"] == null ? void 0 : json["endCursor"],
|
|
2696
|
-
"total": json["total"] == null ? void 0 : json["total"],
|
|
2697
|
-
"data": json["data"].map(GainersAndLosersDTOFromJSON)
|
|
2698
|
-
};
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
2667
|
// src/openapi/models/GasPriceResponse.ts
|
|
2702
2668
|
function GasPriceResponseFromJSON(json) {
|
|
2703
2669
|
return GasPriceResponseFromJSONTyped(json, false);
|
|
@@ -3401,48 +3367,6 @@ function TokenTraderFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
3401
3367
|
};
|
|
3402
3368
|
}
|
|
3403
3369
|
|
|
3404
|
-
// src/openapi/models/TopTradersDTO.ts
|
|
3405
|
-
function TopTradersDTOFromJSON(json) {
|
|
3406
|
-
return TopTradersDTOFromJSONTyped(json, false);
|
|
3407
|
-
}
|
|
3408
|
-
function TopTradersDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
3409
|
-
if (json == null) {
|
|
3410
|
-
return json;
|
|
3411
|
-
}
|
|
3412
|
-
return {
|
|
3413
|
-
"tokenAddress": json["tokenAddress"],
|
|
3414
|
-
"owner": json["owner"],
|
|
3415
|
-
"tags": json["tags"],
|
|
3416
|
-
"type": json["type"],
|
|
3417
|
-
"volume": json["volume"],
|
|
3418
|
-
"trade": json["trade"],
|
|
3419
|
-
"tradeBuy": json["tradeBuy"],
|
|
3420
|
-
"tradeSell": json["tradeSell"],
|
|
3421
|
-
"volumeBuy": json["volumeBuy"],
|
|
3422
|
-
"volumeSell": json["volumeSell"],
|
|
3423
|
-
"isScaledUiToken": json["isScaledUiToken"],
|
|
3424
|
-
"multiplier": json["multiplier"] == null ? void 0 : json["multiplier"]
|
|
3425
|
-
};
|
|
3426
|
-
}
|
|
3427
|
-
|
|
3428
|
-
// src/openapi/models/TopTradersPage.ts
|
|
3429
|
-
function TopTradersPageFromJSON(json) {
|
|
3430
|
-
return TopTradersPageFromJSONTyped(json, false);
|
|
3431
|
-
}
|
|
3432
|
-
function TopTradersPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
3433
|
-
if (json == null) {
|
|
3434
|
-
return json;
|
|
3435
|
-
}
|
|
3436
|
-
return {
|
|
3437
|
-
"hasNext": json["hasNext"] == null ? void 0 : json["hasNext"],
|
|
3438
|
-
"hasPrev": json["hasPrev"] == null ? void 0 : json["hasPrev"],
|
|
3439
|
-
"startCursor": json["startCursor"] == null ? void 0 : json["startCursor"],
|
|
3440
|
-
"endCursor": json["endCursor"] == null ? void 0 : json["endCursor"],
|
|
3441
|
-
"total": json["total"] == null ? void 0 : json["total"],
|
|
3442
|
-
"data": json["data"].map(TopTradersDTOFromJSON)
|
|
3443
|
-
};
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
3370
|
// src/openapi/models/TradeDetailDTO.ts
|
|
3447
3371
|
function TradeDetailDTOFromJSON(json) {
|
|
3448
3372
|
return TradeDetailDTOFromJSONTyped(json, false);
|
|
@@ -7432,127 +7356,6 @@ var TradeApi = class extends BaseAPI {
|
|
|
7432
7356
|
const response = await this.getActivitiesRaw(requestParameters, initOverrides);
|
|
7433
7357
|
return await response.value();
|
|
7434
7358
|
}
|
|
7435
|
-
/**
|
|
7436
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
7437
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
7438
|
-
*/
|
|
7439
|
-
async getGainersLosersRaw(requestParameters, initOverrides) {
|
|
7440
|
-
if (requestParameters["chain"] == null) {
|
|
7441
|
-
throw new RequiredError(
|
|
7442
|
-
"chain",
|
|
7443
|
-
'Required parameter "chain" was null or undefined when calling getGainersLosers().'
|
|
7444
|
-
);
|
|
7445
|
-
}
|
|
7446
|
-
const queryParameters = {};
|
|
7447
|
-
if (requestParameters["cursor"] != null) {
|
|
7448
|
-
queryParameters["cursor"] = requestParameters["cursor"];
|
|
7449
|
-
}
|
|
7450
|
-
if (requestParameters["limit"] != null) {
|
|
7451
|
-
queryParameters["limit"] = requestParameters["limit"];
|
|
7452
|
-
}
|
|
7453
|
-
if (requestParameters["direction"] != null) {
|
|
7454
|
-
queryParameters["direction"] = requestParameters["direction"];
|
|
7455
|
-
}
|
|
7456
|
-
if (requestParameters["type"] != null) {
|
|
7457
|
-
queryParameters["type"] = requestParameters["type"];
|
|
7458
|
-
}
|
|
7459
|
-
if (requestParameters["sortBy"] != null) {
|
|
7460
|
-
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
7461
|
-
}
|
|
7462
|
-
if (requestParameters["sortType"] != null) {
|
|
7463
|
-
queryParameters["sortType"] = requestParameters["sortType"];
|
|
7464
|
-
}
|
|
7465
|
-
const headerParameters = {};
|
|
7466
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
7467
|
-
const token = this.configuration.accessToken;
|
|
7468
|
-
const tokenString = await token("bearer", []);
|
|
7469
|
-
if (tokenString) {
|
|
7470
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7471
|
-
}
|
|
7472
|
-
}
|
|
7473
|
-
let urlPath = `/v1/trade/{chain}/gainers-losers`;
|
|
7474
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
|
|
7475
|
-
const response = await this.request({
|
|
7476
|
-
path: urlPath,
|
|
7477
|
-
method: "GET",
|
|
7478
|
-
headers: headerParameters,
|
|
7479
|
-
query: queryParameters
|
|
7480
|
-
}, initOverrides);
|
|
7481
|
-
return new JSONApiResponse(response, (jsonValue) => GainersAndLosersPageFromJSON(jsonValue));
|
|
7482
|
-
}
|
|
7483
|
-
/**
|
|
7484
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
7485
|
-
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
7486
|
-
*/
|
|
7487
|
-
async getGainersLosers(requestParameters, initOverrides) {
|
|
7488
|
-
const response = await this.getGainersLosersRaw(requestParameters, initOverrides);
|
|
7489
|
-
return await response.value();
|
|
7490
|
-
}
|
|
7491
|
-
/**
|
|
7492
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
|
|
7493
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
|
|
7494
|
-
*/
|
|
7495
|
-
async getTopTradersRaw(requestParameters, initOverrides) {
|
|
7496
|
-
if (requestParameters["chain"] == null) {
|
|
7497
|
-
throw new RequiredError(
|
|
7498
|
-
"chain",
|
|
7499
|
-
'Required parameter "chain" was null or undefined when calling getTopTraders().'
|
|
7500
|
-
);
|
|
7501
|
-
}
|
|
7502
|
-
if (requestParameters["tokenAddress"] == null) {
|
|
7503
|
-
throw new RequiredError(
|
|
7504
|
-
"tokenAddress",
|
|
7505
|
-
'Required parameter "tokenAddress" was null or undefined when calling getTopTraders().'
|
|
7506
|
-
);
|
|
7507
|
-
}
|
|
7508
|
-
const queryParameters = {};
|
|
7509
|
-
if (requestParameters["cursor"] != null) {
|
|
7510
|
-
queryParameters["cursor"] = requestParameters["cursor"];
|
|
7511
|
-
}
|
|
7512
|
-
if (requestParameters["limit"] != null) {
|
|
7513
|
-
queryParameters["limit"] = requestParameters["limit"];
|
|
7514
|
-
}
|
|
7515
|
-
if (requestParameters["direction"] != null) {
|
|
7516
|
-
queryParameters["direction"] = requestParameters["direction"];
|
|
7517
|
-
}
|
|
7518
|
-
if (requestParameters["tokenAddress"] != null) {
|
|
7519
|
-
queryParameters["tokenAddress"] = requestParameters["tokenAddress"];
|
|
7520
|
-
}
|
|
7521
|
-
if (requestParameters["timeFrame"] != null) {
|
|
7522
|
-
queryParameters["timeFrame"] = requestParameters["timeFrame"];
|
|
7523
|
-
}
|
|
7524
|
-
if (requestParameters["sortType"] != null) {
|
|
7525
|
-
queryParameters["sortType"] = requestParameters["sortType"];
|
|
7526
|
-
}
|
|
7527
|
-
if (requestParameters["sortBy"] != null) {
|
|
7528
|
-
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
7529
|
-
}
|
|
7530
|
-
const headerParameters = {};
|
|
7531
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
7532
|
-
const token = this.configuration.accessToken;
|
|
7533
|
-
const tokenString = await token("bearer", []);
|
|
7534
|
-
if (tokenString) {
|
|
7535
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7536
|
-
}
|
|
7537
|
-
}
|
|
7538
|
-
let urlPath = `/v1/trade/{chain}/top-traders`;
|
|
7539
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
|
|
7540
|
-
const response = await this.request({
|
|
7541
|
-
path: urlPath,
|
|
7542
|
-
method: "GET",
|
|
7543
|
-
headers: headerParameters,
|
|
7544
|
-
query: queryParameters
|
|
7545
|
-
}, initOverrides);
|
|
7546
|
-
return new JSONApiResponse(response, (jsonValue) => TopTradersPageFromJSON(jsonValue));
|
|
7547
|
-
}
|
|
7548
|
-
/**
|
|
7549
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
|
|
7550
|
-
* CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
|
|
7551
|
-
*/
|
|
7552
|
-
async getTopTraders(requestParameters, initOverrides) {
|
|
7553
|
-
const response = await this.getTopTradersRaw(requestParameters, initOverrides);
|
|
7554
|
-
return await response.value();
|
|
7555
|
-
}
|
|
7556
7359
|
/**
|
|
7557
7360
|
* CONTROLLER.TRADE.GET.TOKEN.DESCRIPTION
|
|
7558
7361
|
* CONTROLLER.TRADE.GET.TOKEN.SUMMARY
|
|
@@ -8012,7 +7815,7 @@ var WatchlistApi = class extends BaseAPI {
|
|
|
8012
7815
|
|
|
8013
7816
|
// src/index.ts
|
|
8014
7817
|
import { EventSourcePolyfill } from "event-source-polyfill";
|
|
8015
|
-
var LIB_VERSION = "0.1.
|
|
7818
|
+
var LIB_VERSION = "0.1.25";
|
|
8016
7819
|
var UserAgentMiddleware = class {
|
|
8017
7820
|
async pre(context) {
|
|
8018
7821
|
if (!context.init.headers) {
|