Package Exports
- wagmi
- wagmi/connectors/coinbaseWallet
- wagmi/connectors/injected
- wagmi/connectors/walletConnect
- wagmi/package.json
Readme
wagmi

React Hooks for Ethereum
wagmi is a collection of React Hooks containing everything you need to start working with Ethereum. wagmi makes it easy to "Connect Wallet," display ENS and balance information, sign messages, interact with contracts, and much more βΒ all with caching, request deduplication, and persistence.
Features
- π 20+ hooks for working with wallets, ENS, contracts, transactions, signing, etc.
- πΌ Built-in wallet connectors for MetaMask, WalletConnect, and Coinbase Wallet
- π Auto-refresh data on wallet and network changes
- π¦ TypeScript ready
- π¨ Zero-dependencies (besides ethers.js peer dependency)
- π³ Test suite and documentation
- π MIT License
Documentation
Visit https://wagmi.sh to view the full documentation.
Usage
- Install the dependencies.
npm add wagmi ethers
- Wrap your app with the
Provider
component.
import { Provider } from 'wagmi'
const App = () => (
<Provider>
<YourRoutes />
</Provider>
)
- Use hooks.
import { useAccount } from 'wagmi'
const Page = () => {
const [{ data, error, loading }, disconnect] = useAccount({
fetchEns: true,
})
return ...
}
Every component inside the Provider
is set up with the default InjectedConnector
for connecting wallets and ethers.js Default Provider for fetching data.
Want to learn more? Check out the guides or browse the API docs.
Community
- Join the discussions on GitHub
- Follow @awkweb on Twitter for project updates
- Sign the guestbook
- Share your project/organization that uses wagmi
Support
- awkweb.eth
- GitHub Sponsors
- Gitcoin Grant
Thanks
- ricmoo.eth for creating and continued work on ethers.js
- Mirror for creating space to do good work
License
MIT.
wagmi frens