parse

fun parse(raw: String): DidOrUrl

Parses a string into AsDid if it is a valid DID, otherwise as AsUrl if it is a valid absolute URI.

Throws

if the string is blank or neither a valid DID nor a valid absolute URI.