@chainstream-io/sdk 0.0.9 → 0.0.10
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/api/stream.js +24 -6
- package/dist/api/stream.js.map +1 -1
- package/dist/api/stream.model.d.ts +2 -0
- package/dist/api/stream.model.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/openapi/apis/DexApi.d.ts +5 -2
- package/dist/openapi/apis/DexApi.js +79 -4
- package/dist/openapi/apis/DexApi.js.map +1 -1
- package/dist/openapi/apis/TradeApi.d.ts +3 -1
- package/dist/openapi/apis/TradeApi.js +76 -1
- package/dist/openapi/apis/TradeApi.js.map +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js.map +1 -1
- package/dist/openapi/models/CreateTokenInput.d.ts +34 -0
- package/dist/openapi/models/CreateTokenInput.js +72 -0
- package/dist/openapi/models/CreateTokenInput.js.map +1 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +2 -1
- package/dist/openapi/models/ObjectSerializer.js +7 -4
- package/dist/openapi/models/ObjectSerializer.js.map +1 -1
- package/dist/openapi/models/QuoteResponse.d.ts +25 -0
- package/dist/openapi/models/QuoteResponse.js +52 -0
- package/dist/openapi/models/QuoteResponse.js.map +1 -0
- package/dist/openapi/models/TradeDetailDTO.d.ts +1 -1
- package/dist/openapi/models/TradeDetailDTO.js +2 -2
- package/dist/openapi/models/TradeDetailDTO.js.map +1 -1
- package/dist/openapi/models/all.d.ts +2 -1
- package/dist/openapi/models/all.js +2 -1
- package/dist/openapi/models/all.js.map +1 -1
- package/dist/openapi/types/ObjectParamAPI.d.ts +31 -2
- package/dist/openapi/types/ObjectParamAPI.js +16 -4
- package/dist/openapi/types/ObjectParamAPI.js.map +1 -1
- package/dist/openapi/types/ObservableAPI.d.ts +10 -5
- package/dist/openapi/types/ObservableAPI.js +44 -8
- package/dist/openapi/types/ObservableAPI.js.map +1 -1
- package/dist/openapi/types/PromiseAPI.d.ts +10 -5
- package/dist/openapi/types/PromiseAPI.js +24 -8
- package/dist/openapi/types/PromiseAPI.js.map +1 -1
- package/package.json +1 -1
- package/src/api/stream.model.ts +2 -0
- package/src/api/stream.ts +17 -3
- package/src/index.ts +1 -1
- package/src/openapi/.openapi-generator/FILES +2 -1
- package/src/openapi/apis/DexApi.ts +149 -7
- package/src/openapi/apis/TradeApi.ts +154 -1
- package/src/openapi/index.ts +1 -1
- package/src/openapi/models/{DexCreateTokenInput.ts → CreateTokenInput.ts} +5 -5
- package/src/openapi/models/ObjectSerializer.ts +7 -4
- package/src/openapi/models/QuoteResponse.ts +89 -0
- package/src/openapi/models/TradeDetailDTO.ts +4 -4
- package/src/openapi/models/all.ts +2 -1
- package/src/openapi/types/ObjectParamAPI.ts +192 -7
- package/src/openapi/types/ObservableAPI.ts +114 -11
- package/src/openapi/types/PromiseAPI.ts +88 -11
|
@@ -8,8 +8,8 @@ import { Candle } from '../models/Candle';
|
|
|
8
8
|
import { ClaimRedPacketInput } from '../models/ClaimRedPacketInput';
|
|
9
9
|
import { CreateRedPacketInput } from '../models/CreateRedPacketInput';
|
|
10
10
|
import { CreateRedPacketReply } from '../models/CreateRedPacketReply';
|
|
11
|
+
import { CreateTokenInput } from '../models/CreateTokenInput';
|
|
11
12
|
import { CreateTokenReply } from '../models/CreateTokenReply';
|
|
12
|
-
import { DexCreateTokenInput } from '../models/DexCreateTokenInput';
|
|
13
13
|
import { DexDTO } from '../models/DexDTO';
|
|
14
14
|
import { DexPage } from '../models/DexPage';
|
|
15
15
|
import { DexPoolDTO } from '../models/DexPoolDTO';
|
|
@@ -23,6 +23,7 @@ import { MoonshotSubmitCreateToken200Response } from '../models/MoonshotSubmitCr
|
|
|
23
23
|
import { MoonshotSubmitCreateTokenInput } from '../models/MoonshotSubmitCreateTokenInput';
|
|
24
24
|
import { PumpCreateTokenInput } from '../models/PumpCreateTokenInput';
|
|
25
25
|
import { PumpCreateTokenReply } from '../models/PumpCreateTokenReply';
|
|
26
|
+
import { QuoteResponse } from '../models/QuoteResponse';
|
|
26
27
|
import { RedPacketClaimDTO } from '../models/RedPacketClaimDTO';
|
|
27
28
|
import { RedPacketClaimsPage } from '../models/RedPacketClaimsPage';
|
|
28
29
|
import { RedPacketDTO } from '../models/RedPacketDTO';
|
|
@@ -299,10 +300,10 @@ export class ObservableDexApi {
|
|
|
299
300
|
* CONTROLLER.DEX.CREATE.DESCRIPTION
|
|
300
301
|
* CONTROLLER.DEX.CREATE.SUMMARY
|
|
301
302
|
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
302
|
-
* @param
|
|
303
|
+
* @param createTokenInput Token creation parameters
|
|
303
304
|
*/
|
|
304
|
-
public createTokenWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui',
|
|
305
|
-
const requestContextPromise = this.requestFactory.createToken(chain,
|
|
305
|
+
public createTokenWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', createTokenInput: CreateTokenInput, _options?: Configuration): Observable<HttpInfo<CreateTokenReply>> {
|
|
306
|
+
const requestContextPromise = this.requestFactory.createToken(chain, createTokenInput, _options);
|
|
306
307
|
|
|
307
308
|
// build promise chain
|
|
308
309
|
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
@@ -324,10 +325,10 @@ export class ObservableDexApi {
|
|
|
324
325
|
* CONTROLLER.DEX.CREATE.DESCRIPTION
|
|
325
326
|
* CONTROLLER.DEX.CREATE.SUMMARY
|
|
326
327
|
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
327
|
-
* @param
|
|
328
|
+
* @param createTokenInput Token creation parameters
|
|
328
329
|
*/
|
|
329
|
-
public createToken(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui',
|
|
330
|
-
return this.createTokenWithHttpInfo(chain,
|
|
330
|
+
public createToken(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', createTokenInput: CreateTokenInput, _options?: Configuration): Observable<CreateTokenReply> {
|
|
331
|
+
return this.createTokenWithHttpInfo(chain, createTokenInput, _options).pipe(map((apiResponse: HttpInfo<CreateTokenReply>) => apiResponse.data));
|
|
331
332
|
}
|
|
332
333
|
|
|
333
334
|
/**
|
|
@@ -367,6 +368,51 @@ export class ObservableDexApi {
|
|
|
367
368
|
return this.listWithHttpInfo(chains, limit, dexProgram, _options).pipe(map((apiResponse: HttpInfo<DexPage>) => apiResponse.data));
|
|
368
369
|
}
|
|
369
370
|
|
|
371
|
+
/**
|
|
372
|
+
* CONTROLLER.DEX.QUOTE.DESCRIPTION
|
|
373
|
+
* CONTROLLER.DEX.QUOTE.SUMMARY
|
|
374
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
375
|
+
* @param dex DTO.DEX.QUOTE.DEX
|
|
376
|
+
* @param amount DTO.DEX.QUOTE.AMOUNT
|
|
377
|
+
* @param inputMint DTO.DEX.QUOTE.INPUT_MINT
|
|
378
|
+
* @param outputMint DTO.DEX.QUOTE.OUTPUT_MINT
|
|
379
|
+
* @param exactIn DTO.DEX.QUOTE.EXACT_IN
|
|
380
|
+
* @param slippage DTO.DEX.QUOTE.SLIPPAGE
|
|
381
|
+
*/
|
|
382
|
+
public quoteWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', dex: 'raydium' | 'pumpfun', amount: string, inputMint: string, outputMint: string, exactIn: boolean, slippage: number, _options?: Configuration): Observable<HttpInfo<QuoteResponse>> {
|
|
383
|
+
const requestContextPromise = this.requestFactory.quote(chain, dex, amount, inputMint, outputMint, exactIn, slippage, _options);
|
|
384
|
+
|
|
385
|
+
// build promise chain
|
|
386
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
387
|
+
for (const middleware of this.configuration.middleware) {
|
|
388
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
392
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
393
|
+
let middlewarePostObservable = of(response);
|
|
394
|
+
for (const middleware of this.configuration.middleware) {
|
|
395
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
396
|
+
}
|
|
397
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.quoteWithHttpInfo(rsp)));
|
|
398
|
+
}));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* CONTROLLER.DEX.QUOTE.DESCRIPTION
|
|
403
|
+
* CONTROLLER.DEX.QUOTE.SUMMARY
|
|
404
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
405
|
+
* @param dex DTO.DEX.QUOTE.DEX
|
|
406
|
+
* @param amount DTO.DEX.QUOTE.AMOUNT
|
|
407
|
+
* @param inputMint DTO.DEX.QUOTE.INPUT_MINT
|
|
408
|
+
* @param outputMint DTO.DEX.QUOTE.OUTPUT_MINT
|
|
409
|
+
* @param exactIn DTO.DEX.QUOTE.EXACT_IN
|
|
410
|
+
* @param slippage DTO.DEX.QUOTE.SLIPPAGE
|
|
411
|
+
*/
|
|
412
|
+
public quote(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', dex: 'raydium' | 'pumpfun', amount: string, inputMint: string, outputMint: string, exactIn: boolean, slippage: number, _options?: Configuration): Observable<QuoteResponse> {
|
|
413
|
+
return this.quoteWithHttpInfo(chain, dex, amount, inputMint, outputMint, exactIn, slippage, _options).pipe(map((apiResponse: HttpInfo<QuoteResponse>) => apiResponse.data));
|
|
414
|
+
}
|
|
415
|
+
|
|
370
416
|
/**
|
|
371
417
|
* CONTROLLER.DEX.ROUTE.DESCRIPTION
|
|
372
418
|
* CONTROLLER.DEX.ROUTE.SUMMARY
|
|
@@ -2246,6 +2292,61 @@ export class ObservableTradeApi {
|
|
|
2246
2292
|
this.responseProcessor = responseProcessor || new TradeApiResponseProcessor();
|
|
2247
2293
|
}
|
|
2248
2294
|
|
|
2295
|
+
/**
|
|
2296
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
|
|
2297
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
|
|
2298
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
2299
|
+
* @param [cursor] DTO.PAGE.CURSOR.DESCRIPTION
|
|
2300
|
+
* @param [limit] DTO.PAGE.LIMIT
|
|
2301
|
+
* @param [direction] DTO.PAGE.DIRECTION
|
|
2302
|
+
* @param [tokenAddress] DTO.TRADE.QUERY.TOKEN_ADDRESS
|
|
2303
|
+
* @param [walletAddress] DTO.TRADE.QUERY.WALLET_ADDRESS
|
|
2304
|
+
* @param [poolAddress] DTO.TRADE.QUERY.POOL_ADDRESS
|
|
2305
|
+
* @param [beforeTimestamp] DTO.TRADE.QUERY.BEFORE_TIMESTAMP
|
|
2306
|
+
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
2307
|
+
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
2308
|
+
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
2309
|
+
* @param [type] DTO.TRADE.QUERY.ACTIVITIES_TYPE
|
|
2310
|
+
*/
|
|
2311
|
+
public getActivitiesWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND', _options?: Configuration): Observable<HttpInfo<TradePage>> {
|
|
2312
|
+
const requestContextPromise = this.requestFactory.getActivities(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options);
|
|
2313
|
+
|
|
2314
|
+
// build promise chain
|
|
2315
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
2316
|
+
for (const middleware of this.configuration.middleware) {
|
|
2317
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
2321
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
2322
|
+
let middlewarePostObservable = of(response);
|
|
2323
|
+
for (const middleware of this.configuration.middleware) {
|
|
2324
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
2325
|
+
}
|
|
2326
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getActivitiesWithHttpInfo(rsp)));
|
|
2327
|
+
}));
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
/**
|
|
2331
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
|
|
2332
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
|
|
2333
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
2334
|
+
* @param [cursor] DTO.PAGE.CURSOR.DESCRIPTION
|
|
2335
|
+
* @param [limit] DTO.PAGE.LIMIT
|
|
2336
|
+
* @param [direction] DTO.PAGE.DIRECTION
|
|
2337
|
+
* @param [tokenAddress] DTO.TRADE.QUERY.TOKEN_ADDRESS
|
|
2338
|
+
* @param [walletAddress] DTO.TRADE.QUERY.WALLET_ADDRESS
|
|
2339
|
+
* @param [poolAddress] DTO.TRADE.QUERY.POOL_ADDRESS
|
|
2340
|
+
* @param [beforeTimestamp] DTO.TRADE.QUERY.BEFORE_TIMESTAMP
|
|
2341
|
+
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
2342
|
+
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
2343
|
+
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
2344
|
+
* @param [type] DTO.TRADE.QUERY.ACTIVITIES_TYPE
|
|
2345
|
+
*/
|
|
2346
|
+
public getActivities(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND', _options?: Configuration): Observable<TradePage> {
|
|
2347
|
+
return this.getActivitiesWithHttpInfo(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options).pipe(map((apiResponse: HttpInfo<TradePage>) => apiResponse.data));
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2249
2350
|
/**
|
|
2250
2351
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
2251
2352
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
@@ -2352,9 +2453,10 @@ export class ObservableTradeApi {
|
|
|
2352
2453
|
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
2353
2454
|
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
2354
2455
|
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
2456
|
+
* @param [type] DTO.TRADE.QUERY.TRADES_TYPE
|
|
2355
2457
|
*/
|
|
2356
|
-
public getTradesWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, _options?: Configuration): Observable<HttpInfo<TradePage>> {
|
|
2357
|
-
const requestContextPromise = this.requestFactory.getTrades(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, _options);
|
|
2458
|
+
public getTradesWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL', _options?: Configuration): Observable<HttpInfo<TradePage>> {
|
|
2459
|
+
const requestContextPromise = this.requestFactory.getTrades(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options);
|
|
2358
2460
|
|
|
2359
2461
|
// build promise chain
|
|
2360
2462
|
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
@@ -2386,9 +2488,10 @@ export class ObservableTradeApi {
|
|
|
2386
2488
|
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
2387
2489
|
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
2388
2490
|
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
2491
|
+
* @param [type] DTO.TRADE.QUERY.TRADES_TYPE
|
|
2389
2492
|
*/
|
|
2390
|
-
public getTrades(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, _options?: Configuration): Observable<TradePage> {
|
|
2391
|
-
return this.getTradesWithHttpInfo(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, _options).pipe(map((apiResponse: HttpInfo<TradePage>) => apiResponse.data));
|
|
2493
|
+
public getTrades(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL', _options?: Configuration): Observable<TradePage> {
|
|
2494
|
+
return this.getTradesWithHttpInfo(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options).pipe(map((apiResponse: HttpInfo<TradePage>) => apiResponse.data));
|
|
2392
2495
|
}
|
|
2393
2496
|
|
|
2394
2497
|
}
|
|
@@ -7,8 +7,8 @@ import { Candle } from '../models/Candle';
|
|
|
7
7
|
import { ClaimRedPacketInput } from '../models/ClaimRedPacketInput';
|
|
8
8
|
import { CreateRedPacketInput } from '../models/CreateRedPacketInput';
|
|
9
9
|
import { CreateRedPacketReply } from '../models/CreateRedPacketReply';
|
|
10
|
+
import { CreateTokenInput } from '../models/CreateTokenInput';
|
|
10
11
|
import { CreateTokenReply } from '../models/CreateTokenReply';
|
|
11
|
-
import { DexCreateTokenInput } from '../models/DexCreateTokenInput';
|
|
12
12
|
import { DexDTO } from '../models/DexDTO';
|
|
13
13
|
import { DexPage } from '../models/DexPage';
|
|
14
14
|
import { DexPoolDTO } from '../models/DexPoolDTO';
|
|
@@ -22,6 +22,7 @@ import { MoonshotSubmitCreateToken200Response } from '../models/MoonshotSubmitCr
|
|
|
22
22
|
import { MoonshotSubmitCreateTokenInput } from '../models/MoonshotSubmitCreateTokenInput';
|
|
23
23
|
import { PumpCreateTokenInput } from '../models/PumpCreateTokenInput';
|
|
24
24
|
import { PumpCreateTokenReply } from '../models/PumpCreateTokenReply';
|
|
25
|
+
import { QuoteResponse } from '../models/QuoteResponse';
|
|
25
26
|
import { RedPacketClaimDTO } from '../models/RedPacketClaimDTO';
|
|
26
27
|
import { RedPacketClaimsPage } from '../models/RedPacketClaimsPage';
|
|
27
28
|
import { RedPacketDTO } from '../models/RedPacketDTO';
|
|
@@ -233,10 +234,10 @@ export class PromiseDexApi {
|
|
|
233
234
|
* CONTROLLER.DEX.CREATE.DESCRIPTION
|
|
234
235
|
* CONTROLLER.DEX.CREATE.SUMMARY
|
|
235
236
|
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
236
|
-
* @param
|
|
237
|
+
* @param createTokenInput Token creation parameters
|
|
237
238
|
*/
|
|
238
|
-
public createTokenWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui',
|
|
239
|
-
const result = this.api.createTokenWithHttpInfo(chain,
|
|
239
|
+
public createTokenWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', createTokenInput: CreateTokenInput, _options?: Configuration): Promise<HttpInfo<CreateTokenReply>> {
|
|
240
|
+
const result = this.api.createTokenWithHttpInfo(chain, createTokenInput, _options);
|
|
240
241
|
return result.toPromise();
|
|
241
242
|
}
|
|
242
243
|
|
|
@@ -244,10 +245,10 @@ export class PromiseDexApi {
|
|
|
244
245
|
* CONTROLLER.DEX.CREATE.DESCRIPTION
|
|
245
246
|
* CONTROLLER.DEX.CREATE.SUMMARY
|
|
246
247
|
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
247
|
-
* @param
|
|
248
|
+
* @param createTokenInput Token creation parameters
|
|
248
249
|
*/
|
|
249
|
-
public createToken(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui',
|
|
250
|
-
const result = this.api.createToken(chain,
|
|
250
|
+
public createToken(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', createTokenInput: CreateTokenInput, _options?: Configuration): Promise<CreateTokenReply> {
|
|
251
|
+
const result = this.api.createToken(chain, createTokenInput, _options);
|
|
251
252
|
return result.toPromise();
|
|
252
253
|
}
|
|
253
254
|
|
|
@@ -275,6 +276,38 @@ export class PromiseDexApi {
|
|
|
275
276
|
return result.toPromise();
|
|
276
277
|
}
|
|
277
278
|
|
|
279
|
+
/**
|
|
280
|
+
* CONTROLLER.DEX.QUOTE.DESCRIPTION
|
|
281
|
+
* CONTROLLER.DEX.QUOTE.SUMMARY
|
|
282
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
283
|
+
* @param dex DTO.DEX.QUOTE.DEX
|
|
284
|
+
* @param amount DTO.DEX.QUOTE.AMOUNT
|
|
285
|
+
* @param inputMint DTO.DEX.QUOTE.INPUT_MINT
|
|
286
|
+
* @param outputMint DTO.DEX.QUOTE.OUTPUT_MINT
|
|
287
|
+
* @param exactIn DTO.DEX.QUOTE.EXACT_IN
|
|
288
|
+
* @param slippage DTO.DEX.QUOTE.SLIPPAGE
|
|
289
|
+
*/
|
|
290
|
+
public quoteWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', dex: 'raydium' | 'pumpfun', amount: string, inputMint: string, outputMint: string, exactIn: boolean, slippage: number, _options?: Configuration): Promise<HttpInfo<QuoteResponse>> {
|
|
291
|
+
const result = this.api.quoteWithHttpInfo(chain, dex, amount, inputMint, outputMint, exactIn, slippage, _options);
|
|
292
|
+
return result.toPromise();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* CONTROLLER.DEX.QUOTE.DESCRIPTION
|
|
297
|
+
* CONTROLLER.DEX.QUOTE.SUMMARY
|
|
298
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
299
|
+
* @param dex DTO.DEX.QUOTE.DEX
|
|
300
|
+
* @param amount DTO.DEX.QUOTE.AMOUNT
|
|
301
|
+
* @param inputMint DTO.DEX.QUOTE.INPUT_MINT
|
|
302
|
+
* @param outputMint DTO.DEX.QUOTE.OUTPUT_MINT
|
|
303
|
+
* @param exactIn DTO.DEX.QUOTE.EXACT_IN
|
|
304
|
+
* @param slippage DTO.DEX.QUOTE.SLIPPAGE
|
|
305
|
+
*/
|
|
306
|
+
public quote(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', dex: 'raydium' | 'pumpfun', amount: string, inputMint: string, outputMint: string, exactIn: boolean, slippage: number, _options?: Configuration): Promise<QuoteResponse> {
|
|
307
|
+
const result = this.api.quote(chain, dex, amount, inputMint, outputMint, exactIn, slippage, _options);
|
|
308
|
+
return result.toPromise();
|
|
309
|
+
}
|
|
310
|
+
|
|
278
311
|
/**
|
|
279
312
|
* CONTROLLER.DEX.ROUTE.DESCRIPTION
|
|
280
313
|
* CONTROLLER.DEX.ROUTE.SUMMARY
|
|
@@ -1654,6 +1687,48 @@ export class PromiseTradeApi {
|
|
|
1654
1687
|
this.api = new ObservableTradeApi(configuration, requestFactory, responseProcessor);
|
|
1655
1688
|
}
|
|
1656
1689
|
|
|
1690
|
+
/**
|
|
1691
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
|
|
1692
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
|
|
1693
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
1694
|
+
* @param [cursor] DTO.PAGE.CURSOR.DESCRIPTION
|
|
1695
|
+
* @param [limit] DTO.PAGE.LIMIT
|
|
1696
|
+
* @param [direction] DTO.PAGE.DIRECTION
|
|
1697
|
+
* @param [tokenAddress] DTO.TRADE.QUERY.TOKEN_ADDRESS
|
|
1698
|
+
* @param [walletAddress] DTO.TRADE.QUERY.WALLET_ADDRESS
|
|
1699
|
+
* @param [poolAddress] DTO.TRADE.QUERY.POOL_ADDRESS
|
|
1700
|
+
* @param [beforeTimestamp] DTO.TRADE.QUERY.BEFORE_TIMESTAMP
|
|
1701
|
+
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
1702
|
+
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
1703
|
+
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
1704
|
+
* @param [type] DTO.TRADE.QUERY.ACTIVITIES_TYPE
|
|
1705
|
+
*/
|
|
1706
|
+
public getActivitiesWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND', _options?: Configuration): Promise<HttpInfo<TradePage>> {
|
|
1707
|
+
const result = this.api.getActivitiesWithHttpInfo(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options);
|
|
1708
|
+
return result.toPromise();
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
|
|
1713
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
|
|
1714
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
1715
|
+
* @param [cursor] DTO.PAGE.CURSOR.DESCRIPTION
|
|
1716
|
+
* @param [limit] DTO.PAGE.LIMIT
|
|
1717
|
+
* @param [direction] DTO.PAGE.DIRECTION
|
|
1718
|
+
* @param [tokenAddress] DTO.TRADE.QUERY.TOKEN_ADDRESS
|
|
1719
|
+
* @param [walletAddress] DTO.TRADE.QUERY.WALLET_ADDRESS
|
|
1720
|
+
* @param [poolAddress] DTO.TRADE.QUERY.POOL_ADDRESS
|
|
1721
|
+
* @param [beforeTimestamp] DTO.TRADE.QUERY.BEFORE_TIMESTAMP
|
|
1722
|
+
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
1723
|
+
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
1724
|
+
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
1725
|
+
* @param [type] DTO.TRADE.QUERY.ACTIVITIES_TYPE
|
|
1726
|
+
*/
|
|
1727
|
+
public getActivities(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND', _options?: Configuration): Promise<TradePage> {
|
|
1728
|
+
const result = this.api.getActivities(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options);
|
|
1729
|
+
return result.toPromise();
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1657
1732
|
/**
|
|
1658
1733
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
1659
1734
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
@@ -1734,9 +1809,10 @@ export class PromiseTradeApi {
|
|
|
1734
1809
|
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
1735
1810
|
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
1736
1811
|
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
1812
|
+
* @param [type] DTO.TRADE.QUERY.TRADES_TYPE
|
|
1737
1813
|
*/
|
|
1738
|
-
public getTradesWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, _options?: Configuration): Promise<HttpInfo<TradePage>> {
|
|
1739
|
-
const result = this.api.getTradesWithHttpInfo(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, _options);
|
|
1814
|
+
public getTradesWithHttpInfo(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL', _options?: Configuration): Promise<HttpInfo<TradePage>> {
|
|
1815
|
+
const result = this.api.getTradesWithHttpInfo(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options);
|
|
1740
1816
|
return result.toPromise();
|
|
1741
1817
|
}
|
|
1742
1818
|
|
|
@@ -1754,9 +1830,10 @@ export class PromiseTradeApi {
|
|
|
1754
1830
|
* @param [afterTimestamp] DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
1755
1831
|
* @param [beforeBlockHeight] DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
1756
1832
|
* @param [afterBlockHeight] DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
1833
|
+
* @param [type] DTO.TRADE.QUERY.TRADES_TYPE
|
|
1757
1834
|
*/
|
|
1758
|
-
public getTrades(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, _options?: Configuration): Promise<TradePage> {
|
|
1759
|
-
const result = this.api.getTrades(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, _options);
|
|
1835
|
+
public getTrades(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL', _options?: Configuration): Promise<TradePage> {
|
|
1836
|
+
const result = this.api.getTrades(chain, cursor, limit, direction, tokenAddress, walletAddress, poolAddress, beforeTimestamp, afterTimestamp, beforeBlockHeight, afterBlockHeight, type, _options);
|
|
1760
1837
|
return result.toPromise();
|
|
1761
1838
|
}
|
|
1762
1839
|
|