@covalenthq/client-sdk 0.9.4 → 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/dist/cjs/index.js +45 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +7 -5
- package/dist/cjs/services/BaseService.d.ts +8 -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 +2 -2
- package/dist/cjs/services/TransactionService.d.ts +11 -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 +4 -4
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +7 -1
- package/dist/cjs/util/types/GenericTypes.d.ts +2 -0
- package/dist/cjs/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/cjs/util/types/PricingServiceTypes.d.ts +1 -1
- 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 +45 -11
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +7 -5
- package/dist/es/services/BaseService.d.ts +8 -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 +2 -2
- package/dist/es/services/TransactionService.d.ts +11 -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 +4 -4
- package/dist/es/util/types/BaseServiceTypes.d.ts +7 -1
- package/dist/es/util/types/GenericTypes.d.ts +2 -0
- package/dist/es/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/es/util/types/PricingServiceTypes.d.ts +1 -1
- 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 +45 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +7 -5
- package/dist/esm/services/BaseService.d.ts +8 -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 +2 -2
- package/dist/esm/services/TransactionService.d.ts +11 -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 +4 -4
- package/dist/esm/util/types/BaseServiceTypes.d.ts +7 -1
- package/dist/esm/util/types/GenericTypes.d.ts +2 -0
- package/dist/esm/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/esm/util/types/PricingServiceTypes.d.ts +1 -1
- 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 +7 -5
- package/dist/services/BalanceService.js +1 -0
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +8 -1
- package/dist/services/BaseService.js +7 -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 +2 -2
- package/dist/services/TransactionService.d.ts +11 -11
- 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 +4 -4
- package/dist/util/types/BaseServiceTypes.d.ts +7 -1
- package/dist/util/types/GenericTypes.d.ts +2 -0
- package/dist/util/types/NftServiceTypes.d.ts +8 -8
- package/dist/util/types/PricingServiceTypes.d.ts +1 -1
- package/dist/util/types/TransactionServiceTypes.d.ts +10 -10
- package/dist/util/types/XykServiceTypes.d.ts +51 -51
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -9,7 +9,7 @@ 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;
|
|
@@ -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. */
|
package/dist/esm/index.js
CHANGED
|
@@ -575,6 +575,7 @@ let NftData$1 = class NftData {
|
|
|
575
575
|
this.token_id = data.token_id && data.token_id !== null ? BigInt(data.token_id) : null;
|
|
576
576
|
this.token_url = data.token_url;
|
|
577
577
|
this.original_owner = data.original_owner;
|
|
578
|
+
this.current_owner = data.current_owner;
|
|
578
579
|
this.asset_cached = data.asset_cached;
|
|
579
580
|
this.image_cached = data.image_cached;
|
|
580
581
|
this.external_data = data.external_data && data.external_data !== null ? new NftExternalData$1(data.external_data) : null;
|
|
@@ -1512,10 +1513,16 @@ class BlockHeightsResponse {
|
|
|
1512
1513
|
this.updated_at = data.updated_at && data.updated_at !== null ? parseISO(data.updated_at.toString()) : null;
|
|
1513
1514
|
this.chain_id = data.chain_id;
|
|
1514
1515
|
this.chain_name = data.chain_name;
|
|
1515
|
-
this.items = data.items && data.items !== null ? data.items.map((itemData) => new
|
|
1516
|
+
this.items = data.items && data.items !== null ? data.items.map((itemData) => new BlockHeights(itemData)) : null;
|
|
1516
1517
|
this.pagination = data.pagination && data.pagination !== null ? new Pagination$2(data.pagination) : null;
|
|
1517
1518
|
}
|
|
1518
1519
|
}
|
|
1520
|
+
class BlockHeights {
|
|
1521
|
+
constructor(data) {
|
|
1522
|
+
this.signed_at = data.signed_at && data.signed_at !== null ? parseISO(data.signed_at.toString()) : null;
|
|
1523
|
+
this.height = data.height;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1519
1526
|
let Pagination$2 = class Pagination {
|
|
1520
1527
|
constructor(data) {
|
|
1521
1528
|
this.has_more = data.has_more;
|
|
@@ -2708,6 +2715,7 @@ class NftData {
|
|
|
2708
2715
|
this.token_id = data.token_id && data.token_id !== null ? BigInt(data.token_id) : null;
|
|
2709
2716
|
this.token_url = data.token_url;
|
|
2710
2717
|
this.original_owner = data.original_owner;
|
|
2718
|
+
this.current_owner = data.current_owner;
|
|
2711
2719
|
this.asset_cached = data.asset_cached;
|
|
2712
2720
|
this.image_cached = data.image_cached;
|
|
2713
2721
|
this.external_data = data.external_data && data.external_data !== null ? new NftExternalData(data.external_data) : null;
|
|
@@ -2811,6 +2819,7 @@ let LogEvent$1 = class LogEvent {
|
|
|
2811
2819
|
this.sender_address = data.sender_address;
|
|
2812
2820
|
this.sender_address_label = data.sender_address_label;
|
|
2813
2821
|
this.sender_logo_url = data.sender_logo_url;
|
|
2822
|
+
this.sender_factory_address = data.sender_factory_address;
|
|
2814
2823
|
this.raw_log_data = data.raw_log_data;
|
|
2815
2824
|
this.decoded = data.decoded && data.decoded !== null ? new DecodedItem$1(data.decoded) : null;
|
|
2816
2825
|
}
|
|
@@ -6091,7 +6100,7 @@ class VolumeTimeseries {
|
|
|
6091
6100
|
constructor(data) {
|
|
6092
6101
|
this.dex_name = data.dex_name;
|
|
6093
6102
|
this.chain_id = data.chain_id;
|
|
6094
|
-
this.dt = data.dt;
|
|
6103
|
+
this.dt = data.dt && data.dt !== null ? parseISO(data.dt.toString()) : null;
|
|
6095
6104
|
this.exchange = data.exchange;
|
|
6096
6105
|
this.sum_amount0in = data.sum_amount0in;
|
|
6097
6106
|
this.sum_amount0out = data.sum_amount0out;
|
|
@@ -6108,7 +6117,7 @@ class LiquidityTimeseries {
|
|
|
6108
6117
|
constructor(data) {
|
|
6109
6118
|
this.dex_name = data.dex_name;
|
|
6110
6119
|
this.chain_id = data.chain_id;
|
|
6111
|
-
this.dt = data.dt;
|
|
6120
|
+
this.dt = data.dt && data.dt !== null ? parseISO(data.dt.toString()) : null;
|
|
6112
6121
|
this.exchange = data.exchange;
|
|
6113
6122
|
this.r0_c = data.r0_c;
|
|
6114
6123
|
this.r1_c = data.r1_c;
|
|
@@ -6122,7 +6131,7 @@ class PriceTimeseries {
|
|
|
6122
6131
|
constructor(data) {
|
|
6123
6132
|
this.dex_name = data.dex_name;
|
|
6124
6133
|
this.chain_id = data.chain_id;
|
|
6125
|
-
this.dt = data.dt;
|
|
6134
|
+
this.dt = data.dt && data.dt !== null ? parseISO(data.dt.toString()) : null;
|
|
6126
6135
|
this.exchange = data.exchange;
|
|
6127
6136
|
this.price_of_token0_in_token1 = data.price_of_token0_in_token1;
|
|
6128
6137
|
this.pretty_price_of_token0_in_token1 = data.pretty_price_of_token0_in_token1;
|
|
@@ -6297,7 +6306,7 @@ class VolumeTokenTimeseries {
|
|
|
6297
6306
|
constructor(data) {
|
|
6298
6307
|
this.dex_name = data.dex_name;
|
|
6299
6308
|
this.chain_id = data.chain_id;
|
|
6300
|
-
this.dt = data.dt;
|
|
6309
|
+
this.dt = data.dt && data.dt !== null ? parseISO(data.dt.toString()) : null;
|
|
6301
6310
|
this.total_volume = data.total_volume;
|
|
6302
6311
|
this.volume_quote = data.volume_quote;
|
|
6303
6312
|
this.pretty_volume_quote = data.pretty_volume_quote;
|
|
@@ -6307,7 +6316,7 @@ class LiquidityTokenTimeseries {
|
|
|
6307
6316
|
constructor(data) {
|
|
6308
6317
|
this.dex_name = data.dex_name;
|
|
6309
6318
|
this.chain_id = data.chain_id;
|
|
6310
|
-
this.dt = data.dt;
|
|
6319
|
+
this.dt = data.dt && data.dt !== null ? parseISO(data.dt.toString()) : null;
|
|
6311
6320
|
this.total_liquidity = data.total_liquidity;
|
|
6312
6321
|
this.liquidity_quote = data.liquidity_quote;
|
|
6313
6322
|
this.pretty_liquidity_quote = data.pretty_liquidity_quote;
|
|
@@ -6317,7 +6326,7 @@ class PriceTokenTimeseries {
|
|
|
6317
6326
|
constructor(data) {
|
|
6318
6327
|
this.dex_name = data.dex_name;
|
|
6319
6328
|
this.chain_id = data.chain_id;
|
|
6320
|
-
this.dt = data.dt;
|
|
6329
|
+
this.dt = data.dt && data.dt !== null ? parseISO(data.dt.toString()) : null;
|
|
6321
6330
|
this.quote_currency = data.quote_currency;
|
|
6322
6331
|
this.quote_rate = data.quote_rate;
|
|
6323
6332
|
this.pretty_quote_rate = data.pretty_quote_rate;
|
|
@@ -7782,7 +7791,7 @@ class XykService {
|
|
|
7782
7791
|
}
|
|
7783
7792
|
}
|
|
7784
7793
|
|
|
7785
|
-
const userAgent = "com.covalenthq.sdk.typescript/0.9.
|
|
7794
|
+
const userAgent = "com.covalenthq.sdk.typescript/0.9.5";
|
|
7786
7795
|
class Response {
|
|
7787
7796
|
}
|
|
7788
7797
|
/**
|
|
@@ -7958,10 +7967,10 @@ var Chains;
|
|
|
7958
7967
|
Chains["HECO_TESTNET"] = "heco-testnet";
|
|
7959
7968
|
Chains["NERVOS_GODWOKEN_TESTNET"] = "nervos-godwoken-testnet";
|
|
7960
7969
|
Chains["EVMOS_TESTNET"] = "evmos-testnet";
|
|
7961
|
-
Chains["ASTAR_SHIDEN"] = "astar-shiden";
|
|
7962
7970
|
Chains["IOTEX_TESTNET"] = "iotex-testnet";
|
|
7963
7971
|
Chains["HARMONY_TESTNET"] = "harmony-testnet";
|
|
7964
7972
|
Chains["AURORA_TESTNET"] = "aurora-testnet";
|
|
7973
|
+
Chains["SCROLL_L2_TESTNET"] = "scroll-l2-testnet";
|
|
7965
7974
|
Chains["SCROLL_SEPOLIA_TESTNET"] = "scroll-sepolia-testnet";
|
|
7966
7975
|
Chains["COVALENT_INTERNAL_NETWORK_V1"] = "covalent-internal-network-v1";
|
|
7967
7976
|
Chains["DEFI_KINGDOMS_MAINNET"] = "defi-kingdoms-mainnet";
|
|
@@ -8032,13 +8041,13 @@ var Chains;
|
|
|
8032
8041
|
Chains["HORIZEN_GOBI_TESTNET"] = "horizen-gobi-testnet";
|
|
8033
8042
|
Chains["ETH_SEPOLIA"] = "eth-sepolia";
|
|
8034
8043
|
Chains["SKALE_NEBULA"] = "skale-nebula";
|
|
8035
|
-
Chains["
|
|
8044
|
+
Chains["SKALE_BATTLEGROUND"] = "skale-battleground";
|
|
8036
8045
|
Chains["AVALANCHE_MELD_TESTNET"] = "avalanche-meld-testnet";
|
|
8037
8046
|
Chains["GUNZILLA_TESTNET"] = "gunzilla-testnet";
|
|
8038
8047
|
Chains["ULTRON_MAINNET"] = "ultron-mainnet";
|
|
8039
8048
|
Chains["ULTRON_TESTNET"] = "ultron-testnet";
|
|
8040
8049
|
Chains["ZORA_MAINNET"] = "zora-mainnet";
|
|
8041
|
-
Chains["
|
|
8050
|
+
Chains["ZORA_GOERLI_TESTNET"] = "zora-goerli-testnet";
|
|
8042
8051
|
Chains["NEON_MAINNET"] = "neon-mainnet";
|
|
8043
8052
|
Chains["AVALANCHE_SHRAPNEL_MAINNET"] = "avalanche-shrapnel-mainnet";
|
|
8044
8053
|
Chains["BASE_MAINNET"] = "base-mainnet";
|
|
@@ -8118,6 +8127,31 @@ var Chains;
|
|
|
8118
8127
|
Chains["AVALANCHE_BEAM_MAINNET"] = "avalanche-beam-mainnet";
|
|
8119
8128
|
Chains["SCROLL_MAINNET"] = "scroll-mainnet";
|
|
8120
8129
|
Chains["ETH_HOLESKY"] = "eth-holesky";
|
|
8130
|
+
Chains["TOMOCHAIN_MAINNET"] = "tomochain-mainnet";
|
|
8131
|
+
Chains["TOMOCHAIN_TESTNET"] = "tomochain-testnet";
|
|
8132
|
+
Chains["AVALANCHE_JONO11_TESTNET"] = "avalanche-jono11-testnet";
|
|
8133
|
+
Chains["BASE_SEPOLIA_TESTNET"] = "base-sepolia-testnet";
|
|
8134
|
+
Chains["XAI_TESTNET"] = "xai-testnet";
|
|
8135
|
+
Chains["ARBITRUM_SEPOLIA"] = "arbitrum-sepolia";
|
|
8136
|
+
Chains["LUMOZ_PUBLIC_ZKSYNC_V2"] = "lumoz-public-zksync-v2";
|
|
8137
|
+
Chains["LUMOZ_DECIBLING"] = "lumoz-decibling";
|
|
8138
|
+
Chains["LUMOZ_STARK_SPORT"] = "lumoz-stark-sport";
|
|
8139
|
+
Chains["AVALANCHE_LT0_TESTNET"] = "avalanche-lt0-testnet";
|
|
8140
|
+
Chains["AVALANCHE_LT1_TESTNET"] = "avalanche-lt1-testnet";
|
|
8141
|
+
Chains["AVALANCHE_LT2_TESTNET"] = "avalanche-lt2-testnet";
|
|
8142
|
+
Chains["AVALANCHE_LT3_TESTNET"] = "avalanche-lt3-testnet";
|
|
8143
|
+
Chains["AVALANCHE_LT4_TESTNET"] = "avalanche-lt4-testnet";
|
|
8144
|
+
Chains["AVALANCHE_LT5_TESTNET"] = "avalanche-lt5-testnet";
|
|
8145
|
+
Chains["SYNDR_TESTNET"] = "syndr-testnet";
|
|
8146
|
+
Chains["CROSSFI_EVM_TESTNET"] = "crossfi-evm-testnet";
|
|
8147
|
+
Chains["CELO_MAINNET"] = "celo-mainnet";
|
|
8148
|
+
Chains["TAIKO_KATLA_TESTNET"] = "taiko-katla-testnet";
|
|
8149
|
+
Chains["MOVEMENT_MEVM_TESTNET"] = "movement-mevm-testnet";
|
|
8150
|
+
Chains["ZORA_SEPOLIA_TESTNET"] = "zora-sepolia-testnet";
|
|
8151
|
+
Chains["MERLIN_MAINNET"] = "merlin-mainnet";
|
|
8152
|
+
Chains["MERLIN_TESTNET"] = "merlin-testnet";
|
|
8153
|
+
Chains["AVALANCHE_HUBBLE_EXCHANGE_MAINNET"] = "avalanche-hubble-exchange-mainnet";
|
|
8154
|
+
Chains["XAI_MAINNET"] = "xai-mainnet";
|
|
8121
8155
|
})(Chains || (Chains = {}));
|
|
8122
8156
|
|
|
8123
8157
|
export { BalanceService, BaseService, Chains, Client, CovalentClient, NftService, Response$1 as PriceResponse, PricingService, Response, SecurityService, TransactionService, XykService, calculatePrettyBalance, prettifyCurrency };
|