pub struct ProofEnvelopeV1 {
pub version: u8,
pub encoding_version: u8,
pub runtime_version: u32,
pub policy_hash: [u8; 32],
pub bytecode_hash: [u8; 32],
pub input_hash: [u8; 32],
pub state_hash: [u8; 32],
pub decision_code: u8,
pub signature: SignatureV1,
}Expand description
Canonical proof envelope v1: fixed header + typed signature payload.
Fields§
§version: u8§encoding_version: u8§runtime_version: u32§policy_hash: [u8; 32]§bytecode_hash: [u8; 32]§input_hash: [u8; 32]§state_hash: [u8; 32]§decision_code: u8§signature: SignatureV1Implementations§
Source§impl ProofEnvelopeV1
impl ProofEnvelopeV1
pub fn sign_ed25519( binding: &ProofBinding, signer_key_id: impl AsRef<str>, key_pair: &Ed25519KeyPair, ) -> Result<Self, String>
pub fn verify_ed25519(&self, public_key: &[u8]) -> Result<bool, String>
Sourcepub fn signing_bytes(&self) -> Result<Vec<u8>, String>
pub fn signing_bytes(&self) -> Result<Vec<u8>, String>
Canonical bytes excluding signature material (signing payload).
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, String>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, String>
Canonical bytes including signature bytes (stable serialization for ledger embedding/export).
Sourcepub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, String>
pub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, String>
Decode canonical bytes produced by canonical_bytes.
pub fn decision(&self) -> Result<Decision, String>
Trait Implementations§
Source§impl Clone for ProofEnvelopeV1
impl Clone for ProofEnvelopeV1
Source§fn clone(&self) -> ProofEnvelopeV1
fn clone(&self) -> ProofEnvelopeV1
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for ProofEnvelopeV1
impl<'de> Deserialize<'de> for ProofEnvelopeV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProofEnvelopeV1
impl RefUnwindSafe for ProofEnvelopeV1
impl Send for ProofEnvelopeV1
impl Sync for ProofEnvelopeV1
impl Unpin for ProofEnvelopeV1
impl UnsafeUnpin for ProofEnvelopeV1
impl UnwindSafe for ProofEnvelopeV1
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