pub struct HWIPartiallySignedTransaction {
    pub psbt: Psbt,
}

Fields§

§psbt: Psbt

Methods from Deref<Target = Psbt>§

source

pub fn serialize_hex(&self) -> String

Serialize a value as bytes in hex.

source

pub fn serialize(&self) -> Vec<u8>

Serialize as raw binary data

source

pub fn iter_funding_utxos(&self) -> impl Iterator<Item = Result<&TxOut, Error>>

Returns an iterator for the funding UTXOs of the psbt

For each PSBT input that contains UTXO information Ok is returned containing that information. The order of returned items is same as the order of inputs.

§Errors

The function returns error when UTXO information is not present or is invalid.

§Panics

The function panics if the length of transaction inputs is not equal to the length of PSBT inputs.

source

pub const DEFAULT_MAX_FEE_RATE: FeeRate = _

source

pub fn sighash_ecdsa<T>( &self, input_index: usize, cache: &mut SighashCache<T> ) -> Result<(Message, EcdsaSighashType), SignError>
where T: Borrow<Transaction>,

Returns the sighash message to sign an ECDSA input along with the sighash type.

Uses the EcdsaSighashType from this input if one is specified. If no sighash type is specified uses EcdsaSighashType::All. This function does not support scripts that contain OP_CODESEPARATOR.

source

pub fn spend_utxo(&self, input_index: usize) -> Result<&TxOut, SignError>

Returns the spending utxo for this PSBT’s input at input_index.

source

pub fn fee(&self) -> Result<Amount, Error>

Calculates transaction fee.

‘Fee’ being the amount that will be paid for mining a transaction with the current inputs and outputs i.e., the difference in value of the total inputs and the total outputs.

§Errors

Trait Implementations§

source§

impl Clone for HWIPartiallySignedTransaction

source§

fn clone(&self) -> HWIPartiallySignedTransaction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HWIPartiallySignedTransaction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for HWIPartiallySignedTransaction

§

type Target = Psbt

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'de> Deserialize<'de> for HWIPartiallySignedTransaction

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for HWIPartiallySignedTransaction

source§

fn eq(&self, other: &HWIPartiallySignedTransaction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for HWIPartiallySignedTransaction

source§

impl StructuralPartialEq for HWIPartiallySignedTransaction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,