@covalenthq/client-sdk 0.2.9 → 0.4.2
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 +64 -14
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.js +4619 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/services/BalanceService.d.ts +443 -0
- package/dist/cjs/services/BaseService.d.ts +357 -0
- package/dist/cjs/services/CovalentClient.d.ts +65 -0
- package/dist/cjs/services/NftService.d.ts +484 -0
- package/dist/cjs/services/PricingService.d.ts +88 -0
- package/dist/cjs/services/SecurityService.d.ts +96 -0
- package/dist/cjs/services/TransactionService.d.ts +440 -0
- package/dist/cjs/services/XykService.d.ts +682 -0
- package/dist/cjs/util/ApiHelpers.d.ts +5 -0
- package/dist/cjs/util/backoff.d.ts +11 -0
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +284 -0
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +180 -0
- package/dist/cjs/util/types/GenericTypes.d.ts +96 -0
- package/dist/cjs/util/types/NftServiceTypes.d.ts +221 -0
- package/dist/cjs/util/types/PricingServiceTypes.d.ts +31 -0
- package/dist/cjs/util/types/SecurityServiceTypes.d.ts +71 -0
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +312 -0
- package/dist/cjs/util/types/XykServiceTypes.d.ts +479 -0
- package/dist/es/index.d.ts +9 -0
- package/dist/es/index.js +4616 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/services/BalanceService.d.ts +443 -0
- package/dist/es/services/BaseService.d.ts +357 -0
- package/dist/es/services/CovalentClient.d.ts +65 -0
- package/dist/es/services/NftService.d.ts +484 -0
- package/dist/es/services/PricingService.d.ts +88 -0
- package/dist/es/services/SecurityService.d.ts +96 -0
- package/dist/es/services/TransactionService.d.ts +440 -0
- package/dist/es/services/XykService.d.ts +682 -0
- package/dist/es/util/ApiHelpers.d.ts +5 -0
- package/dist/es/util/backoff.d.ts +11 -0
- package/dist/es/util/types/BalanceServiceTypes.d.ts +284 -0
- package/dist/es/util/types/BaseServiceTypes.d.ts +180 -0
- package/dist/es/util/types/GenericTypes.d.ts +96 -0
- package/dist/es/util/types/NftServiceTypes.d.ts +221 -0
- package/dist/es/util/types/PricingServiceTypes.d.ts +31 -0
- package/dist/es/util/types/SecurityServiceTypes.d.ts +71 -0
- package/dist/es/util/types/TransactionServiceTypes.d.ts +312 -0
- package/dist/es/util/types/XykServiceTypes.d.ts +479 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.js +4616 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/services/BalanceService.d.ts +443 -0
- package/dist/esm/services/BaseService.d.ts +357 -0
- package/dist/esm/services/CovalentClient.d.ts +65 -0
- package/dist/esm/services/NftService.d.ts +484 -0
- package/dist/esm/services/PricingService.d.ts +88 -0
- package/dist/esm/services/SecurityService.d.ts +96 -0
- package/dist/esm/services/TransactionService.d.ts +440 -0
- package/dist/esm/services/XykService.d.ts +682 -0
- package/dist/esm/util/ApiHelpers.d.ts +5 -0
- package/dist/esm/util/backoff.d.ts +11 -0
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +284 -0
- package/dist/esm/util/types/BaseServiceTypes.d.ts +180 -0
- package/dist/esm/util/types/GenericTypes.d.ts +96 -0
- package/dist/esm/util/types/NftServiceTypes.d.ts +221 -0
- package/dist/esm/util/types/PricingServiceTypes.d.ts +31 -0
- package/dist/esm/util/types/SecurityServiceTypes.d.ts +71 -0
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +312 -0
- package/dist/esm/util/types/XykServiceTypes.d.ts +479 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -27
- package/dist/index.js.map +1 -1
- package/dist/services/BalanceService.d.ts +49 -11
- package/dist/services/BalanceService.js +110 -81
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +46 -10
- package/dist/services/BaseService.js +193 -145
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +65 -0
- package/dist/services/CovalentClient.js +44 -0
- package/dist/services/CovalentClient.js.map +1 -0
- package/dist/services/NftService.d.ts +52 -22
- package/dist/services/NftService.js +236 -235
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.d.ts +8 -3
- package/dist/services/PricingService.js +43 -37
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/SecurityService.d.ts +9 -3
- package/dist/services/SecurityService.js +38 -31
- package/dist/services/SecurityService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +41 -9
- package/dist/services/TransactionService.js +133 -100
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +81 -19
- package/dist/services/XykService.js +451 -278
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/ApiHelpers.d.ts +2 -1
- package/dist/util/ApiHelpers.js +57 -36
- package/dist/util/ApiHelpers.js.map +1 -1
- package/dist/util/backoff.d.ts +5 -3
- package/dist/util/backoff.js +35 -13
- package/dist/util/backoff.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +25 -0
- package/dist/util/types/BalanceServiceTypes.js +1 -2
- package/dist/util/types/BaseServiceTypes.d.ts +8 -0
- package/dist/util/types/BaseServiceTypes.js +1 -2
- package/dist/util/types/GenericTypes.d.ts +7 -0
- package/dist/util/types/GenericTypes.js +1 -2
- package/dist/util/types/NftServiceTypes.d.ts +10 -2
- package/dist/util/types/NftServiceTypes.js +1 -2
- package/dist/util/types/PricingServiceTypes.js +1 -2
- package/dist/util/types/SecurityServiceTypes.d.ts +1 -0
- package/dist/util/types/SecurityServiceTypes.js +1 -2
- package/dist/util/types/TransactionServiceTypes.d.ts +14 -2
- package/dist/util/types/TransactionServiceTypes.js +1 -2
- package/dist/util/types/XykServiceTypes.d.ts +20 -6
- package/dist/util/types/XykServiceTypes.js +1 -2
- package/package.json +19 -4
- package/dist/services/Client.d.ts +0 -29
- package/dist/services/Client.js +0 -30
- package/dist/services/Client.js.map +0 -1
|
@@ -0,0 +1,682 @@
|
|
|
1
|
+
import { Chain, Quote, Response } from "./CovalentClient";
|
|
2
|
+
declare class 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
|
+
constructor(data: PoolResponse);
|
|
14
|
+
}
|
|
15
|
+
declare class Pool {
|
|
16
|
+
/** * The pair address. */
|
|
17
|
+
exchange: string;
|
|
18
|
+
swap_count_24h: string;
|
|
19
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
20
|
+
total_liquidity_quote: string;
|
|
21
|
+
volume_24h_quote: string;
|
|
22
|
+
fee_24h_quote: string;
|
|
23
|
+
/** * Total supply of this pool token. */
|
|
24
|
+
total_supply: bigint | null;
|
|
25
|
+
/** * The exchange rate for the requested quote currency. */
|
|
26
|
+
quote_rate: string;
|
|
27
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
28
|
+
chain_name: string;
|
|
29
|
+
/** * The requested chain ID eg: `1`. */
|
|
30
|
+
chain_id: string;
|
|
31
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
32
|
+
dex_name: string;
|
|
33
|
+
volume_7d_quote: string;
|
|
34
|
+
annualized_fee: string;
|
|
35
|
+
token_0: Token;
|
|
36
|
+
token_1: Token;
|
|
37
|
+
constructor(data: Pool);
|
|
38
|
+
}
|
|
39
|
+
declare class Pagination {
|
|
40
|
+
/** * True is there is another page. */
|
|
41
|
+
has_more: boolean;
|
|
42
|
+
/** * The requested page number. */
|
|
43
|
+
page_number: number;
|
|
44
|
+
/** * The requested number of items on the current page. */
|
|
45
|
+
page_size: number;
|
|
46
|
+
/** * The total number of items across all pages for this request. */
|
|
47
|
+
total_count: number;
|
|
48
|
+
constructor(data: Pagination);
|
|
49
|
+
}
|
|
50
|
+
declare class Token {
|
|
51
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
52
|
+
contract_address: string;
|
|
53
|
+
/** * The string returned by the `name()` method. */
|
|
54
|
+
contract_name: string;
|
|
55
|
+
volume_in_24h: string;
|
|
56
|
+
volume_out_24h: string;
|
|
57
|
+
/** * The exchange rate for the requested quote currency. */
|
|
58
|
+
quote_rate: string;
|
|
59
|
+
reserve: string;
|
|
60
|
+
/** * The contract logo URL. */
|
|
61
|
+
logo_url: string;
|
|
62
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
63
|
+
contract_ticker_symbol: string;
|
|
64
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
65
|
+
contract_decimals: string;
|
|
66
|
+
volume_in_7d: string;
|
|
67
|
+
volume_out_7d: string;
|
|
68
|
+
constructor(data: Token);
|
|
69
|
+
}
|
|
70
|
+
declare class PoolToDexResponse {
|
|
71
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
72
|
+
updated_at: Date;
|
|
73
|
+
/** * The requested address. */
|
|
74
|
+
address: string;
|
|
75
|
+
/** * The requested chain ID eg: `1`. */
|
|
76
|
+
chain_id: number;
|
|
77
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
78
|
+
chain_name: string;
|
|
79
|
+
/** * List of response items. */
|
|
80
|
+
items: PoolToDexItem[];
|
|
81
|
+
constructor(data: PoolToDexResponse);
|
|
82
|
+
}
|
|
83
|
+
declare class SupportedDex {
|
|
84
|
+
/** * The requested chain ID eg: `1`. */
|
|
85
|
+
chain_id: string;
|
|
86
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
87
|
+
chain_name: string;
|
|
88
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
89
|
+
dex_name: string;
|
|
90
|
+
factory_contract_address: string;
|
|
91
|
+
router_contract_addresses: string;
|
|
92
|
+
swap_fee: number;
|
|
93
|
+
constructor(data: SupportedDex);
|
|
94
|
+
}
|
|
95
|
+
declare class PoolToDexItem extends SupportedDex {
|
|
96
|
+
/** * The dex logo URL. */
|
|
97
|
+
logo_url: string;
|
|
98
|
+
constructor(data: PoolToDexItem);
|
|
99
|
+
}
|
|
100
|
+
declare class PoolByAddressResponse {
|
|
101
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
102
|
+
updated_at: Date;
|
|
103
|
+
/** * The requested chain ID eg: `1`. */
|
|
104
|
+
chain_id: number;
|
|
105
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
106
|
+
chain_name: string;
|
|
107
|
+
/** * List of response items. */
|
|
108
|
+
items: PoolWithTimeseries[];
|
|
109
|
+
/** * Pagination metadata. */
|
|
110
|
+
pagination: Pagination;
|
|
111
|
+
constructor(data: PoolByAddressResponse);
|
|
112
|
+
}
|
|
113
|
+
declare class PoolWithTimeseries {
|
|
114
|
+
/** * The pair address. */
|
|
115
|
+
exchange: string;
|
|
116
|
+
swap_count_24h: string;
|
|
117
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
118
|
+
total_liquidity_quote: string;
|
|
119
|
+
volume_24h_quote: string;
|
|
120
|
+
fee_24h_quote: string;
|
|
121
|
+
/** * Total supply of this pool token. */
|
|
122
|
+
total_supply: bigint | null;
|
|
123
|
+
/** * The exchange rate for the requested quote currency. */
|
|
124
|
+
quote_rate: string;
|
|
125
|
+
/** * The requested chain ID eg: `1`. */
|
|
126
|
+
chain_id: string;
|
|
127
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
128
|
+
dex_name: string;
|
|
129
|
+
volume_7d_quote: string;
|
|
130
|
+
annualized_fee: string;
|
|
131
|
+
token_0: Token;
|
|
132
|
+
token_1: Token;
|
|
133
|
+
token_0_reserve_quote: string;
|
|
134
|
+
token_1_reserve_quote: string;
|
|
135
|
+
volume_timeseries_7d: VolumeTimeseries[];
|
|
136
|
+
volume_timeseries_30d: VolumeTimeseries[];
|
|
137
|
+
liquidity_timeseries_7d: LiquidityTimeseries[];
|
|
138
|
+
liquidity_timeseries_30d: LiquidityTimeseries[];
|
|
139
|
+
price_timeseries_7d: PriceTimeseries[];
|
|
140
|
+
price_timeseries_30d: PriceTimeseries[];
|
|
141
|
+
constructor(data: PoolWithTimeseries);
|
|
142
|
+
}
|
|
143
|
+
declare class VolumeTimeseries {
|
|
144
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
145
|
+
dex_name: string;
|
|
146
|
+
/** * The requested chain ID eg: `1`. */
|
|
147
|
+
chain_id: string;
|
|
148
|
+
dt: string;
|
|
149
|
+
/** * The pair address. */
|
|
150
|
+
exchange: string;
|
|
151
|
+
sum_amount_0_in: string;
|
|
152
|
+
sum_amount_0_out: string;
|
|
153
|
+
sum_amount_1_in: string;
|
|
154
|
+
sum_amount_1_out: string;
|
|
155
|
+
volume_quote: string;
|
|
156
|
+
token_0_quote_rate: string;
|
|
157
|
+
token_1_quote_rate: string;
|
|
158
|
+
swap_count_24: string;
|
|
159
|
+
constructor(data: VolumeTimeseries);
|
|
160
|
+
}
|
|
161
|
+
declare class LiquidityTimeseries {
|
|
162
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
163
|
+
dex_name: string;
|
|
164
|
+
/** * The requested chain ID eg: `1`. */
|
|
165
|
+
chain_id: string;
|
|
166
|
+
dt: string;
|
|
167
|
+
/** * The pair address. */
|
|
168
|
+
exchange: string;
|
|
169
|
+
r0_c: string;
|
|
170
|
+
r1_c: string;
|
|
171
|
+
liquidity_quote: string;
|
|
172
|
+
token_0_quote_rate: string;
|
|
173
|
+
token_1_quote_rate: string;
|
|
174
|
+
constructor(data: LiquidityTimeseries);
|
|
175
|
+
}
|
|
176
|
+
declare class PriceTimeseries {
|
|
177
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
178
|
+
dex_name: string;
|
|
179
|
+
/** * The requested chain ID eg: `1`. */
|
|
180
|
+
chain_id: string;
|
|
181
|
+
dt: string;
|
|
182
|
+
/** * The pair address. */
|
|
183
|
+
exchange: string;
|
|
184
|
+
price_of_token_0_in_token_1: string;
|
|
185
|
+
price_of_token_0_in_token_1_description: string;
|
|
186
|
+
price_of_token_1_in_token_0: string;
|
|
187
|
+
price_of_token_1_in_token_0_description: string;
|
|
188
|
+
/** * The requested quote currency eg: `USD`. */
|
|
189
|
+
quote_currency: string;
|
|
190
|
+
price_of_token_0_in_quote_currency: string;
|
|
191
|
+
price_of_token_1_in_quote_currency: string;
|
|
192
|
+
constructor(data: PriceTimeseries);
|
|
193
|
+
}
|
|
194
|
+
declare class PoolsDexDataResponse {
|
|
195
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
196
|
+
updated_at: Date;
|
|
197
|
+
/** * The requested address. */
|
|
198
|
+
address: string;
|
|
199
|
+
/** * The requested chain ID eg: `1`. */
|
|
200
|
+
chain_id: number;
|
|
201
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
202
|
+
chain_name: string;
|
|
203
|
+
/** * The requested quote currency eg: `USD`. */
|
|
204
|
+
quote_currency: string;
|
|
205
|
+
/** * List of response items. */
|
|
206
|
+
items: PoolsDexDataItem[];
|
|
207
|
+
/** * Pagination metadata. */
|
|
208
|
+
pagination: Pagination;
|
|
209
|
+
constructor(data: PoolsDexDataResponse);
|
|
210
|
+
}
|
|
211
|
+
declare class PoolsDexDataItem {
|
|
212
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
213
|
+
dex_name: string;
|
|
214
|
+
/** * The pair address. */
|
|
215
|
+
exchange: string;
|
|
216
|
+
/** * The combined ticker symbol of token0 and token1 separated with a hypen. */
|
|
217
|
+
exchange_ticker_symbol: string;
|
|
218
|
+
/** * The dex logo URL for the pair address. */
|
|
219
|
+
exchange_logo_url: string;
|
|
220
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
221
|
+
total_liquidity_quote: number;
|
|
222
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
223
|
+
pretty_total_liquidity_quote: string;
|
|
224
|
+
/** * The volume 24h converted to fiat in `quote-currency`. */
|
|
225
|
+
volume_24h_quote: number;
|
|
226
|
+
/** * The volume 7d converted to fiat in `quote-currency`. */
|
|
227
|
+
volume_7d_quote: number;
|
|
228
|
+
/** * The fee 24h converted to fiat in `quote-currency`. */
|
|
229
|
+
fee_24h_quote: number;
|
|
230
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
231
|
+
pretty_volume_24h_quote: string;
|
|
232
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
233
|
+
pretty_volume_7d_quote: string;
|
|
234
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
235
|
+
pretty_fee_24h_quote: string;
|
|
236
|
+
/** * Token0's contract metadata and reserve data. */
|
|
237
|
+
token_0: PoolsDexToken;
|
|
238
|
+
/** * Token1's contract metadata and reserve data. */
|
|
239
|
+
token_1: PoolsDexToken;
|
|
240
|
+
constructor(data: PoolsDexDataItem);
|
|
241
|
+
}
|
|
242
|
+
declare class PoolsDexToken {
|
|
243
|
+
/** * The reserves for the token. */
|
|
244
|
+
reserve: string;
|
|
245
|
+
/** * The string returned by the `name()` method. */
|
|
246
|
+
contract_name: string;
|
|
247
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
248
|
+
contract_decimals: number;
|
|
249
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
250
|
+
contract_ticker_symbol: string;
|
|
251
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
252
|
+
contract_address: string;
|
|
253
|
+
/** * The contract logo URL. */
|
|
254
|
+
logo_url: string;
|
|
255
|
+
/** * The exchange rate for the requested quote currency. */
|
|
256
|
+
quote_rate: number;
|
|
257
|
+
constructor(data: PoolsDexToken);
|
|
258
|
+
}
|
|
259
|
+
declare class AddressExchangeBalancesResponse {
|
|
260
|
+
/** * The requested address. */
|
|
261
|
+
address: string;
|
|
262
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
263
|
+
updated_at: Date;
|
|
264
|
+
/** * The requested chain ID eg: `1`. */
|
|
265
|
+
chain_id: number;
|
|
266
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
267
|
+
chain_name: string;
|
|
268
|
+
/** * List of response items. */
|
|
269
|
+
items: UniswapLikeBalanceItem[];
|
|
270
|
+
constructor(data: AddressExchangeBalancesResponse);
|
|
271
|
+
}
|
|
272
|
+
declare class UniswapLikeBalanceItem {
|
|
273
|
+
token_0: UniswapLikeToken;
|
|
274
|
+
token_1: UniswapLikeToken;
|
|
275
|
+
pool_token: UniswapLikeTokenWithSupply;
|
|
276
|
+
constructor(data: UniswapLikeBalanceItem);
|
|
277
|
+
}
|
|
278
|
+
declare class UniswapLikeToken {
|
|
279
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
280
|
+
contract_decimals: number;
|
|
281
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
282
|
+
contract_ticker_symbol: string;
|
|
283
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
284
|
+
contract_address: string;
|
|
285
|
+
/** * The contract logo URL. */
|
|
286
|
+
logo_url: string;
|
|
287
|
+
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
288
|
+
balance: bigint | null;
|
|
289
|
+
quote: number;
|
|
290
|
+
/** * The exchange rate for the requested quote currency. */
|
|
291
|
+
quote_rate: number;
|
|
292
|
+
constructor(data: UniswapLikeToken);
|
|
293
|
+
}
|
|
294
|
+
declare class UniswapLikeTokenWithSupply {
|
|
295
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
296
|
+
contract_decimals: number;
|
|
297
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
298
|
+
contract_ticker_symbol: string;
|
|
299
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
300
|
+
contract_address: string;
|
|
301
|
+
/** * The contract logo URL. */
|
|
302
|
+
logo_url: string;
|
|
303
|
+
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
304
|
+
balance: bigint | null;
|
|
305
|
+
quote: number;
|
|
306
|
+
/** * The exchange rate for the requested quote currency. */
|
|
307
|
+
quote_rate: number;
|
|
308
|
+
/** * Total supply of this pool token. */
|
|
309
|
+
total_supply: bigint | null;
|
|
310
|
+
constructor(data: UniswapLikeTokenWithSupply);
|
|
311
|
+
}
|
|
312
|
+
declare class NetworkExchangeTokensResponse {
|
|
313
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
314
|
+
updated_at: Date;
|
|
315
|
+
/** * The requested chain ID eg: `1`. */
|
|
316
|
+
chain_id: number;
|
|
317
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
318
|
+
chain_name: string;
|
|
319
|
+
/** * List of response items. */
|
|
320
|
+
items: TokenV2Volume[];
|
|
321
|
+
/** * Pagination metadata. */
|
|
322
|
+
pagination: Pagination;
|
|
323
|
+
constructor(data: NetworkExchangeTokensResponse);
|
|
324
|
+
}
|
|
325
|
+
declare class TokenV2Volume {
|
|
326
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
327
|
+
chain_name: string;
|
|
328
|
+
/** * The requested chain ID eg: `1`. */
|
|
329
|
+
chain_id: string;
|
|
330
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
331
|
+
dex_name: string;
|
|
332
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
333
|
+
contract_address: string;
|
|
334
|
+
/** * The string returned by the `name()` method. */
|
|
335
|
+
contract_name: string;
|
|
336
|
+
total_liquidity: number;
|
|
337
|
+
total_volume24h: number;
|
|
338
|
+
/** * The contract logo URL. */
|
|
339
|
+
logo_url: string;
|
|
340
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
341
|
+
contract_ticker_symbol: string;
|
|
342
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
343
|
+
contract_decimals: number;
|
|
344
|
+
swap_count_24h: number;
|
|
345
|
+
/** * The exchange rate for the requested quote currency. */
|
|
346
|
+
quote_rate: number;
|
|
347
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
348
|
+
total_liquidity_quote: number;
|
|
349
|
+
total_volume_24h_quote: number;
|
|
350
|
+
constructor(data: TokenV2Volume);
|
|
351
|
+
}
|
|
352
|
+
declare class SupportedDexesResponse {
|
|
353
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
354
|
+
updated_at: Date;
|
|
355
|
+
/** * List of response items. */
|
|
356
|
+
items: SupportedDex[];
|
|
357
|
+
/** * Pagination metadata. */
|
|
358
|
+
pagination: Pagination;
|
|
359
|
+
constructor(data: SupportedDexesResponse);
|
|
360
|
+
}
|
|
361
|
+
declare class SingleNetworkExchangeTokenResponse {
|
|
362
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
363
|
+
updated_at: Date;
|
|
364
|
+
/** * The requested chain ID eg: `1`. */
|
|
365
|
+
chain_id: number;
|
|
366
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
367
|
+
chain_name: string;
|
|
368
|
+
/** * List of response items. */
|
|
369
|
+
items: PoolWithTimeseries[];
|
|
370
|
+
/** * Pagination metadata. */
|
|
371
|
+
pagination: Pagination;
|
|
372
|
+
constructor(data: SingleNetworkExchangeTokenResponse);
|
|
373
|
+
}
|
|
374
|
+
declare class TransactionsForAccountAddressResponse {
|
|
375
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
376
|
+
updated_at: Date;
|
|
377
|
+
/** * The requested chain ID eg: `1`. */
|
|
378
|
+
chain_id: number;
|
|
379
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
380
|
+
chain_name: string;
|
|
381
|
+
/** * List of response items. */
|
|
382
|
+
items: ExchangeTransaction[];
|
|
383
|
+
/** * Pagination metadata. */
|
|
384
|
+
pagination: Pagination;
|
|
385
|
+
constructor(data: TransactionsForAccountAddressResponse);
|
|
386
|
+
}
|
|
387
|
+
declare class ExchangeTransaction {
|
|
388
|
+
/** * The block signed timestamp in UTC. */
|
|
389
|
+
block_signed_at: Date;
|
|
390
|
+
/** * The requested transaction hash. */
|
|
391
|
+
tx_hash: string;
|
|
392
|
+
act: string;
|
|
393
|
+
/** * The requested address. */
|
|
394
|
+
address: string;
|
|
395
|
+
amount0: number;
|
|
396
|
+
amount1: number;
|
|
397
|
+
amount0_in: number;
|
|
398
|
+
amount0_out: number;
|
|
399
|
+
amount1_out: number;
|
|
400
|
+
to_address: string;
|
|
401
|
+
from_address: string;
|
|
402
|
+
sender_address: string;
|
|
403
|
+
total_quote: number;
|
|
404
|
+
token_0: PoolToken;
|
|
405
|
+
token_1: PoolToken;
|
|
406
|
+
token_0_quote_rate: number;
|
|
407
|
+
token_1_quote_rate: number;
|
|
408
|
+
constructor(data: ExchangeTransaction);
|
|
409
|
+
}
|
|
410
|
+
declare class PoolToken {
|
|
411
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
412
|
+
contract_decimals: number;
|
|
413
|
+
/** * The string returned by the `name()` method. */
|
|
414
|
+
contract_name: string;
|
|
415
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
416
|
+
contract_ticker_symbol: string;
|
|
417
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
418
|
+
contract_address: string;
|
|
419
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
420
|
+
supports_erc: boolean;
|
|
421
|
+
/** * The contract logo URL. */
|
|
422
|
+
logo_url: string;
|
|
423
|
+
constructor(data: PoolToken);
|
|
424
|
+
}
|
|
425
|
+
declare class TransactionsForTokenAddressResponse {
|
|
426
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
427
|
+
updated_at: Date;
|
|
428
|
+
/** * The requested chain ID eg: `1`. */
|
|
429
|
+
chain_id: number;
|
|
430
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
431
|
+
chain_name: string;
|
|
432
|
+
/** * List of response items. */
|
|
433
|
+
items: ExchangeTransaction[];
|
|
434
|
+
/** * Pagination metadata. */
|
|
435
|
+
pagination: Pagination;
|
|
436
|
+
constructor(data: TransactionsForTokenAddressResponse);
|
|
437
|
+
}
|
|
438
|
+
declare class TransactionsForExchangeResponse {
|
|
439
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
440
|
+
updated_at: Date;
|
|
441
|
+
/** * The requested chain ID eg: `1`. */
|
|
442
|
+
chain_id: number;
|
|
443
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
444
|
+
chain_name: string;
|
|
445
|
+
/** * List of response items. */
|
|
446
|
+
items: ExchangeTransaction[];
|
|
447
|
+
/** * Pagination metadata. */
|
|
448
|
+
pagination: Pagination;
|
|
449
|
+
constructor(data: TransactionsForExchangeResponse);
|
|
450
|
+
}
|
|
451
|
+
declare class EcosystemChartDataResponse {
|
|
452
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
453
|
+
updated_at: Date;
|
|
454
|
+
/** * The requested chain ID eg: `1`. */
|
|
455
|
+
chain_id: number;
|
|
456
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
457
|
+
chain_name: string;
|
|
458
|
+
/** * List of response items. */
|
|
459
|
+
items: UniswapLikeEcosystemCharts[];
|
|
460
|
+
/** * Pagination metadata. */
|
|
461
|
+
pagination: Pagination;
|
|
462
|
+
constructor(data: EcosystemChartDataResponse);
|
|
463
|
+
}
|
|
464
|
+
declare class UniswapLikeEcosystemCharts {
|
|
465
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
466
|
+
dex_name: string;
|
|
467
|
+
/** * The requested chain ID eg: `1`. */
|
|
468
|
+
chain_id: string;
|
|
469
|
+
/** * The requested quote currency eg: `USD`. */
|
|
470
|
+
quote_currency: string;
|
|
471
|
+
gas_token_price_quote: number;
|
|
472
|
+
total_swaps24h: number;
|
|
473
|
+
total_active_pairs7d: number;
|
|
474
|
+
total_fees24h: number;
|
|
475
|
+
volume_chart7d: VolumeEcosystemChart[];
|
|
476
|
+
volume_chart30d: VolumeEcosystemChart[];
|
|
477
|
+
liquidity_chart7d: LiquidityEcosystemChart[];
|
|
478
|
+
liquidity_chart30d: LiquidityEcosystemChart[];
|
|
479
|
+
constructor(data: UniswapLikeEcosystemCharts);
|
|
480
|
+
}
|
|
481
|
+
declare class VolumeEcosystemChart {
|
|
482
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
483
|
+
dex_name: string;
|
|
484
|
+
/** * The requested chain ID eg: `1`. */
|
|
485
|
+
chain_id: string;
|
|
486
|
+
dt: Date;
|
|
487
|
+
/** * The requested quote currency eg: `USD`. */
|
|
488
|
+
quote_currency: string;
|
|
489
|
+
volume_quote: number;
|
|
490
|
+
swap_count_24: number;
|
|
491
|
+
constructor(data: VolumeEcosystemChart);
|
|
492
|
+
}
|
|
493
|
+
declare class LiquidityEcosystemChart {
|
|
494
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
495
|
+
dex_name: string;
|
|
496
|
+
/** * The requested chain ID eg: `1`. */
|
|
497
|
+
chain_id: string;
|
|
498
|
+
dt: Date;
|
|
499
|
+
/** * The requested quote currency eg: `USD`. */
|
|
500
|
+
quote_currency: string;
|
|
501
|
+
liquidity_quote: number;
|
|
502
|
+
constructor(data: LiquidityEcosystemChart);
|
|
503
|
+
}
|
|
504
|
+
declare class HealthDataResponse {
|
|
505
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
506
|
+
updated_at: Date;
|
|
507
|
+
/** * The requested chain ID eg: `1`. */
|
|
508
|
+
chain_id: number;
|
|
509
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
510
|
+
chain_name: string;
|
|
511
|
+
/** * List of response items. */
|
|
512
|
+
items: HealthData[];
|
|
513
|
+
/** * Pagination metadata. */
|
|
514
|
+
pagination: Pagination;
|
|
515
|
+
constructor(data: HealthDataResponse);
|
|
516
|
+
}
|
|
517
|
+
declare class HealthData {
|
|
518
|
+
synced_block_height: number;
|
|
519
|
+
synced_block_signed_at: Date;
|
|
520
|
+
latest_block_height: number;
|
|
521
|
+
latest_block_signed_at: Date;
|
|
522
|
+
constructor(data: HealthData);
|
|
523
|
+
}
|
|
524
|
+
export interface GetPoolsForTokenAddressQueryParamOpts {
|
|
525
|
+
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
526
|
+
quoteCurrency?: Quote;
|
|
527
|
+
}
|
|
528
|
+
export interface GetPoolsForWalletAddressQueryParamOpts {
|
|
529
|
+
/** * The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically. */
|
|
530
|
+
tokenAddress?: string;
|
|
531
|
+
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
532
|
+
quoteCurrency?: Quote;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* XYK APIs
|
|
536
|
+
*
|
|
537
|
+
*/
|
|
538
|
+
export declare class XykService {
|
|
539
|
+
private apiKey;
|
|
540
|
+
private debug;
|
|
541
|
+
private threadCount;
|
|
542
|
+
private LIMIT;
|
|
543
|
+
constructor(apiKey: string, debug?: boolean, threadCount?: number);
|
|
544
|
+
/**
|
|
545
|
+
*
|
|
546
|
+
* Commonly used to get all the pools of a particular DEX. Supports most common DEXs (Uniswap, SushiSwap, etc), and returns detailed trading data (volume, liquidity, swap counts, fees, LP token prices).
|
|
547
|
+
*
|
|
548
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
549
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
550
|
+
*
|
|
551
|
+
*/
|
|
552
|
+
getPools(chainName: Chain, dexName: string): Promise<Response<PoolResponse>>;
|
|
553
|
+
/**
|
|
554
|
+
*
|
|
555
|
+
* Commonly used to get the corresponding supported DEX given a pool address, along with the swap fees, DEX's logo url, and factory addresses. Useful to identifying the specific DEX to which a pair address is associated.
|
|
556
|
+
*
|
|
557
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
558
|
+
* @param {string} poolAddress - The requested pool address.
|
|
559
|
+
*
|
|
560
|
+
*/
|
|
561
|
+
getDexForPoolAddress(chainName: Chain, poolAddress: string): Promise<Response<PoolToDexResponse>>;
|
|
562
|
+
/**
|
|
563
|
+
*
|
|
564
|
+
* Commonly used to get the 7 day and 30 day time-series data (volume, liquidity, price) of a particular liquidity pool in a DEX. Useful for building time-series charts on DEX trading activity.
|
|
565
|
+
*
|
|
566
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
567
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
568
|
+
* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
569
|
+
*
|
|
570
|
+
*/
|
|
571
|
+
getPoolByAddress(chainName: Chain, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
|
|
572
|
+
/**
|
|
573
|
+
*
|
|
574
|
+
* Commonly used to get all pools and the supported DEX for a token. Useful for building a table of top pairs across all supported DEXes that the token is trading on.
|
|
575
|
+
*
|
|
576
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
577
|
+
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
578
|
+
* @param {number} page - The requested 0-indexed page number.
|
|
579
|
+
* @param {GetPoolsForTokenAddressQueryParamOpts} queryParamOpts
|
|
580
|
+
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
581
|
+
*
|
|
582
|
+
*/
|
|
583
|
+
getPoolsForTokenAddress(chainName: Chain, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
|
|
584
|
+
/**
|
|
585
|
+
*
|
|
586
|
+
* Commonly used to return balance of a wallet/contract address on a specific DEX.
|
|
587
|
+
*
|
|
588
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
589
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
590
|
+
* @param {string} accountAddress - The account address.
|
|
591
|
+
*
|
|
592
|
+
*/
|
|
593
|
+
getAddressExchangeBalances(chainName: Chain, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
|
|
594
|
+
/**
|
|
595
|
+
*
|
|
596
|
+
* Commonly used to get all pools and supported DEX for a wallet. Useful for building a personal DEX UI showcasing pairs and supported DEXes associated to the wallet.
|
|
597
|
+
*
|
|
598
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
599
|
+
* @param {string} walletAddress - The account address.
|
|
600
|
+
* @param {number} page - The requested 0-indexed page number.
|
|
601
|
+
* @param {GetPoolsForWalletAddressQueryParamOpts} queryParamOpts
|
|
602
|
+
* - `tokenAddress`: The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
603
|
+
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
604
|
+
*
|
|
605
|
+
*/
|
|
606
|
+
getPoolsForWalletAddress(chainName: Chain, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
|
|
607
|
+
/**
|
|
608
|
+
*
|
|
609
|
+
* Commonly used to retrieve all network exchange tokens for a specific DEX. Useful for building a top tokens table by total liquidity within a particular DEX.
|
|
610
|
+
*
|
|
611
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
612
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
613
|
+
*
|
|
614
|
+
*/
|
|
615
|
+
getNetworkExchangeTokens(chainName: Chain, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
|
|
616
|
+
/**
|
|
617
|
+
*
|
|
618
|
+
* Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.
|
|
619
|
+
*
|
|
620
|
+
*
|
|
621
|
+
*/
|
|
622
|
+
getSupportedDEXes(): Promise<Response<SupportedDexesResponse>>;
|
|
623
|
+
/**
|
|
624
|
+
*
|
|
625
|
+
* Commonly used to get historical daily swap count for a single network exchange token.
|
|
626
|
+
*
|
|
627
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
628
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
629
|
+
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
630
|
+
*
|
|
631
|
+
*/
|
|
632
|
+
getSingleNetworkExchangeToken(chainName: Chain, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
|
|
633
|
+
/**
|
|
634
|
+
*
|
|
635
|
+
* Commonly used to get all the DEX transactions of a wallet. Useful for building tables of DEX activity segmented by wallet.
|
|
636
|
+
*
|
|
637
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
638
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
639
|
+
* @param {string} accountAddress - The account address. Passing in an `ENS` or `RNS` resolves automatically.
|
|
640
|
+
*
|
|
641
|
+
*/
|
|
642
|
+
getTransactionsForAccountAddress(chainName: Chain, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
|
|
643
|
+
/**
|
|
644
|
+
*
|
|
645
|
+
* Commonly used to get all the transactions of a token within a particular DEX. Useful for getting a per-token view of DEX activity.
|
|
646
|
+
*
|
|
647
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
648
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
649
|
+
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
650
|
+
*
|
|
651
|
+
*/
|
|
652
|
+
getTransactionsForTokenAddress(chainName: Chain, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
|
|
653
|
+
/**
|
|
654
|
+
*
|
|
655
|
+
* Commonly used for getting all the transactions of a particular DEX liquidity pool. Useful for building a transactions history table for an individual pool.
|
|
656
|
+
*
|
|
657
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
658
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
659
|
+
* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
660
|
+
*
|
|
661
|
+
*/
|
|
662
|
+
getTransactionsForExchange(chainName: Chain, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
|
|
663
|
+
/**
|
|
664
|
+
*
|
|
665
|
+
* Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.
|
|
666
|
+
*
|
|
667
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
668
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
669
|
+
*
|
|
670
|
+
*/
|
|
671
|
+
getEcosystemChartData(chainName: Chain, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
|
|
672
|
+
/**
|
|
673
|
+
*
|
|
674
|
+
* Commonly used to ping the health of xy=k endpoints to get the synced block height per chain.
|
|
675
|
+
*
|
|
676
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
677
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
678
|
+
*
|
|
679
|
+
*/
|
|
680
|
+
getHealthData(chainName: Chain, dexName: string): Promise<Response<HealthDataResponse>>;
|
|
681
|
+
}
|
|
682
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function checkAndModifyResponse(jsonObj: any): void;
|
|
2
|
+
export declare function debugOutput(url: string, responseStatus: number, startTime: number | [number, number] | undefined): Promise<void>;
|
|
3
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
4
|
+
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number): AsyncIterable<T1>;
|
|
5
|
+
export {};
|