pub trait SignatureVerifier: Send + Sync {
// Required methods
fn validate_compact_signature(
&self,
signature: &[u8; 64],
) -> Result<(), ScriptError>;
fn verify(
&self,
message: &[u8; 32],
signature: &[u8; 64],
public_key: &[u8; 33],
) -> Result<bool, ScriptError>;
// Provided method
fn is_consensus_complete(&self) -> bool { ... }
}Expand description
Pluggable compact-secp256k1 verifier used by the runtime-independent interpreter. Implementations must enforce HSD’s low-S encoding rule.
Required Methods§
fn validate_compact_signature( &self, signature: &[u8; 64], ) -> Result<(), ScriptError>
fn verify( &self, message: &[u8; 32], signature: &[u8; 64], public_key: &[u8; 33], ) -> Result<bool, ScriptError>
Provided Methods§
fn is_consensus_complete(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".