Skip to content

Installation ​

Install Wagmi via your package manager, a <script> tag, or build from source.

Package Manager ​

Install the required packages.

bash
pnpm add @wagmi/vue viem@2.x @tanstack/vue-query
bash
npm install @wagmi/vue viem@2.x @tanstack/vue-query
bash
yarn add @wagmi/vue viem@2.x @tanstack/vue-query
bash
bun add @wagmi/vue viem@2.x @tanstack/vue-query
  • Viem is a TypeScript interface for Ethereum that performs blockchain operations.
  • TanStack Query is an async state manager that handles requests, caching, and more.
  • TypeScript is optional, but highly recommended. Learn more about TypeScript support.

Requirements ​

Wagmi is optimized for modern browsers. It is compatible with the following browsers.

  • Chrome 64+
  • Edge 79+
  • Firefox 67+
  • Opera 51+
  • Safari 12+

TIP

Depending on your environment, you might need to add polyfills. See Viem Platform Compatibility for more info.

Using Unreleased Commits ​

If you can't wait for a new release to test the latest features, you can either install from the canary tag (tracks the main branch).

bash
pnpm add @wagmi/vue@canary
bash
npm install @wagmi/vue@canary
bash
yarn add @wagmi/vue@canary
bash
bun add @wagmi/vue@canary

Or clone the Wagmi repo to your local machine, build, and link it yourself.

bash
gh repo clone wevm/wagmi
cd wagmi
pnpm install
pnpm build
cd packages/vue
pnpm link --global

Then go to the project where you are using Wagmi and run pnpm link --global @wagmi/vue (or the package manager that you used to link Wagmi globally). Make sure you installed the required peer dependencies and their versions are correct.

Security ​

Ethereum-related projects are often targeted in attacks to steal users' assets. Make sure you follow security best-practices for your project. Some quick things to get started.

Released under the MIT License.