@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.
Files changed (87) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/openapi/apis/DefiSolanaMoonshotApi.d.ts +8 -8
  4. package/dist/openapi/apis/DefiSolanaMoonshotApi.js +16 -16
  5. package/dist/openapi/apis/DefiSolanaMoonshotApi.js.map +1 -1
  6. package/dist/openapi/apis/DefiSolanaPumpfunApi.d.ts +4 -4
  7. package/dist/openapi/apis/DefiSolanaPumpfunApi.js +8 -8
  8. package/dist/openapi/apis/DefiSolanaPumpfunApi.js.map +1 -1
  9. package/dist/openapi/apis/DexApi.d.ts +4 -4
  10. package/dist/openapi/apis/DexApi.js +37 -37
  11. package/dist/openapi/apis/DexApi.js.map +1 -1
  12. package/dist/openapi/apis/RankingApi.d.ts +11 -11
  13. package/dist/openapi/apis/RankingApi.js +155 -35
  14. package/dist/openapi/apis/RankingApi.js.map +1 -1
  15. package/dist/openapi/apis/TokenApi.d.ts +1 -1
  16. package/dist/openapi/apis/TokenApi.js +1 -1
  17. package/dist/openapi/apis/TokenApi.js.map +1 -1
  18. package/dist/openapi/index.d.ts +1 -1
  19. package/dist/openapi/index.js.map +1 -1
  20. package/dist/openapi/models/CreateTokenReply.d.ts +21 -0
  21. package/dist/openapi/models/CreateTokenReply.js +28 -0
  22. package/dist/openapi/models/CreateTokenReply.js.map +1 -0
  23. package/dist/openapi/models/DexCreateTokenInput.d.ts +34 -0
  24. package/dist/openapi/models/DexCreateTokenInput.js +72 -0
  25. package/dist/openapi/models/DexCreateTokenInput.js.map +1 -0
  26. package/dist/openapi/models/FilterCondition.d.ts +19 -1
  27. package/dist/openapi/models/FilterCondition.js +18 -0
  28. package/dist/openapi/models/FilterCondition.js.map +1 -1
  29. package/dist/openapi/models/MoonshotCreateTokenInput.d.ts +39 -0
  30. package/dist/openapi/models/MoonshotCreateTokenInput.js +92 -0
  31. package/dist/openapi/models/MoonshotCreateTokenInput.js.map +1 -0
  32. package/dist/openapi/models/MoonshotCreateTokenReply.d.ts +21 -0
  33. package/dist/openapi/models/MoonshotCreateTokenReply.js +28 -0
  34. package/dist/openapi/models/MoonshotCreateTokenReply.js.map +1 -0
  35. package/dist/openapi/models/MoonshotSubmitCreateToken200Response.d.ts +21 -0
  36. package/dist/openapi/models/MoonshotSubmitCreateToken200Response.js +28 -0
  37. package/dist/openapi/models/MoonshotSubmitCreateToken200Response.js.map +1 -0
  38. package/dist/openapi/models/MoonshotSubmitCreateTokenInput.d.ts +21 -0
  39. package/dist/openapi/models/MoonshotSubmitCreateTokenInput.js +28 -0
  40. package/dist/openapi/models/MoonshotSubmitCreateTokenInput.js.map +1 -0
  41. package/dist/openapi/models/ObjectSerializer.d.ts +8 -11
  42. package/dist/openapi/models/ObjectSerializer.js +29 -38
  43. package/dist/openapi/models/ObjectSerializer.js.map +1 -1
  44. package/dist/openapi/models/PumpCreateTokenInput.d.ts +38 -0
  45. package/dist/openapi/models/PumpCreateTokenInput.js +97 -0
  46. package/dist/openapi/models/PumpCreateTokenInput.js.map +1 -0
  47. package/dist/openapi/models/PumpCreateTokenReply.d.ts +21 -0
  48. package/dist/openapi/models/PumpCreateTokenReply.js +28 -0
  49. package/dist/openapi/models/PumpCreateTokenReply.js.map +1 -0
  50. package/dist/openapi/models/all.d.ts +8 -11
  51. package/dist/openapi/models/all.js +8 -11
  52. package/dist/openapi/models/all.js.map +1 -1
  53. package/dist/openapi/types/ObjectParamAPI.d.ts +67 -48
  54. package/dist/openapi/types/ObjectParamAPI.js +28 -28
  55. package/dist/openapi/types/ObjectParamAPI.js.map +1 -1
  56. package/dist/openapi/types/ObservableAPI.d.ts +28 -29
  57. package/dist/openapi/types/ObservableAPI.js +45 -45
  58. package/dist/openapi/types/ObservableAPI.js.map +1 -1
  59. package/dist/openapi/types/PromiseAPI.d.ts +28 -29
  60. package/dist/openapi/types/PromiseAPI.js +40 -40
  61. package/dist/openapi/types/PromiseAPI.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/index.ts +1 -1
  64. package/src/openapi/.openapi-generator/FILES +8 -11
  65. package/src/openapi/apis/DefiSolanaMoonshotApi.ts +38 -38
  66. package/src/openapi/apis/DefiSolanaPumpfunApi.ts +19 -19
  67. package/src/openapi/apis/DexApi.ts +70 -70
  68. package/src/openapi/apis/RankingApi.ts +266 -66
  69. package/src/openapi/apis/TokenApi.ts +2 -2
  70. package/src/openapi/index.ts +1 -1
  71. package/src/openapi/models/{MintReply.ts → CreateTokenReply.ts} +4 -4
  72. package/src/openapi/models/{DexMintInput.ts → DexCreateTokenInput.ts} +5 -5
  73. package/src/openapi/models/FilterCondition.ts +19 -1
  74. package/src/openapi/models/{MintInput.ts → MoonshotCreateTokenInput.ts} +8 -8
  75. package/src/openapi/models/{MoonshotMintReply.ts → MoonshotCreateTokenReply.ts} +4 -4
  76. package/src/openapi/models/{MoonshotSubmitMint200Response.ts → MoonshotSubmitCreateToken200Response.ts} +2 -2
  77. package/src/openapi/models/{SubmitInput.ts → MoonshotSubmitCreateTokenInput.ts} +4 -4
  78. package/src/openapi/models/ObjectSerializer.ts +29 -38
  79. package/src/openapi/models/{PumpMintInput.ts → PumpCreateTokenInput.ts} +8 -8
  80. package/src/openapi/models/{PumpMintReply.ts → PumpCreateTokenReply.ts} +2 -2
  81. package/src/openapi/models/all.ts +8 -11
  82. package/src/openapi/types/ObjectParamAPI.ts +253 -116
  83. package/src/openapi/types/ObservableAPI.ts +140 -103
  84. package/src/openapi/types/PromiseAPI.ts +132 -95
  85. package/src/openapi/models/RankingToken.ts +0 -132
  86. package/src/openapi/models/RankingTokenMarketData.ts +0 -109
  87. 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 { DexMintInput } from '../models/DexMintInput';
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.LIST.DESCRIPTION
26
- * CONTROLLER.DEX.LIST.SUMMARY
27
- * @param chains
28
- * @param limit DTO.DEX.QUERY.LIMIT
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 list(chains?: Array<string>, limit?: number, dexProgram?: string, _options?: Configuration): Promise<RequestContext> {
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.GET);
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.MINT.DESCRIPTION
83
- * CONTROLLER.DEX.MINT.SUMMARY
84
- * @param chain GLOBAL.CHAIN.DESCRIPTION
85
- * @param dexMintInput Token creation parameters
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 mint(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', dexMintInput: DexMintInput, _options?: Configuration): Promise<RequestContext> {
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/{chain}/mint'
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.POST);
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 list
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 listWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DexPage >> {
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: DexPage = ObjectSerializer.deserialize(
272
+ const body: CreateTokenReply = ObjectSerializer.deserialize(
273
273
  ObjectSerializer.parse(await response.body.text(), contentType),
274
- "DexPage", ""
275
- ) as DexPage;
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: DexPage = ObjectSerializer.deserialize(
281
+ const body: CreateTokenReply = ObjectSerializer.deserialize(
282
282
  ObjectSerializer.parse(await response.body.text(), contentType),
283
- "DexPage", ""
284
- ) as DexPage;
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 mint
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 mintWithHttpInfo(response: ResponseContext): Promise<HttpInfo<MintReply >> {
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: MintReply = ObjectSerializer.deserialize(
300
+ const body: DexPage = ObjectSerializer.deserialize(
301
301
  ObjectSerializer.parse(await response.body.text(), contentType),
302
- "MintReply", ""
303
- ) as MintReply;
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: MintReply = ObjectSerializer.deserialize(
309
+ const body: DexPage = ObjectSerializer.deserialize(
310
310
  ObjectSerializer.parse(await response.body.text(), contentType),
311
- "MintReply", ""
312
- ) as MintReply;
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);