@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,687 +0,0 @@
1
- import { Pagination, ContractMetadata, Explorer } from "./GenericTypes";
2
- export interface PoolResponse {
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: Pool[];
11
- /** * Pagination metadata. */
12
- pagination: Pagination;
13
- }
14
- export interface Pool {
15
- /** * The pair address. */
16
- exchange: string;
17
- swap_count_24h: number;
18
- /** * The total liquidity converted to fiat in `quote-currency`. */
19
- total_liquidity_quote: number;
20
- volume_24h_quote: number;
21
- fee_24h_quote: number;
22
- /** * Total supply of this pool token. */
23
- total_supply: bigint | null;
24
- /** * The exchange rate for the requested quote currency. */
25
- quote_rate: number;
26
- /** * A prettier version of the total liquidity quote for rendering purposes. */
27
- pretty_total_liquidity_quote: string;
28
- /** * A prettier version of the volume 24h quote for rendering purposes. */
29
- pretty_volume_24h_quote: string;
30
- /** * A prettier version of the fee 24h quote for rendering purposes. */
31
- pretty_fee_24h_quote: string;
32
- /** * A prettier version of the volume 7d quote for rendering purposes. */
33
- pretty_volume_7d_quote: string;
34
- /** * The requested chain name eg: `eth-mainnet`. */
35
- chain_name: string;
36
- /** * The requested chain ID eg: `1`. */
37
- chain_id: string;
38
- /** * The name of the DEX, eg: `uniswap_v2`. */
39
- dex_name: string;
40
- volume_7d_quote: number;
41
- annualized_fee: number;
42
- token_0: Token;
43
- token_1: Token;
44
- }
45
- export interface Token {
46
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
47
- contract_address: string;
48
- /** * The string returned by the `name()` method. */
49
- contract_name: string;
50
- volume_in_24h: string;
51
- volume_out_24h: string;
52
- /** * The exchange rate for the requested quote currency. */
53
- quote_rate: number;
54
- reserve: string;
55
- /** * The contract logo URL. */
56
- logo_url: string;
57
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
58
- contract_ticker_symbol: string;
59
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
60
- contract_decimals: number;
61
- volume_in_7d: string;
62
- volume_out_7d: string;
63
- }
64
- export interface PoolToDexResponse {
65
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
66
- updated_at: Date;
67
- /** * The requested address. */
68
- address: string;
69
- /** * The requested chain ID eg: `1`. */
70
- chain_id: number;
71
- /** * The requested chain name eg: `eth-mainnet`. */
72
- chain_name: string;
73
- /** * List of response items. */
74
- items: PoolToDexItem[];
75
- }
76
- export interface PoolToDexItem extends SupportedDex {
77
- /** * The dex logo URL. */
78
- logo_url: string;
79
- }
80
- export interface SupportedDex {
81
- /** * The requested chain ID eg: `1`. */
82
- chain_id: string;
83
- /** * The requested chain name eg: `eth-mainnet`. */
84
- chain_name: string;
85
- /** * The name of the DEX, eg: `uniswap_v2`. */
86
- dex_name: string;
87
- /** * A display-friendly name for the dex. */
88
- display_name: string;
89
- /** * The dex logo URL. */
90
- logo_url: string;
91
- factory_contract_address: string;
92
- router_contract_addresses: string[];
93
- swap_fee: number;
94
- }
95
- export interface PoolByAddressResponse {
96
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
97
- updated_at: Date;
98
- /** * The requested chain ID eg: `1`. */
99
- chain_id: number;
100
- /** * The requested chain name eg: `eth-mainnet`. */
101
- chain_name: string;
102
- /** * List of response items. */
103
- items: PoolWithTimeseries[];
104
- /** * Pagination metadata. */
105
- pagination: Pagination;
106
- }
107
- export interface PoolWithTimeseries {
108
- /** * The pair address. */
109
- exchange: string;
110
- /** * A list of explorers for this address. */
111
- explorers: Explorer[];
112
- swap_count_24h: number;
113
- /** * The total liquidity converted to fiat in `quote-currency`. */
114
- total_liquidity_quote: number;
115
- volume_24h_quote: number;
116
- fee_24h_quote: number;
117
- /** * Total supply of this pool token. */
118
- total_supply: bigint | null;
119
- /** * The exchange rate for the requested quote currency. */
120
- quote_rate: number;
121
- /** * The requested chain ID eg: `1`. */
122
- chain_id: string;
123
- /** * The name of the DEX, eg: `uniswap_v2`. */
124
- dex_name: string;
125
- volume_7d_quote: number;
126
- annualized_fee: number;
127
- /** * A prettier version of the total liquidity quote for rendering purposes. */
128
- pretty_total_liquidity_quote: string;
129
- /** * A prettier version of the volume 24h quote for rendering purposes. */
130
- pretty_volume_24h_quote: string;
131
- /** * A prettier version of the fee 24h quote for rendering purposes. */
132
- pretty_fee_24h_quote: string;
133
- /** * A prettier version of the volume 7d quote for rendering purposes. */
134
- pretty_volume_7d_quote: string;
135
- token_0: Token;
136
- token_1: Token;
137
- token_0_reserve_quote: number;
138
- token_1_reserve_quote: number;
139
- volume_timeseries_7d: VolumeTimeseries[];
140
- volume_timeseries_30d: VolumeTimeseries[];
141
- liquidity_timeseries_7d: LiquidityTimeseries[];
142
- liquidity_timeseries_30d: LiquidityTimeseries[];
143
- price_timeseries_7d: PriceTimeseries[];
144
- price_timeseries_30d: PriceTimeseries[];
145
- }
146
- export interface VolumeTimeseries {
147
- /** * The name of the DEX, eg: `uniswap_v2`. */
148
- dex_name: string;
149
- /** * The requested chain ID eg: `1`. */
150
- chain_id: string;
151
- dt: Date;
152
- /** * The pair address. */
153
- exchange: string;
154
- sum_amount0in: string;
155
- sum_amount0out: string;
156
- sum_amount1in: string;
157
- sum_amount1out: string;
158
- volume_quote: number;
159
- /** * A prettier version of the volume quote for rendering purposes. */
160
- pretty_volume_quote: string;
161
- token_0_quote_rate: number;
162
- token_1_quote_rate: number;
163
- swap_count_24: number;
164
- }
165
- export interface LiquidityTimeseries {
166
- /** * The name of the DEX, eg: `uniswap_v2`. */
167
- dex_name: string;
168
- /** * The requested chain ID eg: `1`. */
169
- chain_id: string;
170
- dt: Date;
171
- /** * The pair address. */
172
- exchange: string;
173
- r0_c: string;
174
- r1_c: string;
175
- liquidity_quote: number;
176
- /** * A prettier version of the liquidity quote for rendering purposes. */
177
- pretty_liquidity_quote: string;
178
- token_0_quote_rate: number;
179
- token_1_quote_rate: number;
180
- }
181
- export interface PriceTimeseries {
182
- /** * The name of the DEX, eg: `uniswap_v2`. */
183
- dex_name: string;
184
- /** * The requested chain ID eg: `1`. */
185
- chain_id: string;
186
- dt: Date;
187
- /** * The pair address. */
188
- exchange: string;
189
- price_of_token0_in_token1: number;
190
- /** * A prettier version of the price token0 for rendering purposes. */
191
- pretty_price_of_token0_in_token1: string;
192
- price_of_token0_in_token1_description: string;
193
- price_of_token1_in_token0: number;
194
- /** * A prettier version of the price token1 for rendering purposes. */
195
- pretty_price_of_token1_in_token0: string;
196
- price_of_token1_in_token0_description: string;
197
- /** * The requested quote currency eg: `USD`. */
198
- quote_currency: string;
199
- price_of_token0_in_quote_currency: number;
200
- price_of_token1_in_quote_currency: number;
201
- }
202
- export interface PoolsDexDataResponse {
203
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
204
- updated_at: Date;
205
- /** * The requested address. */
206
- address: string;
207
- /** * The requested chain ID eg: `1`. */
208
- chain_id: number;
209
- /** * The requested chain name eg: `eth-mainnet`. */
210
- chain_name: string;
211
- /** * The requested quote currency eg: `USD`. */
212
- quote_currency: string;
213
- /** * List of response items. */
214
- items: PoolsDexDataItem[];
215
- /** * Pagination metadata. */
216
- pagination: Pagination;
217
- }
218
- export interface PoolsDexDataItem {
219
- /** * The name of the DEX, eg: `uniswap_v2`. */
220
- dex_name: string;
221
- /** * The pair address. */
222
- exchange: string;
223
- /** * The combined ticker symbol of token0 and token1 separated with a hypen. */
224
- exchange_ticker_symbol: string;
225
- /** * The dex logo URL for the pair address. */
226
- exchange_logo_url: string;
227
- /** * The list of explorers for the token address. */
228
- explorers: Explorer[];
229
- /** * The total liquidity converted to fiat in `quote-currency`. */
230
- total_liquidity_quote: number;
231
- /** * A prettier version of the total liquidity quote for rendering purposes. */
232
- pretty_total_liquidity_quote: string;
233
- /** * The volume 24h converted to fiat in `quote-currency`. */
234
- volume_24h_quote: number;
235
- /** * The volume 7d converted to fiat in `quote-currency`. */
236
- volume_7d_quote: number;
237
- /** * The fee 24h converted to fiat in `quote-currency`. */
238
- fee_24h_quote: number;
239
- /** * The exchange rate for the requested quote currency. */
240
- quote_rate: number;
241
- /** * A prettier version of the quote rate for rendering purposes. */
242
- pretty_quote_rate: string;
243
- /** * The annual fee percentage. */
244
- annualized_fee: number;
245
- /** * A prettier version of the volume 24h quote for rendering purposes. */
246
- pretty_volume_24h_quote: string;
247
- /** * A prettier version of the volume 7d quote for rendering purposes. */
248
- pretty_volume_7d_quote: string;
249
- /** * A prettier version of the fee 24h quote for rendering purposes. */
250
- pretty_fee_24h_quote: string;
251
- /** * Token0's contract metadata and reserve data. */
252
- token_0: PoolsDexToken;
253
- /** * Token1's contract metadata and reserve data. */
254
- token_1: PoolsDexToken;
255
- }
256
- export interface PoolsDexToken {
257
- /** * The reserves for the token. */
258
- reserve: string;
259
- /** * The string returned by the `name()` method. */
260
- contract_name: string;
261
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
262
- contract_decimals: number;
263
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
264
- contract_ticker_symbol: string;
265
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
266
- contract_address: string;
267
- /** * The contract logo URL. */
268
- logo_url: string;
269
- /** * The exchange rate for the requested quote currency. */
270
- quote_rate: number;
271
- }
272
- export interface AddressExchangeBalancesResponse {
273
- /** * The requested address. */
274
- address: string;
275
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
276
- updated_at: Date;
277
- /** * The requested chain ID eg: `1`. */
278
- chain_id: number;
279
- /** * The requested chain name eg: `eth-mainnet`. */
280
- chain_name: string;
281
- /** * List of response items. */
282
- items: UniswapLikeBalanceItem[];
283
- }
284
- export interface UniswapLikeBalanceItem {
285
- token_0: UniswapLikeToken;
286
- token_1: UniswapLikeToken;
287
- pool_token: UniswapLikeTokenWithSupply;
288
- }
289
- export interface UniswapLikeToken {
290
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
291
- contract_decimals: number;
292
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
293
- contract_ticker_symbol: string;
294
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
295
- contract_address: string;
296
- /** * The contract logo URL. */
297
- logo_url: string;
298
- /** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
299
- balance: bigint | null;
300
- quote: number;
301
- /** * A prettier version of the quote for rendering purposes. */
302
- pretty_quote: string;
303
- /** * The exchange rate for the requested quote currency. */
304
- quote_rate: number;
305
- }
306
- export interface UniswapLikeTokenWithSupply {
307
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
308
- contract_decimals: number;
309
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
310
- contract_ticker_symbol: string;
311
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
312
- contract_address: string;
313
- /** * The contract logo URL. */
314
- logo_url: string;
315
- /** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
316
- balance: bigint | null;
317
- quote: number;
318
- /** * A prettier version of the quote for rendering purposes. */
319
- pretty_quote: string;
320
- /** * The exchange rate for the requested quote currency. */
321
- quote_rate: number;
322
- /** * Total supply of this pool token. */
323
- total_supply: bigint | null;
324
- }
325
- export interface NetworkExchangeTokensResponse {
326
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
327
- updated_at: Date;
328
- /** * The requested chain ID eg: `1`. */
329
- chain_id: number;
330
- /** * The requested chain name eg: `eth-mainnet`. */
331
- chain_name: string;
332
- /** * List of response items. */
333
- items: TokenV2Volume[];
334
- /** * Pagination metadata. */
335
- pagination: Pagination;
336
- }
337
- export interface TokenV2Volume {
338
- /** * The requested chain name eg: `eth-mainnet`. */
339
- chain_name: string;
340
- /** * The requested chain ID eg: `1`. */
341
- chain_id: string;
342
- /** * The name of the DEX, eg: `uniswap_v2`. */
343
- dex_name: string;
344
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
345
- contract_address: string;
346
- /** * The string returned by the `name()` method. */
347
- contract_name: string;
348
- total_liquidity: string;
349
- total_volume_24h: string;
350
- /** * The contract logo URL. */
351
- logo_url: string;
352
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
353
- contract_ticker_symbol: string;
354
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
355
- contract_decimals: number;
356
- swap_count_24h: number;
357
- /** * The list of explorers for the token address. */
358
- explorers: Explorer[];
359
- /** * The exchange rate for the requested quote currency. */
360
- quote_rate: number;
361
- /** * The 24h exchange rate for the requested quote currency. */
362
- quote_rate_24h: number;
363
- /** * A prettier version of the exchange rate for rendering purposes. */
364
- pretty_quote_rate: string;
365
- /** * A prettier version of the 24h exchange rate for rendering purposes. */
366
- pretty_quote_rate_24h: string;
367
- /** * A prettier version of the total liquidity quote for rendering purposes. */
368
- pretty_total_liquidity_quote: string;
369
- /** * A prettier version of the 24h volume quote for rendering purposes. */
370
- pretty_total_volume_24h_quote: string;
371
- /** * The total liquidity converted to fiat in `quote-currency`. */
372
- total_liquidity_quote: number;
373
- /** * The total volume 24h converted to fiat in `quote-currency`. */
374
- total_volume_24h_quote: number;
375
- }
376
- export interface NetworkExchangeTokenViewResponse {
377
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
378
- updated_at: Date;
379
- /** * The requested chain ID eg: `1`. */
380
- chain_id: number;
381
- /** * The requested chain name eg: `eth-mainnet`. */
382
- chain_name: string;
383
- /** * List of response items. */
384
- items: TokenV2VolumeWithChartData[];
385
- /** * Pagination metadata. */
386
- pagination: Pagination;
387
- }
388
- export interface TokenV2VolumeWithChartData {
389
- /** * The requested chain name eg: `eth-mainnet`. */
390
- chain_name: string;
391
- /** * The requested chain ID eg: `1`. */
392
- chain_id: string;
393
- /** * The name of the DEX, eg: `uniswap_v2`. */
394
- dex_name: string;
395
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
396
- contract_address: string;
397
- /** * The string returned by the `name()` method. */
398
- contract_name: string;
399
- /** * A list of explorers for this address. */
400
- explorers: Explorer[];
401
- /** * The total liquidity unscaled value. */
402
- total_liquidity: string;
403
- /** * The total volume 24h unscaled value. */
404
- total_volume_24h: string;
405
- /** * The contract logo URL. */
406
- logo_url: string;
407
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
408
- contract_ticker_symbol: string;
409
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
410
- contract_decimals: number;
411
- /** * The total amount of swaps in the last 24h. */
412
- swap_count_24h: number;
413
- /** * The exchange rate for the requested quote currency. */
414
- quote_rate: number;
415
- /** * The 24h exchange rate for the requested quote currency. */
416
- quote_rate_24h: number;
417
- /** * A prettier version of the exchange rate for rendering purposes. */
418
- pretty_quote_rate: string;
419
- /** * A prettier version of the 24h exchange rate for rendering purposes. */
420
- pretty_quote_rate_24h: string;
421
- /** * A prettier version of the total liquidity quote for rendering purposes. */
422
- pretty_total_liquidity_quote: string;
423
- /** * A prettier version of the 24h volume quote for rendering purposes. */
424
- pretty_total_volume_24h_quote: string;
425
- /** * The total liquidity converted to fiat in `quote-currency`. */
426
- total_liquidity_quote: number;
427
- /** * The total volume 24h converted to fiat in `quote-currency`. */
428
- total_volume_24h_quote: number;
429
- /** * The number of transactions in the last 24h. */
430
- transactions_24h: number;
431
- volume_timeseries_7d: VolumeTokenTimeseries[];
432
- volume_timeseries_30d: VolumeTokenTimeseries[];
433
- liquidity_timeseries_7d: LiquidityTokenTimeseries[];
434
- liquidity_timeseries_30d: LiquidityTokenTimeseries[];
435
- price_timeseries_7d: PriceTokenTimeseries[];
436
- price_timeseries_30d: PriceTokenTimeseries[];
437
- }
438
- export interface VolumeTokenTimeseries {
439
- /** * The name of the DEX, eg: `uniswap_v2`. */
440
- dex_name: string;
441
- /** * The requested chain ID eg: `1`. */
442
- chain_id: string;
443
- /** * The current date. */
444
- dt: Date;
445
- /** * The total volume unscaled for this day. */
446
- total_volume: string;
447
- /** * The volume in `quote-currency` denomination. */
448
- volume_quote: number;
449
- /** * A prettier version of the volume quote for rendering purposes. */
450
- pretty_volume_quote: string;
451
- }
452
- export interface LiquidityTokenTimeseries {
453
- /** * The name of the DEX, eg: `uniswap_v2`. */
454
- dex_name: string;
455
- /** * The requested chain ID eg: `1`. */
456
- chain_id: string;
457
- /** * The current date. */
458
- dt: Date;
459
- /** * The total liquidity unscaled up to this day. */
460
- total_liquidity: string;
461
- /** * The liquidity in `quote-currency` denomination. */
462
- liquidity_quote: number;
463
- /** * A prettier version of the liquidity quote for rendering purposes. */
464
- pretty_liquidity_quote: string;
465
- }
466
- export interface PriceTokenTimeseries {
467
- /** * The name of the DEX, eg: `uniswap_v2`. */
468
- dex_name: string;
469
- /** * The requested chain ID eg: `1`. */
470
- chain_id: string;
471
- /** * The current date. */
472
- dt: Date;
473
- /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
474
- quote_currency: string;
475
- /** * The exchange rate for the requested quote currency. */
476
- quote_rate: number;
477
- /** * A prettier version of the exchange rate for rendering purposes. */
478
- pretty_quote_rate: string;
479
- }
480
- export interface SupportedDexesResponse {
481
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
482
- updated_at: Date;
483
- /** * List of response items. */
484
- items: SupportedDex[];
485
- /** * Pagination metadata. */
486
- pagination: Pagination;
487
- }
488
- export interface SingleNetworkExchangeTokenResponse {
489
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
490
- updated_at: Date;
491
- /** * The requested chain ID eg: `1`. */
492
- chain_id: number;
493
- /** * The requested chain name eg: `eth-mainnet`. */
494
- chain_name: string;
495
- /** * List of response items. */
496
- items: PoolWithTimeseries[];
497
- /** * Pagination metadata. */
498
- pagination: Pagination;
499
- }
500
- export interface TransactionsForAccountAddressResponse {
501
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
502
- updated_at: Date;
503
- /** * The requested chain ID eg: `1`. */
504
- chain_id: number;
505
- /** * The requested chain name eg: `eth-mainnet`. */
506
- chain_name: string;
507
- /** * List of response items. */
508
- items: ExchangeTransaction[];
509
- /** * Pagination metadata. */
510
- pagination: Pagination;
511
- }
512
- export interface ExchangeTransaction {
513
- /** * The block signed timestamp in UTC. */
514
- block_signed_at: Date;
515
- /** * The requested transaction hash. */
516
- tx_hash: string;
517
- act: string;
518
- /** * The requested address. */
519
- address: string;
520
- /** * A list of explorers for this transaction. */
521
- explorers: Explorer[];
522
- amount_0: string;
523
- amount_1: string;
524
- amount_0_in: string;
525
- amount_0_out: string;
526
- amount_1_in: string;
527
- amount_1_out: string;
528
- to_address: string;
529
- from_address: string;
530
- sender_address: string;
531
- total_quote: number;
532
- /** * A prettier version of the total quote for rendering purposes. */
533
- pretty_total_quote: string;
534
- /** * The value attached to this tx. */
535
- value: bigint | null;
536
- /** * The value attached in `quote-currency` to this tx. */
537
- value_quote: number;
538
- /** * A prettier version of the quote for rendering purposes. */
539
- pretty_value_quote: string;
540
- /** * The requested chain native gas token metadata. */
541
- gas_metadata: ContractMetadata;
542
- /** * The amount of gas supplied for this tx. */
543
- gas_offered: number;
544
- /** * The gas spent for this tx. */
545
- gas_spent: number;
546
- /** * The gas price at the time of this tx. */
547
- gas_price: number;
548
- /** * The total transaction fees (`gas_price` * `gas_spent`) paid for this tx, denoted in wei. */
549
- fees_paid: bigint | null;
550
- /** * The gas spent in `quote-currency` denomination. */
551
- gas_quote: number;
552
- /** * A prettier version of the quote for rendering purposes. */
553
- pretty_gas_quote: string;
554
- /** * The native gas exchange rate for the requested `quote-currency`. */
555
- gas_quote_rate: number;
556
- /** * The requested quote currency eg: `USD`. */
557
- quote_currency: string;
558
- token_0: PoolToken;
559
- token_1: PoolToken;
560
- token_0_quote_rate: number;
561
- token_1_quote_rate: number;
562
- }
563
- export interface PoolToken {
564
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
565
- contract_decimals: number;
566
- /** * The string returned by the `name()` method. */
567
- contract_name: string;
568
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
569
- contract_ticker_symbol: string;
570
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
571
- contract_address: string;
572
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
573
- supports_erc: string[];
574
- /** * The contract logo URL. */
575
- logo_url: string;
576
- }
577
- export interface TransactionsForTokenAddressResponse {
578
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
579
- updated_at: Date;
580
- /** * The requested chain ID eg: `1`. */
581
- chain_id: number;
582
- /** * The requested chain name eg: `eth-mainnet`. */
583
- chain_name: string;
584
- /** * List of response items. */
585
- items: ExchangeTransaction[];
586
- /** * Pagination metadata. */
587
- pagination: Pagination;
588
- }
589
- export interface TransactionsForExchangeResponse {
590
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
591
- updated_at: Date;
592
- /** * The requested chain ID eg: `1`. */
593
- chain_id: number;
594
- /** * The requested chain name eg: `eth-mainnet`. */
595
- chain_name: string;
596
- /** * List of response items. */
597
- items: ExchangeTransaction[];
598
- /** * Pagination metadata. */
599
- pagination: Pagination;
600
- }
601
- export interface NetworkTransactionsResponse {
602
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
603
- updated_at: Date;
604
- /** * The requested chain ID eg: `1`. */
605
- chain_id: number;
606
- /** * The requested chain name eg: `eth-mainnet`. */
607
- chain_name: string;
608
- /** * List of response items. */
609
- items: ExchangeTransaction[];
610
- /** * Pagination metadata. */
611
- pagination: Pagination;
612
- }
613
- export interface EcosystemChartDataResponse {
614
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
615
- updated_at: Date;
616
- /** * The requested chain ID eg: `1`. */
617
- chain_id: number;
618
- /** * The requested chain name eg: `eth-mainnet`. */
619
- chain_name: string;
620
- /** * List of response items. */
621
- items: UniswapLikeEcosystemCharts[];
622
- /** * Pagination metadata. */
623
- pagination: Pagination;
624
- }
625
- export interface UniswapLikeEcosystemCharts {
626
- /** * The name of the DEX, eg: `uniswap_v2`. */
627
- dex_name: string;
628
- /** * The requested chain ID eg: `1`. */
629
- chain_id: string;
630
- /** * The requested quote currency eg: `USD`. */
631
- quote_currency: string;
632
- gas_token_price_quote: number;
633
- total_swaps_24h: number;
634
- total_active_pairs_7d: number;
635
- total_fees_24h: number;
636
- /** * A prettier version of the gas quote for rendering purposes. */
637
- pretty_gas_token_price_quote: string;
638
- /** * A prettier version of the 24h total fees for rendering purposes. */
639
- pretty_total_fees_24h: string;
640
- volume_chart_7d: VolumeEcosystemChart[];
641
- volume_chart_30d: VolumeEcosystemChart[];
642
- liquidity_chart_7d: LiquidityEcosystemChart[];
643
- liquidity_chart_30d: LiquidityEcosystemChart[];
644
- }
645
- export interface VolumeEcosystemChart {
646
- /** * The name of the DEX, eg: `uniswap_v2`. */
647
- dex_name: string;
648
- /** * The requested chain ID eg: `1`. */
649
- chain_id: string;
650
- dt: Date;
651
- /** * The requested quote currency eg: `USD`. */
652
- quote_currency: string;
653
- volume_quote: number;
654
- /** * A prettier version of the volume quote for rendering purposes. */
655
- pretty_volume_quote: string;
656
- swap_count_24: number;
657
- }
658
- export interface LiquidityEcosystemChart {
659
- /** * The name of the DEX, eg: `uniswap_v2`. */
660
- dex_name: string;
661
- /** * The requested chain ID eg: `1`. */
662
- chain_id: string;
663
- dt: Date;
664
- /** * The requested quote currency eg: `USD`. */
665
- quote_currency: string;
666
- liquidity_quote: number;
667
- /** * A prettier version of the liquidity quote for rendering purposes. */
668
- pretty_liquidity_quote: string;
669
- }
670
- export interface HealthDataResponse {
671
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
672
- updated_at: Date;
673
- /** * The requested chain ID eg: `1`. */
674
- chain_id: number;
675
- /** * The requested chain name eg: `eth-mainnet`. */
676
- chain_name: string;
677
- /** * List of response items. */
678
- items: HealthData[];
679
- /** * Pagination metadata. */
680
- pagination: Pagination;
681
- }
682
- export interface HealthData {
683
- synced_block_height: number;
684
- synced_block_signed_at: Date;
685
- latest_block_height: number;
686
- latest_block_signed_at: Date;
687
- }