Skip to main content

Verifier

Trait Verifier 

Source
pub trait Verifier {
    // Required method
    fn verify(
        &self,
        script_pubkeys: &HashMap<usize, ScriptBuf>,
        tx_to: &Transaction,
        spent_outputs: &[TxOut],
    ) -> Result<(), Error>;
}
Expand description

Trait to abstract the behavior of the bitcoin script verifier, allowing users to provide their own verifier.

Required Methods§

Source

fn verify( &self, script_pubkeys: &HashMap<usize, ScriptBuf>, tx_to: &Transaction, spent_outputs: &[TxOut], ) -> Result<(), Error>

Verify one or more scripts in a bitcoin transaction.

§Arguments
  • script_pubkeys - The scriptPubKeys to verify (by index).
  • tx_to - The transaction with emulated witness data.
  • spent_outputs - The outputs being spent by the transaction.
§Errors

Returns Error if verification fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§