normalizeDomain

Normalizes a domain name for did:web.

Converts domain to lowercase and validates format. The domain may include a port (example.com:8080); the port separator is percent-encoded by buildWebDid when the DID identifier is constructed.

Return

Normalized domain name

Parameters

domain

The domain name

Throws

if domain is invalid