pub struct Output { /* private fields */ }
Expand description
Information about a transparent output within a transaction.
This struct is for representing transparent outputs in a partially-created
transaction. If you have a fully-created transaction, use
the regular TxOut
struct.
Implementations§
Source§impl Output
impl Output
Sourcepub fn verify(&self) -> Result<(), VerifyError>
pub fn verify(&self) -> Result<(), VerifyError>
Verifies the consistency of this transparent output.
If the redeem_script
field is set, its validity will be checked.
Source§impl Output
impl Output
Sourcepub fn script_pubkey(&self) -> &Script
pub fn script_pubkey(&self) -> &Script
The script constraining how spending of this output must be authorized.
Sourcepub fn redeem_script(&self) -> &Option<Script>
pub fn redeem_script(&self) -> &Option<Script>
The script required to spend this output, if it is P2SH.
Set to None
if this is a P2PKH output, or a P2SH with an unknown redeem script.
Sourcepub fn bip32_derivation(&self) -> &BTreeMap<[u8; 33], Bip32Derivation>
pub fn bip32_derivation(&self) -> &BTreeMap<[u8; 33], Bip32Derivation>
A map from a pubkey to the BIP 32 derivation path at which its corresponding spending key can be found.
- The pubkeys should appear in
script_pubkey
orredeem_script
. - Each entry is set by an Updater.
- Individual entries may be required by a Signer.
- It is not required that the map include entries for all of the used pubkeys. In particular, it is not possible to include entries for non-BIP-32 pubkeys.
Sourcepub fn user_address(&self) -> &Option<String>
pub fn user_address(&self) -> &Option<String>
The user-facing address to which this output is being sent, if any.
- This is set by an Updater.
- Signers must parse this address (if present) and confirm that it contains
recipient
(either directly, or e.g. as a receiver within a Unified Address).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more