Skip to main content

SignerExt

Trait SignerExt 

Source
pub trait SignerExt: Send + Sync {
    // Required method
    fn sign(&self, hash: &[u8; 32]) -> Result<Vec<u8>, SignError>;
}
Expand description

Trait for signers.

This trait is defined here to avoid circular dependencies. It mirrors the Signer trait from txgate-crypto.

Required Methods§

Source

fn sign(&self, hash: &[u8; 32]) -> Result<Vec<u8>, SignError>

Sign a 32-byte hash.

Returns the signature as a Vec<u8>. For secp256k1, this is 65 bytes: r (32) || s (32) || v (1).

§Errors

Returns SignError if signing fails.

Implementors§