Struct common_types::transaction::LocalizedTransaction[][src]

pub struct LocalizedTransaction {
    pub signed: UnverifiedTransaction,
    pub block_number: u64,
    pub block_hash: H256,
    pub transaction_index: usize,
    pub cached_sender: Option<Address>,
}

Signed Transaction that is a part of canon blockchain.

Fields

signed: UnverifiedTransaction

Signed part.

block_number: u64

Block number.

block_hash: H256

Block hash.

transaction_index: usize

Transaction index within block.

cached_sender: Option<Address>

Cached sender

Implementations

impl LocalizedTransaction[src]

pub fn sender(&mut self) -> Address[src]

Returns transaction sender. Panics if LocalizedTransaction is constructed using invalid UnverifiedTransaction.

Methods from Deref<Target = UnverifiedTransaction>

pub fn is_unsigned(&self) -> bool[src]

Checks if the signature is empty.

pub fn receiver(&self) -> Option<Address>[src]

Returns transaction receiver, if any

pub fn as_unsigned(&self) -> &Transaction[src]

Reference to unsigned part of this transaction.

pub fn standard_v(&self) -> u8[src]

Returns standardized v value (0, 1 or 4 (invalid))

pub fn original_v(&self) -> u64[src]

The v value that appears in the RLP.

pub fn chain_id(&self) -> Option<u64>[src]

The chain ID, or None if this is a global transaction.

pub fn signature(&self) -> Signature[src]

Construct a signature object from the sig.

pub fn check_low_s(&self) -> Result<(), Error>[src]

Checks whether the signature has a low ‘s’ value.

pub fn hash(&self) -> H256[src]

Get the hash of this transaction (keccak of the RLP).

pub fn recover_public(&self) -> Result<Public, Error>[src]

Recovers the public key of the sender.

pub fn verify_basic(
    &self,
    check_low_s: bool,
    chain_id: Option<u64>
) -> Result<(), Error>
[src]

Verify basic signature params. Does not attempt sender recovery.

Methods from Deref<Target = Transaction>

pub fn rlp_append_unsigned_transaction(
    &self,
    s: &mut RlpStream,
    chain_id: Option<u64>
)
[src]

Append object with a without signature into RLP stream

pub fn hash(&self, chain_id: Option<u64>) -> H256[src]

The message hash of the transaction.

Trait Implementations

impl Clone for LocalizedTransaction[src]

impl Debug for LocalizedTransaction[src]

impl Deref for LocalizedTransaction[src]

type Target = UnverifiedTransaction

The resulting type after dereferencing.

impl Eq for LocalizedTransaction[src]

impl PartialEq<LocalizedTransaction> for LocalizedTransaction[src]

impl StructuralEq for LocalizedTransaction[src]

impl StructuralPartialEq for LocalizedTransaction[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> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,