pub struct TxIn { /* private fields */ }Implementations§
Source§impl TxIn
Platform Agnostic Functions
ie. Don’t need Result<T, E>
impl TxIn
Platform Agnostic Functions ie. Don’t need Result<T, E>
pub fn new( prev_tx_id: &[u8], vout: u32, script_sig: &Script, sequence: Option<u32>, ) -> TxIn
pub fn default() -> TxIn
pub fn get_prev_tx_id(&self, little_endian: Option<bool>) -> Vec<u8> ⓘ
pub fn get_prev_tx_id_hex(&self, little_endian: Option<bool>) -> String
pub fn get_vout(&self) -> u32
pub fn get_script_sig_size(&self) -> u64
pub fn get_script_sig(&self) -> Script
pub fn get_script_sig_hex(&self) -> String
pub fn get_sequence(&self) -> u32
pub fn get_sequence_as_bytes(&self) -> Vec<u8> ⓘ
pub fn get_outpoint_bytes(&self, little_endian: Option<bool>) -> Vec<u8> ⓘ
pub fn get_outpoint_hex(&self, little_endian: Option<bool>) -> String
pub fn set_script(&mut self, script: &Script)
pub fn set_prev_tx_id(&mut self, txid: &[u8])
pub fn set_vout(&mut self, vout: u32)
pub fn set_sequence(&mut self, sequence: u32)
pub fn set_satoshis(&mut self, satoshis: u64)
pub fn get_satoshis(&self) -> Option<u64>
pub fn set_unlocking_script(&mut self, unlocking_script: &Script)
pub fn get_unlocking_script(&self) -> Option<Script>
pub fn get_unlocking_script_bytes(&self) -> Option<Vec<u8>>
Source§impl TxIn
Native Specific Functions
impl TxIn
Native Specific Functions
pub fn from_hex(hex_str: &str) -> Result<TxIn, BSVErrors>
pub fn to_bytes(&self) -> Result<Vec<u8>, BSVErrors>
pub fn to_hex(&self) -> Result<String, BSVErrors>
Sourcepub fn to_compact_bytes(&self) -> Result<Vec<u8>, BSVErrors>
pub fn to_compact_bytes(&self) -> Result<Vec<u8>, BSVErrors>
Serialises this entire transaction to CBOR, preserving all fields from the standard Transaction format + XT
Sourcepub fn from_compact_bytes(compact_buffer: &[u8]) -> Result<Self, BSVErrors>
pub fn from_compact_bytes(compact_buffer: &[u8]) -> Result<Self, BSVErrors>
Deserialises the provided CBOR buffer to the XT format
Sourcepub fn to_compact_hex(&self) -> Result<String, BSVErrors>
pub fn to_compact_hex(&self) -> Result<String, BSVErrors>
Serialises this entire transaction to CBOR Hex, preserving all fields from the standard Transaction format + XT
Sourcepub fn from_compact_hex(compact_hex: &str) -> Result<Self, BSVErrors>
pub fn from_compact_hex(compact_hex: &str) -> Result<Self, BSVErrors>
Deserialises the provided CBOR hex to the XT format
pub fn to_json_string(&self) -> Result<String, BSVErrors>
pub fn to_json(&self) -> Result<Value, BSVErrors>
pub fn from_outpoint_bytes(outpoint: &[u8]) -> Result<TxIn, BSVErrors>
pub fn get_finalised_script(&self) -> Result<Script, BSVErrors>
pub fn is_coinbase(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TxIn
impl<'de> Deserialize<'de> for TxIn
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TxIn
impl StructuralPartialEq for TxIn
Auto Trait Implementations§
impl Freeze for TxIn
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
Mutably borrows from an owned value. Read more