Skip to main content

Import

Usage

Parameters

Return Type: Chain | undefined

The hook returns a Chain object from wagmi’s chain configurations or undefined if the chain is not found.

Properties

id

number The unique identifier of the blockchain network.

name

string The human-readable name of the blockchain network.

network

string The network identifier string.

nativeCurrency

object Information about the chain’s native currency.

rpcUrls

object URLs for connecting to the network’s RPC endpoints.

blockExplorers

object | undefined Information about block explorers for the chain.

Notes

This hook provides easy access to chain configuration information from wagmi’s chain configurations. It’s particularly useful when you need to:
  • Access details about the currently connected chain
  • Get configuration for a specific chain by ID
  • Retrieve chain-specific information like:
    • Network details
    • Native currency information
    • RPC endpoints
    • Block explorer URLs
The hook is commonly used in conjunction with other Sequence hooks when working with transactions, indexer clients, or network-specific features.