normalizeChainId
Normalizes a chain ID to a number.
Import
ts
import { normalizeChainId } from '@wagmi/core'
Usage
Deprecated
Use Number
instead.
ts
import { normalizeChainId } from '@wagmi/core'
const chainId = normalizeChainId(123n)
const chainId = Number(123n)
ts
import { normalizeChainId } from '@wagmi/core'
const result = normalizeChainId('0x1')
Parameters
chainId
bigint | number | string
The chain ID to normalize.
ts
import { normalizeChainId } from '@wagmi/core'
normalizeChainId(1n)
normalizeChainId(1)
normalizeChainId('0x1')
Return Type
number
The normalized chain ID.