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

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

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

As transaction prefix implements hash::Hashable it is possible to generate the transaction prefix hash with tx_prefix.hash().

Fields

version: VarInt

Transaction format version.

unlock_time: VarInt

The transaction can not be spend until after a certain number of blocks, or until a certain time.

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 Decodable for TransactionPrefix[src]

impl Default for TransactionPrefix[src]

impl<'de> Deserialize<'de> for TransactionPrefix[src]

impl Display for TransactionPrefix[src]

impl Encodable for TransactionPrefix[src]

impl Hashable for TransactionPrefix[src]

impl Serialize for TransactionPrefix[src]

impl StrictDecode for TransactionPrefix[src]

This is supported on crate feature strict_encoding_support only.

impl StrictEncode for TransactionPrefix[src]

This is supported on crate feature strict_encoding_support only.

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.