@chainstream-io/sdk 0.0.8 → 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 +240 -190
- package/dist/api/stream.js.map +1 -1
- package/dist/api/stream.model.d.ts +19 -1
- 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/TokenExtraDTO.d.ts +5 -5
- package/dist/openapi/models/TokenExtraDTO.js +10 -10
- package/dist/openapi/models/TokenExtraDTO.js.map +1 -1
- 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 +21 -1
- package/src/api/stream.ts +178 -136
- 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/TokenExtraDTO.ts +20 -20
- 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
|
@@ -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
|
|