Validates whether a Chain object represents a supported Vana network.
The chain object to validate
true if the chain is a supported Vana network, false otherwise
true
false
Type guard for validating viem Chain objects as Vana chains. Ensures both type safety and runtime validation for chain compatibility.
import { mainnet, mokshaTestnet } from 'viem/chains';if (isVanaChain(chain)) { // TypeScript knows this is a VanaChain console.log(`Connected to Vana network: ${chain.id}`);} else { console.error('Please connect to a Vana network');} Copy
import { mainnet, mokshaTestnet } from 'viem/chains';if (isVanaChain(chain)) { // TypeScript knows this is a VanaChain console.log(`Connected to Vana network: ${chain.id}`);} else { console.error('Please connect to a Vana network');}
Validates whether a Chain object represents a supported Vana network.