Skip to content

samburgers/wagmi

This branch is 1553 commits behind wevm/wagmi:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f3e1c33 Β· Feb 14, 2022
Feb 14, 2022
Jan 29, 2022
Dec 21, 2021
Dec 23, 2021
Dec 23, 2021
Feb 14, 2022
Feb 14, 2022
Feb 14, 2022
Jan 12, 2022
Dec 23, 2021
Dec 27, 2021
Jan 3, 2022
Dec 27, 2021
Dec 28, 2021
Dec 21, 2021
Dec 26, 2021
Jan 16, 2022
Jan 4, 2022
Feb 14, 2022
Dec 27, 2021
Jan 1, 2022
Jan 16, 2022
Feb 14, 2022
Dec 22, 2021
Dec 21, 2021

Repository files navigation

wagmi

React Hooks library for Ethereum, built on ethers.js.

πŸš€   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-xyz.vercel.app to view the full documentation.

Usage

  1. Install the dependencies.
npm add wagmi ethers
  1. Wrap your app with the Provider component.
import { Provider } from 'wagmi'

const App = () => (
  <Provider>
    <YourRoutes />
  </Provider>
)
  1. 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

Feel free to join the discussions on GitHub or reach out on Twitter!

Support

Thanks

License

MIT.


wagmi

About

React Hooks library for Ethereum

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.9%
  • JavaScript 1.1%