Enum dbc::spk::ScriptEncodeData [−][src]
pub enum ScriptEncodeData {
SinglePubkey,
LockScript(LockScript),
Taproot(Hash),
}Expand description
Structure keeping the minimum of information (bytewise) required to verify
deterministic bitcoin commitment given only the transaction source, its
fee and protocol-specific constants. It is a part of the Proof data.
Variants
SinglePubkey
Public key. Since we keep the original public key as a part of a proof, and value of the tweaked key can be reconstructed with DBC source data and the original pubkey, so we do not need to keep any additional data here).
LockScript(LockScript)
Tuple Fields
0: LockScriptAny output containing script information, aside from OP_RETURN outputs
(using ScriptEncodeData::SinglePubkey) and tapscript.
We have to store full original script in it’s byte form since when
the deteministic bitcoin commitment is verified, the output may be
still unspent and we will not be able to reconstruct the script without
this data kept in the client-validated part.
Taproot(Hash)
Taproot-based outputs. We need to keep only the hash of the taprscript merkle tree root.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Decode with the given std::io::Read instance; must either
construct an instance or return implementation-specific error type. Read more
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode Read more
Encode with the given std::io::Write instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
Serializes data as a byte array using StrictEncode::strict_encode
function Read more
Auto Trait Implementations
impl RefUnwindSafe for ScriptEncodeData
impl Send for ScriptEncodeData
impl Sync for ScriptEncodeData
impl Unpin for ScriptEncodeData
impl UnwindSafe for ScriptEncodeData
Blanket Implementations
Mutably borrows from an owned value. Read more