pub trait HandshakeTransaction: Transaction {
    type WTXID: MarkedDigestOutput;
    type Witness;

    fn new<I, O, W>(
        version: u32,
        vin: I,
        vout: O,
        witnesses: W,
        locktime: u32
    ) -> Result<Self, Self::TxError>
    where
        I: Into<Vec<Self::TxIn>>,
        O: Into<Vec<Self::TxOut>>,
        W: Into<Vec<Self::Witness>>,
        Self: Sized
; fn wtxid(&self) -> Self::WTXID; fn write_txid_preimage<W: Write>(
        &self,
        writer: &mut W
    ) -> Result<usize, Self::Error>; fn write_wtxid_preimage<W: Write>(
        &self,
        writer: &mut W
    ) -> Result<usize, Self::Error>; fn signature_hash(
        &self,
        args: &Self::SighashArgs
    ) -> Result<Blake2b256Digest, Self::TxError> { ... } }
Expand description

Trait that describes a Handshake Transaction

Required Associated Types

The MarkedDigest type for the Transaction’s Witness TXID

A type that represents this transactions per-input Witness.

Required Methods

Instantiate a new WitnessTx from the arguments.

Calculates the witness txid of the transaction.

Computes the txid preimage.

Computes the wtxid preimage.

Provided Methods

Calculates the BIP143 sighash given the sighash args. See the WitnessSighashArgsSigh documentation for more in-depth discussion of sighash.

Implementors