ethereum-hooks 2.0.0 → 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 (33) hide show
  1. package/README.md +32 -32
  2. package/crypto_hooks/ens/{useFetchAddressENSLookup.ts → useAddressENSLookup.ts} +1 -1
  3. package/crypto_hooks/ens/{useFetchENSAddressLookup.ts → useENSAddressLookup.ts} +1 -1
  4. package/crypto_hooks/ens/{useFetchENSIDLookup.ts → useENSIDLookup.ts} +1 -1
  5. package/crypto_hooks/ens/{useFetchENSNameLookup.ts → useENSNameLookup.ts} +1 -1
  6. package/crypto_hooks/erc20Tokens/{useFetchERC20CollectionOwners.ts → useERC20CollectionOwners.ts} +1 -1
  7. package/crypto_hooks/erc20Tokens/{useFetchERC20CollectionTopCoins.ts → useERC20CollectionTopCoins.ts} +1 -1
  8. package/crypto_hooks/erc20Tokens/{useFetchERC20CollectionTransfers.ts → useERC20CollectionTransfers.ts} +1 -1
  9. package/crypto_hooks/erc20Tokens/{useFetchERC20Holdings.ts → useERC20Holdings.ts} +1 -1
  10. package/crypto_hooks/erc20Tokens/{useFetchERC20Transfers.ts → useERC20Transfers.ts} +1 -1
  11. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionAttributes.ts → useERC721CollectionAttributes.ts} +1 -1
  12. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionData.ts → useERC721CollectionData.ts} +1 -1
  13. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionExtraData.ts → useERC721CollectionExtraData.ts} +1 -1
  14. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionFloorPrice.ts → useERC721CollectionFloorPrice.ts} +1 -1
  15. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionMarketCap.ts → useERC721CollectionMarketCap.ts} +1 -1
  16. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionSales.ts → useERC721CollectionSales.ts} +1 -1
  17. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionTransfers.ts → useERC721CollectionTransfers.ts} +1 -1
  18. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionTrends.ts → useERC721CollectionTrends.ts} +1 -1
  19. package/crypto_hooks/erc721Tokens/{useFetchERC721CollectionVolume.ts → useERC721CollectionVolume.ts} +1 -1
  20. package/crypto_hooks/erc721Tokens/{useFetchERC721Holdings.ts → useERC721Holdings.ts} +1 -1
  21. package/crypto_hooks/erc721Tokens/{useFetchERC721LookupData.ts → useERC721LookupData.ts} +1 -1
  22. package/crypto_hooks/erc721Tokens/{useFetchERC721OpenseaData.ts → useERC721OpenseaData.ts} +1 -1
  23. package/crypto_hooks/erc721Tokens/{useFetchERC721RarityData.ts → useERC721RarityData.ts} +1 -1
  24. package/crypto_hooks/erc721Tokens/{useFetchERC721SalesData.ts → useERC721SalesData.ts} +1 -1
  25. package/crypto_hooks/erc721Tokens/{useFetchERC721TransferLookupData.ts → useERC721TransferLookupData.ts} +1 -1
  26. package/crypto_hooks/erc721Tokens/{useFetchERC721TransfersData.ts → useERC721TransfersData.ts} +1 -1
  27. package/crypto_hooks/gas/{useFetchGasLookup.ts → useGasLookup.ts} +1 -1
  28. package/crypto_hooks/index.ts +30 -30
  29. package/crypto_hooks/prices/{useFetchERC20Price.ts → useERC20Price.ts} +1 -1
  30. package/crypto_hooks/prices/{useFetchERC721Price.ts → useERC721Price.ts} +1 -1
  31. package/crypto_hooks/prices/{useFetchETHPrice.ts → useETHPrice.ts} +1 -1
  32. package/crypto_hooks/prices/{useFetchLayerTwoPrice.ts → useLayerTwoPrice.ts} +1 -1
  33. package/package.json +2 -2
package/README.md CHANGED
@@ -37,14 +37,14 @@ Here is a quick example of how you can work with client hooks. The following is
37
37
  <code>ENSToAddressPage.tsx</code>
