pub struct Output {
pub redeem_script: Option<Script>,
pub witness_script: Option<Script>,
pub bip32_derivation: BTreeMap<PublicKey, (Fingerprint, DerivationPath)>,
pub tap_internal_key: Option<XOnlyPublicKey>,
pub tap_tree: Option<TapTree>,
pub tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash, Global>, (Fingerprint, DerivationPath))>,
pub proprietary: BTreeMap<ProprietaryKey<u8>, Vec<u8, Global>>,
pub unknown: BTreeMap<Key, Vec<u8, Global>>,
}
Expand description
A key-value map for an output of the corresponding index in the unsigned transaction.
Fields
redeem_script: Option<Script>
The redeem script for this output.
witness_script: Option<Script>
The witness script for this output.
bip32_derivation: BTreeMap<PublicKey, (Fingerprint, DerivationPath)>
A map from public keys needed to spend this output to their corresponding master key fingerprints and derivation paths.
tap_internal_key: Option<XOnlyPublicKey>
The internal pubkey.
tap_tree: Option<TapTree>
Taproot Output tree.
tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash, Global>, (Fingerprint, DerivationPath))>
Map of tap root x only keys to origin info and leaf hashes contained in it.
proprietary: BTreeMap<ProprietaryKey<u8>, Vec<u8, Global>>
Proprietary key-value pairs for this output.
unknown: BTreeMap<Key, Vec<u8, Global>>
Unknown key-value pairs for this output.
Implementations
Trait Implementations
sourceimpl TapretOutput for Output
impl TapretOutput for Output
sourcefn can_host_tapret(&self) -> bool
fn can_host_tapret(&self) -> bool
Returns whether this output may contain tapret commitment. This is
detected by the presence of the empty PSBT_OUT_TAPRET_HOST
key. Read more
sourcefn set_can_host_tapret(&mut self, can_host_commitment: bool) -> bool
fn set_can_host_tapret(&mut self, can_host_commitment: bool) -> bool
Sets whether this output may contain tapret commitment bu adding or
removing PSBT_OUT_TAPRET_HOST
key basing on can_host_commitment
value. Read more
sourcefn has_tapret_commitment(&self) -> bool
fn has_tapret_commitment(&self) -> bool
Detects presence of a vaid PSBT_OUT_TAPRET_COMMITMENT
. Read more
sourcefn tapret_commitment(&self) -> Option<Slice32>
fn tapret_commitment(&self) -> Option<Slice32>
Returns valid tapret commitment from the PSBT_OUT_TAPRET_COMMITMENT
key, if present. If the commitment is absent or invalid, returns
None
. Read more
sourcefn set_tapret_commitment(
&mut self,
commitment: impl Into<[u8; 32]>
) -> Result<(), KeyError>
fn set_tapret_commitment(
&mut self,
commitment: impl Into<[u8; 32]>
) -> Result<(), KeyError>
Assigns value of the tapreturn commitment to this PSBT output, by
adding PSBT_OUT_TAPRET_COMMITMENT
proprietary key containing the
32-byte commitment as its value. Read more
sourcefn has_tapret_proof(&self) -> bool
fn has_tapret_proof(&self) -> bool
Detects presence of a valid PSBT_OUT_TAPRET_PROOF
. Read more
sourcefn tapret_proof(&self) -> Option<TaprootMerkleBranch>
fn tapret_proof(&self) -> Option<TaprootMerkleBranch>
Returns valid tapret commitment proof from the PSBT_OUT_TAPRET_PROOF
key, if present. If the commitment is absent or invalid, returns None
. Read more
impl StructuralPartialEq for Output
Auto Trait Implementations
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more