Trait emulator_connect::CTVEmulator
source · pub trait CTVEmulator: Sync + Send {
// Required methods
fn get_signer_for(
&self,
h: Hash
) -> Result<Policy<XOnlyPublicKey>, EmulatorError>;
fn sign(
&self,
b: PartiallySignedTransaction
) -> Result<PartiallySignedTransaction, EmulatorError>;
}
Expand description
CTVEmulator
trait is used to make the method in which CheckTemplateVerify
is stubbed out with.
Required Methods§
sourcefn get_signer_for(
&self,
h: Hash
) -> Result<Policy<XOnlyPublicKey>, EmulatorError>
fn get_signer_for( &self, h: Hash ) -> Result<Policy<XOnlyPublicKey>, EmulatorError>
For a given transaction hash, gets the corresponding Clause that the Emulator would satisfy.
sourcefn sign(
&self,
b: PartiallySignedTransaction
) -> Result<PartiallySignedTransaction, EmulatorError>
fn sign( &self, b: PartiallySignedTransaction ) -> Result<PartiallySignedTransaction, EmulatorError>
Adds the Emulators signature to the PSBT, if any.