@chainstream-io/sdk 0.1.5 → 0.1.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/README.md +46 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +76 -60
- package/dist/esm/openapi/apis/BlockchainApi.js +61 -44
- package/dist/esm/openapi/apis/DefiSolanaMoonshotApi.js +67 -50
- package/dist/esm/openapi/apis/DefiSolanaPumpfunApi.js +38 -25
- package/dist/esm/openapi/apis/DexApi.js +205 -176
- package/dist/esm/openapi/apis/DexPoolApi.js +41 -28
- package/dist/esm/openapi/apis/EndpointApi.js +212 -175
- package/dist/esm/openapi/apis/IpfsApi.js +38 -25
- package/dist/esm/openapi/apis/JobsApi.js +65 -48
- package/dist/esm/openapi/apis/RankingApi.js +278 -249
- package/dist/esm/openapi/apis/RedPacketApi.js +294 -253
- package/dist/esm/openapi/apis/TokenApi.js +1145 -1056
- package/dist/esm/openapi/apis/TradeApi.js +233 -208
- package/dist/esm/openapi/apis/TransactionApi.js +42 -29
- package/dist/esm/openapi/apis/WalletApi.js +148 -123
- package/dist/esm/openapi/apis/WatchlistApi.js +41 -28
- package/dist/esm/openapi/runtime.js +81 -69
- package/dist/esm/stream/index.d.ts +3 -0
- package/dist/esm/stream/index.js +3 -0
- package/dist/esm/{api → stream}/stream.js +36 -29
- package/dist/index.d.ts +1 -1
- package/dist/index.js +75 -59
- package/dist/openapi/apis/BlockchainApi.js +62 -78
- package/dist/openapi/apis/DefiSolanaMoonshotApi.js +68 -84
- package/dist/openapi/apis/DefiSolanaPumpfunApi.js +39 -59
- package/dist/openapi/apis/DexApi.js +206 -210
- package/dist/openapi/apis/DexPoolApi.js +42 -62
- package/dist/openapi/apis/EndpointApi.js +213 -209
- package/dist/openapi/apis/IpfsApi.js +39 -59
- package/dist/openapi/apis/JobsApi.js +66 -82
- package/dist/openapi/apis/RankingApi.js +279 -283
- package/dist/openapi/apis/RedPacketApi.js +295 -287
- package/dist/openapi/apis/TokenApi.js +1146 -1090
- package/dist/openapi/apis/TradeApi.js +234 -242
- package/dist/openapi/apis/TransactionApi.js +43 -63
- package/dist/openapi/apis/WalletApi.js +149 -157
- package/dist/openapi/apis/WatchlistApi.js +42 -62
- package/dist/openapi/runtime.js +81 -69
- package/dist/stream/index.d.ts +3 -0
- package/dist/stream/index.js +19 -0
- package/dist/{api → stream}/stream.js +36 -29
- package/package.json +29 -26
- package/src/api/stream.fields.ts +0 -271
- package/src/api/stream.model.ts +0 -307
- package/src/api/stream.ts +0 -1086
- package/src/index.ts +0 -188
- package/src/openapi/apis/BlockchainApi.ts +0 -140
- package/src/openapi/apis/DefiSolanaMoonshotApi.ts +0 -145
- package/src/openapi/apis/DefiSolanaPumpfunApi.ts +0 -86
- package/src/openapi/apis/DexApi.ts +0 -490
- package/src/openapi/apis/DexPoolApi.ts +0 -107
- package/src/openapi/apis/EndpointApi.ts +0 -421
- package/src/openapi/apis/IpfsApi.ts +0 -66
- package/src/openapi/apis/JobsApi.ts +0 -135
- package/src/openapi/apis/RankingApi.ts +0 -939
- package/src/openapi/apis/RedPacketApi.ts +0 -621
- package/src/openapi/apis/TokenApi.ts +0 -2569
- package/src/openapi/apis/TradeApi.ts +0 -596
- package/src/openapi/apis/TransactionApi.ts +0 -95
- package/src/openapi/apis/WalletApi.ts +0 -365
- package/src/openapi/apis/WatchlistApi.ts +0 -107
- package/src/openapi/apis/index.ts +0 -17
- package/src/openapi/index.ts +0 -5
- package/src/openapi/models/BlockchainDTO.ts +0 -93
- package/src/openapi/models/BlockchainLatestBlockDTO.ts +0 -75
- package/src/openapi/models/BooleanResultDTO.ts +0 -66
- package/src/openapi/models/CalculatePnlInput.ts +0 -65
- package/src/openapi/models/Candle.ts +0 -130
- package/src/openapi/models/ClaimRedPacketInput.ts +0 -90
- package/src/openapi/models/CreateEndpointInput.ts +0 -121
- package/src/openapi/models/CreateRedPacketInput.ts +0 -124
- package/src/openapi/models/CreateRedPacketReply.ts +0 -75
- package/src/openapi/models/CreateTokenInput.ts +0 -139
- package/src/openapi/models/CreateTokenReply.ts +0 -75
- package/src/openapi/models/DexDTO.ts +0 -90
- package/src/openapi/models/DexPage.ts +0 -114
- package/src/openapi/models/DexPoolDTO.ts +0 -141
- package/src/openapi/models/EndpointListResponse.ts +0 -97
- package/src/openapi/models/EndpointOperationResponse.ts +0 -65
- package/src/openapi/models/EndpointResponse.ts +0 -145
- package/src/openapi/models/EndpointSecretResponse.ts +0 -65
- package/src/openapi/models/FilterCondition.ts +0 -135
- package/src/openapi/models/GainersAndLosersDTO.ts +0 -93
- package/src/openapi/models/GainersAndLosersPage.ts +0 -114
- package/src/openapi/models/JobDTO.ts +0 -75
- package/src/openapi/models/JobStreamingDTO.ts +0 -75
- package/src/openapi/models/Link.ts +0 -88
- package/src/openapi/models/MoonshotCreateTokenInput.ts +0 -182
- package/src/openapi/models/MoonshotCreateTokenReply.ts +0 -75
- package/src/openapi/models/MoonshotSubmitCreateToken200Response.ts +0 -73
- package/src/openapi/models/MoonshotSubmitCreateTokenInput.ts +0 -74
- package/src/openapi/models/PumpCreateTokenInput.ts +0 -180
- package/src/openapi/models/PumpCreateTokenReply.ts +0 -74
- package/src/openapi/models/QuoteResponse.ts +0 -105
- package/src/openapi/models/RedPacketClaimDTO.ts +0 -148
- package/src/openapi/models/RedPacketClaimsPage.ts +0 -110
- package/src/openapi/models/RedPacketDTO.ts +0 -229
- package/src/openapi/models/RedPacketReply.ts +0 -66
- package/src/openapi/models/RedPacketSendTxInput.ts +0 -66
- package/src/openapi/models/RedPacketSendTxResponse.ts +0 -66
- package/src/openapi/models/RedPacketsPage.ts +0 -110
- package/src/openapi/models/Resolution.ts +0 -61
- package/src/openapi/models/SendTxInput.ts +0 -93
- package/src/openapi/models/SendTxResponse.ts +0 -84
- package/src/openapi/models/SwapInput.ts +0 -157
- package/src/openapi/models/SwapReply.ts +0 -75
- package/src/openapi/models/SwapRouteInput.ts +0 -186
- package/src/openapi/models/SwapRouteResponse.ts +0 -101
- package/src/openapi/models/Token.ts +0 -251
- package/src/openapi/models/TokenCreationDTO.ts +0 -131
- package/src/openapi/models/TokenCreationPage.ts +0 -114
- package/src/openapi/models/TokenCreatorsDTO.ts +0 -81
- package/src/openapi/models/TokenExtraDTO.ts +0 -225
- package/src/openapi/models/TokenHolder.ts +0 -93
- package/src/openapi/models/TokenHolderPage.ts +0 -114
- package/src/openapi/models/TokenListPage.ts +0 -114
- package/src/openapi/models/TokenMarketData.ts +0 -190
- package/src/openapi/models/TokenMetadata.ts +0 -188
- package/src/openapi/models/TokenPage.ts +0 -122
- package/src/openapi/models/TokenPriceDTO.ts +0 -93
- package/src/openapi/models/TokenPricePage.ts +0 -114
- package/src/openapi/models/TokenSocialMediasDTO.ts +0 -161
- package/src/openapi/models/TokenStat.ts +0 -1152
- package/src/openapi/models/TopTradersDTO.ts +0 -164
- package/src/openapi/models/TopTradersPage.ts +0 -114
- package/src/openapi/models/TradeDetailDTO.ts +0 -282
- package/src/openapi/models/TradeEvent.ts +0 -184
- package/src/openapi/models/TradePage.ts +0 -114
- package/src/openapi/models/TradeType.ts +0 -53
- package/src/openapi/models/UpdateEndpointInput.ts +0 -129
- package/src/openapi/models/WalletBalanceDetailDTO.ts +0 -282
- package/src/openapi/models/WalletBalancesDTO.ts +0 -92
- package/src/openapi/models/WalletPnlDTO.ts +0 -264
- package/src/openapi/models/index.ts +0 -72
- package/src/openapi/runtime.ts +0 -432
- /package/dist/{api → esm/stream}/stream.d.ts +0 -0
- /package/dist/{api → esm/stream}/stream.fields.d.ts +0 -0
- /package/dist/esm/{api → stream}/stream.fields.js +0 -0
- /package/dist/{api → esm/stream}/stream.model.d.ts +0 -0
- /package/dist/esm/{api → stream}/stream.model.js +0 -0
- /package/dist/{esm/api → stream}/stream.d.ts +0 -0
- /package/dist/{esm/api → stream}/stream.fields.d.ts +0 -0
- /package/dist/{api → stream}/stream.fields.js +0 -0
- /package/dist/{esm/api → stream}/stream.model.d.ts +0 -0
- /package/dist/{api → stream}/stream.model.js +0 -0
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Dex Aggregator API
|
|
5
|
-
* Dex Aggregator API ⚡️
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0
|
|
8
|
-
* Contact: ai@sx.ai
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface SendTxResponse
|
|
20
|
-
*/
|
|
21
|
-
export interface SendTxResponse {
|
|
22
|
-
/**
|
|
23
|
-
* DTO.TRANSACTION.SEND.SIGNATURE
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof SendTxResponse
|
|
26
|
-
*/
|
|
27
|
-
signature: string;
|
|
28
|
-
/**
|
|
29
|
-
* DTO.TRANSACTION.SEND.ELAPSED_TIME
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof SendTxResponse
|
|
32
|
-
*/
|
|
33
|
-
elapsedTime: number;
|
|
34
|
-
/**
|
|
35
|
-
* DTO.TRANSACTION.SEND.JOB_ID
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof SendTxResponse
|
|
38
|
-
*/
|
|
39
|
-
jobId: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Check if a given object implements the SendTxResponse interface.
|
|
44
|
-
*/
|
|
45
|
-
export function instanceOfSendTxResponse(value: object): value is SendTxResponse {
|
|
46
|
-
if (!('signature' in value) || value['signature'] === undefined) return false;
|
|
47
|
-
if (!('elapsedTime' in value) || value['elapsedTime'] === undefined) return false;
|
|
48
|
-
if (!('jobId' in value) || value['jobId'] === undefined) return false;
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function SendTxResponseFromJSON(json: any): SendTxResponse {
|
|
53
|
-
return SendTxResponseFromJSONTyped(json, false);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function SendTxResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendTxResponse {
|
|
57
|
-
if (json == null) {
|
|
58
|
-
return json;
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
|
|
62
|
-
'signature': json['signature'],
|
|
63
|
-
'elapsedTime': json['elapsedTime'],
|
|
64
|
-
'jobId': json['jobId'],
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function SendTxResponseToJSON(json: any): SendTxResponse {
|
|
69
|
-
return SendTxResponseToJSONTyped(json, false);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function SendTxResponseToJSONTyped(value?: SendTxResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
-
if (value == null) {
|
|
74
|
-
return value;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return {
|
|
78
|
-
|
|
79
|
-
'signature': value['signature'],
|
|
80
|
-
'elapsedTime': value['elapsedTime'],
|
|
81
|
-
'jobId': value['jobId'],
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Dex Aggregator API
|
|
5
|
-
* Dex Aggregator API ⚡️
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0
|
|
8
|
-
* Contact: ai@sx.ai
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface SwapInput
|
|
20
|
-
*/
|
|
21
|
-
export interface SwapInput {
|
|
22
|
-
/**
|
|
23
|
-
* DTO.DEX.IDENTIFIER
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof SwapInput
|
|
26
|
-
*/
|
|
27
|
-
dex: SwapInputDexEnum;
|
|
28
|
-
/**
|
|
29
|
-
* DTO.DEX.WALLET
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof SwapInput
|
|
32
|
-
*/
|
|
33
|
-
userAddress: string;
|
|
34
|
-
/**
|
|
35
|
-
* DTO.DEX.BASE.PRIORITY_FEE
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof SwapInput
|
|
38
|
-
*/
|
|
39
|
-
priorityFee?: string;
|
|
40
|
-
/**
|
|
41
|
-
* DTO.DEX.SWAP.POOL_ADDRESS
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof SwapInput
|
|
44
|
-
*/
|
|
45
|
-
poolAddress?: string;
|
|
46
|
-
/**
|
|
47
|
-
* DTO.DEX.SWAP.AMOUNT
|
|
48
|
-
* @type {string}
|
|
49
|
-
* @memberof SwapInput
|
|
50
|
-
*/
|
|
51
|
-
amount: string;
|
|
52
|
-
/**
|
|
53
|
-
* DTO.DEX.SWAP.MODE
|
|
54
|
-
* @type {string}
|
|
55
|
-
* @memberof SwapInput
|
|
56
|
-
*/
|
|
57
|
-
swapMode: SwapInputSwapModeEnum;
|
|
58
|
-
/**
|
|
59
|
-
* DTO.DEX.SWAP.SLIPPAGE
|
|
60
|
-
* @type {number}
|
|
61
|
-
* @memberof SwapInput
|
|
62
|
-
*/
|
|
63
|
-
slippage: number;
|
|
64
|
-
/**
|
|
65
|
-
* DTO.DEX.SWAP.INPUT_MINT
|
|
66
|
-
* @type {string}
|
|
67
|
-
* @memberof SwapInput
|
|
68
|
-
*/
|
|
69
|
-
inputMint?: string;
|
|
70
|
-
/**
|
|
71
|
-
* DTO.DEX.SWAP.OUTPUT_MINT
|
|
72
|
-
* @type {string}
|
|
73
|
-
* @memberof SwapInput
|
|
74
|
-
*/
|
|
75
|
-
outputMint?: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @export
|
|
81
|
-
*/
|
|
82
|
-
export const SwapInputDexEnum = {
|
|
83
|
-
Raydium: 'raydium',
|
|
84
|
-
Pumpfun: 'pumpfun',
|
|
85
|
-
Moonshot: 'moonshot',
|
|
86
|
-
Candy: 'candy',
|
|
87
|
-
Launchpad: 'launchpad'
|
|
88
|
-
} as const;
|
|
89
|
-
export type SwapInputDexEnum = typeof SwapInputDexEnum[keyof typeof SwapInputDexEnum];
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @export
|
|
93
|
-
*/
|
|
94
|
-
export const SwapInputSwapModeEnum = {
|
|
95
|
-
ExactIn: 'ExactIn',
|
|
96
|
-
ExactOut: 'ExactOut'
|
|
97
|
-
} as const;
|
|
98
|
-
export type SwapInputSwapModeEnum = typeof SwapInputSwapModeEnum[keyof typeof SwapInputSwapModeEnum];
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Check if a given object implements the SwapInput interface.
|
|
103
|
-
*/
|
|
104
|
-
export function instanceOfSwapInput(value: object): value is SwapInput {
|
|
105
|
-
if (!('dex' in value) || value['dex'] === undefined) return false;
|
|
106
|
-
if (!('userAddress' in value) || value['userAddress'] === undefined) return false;
|
|
107
|
-
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
108
|
-
if (!('swapMode' in value) || value['swapMode'] === undefined) return false;
|
|
109
|
-
if (!('slippage' in value) || value['slippage'] === undefined) return false;
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export function SwapInputFromJSON(json: any): SwapInput {
|
|
114
|
-
return SwapInputFromJSONTyped(json, false);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function SwapInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapInput {
|
|
118
|
-
if (json == null) {
|
|
119
|
-
return json;
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
|
|
123
|
-
'dex': json['dex'],
|
|
124
|
-
'userAddress': json['userAddress'],
|
|
125
|
-
'priorityFee': json['priorityFee'] == null ? undefined : json['priorityFee'],
|
|
126
|
-
'poolAddress': json['poolAddress'] == null ? undefined : json['poolAddress'],
|
|
127
|
-
'amount': json['amount'],
|
|
128
|
-
'swapMode': json['swapMode'],
|
|
129
|
-
'slippage': json['slippage'],
|
|
130
|
-
'inputMint': json['inputMint'] == null ? undefined : json['inputMint'],
|
|
131
|
-
'outputMint': json['outputMint'] == null ? undefined : json['outputMint'],
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export function SwapInputToJSON(json: any): SwapInput {
|
|
136
|
-
return SwapInputToJSONTyped(json, false);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export function SwapInputToJSONTyped(value?: SwapInput | null, ignoreDiscriminator: boolean = false): any {
|
|
140
|
-
if (value == null) {
|
|
141
|
-
return value;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return {
|
|
145
|
-
|
|
146
|
-
'dex': value['dex'],
|
|
147
|
-
'userAddress': value['userAddress'],
|
|
148
|
-
'priorityFee': value['priorityFee'],
|
|
149
|
-
'poolAddress': value['poolAddress'],
|
|
150
|
-
'amount': value['amount'],
|
|
151
|
-
'swapMode': value['swapMode'],
|
|
152
|
-
'slippage': value['slippage'],
|
|
153
|
-
'inputMint': value['inputMint'],
|
|
154
|
-
'outputMint': value['outputMint'],
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Dex Aggregator API
|
|
5
|
-
* Dex Aggregator API ⚡️
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0
|
|
8
|
-
* Contact: ai@sx.ai
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface SwapReply
|
|
20
|
-
*/
|
|
21
|
-
export interface SwapReply {
|
|
22
|
-
/**
|
|
23
|
-
* DTO.DEX.SWAP.SERIALIZED_TX
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof SwapReply
|
|
26
|
-
*/
|
|
27
|
-
serializedTx: string;
|
|
28
|
-
/**
|
|
29
|
-
* DTO.DEX.SWAP.ELAPSED_TIME
|
|
30
|
-
* @type {number}
|
|
31
|
-
* @memberof SwapReply
|
|
32
|
-
*/
|
|
33
|
-
elapsedTime: number;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Check if a given object implements the SwapReply interface.
|
|
38
|
-
*/
|
|
39
|
-
export function instanceOfSwapReply(value: object): value is SwapReply {
|
|
40
|
-
if (!('serializedTx' in value) || value['serializedTx'] === undefined) return false;
|
|
41
|
-
if (!('elapsedTime' in value) || value['elapsedTime'] === undefined) return false;
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function SwapReplyFromJSON(json: any): SwapReply {
|
|
46
|
-
return SwapReplyFromJSONTyped(json, false);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function SwapReplyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapReply {
|
|
50
|
-
if (json == null) {
|
|
51
|
-
return json;
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
|
|
55
|
-
'serializedTx': json['serializedTx'],
|
|
56
|
-
'elapsedTime': json['elapsedTime'],
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function SwapReplyToJSON(json: any): SwapReply {
|
|
61
|
-
return SwapReplyToJSONTyped(json, false);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function SwapReplyToJSONTyped(value?: SwapReply | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
-
if (value == null) {
|
|
66
|
-
return value;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
|
|
71
|
-
'serializedTx': value['serializedTx'],
|
|
72
|
-
'elapsedTime': value['elapsedTime'],
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Dex Aggregator API
|
|
5
|
-
* Dex Aggregator API ⚡️
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0
|
|
8
|
-
* Contact: ai@sx.ai
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface SwapRouteInput
|
|
20
|
-
*/
|
|
21
|
-
export interface SwapRouteInput {
|
|
22
|
-
/**
|
|
23
|
-
* DTO.DEX.IDENTIFIER
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof SwapRouteInput
|
|
26
|
-
*/
|
|
27
|
-
dex: SwapRouteInputDexEnum;
|
|
28
|
-
/**
|
|
29
|
-
* DTO.DEX.WALLET
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof SwapRouteInput
|
|
32
|
-
*/
|
|
33
|
-
userAddress: string;
|
|
34
|
-
/**
|
|
35
|
-
* DTO.DEX.BASE.PRIORITY_FEE
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof SwapRouteInput
|
|
38
|
-
*/
|
|
39
|
-
priorityFee?: string;
|
|
40
|
-
/**
|
|
41
|
-
* DTO.DEX.SWAP.AMOUNT
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof SwapRouteInput
|
|
44
|
-
*/
|
|
45
|
-
amount: string;
|
|
46
|
-
/**
|
|
47
|
-
* DTO.DEX.SWAP.MODE
|
|
48
|
-
* @type {string}
|
|
49
|
-
* @memberof SwapRouteInput
|
|
50
|
-
*/
|
|
51
|
-
swapMode: SwapRouteInputSwapModeEnum;
|
|
52
|
-
/**
|
|
53
|
-
* DTO.DEX.SWAP.SLIPPAGE
|
|
54
|
-
* @type {number}
|
|
55
|
-
* @memberof SwapRouteInput
|
|
56
|
-
*/
|
|
57
|
-
slippage: number;
|
|
58
|
-
/**
|
|
59
|
-
* DTO.DEX.SWAP.INPUT_MINT
|
|
60
|
-
* @type {string}
|
|
61
|
-
* @memberof SwapRouteInput
|
|
62
|
-
*/
|
|
63
|
-
inputMint?: string;
|
|
64
|
-
/**
|
|
65
|
-
* DTO.DEX.SWAP.OUTPUT_MINT
|
|
66
|
-
* @type {string}
|
|
67
|
-
* @memberof SwapRouteInput
|
|
68
|
-
*/
|
|
69
|
-
outputMint?: string;
|
|
70
|
-
/**
|
|
71
|
-
* DTO.DEX.SWAP.RECIPIENT_ADDRESS
|
|
72
|
-
* @type {string}
|
|
73
|
-
* @memberof SwapRouteInput
|
|
74
|
-
*/
|
|
75
|
-
recipientAddress?: string;
|
|
76
|
-
/**
|
|
77
|
-
* DTO.DEX.SWAP.PERMIT
|
|
78
|
-
* @type {string}
|
|
79
|
-
* @memberof SwapRouteInput
|
|
80
|
-
*/
|
|
81
|
-
permit?: string;
|
|
82
|
-
/**
|
|
83
|
-
* DTO.DEX.SWAP.DEADLINE
|
|
84
|
-
* @type {number}
|
|
85
|
-
* @memberof SwapRouteInput
|
|
86
|
-
*/
|
|
87
|
-
deadline?: number;
|
|
88
|
-
/**
|
|
89
|
-
* DTO.DEX.BASE.TIP_FEE
|
|
90
|
-
* @type {string}
|
|
91
|
-
* @memberof SwapRouteInput
|
|
92
|
-
*/
|
|
93
|
-
tipFee?: string;
|
|
94
|
-
/**
|
|
95
|
-
* DTO.DEX.BASE.IS_ANTI_MEV
|
|
96
|
-
* @type {boolean}
|
|
97
|
-
* @memberof SwapRouteInput
|
|
98
|
-
*/
|
|
99
|
-
isAntiMev?: boolean;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @export
|
|
105
|
-
*/
|
|
106
|
-
export const SwapRouteInputDexEnum = {
|
|
107
|
-
Jupiter: 'jupiter',
|
|
108
|
-
Kyberswap: 'kyberswap'
|
|
109
|
-
} as const;
|
|
110
|
-
export type SwapRouteInputDexEnum = typeof SwapRouteInputDexEnum[keyof typeof SwapRouteInputDexEnum];
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* @export
|
|
114
|
-
*/
|
|
115
|
-
export const SwapRouteInputSwapModeEnum = {
|
|
116
|
-
ExactIn: 'ExactIn',
|
|
117
|
-
ExactOut: 'ExactOut'
|
|
118
|
-
} as const;
|
|
119
|
-
export type SwapRouteInputSwapModeEnum = typeof SwapRouteInputSwapModeEnum[keyof typeof SwapRouteInputSwapModeEnum];
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Check if a given object implements the SwapRouteInput interface.
|
|
124
|
-
*/
|
|
125
|
-
export function instanceOfSwapRouteInput(value: object): value is SwapRouteInput {
|
|
126
|
-
if (!('dex' in value) || value['dex'] === undefined) return false;
|
|
127
|
-
if (!('userAddress' in value) || value['userAddress'] === undefined) return false;
|
|
128
|
-
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
129
|
-
if (!('swapMode' in value) || value['swapMode'] === undefined) return false;
|
|
130
|
-
if (!('slippage' in value) || value['slippage'] === undefined) return false;
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export function SwapRouteInputFromJSON(json: any): SwapRouteInput {
|
|
135
|
-
return SwapRouteInputFromJSONTyped(json, false);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export function SwapRouteInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapRouteInput {
|
|
139
|
-
if (json == null) {
|
|
140
|
-
return json;
|
|
141
|
-
}
|
|
142
|
-
return {
|
|
143
|
-
|
|
144
|
-
'dex': json['dex'],
|
|
145
|
-
'userAddress': json['userAddress'],
|
|
146
|
-
'priorityFee': json['priorityFee'] == null ? undefined : json['priorityFee'],
|
|
147
|
-
'amount': json['amount'],
|
|
148
|
-
'swapMode': json['swapMode'],
|
|
149
|
-
'slippage': json['slippage'],
|
|
150
|
-
'inputMint': json['inputMint'] == null ? undefined : json['inputMint'],
|
|
151
|
-
'outputMint': json['outputMint'] == null ? undefined : json['outputMint'],
|
|
152
|
-
'recipientAddress': json['recipientAddress'] == null ? undefined : json['recipientAddress'],
|
|
153
|
-
'permit': json['permit'] == null ? undefined : json['permit'],
|
|
154
|
-
'deadline': json['deadline'] == null ? undefined : json['deadline'],
|
|
155
|
-
'tipFee': json['tipFee'] == null ? undefined : json['tipFee'],
|
|
156
|
-
'isAntiMev': json['isAntiMev'] == null ? undefined : json['isAntiMev'],
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export function SwapRouteInputToJSON(json: any): SwapRouteInput {
|
|
161
|
-
return SwapRouteInputToJSONTyped(json, false);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export function SwapRouteInputToJSONTyped(value?: SwapRouteInput | null, ignoreDiscriminator: boolean = false): any {
|
|
165
|
-
if (value == null) {
|
|
166
|
-
return value;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
|
|
171
|
-
'dex': value['dex'],
|
|
172
|
-
'userAddress': value['userAddress'],
|
|
173
|
-
'priorityFee': value['priorityFee'],
|
|
174
|
-
'amount': value['amount'],
|
|
175
|
-
'swapMode': value['swapMode'],
|
|
176
|
-
'slippage': value['slippage'],
|
|
177
|
-
'inputMint': value['inputMint'],
|
|
178
|
-
'outputMint': value['outputMint'],
|
|
179
|
-
'recipientAddress': value['recipientAddress'],
|
|
180
|
-
'permit': value['permit'],
|
|
181
|
-
'deadline': value['deadline'],
|
|
182
|
-
'tipFee': value['tipFee'],
|
|
183
|
-
'isAntiMev': value['isAntiMev'],
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Dex Aggregator API
|
|
5
|
-
* Dex Aggregator API ⚡️
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0
|
|
8
|
-
* Contact: ai@sx.ai
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
import type { SwapRouteInput } from './SwapRouteInput';
|
|
17
|
-
import {
|
|
18
|
-
SwapRouteInputFromJSON,
|
|
19
|
-
SwapRouteInputFromJSONTyped,
|
|
20
|
-
SwapRouteInputToJSON,
|
|
21
|
-
SwapRouteInputToJSONTyped,
|
|
22
|
-
} from './SwapRouteInput';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
* @interface SwapRouteResponse
|
|
28
|
-
*/
|
|
29
|
-
export interface SwapRouteResponse {
|
|
30
|
-
/**
|
|
31
|
-
* DTO.DEX.SWAP.ARGS
|
|
32
|
-
* @type {SwapRouteInput}
|
|
33
|
-
* @memberof SwapRouteResponse
|
|
34
|
-
*/
|
|
35
|
-
args: SwapRouteInput;
|
|
36
|
-
/**
|
|
37
|
-
* DTO.DEX.SWAP.SERIALIZED_TX
|
|
38
|
-
* @type {string}
|
|
39
|
-
* @memberof SwapRouteResponse
|
|
40
|
-
*/
|
|
41
|
-
serializedTx: string;
|
|
42
|
-
/**
|
|
43
|
-
* DTO.DEX.SWAP.ROUTE_INFO
|
|
44
|
-
* @type {object}
|
|
45
|
-
* @memberof SwapRouteResponse
|
|
46
|
-
*/
|
|
47
|
-
routeInfo: object;
|
|
48
|
-
/**
|
|
49
|
-
* DTO.DEX.SWAP.ELAPSED_TIME
|
|
50
|
-
* @type {number}
|
|
51
|
-
* @memberof SwapRouteResponse
|
|
52
|
-
*/
|
|
53
|
-
elapsedTime: number;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Check if a given object implements the SwapRouteResponse interface.
|
|
58
|
-
*/
|
|
59
|
-
export function instanceOfSwapRouteResponse(value: object): value is SwapRouteResponse {
|
|
60
|
-
if (!('args' in value) || value['args'] === undefined) return false;
|
|
61
|
-
if (!('serializedTx' in value) || value['serializedTx'] === undefined) return false;
|
|
62
|
-
if (!('routeInfo' in value) || value['routeInfo'] === undefined) return false;
|
|
63
|
-
if (!('elapsedTime' in value) || value['elapsedTime'] === undefined) return false;
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function SwapRouteResponseFromJSON(json: any): SwapRouteResponse {
|
|
68
|
-
return SwapRouteResponseFromJSONTyped(json, false);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function SwapRouteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwapRouteResponse {
|
|
72
|
-
if (json == null) {
|
|
73
|
-
return json;
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
|
|
77
|
-
'args': SwapRouteInputFromJSON(json['args']),
|
|
78
|
-
'serializedTx': json['serializedTx'],
|
|
79
|
-
'routeInfo': json['routeInfo'],
|
|
80
|
-
'elapsedTime': json['elapsedTime'],
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function SwapRouteResponseToJSON(json: any): SwapRouteResponse {
|
|
85
|
-
return SwapRouteResponseToJSONTyped(json, false);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function SwapRouteResponseToJSONTyped(value?: SwapRouteResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
-
if (value == null) {
|
|
90
|
-
return value;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
|
|
95
|
-
'args': SwapRouteInputToJSON(value['args']),
|
|
96
|
-
'serializedTx': value['serializedTx'],
|
|
97
|
-
'routeInfo': value['routeInfo'],
|
|
98
|
-
'elapsedTime': value['elapsedTime'],
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|