pub struct CoinbaseRewardScript { /* private fields */ }Expand description
Coinbase output transaction.
Typically used for parsing coinbase outputs defined in SRI role configuration files.
Implementations§
Source§impl CoinbaseRewardScript
impl CoinbaseRewardScript
Sourcepub fn from_descriptor(s: &str) -> Result<Self, Error>
pub fn from_descriptor(s: &str) -> Result<Self, Error>
Creates a new CoinbaseRewardScript from a descriptor string.
Sourcepub fn ok_for_mainnet(&self) -> bool
pub fn ok_for_mainnet(&self) -> bool
Whether this coinbase output is okay for use on mainnet.
This is a “best effort” check and currently only returns false if the user provides an addr() descriptor in which they specified a testnet or regtest address.
Sourcepub fn script_pubkey(&self) -> ScriptBuf
pub fn script_pubkey(&self) -> ScriptBuf
The scriptPubKey associated with the coinbase output
Trait Implementations§
Source§impl Clone for CoinbaseRewardScript
impl Clone for CoinbaseRewardScript
Source§fn clone(&self) -> CoinbaseRewardScript
fn clone(&self) -> CoinbaseRewardScript
Returns a duplicate 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 CoinbaseRewardScript
impl Debug for CoinbaseRewardScript
Source§impl<'de> Deserialize<'de> for CoinbaseRewardScript
impl<'de> Deserialize<'de> for CoinbaseRewardScript
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
Auto Trait Implementations§
impl Freeze for CoinbaseRewardScript
impl RefUnwindSafe for CoinbaseRewardScript
impl Send for CoinbaseRewardScript
impl Sync for CoinbaseRewardScript
impl Unpin for CoinbaseRewardScript
impl UnwindSafe for CoinbaseRewardScript
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