pub trait Controller {
// Required methods
fn controlled_did(&self) -> &str;
fn to_attestor(&self) -> Box<dyn Attestor>;
fn update_key(&self) -> Result<JWK, KeyManagerError>;
fn next_update_key(&self) -> Result<Option<JWK>, KeyManagerError>;
fn recovery_key(&self) -> Result<JWK, KeyManagerError>;
fn generate_next_update_key(&self) -> Result<(), KeyManagerError>;
// Provided method
fn controlled_did_suffix(&self) -> &str { ... }
}
Expand description
A DID controller.
Required Methods§
Sourcefn controlled_did(&self) -> &str
fn controlled_did(&self) -> &str
Returns the DID controlled by this controller.
Sourcefn to_attestor(&self) -> Box<dyn Attestor>
fn to_attestor(&self) -> Box<dyn Attestor>
Converts this controller into an attestor.
Sourcefn update_key(&self) -> Result<JWK, KeyManagerError>
fn update_key(&self) -> Result<JWK, KeyManagerError>
Retrieves the update key.
Sourcefn next_update_key(&self) -> Result<Option<JWK>, KeyManagerError>
fn next_update_key(&self) -> Result<Option<JWK>, KeyManagerError>
Retrieves the next update key.
Sourcefn recovery_key(&self) -> Result<JWK, KeyManagerError>
fn recovery_key(&self) -> Result<JWK, KeyManagerError>
Retrieves the recovery key.
Sourcefn generate_next_update_key(&self) -> Result<(), KeyManagerError>
fn generate_next_update_key(&self) -> Result<(), KeyManagerError>
Generates a new update key.
Provided Methods§
Sourcefn controlled_did_suffix(&self) -> &str
fn controlled_did_suffix(&self) -> &str
Returns the suffix of the DID controlled by this controller.