[−][src]Struct elements::TxIn
A transaction input, which defines old coins to be consumed
Fields
previous_output: OutPoint
The reference to the previous output that is being used an an input
is_pegin: bool
Flag indicating that previous_outpoint
refers to something on the main chain
has_issuance: bool
Flag indicating that previous_outpoint
has an asset issuance attached
script_sig: Script
The script which pushes values on the stack which will cause the referenced output's script to accept
sequence: u32
The sequence number, which suggests to miners which of two conflicting transactions should be preferred, or 0xFFFFFFFF to ignore this feature. This is generally never used since the miner behaviour cannot be enforced.
asset_issuance: AssetIssuance
Asset issuance data
witness: TxInWitness
Witness data - not deserialized/serialized as part of a TxIn
object
(rather as part of its containing transaction, if any) but is logically
part of the txin.
Methods
impl TxIn
[src]
pub fn is_coinbase(&self) -> bool
[src]
Whether the input is a coinbase
pub fn is_pegin(&self) -> bool
[src]
Whether the input is a pegin
pub fn pegin_data(&self) -> Option<PeginData>
[src]
Extracts witness data from a pegin. Will return None
if any data
cannot be parsed. The combination of is_pegin()
returning true
and pegin_data()
returning None
indicates an invalid transaction.
pub fn has_issuance(&self) -> bool
[src]
Helper to determine whether an input has an asset issuance attached
Trait Implementations
impl Clone for TxIn
[src]
impl Debug for TxIn
[src]
impl Decodable for TxIn
[src]
impl Encodable for TxIn
[src]
impl Eq for TxIn
[src]
impl Hash for TxIn
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TxIn> for TxIn
[src]
impl StructuralEq for TxIn
[src]
impl StructuralPartialEq for TxIn
[src]
Auto Trait Implementations
impl RefUnwindSafe for TxIn
impl Send for TxIn
impl Sync for TxIn
impl Unpin for TxIn
impl UnwindSafe for TxIn
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,