@covalenthq/client-sdk 0.1.1 → 0.1.3
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 +171 -1
- package/dist/services/BalanceService.d.ts +390 -0
- package/dist/services/BalanceService.js +618 -0
- package/dist/services/BalanceService.js.map +1 -0
- package/dist/services/BaseService.d.ts +303 -0
- package/dist/services/BaseService.js +691 -0
- package/dist/services/BaseService.js.map +1 -0
- package/dist/services/Client.d.ts +22 -0
- package/dist/services/Client.js +26 -0
- package/dist/services/Client.js.map +1 -0
- package/dist/services/NftService.d.ts +428 -0
- package/dist/services/NftService.js +981 -0
- package/dist/services/NftService.js.map +1 -0
- package/dist/services/PricingService.d.ts +75 -0
- package/dist/services/PricingService.js +126 -0
- package/dist/services/PricingService.js.map +1 -0
- package/dist/services/SecurityService.d.ts +96 -0
- package/dist/services/SecurityService.js +122 -0
- package/dist/services/SecurityService.js.map +1 -0
- package/dist/services/TransactionService.d.ts +222 -0
- package/dist/services/TransactionService.js +433 -0
- package/dist/services/TransactionService.js.map +1 -0
- package/dist/services/XykService.d.ts +529 -0
- package/dist/services/XykService.js +1000 -0
- package/dist/services/XykService.js.map +1 -0
- package/dist/services/index.js.map +1 -0
- package/dist/util/ApiHelpers.d.ts +1 -0
- package/dist/util/ApiHelpers.js +15 -0
- package/dist/util/ApiHelpers.js.map +1 -0
- package/dist/util/backoff.d.ts +9 -0
- package/dist/util/backoff.js +25 -0
- package/dist/util/backoff.js.map +1 -0
- package/package.json +9 -1
- package/dist/ApprovalService.d.ts +0 -59
- package/dist/ApprovalService.js +0 -52
- package/dist/ApprovalService.js.map +0 -1
- package/dist/BalancesService.d.ts +0 -189
- package/dist/BalancesService.js +0 -231
- package/dist/BalancesService.js.map +0 -1
- package/dist/BaseService.d.ts +0 -169
- package/dist/BaseService.js +0 -276
- package/dist/BaseService.js.map +0 -1
- package/dist/Client.d.ts +0 -24
- package/dist/Client.js +0 -30
- package/dist/Client.js.map +0 -1
- package/dist/LogEventService.d.ts +0 -62
- package/dist/LogEventService.js +0 -75
- package/dist/LogEventService.js.map +0 -1
- package/dist/NameResolverService.d.ts +0 -33
- package/dist/NameResolverService.js +0 -52
- package/dist/NameResolverService.js.map +0 -1
- package/dist/NftService.d.ts +0 -271
- package/dist/NftService.js +0 -528
- package/dist/NftService.js.map +0 -1
- package/dist/PricingService.d.ts +0 -52
- package/dist/PricingService.js +0 -65
- package/dist/PricingService.js.map +0 -1
- package/dist/TransactionsService.d.ts +0 -126
- package/dist/TransactionsService.js +0 -230
- package/dist/TransactionsService.js.map +0 -1
- package/dist/XykService.d.ts +0 -383
- package/dist/XykService.js +0 -467
- package/dist/XykService.js.map +0 -1
- package/dist/index.js.map +0 -1
- /package/dist/{index.d.ts → services/index.d.ts} +0 -0
- /package/dist/{index.js → services/index.js} +0 -0
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
import { Chains } from "./Client";
|
|
2
|
+
declare class PoolResponse {
|
|
3
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
4
|
+
updated_at: string;
|
|
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
|
+
constructor(data: PoolResponse);
|
|
14
|
+
}
|
|
15
|
+
declare class Pool {
|
|
16
|
+
exchange: string;
|
|
17
|
+
swap_count_24h: string;
|
|
18
|
+
total_liquidity_quote: string;
|
|
19
|
+
volume_24h_quote: string;
|
|
20
|
+
fee_24h_quote: string;
|
|
21
|
+
/** * Total supply of this pool token. */
|
|
22
|
+
total_supply: bigint | null;
|
|
23
|
+
/** * The exchange rate for the requested quote currency. */
|
|
24
|
+
quote_rate: string;
|
|
25
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
26
|
+
chain_name: string;
|
|
27
|
+
/** * The requested chain ID eg: `1`. */
|
|
28
|
+
chain_id: string;
|
|
29
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
30
|
+
dex_name: string;
|
|
31
|
+
volume_7d_quote: string;
|
|
32
|
+
annualized_fee: string;
|
|
33
|
+
token_0: Token;
|
|
34
|
+
token_1: Token;
|
|
35
|
+
constructor(data: Pool);
|
|
36
|
+
}
|
|
37
|
+
declare class Pagination {
|
|
38
|
+
/** * True is there is another page. */
|
|
39
|
+
has_more: boolean;
|
|
40
|
+
/** * The requested page number. */
|
|
41
|
+
page_number: number;
|
|
42
|
+
/** * The requested number of items on the current page. */
|
|
43
|
+
page_size: number;
|
|
44
|
+
/** * The total number of items across all pages for this request. */
|
|
45
|
+
total_count: number;
|
|
46
|
+
constructor(data: Pagination);
|
|
47
|
+
}
|
|
48
|
+
declare class Token {
|
|
49
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
50
|
+
contract_address: string;
|
|
51
|
+
/** * The string returned by the `name()` method. */
|
|
52
|
+
contract_name: string;
|
|
53
|
+
volume_in_24h: string;
|
|
54
|
+
volume_out_24h: string;
|
|
55
|
+
/** * The exchange rate for the requested quote currency. */
|
|
56
|
+
quote_rate: string;
|
|
57
|
+
reserve: string;
|
|
58
|
+
/** * The contract logo URL. */
|
|
59
|
+
logo_url: string;
|
|
60
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
61
|
+
contract_ticker_symbol: string;
|
|
62
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
63
|
+
contract_decimals: string;
|
|
64
|
+
volume_in_7d: string;
|
|
65
|
+
volume_out_7d: string;
|
|
66
|
+
constructor(data: Token);
|
|
67
|
+
}
|
|
68
|
+
declare class PoolByAddressResponse {
|
|
69
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
70
|
+
updated_at: string;
|
|
71
|
+
/** * The requested chain ID eg: `1`. */
|
|
72
|
+
chain_id: number;
|
|
73
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
74
|
+
chain_name: string;
|
|
75
|
+
/** * List of response items. */
|
|
76
|
+
items: PoolWithTimeseries[];
|
|
77
|
+
/** * Pagination metadata. */
|
|
78
|
+
pagination: Pagination;
|
|
79
|
+
constructor(data: PoolByAddressResponse);
|
|
80
|
+
}
|
|
81
|
+
declare class PoolWithTimeseries {
|
|
82
|
+
exchange: string;
|
|
83
|
+
swap_count_24h: string;
|
|
84
|
+
total_liquidity_quote: string;
|
|
85
|
+
volume_24h_quote: string;
|
|
86
|
+
fee_24h_quote: string;
|
|
87
|
+
/** * Total supply of this pool token. */
|
|
88
|
+
total_supply: bigint | null;
|
|
89
|
+
/** * The exchange rate for the requested quote currency. */
|
|
90
|
+
quote_rate: string;
|
|
91
|
+
/** * The requested chain ID eg: `1`. */
|
|
92
|
+
chain_id: string;
|
|
93
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
94
|
+
dex_name: string;
|
|
95
|
+
volume_7d_quote: string;
|
|
96
|
+
annualized_fee: string;
|
|
97
|
+
token_0: Token;
|
|
98
|
+
token_1: Token;
|
|
99
|
+
token_0_reserve_quote: string;
|
|
100
|
+
token_1_reserve_quote: string;
|
|
101
|
+
volume_timeseries_7d: VolumeTimeseries[];
|
|
102
|
+
volume_timeseries_30d: VolumeTimeseries[];
|
|
103
|
+
liquidity_timeseries_7d: LiquidityTimeseries[];
|
|
104
|
+
liquidity_timeseries_30d: LiquidityTimeseries[];
|
|
105
|
+
price_timeseries_7d: PriceTimeseries[];
|
|
106
|
+
price_timeseries_30d: PriceTimeseries[];
|
|
107
|
+
constructor(data: PoolWithTimeseries);
|
|
108
|
+
}
|
|
109
|
+
declare class VolumeTimeseries {
|
|
110
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
111
|
+
dex_name: string;
|
|
112
|
+
/** * The requested chain ID eg: `1`. */
|
|
113
|
+
chain_id: string;
|
|
114
|
+
dt: string;
|
|
115
|
+
exchange: string;
|
|
116
|
+
sum_amount_0_in: string;
|
|
117
|
+
sum_amount_0_out: string;
|
|
118
|
+
sum_amount_1_in: string;
|
|
119
|
+
sum_amount_1_out: string;
|
|
120
|
+
volume_quote: string;
|
|
121
|
+
token_0_quote_rate: string;
|
|
122
|
+
token_1_quote_rate: string;
|
|
123
|
+
swap_count_24: string;
|
|
124
|
+
constructor(data: VolumeTimeseries);
|
|
125
|
+
}
|
|
126
|
+
declare class LiquidityTimeseries {
|
|
127
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
128
|
+
dex_name: string;
|
|
129
|
+
/** * The requested chain ID eg: `1`. */
|
|
130
|
+
chain_id: string;
|
|
131
|
+
dt: string;
|
|
132
|
+
exchange: string;
|
|
133
|
+
r0_c: string;
|
|
134
|
+
r1_c: string;
|
|
135
|
+
liquidity_quote: string;
|
|
136
|
+
token_0_quote_rate: string;
|
|
137
|
+
token_1_quote_rate: string;
|
|
138
|
+
constructor(data: LiquidityTimeseries);
|
|
139
|
+
}
|
|
140
|
+
declare class PriceTimeseries {
|
|
141
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
142
|
+
dex_name: string;
|
|
143
|
+
/** * The requested chain ID eg: `1`. */
|
|
144
|
+
chain_id: string;
|
|
145
|
+
dt: string;
|
|
146
|
+
exchange: string;
|
|
147
|
+
price_of_token_0_in_token_1: string;
|
|
148
|
+
price_of_token_0_in_token_1_description: string;
|
|
149
|
+
price_of_token_1_in_token_0: string;
|
|
150
|
+
price_of_token_1_in_token_0_description: string;
|
|
151
|
+
/** * The requested quote currency eg: `USD`. */
|
|
152
|
+
quote_currency: string;
|
|
153
|
+
price_of_token_0_in_quote_currency: string;
|
|
154
|
+
price_of_token_1_in_quote_currency: string;
|
|
155
|
+
constructor(data: PriceTimeseries);
|
|
156
|
+
}
|
|
157
|
+
declare class AddressExchangeBalancesResponse {
|
|
158
|
+
/** * The requested address. */
|
|
159
|
+
address: string;
|
|
160
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
161
|
+
updated_at: string;
|
|
162
|
+
/** * The requested chain ID eg: `1`. */
|
|
163
|
+
chain_id: number;
|
|
164
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
165
|
+
chain_name: string;
|
|
166
|
+
/** * List of response items. */
|
|
167
|
+
items: UniswapLikeBalanceItem[];
|
|
168
|
+
constructor(data: AddressExchangeBalancesResponse);
|
|
169
|
+
}
|
|
170
|
+
declare class UniswapLikeBalanceItem {
|
|
171
|
+
token_0: UniswapLikeToken;
|
|
172
|
+
token_1: UniswapLikeToken;
|
|
173
|
+
pool_token: UniswapLikeTokenWithSupply;
|
|
174
|
+
constructor(data: UniswapLikeBalanceItem);
|
|
175
|
+
}
|
|
176
|
+
declare class UniswapLikeToken {
|
|
177
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
178
|
+
contract_decimals: number;
|
|
179
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
180
|
+
contract_ticker_symbol: string;
|
|
181
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
182
|
+
contract_address: string;
|
|
183
|
+
/** * The contract logo URL. */
|
|
184
|
+
logo_url: string;
|
|
185
|
+
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
186
|
+
balance: bigint | null;
|
|
187
|
+
quote: number;
|
|
188
|
+
/** * The exchange rate for the requested quote currency. */
|
|
189
|
+
quote_rate: number;
|
|
190
|
+
constructor(data: UniswapLikeToken);
|
|
191
|
+
}
|
|
192
|
+
declare class UniswapLikeTokenWithSupply {
|
|
193
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
194
|
+
contract_decimals: number;
|
|
195
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
196
|
+
contract_ticker_symbol: string;
|
|
197
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
198
|
+
contract_address: string;
|
|
199
|
+
/** * The contract logo URL. */
|
|
200
|
+
logo_url: string;
|
|
201
|
+
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
202
|
+
balance: bigint | null;
|
|
203
|
+
quote: number;
|
|
204
|
+
/** * The exchange rate for the requested quote currency. */
|
|
205
|
+
quote_rate: number;
|
|
206
|
+
/** * Total supply of this pool token. */
|
|
207
|
+
total_supply: bigint | null;
|
|
208
|
+
constructor(data: UniswapLikeTokenWithSupply);
|
|
209
|
+
}
|
|
210
|
+
declare class NetworkExchangeTokensResponse {
|
|
211
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
212
|
+
updated_at: string;
|
|
213
|
+
/** * The requested chain ID eg: `1`. */
|
|
214
|
+
chain_id: number;
|
|
215
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
216
|
+
chain_name: string;
|
|
217
|
+
/** * List of response items. */
|
|
218
|
+
items: TokenV2Volume[];
|
|
219
|
+
/** * Pagination metadata. */
|
|
220
|
+
pagination: Pagination;
|
|
221
|
+
constructor(data: NetworkExchangeTokensResponse);
|
|
222
|
+
}
|
|
223
|
+
declare class TokenV2Volume {
|
|
224
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
225
|
+
chain_name: string;
|
|
226
|
+
/** * The requested chain ID eg: `1`. */
|
|
227
|
+
chain_id: string;
|
|
228
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
229
|
+
dex_name: string;
|
|
230
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
231
|
+
contract_address: string;
|
|
232
|
+
/** * The string returned by the `name()` method. */
|
|
233
|
+
contract_name: string;
|
|
234
|
+
total_liquidity: number;
|
|
235
|
+
total_volume24h: number;
|
|
236
|
+
/** * The contract logo URL. */
|
|
237
|
+
logo_url: string;
|
|
238
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
239
|
+
contract_ticker_symbol: string;
|
|
240
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
241
|
+
contract_decimals: number;
|
|
242
|
+
swap_count_24h: number;
|
|
243
|
+
/** * The exchange rate for the requested quote currency. */
|
|
244
|
+
quote_rate: number;
|
|
245
|
+
total_liquidity_quote: number;
|
|
246
|
+
total_volume_24h_quote: number;
|
|
247
|
+
constructor(data: TokenV2Volume);
|
|
248
|
+
}
|
|
249
|
+
declare class SupportedDexesResponse {
|
|
250
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
251
|
+
updated_at: string;
|
|
252
|
+
/** * List of response items. */
|
|
253
|
+
items: SupportedDex[];
|
|
254
|
+
/** * Pagination metadata. */
|
|
255
|
+
pagination: Pagination;
|
|
256
|
+
constructor(data: SupportedDexesResponse);
|
|
257
|
+
}
|
|
258
|
+
declare class SupportedDex {
|
|
259
|
+
/** * The requested chain ID eg: `1`. */
|
|
260
|
+
chain_id: string;
|
|
261
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
262
|
+
chain_name: string;
|
|
263
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
264
|
+
dex_name: string;
|
|
265
|
+
factory_contract_address: string;
|
|
266
|
+
router_contract_addresses: string;
|
|
267
|
+
swap_fee: number;
|
|
268
|
+
constructor(data: SupportedDex);
|
|
269
|
+
}
|
|
270
|
+
declare class SingleNetworkExchangeTokenResponse {
|
|
271
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
272
|
+
updated_at: string;
|
|
273
|
+
/** * The requested chain ID eg: `1`. */
|
|
274
|
+
chain_id: number;
|
|
275
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
276
|
+
chain_name: string;
|
|
277
|
+
/** * List of response items. */
|
|
278
|
+
items: PoolWithTimeseries[];
|
|
279
|
+
/** * Pagination metadata. */
|
|
280
|
+
pagination: Pagination;
|
|
281
|
+
constructor(data: SingleNetworkExchangeTokenResponse);
|
|
282
|
+
}
|
|
283
|
+
declare class TransactionsForAccountAddressResponse {
|
|
284
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
285
|
+
updated_at: string;
|
|
286
|
+
/** * The requested chain ID eg: `1`. */
|
|
287
|
+
chain_id: number;
|
|
288
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
289
|
+
chain_name: string;
|
|
290
|
+
/** * List of response items. */
|
|
291
|
+
items: ExchangeTransaction[];
|
|
292
|
+
/** * Pagination metadata. */
|
|
293
|
+
pagination: Pagination;
|
|
294
|
+
constructor(data: TransactionsForAccountAddressResponse);
|
|
295
|
+
}
|
|
296
|
+
declare class ExchangeTransaction {
|
|
297
|
+
/** * The block signed timestamp in UTC. */
|
|
298
|
+
block_signed_at: string;
|
|
299
|
+
/** * The requested transaction hash. */
|
|
300
|
+
tx_hash: string;
|
|
301
|
+
act: string;
|
|
302
|
+
/** * The requested address. */
|
|
303
|
+
address: string;
|
|
304
|
+
amount0: number;
|
|
305
|
+
amount1: number;
|
|
306
|
+
amount0_in: number;
|
|
307
|
+
amount0_out: number;
|
|
308
|
+
amount1_out: number;
|
|
309
|
+
to_address: string;
|
|
310
|
+
from_address: string;
|
|
311
|
+
sender_address: string;
|
|
312
|
+
total_quote: number;
|
|
313
|
+
token_0: PoolToken;
|
|
314
|
+
token_1: PoolToken;
|
|
315
|
+
token_0_quote_rate: number;
|
|
316
|
+
token_1_quote_rate: number;
|
|
317
|
+
constructor(data: ExchangeTransaction);
|
|
318
|
+
}
|
|
319
|
+
declare class PoolToken {
|
|
320
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
321
|
+
contract_decimals: number;
|
|
322
|
+
/** * The string returned by the `name()` method. */
|
|
323
|
+
contract_name: string;
|
|
324
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
325
|
+
contract_ticker_symbol: string;
|
|
326
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
327
|
+
contract_address: string;
|
|
328
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
329
|
+
supports_erc: boolean;
|
|
330
|
+
/** * The contract logo URL. */
|
|
331
|
+
logo_url: string;
|
|
332
|
+
constructor(data: PoolToken);
|
|
333
|
+
}
|
|
334
|
+
declare class TransactionsForTokenAddressResponse {
|
|
335
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
336
|
+
updated_at: string;
|
|
337
|
+
/** * The requested chain ID eg: `1`. */
|
|
338
|
+
chain_id: number;
|
|
339
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
340
|
+
chain_name: string;
|
|
341
|
+
/** * List of response items. */
|
|
342
|
+
items: ExchangeTransaction[];
|
|
343
|
+
/** * Pagination metadata. */
|
|
344
|
+
pagination: Pagination;
|
|
345
|
+
constructor(data: TransactionsForTokenAddressResponse);
|
|
346
|
+
}
|
|
347
|
+
declare class TransactionsForExchangeResponse {
|
|
348
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
349
|
+
updated_at: string;
|
|
350
|
+
/** * The requested chain ID eg: `1`. */
|
|
351
|
+
chain_id: number;
|
|
352
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
353
|
+
chain_name: string;
|
|
354
|
+
/** * List of response items. */
|
|
355
|
+
items: ExchangeTransaction[];
|
|
356
|
+
/** * Pagination metadata. */
|
|
357
|
+
pagination: Pagination;
|
|
358
|
+
constructor(data: TransactionsForExchangeResponse);
|
|
359
|
+
}
|
|
360
|
+
declare class EcosystemChartDataResponse {
|
|
361
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
362
|
+
updated_at: string;
|
|
363
|
+
/** * The requested chain ID eg: `1`. */
|
|
364
|
+
chain_id: number;
|
|
365
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
366
|
+
chain_name: string;
|
|
367
|
+
/** * List of response items. */
|
|
368
|
+
items: UniswapLikeEcosystemCharts[];
|
|
369
|
+
/** * Pagination metadata. */
|
|
370
|
+
pagination: Pagination;
|
|
371
|
+
constructor(data: EcosystemChartDataResponse);
|
|
372
|
+
}
|
|
373
|
+
declare class UniswapLikeEcosystemCharts {
|
|
374
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
375
|
+
dex_name: string;
|
|
376
|
+
/** * The requested chain ID eg: `1`. */
|
|
377
|
+
chain_id: string;
|
|
378
|
+
/** * The requested quote currency eg: `USD`. */
|
|
379
|
+
quote_currency: string;
|
|
380
|
+
gas_token_price_quote: number;
|
|
381
|
+
total_swaps24h: number;
|
|
382
|
+
total_active_pairs7d: number;
|
|
383
|
+
total_fees24h: number;
|
|
384
|
+
volume_chart7d: VolumeEcosystemChart[];
|
|
385
|
+
volume_chart30d: VolumeEcosystemChart[];
|
|
386
|
+
liquidity_chart7d: LiquidityEcosystemChart[];
|
|
387
|
+
liquidity_chart30d: LiquidityEcosystemChart[];
|
|
388
|
+
constructor(data: UniswapLikeEcosystemCharts);
|
|
389
|
+
}
|
|
390
|
+
declare class VolumeEcosystemChart {
|
|
391
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
392
|
+
dex_name: string;
|
|
393
|
+
/** * The requested chain ID eg: `1`. */
|
|
394
|
+
chain_id: string;
|
|
395
|
+
dt: string;
|
|
396
|
+
/** * The requested quote currency eg: `USD`. */
|
|
397
|
+
quote_currency: string;
|
|
398
|
+
volume_quote: number;
|
|
399
|
+
swap_count_24: number;
|
|
400
|
+
constructor(data: VolumeEcosystemChart);
|
|
401
|
+
}
|
|
402
|
+
declare class LiquidityEcosystemChart {
|
|
403
|
+
/** * The name of the DEX, eg: `uniswap`. */
|
|
404
|
+
dex_name: string;
|
|
405
|
+
/** * The requested chain ID eg: `1`. */
|
|
406
|
+
chain_id: string;
|
|
407
|
+
dt: string;
|
|
408
|
+
/** * The requested quote currency eg: `USD`. */
|
|
409
|
+
quote_currency: string;
|
|
410
|
+
liquidity_quote: number;
|
|
411
|
+
constructor(data: LiquidityEcosystemChart);
|
|
412
|
+
}
|
|
413
|
+
declare class HealthDataResponse {
|
|
414
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
415
|
+
updated_at: string;
|
|
416
|
+
/** * The requested chain ID eg: `1`. */
|
|
417
|
+
chain_id: number;
|
|
418
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
419
|
+
chain_name: string;
|
|
420
|
+
/** * List of response items. */
|
|
421
|
+
items: HealthData[];
|
|
422
|
+
/** * Pagination metadata. */
|
|
423
|
+
pagination: Pagination;
|
|
424
|
+
constructor(data: HealthDataResponse);
|
|
425
|
+
}
|
|
426
|
+
declare class HealthData {
|
|
427
|
+
synced_block_height: number;
|
|
428
|
+
synced_block_signed_at: string;
|
|
429
|
+
latest_block_height: number;
|
|
430
|
+
latest_block_signed_at: string;
|
|
431
|
+
constructor(data: HealthData);
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* XYK APIs
|
|
435
|
+
*
|
|
436
|
+
*/
|
|
437
|
+
export declare class Response<T> {
|
|
438
|
+
data: T;
|
|
439
|
+
error: boolean;
|
|
440
|
+
error_code: number;
|
|
441
|
+
error_message: string;
|
|
442
|
+
}
|
|
443
|
+
export declare class XykService {
|
|
444
|
+
private apiKey;
|
|
445
|
+
constructor(apiKey: string);
|
|
446
|
+
/**
|
|
447
|
+
*
|
|
448
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
449
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
450
|
+
*
|
|
451
|
+
*/
|
|
452
|
+
getPools(chainName: Chains, dexName: string): Promise<Response<PoolResponse>>;
|
|
453
|
+
/**
|
|
454
|
+
*
|
|
455
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
456
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
457
|
+
* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
458
|
+
*
|
|
459
|
+
*/
|
|
460
|
+
getPoolByAddress(chainName: Chains, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
|
|
461
|
+
/**
|
|
462
|
+
*
|
|
463
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
464
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
465
|
+
* @param {string} accountAddress - The account address.
|
|
466
|
+
*
|
|
467
|
+
*/
|
|
468
|
+
getAddressExchangeBalances(chainName: Chains, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
|
|
469
|
+
/**
|
|
470
|
+
*
|
|
471
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
472
|
+
* @param {string} dexName - The DEX name eg: `uniswap`.
|
|
473
|
+
*
|
|
474
|
+
*/
|
|
475
|
+
getNetworkExchangeTokens(chainName: Chains, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
|
|
476
|
+
/**
|
|
477
|
+
*
|
|
478
|
+
|
|
479
|
+
*
|
|
480
|
+
*/
|
|
481
|
+
getSupportedDEXes(): Promise<Response<SupportedDexesResponse>>;
|
|
482
|
+
/**
|
|
483
|
+
*
|
|
484
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
485
|
+
* @param {string} dexName - The DEX name eg: `uniswap`.
|
|
486
|
+
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
487
|
+
*
|
|
488
|
+
*/
|
|
489
|
+
getSingleNetworkExchangeToken(chainName: Chains, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
|
|
490
|
+
/**
|
|
491
|
+
*
|
|
492
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
493
|
+
* @param {string} dexName - The DEX name eg: `uniswap`.
|
|
494
|
+
* @param {string} accountAddress - The account address. Passing in an `ENS` or `RNS` resolves automatically.
|
|
495
|
+
*
|
|
496
|
+
*/
|
|
497
|
+
getTransactionsForAccountAddress(chainName: Chains, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
|
|
498
|
+
/**
|
|
499
|
+
*
|
|
500
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
501
|
+
* @param {string} dexName - The DEX name eg: `uniswap`.
|
|
502
|
+
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
503
|
+
*
|
|
504
|
+
*/
|
|
505
|
+
getTransactionsForTokenAddress(chainName: Chains, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
|
|
506
|
+
/**
|
|
507
|
+
*
|
|
508
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
509
|
+
* @param {string} dexName - The DEX name eg: `uniswap`.
|
|
510
|
+
* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
511
|
+
*
|
|
512
|
+
*/
|
|
513
|
+
getTransactionsForExchange(chainName: Chains, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
|
|
514
|
+
/**
|
|
515
|
+
*
|
|
516
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
517
|
+
* @param {string} dexName - The DEX name eg: `uniswap`.
|
|
518
|
+
*
|
|
519
|
+
*/
|
|
520
|
+
getEcosystemChartData(chainName: Chains, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
|
|
521
|
+
/**
|
|
522
|
+
*
|
|
523
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
524
|
+
* @param {string} dexName - The DEX name eg: `uniswap`.
|
|
525
|
+
*
|
|
526
|
+
*/
|
|
527
|
+
getHealthData(chainName: Chains, dexName: string): Promise<Response<HealthDataResponse>>;
|
|
528
|
+
}
|
|
529
|
+
export {};
|