Skip to main content

Signer

Trait Signer 

Source
pub trait Signer {
    // Required methods
    fn public_key(&self) -> [u8; 32];
    fn sign(&self, msg: &SigningMessage) -> Result<[u8; 64], SignError>;
}
Expand description

An Ed25519 signer over an opaque SigningMessage. Implementations must sign msg.as_bytes() with standard RFC-8032 Ed25519 and return the raw 64 bytes.

Required Methods§

Source

fn public_key(&self) -> [u8; 32]

The 32-byte public key (== the Thru address) this signer produces.

Source

fn sign(&self, msg: &SigningMessage) -> Result<[u8; 64], SignError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§