Struct esplora_client::api::TxIn
source · pub struct TxIn {
pub previous_output: OutPoint,
pub script_sig: Script,
pub sequence: Sequence,
pub witness: Witness,
}Expand description
Bitcoin transaction input.
It contains the location of the previous transaction’s output, that it spends and set of scripts that satisfy its spending conditions.
Bitcoin Core References
Fields§
§previous_output: OutPointThe reference to the previous output that is being used an an input.
script_sig: ScriptThe script which pushes values on the stack which will cause the referenced output’s script to be accepted.
sequence: SequenceThe 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.
witness: WitnessWitness data: an array of byte-arrays. Note that this field is not (de)serialized with the rest of the TxIn in Encodable/Decodable, as it is (de)serialized at the end of the full Transaction. It is (de)serialized with the rest of the TxIn in other (de)serialization routines.
Implementations§
source§impl TxIn
impl TxIn
sourcepub fn enables_lock_time(&self) -> bool
pub fn enables_lock_time(&self) -> bool
Returns true if this input enables the LockTime (aka nLockTime) of its Transaction.
nLockTime is enabled if any input enables it. See Transaction::is_lock_time_enabled
to check the overall state. If none of the inputs enables it, the lock time value is simply
ignored. If this returns false and OP_CHECKLOCKTIMEVERIFY is used in the redeem script with
this input then the script execution will fail [BIP-0065].
Trait Implementations§
source§impl<'de> Deserialize<'de> for TxIn
impl<'de> Deserialize<'de> for TxIn
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TxIn, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<TxIn, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl Ord for TxIn
impl Ord for TxIn
source§impl PartialEq<TxIn> for TxIn
impl PartialEq<TxIn> for TxIn
source§impl PartialOrd<TxIn> for TxIn
impl PartialOrd<TxIn> for TxIn
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Serialize for TxIn
impl Serialize for TxIn
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
impl Eq for TxIn
impl StructuralEq for TxIn
impl StructuralPartialEq for TxIn
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§
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.