Struct wownero::blockdata::transaction::Transaction
source · [−]pub struct Transaction {
pub prefix: TransactionPrefix,
pub signatures: Vec<Vec<Signature>>,
pub rct_signatures: RctSig,
}
Expand description
A full transaction containing the prefix and all the signing data.
As transaction implements hash::Hashable
it is possible to generate the transaction hash
with tx.hash()
.
Fields
prefix: TransactionPrefix
The transaction prefix.
signatures: Vec<Vec<Signature>>
The signatures.
rct_signatures: RctSig
The RingCT signatures.
Implementations
sourceimpl Transaction
impl Transaction
sourcepub fn prefix(&self) -> &TransactionPrefix
pub fn prefix(&self) -> &TransactionPrefix
Return the transaction prefix.
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>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
pub fn check_outputs(
&self,
pair: &ViewPair,
major: Range<u32>,
minor: Range<u32>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
Iterate over transaction outputs and find outputs related to view pair.
sourcepub fn check_outputs_with(
&self,
checker: &SubKeyChecker<'_>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
pub fn check_outputs_with(
&self,
checker: &SubKeyChecker<'_>
) -> Result<Vec<OwnedTxOut<'_>>, Error>
Iterate over transaction outputs using the provided SubKeyChecker
to find outputs
related to the SubKeyChecker
’s view pair.
sourcepub fn signature_hash(&self) -> Result<Hash, SignatureHashError>
Available on crate feature experimental
only.
pub fn signature_hash(&self) -> Result<Hash, SignatureHashError>
experimental
only.Compute the message to be signed by the CLSAG signature algorithm.
The message consists of three parts:
- The hash of the transaction prefix.
- The hash of a consensus-encoded
RctSigBase
. - The hash of all bulletproofs.
Trait Implementations
sourceimpl Clone for Transaction
impl Clone for Transaction
sourcefn clone(&self) -> Transaction
fn clone(&self) -> Transaction
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 Transaction
impl Debug for Transaction
sourceimpl Decodable for Transaction
impl Decodable for Transaction
sourcefn consensus_decode<D: Read>(d: &mut D) -> Result<Transaction, Error>
fn consensus_decode<D: Read>(d: &mut D) -> Result<Transaction, Error>
Decode an object with a well-defined format.
sourceimpl Default for Transaction
impl Default for Transaction
sourcefn default() -> Transaction
fn default() -> Transaction
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
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 Transaction
impl Display for Transaction
sourceimpl Encodable for Transaction
impl Encodable for Transaction
sourceimpl Hashable for Transaction
impl Hashable for Transaction
sourcefn hash_to_scalar(&self) -> PrivateKey
fn hash_to_scalar(&self) -> PrivateKey
sourceimpl Serialize for Transaction
impl Serialize for Transaction
Auto Trait Implementations
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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