pub struct Decoded {
pub decoder: &'static str,
pub instructions: Vec<Instruction>,
pub truncated: bool,
pub pushes: Vec<Vec<u8>>,
pub uses_covenant_ops: bool,
pub uses_zk_ops: bool,
pub zk_system: Option<&'static str>,
pub template: Option<&'static str>,
pub generation: Option<&'static str>,
pub fields: Vec<Field>,
}Expand description
What a decoder could make of a covenant state script.
Fields§
§decoder: &'static strName of the decoder that matched (“disasm” for the fallback).
instructions: Vec<Instruction>§truncated: bool§pushes: Vec<Vec<u8>>Data pushes, in order — for known templates these are the state fields.
uses_covenant_ops: bool§uses_zk_ops: bool§zk_system: Option<&'static str>Best-effort proving system guessed from the ZK arguments, when the
script uses OpZkPrecompile (see zk_system). None when there are
no ZK ops or the shape is too ambiguous to call.
template: Option<&'static str>Recognized template name, when a template decoder matched.
generation: Option<&'static str>Which compiler generation produced the build the matching skeleton
was cut from (see SILVERSCRIPT_GENERATIONS), when the skeleton
declares one. One family name covers every generation; this is the
only place the generation is stated, and only for builds a skeleton
proves.
fields: Vec<Field>Labeled constructor/state fields, when the template names them.