pub struct Transaction {
pub version: Version,
pub type: TransactionType,
pub from: WalletRegisterId,
pub nonce: Nonce,
pub payload: ByteBuf,
pub signature: ByteBuf,
}Fields§
§version: Version§type: TransactionType§from: WalletRegisterId§nonce: NonceNonce is a number that is used only once for every transaction per wallet. If the transaction type is Deposit, Wallet Register, or Reset Main Secret, this field is 0. Otherwise, this field starts from 1.
payload: ByteBuf§signature: ByteBufImplementations§
Source§impl Transaction
impl Transaction
pub fn hash(&self) -> TransactionHash
pub fn hash_for_wallet_registration( &self, recovery_public_key: PublicKey, ) -> TransactionHash
pub fn tx_data_bytes(&self) -> Vec<u8> ⓘ
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, OtherError>
pub fn decode(bytes: &[u8]) -> Result<Self, OtherError>
Decode the transaction from bytes.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Transaction
impl Debug for Transaction
Source§impl From<&EncodedTransaction> for Transaction
impl From<&EncodedTransaction> for Transaction
Source§fn from(tx: &EncodedTransaction) -> Self
fn from(tx: &EncodedTransaction) -> Self
Converts to this type from the input type.
Source§impl From<&Transaction> for EncodedTransaction
impl From<&Transaction> for EncodedTransaction
Source§fn from(tx: &Transaction) -> Self
fn from(tx: &Transaction) -> Self
Converts to this type from the input type.
Source§impl From<EncodedTransaction> for Transaction
impl From<EncodedTransaction> for Transaction
Source§fn from(tx: EncodedTransaction) -> Self
fn from(tx: EncodedTransaction) -> Self
Converts to this type from the input type.
Source§impl From<Transaction> for EncodedTransaction
impl From<Transaction> for EncodedTransaction
Source§fn from(tx: Transaction) -> Self
fn from(tx: Transaction) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Transaction
impl PartialEq for Transaction
impl Eq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more