pub type ScriptPubKey = Script<ScriptPubKeyTag>;Expand description
A reference to a scriptPubKey (locking script).
Aliased Type§
pub struct ScriptPubKey(/* private fields */);Implementations§
Source§impl ScriptPubKey
impl ScriptPubKey
Sourcepub fn is_witness_program(&self) -> bool
pub fn is_witness_program(&self) -> bool
Checks whether a script pubkey is a Segregated Witness (SegWit) program.
Sourcepub fn is_op_return(&self) -> bool
pub fn is_op_return(&self) -> bool
Check if this is a consensus-valid OP_RETURN output.
To validate if the OP_RETURN obeys Bitcoin Core’s current standardness policy, use
bitcoin::ScriptPubKeyExt::is_standard_op_return() instead.