dcl_crypto::account

Trait Signer

Source
pub trait Signer {
    // Required methods
    fn address(&self) -> Address;
    fn sign<M: AsRef<[u8]>>(&self, message: M) -> PersonalSignature;
}
Expand description

A trait for signing messages with an associated address.

Required Methods§

Source

fn address(&self) -> Address

Return the address of the signer.

Source

fn sign<M: AsRef<[u8]>>(&self, message: M) -> PersonalSignature

Sign a message with the Address’s private key.

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.

Implementors§

Source§

impl Signer for Identity

Implements Signer trait for Identity

Source§

impl Signer for Account