pub struct PartiallySignedTransaction {
pub unsigned_tx: Transaction,
pub version: u32,
pub xpub: BTreeMap<ExtendedPubKey, KeySource>,
pub proprietary: BTreeMap<ProprietaryKey, Vec<u8>>,
pub unknown: BTreeMap<Key, Vec<u8>>,
pub inputs: Vec<Input>,
pub outputs: Vec<Output>,
}
Expand description
A Partially Signed Transaction.
Fields
unsigned_tx: Transaction
The unsigned transaction, scriptSigs and witnesses for each input must be empty.
version: u32
The version number of this PSBT. If omitted, the version number is 0.
xpub: BTreeMap<ExtendedPubKey, KeySource>
A global map from extended public keys to the used key fingerprint and derivation path as defined by BIP 32.
proprietary: BTreeMap<ProprietaryKey, Vec<u8>>
Global proprietary key-value pairs.
unknown: BTreeMap<Key, Vec<u8>>
Unknown global key-value pairs.
inputs: Vec<Input>
The corresponding key-value map for each input in the unsigned transaction.
outputs: Vec<Output>
The corresponding key-value map for each output in the unsigned transaction.
Implementations
sourceimpl PartiallySignedTransaction
impl PartiallySignedTransaction
sourcepub fn iter_funding_utxos(&self) -> impl Iterator<Item = Result<&TxOut, Error>>
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.
sourcepub fn from_unsigned_tx(tx: Transaction) -> Result<Self, Error>
pub fn from_unsigned_tx(tx: Transaction) -> Result<Self, Error>
sourcepub fn extract_tx(self) -> Transaction
pub fn extract_tx(self) -> Transaction
Extracts the Transaction
from a PSBT by filling in the available signature information.
Trait Implementations
sourceimpl Clone for PartiallySignedTransaction
impl Clone for PartiallySignedTransaction
sourcefn clone(&self) -> PartiallySignedTransaction
fn clone(&self) -> PartiallySignedTransaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PartiallySignedTransaction
impl Debug for PartiallySignedTransaction
sourceimpl<'de> Deserialize<'de> for PartiallySignedTransaction
impl<'de> Deserialize<'de> for PartiallySignedTransaction
sourcefn 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
sourceimpl Display for PartiallySignedTransaction
Available on crate feature base64
only.
impl Display for PartiallySignedTransaction
base64
only.sourceimpl FromStr for PartiallySignedTransaction
Available on crate feature base64
only.
impl FromStr for PartiallySignedTransaction
base64
only.sourceimpl Hash for PartiallySignedTransaction
impl Hash for PartiallySignedTransaction
sourceimpl PartialEq<PartiallySignedTransaction> for PartiallySignedTransaction
impl PartialEq<PartiallySignedTransaction> for PartiallySignedTransaction
sourcefn eq(&self, other: &PartiallySignedTransaction) -> bool
fn eq(&self, other: &PartiallySignedTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PartiallySignedTransaction) -> bool
fn ne(&self, other: &PartiallySignedTransaction) -> bool
This method tests for !=
.
impl Eq for PartiallySignedTransaction
impl StructuralEq for PartiallySignedTransaction
impl StructuralPartialEq for PartiallySignedTransaction
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more