38
38
  ```javascript
39
39
  import React, { FC } from 'react';
40
- import { useFetchENSAddressLookup } from 'ethereum-hooks';
40
+ import { useENSAddressLookup } from 'ethereum-hooks';
41
41
 
42
42
  // Incorporating the ENS to Address Client Hook.. using Vitalik Buterin's address
43
43
  // No server setup required - connects directly to AWS Lambda
44
44
 
45
45
  const ENSToAddressPage: FC = () => {
46
46
  // Hook automatically connects to AWS Lambda - no server setup required
47
- const addressInformation = useFetchENSAddressLookup('vitalik.eth');
47
+ const addressInformation = useENSAddressLookup('vitalik.eth');
48
48
 
49
49
  // Each client hook uses the useFetch custom hook
50
50
  // It returns three states: data, error, loading
@@ -94,181 +94,181 @@ The following table shows the **30 different client hooks** and their correspond
94
94
  </tr>
95
95
  <tr>
96
96
  <td>ENS</td>
97
- <td><code>useFetchAddressENSLookup(address: string)</code></td>
97
+ <td><code>useAddressENSLookup(address: string)</code></td>
98
98
  <td><code>https://37zq2u4ntbygkw7inki3djjm440xctyd.lambda-url.us-east-1.on.aws/</code></td>
99
99
  <td>Fetch the equivalent ENS name from a given address</td>
100
100
  </tr>
101
101
  <tr>
102
102
  <td>ENS</td>
103
- <td><code>useFetchENSAddressLookup(ensName: string)</code></td>
103
+ <td><code>useENSAddressLookup(ensName: string)</code></td>
104
104
  <td><code>https://jy3upsy3rgbengcktqlqfcwyhy0wcamb.lambda-url.us-east-1.on.aws/</code></td>
105
105
  <td>Fetch the equivalent ETH address from a given ENS name</td>
106
106
  </tr>
107
107
  <tr>
108
108
  <td>ENS</td>
109
- <td><code>useFetchENSIDLookup(id: string)</code></td>
109
+ <td><code>useENSIDLookup(id: string)</code></td>
110
110
  <td><code>https://ev6i3gsesgdvj7ouxiwpg4qafu0nfvdw.lambda-url.us-east-1.on.aws/</code></td>
111
111
  <td>Fetch information of a given ENS ID</td>
112
112
  </tr>
113
113
  <tr>
114
114
  <td>ENS</td>
115
- <td><code>useFetchENSNameLookup(ensName: string)</code></td>
115
+ <td><code>useENSNameLookup(ensName: string)</code></td>
116
116
  <td><code>https://f53actwgpl2a3rk6uynoryuoxq0eifuo.lambda-url.us-east-1.on.aws/</code></td>
117
117
  <td>Fetch information of a given ENS name</td>
118
118
  </tr>
119
119
  <tr>
120
120
  <td>ERC20</td>
121
- <td><code>useFetchERC20CollectionOwners(contractAddress: string)</code></td>
121
+ <td><code>useERC20CollectionOwners(contractAddress: string)</code></td>
122
122
  <td><code>https://hyrbuxy6aivjqjrgtogd3nx5we0gcxjr.lambda-url.us-east-1.on.aws/</code></td>
123
123
  <td>Fetch list of owners of a particular ERC20 collection</td>
124
124
  </tr>
125
125
  <tr>
126
126
  <td>ERC20</td>
127
- <td><code>useFetchERC20CollectionTopCoins()</code></td>
127
+ <td><code>useERC20CollectionTopCoins()</code></td>
128
128
  <td><code>https://2ebpropr2dgzqicposkbrvr5nq0ofyyx.lambda-url.us-east-1.on.aws/</code></td>
129
129
  <td>Fetch list of the top ERC20 collections</td>
130
130
  </tr>
131
131
  <tr>
132
132
  <td>ERC20</td>
133
- <td><code>useFetchERC20CollectionTransfers(contractAddress: string)</code></td>
133
+ <td><code>useERC20CollectionTransfers(contractAddress: string)</code></td>
134
134
  <td><code>https://bwqre7ze2vm3sum5avrvwzwbrm0gyxcy.lambda-url.us-east-1.on.aws/</code></td>
135
135
  <td>Fetch transfer activity of a particular ERC20 collection</td>
136
136
  </tr>
137
137
  <tr>
138
138
  <td>ERC20</td>
139
- <td><code>useFetchERC20Holdings(contractAddress: string)</code></td>
139
+ <td><code>useERC20Holdings(contractAddress: string)</code></td>
140
140
  <td><code>https://2i2neqclwlgygwimhbzlhdtjwa0dupee.lambda-url.us-east-1.on.aws/</code></td>
141
141
  <td>Track wallet holdings of a particular ERC20 token activity</td>
142
142
  </tr>
143
143
  <tr>
144
144
  <td>ERC20</td>
145
- <td><code>useFetchERC20Transfers(contractAddress: string)</code></td>
145
+ <td><code>useERC20Transfers(contractAddress: string)</code></td>
146
146
  <td><code>https://msee4ccresifmjhm3mdedry3ki0xvdgx.lambda-url.us-east-1.on.aws/</code></td>
147
147
  <td>Track the transfer activity of a particular ERC20 token in a wallet</td>
148
148
  </tr>
149
149
  <tr>
150
150
  <td>ERC721</td>
151
- <td><code>useFetchERC721CollectionAttributes(contractAddress: string)</code></td>
151
+ <td><code>useERC721CollectionAttributes(contractAddress: string)</code></td>
152
152
  <td><code>https://7rs4acgso6ld44zjpl25jras3q0szvag.lambda-url.us-east-1.on.aws/</code></td>
153
153
  <td>Fetch attributes of a particular ERC721 collection</td>
154
154
  </tr>
155
155
  <tr>
156
156
  <td>ERC721</td>
157
- <td><code>useFetchERC721CollectionData(contractAddress: string)</code></td>
157
+ <td><code>useERC721CollectionData(contractAddress: string)</code></td>
158
158
  <td><code>https://u2pdhfz4qbfkkyp6z4yg4n57hq0hzica.lambda-url.us-east-1.on.aws/</code></td>
159
159
  <td>Fetch data of a particular ERC721 collection</td>
160
160
  </tr>
161
161
  <tr>
162
162
  <td>ERC721</td>
163
- <td><code>useFetchERC721CollectionExtraData(contractAddress: string)</code></td>
163
+ <td><code>useERC721CollectionExtraData(contractAddress: string)</code></td>
164
164
  <td><code>https://b5mkshxv54bbj4d54rxze5cj6q0xhptc.lambda-url.us-east-1.on.aws/</code></td>
165
165
  <td>Fetch extra data of a particular ERC721 collection</td>
166
166
  </tr>
167
167
  <tr>
168
168
  <td>ERC721</td>
169
- <td><code>useFetchERC721CollectionFloorPrice(contractAddress: string)</code></td>
169
+ <td><code>useERC721CollectionFloorPrice(contractAddress: string)</code></td>
170
170
  <td><code>https://343rc276twphsdjwtzrzjytepu0xdxxn.lambda-url.us-east-1.on.aws/</code></td>
171
171
  <td>Fetch floor price data of a particular ERC721 collection</td>
172
172
  </tr>
173
173
  <tr>
174
174
  <td>ERC721</td>
175
- <td><code>useFetchERC721CollectionMarketCap(contractAddress: string, duration: 2 | 14 | 30)</code></td>
175
+ <td><code>useERC721CollectionMarketCap(contractAddress: string, duration: 2 | 14 | 30)</code></td>
176
176
  <td><code>https://o5ntejtug7ixeetoqf5uxjpwgq0mbtvt.lambda-url.us-east-1.on.aws/</code></td>
177
177
  <td>Fetch market cap data of a particular ERC721 collection</td>
178
178
  </tr>
179
179
  <tr>
180
180
  <td>ERC721</td>
181
- <td><code>useFetchERC721CollectionSales(contractAddress: string)</code></td>
181
+ <td><code>useERC721CollectionSales(contractAddress: string)</code></td>
182
182
  <td><code>https://b5xcn2afinyiq32izaoxe4mzua0ggxvm.lambda-url.us-east-1.on.aws/</code></td>
183
183
  <td>Fetch sales data of a particular ERC721 collection</td>
184
184
  </tr>
185
185
  <tr>
186
186
  <td>ERC721</td>
187
- <td><code>useFetchERC721CollectionTransfers(contractAddress: string)</code></td>
187
+ <td><code>useERC721CollectionTransfers(contractAddress: string)</code></td>
188
188
  <td><code>https://lrtnsabh6hkimp4hqonw3foi2e0zzuxq.lambda-url.us-east-1.on.aws/</code></td>
189
189
  <td>Fetch transfer activity of a particular ERC721 collection</td>
190
190
  </tr>
191
191
  <tr>
192
192
  <td>ERC721</td>
193
- <td><code>useFetchERC721CollectionTrends()</code></td>
193
+ <td><code>useERC721CollectionTrends()</code></td>
194
194
  <td><code>https://hmzkjpwut4bwaeovhryd6hie540fwvzi.lambda-url.us-east-1.on.aws/</code></td>
195
195
  <td>Fetch trending ERC721 collection data</td>
196
196
  </tr>
197
197
  <tr>
198
198
  <td>ERC721</td>
199
- <td><code>useFetchERC721CollectionVolume()</code></td>
199
+ <td><code>useERC721CollectionVolume()</code></td>
200
200
  <td><code>https://zlksxwjaikudsub4rmcc5c4eme0uqntg.lambda-url.us-east-1.on.aws/</code></td>
201
201
  <td>Fetch ERC721 collections by volume data</td>
202
202
  </tr>
203
203
  <tr>
204
204
  <td>ERC721</td>
205
- <td><code>useFetchERC721Holdings(walletAddress: string)</code></td>
205
+ <td><code>useERC721Holdings(walletAddress: string)</code></td>
206
206
  <td><code>https://rmepnjzubrgdsvmb66kdwz5upm0khfor.lambda-url.us-east-1.on.aws/</code></td>
207
207
  <td>Fetch ERC721 holdings of a particular wallet</td>
208
208
  </tr>
209
209
  <tr>
210
210
  <td>ERC721</td>
211
- <td><code>useFetchERC721LookupData(contractAddress: string, tokenID: string)</code></td>
211
+ <td><code>useERC721LookupData(contractAddress: string, tokenID: string)</code></td>
212
212
  <td><code>https://rd7cae6wlnx3lsiuncgjgeap5e0lkbew.lambda-url.us-east-1.on.aws/</code></td>
213
213
  <td>Fetch data of a particular ERC721 token</td>
214
214
  </tr>
215
215
  <tr>
216
216
  <td>ERC721</td>
217
- <td><code>useFetchERC721OpenseaData(contractAddress: string, tokenID: string)</code></td>
217
+ <td><code>useERC721OpenseaData(contractAddress: string, tokenID: string)</code></td>
218
218
  <td><code>https://qoeq2n767jbu5gbiiy7463d56m0cwdec.lambda-url.us-east-1.on.aws/</code></td>
219
219
  <td>Fetch Opensea data of a particular ERC721 token</td>
220
220
  </tr>
221
221
  <tr>
222
222
  <td>ERC721</td>
223
- <td><code>useFetchERC721RarityData(contractAddress: string, tokenID: string)</code></td>
223
+ <td><code>useERC721RarityData(contractAddress: string, tokenID: string)</code></td>
224
224
  <td><code>https://eilobcax7r4wayov2rfscraqb40rodzv.lambda-url.us-east-1.on.aws/</code></td>
225
225
  <td>Fetch rarity data of a particular ERC721 token</td>
226
226
  </tr>
227
227
  <tr>
228
228
  <td>ERC721</td>
229
- <td><code>useFetchERC721SalesData(contractAddress: string, tokenID: string)</code></td>
229
+ <td><code>useERC721SalesData(contractAddress: string, tokenID: string)</code></td>
230
230
  <td><code>https://nhjz6tqihl6bdt7zukf5ru7wnu0ydoqq.lambda-url.us-east-1.on.aws/</code></td>
231
231
  <td>Fetch sales data of a particular ERC721 token</td>
232
232
  </tr>
233
233
  <tr>
234
234
  <td>ERC721</td>
235
- <td><code>useFetchERC721TransferLookupData(contractAddress: string, tokenID: string)</code></td>
235
+ <td><code>useERC721TransferLookupData(contractAddress: string, tokenID: string)</code></td>
236
236
  <td><code>https://o66cbw3kaufg5t3k2fl5ydazbq0tvfaz.lambda-url.us-east-1.on.aws/</code></td>
237
237
  <td>Fetch transfer data of a particular ERC721 token</td>
238
238
  </tr>
239
239
  <tr>
240
240
  <td>ERC721</td>
241
- <td><code>useFetchERC721TransfersData(walletAddress: string)</code></td>
241
+ <td><code>useERC721TransfersData(walletAddress: string)</code></td>
242
242
  <td><code>https://gnfeczsyzj4v6rsyf4zmlpv23q0uixkv.lambda-url.us-east-1.on.aws/</code></td>
243
243
  <td>Fetch ERC721 transfer activity of a particular wallet</td>
244
244
  </tr>
245
245
  <tr>
246
246
  <td>Gas</td>
247
- <td><code>useFetchGasLookup()</code></td>
247
+ <td><code>useGasLookup()</code></td>
248
248
  <td><code>https://wsebjfjyi4k2kfb4mbcrcjyrqa0nwifh.lambda-url.us-east-1.on.aws/</code></td>
249
249
  <td>Fetch gas information related to Ethereum or a supported layer two</td>
250
250
  </tr>
251
251
  <tr>
252
252
  <td>Prices</td>
253
- <td><code>useFetchERC20Price(contractAddress: string, currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
253
+ <td><code>useERC20Price(contractAddress: string, currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
254
254
  <td><code>https://vw5caqjd3yg2oyslxcyxkln2dy0nqgxz.lambda-url.us-east-1.on.aws/</code></td>
255
255
  <td>Fetch pricing data of a particular ERC20 collection</td>
256
256
  </tr>
257
257
  <tr>
258
258
  <td>Prices</td>
259
- <td><code>useFetchERC721Price(contractAddress: string, tokenID: string)</code></td>
259
+ <td><code>useERC721Price(contractAddress: string, tokenID: string)</code></td>
260
260
  <td><code>https://brjvjnlp35ln3solbquo6fiize0bnwje.lambda-url.us-east-1.on.aws/</code></td>
261
261
  <td>Fetch pricing data of a particular ERC721 collection</td>
262
262
  </tr>
263
263
  <tr>
264
264
  <td>Prices</td>
265
- <td><code>useFetchETHPrice(currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
265
+ <td><code>useETHPrice(currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
266
266
  <td><code>https://fl5mxvcm42g3n7wtodnxq52s2a0jeokj.lambda-url.us-east-1.on.aws/</code></td>
267
267
  <td>Fetch Ethereum price data</td>
268
268
  </tr>
269
269
  <tr>
270
270
  <td>Prices</td>
271
- <td><code>useFetchLayerTwoPrice(layerTwo: LayerTwoNetworks, currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
271
+ <td><code>useLayerTwoPrice(layerTwo: LayerTwoNetworks, currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
272
272
  <td><code>https://jt7ds5ua6iix7cpa5ueg2ud2gi0joklo.lambda-url.us-east-1.on.aws/</code></td>
273
273
  <td>Fetch Layer Two price data</td>
274
274
  </tr>
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching Address to ENS Custom hook
4
- export const useFetchAddressENSLookup = (address: string) => {
4
+ export const useAddressENSLookup = (address: string) => {
5
5
  const options = {
6
6
  method: 'POST',
7
7
  body: JSON.stringify({ address }),
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ENS to Address Custom hook
4
- export const useFetchENSAddressLookup = (ensName: string) => {
4
+ export const useENSAddressLookup = (ensName: string) => {
5
5
  const options = {
6
6
  method: 'POST',
7
7
  body: JSON.stringify({ ensName }),
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetch ENS ID lookups
4
- export const useFetchENSIDLookup = (id: string) => {
4
+ export const useENSIDLookup = (id: string) => {
5
5
  const options = {
6
6
  method: 'POST',
7
7
  body: JSON.stringify({ id }),
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetch ENS Name lookups
4
- export const useFetchENSNameLookup = (ensName: string) => {
4
+ export const useENSNameLookup = (ensName: string) => {
5
5
 
6
6
  const options = {
7
7
  method: 'POST',
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC20 Collection Owners Hook
4
- export const useFetchERC20CollectionOwners = async (contractAddress: string) => {
4
+ export const useERC20CollectionOwners = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC20 Collection Top Coins
4
- export const useFetchERC20CollectionTopCoins = async () => {
4
+ export const useERC20CollectionTopCoins = async () => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC20 Collection Transfers
4
- export const useFetchERC20CollectionTransfers = async (contractAddress: string) => {
4
+ export const useERC20CollectionTransfers = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC20 Collection Holdings
4
- export const useFetchERC20Holdings = async (contractAddress: string) => {
4
+ export const useERC20Holdings = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC20 Collection Transfers
4
- export const useFetchERC20Transfers = async (contractAddress: string) => {
4
+ export const useERC20Transfers = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Attributes Hook
4
- export const useFetchERC721CollectionAttributes = async (contractAddress: string) => {
4
+ export const useERC721CollectionAttributes = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Data Hook
4
- export const useFetchERC721CollectionData = async (contractAddress: string) => {
4
+ export const useERC721CollectionData = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Data Hook
4
- export const useFetchERC721CollectionExtraData = async (contractAddress: string) => {
4
+ export const useERC721CollectionExtraData = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Floor Price Hook
4
- export const useFetchERC721CollectionFloorPrice = async (contractAddress: string) => {
4
+ export const useERC721CollectionFloorPrice = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Market Cap Hook
4
- export const useFetchERC721CollectionMarketCap = async (contractAddress: string, duration: 2 | 14 | 30) => {
4
+ export const useERC721CollectionMarketCap = async (contractAddress: string, duration: 2 | 14 | 30) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Sales Hook
4
- export const useFetchERC721CollectionSales = async (contractAddress: string) => {
4
+ export const useERC721CollectionSales = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Transfers Hook
4
- export const useFetchERC721CollectionTransfers = async (contractAddress: string) => {
4
+ export const useERC721CollectionTransfers = async (contractAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Trends Hook
4
- export const useFetchERC721CollectionTrends = async () => {
4
+ export const useERC721CollectionTrends = async () => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Collection Volume Hook
4
- export const useFetchERC721CollectionVolume = async () => {
4
+ export const useERC721CollectionVolume = async () => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Holdings hook
4
- export const useFetchERC721Holdings = async (walletAddress: string) => {
4
+ export const useERC721Holdings = async (walletAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Lookup Data hook
4
- export const useFetchERC721LookupData = async (contractAddress: string, tokenID: string) => {
4
+ export const useERC721LookupData = async (contractAddress: string, tokenID: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Opensea data hook
4
- export const useFetchERC721OpenseaData = async (contractAddress: string, tokenID: string) => {
4
+ export const useERC721OpenseaData = async (contractAddress: string, tokenID: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Rarity data hook
4
- export const useFetchERC721RarityData = async (contractAddress: string, tokenID: string) => {
4
+ export const useERC721RarityData = async (contractAddress: string, tokenID: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Sales data hook
4
- export const useFetchERC721SalesData = async (contractAddress: string, tokenID: string) => {
4
+ export const useERC721SalesData = async (contractAddress: string, tokenID: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Transfer Lookup data hook
4
- export const useFetchERC721TransferLookupData = async (contractAddress: string, tokenID: string) => {
4
+ export const useERC721TransferLookupData = async (contractAddress: string, tokenID: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Transfer data hook
4
- export const useFetchERC721TransfersData = async (walletAddress: string) => {
4
+ export const useERC721TransfersData = async (walletAddress: string) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching Address to ENS Custom hook
4
- export const useFetchGasLookup = () => {
4
+ export const useGasLookup = () => {
5
5
  const options = {
6
6
  method: 'GET',
7
7
  headers: {
@@ -1,39 +1,39 @@
1
1
  // ENS Hooks
2
- export { useFetchAddressENSLookup } from './ens/useFetchAddressENSLookup';
3
- export { useFetchENSAddressLookup } from './ens/useFetchENSAddressLookup';
4
- export { useFetchENSIDLookup } from './ens/useFetchENSIDLookup';
5
- export { useFetchENSNameLookup } from './ens/useFetchENSNameLookup';
2
+ export { useAddressENSLookup } from './ens/useAddressENSLookup';
3
+ export { useENSAddressLookup } from './ens/useENSAddressLookup';
4
+ export { useENSIDLookup } from './ens/useENSIDLookup';
5
+ export { useENSNameLookup } from './ens/useENSNameLookup';
6
6
 
7
7
  // ERC20 Token Hooks
8
- export { useFetchERC20CollectionOwners } from './erc20Tokens/useFetchERC20CollectionOwners';
9
- export { useFetchERC20CollectionTopCoins } from './erc20Tokens/useFetchERC20CollectionTopCoins';
10
- export { useFetchERC20CollectionTransfers } from './erc20Tokens/useFetchERC20CollectionTransfers';
11
- export { useFetchERC20Holdings } from './erc20Tokens/useFetchERC20Holdings';
12
- export { useFetchERC20Transfers } from './erc20Tokens/useFetchERC20Transfers';
8
+ export { useERC20CollectionOwners } from './erc20Tokens/useERC20CollectionOwners';
9
+ export { useERC20CollectionTopCoins } from './erc20Tokens/useERC20CollectionTopCoins';
10
+ export { useERC20CollectionTransfers } from './erc20Tokens/useERC20CollectionTransfers';
11
+ export { useERC20Holdings } from './erc20Tokens/useERC20Holdings';
12
+ export { useERC20Transfers } from './erc20Tokens/useERC20Transfers';
13
13
 
14
14
  // ERC721 Token Hooks
15
- export { useFetchERC721CollectionAttributes } from './erc721Tokens/useFetchERC721CollectionAttributes';
16
- export { useFetchERC721CollectionData } from './erc721Tokens/useFetchERC721CollectionData';
17
- export { useFetchERC721CollectionExtraData } from './erc721Tokens/useFetchERC721CollectionExtraData';
18
- export { useFetchERC721CollectionFloorPrice } from './erc721Tokens/useFetchERC721CollectionFloorPrice';
19
- export { useFetchERC721CollectionMarketCap } from './erc721Tokens/useFetchERC721CollectionMarketCap';
20
- export { useFetchERC721CollectionSales } from './erc721Tokens/useFetchERC721CollectionSales';
21
- export { useFetchERC721CollectionTransfers } from './erc721Tokens/useFetchERC721CollectionTransfers';
22
- export { useFetchERC721CollectionTrends } from './erc721Tokens/useFetchERC721CollectionTrends';
23
- export { useFetchERC721CollectionVolume } from './erc721Tokens/useFetchERC721CollectionVolume';
24
- export { useFetchERC721Holdings } from './erc721Tokens/useFetchERC721Holdings';
25
- export { useFetchERC721LookupData } from './erc721Tokens/useFetchERC721LookupData';
26
- export { useFetchERC721OpenseaData } from './erc721Tokens/useFetchERC721OpenseaData';
27
- export { useFetchERC721RarityData } from './erc721Tokens/useFetchERC721RarityData';
28
- export { useFetchERC721SalesData } from './erc721Tokens/useFetchERC721SalesData';
29
- export { useFetchERC721TransferLookupData } from './erc721Tokens/useFetchERC721TransferLookupData';
30
- export { useFetchERC721TransfersData } from './erc721Tokens/useFetchERC721TransfersData';
15
+ export { useERC721CollectionAttributes } from './erc721Tokens/useERC721CollectionAttributes';
16
+ export { useERC721CollectionData } from './erc721Tokens/useERC721CollectionData';
17
+ export { useERC721CollectionExtraData } from './erc721Tokens/useERC721CollectionExtraData';
18
+ export { useERC721CollectionFloorPrice } from './erc721Tokens/useERC721CollectionFloorPrice';
19
+ export { useERC721CollectionMarketCap } from './erc721Tokens/useERC721CollectionMarketCap';
20
+ export { useERC721CollectionSales } from './erc721Tokens/useERC721CollectionSales';
21
+ export { useERC721CollectionTransfers } from './erc721Tokens/useERC721CollectionTransfers';
22
+ export { useERC721CollectionTrends } from './erc721Tokens/useERC721CollectionTrends';
23
+ export { useERC721CollectionVolume } from './erc721Tokens/useERC721CollectionVolume';
24
+ export { useERC721Holdings } from './erc721Tokens/useERC721Holdings';
25
+ export { useERC721LookupData } from './erc721Tokens/useERC721LookupData';
26
+ export { useERC721OpenseaData } from './erc721Tokens/useERC721OpenseaData';
27
+ export { useERC721RarityData } from './erc721Tokens/useERC721RarityData';
28
+ export { useERC721SalesData } from './erc721Tokens/useERC721SalesData';
29
+ export { useERC721TransferLookupData } from './erc721Tokens/useERC721TransferLookupData';
30
+ export { useERC721TransfersData } from './erc721Tokens/useERC721TransfersData';
31
31
 
32
32
  // Gas Hooks
33
- export { useFetchGasLookup } from './gas/useFetchGasLookup';
33
+ export { useGasLookup } from './gas/useGasLookup';
34
34
 
35
35
  // Price Hooks
36
- export { useFetchERC20Price } from './prices/useFetchERC20Price';
37
- export { useFetchERC721Price } from './prices/useFetchERC721Price';
38
- export { useFetchETHPrice } from './prices/useFetchETHPrice';
39
- export { useFetchLayerTwoPrice } from './prices/useFetchLayerTwoPrice';
36
+ export { useERC20Price } from './prices/useERC20Price';
37
+ export { useERC721Price } from './prices/useERC721Price';
38
+ export { useETHPrice } from './prices/useETHPrice';
39
+ export { useLayerTwoPrice } from './prices/useLayerTwoPrice';
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC20 Prices Hook
4
- export const useFetchERC20Price = async (contractAddress: string, currentPrice: boolean, duration: 2 | 14 | 30) => {
4
+ export const useERC20Price = async (contractAddress: string, currentPrice: boolean, duration: 2 | 14 | 30) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ERC721 Prices Hook
4
- export const useFetchERC721Price = async (contractAddress: string, tokenID: number) => {
4
+ export const useERC721Price = async (contractAddress: string, tokenID: number) => {
5
5
  // Set options for request
6
6
  let options = {
7
7
  method: 'POST',
@@ -1,7 +1,7 @@
1
1
  import { useFetch } from "../../custom_hooks/useFetch";
2
2
 
3
3
  // Fetching ETH Prices Hook
4
- export const useFetchETHPrice = async (currentPrice: boolean, duration: 2 | 14 | 30) => {
4
+ export const useETHPrice = async (currentPrice: boolean, duration: 2 | 14 | 30) => {
5
5
 
6
6
  // Set options for request
7
7
  let options = {
@@ -2,7 +2,7 @@ import { LayerTwoNetworks } from "../../types/LayerTwoType";
2
2
  import { useFetch } from "../../custom_hooks/useFetch";
3
3
 
4
4
  // Fetching Layer Two Prices Hook
5
- export const useFetchLayerTwoPrice = async (layerTwo: LayerTwoNetworks, currentPrice: boolean, duration: 2 | 14 | 30) => {
5
+ export const useLayerTwoPrice = async (layerTwo: LayerTwoNetworks, currentPrice: boolean, duration: 2 | 14 | 30) => {
6
6
 
7
7
  // Set options for request
8
8
  let options = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ethereum-hooks",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Resourceful NPM package that contains React hooks for working with the Ethereum Blockchain.",
5
5
  "main": "crypto_hooks/index.js",
6
6
  "types": "crypto_hooks/index.d.ts",
@@ -9,9 +9,9 @@
9
9
  "url": "https://github.com/CodingAbdullah/ethereum-hooks.git"
10
10
  },
11
11
  "keywords": [
12
+ "aws",
12
13
  "api",
13
14
  "blockchain",
14
- "data",
15
15
  "ethereum",
16
16
  "hooks",
17
17
  "reactjs",