@covalenthq/client-sdk 0.9.3 → 0.9.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/README.md +72 -51
- package/dist/cjs/index.js +59 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +8 -6
- package/dist/cjs/services/BaseService.d.ts +12 -1
- package/dist/cjs/services/CovalentClient.d.ts +3 -3
- package/dist/cjs/services/NftService.d.ts +12 -8
- package/dist/cjs/services/PricingService.d.ts +13 -2
- package/dist/cjs/services/TransactionService.d.ts +13 -11
- package/dist/cjs/services/XykService.d.ts +50 -50
- package/dist/cjs/util/Chains.d.ts +29 -4
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +6 -14
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +9 -1
- package/dist/cjs/util/types/GenericTypes.d.ts +12 -0
- package/dist/cjs/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/cjs/util/types/PricingServiceTypes.d.ts +4 -2
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +10 -10
- package/dist/cjs/util/types/XykServiceTypes.d.ts +51 -51
- package/dist/es/index.js +59 -14
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +8 -6
- package/dist/es/services/BaseService.d.ts +12 -1
- package/dist/es/services/CovalentClient.d.ts +3 -3
- package/dist/es/services/NftService.d.ts +12 -8
- package/dist/es/services/PricingService.d.ts +13 -2
- package/dist/es/services/TransactionService.d.ts +13 -11
- package/dist/es/services/XykService.d.ts +50 -50
- package/dist/es/util/Chains.d.ts +29 -4
- package/dist/es/util/types/BalanceServiceTypes.d.ts +6 -14
- package/dist/es/util/types/BaseServiceTypes.d.ts +9 -1
- package/dist/es/util/types/GenericTypes.d.ts +12 -0
- package/dist/es/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/es/util/types/PricingServiceTypes.d.ts +4 -2
- package/dist/es/util/types/TransactionServiceTypes.d.ts +10 -10
- package/dist/es/util/types/XykServiceTypes.d.ts +51 -51
- package/dist/esm/index.js +59 -14
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +8 -6
- package/dist/esm/services/BaseService.d.ts +12 -1
- package/dist/esm/services/CovalentClient.d.ts +3 -3
- package/dist/esm/services/NftService.d.ts +12 -8
- package/dist/esm/services/PricingService.d.ts +13 -2
- package/dist/esm/services/TransactionService.d.ts +13 -11
- package/dist/esm/services/XykService.d.ts +50 -50
- package/dist/esm/util/Chains.d.ts +29 -4
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +6 -14
- package/dist/esm/util/types/BaseServiceTypes.d.ts +9 -1
- package/dist/esm/util/types/GenericTypes.d.ts +12 -0
- package/dist/esm/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/esm/util/types/PricingServiceTypes.d.ts +4 -2
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +10 -10
- package/dist/esm/util/types/XykServiceTypes.d.ts +51 -51
- package/dist/services/BalanceService.d.ts +8 -6
- package/dist/services/BalanceService.js +1 -0
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +12 -1
- package/dist/services/BaseService.js +9 -1
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +3 -3
- package/dist/services/CovalentClient.js +1 -1
- package/dist/services/NftService.d.ts +12 -8
- package/dist/services/NftService.js +2 -0
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.d.ts +13 -2
- package/dist/services/PricingService.js +8 -0
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +13 -11
- package/dist/services/TransactionService.js +1 -0
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +50 -50
- package/dist/services/XykService.js +6 -6
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/Chains.d.ts +29 -4
- package/dist/util/Chains.js +28 -3
- package/dist/util/Chains.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +6 -14
- package/dist/util/types/BaseServiceTypes.d.ts +9 -1
- package/dist/util/types/GenericTypes.d.ts +12 -0
- package/dist/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/util/types/PricingServiceTypes.d.ts +4 -2
- package/dist/util/types/TransactionServiceTypes.d.ts +10 -10
- package/dist/util/types/XykServiceTypes.d.ts +51 -51
- package/package.json +1 -1
|
@@ -35,10 +35,10 @@ export declare enum Chains {
|
|
|
35
35
|
HECO_TESTNET = "heco-testnet",
|
|
36
36
|
NERVOS_GODWOKEN_TESTNET = "nervos-godwoken-testnet",
|
|
37
37
|
EVMOS_TESTNET = "evmos-testnet",
|
|
38
|
-
ASTAR_SHIDEN = "astar-shiden",
|
|
39
38
|
IOTEX_TESTNET = "iotex-testnet",
|
|
40
39
|
HARMONY_TESTNET = "harmony-testnet",
|
|
41
40
|
AURORA_TESTNET = "aurora-testnet",
|
|
41
|
+
SCROLL_L2_TESTNET = "scroll-l2-testnet",
|
|
42
42
|
SCROLL_SEPOLIA_TESTNET = "scroll-sepolia-testnet",
|
|
43
43
|
COVALENT_INTERNAL_NETWORK_V1 = "covalent-internal-network-v1",
|
|
44
44
|
DEFI_KINGDOMS_MAINNET = "defi-kingdoms-mainnet",
|
|
@@ -109,13 +109,13 @@ export declare enum Chains {
|
|
|
109
109
|
HORIZEN_GOBI_TESTNET = "horizen-gobi-testnet",
|
|
110
110
|
ETH_SEPOLIA = "eth-sepolia",
|
|
111
111
|
SKALE_NEBULA = "skale-nebula",
|
|
112
|
-
|
|
112
|
+
SKALE_BATTLEGROUND = "skale-battleground",
|
|
113
113
|
AVALANCHE_MELD_TESTNET = "avalanche-meld-testnet",
|
|
114
114
|
GUNZILLA_TESTNET = "gunzilla-testnet",
|
|
115
115
|
ULTRON_MAINNET = "ultron-mainnet",
|
|
116
116
|
ULTRON_TESTNET = "ultron-testnet",
|
|
117
117
|
ZORA_MAINNET = "zora-mainnet",
|
|
118
|
-
|
|
118
|
+
ZORA_GOERLI_TESTNET = "zora-goerli-testnet",
|
|
119
119
|
NEON_MAINNET = "neon-mainnet",
|
|
120
120
|
AVALANCHE_SHRAPNEL_MAINNET = "avalanche-shrapnel-mainnet",
|
|
121
121
|
BASE_MAINNET = "base-mainnet",
|
|
@@ -194,5 +194,30 @@ export declare enum Chains {
|
|
|
194
194
|
AVALANCHE_PLAYA3ULL_TESTNET = "avalanche-playa3ull-testnet",
|
|
195
195
|
AVALANCHE_BEAM_MAINNET = "avalanche-beam-mainnet",
|
|
196
196
|
SCROLL_MAINNET = "scroll-mainnet",
|
|
197
|
-
ETH_HOLESKY = "eth-holesky"
|
|
197
|
+
ETH_HOLESKY = "eth-holesky",
|
|
198
|
+
TOMOCHAIN_MAINNET = "tomochain-mainnet",
|
|
199
|
+
TOMOCHAIN_TESTNET = "tomochain-testnet",
|
|
200
|
+
AVALANCHE_JONO11_TESTNET = "avalanche-jono11-testnet",
|
|
201
|
+
BASE_SEPOLIA_TESTNET = "base-sepolia-testnet",
|
|
202
|
+
XAI_TESTNET = "xai-testnet",
|
|
203
|
+
ARBITRUM_SEPOLIA = "arbitrum-sepolia",
|
|
204
|
+
LUMOZ_PUBLIC_ZKSYNC_V2 = "lumoz-public-zksync-v2",
|
|
205
|
+
LUMOZ_DECIBLING = "lumoz-decibling",
|
|
206
|
+
LUMOZ_STARK_SPORT = "lumoz-stark-sport",
|
|
207
|
+
AVALANCHE_LT0_TESTNET = "avalanche-lt0-testnet",
|
|
208
|
+
AVALANCHE_LT1_TESTNET = "avalanche-lt1-testnet",
|
|
209
|
+
AVALANCHE_LT2_TESTNET = "avalanche-lt2-testnet",
|
|
210
|
+
AVALANCHE_LT3_TESTNET = "avalanche-lt3-testnet",
|
|
211
|
+
AVALANCHE_LT4_TESTNET = "avalanche-lt4-testnet",
|
|
212
|
+
AVALANCHE_LT5_TESTNET = "avalanche-lt5-testnet",
|
|
213
|
+
SYNDR_TESTNET = "syndr-testnet",
|
|
214
|
+
CROSSFI_EVM_TESTNET = "crossfi-evm-testnet",
|
|
215
|
+
CELO_MAINNET = "celo-mainnet",
|
|
216
|
+
TAIKO_KATLA_TESTNET = "taiko-katla-testnet",
|
|
217
|
+
MOVEMENT_MEVM_TESTNET = "movement-mevm-testnet",
|
|
218
|
+
ZORA_SEPOLIA_TESTNET = "zora-sepolia-testnet",
|
|
219
|
+
MERLIN_MAINNET = "merlin-mainnet",
|
|
220
|
+
MERLIN_TESTNET = "merlin-testnet",
|
|
221
|
+
AVALANCHE_HUBBLE_EXCHANGE_MAINNET = "avalanche-hubble-exchange-mainnet",
|
|
222
|
+
XAI_MAINNET = "xai-mainnet"
|
|
198
223
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NftData, Pagination, Explorer, ContractMetadata } from "./GenericTypes";
|
|
1
|
+
import { NftData, Pagination, Explorer, ContractMetadata, LogoUrls } from "./GenericTypes";
|
|
2
2
|
export interface BalancesResponse {
|
|
3
3
|
/** * The requested address. */
|
|
4
4
|
address: string;
|
|
@@ -25,10 +25,10 @@ export interface BalanceItem {
|
|
|
25
25
|
/** * A display-friendly name for the contract. */
|
|
26
26
|
contract_display_name: string;
|
|
27
27
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
28
|
-
supports_erc: string;
|
|
28
|
+
supports_erc: string[];
|
|
29
29
|
/** * The contract logo URL. */
|
|
30
30
|
logo_url: string;
|
|
31
|
-
/** * The
|
|
31
|
+
/** * The contract logo URLs. */
|
|
32
32
|
logo_urls: LogoUrls;
|
|
33
33
|
/** * The timestamp when the token was transferred. */
|
|
34
34
|
last_transferred_at: Date;
|
|
@@ -59,14 +59,6 @@ export interface BalanceItem {
|
|
|
59
59
|
/** * NFT-specific data. */
|
|
60
60
|
nft_data: NftData[];
|
|
61
61
|
}
|
|
62
|
-
export interface LogoUrls {
|
|
63
|
-
/** * The token logo URL. */
|
|
64
|
-
token_logo_url: string;
|
|
65
|
-
/** * The protocol logo URL. */
|
|
66
|
-
protocol_logo_url: string;
|
|
67
|
-
/** * The chain logo URL. */
|
|
68
|
-
chain_logo_url: string;
|
|
69
|
-
}
|
|
70
62
|
export interface ProtocolMetadata {
|
|
71
63
|
/** * The name of the protocol. */
|
|
72
64
|
protocol_name: string;
|
|
@@ -246,7 +238,7 @@ export interface TokenHolder {
|
|
|
246
238
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
247
239
|
contract_address: string;
|
|
248
240
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
249
|
-
supports_erc: string;
|
|
241
|
+
supports_erc: string[];
|
|
250
242
|
/** * The contract logo URL. */
|
|
251
243
|
logo_url: string;
|
|
252
244
|
/** * The requested address. */
|
|
@@ -282,7 +274,7 @@ export interface HistoricalBalanceItem {
|
|
|
282
274
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
283
275
|
contract_address: string;
|
|
284
276
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
285
|
-
supports_erc: string;
|
|
277
|
+
supports_erc: string[];
|
|
286
278
|
/** * The contract logo URL. */
|
|
287
279
|
logo_url: string;
|
|
288
280
|
/** * The height of the block. */
|
|
@@ -332,7 +324,7 @@ export interface NativeBalanceItem {
|
|
|
332
324
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
333
325
|
contract_address: string;
|
|
334
326
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
335
|
-
supports_erc: string;
|
|
327
|
+
supports_erc: string[];
|
|
336
328
|
/** * The contract logo URL. */
|
|
337
329
|
logo_url: string;
|
|
338
330
|
/** * The height of the block. */
|
|
@@ -54,10 +54,16 @@ export interface BlockHeightsResponse {
|
|
|
54
54
|
/** * The requested chain name eg: `eth-mainnet`. */
|
|
55
55
|
chain_name: string;
|
|
56
56
|
/** * List of response items. */
|
|
57
|
-
items:
|
|
57
|
+
items: BlockHeights[];
|
|
58
58
|
/** * Pagination metadata. */
|
|
59
59
|
pagination: Pagination;
|
|
60
60
|
}
|
|
61
|
+
export interface BlockHeights {
|
|
62
|
+
/** * The block signed timestamp in UTC. */
|
|
63
|
+
signed_at: Date;
|
|
64
|
+
/** * The block height. */
|
|
65
|
+
height: number;
|
|
66
|
+
}
|
|
61
67
|
export interface GetLogsResponse {
|
|
62
68
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
63
69
|
updated_at: Date;
|
|
@@ -95,6 +101,8 @@ export interface GetLogsEvent {
|
|
|
95
101
|
sender_address_label: string;
|
|
96
102
|
/** * The contract logo URL. */
|
|
97
103
|
sender_logo_url: string;
|
|
104
|
+
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
105
|
+
sender_factory_address: string;
|
|
98
106
|
/** * The log events in raw. */
|
|
99
107
|
raw_log_data: string;
|
|
100
108
|
/** * The decoded item. */
|
|
@@ -18,6 +18,8 @@ export interface NftData {
|
|
|
18
18
|
token_url: string;
|
|
19
19
|
/** * The original minter. */
|
|
20
20
|
original_owner: string;
|
|
21
|
+
/** * The current holder of this NFT. */
|
|
22
|
+
current_owner: string;
|
|
21
23
|
external_data: NftExternalData;
|
|
22
24
|
/** * If `true`, the asset data is available from the Covalent CDN. */
|
|
23
25
|
asset_cached: boolean;
|
|
@@ -75,6 +77,8 @@ export interface LogEvent {
|
|
|
75
77
|
sender_address_label: string;
|
|
76
78
|
/** * The contract logo URL. */
|
|
77
79
|
sender_logo_url: string;
|
|
80
|
+
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
81
|
+
sender_factory_address: string;
|
|
78
82
|
/** * The log events in raw. */
|
|
79
83
|
raw_log_data: string;
|
|
80
84
|
/** * The decoded item. */
|
|
@@ -100,3 +104,11 @@ export interface Explorer {
|
|
|
100
104
|
/** * The URL of the explorer. */
|
|
101
105
|
url: string;
|
|
102
106
|
}
|
|
107
|
+
export interface LogoUrls {
|
|
108
|
+
/** * The token logo URL. */
|
|
109
|
+
token_logo_url: string;
|
|
110
|
+
/** * The protocol logo URL. */
|
|
111
|
+
protocol_logo_url: string;
|
|
112
|
+
/** * The chain logo URL. */
|
|
113
|
+
chain_logo_url: string;
|
|
114
|
+
}
|
|
@@ -39,13 +39,13 @@ export interface NftTokenContractBalanceItem {
|
|
|
39
39
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
40
40
|
contract_address: string;
|
|
41
41
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
42
|
-
supports_erc: string;
|
|
42
|
+
supports_erc: string[];
|
|
43
43
|
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
44
44
|
is_spam: boolean;
|
|
45
45
|
last_transfered_at: Date;
|
|
46
46
|
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
47
47
|
balance: bigint | null;
|
|
48
|
-
balance_24h:
|
|
48
|
+
balance_24h: string;
|
|
49
49
|
type: string;
|
|
50
50
|
/** * The current floor price converted to fiat in `quote-currency`. The floor price is determined by the last minimum sale price within the last 30 days across all the supported markets where the collection is sold on. */
|
|
51
51
|
floor_price_quote: number;
|
|
@@ -97,7 +97,7 @@ export interface NftTransaction {
|
|
|
97
97
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
98
98
|
contract_address: string;
|
|
99
99
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
100
|
-
supports_erc: string;
|
|
100
|
+
supports_erc: string[];
|
|
101
101
|
nft_transactions: NftTransactionItem[];
|
|
102
102
|
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
103
103
|
is_spam: boolean;
|
|
@@ -127,11 +127,11 @@ export interface NftTransactionItem {
|
|
|
127
127
|
value_quote: number;
|
|
128
128
|
/** * A prettier version of the quote for rendering purposes. */
|
|
129
129
|
pretty_value_quote: string;
|
|
130
|
-
gas_offered:
|
|
130
|
+
gas_offered: number;
|
|
131
131
|
/** * The gas spent for this tx. */
|
|
132
|
-
gas_spent:
|
|
132
|
+
gas_spent: number;
|
|
133
133
|
/** * The gas price at the time of this tx. */
|
|
134
|
-
gas_price:
|
|
134
|
+
gas_price: number;
|
|
135
135
|
/** * The total transaction fees (gas_price * gas_spent) paid for this tx, denoted in wei. */
|
|
136
136
|
fees_paid: bigint | null;
|
|
137
137
|
/** * The gas spent in `quote-currency` denomination. */
|
|
@@ -217,11 +217,11 @@ export interface NftOwnershipForCollectionItem {
|
|
|
217
217
|
/** * The token's id. */
|
|
218
218
|
token_id: bigint | null;
|
|
219
219
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
220
|
-
supports_erc: string;
|
|
220
|
+
supports_erc: string[];
|
|
221
221
|
last_transfered_at: Date;
|
|
222
222
|
/** * Nft balance. */
|
|
223
223
|
balance: bigint | null;
|
|
224
|
-
balance_24h:
|
|
224
|
+
balance_24h: string;
|
|
225
225
|
type: string;
|
|
226
226
|
nft_data: NftData;
|
|
227
227
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContractMetadata } from "./GenericTypes";
|
|
1
|
+
import { ContractMetadata, LogoUrls } from "./GenericTypes";
|
|
2
2
|
export interface TokenPricesResponse {
|
|
3
3
|
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
4
4
|
contract_decimals: number;
|
|
@@ -9,12 +9,14 @@ export interface TokenPricesResponse {
|
|
|
9
9
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
10
10
|
contract_address: string;
|
|
11
11
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
12
|
-
supports_erc: string;
|
|
12
|
+
supports_erc: string[];
|
|
13
13
|
/** * The contract logo URL. */
|
|
14
14
|
logo_url: string;
|
|
15
15
|
update_at: Date;
|
|
16
16
|
/** * The requested quote currency eg: `USD`. */
|
|
17
17
|
quote_currency: string;
|
|
18
|
+
/** * The contract logo URLs. */
|
|
19
|
+
logo_urls: LogoUrls;
|
|
18
20
|
/** * List of response items. */
|
|
19
21
|
prices: Price[];
|
|
20
22
|
/** * List of response items. */
|
|
@@ -40,11 +40,11 @@ export interface Transaction {
|
|
|
40
40
|
pretty_value_quote: string;
|
|
41
41
|
/** * The requested chain native gas token metadata. */
|
|
42
42
|
gas_metadata: ContractMetadata;
|
|
43
|
-
gas_offered:
|
|
43
|
+
gas_offered: number;
|
|
44
44
|
/** * The gas spent for this tx. */
|
|
45
|
-
gas_spent:
|
|
45
|
+
gas_spent: number;
|
|
46
46
|
/** * The gas price at the time of this tx. */
|
|
47
|
-
gas_price:
|
|
47
|
+
gas_price: number;
|
|
48
48
|
/** * The total transaction fees (`gas_price` * `gas_spent`) paid for this tx, denoted in wei. */
|
|
49
49
|
fees_paid: bigint | null;
|
|
50
50
|
/** * The gas spent in `quote-currency` denomination. */
|
|
@@ -73,7 +73,7 @@ export interface DexReport {
|
|
|
73
73
|
protocol_name: string;
|
|
74
74
|
/** * Stores the contract address of the protocol that facilitated the event. */
|
|
75
75
|
protocol_address: string;
|
|
76
|
-
/** *
|
|
76
|
+
/** * The protocol logo URL. */
|
|
77
77
|
protocol_logo_url: string;
|
|
78
78
|
/** * Stores the aggregator responsible for the event. */
|
|
79
79
|
aggregator_name: string;
|
|
@@ -94,7 +94,7 @@ export interface DexReport {
|
|
|
94
94
|
lp_token_ticker: string;
|
|
95
95
|
lp_token_num_decimals: number;
|
|
96
96
|
lp_token_name: string;
|
|
97
|
-
lp_token_value:
|
|
97
|
+
lp_token_value: string;
|
|
98
98
|
exchange_rate_usd: number;
|
|
99
99
|
/** * Stores the address of token 0 in the specific pair. */
|
|
100
100
|
token_0_address: string;
|
|
@@ -113,13 +113,13 @@ export interface DexReport {
|
|
|
113
113
|
/** * Stores the contract name of token 1 in the specific pair. */
|
|
114
114
|
token_1_name: string;
|
|
115
115
|
/** * Stores the amount of token 0 used in the transaction. For example, 1 ETH, 100 USDC, 30 UNI, etc. */
|
|
116
|
-
token_0_amount:
|
|
116
|
+
token_0_amount: string;
|
|
117
117
|
token_0_quote_rate: number;
|
|
118
118
|
token_0_usd_quote: number;
|
|
119
119
|
pretty_token_0_usd_quote: string;
|
|
120
120
|
token_0_logo_url: string;
|
|
121
121
|
/** * Stores the amount of token 1 used in the transaction. For example, 1 ETH, 100 USDC, 30 UNI, etc. */
|
|
122
|
-
token_1_amount:
|
|
122
|
+
token_1_amount: string;
|
|
123
123
|
token_1_quote_rate: number;
|
|
124
124
|
token_1_usd_quote: number;
|
|
125
125
|
pretty_token_1_usd_quote: string;
|
|
@@ -138,7 +138,7 @@ export interface NftSalesReport {
|
|
|
138
138
|
protocol_contract_address: string;
|
|
139
139
|
/** * Stores the name of the protocol that facilitated the event. */
|
|
140
140
|
protocol_name: string;
|
|
141
|
-
/** *
|
|
141
|
+
/** * The protocol logo URL. */
|
|
142
142
|
protocol_logo_url: string;
|
|
143
143
|
/** * Stores the address of the transaction recipient. */
|
|
144
144
|
to: string;
|
|
@@ -149,7 +149,7 @@ export interface NftSalesReport {
|
|
|
149
149
|
/** * Stores the address buying the NFT. */
|
|
150
150
|
taker: string;
|
|
151
151
|
/** * Stores the NFTs token ID. All NFTs have a token ID. Within a collection, these token IDs are unique. If the NFT is transferred to another owner, the token id remains the same, as this number is its identifier within a collection. For example, if a collection has 10K NFTs then an NFT in that collection can have a token ID from 1-10K. */
|
|
152
|
-
token_id:
|
|
152
|
+
token_id: string;
|
|
153
153
|
/** * Stores the address of the collection. For example, [Bored Ape Yacht Club](https://etherscan.io/token/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d) */
|
|
154
154
|
collection_address: string;
|
|
155
155
|
/** * Stores the name of the collection. */
|
|
@@ -187,7 +187,7 @@ export interface LendingReport {
|
|
|
187
187
|
protocol_name: string;
|
|
188
188
|
/** * Stores the contract address of the lending protocol that facilitated the event. */
|
|
189
189
|
protocol_address: string;
|
|
190
|
-
/** *
|
|
190
|
+
/** * The protocol logo URL. */
|
|
191
191
|
protocol_logo_url: string;
|
|
192
192
|
/** * Lending protocols often have multiple version (e.g. Aave V1, V2 and V3). The `version` field allows you to look at a specific version of the Lending protocol. */
|
|
193
193
|
version: string;
|
|
@@ -14,15 +14,15 @@ export interface PoolResponse {
|
|
|
14
14
|
export interface Pool {
|
|
15
15
|
/** * The pair address. */
|
|
16
16
|
exchange: string;
|
|
17
|
-
swap_count_24h:
|
|
17
|
+
swap_count_24h: number;
|
|
18
18
|
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
19
|
-
total_liquidity_quote:
|
|
20
|
-
volume_24h_quote:
|
|
21
|
-
fee_24h_quote:
|
|
19
|
+
total_liquidity_quote: number;
|
|
20
|
+
volume_24h_quote: number;
|
|
21
|
+
fee_24h_quote: number;
|
|
22
22
|
/** * Total supply of this pool token. */
|
|
23
23
|
total_supply: bigint | null;
|
|
24
24
|
/** * The exchange rate for the requested quote currency. */
|
|
25
|
-
quote_rate:
|
|
25
|
+
quote_rate: number;
|
|
26
26
|
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
27
27
|
pretty_total_liquidity_quote: string;
|
|
28
28
|
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
@@ -37,8 +37,8 @@ export interface Pool {
|
|
|
37
37
|
chain_id: string;
|
|
38
38
|
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
39
39
|
dex_name: string;
|
|
40
|
-
volume_7d_quote:
|
|
41
|
-
annualized_fee:
|
|
40
|
+
volume_7d_quote: number;
|
|
41
|
+
annualized_fee: number;
|
|
42
42
|
token_0: Token;
|
|
43
43
|
token_1: Token;
|
|
44
44
|
}
|
|
@@ -50,14 +50,14 @@ export interface Token {
|
|
|
50
50
|
volume_in_24h: string;
|
|
51
51
|
volume_out_24h: string;
|
|
52
52
|
/** * The exchange rate for the requested quote currency. */
|
|
53
|
-
quote_rate:
|
|
53
|
+
quote_rate: number;
|
|
54
54
|
reserve: string;
|
|
55
55
|
/** * The contract logo URL. */
|
|
56
56
|
logo_url: string;
|
|
57
57
|
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
58
58
|
contract_ticker_symbol: string;
|
|
59
59
|
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
60
|
-
contract_decimals:
|
|
60
|
+
contract_decimals: number;
|
|
61
61
|
volume_in_7d: string;
|
|
62
62
|
volume_out_7d: string;
|
|
63
63
|
}
|
|
@@ -89,7 +89,7 @@ export interface SupportedDex {
|
|
|
89
89
|
/** * The dex logo URL. */
|
|
90
90
|
logo_url: string;
|
|
91
91
|
factory_contract_address: string;
|
|
92
|
-
router_contract_addresses: string;
|
|
92
|
+
router_contract_addresses: string[];
|
|
93
93
|
swap_fee: number;
|
|
94
94
|
}
|
|
95
95
|
export interface PoolByAddressResponse {
|
|
@@ -109,21 +109,21 @@ export interface PoolWithTimeseries {
|
|
|
109
109
|
exchange: string;
|
|
110
110
|
/** * A list of explorers for this address. */
|
|
111
111
|
explorers: Explorer[];
|
|
112
|
-
swap_count_24h:
|
|
112
|
+
swap_count_24h: number;
|
|
113
113
|
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
114
|
-
total_liquidity_quote:
|
|
115
|
-
volume_24h_quote:
|
|
116
|
-
fee_24h_quote:
|
|
114
|
+
total_liquidity_quote: number;
|
|
115
|
+
volume_24h_quote: number;
|
|
116
|
+
fee_24h_quote: number;
|
|
117
117
|
/** * Total supply of this pool token. */
|
|
118
118
|
total_supply: bigint | null;
|
|
119
119
|
/** * The exchange rate for the requested quote currency. */
|
|
120
|
-
quote_rate:
|
|
120
|
+
quote_rate: number;
|
|
121
121
|
/** * The requested chain ID eg: `1`. */
|
|
122
122
|
chain_id: string;
|
|
123
123
|
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
124
124
|
dex_name: string;
|
|
125
|
-
volume_7d_quote:
|
|
126
|
-
annualized_fee:
|
|
125
|
+
volume_7d_quote: number;
|
|
126
|
+
annualized_fee: number;
|
|
127
127
|
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
128
128
|
pretty_total_liquidity_quote: string;
|
|
129
129
|
/** * A prettier version of the volume 24h quote for rendering purposes. */
|
|
@@ -134,8 +134,8 @@ export interface PoolWithTimeseries {
|
|
|
134
134
|
pretty_volume_7d_quote: string;
|
|
135
135
|
token_0: Token;
|
|
136
136
|
token_1: Token;
|
|
137
|
-
token_0_reserve_quote:
|
|
138
|
-
token_1_reserve_quote:
|
|
137
|
+
token_0_reserve_quote: number;
|
|
138
|
+
token_1_reserve_quote: number;
|
|
139
139
|
volume_timeseries_7d: VolumeTimeseries[];
|
|
140
140
|
volume_timeseries_30d: VolumeTimeseries[];
|
|
141
141
|
liquidity_timeseries_7d: LiquidityTimeseries[];
|
|
@@ -148,56 +148,56 @@ export interface VolumeTimeseries {
|
|
|
148
148
|
dex_name: string;
|
|
149
149
|
/** * The requested chain ID eg: `1`. */
|
|
150
150
|
chain_id: string;
|
|
151
|
-
dt:
|
|
151
|
+
dt: Date;
|
|
152
152
|
/** * The pair address. */
|
|
153
153
|
exchange: string;
|
|
154
154
|
sum_amount0in: string;
|
|
155
155
|
sum_amount0out: string;
|
|
156
156
|
sum_amount1in: string;
|
|
157
157
|
sum_amount1out: string;
|
|
158
|
-
volume_quote:
|
|
158
|
+
volume_quote: number;
|
|
159
159
|
/** * A prettier version of the volume quote for rendering purposes. */
|
|
160
160
|
pretty_volume_quote: string;
|
|
161
|
-
token_0_quote_rate:
|
|
162
|
-
token_1_quote_rate:
|
|
163
|
-
swap_count_24:
|
|
161
|
+
token_0_quote_rate: number;
|
|
162
|
+
token_1_quote_rate: number;
|
|
163
|
+
swap_count_24: number;
|
|
164
164
|
}
|
|
165
165
|
export interface LiquidityTimeseries {
|
|
166
166
|
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
167
167
|
dex_name: string;
|
|
168
168
|
/** * The requested chain ID eg: `1`. */
|
|
169
169
|
chain_id: string;
|
|
170
|
-
dt:
|
|
170
|
+
dt: Date;
|
|
171
171
|
/** * The pair address. */
|
|
172
172
|
exchange: string;
|
|
173
173
|
r0_c: string;
|
|
174
174
|
r1_c: string;
|
|
175
|
-
liquidity_quote:
|
|
175
|
+
liquidity_quote: number;
|
|
176
176
|
/** * A prettier version of the liquidity quote for rendering purposes. */
|
|
177
177
|
pretty_liquidity_quote: string;
|
|
178
|
-
token_0_quote_rate:
|
|
179
|
-
token_1_quote_rate:
|
|
178
|
+
token_0_quote_rate: number;
|
|
179
|
+
token_1_quote_rate: number;
|
|
180
180
|
}
|
|
181
181
|
export interface PriceTimeseries {
|
|
182
182
|
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
183
183
|
dex_name: string;
|
|
184
184
|
/** * The requested chain ID eg: `1`. */
|
|
185
185
|
chain_id: string;
|
|
186
|
-
dt:
|
|
186
|
+
dt: Date;
|
|
187
187
|
/** * The pair address. */
|
|
188
188
|
exchange: string;
|
|
189
|
-
price_of_token0_in_token1:
|
|
189
|
+
price_of_token0_in_token1: number;
|
|
190
190
|
/** * A prettier version of the price token0 for rendering purposes. */
|
|
191
191
|
pretty_price_of_token0_in_token1: string;
|
|
192
192
|
price_of_token0_in_token1_description: string;
|
|
193
|
-
price_of_token1_in_token0:
|
|
193
|
+
price_of_token1_in_token0: number;
|
|
194
194
|
/** * A prettier version of the price token1 for rendering purposes. */
|
|
195
195
|
pretty_price_of_token1_in_token0: string;
|
|
196
196
|
price_of_token1_in_token0_description: string;
|
|
197
197
|
/** * The requested quote currency eg: `USD`. */
|
|
198
198
|
quote_currency: string;
|
|
199
|
-
price_of_token0_in_quote_currency:
|
|
200
|
-
price_of_token1_in_quote_currency:
|
|
199
|
+
price_of_token0_in_quote_currency: number;
|
|
200
|
+
price_of_token1_in_quote_currency: number;
|
|
201
201
|
}
|
|
202
202
|
export interface PoolsDexDataResponse {
|
|
203
203
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
@@ -345,8 +345,8 @@ export interface TokenV2Volume {
|
|
|
345
345
|
contract_address: string;
|
|
346
346
|
/** * The string returned by the `name()` method. */
|
|
347
347
|
contract_name: string;
|
|
348
|
-
total_liquidity:
|
|
349
|
-
total_volume_24h:
|
|
348
|
+
total_liquidity: string;
|
|
349
|
+
total_volume_24h: string;
|
|
350
350
|
/** * The contract logo URL. */
|
|
351
351
|
logo_url: string;
|
|
352
352
|
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
@@ -394,14 +394,14 @@ export interface TokenV2VolumeWithChartData {
|
|
|
394
394
|
dex_name: string;
|
|
395
395
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
396
396
|
contract_address: string;
|
|
397
|
-
/** * The list of explorers for the token address. */
|
|
398
|
-
explorers: Explorer[];
|
|
399
397
|
/** * The string returned by the `name()` method. */
|
|
400
398
|
contract_name: string;
|
|
399
|
+
/** * A list of explorers for this address. */
|
|
400
|
+
explorers: Explorer[];
|
|
401
401
|
/** * The total liquidity unscaled value. */
|
|
402
|
-
total_liquidity:
|
|
402
|
+
total_liquidity: string;
|
|
403
403
|
/** * The total volume 24h unscaled value. */
|
|
404
|
-
total_volume_24h:
|
|
404
|
+
total_volume_24h: string;
|
|
405
405
|
/** * The contract logo URL. */
|
|
406
406
|
logo_url: string;
|
|
407
407
|
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
@@ -441,7 +441,7 @@ export interface VolumeTokenTimeseries {
|
|
|
441
441
|
/** * The requested chain ID eg: `1`. */
|
|
442
442
|
chain_id: string;
|
|
443
443
|
/** * The current date. */
|
|
444
|
-
dt:
|
|
444
|
+
dt: Date;
|
|
445
445
|
/** * The total volume unscaled for this day. */
|
|
446
446
|
total_volume: string;
|
|
447
447
|
/** * The volume in `quote-currency` denomination. */
|
|
@@ -455,7 +455,7 @@ export interface LiquidityTokenTimeseries {
|
|
|
455
455
|
/** * The requested chain ID eg: `1`. */
|
|
456
456
|
chain_id: string;
|
|
457
457
|
/** * The current date. */
|
|
458
|
-
dt:
|
|
458
|
+
dt: Date;
|
|
459
459
|
/** * The total liquidity unscaled up to this day. */
|
|
460
460
|
total_liquidity: string;
|
|
461
461
|
/** * The liquidity in `quote-currency` denomination. */
|
|
@@ -469,7 +469,7 @@ export interface PriceTokenTimeseries {
|
|
|
469
469
|
/** * The requested chain ID eg: `1`. */
|
|
470
470
|
chain_id: string;
|
|
471
471
|
/** * The current date. */
|
|
472
|
-
dt:
|
|
472
|
+
dt: Date;
|
|
473
473
|
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
474
474
|
quote_currency: string;
|
|
475
475
|
/** * The exchange rate for the requested quote currency. */
|
|
@@ -519,12 +519,12 @@ export interface ExchangeTransaction {
|
|
|
519
519
|
address: string;
|
|
520
520
|
/** * A list of explorers for this transaction. */
|
|
521
521
|
explorers: Explorer[];
|
|
522
|
-
amount_0:
|
|
523
|
-
amount_1:
|
|
524
|
-
amount_0_in:
|
|
525
|
-
amount_0_out:
|
|
526
|
-
amount_1_in:
|
|
527
|
-
amount_1_out:
|
|
522
|
+
amount_0: string;
|
|
523
|
+
amount_1: string;
|
|
524
|
+
amount_0_in: string;
|
|
525
|
+
amount_0_out: string;
|
|
526
|
+
amount_1_in: string;
|
|
527
|
+
amount_1_out: string;
|
|
528
528
|
to_address: string;
|
|
529
529
|
from_address: string;
|
|
530
530
|
sender_address: string;
|
|
@@ -540,11 +540,11 @@ export interface ExchangeTransaction {
|
|
|
540
540
|
/** * The requested chain native gas token metadata. */
|
|
541
541
|
gas_metadata: ContractMetadata;
|
|
542
542
|
/** * The amount of gas supplied for this tx. */
|
|
543
|
-
gas_offered:
|
|
543
|
+
gas_offered: number;
|
|
544
544
|
/** * The gas spent for this tx. */
|
|
545
|
-
gas_spent:
|
|
545
|
+
gas_spent: number;
|
|
546
546
|
/** * The gas price at the time of this tx. */
|
|
547
|
-
gas_price:
|
|
547
|
+
gas_price: number;
|
|
548
548
|
/** * The total transaction fees (`gas_price` * `gas_spent`) paid for this tx, denoted in wei. */
|
|
549
549
|
fees_paid: bigint | null;
|
|
550
550
|
/** * The gas spent in `quote-currency` denomination. */
|
|
@@ -27,10 +27,10 @@ declare class BalanceItem {
|
|
|
27
27
|
/** * A display-friendly name for the contract. */
|
|
28
28
|
contract_display_name: string;
|
|
29
29
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
30
|
-
supports_erc: string;
|
|
30
|
+
supports_erc: string[];
|
|
31
31
|
/** * The contract logo URL. */
|
|
32
32
|
logo_url: string;
|
|
33
|
-
/** * The
|
|
33
|
+
/** * The contract logo URLs. */
|
|
34
34
|
logo_urls: LogoUrls;
|
|
35
35
|
/** * The timestamp when the token was transferred. */
|
|
36
36
|
last_transferred_at: Date;
|
|
@@ -82,6 +82,8 @@ declare class NftData {
|
|
|
82
82
|
token_url: string;
|
|
83
83
|
/** * The original minter. */
|
|
84
84
|
original_owner: string;
|
|
85
|
+
/** * The current holder of this NFT. */
|
|
86
|
+
current_owner: string;
|
|
85
87
|
external_data: NftExternalData;
|
|
86
88
|
/** * If `true`, the asset data is available from the Covalent CDN. */
|
|
87
89
|
asset_cached: boolean;
|
|
@@ -243,7 +245,7 @@ declare class ContractMetadata {
|
|
|
243
245
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
244
246
|
contract_address: string;
|
|
245
247
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
246
|
-
supports_erc: string;
|
|
248
|
+
supports_erc: string[];
|
|
247
249
|
/** * The contract logo URL. */
|
|
248
250
|
logo_url: string;
|
|
249
251
|
constructor(data: ContractMetadata);
|
|
@@ -327,7 +329,7 @@ declare class TokenHolder {
|
|
|
327
329
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
328
330
|
contract_address: string;
|
|
329
331
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
330
|
-
supports_erc: string;
|
|
332
|
+
supports_erc: string[];
|
|
331
333
|
/** * The contract logo URL. */
|
|
332
334
|
logo_url: string;
|
|
333
335
|
/** * The requested address. */
|
|
@@ -365,7 +367,7 @@ declare class HistoricalBalanceItem {
|
|
|
365
367
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
366
368
|
contract_address: string;
|
|
367
369
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
368
|
-
supports_erc: string;
|
|
370
|
+
supports_erc: string[];
|
|
369
371
|
/** * The contract logo URL. */
|
|
370
372
|
logo_url: string;
|
|
371
373
|
/** * The height of the block. */
|
|
@@ -417,7 +419,7 @@ declare class NativeBalanceItem {
|
|
|
417
419
|
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
418
420
|
contract_address: string;
|
|
419
421
|
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
420
|
-
supports_erc: string;
|
|
422
|
+
supports_erc: string[];
|
|
421
423
|
/** * The contract logo URL. */
|
|
422
424
|
logo_url: string;
|
|
423
425
|
/** * The height of the block. */
|
|
@@ -57,6 +57,7 @@ class NftData {
|
|
|
57
57
|
this.token_id = data.token_id && data.token_id !== null ? BigInt(data.token_id) : null;
|
|
58
58
|
this.token_url = data.token_url;
|
|
59
59
|
this.original_owner = data.original_owner;
|
|
60
|
+
this.current_owner = data.current_owner;
|
|
60
61
|
this.asset_cached = data.asset_cached;
|
|
61
62
|
this.image_cached = data.image_cached;
|
|
62
63
|
this.external_data = data.external_data && data.external_data !== null ? new NftExternalData(data.external_data) : null;
|