@covalenthq/client-sdk 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +37 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/CovalentClient.d.ts +1 -1
- package/dist/cjs/services/XykService.d.ts +57 -15
- package/dist/cjs/util/types/XykServiceTypes.d.ts +57 -15
- package/dist/es/index.js +37 -16
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/CovalentClient.d.ts +1 -1
- package/dist/es/services/XykService.d.ts +57 -15
- package/dist/es/util/types/XykServiceTypes.d.ts +57 -15
- package/dist/esm/index.js +37 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/CovalentClient.d.ts +1 -1
- package/dist/esm/services/XykService.d.ts +57 -15
- package/dist/esm/util/types/XykServiceTypes.d.ts +57 -15
- package/dist/services/CovalentClient.d.ts +1 -1
- package/dist/services/CovalentClient.js +1 -1
- package/dist/services/XykService.d.ts +57 -15
- package/dist/services/XykService.js +36 -15
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/types/XykServiceTypes.d.ts +57 -15
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { TransactionService } from "./TransactionService";
|
|
|
7
7
|
import { XykService } from "./XykService";
|
|
8
8
|
export type Chain = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-l2-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet" | "bnb-fncy-testnet" | "manta-testnet" | "pgn-mainnet" | "pgn-testnet" | "gnosis-mainnet" | "gnosis-testnet" | "rollux-mainnet" | "rollux-testnet" | "taiko-jolnir-testnet" | "optimism-sepolia" | "bnb-opbnb-mainnet" | "telos-mainnet" | "telos-testnet" | "avalanche-hubble-exchange-testnet" | "avalanche-miho-testnet" | "avalanche-bulletin-testnet" | "avalanche-kiwi-testnet" | "avalanche-hero-testnet" | "avalanche-avacloud-testnet" | "avalanche-thirdweb-testnet" | "avalanche-mondrian-testnet" | "avalanche-conduit-testnet" | "avalanche-nmac-testnet" | "avalanche-orderly-testnet" | "avalanche-amplify-testnet" | "avalanche-mirai-testnet" | "avalanche-wagmi-testnet" | "avalanche-playa3ull-testnet" | "avalanche-beam-mainnet" | "scroll-mainnet" | "eth-holesky";
|
|
9
9
|
export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
|
|
10
|
-
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.
|
|
10
|
+
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.5";
|
|
11
11
|
export declare class Response<T> {
|
|
12
12
|
data: T;
|
|
13
13
|
error: boolean;
|
|
@@ -25,6 +25,14 @@ declare class Pool {
|
|
|
25
25
|
total_supply: bigint | null;
|
|
26
26
|
/** * The exchange rate for the requested quote currency. */
|
|
27
27
|
quote_rate: string;
|
|
28
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
29
|
+
pretty_total_liquidity_quote: string;
|
|
30
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
31
|
+
pretty_volume_24h_quote: string;
|
|
32
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
33
|
+
pretty_fee_24h_quote: string;
|
|
34
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
35
|
+
pretty_volume_7d_quote: string;
|
|
28
36
|
/** * The requested chain name eg: `eth-mainnet`. */
|
|
29
37
|
chain_name: string;
|
|
30
38
|
/** * The requested chain ID eg: `1`. */
|
|
@@ -88,6 +96,10 @@ declare class SupportedDex {
|
|
|
88
96
|
chain_name: string;
|
|
89
97
|
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
90
98
|
dex_name: string;
|
|
99
|
+
/** * A display-friendly name for the dex. */
|
|
100
|
+
display_name: string;
|
|
101
|
+
/** * The dex logo URL. */
|
|
102
|
+
logo_url: string;
|
|
91
103
|
factory_contract_address: string;
|
|
92
104
|
router_contract_addresses: string;
|
|
93
105
|
swap_fee: number;
|
|
@@ -129,6 +141,14 @@ declare class PoolWithTimeseries {
|
|
|
129
141
|
dex_name: string;
|
|
130
142
|
volume_7d_quote: string;
|
|
131
143
|
annualized_fee: string;
|
|
144
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
145
|
+
pretty_total_liquidity_quote: string;
|
|
146
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
147
|
+
pretty_volume_24h_quote: string;
|
|
148
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
149
|
+
pretty_fee_24h_quote: string;
|
|
150
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
151
|
+
pretty_volume_7d_quote: string;
|
|
132
152
|
token_0: Token;
|
|
133
153
|
token_1: Token;
|
|
134
154
|
token_0_reserve_quote: string;
|
|
@@ -149,11 +169,13 @@ declare class VolumeTimeseries {
|
|
|
149
169
|
dt: string;
|
|
150
170
|
/** * The pair address. */
|
|
151
171
|
exchange: string;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
172
|
+
sum_amount0in: string;
|
|
173
|
+
sum_amount0out: string;
|
|
174
|
+
sum_amount1in: string;
|
|
175
|
+
sum_amount1out: string;
|
|
156
176
|
volume_quote: string;
|
|
177
|
+
/** * A prettier version of the volume quote for rendering purposes. */
|
|
178
|
+
pretty_volume_quote: string;
|
|
157
179
|
token_0_quote_rate: string;
|
|
158
180
|
token_1_quote_rate: string;
|
|
159
181
|
swap_count_24: string;
|
|
@@ -170,6 +192,8 @@ declare class LiquidityTimeseries {
|
|
|
170
192
|
r0_c: string;
|
|
171
193
|
r1_c: string;
|
|
172
194
|
liquidity_quote: string;
|
|
195
|
+
/** * A prettier version of the liquidity quote for rendering purposes. */
|
|
196
|
+
pretty_liquidity_quote: string;
|
|
173
197
|
token_0_quote_rate: string;
|
|
174
198
|
token_1_quote_rate: string;
|
|
175
199
|
constructor(data: LiquidityTimeseries);
|
|
@@ -182,14 +206,18 @@ declare class PriceTimeseries {
|
|
|
182
206
|
dt: string;
|
|
183
207
|
/** * The pair address. */
|
|
184
208
|
exchange: string;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
209
|
+
price_of_token0_in_token1: string;
|
|
210
|
+
/** * A prettier version of the price token0 for rendering purposes. */
|
|
211
|
+
pretty_price_of_token0_in_token1: string;
|
|
212
|
+
price_of_token0_in_token1_description: string;
|
|
213
|
+
price_of_token1_in_token0: string;
|
|
214
|
+
/** * A prettier version of the price token1 for rendering purposes. */
|
|
215
|
+
pretty_price_of_token1_in_token0: string;
|
|
216
|
+
price_of_token1_in_token0_description: string;
|
|
189
217
|
/** * The requested quote currency eg: `USD`. */
|
|
190
218
|
quote_currency: string;
|
|
191
|
-
|
|
192
|
-
|
|
219
|
+
price_of_token0_in_quote_currency: string;
|
|
220
|
+
price_of_token1_in_quote_currency: string;
|
|
193
221
|
constructor(data: PriceTimeseries);
|
|
194
222
|
}
|
|
195
223
|
declare class PoolsDexDataResponse {
|
|
@@ -345,8 +373,19 @@ declare class TokenV2Volume {
|
|
|
345
373
|
swap_count_24h: number;
|
|
346
374
|
/** * The exchange rate for the requested quote currency. */
|
|
347
375
|
quote_rate: number;
|
|
376
|
+
/** * The 24h exchange rate for the requested quote currency. */
|
|
377
|
+
quote_rate_24h: number;
|
|
378
|
+
/** * A prettier version of the exchange rate for rendering purposes. */
|
|
379
|
+
pretty_quote_rate: string;
|
|
380
|
+
/** * A prettier version of the 24h exchange rate for rendering purposes. */
|
|
381
|
+
pretty_quote_rate_24h: string;
|
|
382
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
383
|
+
pretty_total_liquidity_quote: string;
|
|
384
|
+
/** * A prettier version of the 24h volume quote for rendering purposes. */
|
|
385
|
+
pretty_total_volume_24h_quote: string;
|
|
348
386
|
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
349
387
|
total_liquidity_quote: number;
|
|
388
|
+
/** * The total volume 24h converted to fiat in `quote-currency`. */
|
|
350
389
|
total_volume_24h_quote: number;
|
|
351
390
|
constructor(data: TokenV2Volume);
|
|
352
391
|
}
|
|
@@ -393,15 +432,18 @@ declare class ExchangeTransaction {
|
|
|
393
432
|
act: string;
|
|
394
433
|
/** * The requested address. */
|
|
395
434
|
address: string;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
435
|
+
amount_0: number;
|
|
436
|
+
amount_1: number;
|
|
437
|
+
amount_0_in: number;
|
|
438
|
+
amount_0_out: number;
|
|
439
|
+
amount_1_in: number;
|
|
440
|
+
amount_1_out: number;
|
|
401
441
|
to_address: string;
|
|
402
442
|
from_address: string;
|
|
403
443
|
sender_address: string;
|
|
404
444
|
total_quote: number;
|
|
445
|
+
/** * A prettier version of the total quote for rendering purposes. */
|
|
446
|
+
pretty_total_quote: string;
|
|
405
447
|
token_0: PoolToken;
|
|
406
448
|
token_1: PoolToken;
|
|
407
449
|
token_0_quote_rate: number;
|
|
@@ -23,6 +23,14 @@ export interface Pool {
|
|
|
23
23
|
total_supply: bigint | null;
|
|
24
24
|
/** * The exchange rate for the requested quote currency. */
|
|
25
25
|
quote_rate: string;
|
|
26
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
27
|
+
pretty_total_liquidity_quote: string;
|
|
28
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
29
|
+
pretty_volume_24h_quote: string;
|
|
30
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
31
|
+
pretty_fee_24h_quote: string;
|
|
32
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
33
|
+
pretty_volume_7d_quote: string;
|
|
26
34
|
/** * The requested chain name eg: `eth-mainnet`. */
|
|
27
35
|
chain_name: string;
|
|
28
36
|
/** * The requested chain ID eg: `1`. */
|
|
@@ -76,6 +84,10 @@ export interface SupportedDex {
|
|
|
76
84
|
chain_name: string;
|
|
77
85
|
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
78
86
|
dex_name: string;
|
|
87
|
+
/** * A display-friendly name for the dex. */
|
|
88
|
+
display_name: string;
|
|
89
|
+
/** * The dex logo URL. */
|
|
90
|
+
logo_url: string;
|
|
79
91
|
factory_contract_address: string;
|
|
80
92
|
router_contract_addresses: string;
|
|
81
93
|
swap_fee: number;
|
|
@@ -110,6 +122,14 @@ export interface PoolWithTimeseries {
|
|
|
110
122
|
dex_name: string;
|
|
111
123
|
volume_7d_quote: string;
|
|
112
124
|
annualized_fee: string;
|
|
125
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
126
|
+
pretty_total_liquidity_quote: string;
|
|
127
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
128
|
+
pretty_volume_24h_quote: string;
|
|
129
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
130
|
+
pretty_fee_24h_quote: string;
|
|
131
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
132
|
+
pretty_volume_7d_quote: string;
|
|
113
133
|
token_0: Token;
|
|
114
134
|
token_1: Token;
|
|
115
135
|
token_0_reserve_quote: string;
|
|
@@ -129,11 +149,13 @@ export interface VolumeTimeseries {
|
|
|
129
149
|
dt: string;
|
|
130
150
|
/** * The pair address. */
|
|
131
151
|
exchange: string;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
152
|
+
sum_amount0in: string;
|
|
153
|
+
sum_amount0out: string;
|
|
154
|
+
sum_amount1in: string;
|
|
155
|
+
sum_amount1out: string;
|
|
136
156
|
volume_quote: string;
|
|
157
|
+
/** * A prettier version of the volume quote for rendering purposes. */
|
|
158
|
+
pretty_volume_quote: string;
|
|
137
159
|
token_0_quote_rate: string;
|
|
138
160
|
token_1_quote_rate: string;
|
|
139
161
|
swap_count_24: string;
|
|
@@ -149,6 +171,8 @@ export interface LiquidityTimeseries {
|
|
|
149
171
|
r0_c: string;
|
|
150
172
|
r1_c: string;
|
|
151
173
|
liquidity_quote: string;
|
|
174
|
+
/** * A prettier version of the liquidity quote for rendering purposes. */
|
|
175
|
+
pretty_liquidity_quote: string;
|
|
152
176
|
token_0_quote_rate: string;
|
|
153
177
|
token_1_quote_rate: string;
|
|
154
178
|
}
|
|
@@ -160,14 +184,18 @@ export interface PriceTimeseries {
|
|
|
160
184
|
dt: string;
|
|
161
185
|
/** * The pair address. */
|
|
162
186
|
exchange: string;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
187
|
+
price_of_token0_in_token1: string;
|
|
188
|
+
/** * A prettier version of the price token0 for rendering purposes. */
|
|
189
|
+
pretty_price_of_token0_in_token1: string;
|
|
190
|
+
price_of_token0_in_token1_description: string;
|
|
191
|
+
price_of_token1_in_token0: string;
|
|
192
|
+
/** * A prettier version of the price token1 for rendering purposes. */
|
|
193
|
+
pretty_price_of_token1_in_token0: string;
|
|
194
|
+
price_of_token1_in_token0_description: string;
|
|
167
195
|
/** * The requested quote currency eg: `USD`. */
|
|
168
196
|
quote_currency: string;
|
|
169
|
-
|
|
170
|
-
|
|
197
|
+
price_of_token0_in_quote_currency: string;
|
|
198
|
+
price_of_token1_in_quote_currency: string;
|
|
171
199
|
}
|
|
172
200
|
export interface PoolsDexDataResponse {
|
|
173
201
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
@@ -314,8 +342,19 @@ export interface TokenV2Volume {
|
|
|
314
342
|
swap_count_24h: number;
|
|
315
343
|
/** * The exchange rate for the requested quote currency. */
|
|
316
344
|
quote_rate: number;
|
|
345
|
+
/** * The 24h exchange rate for the requested quote currency. */
|
|
346
|
+
quote_rate_24h: number;
|
|
347
|
+
/** * A prettier version of the exchange rate for rendering purposes. */
|
|
348
|
+
pretty_quote_rate: string;
|
|
349
|
+
/** * A prettier version of the 24h exchange rate for rendering purposes. */
|
|
350
|
+
pretty_quote_rate_24h: string;
|
|
351
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
352
|
+
pretty_total_liquidity_quote: string;
|
|
353
|
+
/** * A prettier version of the 24h volume quote for rendering purposes. */
|
|
354
|
+
pretty_total_volume_24h_quote: string;
|
|
317
355
|
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
318
356
|
total_liquidity_quote: number;
|
|
357
|
+
/** * The total volume 24h converted to fiat in `quote-currency`. */
|
|
319
358
|
total_volume_24h_quote: number;
|
|
320
359
|
}
|
|
321
360
|
export interface SupportedDexesResponse {
|
|
@@ -358,15 +397,18 @@ export interface ExchangeTransaction {
|
|
|
358
397
|
act: string;
|
|
359
398
|
/** * The requested address. */
|
|
360
399
|
address: string;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
400
|
+
amount_0: number;
|
|
401
|
+
amount_1: number;
|
|
402
|
+
amount_0_in: number;
|
|
403
|
+
amount_0_out: number;
|
|
404
|
+
amount_1_in: number;
|
|
405
|
+
amount_1_out: number;
|
|
366
406
|
to_address: string;
|
|
367
407
|
from_address: string;
|
|
368
408
|
sender_address: string;
|
|
369
409
|
total_quote: number;
|
|
410
|
+
/** * A prettier version of the total quote for rendering purposes. */
|
|
411
|
+
pretty_total_quote: string;
|
|
370
412
|
token_0: PoolToken;
|
|
371
413
|
token_1: PoolToken;
|
|
372
414
|
token_0_quote_rate: number;
|
|
@@ -7,7 +7,7 @@ import { TransactionService } from "./TransactionService";
|
|
|
7
7
|
import { XykService } from "./XykService";
|
|
8
8
|
export type Chain = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-l2-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet" | "bnb-fncy-testnet" | "manta-testnet" | "pgn-mainnet" | "pgn-testnet" | "gnosis-mainnet" | "gnosis-testnet" | "rollux-mainnet" | "rollux-testnet" | "taiko-jolnir-testnet" | "optimism-sepolia" | "bnb-opbnb-mainnet" | "telos-mainnet" | "telos-testnet" | "avalanche-hubble-exchange-testnet" | "avalanche-miho-testnet" | "avalanche-bulletin-testnet" | "avalanche-kiwi-testnet" | "avalanche-hero-testnet" | "avalanche-avacloud-testnet" | "avalanche-thirdweb-testnet" | "avalanche-mondrian-testnet" | "avalanche-conduit-testnet" | "avalanche-nmac-testnet" | "avalanche-orderly-testnet" | "avalanche-amplify-testnet" | "avalanche-mirai-testnet" | "avalanche-wagmi-testnet" | "avalanche-playa3ull-testnet" | "avalanche-beam-mainnet" | "scroll-mainnet" | "eth-holesky";
|
|
9
9
|
export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
|
|
10
|
-
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.
|
|
10
|
+
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.5";
|
|
11
11
|
export declare class Response<T> {
|
|
12
12
|
data: T;
|
|
13
13
|
error: boolean;
|
|
@@ -6,7 +6,7 @@ import { PricingService } from "./PricingService";
|
|
|
6
6
|
import { TransactionService } from "./TransactionService";
|
|
7
7
|
import { XykService } from "./XykService";
|
|
8
8
|
import { ApiKeyValidator } from "../util/ApiKeyValidator";
|
|
9
|
-
export const userAgent = "com.covalenthq.sdk.typescript/0.7.
|
|
9
|
+
export const userAgent = "com.covalenthq.sdk.typescript/0.7.5";
|
|
10
10
|
export class Response {
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
@@ -25,6 +25,14 @@ declare class Pool {
|
|
|
25
25
|
total_supply: bigint | null;
|
|
26
26
|
/** * The exchange rate for the requested quote currency. */
|
|
27
27
|
quote_rate: string;
|
|
28
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
29
|
+
pretty_total_liquidity_quote: string;
|
|
30
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
31
|
+
pretty_volume_24h_quote: string;
|
|
32
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
33
|
+
pretty_fee_24h_quote: string;
|
|
34
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
35
|
+
pretty_volume_7d_quote: string;
|
|
28
36
|
/** * The requested chain name eg: `eth-mainnet`. */
|
|
29
37
|
chain_name: string;
|
|
30
38
|
/** * The requested chain ID eg: `1`. */
|
|
@@ -88,6 +96,10 @@ declare class SupportedDex {
|
|
|
88
96
|
chain_name: string;
|
|
89
97
|
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
90
98
|
dex_name: string;
|
|
99
|
+
/** * A display-friendly name for the dex. */
|
|
100
|
+
display_name: string;
|
|
101
|
+
/** * The dex logo URL. */
|
|
102
|
+
logo_url: string;
|
|
91
103
|
factory_contract_address: string;
|
|
92
104
|
router_contract_addresses: string;
|
|
93
105
|
swap_fee: number;
|
|
@@ -129,6 +141,14 @@ declare class PoolWithTimeseries {
|
|
|
129
141
|
dex_name: string;
|
|
130
142
|
volume_7d_quote: string;
|
|
131
143
|
annualized_fee: string;
|
|
144
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
145
|
+
pretty_total_liquidity_quote: string;
|
|
146
|
+
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
147
|
+
pretty_volume_24h_quote: string;
|
|
148
|
+
/** * A prettier version of the fee 24h quote for rendering purposes. */
|
|
149
|
+
pretty_fee_24h_quote: string;
|
|
150
|
+
/** * A prettier version of the volume 7d quote for rendering purposes. */
|
|
151
|
+
pretty_volume_7d_quote: string;
|
|
132
152
|
token_0: Token;
|
|
133
153
|
token_1: Token;
|
|
134
154
|
token_0_reserve_quote: string;
|
|
@@ -149,11 +169,13 @@ declare class VolumeTimeseries {
|
|
|
149
169
|
dt: string;
|
|
150
170
|
/** * The pair address. */
|
|
151
171
|
exchange: string;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
172
|
+
sum_amount0in: string;
|
|
173
|
+
sum_amount0out: string;
|
|
174
|
+
sum_amount1in: string;
|
|
175
|
+
sum_amount1out: string;
|
|
156
176
|
volume_quote: string;
|
|
177
|
+
/** * A prettier version of the volume quote for rendering purposes. */
|
|
178
|
+
pretty_volume_quote: string;
|
|
157
179
|
token_0_quote_rate: string;
|
|
158
180
|
token_1_quote_rate: string;
|
|
159
181
|
swap_count_24: string;
|
|
@@ -170,6 +192,8 @@ declare class LiquidityTimeseries {
|
|
|
170
192
|
r0_c: string;
|
|
171
193
|
r1_c: string;
|
|
172
194
|
liquidity_quote: string;
|
|
195
|
+
/** * A prettier version of the liquidity quote for rendering purposes. */
|
|
196
|
+
pretty_liquidity_quote: string;
|
|
173
197
|
token_0_quote_rate: string;
|
|
174
198
|
token_1_quote_rate: string;
|
|
175
199
|
constructor(data: LiquidityTimeseries);
|
|
@@ -182,14 +206,18 @@ declare class PriceTimeseries {
|
|
|
182
206
|
dt: string;
|
|
183
207
|
/** * The pair address. */
|
|
184
208
|
exchange: string;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
209
|
+
price_of_token0_in_token1: string;
|
|
210
|
+
/** * A prettier version of the price token0 for rendering purposes. */
|
|
211
|
+
pretty_price_of_token0_in_token1: string;
|
|
212
|
+
price_of_token0_in_token1_description: string;
|
|
213
|
+
price_of_token1_in_token0: string;
|
|
214
|
+
/** * A prettier version of the price token1 for rendering purposes. */
|
|
215
|
+
pretty_price_of_token1_in_token0: string;
|
|
216
|
+
price_of_token1_in_token0_description: string;
|
|
189
217
|
/** * The requested quote currency eg: `USD`. */
|
|
190
218
|
quote_currency: string;
|
|
191
|
-
|
|
192
|
-
|
|
219
|
+
price_of_token0_in_quote_currency: string;
|
|
220
|
+
price_of_token1_in_quote_currency: string;
|
|
193
221
|
constructor(data: PriceTimeseries);
|
|
194
222
|
}
|
|
195
223
|
declare class PoolsDexDataResponse {
|
|
@@ -345,8 +373,19 @@ declare class TokenV2Volume {
|
|
|
345
373
|
swap_count_24h: number;
|
|
346
374
|
/** * The exchange rate for the requested quote currency. */
|
|
347
375
|
quote_rate: number;
|
|
376
|
+
/** * The 24h exchange rate for the requested quote currency. */
|
|
377
|
+
quote_rate_24h: number;
|
|
378
|
+
/** * A prettier version of the exchange rate for rendering purposes. */
|
|
379
|
+
pretty_quote_rate: string;
|
|
380
|
+
/** * A prettier version of the 24h exchange rate for rendering purposes. */
|
|
381
|
+
pretty_quote_rate_24h: string;
|
|
382
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
383
|
+
pretty_total_liquidity_quote: string;
|
|
384
|
+
/** * A prettier version of the 24h volume quote for rendering purposes. */
|
|
385
|
+
pretty_total_volume_24h_quote: string;
|
|
348
386
|
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
349
387
|
total_liquidity_quote: number;
|
|
388
|
+
/** * The total volume 24h converted to fiat in `quote-currency`. */
|
|
350
389
|
total_volume_24h_quote: number;
|
|
351
390
|
constructor(data: TokenV2Volume);
|
|
352
391
|
}
|
|
@@ -393,15 +432,18 @@ declare class ExchangeTransaction {
|
|
|
393
432
|
act: string;
|
|
394
433
|
/** * The requested address. */
|
|
395
434
|
address: string;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
435
|
+
amount_0: number;
|
|
436
|
+
amount_1: number;
|
|
437
|
+
amount_0_in: number;
|
|
438
|
+
amount_0_out: number;
|
|
439
|
+
amount_1_in: number;
|
|
440
|
+
amount_1_out: number;
|
|
401
441
|
to_address: string;
|
|
402
442
|
from_address: string;
|
|
403
443
|
sender_address: string;
|
|
404
444
|
total_quote: number;
|
|
445
|
+
/** * A prettier version of the total quote for rendering purposes. */
|
|
446
|
+
pretty_total_quote: string;
|
|
405
447
|
token_0: PoolToken;
|
|
406
448
|
token_1: PoolToken;
|
|
407
449
|
token_0_quote_rate: number;
|
|
@@ -22,6 +22,10 @@ class Pool {
|
|
|
22
22
|
this.fee_24h_quote = data.fee_24h_quote;
|
|
23
23
|
this.total_supply = data.total_supply && data.total_supply !== null ? BigInt(data.total_supply) : null;
|
|
24
24
|
this.quote_rate = data.quote_rate;
|
|
25
|
+
this.pretty_total_liquidity_quote = data.pretty_total_liquidity_quote;
|
|
26
|
+
this.pretty_volume_24h_quote = data.pretty_volume_24h_quote;
|
|
27
|
+
this.pretty_fee_24h_quote = data.pretty_fee_24h_quote;
|
|
28
|
+
this.pretty_volume_7d_quote = data.pretty_volume_7d_quote;
|
|
25
29
|
this.chain_name = data.chain_name;
|
|
26
30
|
this.chain_id = data.chain_id;
|
|
27
31
|
this.dex_name = data.dex_name;
|
|
@@ -68,6 +72,8 @@ class SupportedDex {
|
|
|
68
72
|
this.chain_id = data.chain_id;
|
|
69
73
|
this.chain_name = data.chain_name;
|
|
70
74
|
this.dex_name = data.dex_name;
|
|
75
|
+
this.display_name = data.display_name;
|
|
76
|
+
this.logo_url = data.logo_url;
|
|
71
77
|
this.factory_contract_address = data.factory_contract_address;
|
|
72
78
|
this.router_contract_addresses = data.router_contract_addresses;
|
|
73
79
|
this.swap_fee = data.swap_fee;
|
|
@@ -101,6 +107,10 @@ class PoolWithTimeseries {
|
|
|
101
107
|
this.dex_name = data.dex_name;
|
|
102
108
|
this.volume_7d_quote = data.volume_7d_quote;
|
|
103
109
|
this.annualized_fee = data.annualized_fee;
|
|
110
|
+
this.pretty_total_liquidity_quote = data.pretty_total_liquidity_quote;
|
|
111
|
+
this.pretty_volume_24h_quote = data.pretty_volume_24h_quote;
|
|
112
|
+
this.pretty_fee_24h_quote = data.pretty_fee_24h_quote;
|
|
113
|
+
this.pretty_volume_7d_quote = data.pretty_volume_7d_quote;
|
|
104
114
|
this.token_0_reserve_quote = data.token_0_reserve_quote;
|
|
105
115
|
this.token_1_reserve_quote = data.token_1_reserve_quote;
|
|
106
116
|
this.token_0 = data.token_0 && data.token_0 !== null ? new Token(data.token_0) : null;
|
|
@@ -119,11 +129,12 @@ class VolumeTimeseries {
|
|
|
119
129
|
this.chain_id = data.chain_id;
|
|
120
130
|
this.dt = data.dt;
|
|
121
131
|
this.exchange = data.exchange;
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
132
|
+
this.sum_amount0in = data.sum_amount0in;
|
|
133
|
+
this.sum_amount0out = data.sum_amount0out;
|
|
134
|
+
this.sum_amount1in = data.sum_amount1in;
|
|
135
|
+
this.sum_amount1out = data.sum_amount1out;
|
|
126
136
|
this.volume_quote = data.volume_quote;
|
|
137
|
+
this.pretty_volume_quote = data.pretty_volume_quote;
|
|
127
138
|
this.token_0_quote_rate = data.token_0_quote_rate;
|
|
128
139
|
this.token_1_quote_rate = data.token_1_quote_rate;
|
|
129
140
|
this.swap_count_24 = data.swap_count_24;
|
|
@@ -138,6 +149,7 @@ class LiquidityTimeseries {
|
|
|
138
149
|
this.r0_c = data.r0_c;
|
|
139
150
|
this.r1_c = data.r1_c;
|
|
140
151
|
this.liquidity_quote = data.liquidity_quote;
|
|
152
|
+
this.pretty_liquidity_quote = data.pretty_liquidity_quote;
|
|
141
153
|
this.token_0_quote_rate = data.token_0_quote_rate;
|
|
142
154
|
this.token_1_quote_rate = data.token_1_quote_rate;
|
|
143
155
|
}
|
|
@@ -148,13 +160,15 @@ class PriceTimeseries {
|
|
|
148
160
|
this.chain_id = data.chain_id;
|
|
149
161
|
this.dt = data.dt;
|
|
150
162
|
this.exchange = data.exchange;
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
163
|
+
this.price_of_token0_in_token1 = data.price_of_token0_in_token1;
|
|
164
|
+
this.pretty_price_of_token0_in_token1 = data.pretty_price_of_token0_in_token1;
|
|
165
|
+
this.price_of_token0_in_token1_description = data.price_of_token0_in_token1_description;
|
|
166
|
+
this.price_of_token1_in_token0 = data.price_of_token1_in_token0;
|
|
167
|
+
this.pretty_price_of_token1_in_token0 = data.pretty_price_of_token1_in_token0;
|
|
168
|
+
this.price_of_token1_in_token0_description = data.price_of_token1_in_token0_description;
|
|
155
169
|
this.quote_currency = data.quote_currency;
|
|
156
|
-
this.
|
|
157
|
-
this.
|
|
170
|
+
this.price_of_token0_in_quote_currency = data.price_of_token0_in_quote_currency;
|
|
171
|
+
this.price_of_token1_in_quote_currency = data.price_of_token1_in_quote_currency;
|
|
158
172
|
}
|
|
159
173
|
}
|
|
160
174
|
class PoolsDexDataResponse {
|
|
@@ -259,6 +273,11 @@ class TokenV2Volume {
|
|
|
259
273
|
this.contract_decimals = data.contract_decimals;
|
|
260
274
|
this.swap_count_24h = data.swap_count_24h;
|
|
261
275
|
this.quote_rate = data.quote_rate;
|
|
276
|
+
this.quote_rate_24h = data.quote_rate_24h;
|
|
277
|
+
this.pretty_quote_rate = data.pretty_quote_rate;
|
|
278
|
+
this.pretty_quote_rate_24h = data.pretty_quote_rate_24h;
|
|
279
|
+
this.pretty_total_liquidity_quote = data.pretty_total_liquidity_quote;
|
|
280
|
+
this.pretty_total_volume_24h_quote = data.pretty_total_volume_24h_quote;
|
|
262
281
|
this.total_liquidity_quote = data.total_liquidity_quote;
|
|
263
282
|
this.total_volume_24h_quote = data.total_volume_24h_quote;
|
|
264
283
|
}
|
|
@@ -294,15 +313,17 @@ class ExchangeTransaction {
|
|
|
294
313
|
this.tx_hash = data.tx_hash;
|
|
295
314
|
this.act = data.act;
|
|
296
315
|
this.address = data.address;
|
|
297
|
-
this.
|
|
298
|
-
this.
|
|
299
|
-
this.
|
|
300
|
-
this.
|
|
301
|
-
this.
|
|
316
|
+
this.amount_0 = data.amount_0;
|
|
317
|
+
this.amount_1 = data.amount_1;
|
|
318
|
+
this.amount_0_in = data.amount_0_in;
|
|
319
|
+
this.amount_0_out = data.amount_0_out;
|
|
320
|
+
this.amount_1_in = data.amount_1_in;
|
|
321
|
+
this.amount_1_out = data.amount_1_out;
|
|
302
322
|
this.to_address = data.to_address;
|
|
303
323
|
this.from_address = data.from_address;
|
|
304
324
|
this.sender_address = data.sender_address;
|
|
305
325
|
this.total_quote = data.total_quote;
|
|
326
|
+
this.pretty_total_quote = data.pretty_total_quote;
|
|
306
327
|
this.token_0_quote_rate = data.token_0_quote_rate;
|
|
307
328
|
this.token_1_quote_rate = data.token_1_quote_rate;
|
|
308
329
|
this.token_0 = data.token_0 && data.token_0 !== null ? new PoolToken(data.token_0) : null;
|