pub trait Satisfier<Pk: ToXOnlyPubkey> {
// Provided methods
fn lookup_tap_leaf_script_sig(
&self,
_: &Pk,
_: &TapLeafHash,
) -> Option<SchnorrSig> { ... }
fn lookup_sha256(&self, _: &Pk::Sha256) -> Option<Preimage32> { ... }
fn check_older(&self, _: Sequence) -> bool { ... }
fn check_after(&self, _: LockTime) -> bool { ... }
fn lookup_asm_program(&self, _: Cmr) -> Option<Arc<ConstructNode<Elements>>> { ... }
}
Expand description
Lookup table for signatures, hash preimages, etc.
Every method has a default implementation that simply returns None
on every query. Users are expected to override the methods that they
have data for.
Provided Methods§
Sourcefn lookup_tap_leaf_script_sig(
&self,
_: &Pk,
_: &TapLeafHash,
) -> Option<SchnorrSig>
fn lookup_tap_leaf_script_sig( &self, _: &Pk, _: &TapLeafHash, ) -> Option<SchnorrSig>
Given a public key, look up a Schnorr signature with that key.
Sourcefn lookup_sha256(&self, _: &Pk::Sha256) -> Option<Preimage32>
fn lookup_sha256(&self, _: &Pk::Sha256) -> Option<Preimage32>
Given a SHA256 hash, look up its preimage.
Sourcefn check_older(&self, _: Sequence) -> bool
fn check_older(&self, _: Sequence) -> bool
Assert that a relative lock time is satisfied.
Sourcefn check_after(&self, _: LockTime) -> bool
fn check_after(&self, _: LockTime) -> bool
Assert that an absolute lock time is satisfied.
Sourcefn lookup_asm_program(&self, _: Cmr) -> Option<Arc<ConstructNode<Elements>>>
fn lookup_asm_program(&self, _: Cmr) -> Option<Arc<ConstructNode<Elements>>>
Given a CMR, look up a matching assembly program.
§Successful execution
It is the responsibility of the implementor to ensure that the returned assembly program has sufficient witness data to successfully run on the Bit Machine.
The execution of a program depends on the transaction environment, so implementations should compute witness data based on that.
If the assembly program fails to run for the current transaction environment,
then implementations should return None
.