[][src]Struct monero::blockdata::transaction::TransactionPrefix

pub struct TransactionPrefix {
    pub version: VarInt,
    pub unlock_time: VarInt,
    pub inputs: Vec<TxIn>,
    pub outputs: Vec<TxOut>,
    pub extra: ExtraField,
}

The part of a transaction that contains all the data except signatures.

Can generate the transaction prefix hash with tx_prefix.hash()

Fields

version: VarInt

Transaction format version

unlock_time: VarInt

UNIX timestamp

inputs: Vec<TxIn>

Array of inputs

outputs: Vec<TxOut>

Array of outputs

extra: ExtraField

Additional data associated with a transaction

Implementations

impl TransactionPrefix[src]

pub fn nb_inputs(&self) -> usize[src]

Return the number of transaction's inputs

pub fn nb_outputs(&self) -> usize[src]

Return the number of transaction's outputs

pub fn tx_pubkey(&self) -> Option<PublicKey>[src]

Return the transaction public key present in extra field

pub fn tx_additional_pubkeys(&self) -> Option<Vec<PublicKey>>[src]

Return the additional public keys present in extra field

pub fn check_outputs(
    &self,
    pair: &ViewPair,
    major: Range<u32>,
    minor: Range<u32>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
[src]

Iterate over transaction outputs and find outputs related to view pair

Trait Implementations

impl Clone for TransactionPrefix[src]

impl Debug for TransactionPrefix[src]

impl<D: Decoder> Decodable<D> for TransactionPrefix[src]

impl Default for TransactionPrefix[src]

impl Display for TransactionPrefix[src]

impl<S: Encoder> Encodable<S> for TransactionPrefix[src]

impl Hashable for TransactionPrefix[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<T> From<T> 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> ToString for T where
    T: Display + ?Sized
[src]

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.