@covalenthq/client-sdk 0.7.2 → 0.7.4
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 +2 -1
- package/dist/cjs/index.js +285 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/CovalentClient.d.ts +2 -2
- package/dist/cjs/services/TransactionService.d.ts +45 -0
- package/dist/cjs/services/XykService.d.ts +51 -10
- package/dist/cjs/util/Chains.d.ts +19 -1
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/cjs/util/types/XykServiceTypes.d.ts +51 -10
- package/dist/es/index.js +285 -13
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/CovalentClient.d.ts +2 -2
- package/dist/es/services/TransactionService.d.ts +45 -0
- package/dist/es/services/XykService.d.ts +51 -10
- package/dist/es/util/Chains.d.ts +19 -1
- package/dist/es/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/es/util/types/XykServiceTypes.d.ts +51 -10
- package/dist/esm/index.js +285 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/CovalentClient.d.ts +2 -2
- package/dist/esm/services/TransactionService.d.ts +45 -0
- package/dist/esm/services/XykService.d.ts +51 -10
- package/dist/esm/util/Chains.d.ts +19 -1
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/esm/util/types/XykServiceTypes.d.ts +51 -10
- package/dist/services/CovalentClient.d.ts +2 -2
- package/dist/services/CovalentClient.js +1 -1
- package/dist/services/TransactionService.d.ts +45 -0
- package/dist/services/TransactionService.js +236 -2
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +51 -10
- package/dist/services/XykService.js +30 -10
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/Chains.d.ts +19 -1
- package/dist/util/Chains.js +18 -0
- package/dist/util/Chains.js.map +1 -1
- package/dist/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/util/types/XykServiceTypes.d.ts +51 -10
- package/package.json +1 -1
|
@@ -5,9 +5,9 @@ import { NftService } from "./NftService";
|
|
|
5
5
|
import { PricingService } from "./PricingService";
|
|
6
6
|
import { TransactionService } from "./TransactionService";
|
|
7
7
|
import { XykService } from "./XykService";
|
|
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-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";
|
|
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.4";
|
|
11
11
|
export declare class Response<T> {
|
|
12
12
|
data: T;
|
|
13
13
|
error: boolean;
|
|
@@ -431,6 +431,31 @@ declare class TransactionsResponse {
|
|
|
431
431
|
prev(): Promise<Response<TransactionsResponse>>;
|
|
432
432
|
next(): Promise<Response<TransactionsResponse>>;
|
|
433
433
|
}
|
|
434
|
+
declare class TransactionsTimeBucketResponse {
|
|
435
|
+
private _debug;
|
|
436
|
+
private _apiKey;
|
|
437
|
+
private _threadCount;
|
|
438
|
+
private _urlParams;
|
|
439
|
+
/** * The requested address. */
|
|
440
|
+
address: string;
|
|
441
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
442
|
+
updated_at: Date;
|
|
443
|
+
/** * The requested quote currency eg: `USD`. */
|
|
444
|
+
quote_currency: string;
|
|
445
|
+
/** * The requested chain ID eg: `1`. */
|
|
446
|
+
chain_id: number;
|
|
447
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
448
|
+
chain_name: string;
|
|
449
|
+
complete: boolean;
|
|
450
|
+
/** * The current bucket of the response. */
|
|
451
|
+
current_bucket: number;
|
|
452
|
+
links: PaginationLinks;
|
|
453
|
+
/** * List of response items. */
|
|
454
|
+
items: Transaction[];
|
|
455
|
+
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams);
|
|
456
|
+
prev(): Promise<Response<TransactionsTimeBucketResponse>>;
|
|
457
|
+
next(): Promise<Response<TransactionsTimeBucketResponse>>;
|
|
458
|
+
}
|
|
434
459
|
export interface GetTransactionQueryParamOpts {
|
|
435
460
|
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
436
461
|
quoteCurrency?: Quote;
|
|
@@ -473,6 +498,14 @@ export interface GetTransactionsForAddressV3QueryParamOpts {
|
|
|
473
498
|
/** * Include safe details. */
|
|
474
499
|
withSafe?: boolean;
|
|
475
500
|
}
|
|
501
|
+
export interface GetTimeBucketTransactionsForAddressQueryParamOpts {
|
|
502
|
+
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
503
|
+
quoteCurrency?: Quote;
|
|
504
|
+
/** * Omit log events. */
|
|
505
|
+
noLogs?: boolean;
|
|
506
|
+
/** * Include safe details. */
|
|
507
|
+
withSafe?: boolean;
|
|
508
|
+
}
|
|
476
509
|
export declare class TransactionService {
|
|
477
510
|
private apiKey;
|
|
478
511
|
private debug;
|
|
@@ -559,5 +592,17 @@ export declare class TransactionService {
|
|
|
559
592
|
*
|
|
560
593
|
*/
|
|
561
594
|
getTransactionsForAddressV3(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
598
|
+
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
599
|
+
* @param {number} timeBucket - The 0-indexed 15-minute time bucket. E.g. 27 Feb 2023 05:23 GMT = 1677475383 (Unix time). 1677475383/900=1863861 timeBucket.
|
|
600
|
+
* @param {GetTimeBucketTransactionsForAddressQueryParamOpts} queryParamOpts
|
|
601
|
+
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
602
|
+
* - `noLogs`: Omit log events.
|
|
603
|
+
* - `withSafe`: Include safe details.
|
|
604
|
+
*
|
|
605
|
+
*/
|
|
606
|
+
getTimeBucketTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
|
|
562
607
|
}
|
|
563
608
|
export {};
|
|
@@ -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
|
}
|
|
@@ -402,6 +441,8 @@ declare class ExchangeTransaction {
|
|
|
402
441
|
from_address: string;
|
|
403
442
|
sender_address: string;
|
|
404
443
|
total_quote: number;
|
|
444
|
+
/** * A prettier version of the total quote for rendering purposes. */
|
|
445
|
+
pretty_total_quote: string;
|
|
405
446
|
token_0: PoolToken;
|
|
406
447
|
token_1: PoolToken;
|
|
407
448
|
token_0_quote_rate: number;
|
|
@@ -176,5 +176,23 @@ export declare enum Chains {
|
|
|
176
176
|
OPTIMISM_SEPOLIA = "optimism-sepolia",
|
|
177
177
|
BNB_OPBNB_MAINNET = "bnb-opbnb-mainnet",
|
|
178
178
|
TELOS_MAINNET = "telos-mainnet",
|
|
179
|
-
TELOS_TESTNET = "telos-testnet"
|
|
179
|
+
TELOS_TESTNET = "telos-testnet",
|
|
180
|
+
AVALANCHE_HUBBLE_EXCHANGE_TESTNET = "avalanche-hubble-exchange-testnet",
|
|
181
|
+
AVALANCHE_MIHO_TESTNET = "avalanche-miho-testnet",
|
|
182
|
+
AVALANCHE_BULLETIN_TESTNET = "avalanche-bulletin-testnet",
|
|
183
|
+
AVALANCHE_KIWI_TESTNET = "avalanche-kiwi-testnet",
|
|
184
|
+
AVALANCHE_HERO_TESTNET = "avalanche-hero-testnet",
|
|
185
|
+
AVALANCHE_AVACLOUD_TESTNET = "avalanche-avacloud-testnet",
|
|
186
|
+
AVALANCHE_THIRDWEB_TESTNET = "avalanche-thirdweb-testnet",
|
|
187
|
+
AVALANCHE_MONDRIAN_TESTNET = "avalanche-mondrian-testnet",
|
|
188
|
+
AVALANCHE_CONDUIT_TESTNET = "avalanche-conduit-testnet",
|
|
189
|
+
AVALANCHE_NMAC_TESTNET = "avalanche-nmac-testnet",
|
|
190
|
+
AVALANCHE_ORDERLY_TESTNET = "avalanche-orderly-testnet",
|
|
191
|
+
AVALANCHE_AMPLIFY_TESTNET = "avalanche-amplify-testnet",
|
|
192
|
+
AVALANCHE_MIRAI_TESTNET = "avalanche-mirai-testnet",
|
|
193
|
+
AVALANCHE_WAGMI_TESTNET = "avalanche-wagmi-testnet",
|
|
194
|
+
AVALANCHE_PLAYA3ULL_TESTNET = "avalanche-playa3ull-testnet",
|
|
195
|
+
AVALANCHE_BEAM_MAINNET = "avalanche-beam-mainnet",
|
|
196
|
+
SCROLL_MAINNET = "scroll-mainnet",
|
|
197
|
+
ETH_HOLESKY = "eth-holesky"
|
|
180
198
|
}
|
|
@@ -284,6 +284,24 @@ export interface PaginationLinks {
|
|
|
284
284
|
/** * URL link to the previous page. */
|
|
285
285
|
next: string;
|
|
286
286
|
}
|
|
287
|
+
export interface TransactionsTimeBucketResponse {
|
|
288
|
+
/** * The requested address. */
|
|
289
|
+
address: string;
|
|
290
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
291
|
+
updated_at: Date;
|
|
292
|
+
/** * The requested quote currency eg: `USD`. */
|
|
293
|
+
quote_currency: string;
|
|
294
|
+
/** * The requested chain ID eg: `1`. */
|
|
295
|
+
chain_id: number;
|
|
296
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
297
|
+
chain_name: string;
|
|
298
|
+
complete: boolean;
|
|
299
|
+
/** * The current bucket of the response. */
|
|
300
|
+
current_bucket: number;
|
|
301
|
+
links: PaginationLinks;
|
|
302
|
+
/** * List of response items. */
|
|
303
|
+
items: Transaction[];
|
|
304
|
+
}
|
|
287
305
|
export interface TransactionsBlockResponse {
|
|
288
306
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
289
307
|
updated_at: Date;
|
|
@@ -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 {
|
|
@@ -367,6 +406,8 @@ export interface ExchangeTransaction {
|
|
|
367
406
|
from_address: string;
|
|
368
407
|
sender_address: string;
|
|
369
408
|
total_quote: number;
|
|
409
|
+
/** * A prettier version of the total quote for rendering purposes. */
|
|
410
|
+
pretty_total_quote: string;
|
|
370
411
|
token_0: PoolToken;
|
|
371
412
|
token_1: PoolToken;
|
|
372
413
|
token_0_quote_rate: number;
|