#[repr(u8)]pub enum PreimageKeyType {
Local = 1,
Keccak256 = 2,
GlobalGeneric = 3,
Sha256 = 4,
Blob = 5,
Precompile = 6,
}Variants§
Local = 1
Local key types are local to a given instance of a fault-proof and context dependent. Commonly these local keys are mapped to bootstrap data for the fault proof program.
Keccak256 = 2
Keccak256 key types are global and context independent. Preimages are mapped from the
low-order 31 bytes of the preimage’s keccak256 digest to the preimage itself.
GlobalGeneric = 3
GlobalGeneric key types are reserved for future use.
Sha256 = 4
Sha256 key types are global and context independent. Preimages are mapped from the
low-order 31 bytes of the preimage’s sha256 digest to the preimage itself.
Blob = 5
Blob key types are global and context independent. Blob keys are constructed as
keccak256(commitment ++ z), and then the high-order byte of the digest is set to the
type byte.
Precompile = 6
Precompile key types are global and context independent. Precompile keys are constructed as
keccak256(precompile_addr ++ input), and then the high-order byte of the digest is set to
the type byte.
Trait Implementations§
Source§impl Clone for PreimageKeyType
impl Clone for PreimageKeyType
Source§fn clone(&self) -> PreimageKeyType
fn clone(&self) -> PreimageKeyType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more