{"_id":"use-token","_rev":"40-c4a95cf821095969a66fc9409c37b3bd","name":"use-token","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"use-token","version":"0.1.0","author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"AGPL-3.0","_id":"use-token@0.1.0","maintainers":[{"name":"bpierre","email":"hello@pierre.world"}],"dist":{"shasum":"fc695a3832caabbd4e95c8f8652e18914e349754","tarball":"https://registry.npmjs.org/use-token/-/use-token-0.1.0.tgz","fileCount":5,"integrity":"sha512-+cyzDMaN30jno9nxfUrnV4yVhE1Xvw+pD0Fmm6YV1ZXFaHs3cJRjuFEbbcgu5AcA24KT44EjJu72nUaccp0Q6w==","signatures":[{"sig":"MEUCIG4W9If9++bXpxg84T2ZQ0LIuzHaLYd96WaCZ/+D+p7+AiEAmqC5UyiHJyVboAGYlsT/CgigqeZZpd4NwuV37GPyEnQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeURZhCRA9TVsSAnZWagAAQIgP/1R8w9BSSCHlKRrTkfQB\n7c27ydJotTAfj/3cg/D+HywLVPu1ns7pGGz8GvYhWLruPfjKfkJ7lKDUMoyK\niMm0QUoGIYs7LQH3nF8dxoASNP8H/D4NUV3YkvYTIOTRvrfk4SisO8a2nF9R\nEOeGzPTlEV/NXSbA+NylBECob9zZVsLeFC0dxcmc23NrsRNqIKZxYbq6dQ47\nEO/z+ctFIgFHNQfH4LyvBiZQkNUjw2U+cSFS4O1rJOrIY7sh2+OZ/w2IRWfl\n6DLzV/kRlvLK8zQCKiOdFOv927XUcF6ObjVr965fSpPEABs4FYehQM0MDCLc\nqTkU1kyy3OkeutLTegeu2Op8jPQc0jy+MTkOPDY1YH9O/7/kBX8kRAAyQI57\nCdfumqolsFo6ebN9x0dpwVA1KVS0fnwB2DsFl2xff45Yoz0rQ82fivDLnJio\nZwDLzF8Wyxql+qKCegL9FMFG35RZqJw9y5APidlmRi08poCur+Xe2YeJGqbv\nlDNsNy1B3hxnIoXRJhBgbO+cwse+a1jt7aJh/UhKE9OzbOOASAb4cUfRyhnm\n7Ns6V6q86ct/at95Z6L3XHoE91DbcGYnq8EbXamNVWMYvOpzzguu2FIRre7D\neugi27Pl7vm58wpYXzTA9CuDjMkd4cqAkrE5O/H4vcpT0kkVeQbPFdGWTug+\nUT1K\r\n=ONBX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/index.js","scripts":{"dev":"yarn swc -w src -d dist","build":"yarn swc src -d dist"},"_npmUser":{"name":"bpierre","email":"hello@pierre.world"},"description":"[<img src=\"https://img.shields.io/npm/v/use-token\" alt=\"\" />](https://www.npmjs.com/package/use-token) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-token\" alt=\"\" />](https://bundlephobia.com/result?p=use-token)","directories":{},"sideEffects":false,"dependencies":{"js-sha3":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@swc/cli":"^0.1.23","chokidar":"^3.3.1","prettier":"^1.19.1","@swc/core":"^1.1.27"},"peerDependencies":{"react":"^16.12.0"},"_npmOperationalInternal":{"tmp":"tmp/use-token_0.1.0_1582372448811_0.6522550274381191","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"use-token","version":"0.1.1","author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"AGPL-3.0","_id":"use-token@0.1.1","maintainers":[{"name":"bpierre","email":"hello@pierre.world"}],"homepage":"https://github.com/aragon/use-token#readme","dist":{"shasum":"113256f97ec66a4118b2dacf92a51c521b0888f6","tarball":"https://registry.npmjs.org/use-token/-/use-token-0.1.1.tgz","fileCount":5,"integrity":"sha512-ljn5Z2LthIsDdpN1OuuQGVxuaV8ZITyBwo95NOZuAB+ZtVrIIepc02hKiYZVYb+zKhe7liKZ7b5bcf2jshCRJw==","signatures":[{"sig":"MEUCIQDqxc5z387YVrprQVnZsAkvquXuhRaVjGBzz0RVc3aBngIgalQALCWCsscqrAY5YkM3X9dGzUcpB20Z7gdZqkCpYDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeURlzCRA9TVsSAnZWagAAYBMP/32Tv4NcRiXlgLS3qLc0\n/tG5FtU7UI8wAtRYE7K3UmQRRr9dFrfhzWV37tnCAgfTaDTt1w8yyScW2IYo\nPOuVpeY5+6U/OJNXxI6k1phsaWh0gywpIB6RH+D/3toHlZ81wsxA0/xwLTC9\n4EC8a4aYd6x9ydWSBaWeXkiHBzF/xsntAiGGG8TAbdlc8FygdT3gn07QKWeG\nDQKM9QAmTy/GLFtpN0PU/4LxOShHcBemG7WMbgZvCvHTm5qMA/RoBX2jVYsD\nlpUjAPLHG9XMiAmRsfcv9KRgTFKBdoMfuRDXpQMrtFu4pctLF1W/qIMD/l5c\ns+MeY6olIjaAsTrY2YEFl4GJDHOXUSvdhRNXlQh0FRYYIuvfqz4q7wOmEr2s\n2JJ4Ed7zAgaS64UpG7JK8RogVKz4H0GIbs/FYDUn5v1fYZox2J2XtbG22tmT\nXnSg5gxXjJJRKwxHHgifib8sii9bnUwPQwrs18MA9NiE0cVxV6tofEyQOkxm\nC5J4XNhXZA50cBRwVf7yP5sk2dRxwwfSsPkPy31hqXmxJd+ObTCQL2cDb6n0\nwRsdmEkGNAqVmFmShyVuaABDxwO70+T1/wT2OP4YClXsrAvhyEmjdssUExAE\ncSyyrrv3rZOHuQfYAcSjIN+OFteVbse2nnJ+ZncTp4iL/uBGpH33B2fUcxBO\niqs/\r\n=0QA3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/index.js","scripts":{"dev":"yarn swc -w src -d dist","build":"yarn swc src -d dist","prepublishOnly":"git push && git push --tags"},"_npmUser":{"name":"bpierre","email":"hello@pierre.world"},"repository":{"url":"https://github.com/aragon/use-token.git","type":"git"},"description":"[<img src=\"https://img.shields.io/npm/v/use-token\" alt=\"\" />](https://www.npmjs.com/package/use-token) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-token\" alt=\"\" />](https://bundlephobia.com/result?p=use-token)","directories":{},"sideEffects":false,"dependencies":{"js-sha3":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@swc/cli":"^0.1.23","chokidar":"^3.3.1","prettier":"^1.19.1","@swc/core":"^1.1.27"},"peerDependencies":{"react":"^16.12.0"},"_npmOperationalInternal":{"tmp":"tmp/use-token_0.1.1_1582373234793_0.608189466111736","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"use-token","version":"0.1.2","author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"MIT","_id":"use-token@0.1.2","maintainers":[{"name":"andy-hook","email":"hello@andy-hook.co.uk"},{"name":"aragon-ci","email":"jorge+npmci@aragon.one"},{"name":"bingen","email":"bingen@aragon.one"},{"name":"bpierre","email":"hello@pierre.world"},{"name":"evalir","email":"hi@enriqueortiz.dev"},{"name":"facuspagnuolo","email":"facundo_spagnuolo@icloud.com"},{"name":"gabrielg","email":"gabrielpk.18@gmail.com"},{"name":"izqui","email":"jorge@aragon.one"},{"name":"luisivan","email":"me@luisivan.net"},{"name":"sohkai","email":"qisheng.brett.sun@gmail.com"}],"homepage":"https://github.com/aragon/use-token#readme","dist":{"shasum":"499d30bb6c76a8bdb3264041159a6005c282c98a","tarball":"https://registry.npmjs.org/use-token/-/use-token-0.1.2.tgz","fileCount":7,"integrity":"sha512-UZffoDqDBZrWt66vqhoqX/ddcShvUJcQYc+s9cz81sA0QHngGLr7aBA3wGid+147N16xrAyWdsQEy+GspPZ9Lg==","signatures":[{"sig":"MEUCIQDi8inxRMj97eUwbBhuZ86PfTFgjGga6YJ8z5IYmc72fgIgW9RkGGyb94oiTPXgRdjNQLO13C5kveJbLxsq+APRnmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGYQtCRA9TVsSAnZWagAASSgP+gPFmy/zbMlC4mYXPitO\n4wBdv814liMEceHrxAPo3FbzQujmsjjgsJDQtl/Sx0hSVyJCHWP857qWd+d4\nydqQG6GYfOIQmMuc8co1IdwVlD6a3OD15sQCuLsgd1hPRIuWQI8v2eVsx4gZ\nxalmpGsvR5s1WafX497+wNbpZXbe0x2VphfIITLhfUeV1yG2TAYOl+XQoip/\niVQVtIJJoelvTMVMBPnUo+SxZBG6mTdX8/ORSvDS6C+/NxDkTfji9DaHhmyP\nlcQTAlAtVdi2aQdW/V0IvSkLy0GtB/CEuhH8UzG6CbUJQf2h8g9JpHxr33mo\nJ3zW0yqhuoHUa0sXe25TIOjiFI9dm/rxX3PWLptQRKnThMN92xHgwe4n2kLG\nDKzStmu556AYIFgOVEgqERsLk9PTccgwXImNMLd5DcGJDddhhFvLJKp7h4l5\nkmNtZ4wlav3y/e5imWJrNwH7Yl12EDicFTHEThIO9ODjQ4lJpJnXVvQSJjwz\nbWY9qj0gwTG8sa2AljYW6M/EjoXYQtAS2a2elsFMaVoh+U/yf2nWEY5R5Z32\neodxO9sxPhOdMAEVADVlzzQ/BHA42gdOopU8MxuIawoTWbqxYhZ1T4EaLjh3\nA2sLm9jKaewLQvGkIF68bQZogIb30KuaoagGALqMzpiDTuBi0gm19EsgJFLy\nHRrF\r\n=EalR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/index.js","scripts":{"dev":"yarn swc -w src -d dist","build":"yarn swc src -d dist","prepublishOnly":"git push && git push --tags"},"_npmUser":{"name":"bpierre","email":"hello@pierre.world"},"repository":{"url":"https://github.com/aragon/use-token.git","type":"git"},"description":"[<img src=\"https://img.shields.io/npm/v/use-token\" alt=\"\" />](https://www.npmjs.com/package/use-token) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-token\" alt=\"\" />](https://bundlephobia.com/result?p=use-token)","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Aragon Association <https://aragon.org/>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","sideEffects":false,"dependencies":{"js-sha3":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@swc/cli":"^0.1.23","chokidar":"^3.3.1","prettier":"^1.19.1","@swc/core":"^1.1.27"},"peerDependencies":{"react":"^16.12.0"},"_npmOperationalInternal":{"tmp":"tmp/use-token_0.1.2_1595507756832_0.16505242907954876","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"use-token","version":"0.2.0","author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"MIT","_id":"use-token@0.2.0","maintainers":[{"name":"andy-hook","email":"hello@andy-hook.co.uk"},{"name":"aragon-ci","email":"jorge+npmci@aragon.one"},{"name":"bingen","email":"bingen@aragon.one"},{"name":"bpierre","email":"hello@pierre.world"},{"name":"evalir","email":"hi@enriqueortiz.dev"},{"name":"facuspagnuolo","email":"facundo_spagnuolo@icloud.com"},{"name":"gabrielg","email":"gabrielpk.18@gmail.com"},{"name":"izqui","email":"jorge@aragon.one"},{"name":"luisivan","email":"me@luisivan.net"},{"name":"sohkai","email":"qisheng.brett.sun@gmail.com"}],"homepage":"https://github.com/aragon/use-token#readme","dist":{"shasum":"5690aec9fcc327cf843eb8ff01cd1f75f7d93a25","tarball":"https://registry.npmjs.org/use-token/-/use-token-0.2.0.tgz","fileCount":7,"integrity":"sha512-lvKboDH7okV/SAb9q4Fs+kgEOS976SvHPMzpy+KCKXXVAMzG30znfsvYKiiK2Mdg+QU4vil0+NHXZ6ozuo+ysw==","signatures":[{"sig":"MEUCIC5BmQs8wuzjoTlEOCx5VKQcKdask2Vv/BbWKNe3syL9AiEAm1pKfYBzaK9fuX62kg0PDz41MSld3CXn0puKn8SVgO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2/N6CRA9TVsSAnZWagAAk18QAJ6nUHnPpraNALguZr6Q\nZRCn3vPV7eZT8CAYjEmo8bKc0GjZAwQuribjsqenCbcM8NawcRzhncN2yCgq\nsjNiuKDO9JMhZGru3Ojla+UPSnBotMoqXoEF5ZOgqz4KwiJoPzq1N1OJCH+Q\nbk5JFZs7FXxvsqE2Ey0S+lLb5plwkX7Z+wJZBf6u7b7Hx8vtJKABiPPiojP+\nCPonYf0yu3y9x8rD3eSO8JvDSs9X2P9/P3M5s0Wpz2dBbn7R6GVKQxpuAv/S\nzV30UDEfds2iuM+btkKZVzoWfApBIUFk9mH3i5Xr4EqSZ91RwrzU7hP+IIG5\nXF7d+qwlA2qKGDmQBCYHA9mu5Q7Ieie7KT7HUYXO844JD8hoennRFtSZ8OOw\ni47i+PdPn/7CBtCLYqPMFs7vKP/XljRb0d19EUL5K6Z7jFJggG8qtu7x0CNo\npYf2T4Cv0+Fq6mCrEXPxyZDGoYIhiblju2G4v7jej++DfnlLlU8fYcVhp5K4\n1daiRDviWFluVDyJS/3DZ5B+3FjH3AfjF/KNe9i2KOwKxP+8fDtVNGSeig6+\nnQGHQRQmR8YWopWXXq2dNtKD/PZVQRPTv1SvNzhIVCpgw4U1nvLKUT6jfO92\nrub4u2ZHieFa4RBW6B18A8x9Lt4MuyBzutpvzZ/dlmeW4MFGAS3jV2HFqznG\nfD9+\r\n=n7b9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/index.js","scripts":{"dev":"yarn swc -w src -d dist","build":"yarn swc src -d dist","prepublishOnly":"git push && git push --tags"},"_npmUser":{"name":"bpierre","email":"hello@pierre.world"},"repository":{"url":"https://github.com/aragon/use-token.git","type":"git"},"description":"[<img src=\"https://img.shields.io/npm/v/use-token\" alt=\"\" />](https://www.npmjs.com/package/use-token) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-token\" alt=\"\" />](https://bundlephobia.com/result?p=use-token)","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Aragon Association <https://aragon.org/>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","sideEffects":false,"dependencies":{"js-sha3":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@swc/cli":"^0.1.23","chokidar":"^3.3.1","prettier":"^1.19.1","@swc/core":"^1.1.27"},"peerDependencies":{"react":"^16.12.0"},"_npmOperationalInternal":{"tmp":"tmp/use-token_0.2.0_1595508320522_0.7912487408858646","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-02-22T11:54:08.811Z","modified":"2025-05-09T12:20:17.824Z","0.1.0":"2020-02-22T11:54:08.938Z","0.1.1":"2020-02-22T12:07:14.970Z","0.1.2":"2020-07-23T12:35:56.991Z","0.2.0":"2020-07-23T12:45:20.628Z"},"author":{"name":"Aragon Association","email":"legal@aragon.org"},"license":"MIT","homepage":"https://github.com/aragon/use-token#readme","repository":{"url":"https://github.com/aragon/use-token.git","type":"git"},"description":"[<img src=\"https://img.shields.io/npm/v/use-token\" alt=\"\" />](https://www.npmjs.com/package/use-token) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-token\" alt=\"\" />](https://bundlephobia.com/result?p=use-token)","maintainers":[{"email":"devops-master@aragon.org","name":"devops-master"},{"email":"jjavieralvarezrodriguez@gmail.com","name":"jjavieralv"},{"email":"devops@aragon.org","name":"arabot-1"},{"email":"hi@bpier.re","name":"bpierre"},{"email":"npm@brettsun.com","name":"sohkai"}],"readme":"# 💰 useToken()\n\n[<img src=\"https://img.shields.io/npm/v/use-token\" alt=\"\" />](https://www.npmjs.com/package/use-token) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-token\" alt=\"\" />](https://bundlephobia.com/result?p=use-token)\n\nuseToken() allows to get information related to a token on Ethereum (for now; other networks will follow).\n\n## Usage\n\nAdd it to your project:\n\n```console\nyarn add use-token\n```\n\nUse it in your React app:\n\n```jsx\n// App.js\n\nimport React from 'react'\nimport { useToken, UseTokenProvider } from 'use-token'\n\nfunction App() {\n  const token = useToken('0xcD62b1C403fa761BAadFC74C525ce2B51780b184')\n\n  return (\n    <div>\n      <h1>{token.name}</h1>\n      <img src={token.iconUrl} alt={token.symbol} />\n    </div>\n  )\n}\n\n// Wrap everything in <UseTokenProvider />\nexport default () => (\n  <UseTokenProvider>\n    <App />\n  </UseTokenProvider>\n)\n```\n\n## API\n\n### &lt;UseTokenProvider />\n\nThis is the provider component. It should be placed above any component using useToken().\n\n### useToken()\n\nThis is the hook to be used throughout the app. It takes the address of the token as a parameter, and returns an object representing the token, containing:\n\n- `iconUrl`: URL of the icon.\n- `symbol`: The symbol of the token (e.g. `\"ANJ\"`)\n- `name`: The name of the token (e.g. `\"Aragon Network Juror\"`)\n","readmeFilename":"README.md"}