Struct bitcoin_psbt::PartiallySignedTransaction
source · pub struct PartiallySignedTransaction {
pub tx: Option<MutableTransaction>,
pub inputs: Vec<PSBTInput>,
pub outputs: Vec<PSBTOutput>,
pub unknown: HashMap<Vec<u8>, Vec<u8>>,
}
Expand description
| A version of CTransaction with the PSBT | format |
Fields§
§tx: Option<MutableTransaction>
§inputs: Vec<PSBTInput>
§outputs: Vec<PSBTOutput>
§unknown: HashMap<Vec<u8>, Vec<u8>>
Implementations§
source§impl PartiallySignedTransaction
impl PartiallySignedTransaction
pub fn serialize<Stream: GetType + GetVersion + StreamItems>( &self, s: &mut Stream )
pub fn unserialize<Stream: GetType + GetVersion + StreamInto + ExactSizeIterator>( &mut self, s: &mut Stream ) -> Result<(), StdException>
pub fn new<Stream: GetType + GetVersion + ExactSizeIterator + StreamInto>( _0: DeserializeType, s: &mut Stream ) -> Self
pub fn is_null(&self) -> bool
sourcepub fn merge(&mut self, psbt: &PartiallySignedTransaction) -> bool
pub fn merge(&mut self, psbt: &PartiallySignedTransaction) -> bool
| Merge psbt into this. The two psbts must | have the same underlying CTransaction | (i.e. the same actual Bitcoin transaction.) | Returns true if the merge succeeded, | false otherwise. |
pub fn add_input(&mut self, txin: &TxIn, psbtin: &mut PSBTInput) -> bool
pub fn add_output(&mut self, txout: &TxOut, psbtout: &PSBTOutput) -> bool
sourcepub fn get_inpututxo(&self, utxo: &mut TxOut, input_index: i32) -> bool
pub fn get_inpututxo(&self, utxo: &mut TxOut, input_index: i32) -> bool
| Finds the UTXO for a given input index | | ———– | @param[out] utxo | | The UTXO of the input if found | ––––– | @param[in] input_index | | Index of the input to retrieve the UTXO | of | | ———– | @return | | Whether the UTXO for the specified input | was found |
Trait Implementations§
source§impl Default for PartiallySignedTransaction
impl Default for PartiallySignedTransaction
source§fn default() -> PartiallySignedTransaction
fn default() -> PartiallySignedTransaction
Returns the “default value” for a type. Read more
source§impl From<MutableTransaction> for PartiallySignedTransaction
impl From<MutableTransaction> for PartiallySignedTransaction
source§fn from(tx: MutableTransaction) -> Self
fn from(tx: MutableTransaction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for PartiallySignedTransaction
impl Send for PartiallySignedTransaction
impl Sync for PartiallySignedTransaction
impl Unpin for PartiallySignedTransaction
impl UnwindSafe for PartiallySignedTransaction
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more