Struct sapio_bitcoin::util::psbt::PartiallySignedTransaction
source · 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§
source§impl PartiallySignedTransaction
impl PartiallySignedTransaction
sourcepub fn from_unsigned_tx(tx: Transaction) -> Result<Self, Error>
pub fn from_unsigned_tx(tx: Transaction) -> Result<Self, Error>
Create a PartiallySignedTransaction from an unsigned transaction, error if not unsigned
sourcepub fn extract_tx(self) -> Transaction
pub fn extract_tx(self) -> Transaction
Extract the Transaction from a PartiallySignedTransaction by filling in the available signature information in place.
Trait Implementations§
source§impl Clone for PartiallySignedTransaction
impl Clone for PartiallySignedTransaction
source§fn clone(&self) -> PartiallySignedTransaction
fn clone(&self) -> PartiallySignedTransaction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PartiallySignedTransaction
Available on crate feature base64
only.
impl Display for PartiallySignedTransaction
Available on crate feature
base64
only.source§impl FromStr for PartiallySignedTransaction
Available on crate feature base64
only.
impl FromStr for PartiallySignedTransaction
Available on crate feature
base64
only.source§impl PartialEq for PartiallySignedTransaction
impl PartialEq for PartiallySignedTransaction
source§fn 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 ==
.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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more