Trait Controller

Source
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§

Source

fn controlled_did(&self) -> &str

Returns the DID controlled by this controller.

Source

fn to_attestor(&self) -> Box<dyn Attestor>

Converts this controller into an attestor.

Source

fn update_key(&self) -> Result<JWK, KeyManagerError>

Retrieves the update key.

Source

fn next_update_key(&self) -> Result<Option<JWK>, KeyManagerError>

Retrieves the next update key.

Source

fn recovery_key(&self) -> Result<JWK, KeyManagerError>

Retrieves the recovery key.

Source

fn generate_next_update_key(&self) -> Result<(), KeyManagerError>

Generates a new update key.

Provided Methods§

Source

fn controlled_did_suffix(&self) -> &str

Returns the suffix of the DID controlled by this controller.

Implementors§