pub trait Verifier {
    // Required method
    fn verify(
        &self,
        script_pubkey: &[u8],
        amount: Option<i64>,
        tx_to: &[u8],
        input_index: u32,
        flags: Option<u32>,
        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§
Sourcefn verify(
    &self,
    script_pubkey: &[u8],
    amount: Option<i64>,
    tx_to: &[u8],
    input_index: u32,
    flags: Option<u32>,
    spent_outputs: &[TxOut],
) -> Result<(), Error>
 
fn verify( &self, script_pubkey: &[u8], amount: Option<i64>, tx_to: &[u8], input_index: u32, flags: Option<u32>, spent_outputs: &[TxOut], ) -> Result<(), Error>
Verify a bitcoin script, mirroring the API of bitcoinkernel::verify.
§Arguments
- script_pubkey- The script public key to verify.
- amount- The amount of the input being spent.
- tx_to- The transaction containing the script.
- input_index- The index of the input to verify.
- flags- Script verification flags.
- spent_outputs- The outputs being spent by the transaction.
§Errors
Returns Error if verification fails.