Struct PartiallySignedTransaction
pub struct PartiallySignedTransaction {
pub unsigned_tx: Transaction,
pub version: u32,
pub xpub: BTreeMap<ExtendedPubKey, (Fingerprint, DerivationPath)>,
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, (Fingerprint, DerivationPath)>
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§
§impl PartiallySignedTransaction
impl PartiallySignedTransaction
pub 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.
pub fn from_unsigned_tx(
tx: Transaction,
) -> Result<PartiallySignedTransaction, Error>
pub fn from_unsigned_tx( tx: Transaction, ) -> Result<PartiallySignedTransaction, Error>
pub fn extract_tx(self) -> Transaction
pub fn extract_tx(self) -> Transaction
Extracts the Transaction
from a PSBT by filling in the available signature information.
pub fn combine(
&mut self,
other: PartiallySignedTransaction,
) -> Result<(), Error>
pub fn combine( &mut self, other: PartiallySignedTransaction, ) -> Result<(), Error>
Combines this PartiallySignedTransaction
with other
PSBT as described by BIP 174.
In accordance with BIP 174 this function is commutative i.e., A.combine(B) == B.combine(A)
Trait Implementations§
§impl Clone for PartiallySignedTransaction
impl Clone for PartiallySignedTransaction
§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 more§impl Debug for PartiallySignedTransaction
impl Debug for PartiallySignedTransaction
§impl Decodable for PartiallySignedTransaction
impl Decodable for PartiallySignedTransaction
§fn consensus_decode_from_finite_reader<R>(
r: &mut R,
) -> Result<PartiallySignedTransaction, Error>
fn consensus_decode_from_finite_reader<R>( r: &mut R, ) -> Result<PartiallySignedTransaction, Error>
Self
from a size-limited reader. Read more§impl Encodable for PartiallySignedTransaction
impl Encodable for PartiallySignedTransaction
§impl Hash for PartiallySignedTransaction
impl Hash for PartiallySignedTransaction
§impl PartialEq for PartiallySignedTransaction
impl PartialEq for PartiallySignedTransaction
impl Eq for PartiallySignedTransaction
impl StructuralPartialEq for PartiallySignedTransaction
Auto Trait Implementations§
impl Freeze for PartiallySignedTransaction
impl RefUnwindSafe for PartiallySignedTransaction
impl Send for PartiallySignedTransaction
impl Sync for PartiallySignedTransaction
impl Unpin for PartiallySignedTransaction
impl UnwindSafe for PartiallySignedTransaction
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request