pub type Psbt = PartiallySignedTransaction;
Expand description
Partially signed transaction, commonly referred to as a PSBT.
Aliased Type§
struct Psbt {
pub unsigned_tx: Transaction,
pub version: u32,
pub xpub: BTreeMap<ExtendedPubKey, (Fingerprint, DerivationPath), Global>,
pub proprietary: BTreeMap<ProprietaryKey<u8>, Vec<u8, Global>, Global>,
pub unknown: BTreeMap<Key, Vec<u8, Global>, Global>,
pub inputs: Vec<Input, Global>,
pub outputs: Vec<Output, Global>,
}
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, (Fingerprint, DerivationPath), Global>
A global map from extended public keys to the used key fingerprint and derivation path as defined by BIP 32.
proprietary: BTreeMap<ProprietaryKey<u8>, Vec<u8, Global>, Global>
Global proprietary key-value pairs.
unknown: BTreeMap<Key, Vec<u8, Global>, Global>
Unknown global key-value pairs.
inputs: Vec<Input, Global>
The corresponding key-value map for each input in the unsigned transaction.
outputs: Vec<Output, Global>
The corresponding key-value map for each output in the unsigned transaction.
Implementations§
source§impl 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§
source§impl Clone for PartiallySignedTransaction
impl Clone for PartiallySignedTransaction
source§fn clone(&self) -> PartiallySignedTransaction
fn clone(&self) -> PartiallySignedTransaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PartiallySignedTransaction
impl Debug for PartiallySignedTransaction
source§impl<'de> Deserialize<'de> for PartiallySignedTransaction
impl<'de> Deserialize<'de> for PartiallySignedTransaction
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>,
source§impl Hash for PartiallySignedTransaction
impl Hash for PartiallySignedTransaction
source§impl PartialEq<PartiallySignedTransaction> for PartiallySignedTransaction
impl PartialEq<PartiallySignedTransaction> for PartiallySignedTransaction
source§fn eq(&self, other: &PartiallySignedTransaction) -> bool
fn eq(&self, other: &PartiallySignedTransaction) -> bool
self
and other
values to be equal, and is used
by ==
.