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
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl 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>,
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.