pub struct ScriptPubkey {
pub script: Vec<u8>,
pub script_type: ScriptType,
}Expand description
Script pubkey generated from a descriptor
Fields§
§script: Vec<u8>The raw script bytes
script_type: ScriptTypeScript type
Implementations§
Source§impl ScriptPubkey
impl ScriptPubkey
Sourcepub fn multisig(
threshold: usize,
pubkeys: &[PublicKey],
) -> Result<Vec<u8>, DescriptorError>
pub fn multisig( threshold: usize, pubkeys: &[PublicKey], ) -> Result<Vec<u8>, DescriptorError>
Create a multisig script
Sourcepub fn script_type(&self) -> ScriptType
pub fn script_type(&self) -> ScriptType
Get the script type
Sourcepub fn is_witness(&self) -> bool
pub fn is_witness(&self) -> bool
Check if this is a witness script
Trait Implementations§
Source§impl Clone for ScriptPubkey
impl Clone for ScriptPubkey
Source§fn clone(&self) -> ScriptPubkey
fn clone(&self) -> ScriptPubkey
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 ScriptPubkey
impl Debug for ScriptPubkey
Source§impl PartialEq for ScriptPubkey
impl PartialEq for ScriptPubkey
impl Eq for ScriptPubkey
impl StructuralPartialEq for ScriptPubkey
Auto Trait Implementations§
impl Freeze for ScriptPubkey
impl RefUnwindSafe for ScriptPubkey
impl Send for ScriptPubkey
impl Sync for ScriptPubkey
impl Unpin for ScriptPubkey
impl UnwindSafe for ScriptPubkey
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