Module sv::script [−][src]
Expand description
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
Script commands
Structs
Transaction script
Checks that external values in a script are correct for a specific transaction spend
Script checker that fails all transaction checks
Constants
Execute the script with genesis rules
Flag to execute the script with pre-genesis rules
Traits
Checks that external values are correct in the script