Management API Reference

Wagmi configuration

Configure Wagmi

Openfort Kit uses wagmi internally and therefore it's possible to use hooks from wagmi to fetch data such as info about the connected account.

Here is an example of how you can set up the wagmi configuration:


_23
const config = createConfig(
_23
getDefaultConfig({
_23
// Your dApps chains
_23
chains: [mainnet],
_23
transports: {
_23
// RPC URL for each chain
_23
[mainnet.id]: http(
_23
`https://eth-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_ID}`,
_23
),
_23
},
_23
_23
// Required API Keys
_23
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
_23
_23
// Required App Info
_23
appName: "Your App Name",
_23
_23
// Optional App Info
_23
appDescription: "Your App Description",
_23
appUrl: "https://openfort.xyz", // your app's url
_23
appIcon: "https://openfort.xyz/logo.png", // your app's icon, no bigger than 1024x1024px (max. 1MB)
_23
}),
_23
);