pub trait Liftable<Pk: MiniscriptKey> {
// Required method
fn lift(&self) -> Result<Semantic<Pk>, Error>;
}Expand description
Trait describing script representations which can be lifted into an abstract policy, by discarding information.
After Lifting all policies are converted into KeyHash(Pk::HasH) to
maintain the following invariant(modulo resource limits):
Lift(Concrete) == Concrete -> Miniscript -> Script -> Miniscript -> Semantic
Lifting from Miniscript or Descriptor can fail if the miniscript
contains a timelock combination or if it contains a branch that exceeds
resource limits.
Lifting from concrete policies can fail if the policy contains a timelock combination. It is possible that a concrete policy has some branches that exceed resource limits for any compilation but cannot detect such policies while lifting. Note that our compiler would not succeed for any such policies.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".