Nuxt
Nuxt Module for Wagmi. Adds all Composables as auto-imports.
Usage
ts
import { defineNuxtConfig } from 'nuxt/config'
export default defineNuxtConfig({
modules: ['@wagmi/vue/nuxt'],
})
vue
<script setup lang="ts">
// No need to import `useAccount`!
const account = useAccount()
</script>
<template>
Address: {{ account.address }}
</template>
ts
import { http, createConfig } from '@wagmi/vue'
import { mainnet, sepolia } from '@wagmi/vue/chains'
export const config = createConfig({
chains: [mainnet, sepolia],
transports: {
[mainnet.id]: http(),
[sepolia.id]: http(),
},
})