Trait emulator_connect::CTVEmulator [−][src]
pub trait CTVEmulator: Sync + Send {
fn get_signer_for(
&self,
h: Hash
) -> Result<Policy<PublicKey>, 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
fn get_signer_for(&self, h: Hash) -> Result<Policy<PublicKey>, EmulatorError>
fn get_signer_for(&self, h: Hash) -> Result<Policy<PublicKey>, EmulatorError>
For a given transaction hash, gets the corresponding Clause that the Emulator would satisfy.
fn sign(
&self,
b: PartiallySignedTransaction
) -> Result<PartiallySignedTransaction, EmulatorError>
fn sign(
&self,
b: PartiallySignedTransaction
) -> Result<PartiallySignedTransaction, EmulatorError>
Adds the Emulators signature to the PSBT, if any.