Struct wownero::blockdata::transaction::TransactionPrefix
source · [−]pub struct TransactionPrefix {
pub version: VarInt,
pub unlock_time: VarInt,
pub inputs: Vec<TxIn>,
pub outputs: Vec<TxOut>,
pub extra: ExtraField,
}
Expand description
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
sourceimpl TransactionPrefix
impl TransactionPrefix
sourcepub fn nb_outputs(&self) -> usize
pub fn nb_outputs(&self) -> usize
Return the number of transaction’s outputs.
sourcepub fn tx_pubkey(&self) -> Option<PublicKey>
pub fn tx_pubkey(&self) -> Option<PublicKey>
Return the transaction public key present in extra field.
sourcepub fn tx_additional_pubkeys(&self) -> Option<Vec<PublicKey>>
pub fn tx_additional_pubkeys(&self) -> Option<Vec<PublicKey>>
Return the additional public keys present in extra field.
sourcepub fn check_outputs(
&self,
pair: &ViewPair,
major: Range<u32>,
minor: Range<u32>,
rct_sig_base: Option<&RctSigBase>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
pub fn check_outputs(
&self,
pair: &ViewPair,
major: Range<u32>,
minor: Range<u32>,
rct_sig_base: Option<&RctSigBase>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
Iterate over transaction outputs and find outputs related to view pair.
sourcepub fn check_outputs_with(
&self,
checker: &SubKeyChecker<'_>,
rct_sig_base: Option<&RctSigBase>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
pub fn check_outputs_with(
&self,
checker: &SubKeyChecker<'_>,
rct_sig_base: Option<&RctSigBase>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
Iterate over transaction outputs using the provided SubKeyChecker
to find outputs
related to the SubKeyChecker
’s view pair.
Trait Implementations
sourceimpl Clone for TransactionPrefix
impl Clone for TransactionPrefix
sourcefn clone(&self) -> TransactionPrefix
fn clone(&self) -> TransactionPrefix
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TransactionPrefix
impl Debug for TransactionPrefix
sourceimpl Decodable for TransactionPrefix
impl Decodable for TransactionPrefix
sourcefn consensus_decode<D: Read>(d: &mut D) -> Result<TransactionPrefix, Error>
fn consensus_decode<D: Read>(d: &mut D) -> Result<TransactionPrefix, Error>
Decode an object with a well-defined format.
sourceimpl Default for TransactionPrefix
impl Default for TransactionPrefix
sourcefn default() -> TransactionPrefix
fn default() -> TransactionPrefix
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for TransactionPrefix
impl<'de> Deserialize<'de> for TransactionPrefix
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for TransactionPrefix
impl Display for TransactionPrefix
sourceimpl Encodable for TransactionPrefix
impl Encodable for TransactionPrefix
sourceimpl Hashable for TransactionPrefix
impl Hashable for TransactionPrefix
sourcefn hash_to_scalar(&self) -> PrivateKey
fn hash_to_scalar(&self) -> PrivateKey
sourceimpl PartialEq<TransactionPrefix> for TransactionPrefix
impl PartialEq<TransactionPrefix> for TransactionPrefix
sourcefn eq(&self, other: &TransactionPrefix) -> bool
fn eq(&self, other: &TransactionPrefix) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TransactionPrefix) -> bool
fn ne(&self, other: &TransactionPrefix) -> bool
This method tests for !=
.
sourceimpl Serialize for TransactionPrefix
impl Serialize for TransactionPrefix
impl StructuralPartialEq for TransactionPrefix
Auto Trait Implementations
impl RefUnwindSafe for TransactionPrefix
impl Send for TransactionPrefix
impl Sync for TransactionPrefix
impl Unpin for TransactionPrefix
impl UnwindSafe for TransactionPrefix
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more