parse

fun parse(chainId: String): ChainId?

Parses a chain ID string into a type-safe ChainId.

Attempts to match against predefined chain IDs first, then falls back to Custom.

Return

The corresponding ChainId, or null if invalid

Parameters

chainId

The chain ID string