validateDid

Validates a DID string format.

Example:

validateDid("did:key:123")  // returns true
validateDid("invalid") // returns false

Return

true if the DID format is valid, false otherwise

Parameters

did

The DID string to validate