Skip to main content

Satisfier

Trait Satisfier 

Source
pub trait Satisfier {
    // Required methods
    fn check_older(&self, locktime: u32) -> Option<bool>;
    fn check_after(&self, locktime: u32) -> Option<bool>;
    fn sign(&self, pubkey: &KeyToken) -> Option<(Vec<u8>, bool)>;
    fn preimage(
        &self,
        hash_func: HashFunc,
        hash: &[u8],
    ) -> Option<(Vec<u8>, bool)>;
}

Required Methods§

Source

fn check_older(&self, locktime: u32) -> Option<bool>

CheckOlder checks if the OP_CHECKSEQUENCEVERIFY call is satisfied in the context of a transaction.

Source

fn check_after(&self, locktime: u32) -> Option<bool>

CheckAfter checks if the OP_CHECKLOCKTIMEVERIFY call is satisfied in the context of a transaction.

Source

fn sign(&self, pubkey: &KeyToken) -> Option<(Vec<u8>, bool)>

Sign generates a signature for the given public key.

Source

fn preimage(&self, hash_func: HashFunc, hash: &[u8]) -> Option<(Vec<u8>, bool)>

Preimage returns the preimage of the hash value. hashFunc is one of “sha256”, “ripemd160”, “hash256”, “hash160”.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§