Struct cashweb::bitcoin::transaction::Transaction[][src]

pub struct Transaction {
    pub version: u32,
    pub inputs: Vec<Input, Global>,
    pub outputs: Vec<Output, Global>,
    pub lock_time: u32,
}

Represents a transaction.

Fields

version: u32inputs: Vec<Input, Global>outputs: Vec<Output, Global>lock_time: u32

Implementations

impl Transaction[src]

pub fn transaction_id_le(&self) -> [u8; 32][src]

Calculate the transaction ID in little-endian format. This is the double SHA256 digest of the raw transaction.

Note that typically the transaction ID are big-endian encoded.

pub fn transaction_id(&self) -> [u8; 32][src]

Calculate the transaction ID. This is the double SHA256 digest of the raw transaction in big-endian encoding.

pub fn signature_hash(
    &self,
    input_index: usize,
    script_pubkey: Script,
    sig_hash_type: SignatureHashType
) -> Option<[u8; 32]>
[src]

Calculate signature hash of a specific input.

Trait Implementations

impl Clone for Transaction[src]

impl Debug for Transaction[src]

impl Decodable for Transaction[src]

type Error = DecodeError

Error associated with decoding a Bitcoin structure.

impl Default for Transaction[src]

impl Encodable for Transaction[src]

impl Eq for Transaction[src]

impl PartialEq<Transaction> for Transaction[src]

impl StructuralEq for Transaction[src]

impl StructuralPartialEq for Transaction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,