pub fn account_name(did: &str, handle: Option<&str>) -> StringExpand description
How a person reads an account’s name in a command’s output.
A did:web is its hostname. Any other DID is @handle when handle is
one the caller verified both ways, and the DID itself when it is not.
use didbot_identity::did::account_name;
assert_eq!(account_name("did:web:kestrel.pds.example", None), "kestrel.pds.example");
assert_eq!(account_name("did:web:localhost%3A3000", None), "localhost:3000");
assert_eq!(account_name("did:plc:abc", Some("operator.example")), "@operator.example");
assert_eq!(account_name("did:plc:abc", None), "did:plc:abc");