@covalenthq/client-sdk 1.0.1 → 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,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GenericTypes.js","sourceRoot":"","sources":["../../../src/util/types/GenericTypes.ts"],"names":[],"mappings":""}
|
|
@@ -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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NftServiceTypes.js","sourceRoot":"","sources":["../../../src/util/types/NftServiceTypes.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ContractMetadata, LogoUrls } from "./GenericTypes";
|
|
2
|
-
export interface TokenPricesResponse {
|
|
3
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
4
|
-
contract_decimals: number;
|
|
5
|
-
/** * The string returned by the `name()` method. */
|
|
6
|
-
contract_name: string;
|
|
7
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
8
|
-
contract_ticker_symbol: string;
|
|
9
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
10
|
-
contract_address: string;
|
|
11
|
-
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
12
|
-
supports_erc: string[];
|
|
13
|
-
/** * The contract logo URL. */
|
|
14
|
-
logo_url: string;
|
|
15
|
-
update_at: Date;
|
|
16
|
-
/** * The requested quote currency eg: `USD`. */
|
|
17
|
-
quote_currency: string;
|
|
18
|
-
/** * The contract logo URLs. */
|
|
19
|
-
logo_urls: LogoUrls;
|
|
20
|
-
/** * List of response items. */
|
|
21
|
-
prices: Price[];
|
|
22
|
-
/** * List of response items. */
|
|
23
|
-
items: Price[];
|
|
24
|
-
}
|
|
25
|
-
export interface Price {
|
|
26
|
-
contract_metadata: ContractMetadata;
|
|
27
|
-
/** * The date of the price capture. */
|
|
28
|
-
date: Date;
|
|
29
|
-
/** * The price in the requested `quote-currency`. */
|
|
30
|
-
price: number;
|
|
31
|
-
/** * A prettier version of the price for rendering purposes. */
|
|
32
|
-
pretty_price: string;
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PricingServiceTypes.js","sourceRoot":"","sources":["../../../src/util/types/PricingServiceTypes.ts"],"names":[],"mappings":""}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
export interface ApprovalsResponse {
|
|
2
|
-
/** * The requested address. */
|
|
3
|
-
address: string;
|
|
4
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
5
|
-
updated_at: Date;
|
|
6
|
-
/** * The requested quote currency eg: `USD`. */
|
|
7
|
-
quote_currency: string;
|
|
8
|
-
/** * The requested chain ID eg: `1`. */
|
|
9
|
-
chain_id: number;
|
|
10
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
11
|
-
chain_name: string;
|
|
12
|
-
/** * List of response items. */
|
|
13
|
-
items: TokensApprovalItem[];
|
|
14
|
-
}
|
|
15
|
-
export interface TokensApprovalItem {
|
|
16
|
-
/** * The address for the token that has approvals. */
|
|
17
|
-
token_address: string;
|
|
18
|
-
/** * The name for the token that has approvals. */
|
|
19
|
-
token_address_label: string;
|
|
20
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
21
|
-
ticker_symbol: string;
|
|
22
|
-
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
23
|
-
contract_decimals: number;
|
|
24
|
-
/** * The contract logo URL. */
|
|
25
|
-
logo_url: string;
|
|
26
|
-
/** * The exchange rate for the requested quote currency. */
|
|
27
|
-
quote_rate: number;
|
|
28
|
-
/** * Wallet balance of the token. */
|
|
29
|
-
balance: bigint | null;
|
|
30
|
-
/** * Value of the wallet balance of the token. */
|
|
31
|
-
balance_quote: number;
|
|
32
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
33
|
-
pretty_balance_quote: string;
|
|
34
|
-
/** * Total amount at risk across all spenders. */
|
|
35
|
-
value_at_risk: string;
|
|
36
|
-
/** * Value of total amount at risk across all spenders. */
|
|
37
|
-
value_at_risk_quote: number;
|
|
38
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
39
|
-
pretty_value_at_risk_quote: string;
|
|
40
|
-
/** * Contracts with non-zero approvals for this token. */
|
|
41
|
-
spenders: TokenSpenderItem[];
|
|
42
|
-
}
|
|
43
|
-
export interface TokenSpenderItem {
|
|
44
|
-
/** * The height of the block. */
|
|
45
|
-
block_height: number;
|
|
46
|
-
/** * The offset is the position of the tx in the block. */
|
|
47
|
-
tx_offset: number;
|
|
48
|
-
/** * The offset is the position of the log entry within an event log." */
|
|
49
|
-
log_offset: number;
|
|
50
|
-
/** * The block signed timestamp in UTC. */
|
|
51
|
-
block_signed_at: Date;
|
|
52
|
-
/** * Most recent transaction that updated approval amounts for the token. */
|
|
53
|
-
tx_hash: string;
|
|
54
|
-
/** * Address of the contract with approval for the token. */
|
|
55
|
-
spender_address: string;
|
|
56
|
-
/** * Name of the contract with approval for the token. */
|
|
57
|
-
spender_address_label: string;
|
|
58
|
-
/** * Remaining number of tokens granted to the spender by the approval. */
|
|
59
|
-
allowance: string;
|
|
60
|
-
/** * Value of the remaining allowance specified by the approval. */
|
|
61
|
-
allowance_quote: number;
|
|
62
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
63
|
-
pretty_allowance_quote: string;
|
|
64
|
-
/** * Amount at risk for spender. */
|
|
65
|
-
value_at_risk: string;
|
|
66
|
-
/** * Value of amount at risk for spender. */
|
|
67
|
-
value_at_risk_quote: number;
|
|
68
|
-
/** * A prettier version of the quote for rendering purposes. */
|
|
69
|
-
pretty_value_at_risk_quote: string;
|
|
70
|
-
risk_factor: string;
|
|
71
|
-
}
|
|
72
|
-
export interface NftApprovalsResponse {
|
|
73
|
-
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
74
|
-
updated_at: Date;
|
|
75
|
-
/** * The requested chain ID eg: `1`. */
|
|
76
|
-
chain_id: number;
|
|
77
|
-
/** * The requested chain name eg: `eth-mainnet`. */
|
|
78
|
-
chain_name: string;
|
|
79
|
-
/** * The requested address. */
|
|
80
|
-
address: string;
|
|
81
|
-
/** * List of response items. */
|
|
82
|
-
items: NftApprovalsItem[];
|
|
83
|
-
}
|
|
84
|
-
export interface NftApprovalsItem {
|
|
85
|
-
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
86
|
-
contract_address: string;
|
|
87
|
-
/** * The label of the contract address. */
|
|
88
|
-
contract_address_label: string;
|
|
89
|
-
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
90
|
-
contract_ticker_symbol: string;
|
|
91
|
-
/** * List of asset balances held by the user. */
|
|
92
|
-
token_balances: NftApprovalBalance[];
|
|
93
|
-
/** * Contracts with non-zero approvals for this token. */
|
|
94
|
-
spenders: NftApprovalSpender[];
|
|
95
|
-
}
|
|
96
|
-
export interface NftApprovalBalance {
|
|
97
|
-
/** * The token's id. */
|
|
98
|
-
token_id: bigint | null;
|
|
99
|
-
/** * The NFT's token balance. */
|
|
100
|
-
token_balance: bigint | null;
|
|
101
|
-
}
|
|
102
|
-
export interface NftApprovalSpender {
|
|
103
|
-
/** * The height of the block. */
|
|
104
|
-
block_height: number;
|
|
105
|
-
/** * The offset is the position of the tx in the block. */
|
|
106
|
-
tx_offset: number;
|
|
107
|
-
/** * The offset is the position of the log entry within an event log." */
|
|
108
|
-
log_offset: number;
|
|
109
|
-
/** * The block signed timestamp in UTC. */
|
|
110
|
-
block_signed_at: Date;
|
|
111
|
-
/** * Most recent transaction that updated approval amounts for the token. */
|
|
112
|
-
tx_hash: string;
|
|
113
|
-
/** * Address of the contract with approval for the token. */
|
|
114
|
-
spender_address: string;
|
|
115
|
-
/** * Name of the contract with approval for the token. */
|
|
116
|
-
spender_address_label: string;
|
|
117
|
-
/** * The token ids approved. */
|
|
118
|
-
token_ids_approved: string;
|
|
119
|
-
/** * Remaining number of tokens granted to the spender by the approval. */
|
|
120
|
-
allowance: string;
|
|
121
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityServiceTypes.js","sourceRoot":"","sources":["../../../src/util/types/SecurityServiceTypes.ts"],"names":[],"mappings":""}
|