Struct cashweb::bitcoin::prelude::Transaction [−][src]
Represents a transaction.
Fields
version: u32
inputs: Vec<Input, Global>
outputs: Vec<Output, Global>
lock_time: u32
Implementations
impl Transaction
[src]
pub fn transaction_id_le(&self) -> [u8; 32]
[src]
Calculate the transaction ID in little-endian format. This is the double SHA256 digest of the raw transaction.
Note that typically the transaction ID are big-endian encoded.
pub fn transaction_id(&self) -> [u8; 32]
[src]
Calculate the transaction ID. This is the double SHA256 digest of the raw transaction in big-endian encoding.
pub fn signature_hash(
&self,
input_index: usize,
script_pubkey: Script,
sig_hash_type: SignatureHashType
) -> Option<[u8; 32]>
[src]
&self,
input_index: usize,
script_pubkey: Script,
sig_hash_type: SignatureHashType
) -> Option<[u8; 32]>
Calculate signature hash of a specific input.
Trait Implementations
impl Clone for Transaction
[src]
pub fn clone(&self) -> Transaction
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Transaction
[src]
impl Decodable for Transaction
[src]
type Error = DecodeError
Error associated with decoding a Bitcoin structure.
pub fn decode<B>(
buf: &mut B
) -> Result<Transaction, <Transaction as Decodable>::Error> where
B: Buf,
[src]
buf: &mut B
) -> Result<Transaction, <Transaction as Decodable>::Error> where
B: Buf,
impl Default for Transaction
[src]
pub fn default() -> Transaction
[src]
impl Encodable for Transaction
[src]
pub fn encoded_len(&self) -> usize
[src]
pub fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
pub fn encode<B>(&self, buf: &mut B) -> Result<(), InsufficientCapacity> where
B: BufMut,
[src]
B: BufMut,
impl Eq for Transaction
[src]
impl PartialEq<Transaction> for Transaction
[src]
pub fn eq(&self, other: &Transaction) -> bool
[src]
pub fn ne(&self, other: &Transaction) -> bool
[src]
impl StructuralEq for Transaction
[src]
impl StructuralPartialEq for Transaction
[src]
Auto Trait Implementations
impl RefUnwindSafe for Transaction
[src]
impl Send for Transaction
[src]
impl Sync for Transaction
[src]
impl Unpin for Transaction
[src]
impl UnwindSafe for Transaction
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,