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§

source

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.

source

fn sign( &self, b: PartiallySignedTransaction ) -> Result<PartiallySignedTransaction, EmulatorError>

Adds the Emulators signature to the PSBT, if any.

Implementors§