pub struct Script<Sig = PushValue, PubKey = Opcode> {
pub sig: Component<Sig>,
pub pub_key: Component<PubKey>,
}Expand description
A Zcash script consists of a sig and a pubkey. The first type parameter is the type of opcodes in the script sig, and the second is the type of opcodes in the script pubkey.
- Script<opcode::PossiblyBad, opcode::PossiblyBad> – from the chain
- Script<opcode::PushValue, Opcode> – authoring sig_push_only
- Script<Opcode, Opcode> – authoring non-sig_push_only
Fields§
§sig: Component<Sig>The script sig.
pub_key: Component<PubKey>The script pubkey.
Implementations§
Source§impl<Sig: Into<PossiblyBad> + Evaluable + Clone, PubKey: Into<PossiblyBad> + Evaluable + Clone> Script<Sig, PubKey>
impl<Sig: Into<PossiblyBad> + Evaluable + Clone, PubKey: Into<PossiblyBad> + Evaluable + Clone> Script<Sig, PubKey>
Sourcepub fn eval(
&self,
flags: Flags,
checker: &dyn SignatureChecker,
) -> Result<bool, (ComponentType, Error)>
pub fn eval( &self, flags: Flags, checker: &dyn SignatureChecker, ) -> Result<bool, (ComponentType, Error)>
Evaluate an entire script.
Trait Implementations§
Auto Trait Implementations§
impl<Sig, PubKey> Freeze for Script<Sig, PubKey>
impl<Sig, PubKey> RefUnwindSafe for Script<Sig, PubKey>where
Sig: RefUnwindSafe,
PubKey: RefUnwindSafe,
impl<Sig, PubKey> Send for Script<Sig, PubKey>
impl<Sig, PubKey> Sync for Script<Sig, PubKey>
impl<Sig, PubKey> Unpin for Script<Sig, PubKey>
impl<Sig, PubKey> UnwindSafe for Script<Sig, PubKey>where
Sig: UnwindSafe,
PubKey: UnwindSafe,
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