wagmi

​Documentation for wagmi

Initialization

import { configureChains, createClient } from 'wagmi'
import { goerli, mainnet } from 'wagmi/chains'
import { publicProvider } from 'wagmi/providers/public'
import { VenlyConnector } from '@venly/wagmi-connector'
​
const { chains, provider } = configureChains(
[goerli, mainnet],
[publicProvider()],
)
​
export const client = createClient({
connectors: [
new VenlyConnector({
chains,
options: {
clientId: 'YOUR_CLIENT_ID', //https://docs.venly.io/widget/deep-dive/authentication#client-id
environment: 'staging', //optional, defaults to production
},
}),
],
provider,
autoConnect: true,
})