pub struct Spend { /* private fields */ }Expand description
The Spend struct represents a spend action and validates it by executing the unlocking and locking scripts.
Implementations§
Source§impl Spend
impl Spend
Sourcepub fn new(params: SpendParams) -> Self
pub fn new(params: SpendParams) -> Self
Creates a new Spend validator from the given parameters.
Sourcepub fn set_require_minimal(&mut self, require: bool)
pub fn set_require_minimal(&mut self, require: bool)
Overrides MINIMALDATA enforcement (script-number and push minimality).
Default follows ts-sdk: enforced for version <= 1 transactions, relaxed for version > 1 (post-Genesis semantics).
Sourcepub fn set_require_push_only(&mut self, require: bool)
pub fn set_require_push_only(&mut self, require: bool)
Allows opting out of the push-only unlocking-script check.
The TypeScript @bsv/sdk Spend engine does not enforce push-only
unlocking scripts; some OP_PUSH_TX-style covenant designs place
executable code in the unlocking script and verify under that engine.
Default remains true (enforced).
Auto Trait Implementations§
impl !Freeze for Spend
impl !RefUnwindSafe for Spend
impl !Sync for Spend
impl Send for Spend
impl Unpin for Spend
impl UnsafeUnpin for Spend
impl UnwindSafe for Spend
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