@covalenthq/client-sdk 0.2.7 → 0.2.8
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 +10 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +2 -4
- package/dist/services/BaseService.js +3 -4
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/Client.d.ts +2 -2
- package/dist/services/Client.js +1 -1
- package/dist/services/NftService.d.ts +3 -3
- package/dist/services/NftService.js +2 -2
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/XykService.d.ts +126 -29
- package/dist/services/XykService.js +186 -17
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +259 -0
- package/dist/util/types/BalanceServiceTypes.js +3 -0
- package/dist/util/types/BalanceServiceTypes.js.map +1 -0
- package/dist/util/types/BaseServiceTypes.d.ts +172 -0
- package/dist/util/types/BaseServiceTypes.js +3 -0
- package/dist/util/types/BaseServiceTypes.js.map +1 -0
- package/dist/util/types/GenericTypes.d.ts +75 -0
- package/dist/util/types/GenericTypes.js +3 -0
- package/dist/util/types/GenericTypes.js.map +1 -0
- package/dist/util/types/NftServiceTypes.d.ts +213 -0
- package/dist/util/types/NftServiceTypes.js +3 -0
- package/dist/util/types/NftServiceTypes.js.map +1 -0
- package/dist/util/types/PricingServiceTypes.d.ts +44 -0
- package/dist/util/types/PricingServiceTypes.js +3 -0
- package/dist/util/types/PricingServiceTypes.js.map +1 -0
- package/dist/util/types/SecurityServiceTypes.d.ts +70 -0
- package/dist/util/types/SecurityServiceTypes.js +3 -0
- package/dist/util/types/SecurityServiceTypes.js.map +1 -0
- package/dist/util/types/TransactionServiceTypes.d.ts +314 -0
- package/dist/util/types/TransactionServiceTypes.js +3 -0
- package/dist/util/types/TransactionServiceTypes.js.map +1 -0
- package/dist/util/types/XykServiceTypes.d.ts +465 -0
- package/dist/util/types/XykServiceTypes.js +3 -0
- package/dist/util/types/XykServiceTypes.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import { Pagination } from "./GenericTypes";
|
|
2
|
+
export interface PoolResponse {
|
|
3
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
4
|
+
updated_at: Date;
|
|
5
|
+
/** * The requested chain ID eg: `1`. */
|
|
6
|
+
chain_id: number;
|
|
7
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
8
|
+
chain_name: string;
|
|
9
|
+
/** * List of response items. */
|
|
10
|
+
items: Pool[];
|
|
11
|
+
/** * Pagination metadata. */
|
|
12
|
+
pagination: Pagination;
|
|
13
|
+
}
|
|
14
|
+
export interface Pool {
|
|
15
|
+
/** * The pair address. */
|
|
16
|
+
exchange: string;
|
|
17
|
+
swap_count_24h: string;
|
|
18
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
19
|
+
total_liquidity_quote: string;
|
|
20
|
+
volume_24h_quote: string;
|
|
21
|
+
fee_24h_quote: string;
|
|
22
|
+
/** * Total supply of this pool token. */
|
|
23
|
+
total_supply: bigint | null;
|
|
24
|
+
/** * The exchange rate for the requested quote currency. */
|
|
25
|
+
quote_rate: string;
|
|
26
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
27
|
+
chain_name: string;
|
|
28
|
+
/** * The requested chain ID eg: `1`. */
|
|
29
|
+
chain_id: string;
|
|
30
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
31
|
+
dex_name: string;
|
|
32
|
+
volume_7d_quote: string;
|
|
33
|
+
annualized_fee: string;
|
|
34
|
+
token_0: Token;
|
|
35
|
+
token_1: Token;
|
|
36
|
+
}
|
|
37
|
+
export interface Token {
|
|
38
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
39
|
+
contract_address: string;
|
|
40
|
+
/** * The string returned by the `name()` method. */
|
|
41
|
+
contract_name: string;
|
|
42
|
+
volume_in_24h: string;
|
|
43
|
+
volume_out_24h: string;
|
|
44
|
+
/** * The exchange rate for the requested quote currency. */
|
|
45
|
+
quote_rate: string;
|
|
46
|
+
reserve: string;
|
|
47
|
+
/** * The contract logo URL. */
|
|
48
|
+
logo_url: string;
|
|
49
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
50
|
+
contract_ticker_symbol: string;
|
|
51
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
52
|
+
contract_decimals: string;
|
|
53
|
+
volume_in_7d: string;
|
|
54
|
+
volume_out_7d: string;
|
|
55
|
+
}
|
|
56
|
+
export interface PoolToDexResponse {
|
|
57
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
58
|
+
updated_at: Date;
|
|
59
|
+
/** * The requested address. */
|
|
60
|
+
address: string;
|
|
61
|
+
/** * The requested chain ID eg: `1`. */
|
|
62
|
+
chain_id: number;
|
|
63
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
64
|
+
chain_name: string;
|
|
65
|
+
/** * List of response items. */
|
|
66
|
+
items: PoolToDexItem[];
|
|
67
|
+
}
|
|
68
|
+
export interface SupportedDex {
|
|
69
|
+
/** * The requested chain ID eg: `1`. */
|
|
70
|
+
chain_id: string;
|
|
71
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
72
|
+
chain_name: string;
|
|
73
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
74
|
+
dex_name: string;
|
|
75
|
+
factory_contract_address: string;
|
|
76
|
+
router_contract_addresses: string;
|
|
77
|
+
swap_fee: number;
|
|
78
|
+
}
|
|
79
|
+
export interface PoolToDexItem extends SupportedDex {
|
|
80
|
+
/** * The dex logo URL */
|
|
81
|
+
logo_url: string;
|
|
82
|
+
}
|
|
83
|
+
export interface PoolByAddressResponse {
|
|
84
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
85
|
+
updated_at: Date;
|
|
86
|
+
/** * The requested chain ID eg: `1`. */
|
|
87
|
+
chain_id: number;
|
|
88
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
89
|
+
chain_name: string;
|
|
90
|
+
/** * List of response items. */
|
|
91
|
+
items: PoolWithTimeseries[];
|
|
92
|
+
/** * Pagination metadata. */
|
|
93
|
+
pagination: Pagination;
|
|
94
|
+
}
|
|
95
|
+
export interface PoolWithTimeseries {
|
|
96
|
+
/** * The pair address. */
|
|
97
|
+
exchange: string;
|
|
98
|
+
swap_count_24h: string;
|
|
99
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
100
|
+
total_liquidity_quote: string;
|
|
101
|
+
volume_24h_quote: string;
|
|
102
|
+
fee_24h_quote: string;
|
|
103
|
+
/** * Total supply of this pool token. */
|
|
104
|
+
total_supply: bigint | null;
|
|
105
|
+
/** * The exchange rate for the requested quote currency. */
|
|
106
|
+
quote_rate: string;
|
|
107
|
+
/** * The requested chain ID eg: `1`. */
|
|
108
|
+
chain_id: string;
|
|
109
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
110
|
+
dex_name: string;
|
|
111
|
+
volume_7d_quote: string;
|
|
112
|
+
annualized_fee: string;
|
|
113
|
+
token_0: Token;
|
|
114
|
+
token_1: Token;
|
|
115
|
+
token_0_reserve_quote: string;
|
|
116
|
+
token_1_reserve_quote: string;
|
|
117
|
+
volume_timeseries_7d: VolumeTimeseries[];
|
|
118
|
+
volume_timeseries_30d: VolumeTimeseries[];
|
|
119
|
+
liquidity_timeseries_7d: LiquidityTimeseries[];
|
|
120
|
+
liquidity_timeseries_30d: LiquidityTimeseries[];
|
|
121
|
+
price_timeseries_7d: PriceTimeseries[];
|
|
122
|
+
price_timeseries_30d: PriceTimeseries[];
|
|
123
|
+
}
|
|
124
|
+
export interface VolumeTimeseries {
|
|
125
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
126
|
+
dex_name: string;
|
|
127
|
+
/** * The requested chain ID eg: `1`. */
|
|
128
|
+
chain_id: string;
|
|
129
|
+
dt: string;
|
|
130
|
+
/** * The pair address. */
|
|
131
|
+
exchange: string;
|
|
132
|
+
sum_amount_0_in: string;
|
|
133
|
+
sum_amount_0_out: string;
|
|
134
|
+
sum_amount_1_in: string;
|
|
135
|
+
sum_amount_1_out: string;
|
|
136
|
+
volume_quote: string;
|
|
137
|
+
token_0_quote_rate: string;
|
|
138
|
+
token_1_quote_rate: string;
|
|
139
|
+
swap_count_24: string;
|
|
140
|
+
}
|
|
141
|
+
export interface LiquidityTimeseries {
|
|
142
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
143
|
+
dex_name: string;
|
|
144
|
+
/** * The requested chain ID eg: `1`. */
|
|
145
|
+
chain_id: string;
|
|
146
|
+
dt: string;
|
|
147
|
+
/** * The pair address. */
|
|
148
|
+
exchange: string;
|
|
149
|
+
r0_c: string;
|
|
150
|
+
r1_c: string;
|
|
151
|
+
liquidity_quote: string;
|
|
152
|
+
token_0_quote_rate: string;
|
|
153
|
+
token_1_quote_rate: string;
|
|
154
|
+
}
|
|
155
|
+
export interface PriceTimeseries {
|
|
156
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
157
|
+
dex_name: string;
|
|
158
|
+
/** * The requested chain ID eg: `1`. */
|
|
159
|
+
chain_id: string;
|
|
160
|
+
dt: string;
|
|
161
|
+
/** * The pair address. */
|
|
162
|
+
exchange: string;
|
|
163
|
+
price_of_token_0_in_token_1: string;
|
|
164
|
+
price_of_token_0_in_token_1_description: string;
|
|
165
|
+
price_of_token_1_in_token_0: string;
|
|
166
|
+
price_of_token_1_in_token_0_description: string;
|
|
167
|
+
/** * The requested quote currency eg: `USD`. */
|
|
168
|
+
quote_currency: string;
|
|
169
|
+
price_of_token_0_in_quote_currency: string;
|
|
170
|
+
price_of_token_1_in_quote_currency: string;
|
|
171
|
+
}
|
|
172
|
+
export interface PoolsDexDataResponse {
|
|
173
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
174
|
+
updated_at: Date;
|
|
175
|
+
/** * The requested address. */
|
|
176
|
+
address: string;
|
|
177
|
+
/** * The requested chain ID eg: `1`. */
|
|
178
|
+
chain_id: number;
|
|
179
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
180
|
+
chain_name: string;
|
|
181
|
+
/** * The requested quote currency eg: `USD`. */
|
|
182
|
+
quote_currency: string;
|
|
183
|
+
/** * List of response items. */
|
|
184
|
+
items: PoolsDexDataItem[];
|
|
185
|
+
/** * Pagination metadata. */
|
|
186
|
+
pagination: Pagination;
|
|
187
|
+
}
|
|
188
|
+
export interface PoolsDexDataItem {
|
|
189
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
190
|
+
dex_name: string;
|
|
191
|
+
/** * The pair address. */
|
|
192
|
+
exchange: string;
|
|
193
|
+
/** * The combined ticker symbol of token0 and token1 separated with a hypen. */
|
|
194
|
+
exchange_ticker_symbol: string;
|
|
195
|
+
/** * The dex logo URL for the pair address. */
|
|
196
|
+
exchange_logo_url: string;
|
|
197
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
198
|
+
total_liquidity_quote: number;
|
|
199
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
200
|
+
pretty_total_liquidity_quote: string;
|
|
201
|
+
/** * Token0's contract metadata and reserve data. */
|
|
202
|
+
token_0: PoolsDexToken;
|
|
203
|
+
/** * Token1's contract metadata and reserve data. */
|
|
204
|
+
token_1: PoolsDexToken;
|
|
205
|
+
}
|
|
206
|
+
export interface PoolsDexToken {
|
|
207
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
208
|
+
contract_decimals: number;
|
|
209
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
210
|
+
contract_ticker_symbol: string;
|
|
211
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
212
|
+
contract_address: string;
|
|
213
|
+
/** * The contract logo URL. */
|
|
214
|
+
logo_url: string;
|
|
215
|
+
/** * The reserves for the token. */
|
|
216
|
+
reserve: string;
|
|
217
|
+
/** * The exchange rate for the requested quote currency. */
|
|
218
|
+
quote_rate: number;
|
|
219
|
+
}
|
|
220
|
+
export interface AddressExchangeBalancesResponse {
|
|
221
|
+
/** * The requested address. */
|
|
222
|
+
address: string;
|
|
223
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
224
|
+
updated_at: Date;
|
|
225
|
+
/** * The requested chain ID eg: `1`. */
|
|
226
|
+
chain_id: number;
|
|
227
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
228
|
+
chain_name: string;
|
|
229
|
+
/** * List of response items. */
|
|
230
|
+
items: UniswapLikeBalanceItem[];
|
|
231
|
+
}
|
|
232
|
+
export interface UniswapLikeBalanceItem {
|
|
233
|
+
token_0: UniswapLikeToken;
|
|
234
|
+
token_1: UniswapLikeToken;
|
|
235
|
+
pool_token: UniswapLikeTokenWithSupply;
|
|
236
|
+
}
|
|
237
|
+
export interface UniswapLikeToken {
|
|
238
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
239
|
+
contract_decimals: number;
|
|
240
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
241
|
+
contract_ticker_symbol: string;
|
|
242
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
243
|
+
contract_address: string;
|
|
244
|
+
/** * The contract logo URL. */
|
|
245
|
+
logo_url: string;
|
|
246
|
+
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
247
|
+
balance: bigint | null;
|
|
248
|
+
quote: number;
|
|
249
|
+
/** * The exchange rate for the requested quote currency. */
|
|
250
|
+
quote_rate: number;
|
|
251
|
+
}
|
|
252
|
+
export interface UniswapLikeTokenWithSupply {
|
|
253
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
254
|
+
contract_decimals: number;
|
|
255
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
256
|
+
contract_ticker_symbol: string;
|
|
257
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
258
|
+
contract_address: string;
|
|
259
|
+
/** * The contract logo URL. */
|
|
260
|
+
logo_url: string;
|
|
261
|
+
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
262
|
+
balance: bigint | null;
|
|
263
|
+
quote: number;
|
|
264
|
+
/** * The exchange rate for the requested quote currency. */
|
|
265
|
+
quote_rate: number;
|
|
266
|
+
/** * Total supply of this pool token. */
|
|
267
|
+
total_supply: bigint | null;
|
|
268
|
+
}
|
|
269
|
+
export interface NetworkExchangeTokensResponse {
|
|
270
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
271
|
+
updated_at: Date;
|
|
272
|
+
/** * The requested chain ID eg: `1`. */
|
|
273
|
+
chain_id: number;
|
|
274
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
275
|
+
chain_name: string;
|
|
276
|
+
/** * List of response items. */
|
|
277
|
+
items: TokenV2Volume[];
|
|
278
|
+
/** * Pagination metadata. */
|
|
279
|
+
pagination: Pagination;
|
|
280
|
+
}
|
|
281
|
+
export interface TokenV2Volume {
|
|
282
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
283
|
+
chain_name: string;
|
|
284
|
+
/** * The requested chain ID eg: `1`. */
|
|
285
|
+
chain_id: string;
|
|
286
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
287
|
+
dex_name: string;
|
|
288
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
289
|
+
contract_address: string;
|
|
290
|
+
/** * The string returned by the `name()` method. */
|
|
291
|
+
contract_name: string;
|
|
292
|
+
total_liquidity: number;
|
|
293
|
+
total_volume24h: number;
|
|
294
|
+
/** * The contract logo URL. */
|
|
295
|
+
logo_url: string;
|
|
296
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
297
|
+
contract_ticker_symbol: string;
|
|
298
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
299
|
+
contract_decimals: number;
|
|
300
|
+
swap_count_24h: number;
|
|
301
|
+
/** * The exchange rate for the requested quote currency. */
|
|
302
|
+
quote_rate: number;
|
|
303
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
304
|
+
total_liquidity_quote: number;
|
|
305
|
+
total_volume_24h_quote: number;
|
|
306
|
+
}
|
|
307
|
+
export interface SupportedDexesResponse {
|
|
308
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
309
|
+
updated_at: Date;
|
|
310
|
+
/** * List of response items. */
|
|
311
|
+
items: SupportedDex[];
|
|
312
|
+
/** * Pagination metadata. */
|
|
313
|
+
pagination: Pagination;
|
|
314
|
+
}
|
|
315
|
+
export interface SingleNetworkExchangeTokenResponse {
|
|
316
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
317
|
+
updated_at: Date;
|
|
318
|
+
/** * The requested chain ID eg: `1`. */
|
|
319
|
+
chain_id: number;
|
|
320
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
321
|
+
chain_name: string;
|
|
322
|
+
/** * List of response items. */
|
|
323
|
+
items: PoolWithTimeseries[];
|
|
324
|
+
/** * Pagination metadata. */
|
|
325
|
+
pagination: Pagination;
|
|
326
|
+
}
|
|
327
|
+
export interface TransactionsForAccountAddressResponse {
|
|
328
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
329
|
+
updated_at: Date;
|
|
330
|
+
/** * The requested chain ID eg: `1`. */
|
|
331
|
+
chain_id: number;
|
|
332
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
333
|
+
chain_name: string;
|
|
334
|
+
/** * List of response items. */
|
|
335
|
+
items: ExchangeTransaction[];
|
|
336
|
+
/** * Pagination metadata. */
|
|
337
|
+
pagination: Pagination;
|
|
338
|
+
}
|
|
339
|
+
export interface ExchangeTransaction {
|
|
340
|
+
/** * The block signed timestamp in UTC. */
|
|
341
|
+
block_signed_at: Date;
|
|
342
|
+
/** * The requested transaction hash. */
|
|
343
|
+
tx_hash: string;
|
|
344
|
+
act: string;
|
|
345
|
+
/** * The requested address. */
|
|
346
|
+
address: string;
|
|
347
|
+
amount0: number;
|
|
348
|
+
amount1: number;
|
|
349
|
+
amount0_in: number;
|
|
350
|
+
amount0_out: number;
|
|
351
|
+
amount1_out: number;
|
|
352
|
+
to_address: string;
|
|
353
|
+
from_address: string;
|
|
354
|
+
sender_address: string;
|
|
355
|
+
total_quote: number;
|
|
356
|
+
token_0: PoolToken;
|
|
357
|
+
token_1: PoolToken;
|
|
358
|
+
token_0_quote_rate: number;
|
|
359
|
+
token_1_quote_rate: number;
|
|
360
|
+
}
|
|
361
|
+
export interface PoolToken {
|
|
362
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
363
|
+
contract_decimals: number;
|
|
364
|
+
/** * The string returned by the `name()` method. */
|
|
365
|
+
contract_name: string;
|
|
366
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
367
|
+
contract_ticker_symbol: string;
|
|
368
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
369
|
+
contract_address: string;
|
|
370
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
371
|
+
supports_erc: boolean;
|
|
372
|
+
/** * The contract logo URL. */
|
|
373
|
+
logo_url: string;
|
|
374
|
+
}
|
|
375
|
+
export interface TransactionsForTokenAddressResponse {
|
|
376
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
377
|
+
updated_at: Date;
|
|
378
|
+
/** * The requested chain ID eg: `1`. */
|
|
379
|
+
chain_id: number;
|
|
380
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
381
|
+
chain_name: string;
|
|
382
|
+
/** * List of response items. */
|
|
383
|
+
items: ExchangeTransaction[];
|
|
384
|
+
/** * Pagination metadata. */
|
|
385
|
+
pagination: Pagination;
|
|
386
|
+
}
|
|
387
|
+
export interface TransactionsForExchangeResponse {
|
|
388
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
389
|
+
updated_at: Date;
|
|
390
|
+
/** * The requested chain ID eg: `1`. */
|
|
391
|
+
chain_id: number;
|
|
392
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
393
|
+
chain_name: string;
|
|
394
|
+
/** * List of response items. */
|
|
395
|
+
items: ExchangeTransaction[];
|
|
396
|
+
/** * Pagination metadata. */
|
|
397
|
+
pagination: Pagination;
|
|
398
|
+
}
|
|
399
|
+
export interface EcosystemChartDataResponse {
|
|
400
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
401
|
+
updated_at: Date;
|
|
402
|
+
/** * The requested chain ID eg: `1`. */
|
|
403
|
+
chain_id: number;
|
|
404
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
405
|
+
chain_name: string;
|
|
406
|
+
/** * List of response items. */
|
|
407
|
+
items: UniswapLikeEcosystemCharts[];
|
|
408
|
+
/** * Pagination metadata. */
|
|
409
|
+
pagination: Pagination;
|
|
410
|
+
}
|
|
411
|
+
export interface UniswapLikeEcosystemCharts {
|
|
412
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
413
|
+
dex_name: string;
|
|
414
|
+
/** * The requested chain ID eg: `1`. */
|
|
415
|
+
chain_id: string;
|
|
416
|
+
/** * The requested quote currency eg: `USD`. */
|
|
417
|
+
quote_currency: string;
|
|
418
|
+
gas_token_price_quote: number;
|
|
419
|
+
total_swaps24h: number;
|
|
420
|
+
total_active_pairs7d: number;
|
|
421
|
+
total_fees24h: number;
|
|
422
|
+
volume_chart7d: VolumeEcosystemChart[];
|
|
423
|
+
volume_chart30d: VolumeEcosystemChart[];
|
|
424
|
+
liquidity_chart7d: LiquidityEcosystemChart[];
|
|
425
|
+
liquidity_chart30d: LiquidityEcosystemChart[];
|
|
426
|
+
}
|
|
427
|
+
export interface VolumeEcosystemChart {
|
|
428
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
429
|
+
dex_name: string;
|
|
430
|
+
/** * The requested chain ID eg: `1`. */
|
|
431
|
+
chain_id: string;
|
|
432
|
+
dt: Date;
|
|
433
|
+
/** * The requested quote currency eg: `USD`. */
|
|
434
|
+
quote_currency: string;
|
|
435
|
+
volume_quote: number;
|
|
436
|
+
swap_count_24: number;
|
|
437
|
+
}
|
|
438
|
+
export interface LiquidityEcosystemChart {
|
|
439
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
440
|
+
dex_name: string;
|
|
441
|
+
/** * The requested chain ID eg: `1`. */
|
|
442
|
+
chain_id: string;
|
|
443
|
+
dt: Date;
|
|
444
|
+
/** * The requested quote currency eg: `USD`. */
|
|
445
|
+
quote_currency: string;
|
|
446
|
+
liquidity_quote: number;
|
|
447
|
+
}
|
|
448
|
+
export interface HealthDataResponse {
|
|
449
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
450
|
+
updated_at: Date;
|
|
451
|
+
/** * The requested chain ID eg: `1`. */
|
|
452
|
+
chain_id: number;
|
|
453
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
454
|
+
chain_name: string;
|
|
455
|
+
/** * List of response items. */
|
|
456
|
+
items: HealthData[];
|
|
457
|
+
/** * Pagination metadata. */
|
|
458
|
+
pagination: Pagination;
|
|
459
|
+
}
|
|
460
|
+
export interface HealthData {
|
|
461
|
+
synced_block_height: number;
|
|
462
|
+
synced_block_signed_at: Date;
|
|
463
|
+
latest_block_height: number;
|
|
464
|
+
latest_block_signed_at: Date;
|
|
465
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XykServiceTypes.js","sourceRoot":"","sources":["../../../src/util/types/XykServiceTypes.ts"],"names":[],"mappings":""}
|