Skip to main content

ScriptPubKeyBuf

Type Alias ScriptPubKeyBuf 

Source
pub type ScriptPubKeyBuf = ScriptBuf<ScriptPubKeyTag>;
Expand description

A scriptPubKey (locking script).

Aliased Type§

pub struct ScriptPubKeyBuf(/* private fields */);

Implementations§

Source§

impl ScriptPubKeyBuf

Source

pub fn new_op_return<T: AsRef<PushBytes>>(data: T) -> Self

Generates OP_RETURN-type of scriptPubkey for the given data.

Source

pub fn new_p2sh(script_hash: ScriptHash) -> Self

Generates P2SH-type of scriptPubkey with a given hash of the redeem script.

Source

pub fn new_p2a() -> Self

Generates pay to anchor output.