Skip to main content

ScriptFlags

Struct ScriptFlags 

Source
pub struct ScriptFlags(pub u32);
Expand description

Script verification flags controlling interpreter behavior.

Tuple Fields§

§0: u32

Implementations§

Source§

impl ScriptFlags

Source

pub const NONE: ScriptFlags

No flags set; accept all transactions.

Source

pub const BIP16: ScriptFlags

Evaluate P2SH (BIP16) subscripts.

Source

pub const STRICT_MULTI_SIG: ScriptFlags

Enforce strict multisig dummy element (must be OP_0).

Source

pub const DISCOURAGE_UPGRADABLE_NOPS: ScriptFlags

Discourage use of upgradable NOP opcodes (NOP1-NOP10).

Source

pub const VERIFY_CHECKLOCKTIMEVERIFY: ScriptFlags

Enforce OP_CHECKLOCKTIMEVERIFY (BIP65).

Source

pub const VERIFY_CHECKSEQUENCEVERIFY: ScriptFlags

Enforce OP_CHECKSEQUENCEVERIFY (BIP112).

Source

pub const VERIFY_CLEAN_STACK: ScriptFlags

Require exactly one element on the stack after execution.

Source

pub const VERIFY_DER_SIGNATURES: ScriptFlags

Require strict DER encoding for signatures.

Source

pub const VERIFY_LOW_S: ScriptFlags

Require the S value in signatures to be in the lower half of the curve order.

Source

pub const VERIFY_MINIMAL_DATA: ScriptFlags

Require minimal encoding for data pushes.

Source

pub const VERIFY_NULL_FAIL: ScriptFlags

Require failed CHECK(MULTI)SIG operations to have empty signatures.

Source

pub const VERIFY_SIG_PUSH_ONLY: ScriptFlags

Require the unlocking script to contain only push opcodes.

Source

pub const ENABLE_SIGHASH_FORKID: ScriptFlags

Enable SIGHASH_FORKID replay protection (BSV-specific).

Source

pub const VERIFY_STRICT_ENCODING: ScriptFlags

Require strict signature and public key encoding.

Source

pub const VERIFY_BIP143_SIGHASH: ScriptFlags

Use BIP143-style sighash algorithm for signature verification.

Source

pub const UTXO_AFTER_GENESIS: ScriptFlags

Indicates the UTXO being spent was created after the genesis upgrade.

Source

pub const VERIFY_MINIMAL_IF: ScriptFlags

Require OP_IF/OP_NOTIF arguments to be exactly empty or 0x01.

Source

pub fn has_flag(self, flag: ScriptFlags) -> bool

Return true if the given flag is set in this flags value.

Source

pub fn has_any(self, flags: &[ScriptFlags]) -> bool

Return true if any of the given flags are set in this flags value.

Source

pub fn add_flag(&mut self, flag: ScriptFlags)

Set the given flag bits in this flags value.

Trait Implementations§

Source§

impl BitAnd for ScriptFlags

Source§

type Output = ScriptFlags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self

Performs the & operation. Read more
Source§

impl BitOr for ScriptFlags

Source§

type Output = ScriptFlags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self

Performs the | operation. Read more
Source§

impl BitOrAssign for ScriptFlags

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl Clone for ScriptFlags

Source§

fn clone(&self) -> ScriptFlags

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScriptFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ScriptFlags

Source§

fn default() -> ScriptFlags

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ScriptFlags

Source§

fn eq(&self, other: &ScriptFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ScriptFlags

Source§

impl Eq for ScriptFlags

Source§

impl StructuralPartialEq for ScriptFlags

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V