normalizeChainId ​
Normalizes a chain ID to a number.
Import ​
ts
import { normalizeChainId } from '@wagmi/core'
import { normalizeChainId } from '@wagmi/core'
Usage ​
ts
import { normalizeChainId } from '@wagmi/core'
const result = normalizeChainId('0x1')
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')
import { normalizeChainId } from '@wagmi/core'
normalizeChainId(1n)
normalizeChainId(1)
normalizeChainId('0x1')
Return Type ​
number
The normalized chain ID.