pub trait CovOperations: Sized {
// Required methods
fn chk_size(self, len: usize) -> Self;
fn chk_amt(self) -> Self;
fn verify_cov(self, key: &PublicKey) -> Self;
fn post_codesep_script(self) -> Self;
}
Expand description
Additional operations required on script builder for Covenant operations support
Required Methods§
Sourcefn chk_amt(self) -> Self
fn chk_amt(self) -> Self
Assert that the top item is a valid confidential Amount If it starts with 1, the len must be 9, otherwise the len must be 33
Sourcefn verify_cov(self, key: &PublicKey) -> Self
fn verify_cov(self, key: &PublicKey) -> Self
Assuming the 10 sighash components + 1 sig on the top of stack for segwit sighash as created by init_stack CAT all of them and check sig from stack
Sourcefn post_codesep_script(self) -> Self
fn post_codesep_script(self) -> Self
Get the script code for the covenant script assuming the above construction of covenants which uses OP_CODESEP
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.