Parse a `did:atomic:` identifier back into an id.
(did: &str)
| 111 | |
| 112 | /// Parse a `did:atomic:` identifier back into an id. |
| 113 | pub fn from_did(did: &str) -> Result<Self, IdentityError> { |
| 114 | let raw = did.strip_prefix(DID_ATOMIC_PREFIX).ok_or_else(|| { |
| 115 | IdentityError::InvalidKey(format!("not a {DID_ATOMIC_PREFIX} identifier: {did}")) |
| 116 | })?; |
| 117 | Self::from_base32(raw) |
| 118 | } |
| 119 | |
| 120 | /// Does this id correspond to `public_key`? |
| 121 | pub fn matches_public_key(&self, public_key: &PublicKey) -> bool { |
nothing calls this directly
no outgoing calls
no test coverage detected