@covalenthq/client-sdk 1.0.2 → 2.0.0
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/LICENSE +201 -0
- package/README.md +223 -282
- package/package.json +25 -12
- package/dist/cjs/index.d.ts +0 -20
- package/dist/cjs/index.js +0 -8190
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/services/BalanceService.d.ts +0 -638
- package/dist/cjs/services/BaseService.d.ts +0 -571
- package/dist/cjs/services/CovalentClient.d.ts +0 -57
- package/dist/cjs/services/NftService.d.ts +0 -686
- package/dist/cjs/services/PricingService.d.ts +0 -103
- package/dist/cjs/services/SecurityService.d.ts +0 -162
- package/dist/cjs/services/TransactionService.d.ts +0 -711
- package/dist/cjs/services/XykService.d.ts +0 -1018
- package/dist/cjs/util/ApiHelpers.d.ts +0 -6
- package/dist/cjs/util/ApiKeyValidator.d.ts +0 -8
- package/dist/cjs/util/CalculatePrettyBalance.d.ts +0 -1
- package/dist/cjs/util/Chains.d.ts +0 -223
- package/dist/cjs/util/backoff.d.ts +0 -12
- package/dist/cjs/util/prettifyCurrency.d.ts +0 -2
- package/dist/cjs/util/types/BalanceServiceTypes.d.ts +0 -378
- package/dist/cjs/util/types/BaseServiceTypes.d.ts +0 -276
- package/dist/cjs/util/types/GenericTypes.d.ts +0 -116
- package/dist/cjs/util/types/NftServiceTypes.d.ts +0 -303
- package/dist/cjs/util/types/PricingServiceTypes.d.ts +0 -33
- package/dist/cjs/util/types/SecurityServiceTypes.d.ts +0 -121
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +0 -388
- package/dist/cjs/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/es/index.d.ts +0 -20
- package/dist/es/index.js +0 -8176
- package/dist/es/index.js.map +0 -1
- package/dist/es/services/BalanceService.d.ts +0 -638
- package/dist/es/services/BaseService.d.ts +0 -571
- package/dist/es/services/CovalentClient.d.ts +0 -57
- package/dist/es/services/NftService.d.ts +0 -686
- package/dist/es/services/PricingService.d.ts +0 -103
- package/dist/es/services/SecurityService.d.ts +0 -162
- package/dist/es/services/TransactionService.d.ts +0 -711
- package/dist/es/services/XykService.d.ts +0 -1018
- package/dist/es/util/ApiHelpers.d.ts +0 -6
- package/dist/es/util/ApiKeyValidator.d.ts +0 -8
- package/dist/es/util/CalculatePrettyBalance.d.ts +0 -1
- package/dist/es/util/Chains.d.ts +0 -223
- package/dist/es/util/backoff.d.ts +0 -12
- package/dist/es/util/prettifyCurrency.d.ts +0 -2
- package/dist/es/util/types/BalanceServiceTypes.d.ts +0 -378
- package/dist/es/util/types/BaseServiceTypes.d.ts +0 -276
- package/dist/es/util/types/GenericTypes.d.ts +0 -116
- package/dist/es/util/types/NftServiceTypes.d.ts +0 -303
- package/dist/es/util/types/PricingServiceTypes.d.ts +0 -33
- package/dist/es/util/types/SecurityServiceTypes.d.ts +0 -121
- package/dist/es/util/types/TransactionServiceTypes.d.ts +0 -388
- package/dist/es/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/esm/index.d.ts +0 -20
- package/dist/esm/index.js +0 -8176
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/services/BalanceService.d.ts +0 -638
- package/dist/esm/services/BaseService.d.ts +0 -571
- package/dist/esm/services/CovalentClient.d.ts +0 -57
- package/dist/esm/services/NftService.d.ts +0 -686
- package/dist/esm/services/PricingService.d.ts +0 -103
- package/dist/esm/services/SecurityService.d.ts +0 -162
- package/dist/esm/services/TransactionService.d.ts +0 -711
- package/dist/esm/services/XykService.d.ts +0 -1018
- package/dist/esm/util/ApiHelpers.d.ts +0 -6
- package/dist/esm/util/ApiKeyValidator.d.ts +0 -8
- package/dist/esm/util/CalculatePrettyBalance.d.ts +0 -1
- package/dist/esm/util/Chains.d.ts +0 -223
- package/dist/esm/util/backoff.d.ts +0 -12
- package/dist/esm/util/prettifyCurrency.d.ts +0 -2
- package/dist/esm/util/types/BalanceServiceTypes.d.ts +0 -378
- package/dist/esm/util/types/BaseServiceTypes.d.ts +0 -276
- package/dist/esm/util/types/GenericTypes.d.ts +0 -116
- package/dist/esm/util/types/NftServiceTypes.d.ts +0 -303
- package/dist/esm/util/types/PricingServiceTypes.d.ts +0 -33
- package/dist/esm/util/types/SecurityServiceTypes.d.ts +0 -121
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +0 -388
- package/dist/esm/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/index.d.ts +0 -20
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/services/BalanceService.d.ts +0 -638
- package/dist/services/BalanceService.js +0 -959
- package/dist/services/BalanceService.js.map +0 -1
- package/dist/services/BaseService.d.ts +0 -571
- package/dist/services/BaseService.js +0 -1202
- package/dist/services/BaseService.js.map +0 -1
- package/dist/services/CovalentClient.d.ts +0 -57
- package/dist/services/CovalentClient.js +0 -49
- package/dist/services/CovalentClient.js.map +0 -1
- package/dist/services/NftService.d.ts +0 -686
- package/dist/services/NftService.js +0 -1490
- package/dist/services/NftService.js.map +0 -1
- package/dist/services/PricingService.d.ts +0 -103
- package/dist/services/PricingService.js +0 -155
- package/dist/services/PricingService.js.map +0 -1
- package/dist/services/SecurityService.d.ts +0 -162
- package/dist/services/SecurityService.js +0 -249
- package/dist/services/SecurityService.js.map +0 -1
- package/dist/services/TransactionService.d.ts +0 -711
- package/dist/services/TransactionService.js +0 -1687
- package/dist/services/TransactionService.js.map +0 -1
- package/dist/services/XykService.d.ts +0 -1018
- package/dist/services/XykService.js +0 -1827
- package/dist/services/XykService.js.map +0 -1
- package/dist/util/ApiHelpers.d.ts +0 -6
- package/dist/util/ApiHelpers.js +0 -87
- package/dist/util/ApiHelpers.js.map +0 -1
- package/dist/util/ApiKeyValidator.d.ts +0 -8
- package/dist/util/ApiKeyValidator.js +0 -13
- package/dist/util/ApiKeyValidator.js.map +0 -1
- package/dist/util/CalculatePrettyBalance.d.ts +0 -1
- package/dist/util/CalculatePrettyBalance.js +0 -32
- package/dist/util/CalculatePrettyBalance.js.map +0 -1
- package/dist/util/Chains.d.ts +0 -223
- package/dist/util/Chains.js +0 -225
- package/dist/util/Chains.js.map +0 -1
- package/dist/util/backoff.d.ts +0 -12
- package/dist/util/backoff.js +0 -47
- package/dist/util/backoff.js.map +0 -1
- package/dist/util/prettifyCurrency.d.ts +0 -2
- package/dist/util/prettifyCurrency.js +0 -69
- package/dist/util/prettifyCurrency.js.map +0 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +0 -378
- package/dist/util/types/BalanceServiceTypes.js +0 -2
- package/dist/util/types/BalanceServiceTypes.js.map +0 -1
- package/dist/util/types/BaseServiceTypes.d.ts +0 -276
- package/dist/util/types/BaseServiceTypes.js +0 -2
- package/dist/util/types/BaseServiceTypes.js.map +0 -1
- package/dist/util/types/GenericTypes.d.ts +0 -116
- package/dist/util/types/GenericTypes.js +0 -2
- package/dist/util/types/GenericTypes.js.map +0 -1
- package/dist/util/types/NftServiceTypes.d.ts +0 -303
- package/dist/util/types/NftServiceTypes.js +0 -2
- package/dist/util/types/NftServiceTypes.js.map +0 -1
- package/dist/util/types/PricingServiceTypes.d.ts +0 -33
- package/dist/util/types/PricingServiceTypes.js +0 -2
- package/dist/util/types/PricingServiceTypes.js.map +0 -1
- package/dist/util/types/SecurityServiceTypes.d.ts +0 -121
- package/dist/util/types/SecurityServiceTypes.js +0 -2
- package/dist/util/types/SecurityServiceTypes.js.map +0 -1
- package/dist/util/types/TransactionServiceTypes.d.ts +0 -388
- package/dist/util/types/TransactionServiceTypes.js +0 -2
- package/dist/util/types/TransactionServiceTypes.js.map +0 -1
- package/dist/util/types/XykServiceTypes.d.ts +0 -687
- package/dist/util/types/XykServiceTypes.js +0 -2
- package/dist/util/types/XykServiceTypes.js.map +0 -1
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import { DecodedItem, LogEvent, Pagination } from "./GenericTypes";
|
|
2
|
-
export interface BlockResponse {
|
|
3
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
4
|
-
updated_at: Date;
|
|
5
|
-
/** * The requested chain ID eg: `1`. */
|
|
6
|
-
chain_id: number;
|
|
7
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
8
|
-
chain_name: string;
|
|
9
|
-
/** * List of response items. */
|
|
10
|
-
items: Block[];
|
|
11
|
-
}
|
|
12
|
-
export interface Block {
|
|
13
|
-
/** * The hash of the block. */
|
|
14
|
-
block_hash: string;
|
|
15
|
-
/** * The block signed timestamp in UTC. */
|
|
16
|
-
signed_at: Date;
|
|
17
|
-
/** * The block height. */
|
|
18
|
-
height: number;
|
|
19
|
-
/** * The parent block hash. */
|
|
20
|
-
block_parent_hash: string;
|
|
21
|
-
/** * Extra data written to the block. */
|
|
22
|
-
extra_data: string;
|
|
23
|
-
/** * The address of the miner. */
|
|
24
|
-
miner_address: string;
|
|
25
|
-
/** * The associated mining cost. */
|
|
26
|
-
mining_cost: number;
|
|
27
|
-
/** * The associated gas used. */
|
|
28
|
-
gas_used: number;
|
|
29
|
-
/** * The associated gas limit. */
|
|
30
|
-
gas_limit: number;
|
|
31
|
-
/** * The link to the related tx by block endpoint. */
|
|
32
|
-
transactions_link: string;
|
|
33
|
-
}
|
|
34
|
-
export interface ResolvedAddress {
|
|
35
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
36
|
-
updated_at: Date;
|
|
37
|
-
/** * The requested chain ID eg: `1`. */
|
|
38
|
-
chain_id: number;
|
|
39
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
40
|
-
chain_name: string;
|
|
41
|
-
/** * List of response items. */
|
|
42
|
-
items: ResolvedAddressItem[];
|
|
43
|
-
}
|
|
44
|
-
export interface ResolvedAddressItem {
|
|
45
|
-
/** * The requested address. */
|
|
46
|
-
address: string;
|
|
47
|
-
name: string;
|
|
48
|
-
}
|
|
49
|
-
export interface BlockHeightsResponse {
|
|
50
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
51
|
-
updated_at: Date;
|
|
52
|
-
/** * The requested chain ID eg: `1`. */
|
|
53
|
-
chain_id: number;
|
|
54
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
55
|
-
chain_name: string;
|
|
56
|
-
/** * List of response items. */
|
|
57
|
-
items: BlockHeights[];
|
|
58
|
-
/** * Pagination metadata. */
|
|
59
|
-
pagination: Pagination;
|
|
60
|
-
}
|
|
61
|
-
export interface BlockHeights {
|
|
62
|
-
/** * The hash of the block. */
|
|
63
|
-
block_hash: string;
|
|
64
|
-
/** * The block signed timestamp in UTC. */
|
|
65
|
-
signed_at: Date;
|
|
66
|
-
/** * The block height. */
|
|
67
|
-
height: number;
|
|
68
|
-
/** * The parent block hash. */
|
|
69
|
-
block_parent_hash: string;
|
|
70
|
-
/** * Extra data written to the block. */
|
|
71
|
-
extra_data: string;
|
|
72
|
-
/** * The address of the miner. */
|
|
73
|
-
miner_address: string;
|
|
74
|
-
/** * The associated mining cost. */
|
|
75
|
-
mining_cost: number;
|
|
76
|
-
/** * The associated gas used. */
|
|
77
|
-
gas_used: number;
|
|
78
|
-
/** * The associated gas limit. */
|
|
79
|
-
gas_limit: number;
|
|
80
|
-
/** * The link to the related tx by block endpoint. */
|
|
81
|
-
transactions_link: string;
|
|
82
|
-
}
|
|
83
|
-
export interface GetLogsResponse {
|
|
84
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
85
|
-
updated_at: Date;
|
|
86
|
-
/** * The requested chain ID eg: `1`. */
|
|
87
|
-
chain_id: number;
|
|
88
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
89
|
-
chain_name: string;
|
|
90
|
-
/** * List of response items. */
|
|
91
|
-
items: GetLogsEvent[];
|
|
92
|
-
}
|
|
93
|
-
export interface GetLogsEvent {
|
|
94
|
-
/** * The block signed timestamp in UTC. */
|
|
95
|
-
block_signed_at: Date;
|
|
96
|
-
/** * The height of the block. */
|
|
97
|
-
block_height: number;
|
|
98
|
-
/** * The hash of the block. */
|
|
99
|
-
block_hash: string;
|
|
100
|
-
/** * The offset is the position of the tx in the block. */
|
|
101
|
-
tx_offset: number;
|
|
102
|
-
/** * The offset is the position of the log entry within an event log. */
|
|
103
|
-
log_offset: number;
|
|
104
|
-
/** * The requested transaction hash. */
|
|
105
|
-
tx_hash: string;
|
|
106
|
-
/** * The log topics in raw data. */
|
|
107
|
-
raw_log_topics: string[];
|
|
108
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
109
|
-
sender_contract_decimals: number;
|
|
110
|
-
/** * The name of the sender. */
|
|
111
|
-
sender_name: string;
|
|
112
|
-
/** * The ticker symbol for the sender. This field is set by a developer and non-unique across a network. */
|
|
113
|
-
sender_contract_ticker_symbol: string;
|
|
114
|
-
/** * The address of the sender. */
|
|
115
|
-
sender_address: string;
|
|
116
|
-
/** * The label of the sender address. */
|
|
117
|
-
sender_address_label: string;
|
|
118
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
119
|
-
supports_erc: string[];
|
|
120
|
-
/** * The contract logo URL. */
|
|
121
|
-
sender_logo_url: string;
|
|
122
|
-
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
123
|
-
sender_factory_address: string;
|
|
124
|
-
/** * The log events in raw. */
|
|
125
|
-
raw_log_data: string;
|
|
126
|
-
/** * The decoded item. */
|
|
127
|
-
decoded: DecodedItem;
|
|
128
|
-
}
|
|
129
|
-
export interface LogEventsByAddressResponse {
|
|
130
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
131
|
-
updated_at: Date;
|
|
132
|
-
/** * The requested chain ID eg: `1`. */
|
|
133
|
-
chain_id: number;
|
|
134
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
135
|
-
chain_name: string;
|
|
136
|
-
/** * List of response items. */
|
|
137
|
-
items: LogEvent[];
|
|
138
|
-
/** * Pagination metadata. */
|
|
139
|
-
pagination: Pagination;
|
|
140
|
-
}
|
|
141
|
-
export interface LogEventsByTopicHashResponse {
|
|
142
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
143
|
-
updated_at: Date;
|
|
144
|
-
/** * The requested chain ID eg: `1`. */
|
|
145
|
-
chain_id: number;
|
|
146
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
147
|
-
chain_name: string;
|
|
148
|
-
/** * List of response items. */
|
|
149
|
-
items: LogEvent[];
|
|
150
|
-
/** * Pagination metadata. */
|
|
151
|
-
pagination: Pagination;
|
|
152
|
-
}
|
|
153
|
-
export interface AllChainsResponse {
|
|
154
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
155
|
-
updated_at: Date;
|
|
156
|
-
/** * List of response items. */
|
|
157
|
-
items: ChainItem[];
|
|
158
|
-
}
|
|
159
|
-
export interface ChainItem {
|
|
160
|
-
/** * The chain name eg: `eth-mainnet`. */
|
|
161
|
-
name: string;
|
|
162
|
-
/** * The requested chain ID eg: `1`. */
|
|
163
|
-
chain_id: string;
|
|
164
|
-
/** * True if the chain is a testnet. */
|
|
165
|
-
is_testnet: boolean;
|
|
166
|
-
/** * Schema name to use for direct SQL. */
|
|
167
|
-
db_schema_name: string;
|
|
168
|
-
/** * The chains label eg: `Ethereum Mainnet`. */
|
|
169
|
-
label: string;
|
|
170
|
-
/** * The category label eg: `Ethereum`. */
|
|
171
|
-
category_label: string;
|
|
172
|
-
/** * A svg logo url for the chain. */
|
|
173
|
-
logo_url: string;
|
|
174
|
-
/** * A black png logo url for the chain. */
|
|
175
|
-
black_logo_url: string;
|
|
176
|
-
/** * A white png logo url for the chain. */
|
|
177
|
-
white_logo_url: string;
|
|
178
|
-
/** * The color theme for the chain. */
|
|
179
|
-
color_theme: ColorTheme;
|
|
180
|
-
/** * True if the chain is an AppChain. */
|
|
181
|
-
is_appchain: boolean;
|
|
182
|
-
/** * The ChainItem the appchain is a part of. */
|
|
183
|
-
appchain_of: ChainItem;
|
|
184
|
-
}
|
|
185
|
-
export interface ColorTheme {
|
|
186
|
-
/** * The red color code. */
|
|
187
|
-
red: number;
|
|
188
|
-
/** * The green color code. */
|
|
189
|
-
green: number;
|
|
190
|
-
/** * The blue color code. */
|
|
191
|
-
blue: number;
|
|
192
|
-
/** * The alpha color code. */
|
|
193
|
-
alpha: number;
|
|
194
|
-
/** * The hexadecimal color code. */
|
|
195
|
-
hex: string;
|
|
196
|
-
/** * The color represented in css rgb() functional notation. */
|
|
197
|
-
css_rgb: string;
|
|
198
|
-
}
|
|
199
|
-
export interface AllChainsStatusResponse {
|
|
200
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
201
|
-
updated_at: Date;
|
|
202
|
-
/** * List of response items. */
|
|
203
|
-
items: ChainStatusItem[];
|
|
204
|
-
}
|
|
205
|
-
export interface ChainStatusItem {
|
|
206
|
-
/** * The chain name eg: `eth-mainnet`. */
|
|
207
|
-
name: string;
|
|
208
|
-
/** * The requested chain ID eg: `1`. */
|
|
209
|
-
chain_id: string;
|
|
210
|
-
/** * True if the chain is a testnet. */
|
|
211
|
-
is_testnet: boolean;
|
|
212
|
-
/** * A svg logo url for the chain. */
|
|
213
|
-
logo_url: string;
|
|
214
|
-
/** * A black png logo url for the chain. */
|
|
215
|
-
black_logo_url: string;
|
|
216
|
-
/** * A white png logo url for the chain. */
|
|
217
|
-
white_logo_url: string;
|
|
218
|
-
/** * True if the chain is an AppChain. */
|
|
219
|
-
is_appchain: boolean;
|
|
220
|
-
/** * The height of the lastest block available. */
|
|
221
|
-
synced_block_height: number;
|
|
222
|
-
/** * The signed timestamp of lastest block available. */
|
|
223
|
-
synced_blocked_signed_at: Date;
|
|
224
|
-
/** * True if the chain has data and ready for querying. */
|
|
225
|
-
has_data: boolean;
|
|
226
|
-
}
|
|
227
|
-
export interface ChainActivityResponse {
|
|
228
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
229
|
-
updated_at: Date;
|
|
230
|
-
/** * The requested address. */
|
|
231
|
-
address: string;
|
|
232
|
-
/** * List of response items. */
|
|
233
|
-
items: ChainActivityEvent[];
|
|
234
|
-
}
|
|
235
|
-
export interface ChainActivityEvent extends ChainItem {
|
|
236
|
-
/** * The timestamp when the address was last seen on the chain. */
|
|
237
|
-
last_seen_at: Date;
|
|
238
|
-
}
|
|
239
|
-
export interface GasPricesResponse {
|
|
240
|
-
/** * The requested chain ID eg: `1`. */
|
|
241
|
-
chain_id: number;
|
|
242
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
243
|
-
chain_name: string;
|
|
244
|
-
/** * The requested quote currency eg: `USD`. */
|
|
245
|
-
quote_currency: string;
|
|
246
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
247
|
-
updated_at: Date;
|
|
248
|
-
/** * The requested event type. */
|
|
249
|
-
event_type: string;
|
|
250
|
-
/** * The exchange rate for the requested quote currency. */
|
|
251
|
-
gas_quote_rate: number;
|
|
252
|
-
/** * The lowest gas fee for the latest block height. */
|
|
253
|
-
base_fee: bigint | null;
|
|
254
|
-
/** * List of response items. */
|
|
255
|
-
items: PriceItem[];
|
|
256
|
-
}
|
|
257
|
-
export interface PriceItem {
|
|
258
|
-
/** * The average gas price, in WEI, for the time interval. */
|
|
259
|
-
gas_price: string;
|
|
260
|
-
/** * The average gas spent for the time interval. */
|
|
261
|
-
gas_spent: string;
|
|
262
|
-
/** * The average gas spent in `quote-currency` denomination for the time interval. */
|
|
263
|
-
gas_quote: number;
|
|
264
|
-
/** * Other fees, when applicable. For example: OP chain L1 fees. */
|
|
265
|
-
other_fees: OtherFees;
|
|
266
|
-
/** * The sum of the L1 and L2 gas spent, in quote-currency, for the specified time interval. */
|
|
267
|
-
total_gas_quote: number;
|
|
268
|
-
/** * A prettier version of the total average gas spent, in quote-currency, for the specified time interval, for rendering purposes. */
|
|
269
|
-
pretty_total_gas_quote: string;
|
|
270
|
-
/** * The specified time interval. */
|
|
271
|
-
interval: string;
|
|
272
|
-
}
|
|
273
|
-
export interface OtherFees {
|
|
274
|
-
/** * The calculated L1 gas spent, when applicable, in quote-currency, for the specified time interval. */
|
|
275
|
-
l1_gas_quote: number;
|
|
276
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
export interface Pagination {
|
|
2
|
-
/** * True is there is another page. */
|
|
3
|
-
has_more: boolean;
|
|
4
|
-
/** * The requested page number. */
|
|
5
|
-
page_number: number;
|
|
6
|
-
/** * The requested number of items on the current page. */
|
|
7
|
-
page_size: number;
|
|
8
|
-
/** * The total number of items across all pages for this request. */
|
|
9
|
-
total_count: number;
|
|
10
|
-
}
|
|
11
|
-
export interface NftCollectionAttribute {
|
|
12
|
-
trait_type: string;
|
|
13
|
-
value: string;
|
|
14
|
-
}
|
|
15
|
-
export interface NftData {
|
|
16
|
-
/** * The token's id. */
|
|
17
|
-
token_id: bigint | null;
|
|
18
|
-
token_url: string;
|
|
19
|
-
/** * The original minter. */
|
|
20
|
-
original_owner: string;
|
|
21
|
-
/** * The current holder of this NFT. */
|
|
22
|
-
current_owner: string;
|
|
23
|
-
external_data: NftExternalData;
|
|
24
|
-
/** * If `true`, the asset data is available from the Covalent CDN. */
|
|
25
|
-
asset_cached: boolean;
|
|
26
|
-
/** * If `true`, the image data is available from the Covalent CDN. */
|
|
27
|
-
image_cached: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface NftExternalData {
|
|
30
|
-
name: string;
|
|
31
|
-
description: string;
|
|
32
|
-
asset_url: string;
|
|
33
|
-
asset_file_extension: string;
|
|
34
|
-
asset_mime_type: string;
|
|
35
|
-
asset_size_bytes: string;
|
|
36
|
-
image: string;
|
|
37
|
-
image_256: string;
|
|
38
|
-
image_512: string;
|
|
39
|
-
image_1024: string;
|
|
40
|
-
animation_url: string;
|
|
41
|
-
external_url: string;
|
|
42
|
-
attributes: NftCollectionAttribute[];
|
|
43
|
-
}
|
|
44
|
-
export interface DecodedItem {
|
|
45
|
-
name: string;
|
|
46
|
-
signature: string;
|
|
47
|
-
params: Param[];
|
|
48
|
-
}
|
|
49
|
-
export interface Param {
|
|
50
|
-
name: string;
|
|
51
|
-
type: string;
|
|
52
|
-
indexed: boolean;
|
|
53
|
-
decoded: boolean;
|
|
54
|
-
value: string;
|
|
55
|
-
}
|
|
56
|
-
export interface LogEvent {
|
|
57
|
-
/** * The block signed timestamp in UTC. */
|
|
58
|
-
block_signed_at: Date;
|
|
59
|
-
/** * The height of the block. */
|
|
60
|
-
block_height: number;
|
|
61
|
-
/** * The offset is the position of the tx in the block. */
|
|
62
|
-
tx_offset: number;
|
|
63
|
-
/** * The offset is the position of the log entry within an event log. */
|
|
64
|
-
log_offset: number;
|
|
65
|
-
/** * The requested transaction hash. */
|
|
66
|
-
tx_hash: string;
|
|
67
|
-
/** * The log topics in raw data. */
|
|
68
|
-
raw_log_topics: string[];
|
|
69
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
70
|
-
sender_contract_decimals: number;
|
|
71
|
-
/** * The name of the sender. */
|
|
72
|
-
sender_name: string;
|
|
73
|
-
sender_contract_ticker_symbol: string;
|
|
74
|
-
/** * The address of the sender. */
|
|
75
|
-
sender_address: string;
|
|
76
|
-
/** * The label of the sender address. */
|
|
77
|
-
sender_address_label: string;
|
|
78
|
-
/** * The contract logo URL. */
|
|
79
|
-
sender_logo_url: string;
|
|
80
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
81
|
-
supports_erc: string[];
|
|
82
|
-
/** * The address of the deployed UniswapV2 like factory contract for this DEX. */
|
|
83
|
-
sender_factory_address: string;
|
|
84
|
-
/** * The log events in raw. */
|
|
85
|
-
raw_log_data: string;
|
|
86
|
-
/** * The decoded item. */
|
|
87
|
-
decoded: DecodedItem;
|
|
88
|
-
}
|
|
89
|
-
export interface ContractMetadata {
|
|
90
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
91
|
-
contract_decimals: number;
|
|
92
|
-
/** * The string returned by the `name()` method. */
|
|
93
|
-
contract_name: string;
|
|
94
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
95
|
-
contract_ticker_symbol: string;
|
|
96
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
97
|
-
contract_address: string;
|
|
98
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
99
|
-
supports_erc: string[];
|
|
100
|
-
/** * The contract logo URL. */
|
|
101
|
-
logo_url: string;
|
|
102
|
-
}
|
|
103
|
-
export interface Explorer {
|
|
104
|
-
/** * The name of the explorer. */
|
|
105
|
-
label: string;
|
|
106
|
-
/** * The URL of the explorer. */
|
|
107
|
-
url: string;
|
|
108
|
-
}
|
|
109
|
-
export interface LogoUrls {
|
|
110
|
-
/** * The token logo URL. */
|
|
111
|
-
token_logo_url: string;
|
|
112
|
-
/** * The protocol logo URL. */
|
|
113
|
-
protocol_logo_url: string;
|
|
114
|
-
/** * The chain logo URL. */
|
|
115
|
-
chain_logo_url: string;
|
|
116
|
-
}
|
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { LogEvent, NftData, Pagination } from "./GenericTypes";
|
|
2
|
-
export interface ChainCollectionResponse {
|
|
3
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
4
|
-
updated_at: Date;
|
|
5
|
-
/** * The requested chain ID eg: `1`. */
|
|
6
|
-
chain_id: number;
|
|
7
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
8
|
-
chain_name: string;
|
|
9
|
-
/** * List of response items. */
|
|
10
|
-
items: ChainCollectionItem[];
|
|
11
|
-
/** * Pagination metadata. */
|
|
12
|
-
pagination: Pagination;
|
|
13
|
-
}
|
|
14
|
-
export interface ChainCollectionItem {
|
|
15
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
16
|
-
contract_address: string;
|
|
17
|
-
/** * The string returned by the `name()` method. */
|
|
18
|
-
contract_name: string;
|
|
19
|
-
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
20
|
-
is_spam: boolean;
|
|
21
|
-
token_total_supply: number;
|
|
22
|
-
cached_metadata_count: number;
|
|
23
|
-
cached_asset_count: number;
|
|
24
|
-
last_scraped_at: Date;
|
|
25
|
-
}
|
|
26
|
-
export interface NftAddressBalanceNftResponse {
|
|
27
|
-
/** * The requested address. */
|
|
28
|
-
address: string;
|
|
29
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
30
|
-
updated_at: Date;
|
|
31
|
-
/** * List of response items. */
|
|
32
|
-
items: NftTokenContractBalanceItem[];
|
|
33
|
-
}
|
|
34
|
-
export interface NftTokenContractBalanceItem {
|
|
35
|
-
/** * The string returned by the `name()` method. */
|
|
36
|
-
contract_name: string;
|
|
37
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
38
|
-
contract_ticker_symbol: string;
|
|
39
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
40
|
-
contract_address: string;
|
|
41
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
42
|
-
supports_erc: string[];
|
|
43
|
-
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
44
|
-
is_spam: boolean;
|
|
45
|
-
last_transfered_at: Date;
|
|
46
|
-
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
47
|
-
balance: bigint | null;
|
|
48
|
-
balance_24h: string;
|
|
49
|
-
type: string;
|
|
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
|
-
floor_price_quote: number;
|
|
52
|
-
/** * A prettier version of the floor price quote for rendering purposes. */
|
|
53
|
-
pretty_floor_price_quote: string;
|
|
54
|
-
/** * The current floor price in native 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. */
|
|
55
|
-
floor_price_native_quote: number;
|
|
56
|
-
nft_data: NftData[];
|
|
57
|
-
}
|
|
58
|
-
export interface NftMetadataResponse {
|
|
59
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
60
|
-
updated_at: Date;
|
|
61
|
-
/** * List of response items. */
|
|
62
|
-
items: NftTokenContract[];
|
|
63
|
-
/** * Pagination metadata. */
|
|
64
|
-
pagination: Pagination;
|
|
65
|
-
}
|
|
66
|
-
export interface NftTokenContract {
|
|
67
|
-
/** * The string returned by the `name()` method. */
|
|
68
|
-
contract_name: string;
|
|
69
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
70
|
-
contract_ticker_symbol: string;
|
|
71
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
72
|
-
contract_address: string;
|
|
73
|
-
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
74
|
-
is_spam: boolean;
|
|
75
|
-
type: string;
|
|
76
|
-
nft_data: NftData;
|
|
77
|
-
}
|
|
78
|
-
export interface NftTransactionsResponse {
|
|
79
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
80
|
-
updated_at: Date;
|
|
81
|
-
/** * The requested chain ID eg: `1`. */
|
|
82
|
-
chain_id: number;
|
|
83
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
84
|
-
chain_name: string;
|
|
85
|
-
/** * List of response items. */
|
|
86
|
-
items: NftTransaction[];
|
|
87
|
-
}
|
|
88
|
-
export interface NftTransaction {
|
|
89
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
90
|
-
contract_decimals: number;
|
|
91
|
-
/** * The string returned by the `name()` method. */
|
|
92
|
-
contract_name: string;
|
|
93
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
94
|
-
contract_ticker_symbol: string;
|
|
95
|
-
/** * The contract logo URL. */
|
|
96
|
-
logo_url: string;
|
|
97
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
98
|
-
contract_address: string;
|
|
99
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
100
|
-
supports_erc: string[];
|
|
101
|
-
nft_transactions: NftTransactionItem[];
|
|
102
|
-
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
103
|
-
is_spam: boolean;
|
|
104
|
-
}
|
|
105
|
-
export interface NftTransactionItem {
|
|
106
|
-
/** * The block signed timestamp in UTC. */
|
|
107
|
-
block_signed_at: Date;
|
|
108
|
-
/** * The height of the block. */
|
|
109
|
-
block_height: number;
|
|
110
|
-
/** * The requested transaction hash. */
|
|
111
|
-
tx_hash: string;
|
|
112
|
-
/** * The offset is the position of the tx in the block. */
|
|
113
|
-
tx_offset: number;
|
|
114
|
-
/** * Whether or not transaction is successful. */
|
|
115
|
-
successful: boolean;
|
|
116
|
-
/** * The sender's wallet address. */
|
|
117
|
-
from_address: string;
|
|
118
|
-
/** * The label of `from` address. */
|
|
119
|
-
from_address_label: string;
|
|
120
|
-
/** * The receiver's wallet address. */
|
|
121
|
-
to_address: string;
|
|
122
|
-
/** * The label of `to` address. */
|
|
123
|
-
to_address_label: string;
|
|
124
|
-
/** * The value attached to this tx. */
|
|
125
|
-
value: bigint | null;
|
|
126
|
-
/** * The value attached in `quote-currency` to this tx. */
|
|
127
|
-
value_quote: number;
|
|
128
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
129
|
-
pretty_value_quote: string;
|
|
130
|
-
gas_offered: number;
|
|
131
|
-
/** * The gas spent for this tx. */
|
|
132
|
-
gas_spent: number;
|
|
133
|
-
/** * The gas price at the time of this tx. */
|
|
134
|
-
gas_price: number;
|
|
135
|
-
/** * The total transaction fees (gas_price * gas_spent) paid for this tx, denoted in wei. */
|
|
136
|
-
fees_paid: bigint | null;
|
|
137
|
-
/** * The gas spent in `quote-currency` denomination. */
|
|
138
|
-
gas_quote: number;
|
|
139
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
140
|
-
pretty_gas_quote: string;
|
|
141
|
-
gas_quote_rate: number;
|
|
142
|
-
/** * The log events. */
|
|
143
|
-
log_events: LogEvent[];
|
|
144
|
-
}
|
|
145
|
-
export interface NftCollectionTraitsResponse {
|
|
146
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
147
|
-
updated_at: Date;
|
|
148
|
-
/** * List of response items. */
|
|
149
|
-
items: NftTrait[];
|
|
150
|
-
}
|
|
151
|
-
export interface NftTrait {
|
|
152
|
-
name: string;
|
|
153
|
-
}
|
|
154
|
-
export interface NftCollectionAttributesForTraitResponse {
|
|
155
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
156
|
-
updated_at: Date;
|
|
157
|
-
/** * List of response items. */
|
|
158
|
-
items: NftSummaryAttribute[];
|
|
159
|
-
}
|
|
160
|
-
export interface NftSummaryAttribute {
|
|
161
|
-
trait_type: string;
|
|
162
|
-
values: NftAttribute[];
|
|
163
|
-
unique_values: number;
|
|
164
|
-
}
|
|
165
|
-
export interface NftAttribute {
|
|
166
|
-
value: string;
|
|
167
|
-
count: number;
|
|
168
|
-
}
|
|
169
|
-
export interface NftCollectionTraitSummaryResponse {
|
|
170
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
171
|
-
updated_at: Date;
|
|
172
|
-
/** * List of response items. */
|
|
173
|
-
items: NftTraitSummary[];
|
|
174
|
-
}
|
|
175
|
-
export interface NftTraitSummary {
|
|
176
|
-
/** * Trait name */
|
|
177
|
-
name: string;
|
|
178
|
-
/** * Type of the value of the trait. */
|
|
179
|
-
value_type: string;
|
|
180
|
-
/** * Populated for `numeric` traits. */
|
|
181
|
-
value_numeric: NftTraitNumeric;
|
|
182
|
-
/** * Populated for `string` traits. */
|
|
183
|
-
value_string: NftTraitString;
|
|
184
|
-
attributes: NftSummaryAttribute[];
|
|
185
|
-
}
|
|
186
|
-
export interface NftTraitNumeric {
|
|
187
|
-
min: number;
|
|
188
|
-
max: number;
|
|
189
|
-
}
|
|
190
|
-
export interface NftTraitString {
|
|
191
|
-
/** * String value */
|
|
192
|
-
value: string;
|
|
193
|
-
/** * Number of distinct tokens that have this trait value. */
|
|
194
|
-
token_count: number;
|
|
195
|
-
/** * Percentage of tokens in the collection that have this trait. */
|
|
196
|
-
trait_percentage: number;
|
|
197
|
-
}
|
|
198
|
-
export interface NftOwnershipForCollectionResponse {
|
|
199
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
200
|
-
updated_at: Date;
|
|
201
|
-
/** * The requested address. */
|
|
202
|
-
address: string;
|
|
203
|
-
/** * The requested collection. */
|
|
204
|
-
collection: string;
|
|
205
|
-
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
206
|
-
is_spam: boolean;
|
|
207
|
-
/** * List of response items. */
|
|
208
|
-
items: NftOwnershipForCollectionItem[];
|
|
209
|
-
}
|
|
210
|
-
export interface NftOwnershipForCollectionItem {
|
|
211
|
-
/** * The string returned by the `name()` method. */
|
|
212
|
-
contract_name: string;
|
|
213
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
214
|
-
contract_ticker_symbol: string;
|
|
215
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
216
|
-
contract_address: string;
|
|
217
|
-
/** * The token's id. */
|
|
218
|
-
token_id: bigint | null;
|
|
219
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
220
|
-
supports_erc: string[];
|
|
221
|
-
last_transfered_at: Date;
|
|
222
|
-
/** * Nft balance. */
|
|
223
|
-
balance: bigint | null;
|
|
224
|
-
balance_24h: string;
|
|
225
|
-
type: string;
|
|
226
|
-
nft_data: NftData;
|
|
227
|
-
}
|
|
228
|
-
export interface NftMarketSaleCountResponse {
|
|
229
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
230
|
-
updated_at: Date;
|
|
231
|
-
/** * The requested address. */
|
|
232
|
-
address: string;
|
|
233
|
-
/** * The requested quote currency eg: `USD`. */
|
|
234
|
-
quote_currency: string;
|
|
235
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
236
|
-
chain_name: string;
|
|
237
|
-
/** * The requested chain ID eg: `1`. */
|
|
238
|
-
chain_id: number;
|
|
239
|
-
/** * List of response items. */
|
|
240
|
-
items: MarketSaleCountItem[];
|
|
241
|
-
}
|
|
242
|
-
export interface MarketSaleCountItem {
|
|
243
|
-
/** * The timestamp of the date of sale. */
|
|
244
|
-
date: Date;
|
|
245
|
-
/** * The total amount of sales for the current day. */
|
|
246
|
-
sale_count: number;
|
|
247
|
-
}
|
|
248
|
-
export interface NftMarketVolumeResponse {
|
|
249
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
250
|
-
updated_at: Date;
|
|
251
|
-
/** * The requested address. */
|
|
252
|
-
address: string;
|
|
253
|
-
/** * The requested quote currency eg: `USD`. */
|
|
254
|
-
quote_currency: string;
|
|
255
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
256
|
-
chain_name: string;
|
|
257
|
-
/** * The requested chain ID eg: `1`. */
|
|
258
|
-
chain_id: number;
|
|
259
|
-
/** * List of response items. */
|
|
260
|
-
items: MarketVolumeItem[];
|
|
261
|
-
}
|
|
262
|
-
export interface MarketVolumeItem {
|
|
263
|
-
/** * The timestamp of the date of sale. */
|
|
264
|
-
date: Date;
|
|
265
|
-
/** * The ticker symbol for the native currency. */
|
|
266
|
-
native_ticker_symbol: string;
|
|
267
|
-
/** * The contract name of the native currency. */
|
|
268
|
-
native_name: string;
|
|
269
|
-
/** * The current volume converted to fiat in `quote-currency`. */
|
|
270
|
-
volume_quote: number;
|
|
271
|
-
/** * The current volume in native currency. */
|
|
272
|
-
volume_native_quote: number;
|
|
273
|
-
/** * A prettier version of the volume quote for rendering purposes. */
|
|
274
|
-
pretty_volume_quote: string;
|
|
275
|
-
}
|
|
276
|
-
export interface NftMarketFloorPriceResponse {
|
|
277
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
278
|
-
updated_at: Date;
|
|
279
|
-
/** * The requested address. */
|
|
280
|
-
address: string;
|
|
281
|
-
/** * The requested quote currency eg: `USD`. */
|
|
282
|
-
quote_currency: string;
|
|
283
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
284
|
-
chain_name: string;
|
|
285
|
-
/** * The requested chain ID eg: `1`. */
|
|
286
|
-
chain_id: number;
|
|
287
|
-
/** * List of response items. */
|
|
288
|
-
items: MarketFloorPriceItem[];
|
|
289
|
-
}
|
|
290
|
-
export interface MarketFloorPriceItem {
|
|
291
|
-
/** * The timestamp of the date of sale. */
|
|
292
|
-
date: Date;
|
|
293
|
-
/** * The ticker symbol for the native currency. */
|
|
294
|
-
native_ticker_symbol: string;
|
|
295
|
-
/** * The contract name of the native currency. */
|
|
296
|
-
native_name: string;
|
|
297
|
-
/** * The current floor price in native currency. */
|
|
298
|
-
floor_price_native_quote: number;
|
|
299
|
-
/** * The current floor price converted to fiat in `quote-currency`. */
|
|
300
|
-
floor_price_quote: number;
|
|
301
|
-
/** * A prettier version of the floor price quote for rendering purposes. */
|
|
302
|
-
pretty_floor_price_quote: string;
|
|
303
|
-
}
|