JSPM

wagmi

0.3.0-next.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 302540
  • Score
    100M100P100Q162443F
  • License MIT

React Hooks for Ethereum

Package Exports

  • wagmi
  • wagmi/connectors/coinbaseWallet
  • wagmi/connectors/injected
  • wagmi/connectors/walletConnect
  • wagmi/package.json

Readme

wagmi Version Downloads Sponsors

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

  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

Support

Thanks

License

MIT.


wagmi frens