Signable

Trait Signable 

Source
pub trait Signable: Hashable {
    // Required method
    fn calculate_sign_hash(
        &self,
        chain_id: &str,
        quorum_type: u8,
        quorum_hash: &[u8; 32],
        height: i64,
        round: i32,
    ) -> Result<Vec<u8>, Error>;

    // Provided method
    fn sign_digest(
        &self,
        chain_id: &str,
        quorum_type: u8,
        quorum_hash: &[u8; 32],
        height: i64,
        round: i32,
    ) -> Result<Vec<u8>, Error> { ... }
}
Expand description

Object that can be signed/verified by Tenderdash.

Required Methods§

Source

fn calculate_sign_hash( &self, chain_id: &str, quorum_type: u8, quorum_hash: &[u8; 32], height: i64, round: i32, ) -> Result<Vec<u8>, Error>

Returns message hash that should be provided directly to a signing/verification function.

Provided Methods§

Source

fn sign_digest( &self, chain_id: &str, quorum_type: u8, quorum_hash: &[u8; 32], height: i64, round: i32, ) -> Result<Vec<u8>, Error>

👎Deprecated: replaced by calculate_sign_hash() to unify naming between core, platform and tenderdash

Implementations on Foreign Types§

Source§

impl Signable for CanonicalVote

Source§

fn calculate_sign_hash( &self, chain_id: &str, quorum_type: u8, quorum_hash: &[u8; 32], height: i64, round: i32, ) -> Result<Vec<u8>, Error>

Source§

impl Signable for Commit

Source§

fn calculate_sign_hash( &self, chain_id: &str, quorum_type: u8, quorum_hash: &[u8; 32], height: i64, round: i32, ) -> Result<Vec<u8>, Error>

Source§

impl Signable for VoteExtension

Source§

fn calculate_sign_hash( &self, chain_id: &str, quorum_type: u8, quorum_hash: &[u8; 32], height: i64, round: i32, ) -> Result<Vec<u8>, Error>

Implementors§