{"_id":"@albs1/use-wallet","_rev":"2-2611770267b10b1330defc99d7648990","name":"@albs1/use-wallet","dist-tags":{"latest":"0.13.6-3"},"versions":{"0.13.6-1":{"name":"@albs1/use-wallet","version":"0.13.6-1","author":{"name":"Albs1"},"license":"MIT","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/cjs/index.d.ts","sideEffects":false,"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint src","prepare":"rm -rf ./dist && yarn build"},"dependencies":{"@aragon/provided-connector":"^6.0.8","@typescript-eslint/parser":"^4.1.0","@web3-react/core":"6.1.9","@web3-react/fortmatic-connector":"6.1.6","@web3-react/frame-connector":"6.0.9","@web3-react/injected-connector":"6.0.7","@web3-react/ledger-connector":"6.1.9","@web3-react/portis-connector":"6.1.6","@web3-react/torus-connector":"6.1.7","@web3-react/walletconnect-connector":"6.2.4","@web3-react/walletlink-connector":"6.2.5","jsbi":"^3.1.4","prop-types":"^15.7.2","regenerator-runtime":"^0.13.7","rollup-plugin-image-files":"^1.4.2"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"devDependencies":{"@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.1.0","@web3-react/abstract-connector":"^6.0.7","babel-eslint":"^10.1.0","eslint":"^7.8.1","eslint-config-prettier":"^6.9.0","eslint-config-react-app":"^5.2.1","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-flowtype":"^5.2.0","eslint-plugin-import":"^2.20.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.20.6","eslint-plugin-react-hooks":"^4.1.0","eslint-plugin-standard":"^4.0.1","husky":"^4.3.0","prettier":"^2.1.1","tsdx":"^0.14.1","tslib":"^2.0.1","typescript":"^4.0.2"},"peerDependencies":{"react":"^16.13.1 || ^17","react-dom":"^16.13.1 || ^17"},"gitHead":"7b853f3a1c7914b2143df8cb01d600b90ff2e378","description":"[<img src=\"https://img.shields.io/npm/v/use-wallet\" alt=\"\" />](https://www.npmjs.com/package/use-wallet) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-wallet\" alt=\"\" />](https://bundlephobia.com/result?p=use-wallet)","_id":"@albs1/use-wallet@0.13.6-1","_nodeVersion":"18.0.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-mVdPcoZ0aPqQYLpBPnQtoXmvPrkWl9eBO89wnDt74/d4AO+Av6o5pfVzb6CcmYteT/ohUwA33GpxtKg3Xy7dMg==","shasum":"22562c1f5ee5cfa2c3c7c75d9d2f547bd2c43c01","tarball":"https://registry.npmjs.org/@albs1/use-wallet/-/use-wallet-0.13.6-1.tgz","fileCount":26,"unpackedSize":345734,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEQMF9EH5nuEzNWR85devTNSwt0937ZKnyc7FV8k4Pn/AiBroCsD1OE7Iw+HAg7VZRT1Ki/p6rMX57ywf5JGgCKfWg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2+c/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorBBAAiyMp0stsRq0abm2n5b0DHLdPjQyIcvPl3e6T2AuuOj23vhWl\r\n4Wh8UaPXVb/hnmpyclJJJPUOlTYKvXKli6oHnzwQB9V64ZFLsmSGAFj9HS9U\r\nwtLuND+GdSQhMeVktDgPcNTqX62+RiKugrlcLAb+BwMH9kaM7RO0Pn0DADs2\r\n8G4ma6visRlhkHfIvEyLdCEvTEAGzeoDJEQP7YwUN8ydca9LxUqp96S0d4Ug\r\nCqOyXnsa8DrOJvyi0l+ENUSLUdxcUZ31j053AnzVSZSEtsA+StoLz6WbQwwf\r\nBOvKiDW/wo1Cfqnj9FBWxmA23JOVGMHPqGbUHnBuLI483Z0WYSA2YUb9KDCL\r\nD/5RFL5Ai7sdb3HUB+ENz7a6WdY9PLRNcbk+AiaHHK/+ymkUYw0Ghke6TRcl\r\nBxMR3NvKgmN/5a4E3k5E+Gn2Jcv0keAwNhwgN9nVLPDMkIl5t4jT73ODXFo8\r\n8BaGKPcaxCCBHl5LVCtuXEJCR+mdQs0ypR4YP3fLGbZmVxYJDnD10r3EG6ae\r\n0NCpsJGZNgnlX9WHtqUeDW0Qz8sIFST1zFiO/XVySacnQDVuLnZFNGmtyLWy\r\nlqz78PgsgK+nAdudyBEfO9nIk60YTLI0FJkDwpYc8a+OT+RRrTJbI7cS4vdU\r\njV88acqZ2DcjueRJ591dYc225zcvk1e31/I=\r\n=JBcc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"albs1","email":"albert@samzdesign.nl"},"directories":{},"maintainers":[{"name":"albs1","email":"albert@samzdesign.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-wallet_0.13.6-1_1658578751733_0.6802850478911158"},"_hasShrinkwrap":false},"0.13.6-2":{"name":"@albs1/use-wallet","version":"0.13.6-2","author":{"name":"Albs1"},"license":"MIT","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/cjs/index.d.ts","sideEffects":false,"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint src","prepare":"rm -rf ./dist && yarn build"},"dependencies":{"@aragon/provided-connector":"^6.0.8","@typescript-eslint/parser":"^4.1.0","@web3-react/core":"6.1.9","@web3-react/fortmatic-connector":"6.1.6","@web3-react/frame-connector":"6.0.9","@web3-react/injected-connector":"6.0.7","@web3-react/ledger-connector":"6.1.9","@web3-react/portis-connector":"6.1.6","@web3-react/torus-connector":"6.1.7","@web3-react/walletconnect-connector":"6.2.4","@web3-react/walletlink-connector":"6.2.5","jsbi":"^3.1.4","prop-types":"^15.7.2","regenerator-runtime":"^0.13.7","rollup-plugin-image-files":"^1.4.2"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"devDependencies":{"@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.1.0","@web3-react/abstract-connector":"^6.0.7","babel-eslint":"^10.1.0","eslint":"^7.8.1","eslint-config-prettier":"^6.9.0","eslint-config-react-app":"^5.2.1","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-flowtype":"^5.2.0","eslint-plugin-import":"^2.20.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.20.6","eslint-plugin-react-hooks":"^4.1.0","eslint-plugin-standard":"^4.0.1","husky":"^4.3.0","prettier":"^2.1.1","tsdx":"^0.14.1","tslib":"^2.0.1","typescript":"^4.0.2"},"peerDependencies":{"react":"^16.13.1 || ^17","react-dom":"^16.13.1 || ^17"},"gitHead":"7b853f3a1c7914b2143df8cb01d600b90ff2e378","description":"[<img src=\"https://img.shields.io/npm/v/use-wallet\" alt=\"\" />](https://www.npmjs.com/package/use-wallet) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-wallet\" alt=\"\" />](https://bundlephobia.com/result?p=use-wallet)","_id":"@albs1/use-wallet@0.13.6-2","_nodeVersion":"18.0.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-WUGK/Y4G6DZfrzlQYiS8NQsvGSiuto3Kqzj1lyUmWQ5wsR8WlRnVCC3d1Myf5EJS5yagcifoiYbaFnYpyE6RQw==","shasum":"7642a698ab9b7cd79974a0f4f925bf03ebee3512","tarball":"https://registry.npmjs.org/@albs1/use-wallet/-/use-wallet-0.13.6-2.tgz","fileCount":26,"unpackedSize":346912,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdqlhvYJwlY6jDpuO39kCpFVH26HbjC0fYyIxUPoC5BgIhAOQr7/793aX+ovxJOnLK1fuyuHUdD5iSdZ+Vzq0LpmUT"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPqtaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9MA/+PQwM2zNUu5ppNPknQ+4G+8UxNQfqyWO4Hk3wf+ar4EJeKeE7\r\nRc9Exwmn2EhaIiGz57Nm4dBv+MIr6iJoq2rlz0tS/Y5gkSt25yk4MYYQYu5J\r\nomdzG7bsNvc8cm09U6M5MwH7mlPDfH+sUYKGzooZIgQBcHS6Lza5gsP1OP6C\r\nvHW44f7jkBGR3akuQGxlY5KIcf5WQH/ZSHVmWbsaytcDJzaD4KPsSIRl1L9E\r\ncaLZUUF4Rc9nImpJ12VCaBarGYnSrAA1ln195JhmUhKaVygzVhfrTdqm3uRc\r\ntjUhe3dhEHJBnPeOaYbCR/XRzsYHEOHhphEGeYk373XezjgWmQ4RvPQrYV5X\r\nLXcdC7fW37/dlasr+Wffw3dF0RDVoZkUqnG+zlxiQZwgM2f5ScrzTA82WM5R\r\nihlDrDA9AYNYM/PruW5mIC1Q+JjU2xQTaScA5hKhreoMVI2jz+jj5xz/C+Qf\r\n7ZcbKZ/E7uC45mU1LCE8v0Z70TFz9mVVy1ZL4sz5IVbh+NwGqFF5SD9y3t8q\r\nAgGJ69B25Pv15IIFkoO1oog6BkL5KJezPaZ48tbaQ2+WEHBTCZTfVcxtv1dT\r\nC2prIXK5SuH9m79KRre5kwMqYn9if1YbVMWO9BTZy6S4uC7aGix7IacbbT/Y\r\nLn8gpU499QDnn7t15rvOoHGYaMX4sOXjslo=\r\n=BVn/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"albs1","email":"albert@samzdesign.nl"},"directories":{},"maintainers":[{"name":"albs1","email":"albert@samzdesign.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-wallet_0.13.6-2_1665051482306_0.5968149611403328"},"_hasShrinkwrap":false},"0.13.6-3":{"name":"@albs1/use-wallet","version":"0.13.6-3","author":{"name":"Albs1"},"license":"MIT","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/cjs/index.d.ts","sideEffects":false,"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint src","prepare":"rm -rf ./dist && yarn build"},"dependencies":{"@aragon/provided-connector":"^6.0.8","@typescript-eslint/parser":"^4.1.0","@web3-react/core":"6.1.9","@web3-react/fortmatic-connector":"6.1.6","@web3-react/frame-connector":"6.0.9","@web3-react/injected-connector":"6.0.7","@web3-react/ledger-connector":"6.1.9","@web3-react/portis-connector":"6.1.6","@web3-react/torus-connector":"6.1.7","@web3-react/walletconnect-connector":"6.2.4","@web3-react/walletlink-connector":"6.2.5","jsbi":"^3.1.4","prop-types":"^15.7.2","regenerator-runtime":"^0.13.7","rollup-plugin-image-files":"^1.4.2"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"devDependencies":{"@types/react":"^16.9.49","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^4.1.0","@web3-react/abstract-connector":"^6.0.7","babel-eslint":"^10.1.0","eslint":"^7.8.1","eslint-config-prettier":"^6.9.0","eslint-config-react-app":"^5.2.1","eslint-config-standard":"^14.1.0","eslint-config-standard-react":"^9.2.0","eslint-plugin-flowtype":"^5.2.0","eslint-plugin-import":"^2.20.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-node":"^11.0.0","eslint-plugin-prettier":"^3.1.2","eslint-plugin-promise":"^4.2.1","eslint-plugin-react":"^7.20.6","eslint-plugin-react-hooks":"^4.1.0","eslint-plugin-standard":"^4.0.1","husky":"^4.3.0","prettier":"^2.1.1","tsdx":"^0.14.1","tslib":"^2.0.1","typescript":"^4.0.2"},"peerDependencies":{"react":"^16.13.1 || ^17","react-dom":"^16.13.1 || ^17"},"gitHead":"d1fc990d0bc889be6bda132de18f922154ad4c26","description":"[<img src=\"https://img.shields.io/npm/v/use-wallet\" alt=\"\" />](https://www.npmjs.com/package/use-wallet) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-wallet\" alt=\"\" />](https://bundlephobia.com/result?p=use-wallet)","_id":"@albs1/use-wallet@0.13.6-3","_nodeVersion":"19.4.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-l3NiYe5d01xFt/2DjtmYA1TU7cTkvWYDkb2as0PNNFL2wN0EM4NdszRCgm6j1AquN/eRkeNascn7ARXyU2oYNg==","shasum":"c5be066c039c6b4a73c5c018330ce9b2a913c356","tarball":"https://registry.npmjs.org/@albs1/use-wallet/-/use-wallet-0.13.6-3.tgz","fileCount":26,"unpackedSize":348432,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBlhV+c8iQvzQu3Oc9tFybSkkL2dUJfZL7R6nz6k6kSjAiEAn3yEMygmk8FSvIMtUTjNb2t8gLA4+QQjqB4YAszgo5o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKasnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmosYw//VP9wRx5MnqDcqV9Zk6opgR8dA121+5Dmz4sX04lRuG8bFHGS\r\nTFVF4LRRoWrZxYEB6/IqOl2vC4AMa8ao4LSlUzuhbAiGJ8+m+pCMduFsHG8L\r\ndUNBVPDgA2oP9aQtm+CR0VCYXG+3H9SW8RPtCVEkZCJB/myKMgXf7m8eikv4\r\nAabbTERrx4KLMp0fsw+WLXfnR4tUeuLjnAYx441R5zC9VScBZvUxa9hNBIS6\r\npCrwWtvYJajoMVSx9SLMrx3G+9mBqCxYxHv7UwFvViGxd+S6380KWo4q+znt\r\nEx1vE7KO/60qq0UkdLW4OORnyZ6rfcQP3112scKW4atC9nKhmXGaoagHs2eY\r\nfzlbO/Og+/FNikOk7opPatXlLOcAh+bFZNy9C2r31zshurQVgsJfLa6qKBgP\r\nj27nrEQNk9cUNToz8y5or5LZrF5aMl1ccMP0q/dkCYDXXjcoasZ8itWxoSxx\r\nlj4g0BOKe/qZEJq9BJFiLQxjsUOkdAYX9NaTMDZYmCqwDiY4nm77LXEfkB+Q\r\nlfbCGs3Pq0RcqyskRstwPENG7oeZN3+Uyvg7eQQN+CFxNy7qRGYqS4iT4tOV\r\nancVgruimr/Qjcu+uCohm1/LqIsplERrWQ5k3p6p7XS90WGQKLRg5Dlbru2T\r\nLeA63wzPzds1oEI3/G9e9MpQrVjEpaicYoM=\r\n=Fatg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"albs1","email":"albert@samzdesign.nl"},"directories":{},"maintainers":[{"name":"albs1","email":"albert@samzdesign.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-wallet_0.13.6-3_1680452391693_0.9842983039705071"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-23T12:19:11.679Z","0.13.6-1":"2022-07-23T12:19:11.911Z","modified":"2023-04-02T16:19:52.032Z","0.13.6-2":"2022-10-06T10:18:02.508Z","0.13.6-3":"2023-04-02T16:19:51.910Z"},"maintainers":[{"name":"albs1","email":"albert@samzdesign.nl"}],"description":"[<img src=\"https://img.shields.io/npm/v/use-wallet\" alt=\"\" />](https://www.npmjs.com/package/use-wallet) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-wallet\" alt=\"\" />](https://bundlephobia.com/result?p=use-wallet)","author":{"name":"Albs1"},"license":"MIT","readme":"# 👛 useWallet()\n\n[<img src=\"https://img.shields.io/npm/v/use-wallet\" alt=\"\" />](https://www.npmjs.com/package/use-wallet) [<img src=\"https://img.shields.io/bundlephobia/minzip/use-wallet\" alt=\"\" />](https://bundlephobia.com/result?p=use-wallet)\n\nuseWallet() allows dapp users to connect to the provider of their choice in a way that is as straightforward as possible. It provides a common data structure for any connected account, no matter what provider has been chosen by the user. It aims to provide some features that are often reimplemented by dapp developers: connecting to a wallet, keeping track of transactions, and more (submit a [issue](https://github.com/aragon/use-wallet/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) or PR!).\n\n## Features\n\n- All-in-one solution to connect to Ethereum providers.\n- Completely library agnostic (use Web3.js, ethers.js, …).\n- Provides the current balance.\n- Keeps track of the recent transactions (coming soon).\n\n### Opinionated?\n\nOh yes:\n\n- React only.\n- Ethereum only (for now).\n- Supports one network at a time.\n- Embeds as many providers as possible.\n- Every prop and parameter is optional.\n\n### What useWallet() is not\n\n- An Ethereum wallet implementation.\n- A low-level, fully configurable connection system for Ethereum providers (see [web3-react](https://github.com/NoahZinsmeister/web3-react) if you are after that).\n- An general library to interact with Ethereum (see ethers.js, Web3.js, etc.).\n\n### Used by\n\n- [Aragon client](https://github.com/aragon/aragon)\n- [Aragon’s Court Dashboard](https://github.com/aragon/court-dashboard)\n- [Aragon Voice](https://github.com/vocdoni/bridge-ui/)\n- [Wallets Chat](https://app.wallets.chat/)\n\n- _(Your project!)_\n\n## Usage\n\nAdd it to your project:\n\n```console\nyarn add use-wallet\n```\n\nUse it in your React app:\n\n```jsx\n// App.js\n\nimport React from 'react'\nimport { useWallet, UseWalletProvider } from 'use-wallet'\n\nfunction App() {\n  const wallet = useWallet()\n  const blockNumber = wallet.getBlockNumber()\n\n  return (\n    <>\n      <h1>Wallet</h1>\n      {wallet.status === 'connected' ? (\n        <div>\n          <div>Account: {wallet.account}</div>\n          <div>Balance: {wallet.balance}</div>\n          <button onClick={() => wallet.reset()}>disconnect</button>\n        </div>\n      ) : (\n        <div>\n          Connect:\n          <button onClick={() => wallet.connect()}>MetaMask</button>\n          <button onClick={() => wallet.connect('frame')}>Frame</button>\n          <button onClick={() => wallet.connect('portis')}>Portis</button>\n        </div>\n      )}\n    </>\n  )\n}\n\n// Wrap everything in <UseWalletProvider />\nexport default () => (\n  <UseWalletProvider\n    chainId={1}\n    connectors={{\n      // This is how connectors get configured\n      portis: { dAppId: 'my-dapp-id-123-xyz' },\n    }}\n  >\n    <App />\n  </UseWalletProvider>\n)\n```\n\n## API\n\n### &lt;UseWalletProvider />\n\nThis is the provider component. It should be placed above any component using `useWallet()`. Apart from `children`, it accepts two other props:\n\n#### chainId\n\nThe [Chain ID](https://chainid.network/) supported by the connection. Defaults to 1.\n\n#### connectors\n\nConfiguration for the different connectors. If you use a connector that requires a configuration but do not provide one, an error will be thrown.\n\n- `injected`: no configuration needed.\n- `frame`: no configuration needed.\n- `fortmatic`: `{ apiKey }`\n- `portis`: `{ dAppId }`\n- `provided`: `{ provider }`\n- `authereum`: no configuration needed.\n- `squarelink`: `{ clientId, options }`\n- `walletconnect`: `{ rpc: { 1: 'https://rpc-url', 3: 'https://rpc-url' } }`\n- `walletlink`: `{ url, appName, appLogoUrl }`\n\nSee the [web3-react documentation](https://github.com/NoahZinsmeister/web3-react/tree/v6/docs) for more details.\n\n#### autoConnect\n\nAutomatically connect to wallet on page load. Defaults to false.\n\n### useWallet()\n\nThis is the hook to be used throughout the app.\n\nIt takes an optional object as a single param, containing the following:\n\n- `pollBalanceInterval`: the interval used to poll the wallet balance. Defaults to 2000.\n- `pollBlockNumberInterval`: the interval used to poll the block number. Defaults to 5000.\n\nIt returns an object representing the connected account (“wallet”), containing:\n\n- `account`: the address of the account, or `null` when disconnected.\n- `balance`: the balance of the account, in wei.\n- `chainId`: The specified Chain ID of the network you're connected to.\n- `connect(connectorId)`: call this function with a connector ID to “connect” to a provider (see above for the connectors provided by default).\n- `connector`: The \"key\" of the wallet you're connected to (e.g \"metamask\", \"portis\").\n- `connectors`: the full list of connectors.\n- `error`: contains an error object with the corresponding name and message if `status` is set to `error`.\n- `ethereum`: the connected [Ethereum provider](https://eips.ethereum.org/EIPS/eip-1193).\n- `getBlockNumber()`: this function returns the current block number. This is a function because the block number updates often, which could trigger as many extra renders. Making an explicit call for the block number allows users of `useWallet()` to avoid extra renders when the block number is not needed.\n- `isConnected()`: this function returns whether the wallet is connected.\n- `networkName`: a human-readable name corresponding to the Chain ID.\n- `reset()`: call this function to “disconnect” from the current provider. This will also clean the latest error value stored in `use-wallet`'s state.\n- `status`: contains the current status of the wallet connection. The possible values are:\n  - \"disconnected\": no wallet connected (default state).\n  - \"connecting\": trying to connect to the wallet.\n  - \"connected\": connected to the wallet (i.e. the account is available).\n  - \"error\": a connection error happened.\n- `type`: whether or not the account is a contract. Can be `null` when you're\n  disconnected, or either `\"contract\"` or `\"normal\"`.\n\n## Examples\n\nTo run the examples, switch to the respective directories. Then, simply run `yarn install`\nto install, and `yarn start` to run the examples on `localhost:1234`.\n\n## Special thanks\n\nuseWallet() is a built on [web3-react](https://github.com/NoahZinsmeister/web3-react) and its connectors, which are doing all the hard work internally.\n","readmeFilename":"README.md"}