@chainstream-io/sdk 0.0.5 → 0.0.7
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi/apis/DefiSolanaMoonshotApi.d.ts +8 -8
- package/dist/openapi/apis/DefiSolanaMoonshotApi.js +16 -16
- package/dist/openapi/apis/DefiSolanaMoonshotApi.js.map +1 -1
- package/dist/openapi/apis/DefiSolanaPumpfunApi.d.ts +4 -4
- package/dist/openapi/apis/DefiSolanaPumpfunApi.js +8 -8
- package/dist/openapi/apis/DefiSolanaPumpfunApi.js.map +1 -1
- package/dist/openapi/apis/DexApi.d.ts +4 -4
- package/dist/openapi/apis/DexApi.js +37 -37
- package/dist/openapi/apis/DexApi.js.map +1 -1
- package/dist/openapi/apis/RankingApi.d.ts +11 -11
- package/dist/openapi/apis/RankingApi.js +155 -35
- package/dist/openapi/apis/RankingApi.js.map +1 -1
- package/dist/openapi/apis/TokenApi.d.ts +1 -1
- package/dist/openapi/apis/TokenApi.js +1 -1
- package/dist/openapi/apis/TokenApi.js.map +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js.map +1 -1
- package/dist/openapi/models/CreateTokenReply.d.ts +21 -0
- package/dist/openapi/models/CreateTokenReply.js +28 -0
- package/dist/openapi/models/CreateTokenReply.js.map +1 -0
- package/dist/openapi/models/DexCreateTokenInput.d.ts +34 -0
- package/dist/openapi/models/DexCreateTokenInput.js +72 -0
- package/dist/openapi/models/DexCreateTokenInput.js.map +1 -0
- package/dist/openapi/models/FilterCondition.d.ts +19 -1
- package/dist/openapi/models/FilterCondition.js +18 -0
- package/dist/openapi/models/FilterCondition.js.map +1 -1
- package/dist/openapi/models/MoonshotCreateTokenInput.d.ts +39 -0
- package/dist/openapi/models/MoonshotCreateTokenInput.js +92 -0
- package/dist/openapi/models/MoonshotCreateTokenInput.js.map +1 -0
- package/dist/openapi/models/MoonshotCreateTokenReply.d.ts +21 -0
- package/dist/openapi/models/MoonshotCreateTokenReply.js +28 -0
- package/dist/openapi/models/MoonshotCreateTokenReply.js.map +1 -0
- package/dist/openapi/models/MoonshotSubmitCreateToken200Response.d.ts +21 -0
- package/dist/openapi/models/MoonshotSubmitCreateToken200Response.js +28 -0
- package/dist/openapi/models/MoonshotSubmitCreateToken200Response.js.map +1 -0
- package/dist/openapi/models/MoonshotSubmitCreateTokenInput.d.ts +21 -0
- package/dist/openapi/models/MoonshotSubmitCreateTokenInput.js +28 -0
- package/dist/openapi/models/MoonshotSubmitCreateTokenInput.js.map +1 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +8 -11
- package/dist/openapi/models/ObjectSerializer.js +29 -38
- package/dist/openapi/models/ObjectSerializer.js.map +1 -1
- package/dist/openapi/models/PumpCreateTokenInput.d.ts +38 -0
- package/dist/openapi/models/PumpCreateTokenInput.js +97 -0
- package/dist/openapi/models/PumpCreateTokenInput.js.map +1 -0
- package/dist/openapi/models/PumpCreateTokenReply.d.ts +21 -0
- package/dist/openapi/models/PumpCreateTokenReply.js +28 -0
- package/dist/openapi/models/PumpCreateTokenReply.js.map +1 -0
- package/dist/openapi/models/all.d.ts +8 -11
- package/dist/openapi/models/all.js +8 -11
- package/dist/openapi/models/all.js.map +1 -1
- package/dist/openapi/types/ObjectParamAPI.d.ts +67 -48
- package/dist/openapi/types/ObjectParamAPI.js +28 -28
- package/dist/openapi/types/ObjectParamAPI.js.map +1 -1
- package/dist/openapi/types/ObservableAPI.d.ts +28 -29
- package/dist/openapi/types/ObservableAPI.js +45 -45
- package/dist/openapi/types/ObservableAPI.js.map +1 -1
- package/dist/openapi/types/PromiseAPI.d.ts +28 -29
- package/dist/openapi/types/PromiseAPI.js +40 -40
- package/dist/openapi/types/PromiseAPI.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/openapi/.openapi-generator/FILES +8 -11
- package/src/openapi/apis/DefiSolanaMoonshotApi.ts +38 -38
- package/src/openapi/apis/DefiSolanaPumpfunApi.ts +19 -19
- package/src/openapi/apis/DexApi.ts +70 -70
- package/src/openapi/apis/RankingApi.ts +266 -66
- package/src/openapi/apis/TokenApi.ts +2 -2
- package/src/openapi/index.ts +1 -1
- package/src/openapi/models/{MintReply.ts → CreateTokenReply.ts} +4 -4
- package/src/openapi/models/{DexMintInput.ts → DexCreateTokenInput.ts} +5 -5
- package/src/openapi/models/FilterCondition.ts +19 -1
- package/src/openapi/models/{MintInput.ts → MoonshotCreateTokenInput.ts} +8 -8
- package/src/openapi/models/{MoonshotMintReply.ts → MoonshotCreateTokenReply.ts} +4 -4
- package/src/openapi/models/{MoonshotSubmitMint200Response.ts → MoonshotSubmitCreateToken200Response.ts} +2 -2
- package/src/openapi/models/{SubmitInput.ts → MoonshotSubmitCreateTokenInput.ts} +4 -4
- package/src/openapi/models/ObjectSerializer.ts +29 -38
- package/src/openapi/models/{PumpMintInput.ts → PumpCreateTokenInput.ts} +8 -8
- package/src/openapi/models/{PumpMintReply.ts → PumpCreateTokenReply.ts} +2 -2
- package/src/openapi/models/all.ts +8 -11
- package/src/openapi/types/ObjectParamAPI.ts +253 -116
- package/src/openapi/types/ObservableAPI.ts +140 -103
- package/src/openapi/types/PromiseAPI.ts +132 -95
- package/src/openapi/models/RankingToken.ts +0 -132
- package/src/openapi/models/RankingTokenMarketData.ts +0 -109
- package/src/openapi/models/RankingTokenStat.ts +0 -329
|
@@ -8,9 +8,9 @@ import {canConsumeForm, isCodeInRange} from '../util';
|
|
|
8
8
|
import {SecurityAuthentication} from '../auth/auth';
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { CreateTokenReply } from '../models/CreateTokenReply';
|
|
12
|
+
import { DexCreateTokenInput } from '../models/DexCreateTokenInput';
|
|
12
13
|
import { DexPage } from '../models/DexPage';
|
|
13
|
-
import { MintReply } from '../models/MintReply';
|
|
14
14
|
import { SwapInput } from '../models/SwapInput';
|
|
15
15
|
import { SwapReply } from '../models/SwapReply';
|
|
16
16
|
import { SwapRouteInput } from '../models/SwapRouteInput';
|
|
@@ -22,46 +22,48 @@ import { SwapRouteResponse } from '../models/SwapRouteResponse';
|
|
|
22
22
|
export class DexApiRequestFactory extends BaseAPIRequestFactory {
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* CONTROLLER.DEX.
|
|
26
|
-
* CONTROLLER.DEX.
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @param dexProgram DTO.DEX.QUERY.DEX_PROGRAM
|
|
25
|
+
* CONTROLLER.DEX.CREATE.DESCRIPTION
|
|
26
|
+
* CONTROLLER.DEX.CREATE.SUMMARY
|
|
27
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
28
|
+
* @param dexCreateTokenInput Token creation parameters
|
|
30
29
|
*/
|
|
31
|
-
public async
|
|
30
|
+
public async createToken(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', dexCreateTokenInput: DexCreateTokenInput, _options?: Configuration): Promise<RequestContext> {
|
|
32
31
|
let _config = _options || this.configuration;
|
|
33
32
|
|
|
33
|
+
// verify required parameter 'chain' is not null or undefined
|
|
34
|
+
if (chain === null || chain === undefined) {
|
|
35
|
+
throw new RequiredError("DexApi", "createToken", "chain");
|
|
36
|
+
}
|
|
34
37
|
|
|
35
38
|
|
|
39
|
+
// verify required parameter 'dexCreateTokenInput' is not null or undefined
|
|
40
|
+
if (dexCreateTokenInput === null || dexCreateTokenInput === undefined) {
|
|
41
|
+
throw new RequiredError("DexApi", "createToken", "dexCreateTokenInput");
|
|
42
|
+
}
|
|
43
|
+
|
|
36
44
|
|
|
37
45
|
// Path Params
|
|
38
|
-
const localVarPath = '/v1/dex'
|
|
46
|
+
const localVarPath = '/v1/dex/{chain}/create'
|
|
47
|
+
.replace('{' + 'chain' + '}', encodeURIComponent(String(chain)));
|
|
39
48
|
|
|
40
49
|
// Make Request Context
|
|
41
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.
|
|
50
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
42
51
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
43
52
|
const randomId = Math.floor(Math.random() * Math.pow(2, 32))
|
|
44
53
|
requestContext.setHeaderParam("x-req-id", randomId.toString())
|
|
45
54
|
|
|
46
55
|
|
|
47
|
-
// Query Params
|
|
48
|
-
if (chains !== undefined) {
|
|
49
|
-
const serializedParams = ObjectSerializer.serialize(chains, "Array<string>", "");
|
|
50
|
-
for (const serializedParam of serializedParams) {
|
|
51
|
-
requestContext.appendQueryParam("chains", serializedParam);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Query Params
|
|
56
|
-
if (limit !== undefined) {
|
|
57
|
-
requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Query Params
|
|
61
|
-
if (dexProgram !== undefined) {
|
|
62
|
-
requestContext.setQueryParam("dexProgram", ObjectSerializer.serialize(dexProgram, "string", ""));
|
|
63
|
-
}
|
|
64
56
|
|
|
57
|
+
// Body Params
|
|
58
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
59
|
+
"application/json"
|
|
60
|
+
]);
|
|
61
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
62
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
63
|
+
ObjectSerializer.serialize(dexCreateTokenInput, "DexCreateTokenInput", ""),
|
|
64
|
+
contentType
|
|
65
|
+
);
|
|
66
|
+
requestContext.setBody(serializedBody);
|
|
65
67
|
|
|
66
68
|
let authMethod: SecurityAuthentication | undefined;
|
|
67
69
|
// Apply auth methods
|
|
@@ -79,48 +81,46 @@ export class DexApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
/**
|
|
82
|
-
* CONTROLLER.DEX.
|
|
83
|
-
* CONTROLLER.DEX.
|
|
84
|
-
* @param
|
|
85
|
-
* @param
|
|
84
|
+
* CONTROLLER.DEX.LIST.DESCRIPTION
|
|
85
|
+
* CONTROLLER.DEX.LIST.SUMMARY
|
|
86
|
+
* @param chains
|
|
87
|
+
* @param limit DTO.DEX.QUERY.LIMIT
|
|
88
|
+
* @param dexProgram DTO.DEX.QUERY.DEX_PROGRAM
|
|
86
89
|
*/
|
|
87
|
-
public async
|
|
90
|
+
public async list(chains?: Array<string>, limit?: number, dexProgram?: string, _options?: Configuration): Promise<RequestContext> {
|
|
88
91
|
let _config = _options || this.configuration;
|
|
89
92
|
|
|
90
|
-
// verify required parameter 'chain' is not null or undefined
|
|
91
|
-
if (chain === null || chain === undefined) {
|
|
92
|
-
throw new RequiredError("DexApi", "mint", "chain");
|
|
93
|
-
}
|
|
94
|
-
|
|
95
93
|
|
|
96
|
-
// verify required parameter 'dexMintInput' is not null or undefined
|
|
97
|
-
if (dexMintInput === null || dexMintInput === undefined) {
|
|
98
|
-
throw new RequiredError("DexApi", "mint", "dexMintInput");
|
|
99
|
-
}
|
|
100
94
|
|
|
101
95
|
|
|
102
96
|
// Path Params
|
|
103
|
-
const localVarPath = '/v1/dex
|
|
104
|
-
.replace('{' + 'chain' + '}', encodeURIComponent(String(chain)));
|
|
97
|
+
const localVarPath = '/v1/dex';
|
|
105
98
|
|
|
106
99
|
// Make Request Context
|
|
107
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.
|
|
100
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
108
101
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
109
102
|
const randomId = Math.floor(Math.random() * Math.pow(2, 32))
|
|
110
103
|
requestContext.setHeaderParam("x-req-id", randomId.toString())
|
|
111
104
|
|
|
112
105
|
|
|
106
|
+
// Query Params
|
|
107
|
+
if (chains !== undefined) {
|
|
108
|
+
const serializedParams = ObjectSerializer.serialize(chains, "Array<string>", "");
|
|
109
|
+
for (const serializedParam of serializedParams) {
|
|
110
|
+
requestContext.appendQueryParam("chains", serializedParam);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Query Params
|
|
115
|
+
if (limit !== undefined) {
|
|
116
|
+
requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Query Params
|
|
120
|
+
if (dexProgram !== undefined) {
|
|
121
|
+
requestContext.setQueryParam("dexProgram", ObjectSerializer.serialize(dexProgram, "string", ""));
|
|
122
|
+
}
|
|
113
123
|
|
|
114
|
-
// Body Params
|
|
115
|
-
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
116
|
-
"application/json"
|
|
117
|
-
]);
|
|
118
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
119
|
-
const serializedBody = ObjectSerializer.stringify(
|
|
120
|
-
ObjectSerializer.serialize(dexMintInput, "DexMintInput", ""),
|
|
121
|
-
contentType
|
|
122
|
-
);
|
|
123
|
-
requestContext.setBody(serializedBody);
|
|
124
124
|
|
|
125
125
|
let authMethod: SecurityAuthentication | undefined;
|
|
126
126
|
// Apply auth methods
|
|
@@ -263,25 +263,25 @@ export class DexApiResponseProcessor {
|
|
|
263
263
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
264
264
|
* to the expected objects
|
|
265
265
|
*
|
|
266
|
-
* @params response Response returned by the server for a request to
|
|
266
|
+
* @params response Response returned by the server for a request to createToken
|
|
267
267
|
* @throws ApiException if the response code was not in [200, 299]
|
|
268
268
|
*/
|
|
269
|
-
public async
|
|
269
|
+
public async createTokenWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateTokenReply >> {
|
|
270
270
|
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
271
271
|
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
272
|
-
const body:
|
|
272
|
+
const body: CreateTokenReply = ObjectSerializer.deserialize(
|
|
273
273
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
274
|
-
"
|
|
275
|
-
) as
|
|
274
|
+
"CreateTokenReply", ""
|
|
275
|
+
) as CreateTokenReply;
|
|
276
276
|
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
280
280
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
281
|
-
const body:
|
|
281
|
+
const body: CreateTokenReply = ObjectSerializer.deserialize(
|
|
282
282
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
283
|
-
"
|
|
284
|
-
) as
|
|
283
|
+
"CreateTokenReply", ""
|
|
284
|
+
) as CreateTokenReply;
|
|
285
285
|
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
286
286
|
}
|
|
287
287
|
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
@@ -291,25 +291,25 @@ export class DexApiResponseProcessor {
|
|
|
291
291
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
292
292
|
* to the expected objects
|
|
293
293
|
*
|
|
294
|
-
* @params response Response returned by the server for a request to
|
|
294
|
+
* @params response Response returned by the server for a request to list
|
|
295
295
|
* @throws ApiException if the response code was not in [200, 299]
|
|
296
296
|
*/
|
|
297
|
-
public async
|
|
297
|
+
public async listWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DexPage >> {
|
|
298
298
|
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
299
299
|
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
300
|
-
const body:
|
|
300
|
+
const body: DexPage = ObjectSerializer.deserialize(
|
|
301
301
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
302
|
-
"
|
|
303
|
-
) as
|
|
302
|
+
"DexPage", ""
|
|
303
|
+
) as DexPage;
|
|
304
304
|
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
308
308
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
309
|
-
const body:
|
|
309
|
+
const body: DexPage = ObjectSerializer.deserialize(
|
|
310
310
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
311
|
-
"
|
|
312
|
-
) as
|
|
311
|
+
"DexPage", ""
|
|
312
|
+
) as DexPage;
|
|
313
313
|
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
314
314
|
}
|
|
315
315
|
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|