[][src]Module sv::script

Script opcodes and interpreter

Examples

Evaluate a script that divides two numbers:

use sv::script::op_codes::*;
use sv::script::{Script, TransactionlessChecker, NO_FLAGS};

let mut script = Script::new();
script.append(OP_10);
script.append(OP_5);
script.append(OP_DIV);

script.eval(&mut TransactionlessChecker {}, NO_FLAGS).unwrap();

Modules

op_codes

Script commands

Structs

Script

Transaction script

TransactionChecker

Checks that external values in a script are correct for a specific transaction spend

TransactionlessChecker

Script checker that fails all transaction checks

Constants

NO_FLAGS

Execute the script with genesis rules

PREGENESIS_RULES

Flag to execute the script with pre-genesis rules

Traits

Checker

Checks that external values are correct in the script