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§

source

fn lift(&self) -> Result<Semantic<Pk>, Error>

Converts this object into an abstract policy.

Implementations on Foreign Types§

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Arc<Concrete<Pk>>

source§

fn lift(&self) -> Result<Semantic<Pk>, Error>

Implementors§

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Descriptor<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for TapTree<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Concrete<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Semantic<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Bare<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Pkh<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Sh<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Tr<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Wpkh<Pk>

source§

impl<Pk: MiniscriptKey> Liftable<Pk> for Wsh<Pk>

source§

impl<Pk: MiniscriptKey, Ctx: ScriptContext> Liftable<Pk> for Terminal<Pk, Ctx>

source§

impl<Pk: MiniscriptKey, Ctx: ScriptContext> Liftable<Pk> for SortedMultiVec<Pk, Ctx>

source§

impl<Pk: MiniscriptKey, Ctx: ScriptContext> Liftable<Pk> for Miniscript<Pk, Ctx>