Trait PublicKey

Source
pub trait PublicKey: WithMulticodec {
    // Required methods
    fn as_did_bytes(&self) -> Box<[u8]>;
    fn to_jwk(&self) -> Jwk;

    // Provided method
    fn to_did(&self) -> Did { ... }
}

Required Methods§

Source

fn as_did_bytes(&self) -> Box<[u8]>

Read the public key as DID-ready bytes. This may be different from the raw public key bytes, as some algorithms require compression. https://w3c-ccg.github.io/did-method-key/#signature-method-creation-algorithm

Source

fn to_jwk(&self) -> Jwk

Provided Methods§

Source

fn to_did(&self) -> Did

Implementors§