Web3IdSigner

Trait Web3IdSigner 

Source
pub trait Web3IdSigner {
    // Required methods
    fn id(&self) -> VerifyingKey;
    fn sign(&self, msg: &impl AsRef<[u8]>) -> Signature;
}
Expand description

An auxiliary trait that provides access to the owner of the Web3 verifiable credential. The intention is that this is implemented by ed25519 keypairs or hardware wallets.

Required Methods§

Source

fn id(&self) -> VerifyingKey

Source

fn sign(&self, msg: &impl AsRef<[u8]>) -> Signature

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Web3IdSigner for SigningKey

Source§

fn id(&self) -> VerifyingKey

Source§

fn sign(&self, msg: &impl AsRef<[u8]>) -> Signature

Source§

impl Web3IdSigner for [u8; 32]

Source§

fn id(&self) -> VerifyingKey

Source§

fn sign(&self, msg: &impl AsRef<[u8]>) -> Signature

Implementors§