Validates that a chain ID string follows CAIP-2 format.
Parses a chain ID string into a type-safe ChainId.