Expand description
Input validation for AT Protocol handles and DIDs.
Provides validation functions for various identifier formats used in the AT Protocol ecosystem including handles, hostnames, and DID identifiers. Follows RFC standards for hostname validation and AT Protocol specifications for handle formats.
Functionsยง
- is_
valid_ did_ method_ plc - Validates if a string is a properly formatted PLC DID. Checks for correct prefix and 24-character identifier length.
- is_
valid_ handle - Validates and normalizes an AT Protocol handle. Returns the normalized handle if valid, None otherwise.
- is_
valid_ hostname - Validates if a string is a valid hostname according to RFC 1035. Checks length limits, reserved TLDs, and character validity.