@covalenthq/client-sdk 1.0.2 → 2.0.1

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.
Files changed (192) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +223 -282
  3. package/dist/cjs/index.d.ts +17 -20
  4. package/dist/cjs/index.js +2331 -7659
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/src/GoldRushClient.d.ts +20 -0
  7. package/dist/cjs/src/services/BalanceService.d.ts +125 -0
  8. package/dist/cjs/src/services/BaseService.d.ts +161 -0
  9. package/dist/cjs/src/services/NftService.d.ts +157 -0
  10. package/dist/cjs/src/services/PricingService.d.ts +25 -0
  11. package/dist/cjs/src/services/SecurityService.d.ts +28 -0
  12. package/dist/cjs/src/services/TransactionService.d.ts +128 -0
  13. package/dist/cjs/src/utils/functions/bigIntParser.d.ts +1 -0
  14. package/dist/cjs/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  15. package/dist/cjs/src/utils/functions/debugOutput.d.ts +2 -0
  16. package/dist/cjs/src/utils/functions/endpointGenerator.d.ts +4 -0
  17. package/dist/cjs/src/utils/functions/execution.d.ts +11 -0
  18. package/dist/cjs/src/utils/functions/isValidApiKey.d.ts +1 -0
  19. package/dist/cjs/src/utils/functions/paginateEndpoint.d.ts +7 -0
  20. package/dist/cjs/src/utils/functions/prettifyCurrency.d.ts +2 -0
  21. package/dist/{esm/util/types/BalanceServiceTypes.d.ts → cjs/src/utils/types/BalanceService.types.d.ts} +91 -27
  22. package/dist/{es/util/types/BaseServiceTypes.d.ts → cjs/src/utils/types/BaseService.types.d.ts} +68 -18
  23. package/dist/cjs/src/utils/types/Generic.types.d.ts +477 -0
  24. package/dist/{esm/util/types/NftServiceTypes.d.ts → cjs/src/utils/types/NftService.types.d.ts} +53 -83
  25. package/dist/cjs/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  26. package/dist/{esm/util/types/SecurityServiceTypes.d.ts → cjs/src/utils/types/SecurityService.types.d.ts} +8 -7
  27. package/dist/{esm/util/types/TransactionServiceTypes.d.ts → cjs/src/utils/types/TransactionService.types.d.ts} +110 -24
  28. package/dist/es/index.d.ts +17 -20
  29. package/dist/es/index.js +2327 -7649
  30. package/dist/es/index.js.map +1 -1
  31. package/dist/es/src/GoldRushClient.d.ts +20 -0
  32. package/dist/es/src/services/BalanceService.d.ts +125 -0
  33. package/dist/es/src/services/BaseService.d.ts +161 -0
  34. package/dist/es/src/services/NftService.d.ts +157 -0
  35. package/dist/es/src/services/PricingService.d.ts +25 -0
  36. package/dist/es/src/services/SecurityService.d.ts +28 -0
  37. package/dist/es/src/services/TransactionService.d.ts +128 -0
  38. package/dist/es/src/utils/functions/bigIntParser.d.ts +1 -0
  39. package/dist/es/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  40. package/dist/es/src/utils/functions/debugOutput.d.ts +2 -0
  41. package/dist/es/src/utils/functions/endpointGenerator.d.ts +4 -0
  42. package/dist/es/src/utils/functions/execution.d.ts +11 -0
  43. package/dist/es/src/utils/functions/isValidApiKey.d.ts +1 -0
  44. package/dist/es/src/utils/functions/paginateEndpoint.d.ts +7 -0
  45. package/dist/es/src/utils/functions/prettifyCurrency.d.ts +2 -0
  46. package/dist/{cjs/util/types/BalanceServiceTypes.d.ts → es/src/utils/types/BalanceService.types.d.ts} +91 -27
  47. package/dist/{esm/util/types/BaseServiceTypes.d.ts → es/src/utils/types/BaseService.types.d.ts} +68 -18
  48. package/dist/es/src/utils/types/Generic.types.d.ts +477 -0
  49. package/dist/{cjs/util/types/NftServiceTypes.d.ts → es/src/utils/types/NftService.types.d.ts} +53 -83
  50. package/dist/es/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  51. package/dist/{util/types/SecurityServiceTypes.d.ts → es/src/utils/types/SecurityService.types.d.ts} +8 -7
  52. package/dist/{cjs/util/types/TransactionServiceTypes.d.ts → es/src/utils/types/TransactionService.types.d.ts} +110 -24
  53. package/dist/esm/index.d.ts +17 -20
  54. package/dist/esm/index.js +2327 -7649
  55. package/dist/esm/index.js.map +1 -1
  56. package/dist/esm/src/GoldRushClient.d.ts +20 -0
  57. package/dist/esm/src/services/BalanceService.d.ts +125 -0
  58. package/dist/esm/src/services/BaseService.d.ts +161 -0
  59. package/dist/esm/src/services/NftService.d.ts +157 -0
  60. package/dist/esm/src/services/PricingService.d.ts +25 -0
  61. package/dist/esm/src/services/SecurityService.d.ts +28 -0
  62. package/dist/esm/src/services/TransactionService.d.ts +128 -0
  63. package/dist/esm/src/utils/functions/bigIntParser.d.ts +1 -0
  64. package/dist/esm/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  65. package/dist/esm/src/utils/functions/debugOutput.d.ts +2 -0
  66. package/dist/esm/src/utils/functions/endpointGenerator.d.ts +4 -0
  67. package/dist/esm/src/utils/functions/execution.d.ts +11 -0
  68. package/dist/esm/src/utils/functions/isValidApiKey.d.ts +1 -0
  69. package/dist/esm/src/utils/functions/paginateEndpoint.d.ts +7 -0
  70. package/dist/esm/src/utils/functions/prettifyCurrency.d.ts +2 -0
  71. package/dist/{util/types/BalanceServiceTypes.d.ts → esm/src/utils/types/BalanceService.types.d.ts} +91 -27
  72. package/dist/{cjs/util/types/BaseServiceTypes.d.ts → esm/src/utils/types/BaseService.types.d.ts} +68 -18
  73. package/dist/esm/src/utils/types/Generic.types.d.ts +477 -0
  74. package/dist/{util/types/NftServiceTypes.d.ts → esm/src/utils/types/NftService.types.d.ts} +53 -83
  75. package/dist/esm/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  76. package/dist/{es/util/types/SecurityServiceTypes.d.ts → esm/src/utils/types/SecurityService.types.d.ts} +8 -7
  77. package/dist/{util/types/TransactionServiceTypes.d.ts → esm/src/utils/types/TransactionService.types.d.ts} +110 -24
  78. package/package.json +25 -12
  79. package/dist/cjs/services/BalanceService.d.ts +0 -638
  80. package/dist/cjs/services/BaseService.d.ts +0 -571
  81. package/dist/cjs/services/CovalentClient.d.ts +0 -57
  82. package/dist/cjs/services/NftService.d.ts +0 -686
  83. package/dist/cjs/services/PricingService.d.ts +0 -103
  84. package/dist/cjs/services/SecurityService.d.ts +0 -162
  85. package/dist/cjs/services/TransactionService.d.ts +0 -711
  86. package/dist/cjs/services/XykService.d.ts +0 -1018
  87. package/dist/cjs/util/ApiHelpers.d.ts +0 -6
  88. package/dist/cjs/util/ApiKeyValidator.d.ts +0 -8
  89. package/dist/cjs/util/Chains.d.ts +0 -223
  90. package/dist/cjs/util/backoff.d.ts +0 -12
  91. package/dist/cjs/util/prettifyCurrency.d.ts +0 -2
  92. package/dist/cjs/util/types/GenericTypes.d.ts +0 -116
  93. package/dist/cjs/util/types/SecurityServiceTypes.d.ts +0 -121
  94. package/dist/cjs/util/types/XykServiceTypes.d.ts +0 -687
  95. package/dist/es/services/BalanceService.d.ts +0 -638
  96. package/dist/es/services/BaseService.d.ts +0 -571
  97. package/dist/es/services/CovalentClient.d.ts +0 -57
  98. package/dist/es/services/NftService.d.ts +0 -686
  99. package/dist/es/services/PricingService.d.ts +0 -103
  100. package/dist/es/services/SecurityService.d.ts +0 -162
  101. package/dist/es/services/TransactionService.d.ts +0 -711
  102. package/dist/es/services/XykService.d.ts +0 -1018
  103. package/dist/es/util/ApiHelpers.d.ts +0 -6
  104. package/dist/es/util/ApiKeyValidator.d.ts +0 -8
  105. package/dist/es/util/Chains.d.ts +0 -223
  106. package/dist/es/util/backoff.d.ts +0 -12
  107. package/dist/es/util/prettifyCurrency.d.ts +0 -2
  108. package/dist/es/util/types/BalanceServiceTypes.d.ts +0 -378
  109. package/dist/es/util/types/GenericTypes.d.ts +0 -116
  110. package/dist/es/util/types/NftServiceTypes.d.ts +0 -303
  111. package/dist/es/util/types/TransactionServiceTypes.d.ts +0 -388
  112. package/dist/es/util/types/XykServiceTypes.d.ts +0 -687
  113. package/dist/esm/services/BalanceService.d.ts +0 -638
  114. package/dist/esm/services/BaseService.d.ts +0 -571
  115. package/dist/esm/services/CovalentClient.d.ts +0 -57
  116. package/dist/esm/services/NftService.d.ts +0 -686
  117. package/dist/esm/services/PricingService.d.ts +0 -103
  118. package/dist/esm/services/SecurityService.d.ts +0 -162
  119. package/dist/esm/services/TransactionService.d.ts +0 -711
  120. package/dist/esm/services/XykService.d.ts +0 -1018
  121. package/dist/esm/util/ApiHelpers.d.ts +0 -6
  122. package/dist/esm/util/ApiKeyValidator.d.ts +0 -8
  123. package/dist/esm/util/Chains.d.ts +0 -223
  124. package/dist/esm/util/backoff.d.ts +0 -12
  125. package/dist/esm/util/prettifyCurrency.d.ts +0 -2
  126. package/dist/esm/util/types/GenericTypes.d.ts +0 -116
  127. package/dist/esm/util/types/XykServiceTypes.d.ts +0 -687
  128. package/dist/index.d.ts +0 -20
  129. package/dist/index.js +0 -21
  130. package/dist/index.js.map +0 -1
  131. package/dist/services/BalanceService.d.ts +0 -638
  132. package/dist/services/BalanceService.js +0 -959
  133. package/dist/services/BalanceService.js.map +0 -1
  134. package/dist/services/BaseService.d.ts +0 -571
  135. package/dist/services/BaseService.js +0 -1202
  136. package/dist/services/BaseService.js.map +0 -1
  137. package/dist/services/CovalentClient.d.ts +0 -57
  138. package/dist/services/CovalentClient.js +0 -49
  139. package/dist/services/CovalentClient.js.map +0 -1
  140. package/dist/services/NftService.d.ts +0 -686
  141. package/dist/services/NftService.js +0 -1490
  142. package/dist/services/NftService.js.map +0 -1
  143. package/dist/services/PricingService.d.ts +0 -103
  144. package/dist/services/PricingService.js +0 -155
  145. package/dist/services/PricingService.js.map +0 -1
  146. package/dist/services/SecurityService.d.ts +0 -162
  147. package/dist/services/SecurityService.js +0 -249
  148. package/dist/services/SecurityService.js.map +0 -1
  149. package/dist/services/TransactionService.d.ts +0 -711
  150. package/dist/services/TransactionService.js +0 -1687
  151. package/dist/services/TransactionService.js.map +0 -1
  152. package/dist/services/XykService.d.ts +0 -1018
  153. package/dist/services/XykService.js +0 -1827
  154. package/dist/services/XykService.js.map +0 -1
  155. package/dist/util/ApiHelpers.d.ts +0 -6
  156. package/dist/util/ApiHelpers.js +0 -87
  157. package/dist/util/ApiHelpers.js.map +0 -1
  158. package/dist/util/ApiKeyValidator.d.ts +0 -8
  159. package/dist/util/ApiKeyValidator.js +0 -13
  160. package/dist/util/ApiKeyValidator.js.map +0 -1
  161. package/dist/util/CalculatePrettyBalance.d.ts +0 -1
  162. package/dist/util/CalculatePrettyBalance.js +0 -32
  163. package/dist/util/CalculatePrettyBalance.js.map +0 -1
  164. package/dist/util/Chains.d.ts +0 -223
  165. package/dist/util/Chains.js +0 -225
  166. package/dist/util/Chains.js.map +0 -1
  167. package/dist/util/backoff.d.ts +0 -12
  168. package/dist/util/backoff.js +0 -47
  169. package/dist/util/backoff.js.map +0 -1
  170. package/dist/util/prettifyCurrency.d.ts +0 -2
  171. package/dist/util/prettifyCurrency.js +0 -69
  172. package/dist/util/prettifyCurrency.js.map +0 -1
  173. package/dist/util/types/BalanceServiceTypes.js +0 -2
  174. package/dist/util/types/BalanceServiceTypes.js.map +0 -1
  175. package/dist/util/types/BaseServiceTypes.d.ts +0 -276
  176. package/dist/util/types/BaseServiceTypes.js +0 -2
  177. package/dist/util/types/BaseServiceTypes.js.map +0 -1
  178. package/dist/util/types/GenericTypes.d.ts +0 -116
  179. package/dist/util/types/GenericTypes.js +0 -2
  180. package/dist/util/types/GenericTypes.js.map +0 -1
  181. package/dist/util/types/NftServiceTypes.js +0 -2
  182. package/dist/util/types/NftServiceTypes.js.map +0 -1
  183. package/dist/util/types/PricingServiceTypes.d.ts +0 -33
  184. package/dist/util/types/PricingServiceTypes.js +0 -2
  185. package/dist/util/types/PricingServiceTypes.js.map +0 -1
  186. package/dist/util/types/SecurityServiceTypes.js +0 -2
  187. package/dist/util/types/SecurityServiceTypes.js.map +0 -1
  188. package/dist/util/types/TransactionServiceTypes.js +0 -2
  189. package/dist/util/types/TransactionServiceTypes.js.map +0 -1
  190. package/dist/util/types/XykServiceTypes.d.ts +0 -687
  191. package/dist/util/types/XykServiceTypes.js +0 -2
  192. 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,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
- }