pub struct ProofVerification {Show 13 fields
pub schema: String,
pub verification_id: String,
pub proof_id: String,
pub tool: String,
pub tool_version: String,
pub script_locator: String,
pub lake_manifest_hash: Option<String>,
pub verifier_output_hash: String,
pub status: String,
pub verified_at: String,
pub verifier_actor: String,
pub verifier_pubkey: String,
pub signature: String,
}Fields§
§schema: String§verification_id: String§proof_id: String§tool: String§tool_version: String§script_locator: String§lake_manifest_hash: Option<String>§verifier_output_hash: String§status: String§verified_at: String§verifier_actor: String§verifier_pubkey: String§signature: StringImplementations§
Source§impl ProofVerification
impl ProofVerification
Sourcepub fn build(
draft: VerificationDraft,
signing_key: &SigningKey,
) -> Result<Self, String>
pub fn build( draft: VerificationDraft, signing_key: &SigningKey, ) -> Result<Self, String>
Build + sign a verification record. The signature covers
the canonical preimage with signature and verification_id
zeroed. The id is then derived from the signed body, so a
tampered signature surfaces as an id mismatch on verify.
pub fn preimage_bytes(&self) -> Result<Vec<u8>, String>
pub fn derive_id(&self) -> Result<String, String>
Sourcepub fn verify(&self) -> Result<(), String>
pub fn verify(&self) -> Result<(), String>
Verify the attestation: re-derive the id, verify the
Ed25519 signature against verifier_pubkey. Optional
caller check: the caller may additionally assert that the
script_locator matches a known proof artifact’s locator
(the substrate does not have a global proof index at
v0.151; consumers cross-link manually).
Trait Implementations§
Source§impl Clone for ProofVerification
impl Clone for ProofVerification
Source§fn clone(&self) -> ProofVerification
fn clone(&self) -> ProofVerification
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProofVerification
impl Debug for ProofVerification
Source§impl<'de> Deserialize<'de> for ProofVerification
impl<'de> Deserialize<'de> for ProofVerification
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
Source§impl PartialEq for ProofVerification
impl PartialEq for ProofVerification
Source§fn eq(&self, other: &ProofVerification) -> bool
fn eq(&self, other: &ProofVerification) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProofVerification
impl Serialize for ProofVerification
impl Eq for ProofVerification
impl StructuralPartialEq for ProofVerification
Auto Trait Implementations§
impl Freeze for ProofVerification
impl RefUnwindSafe for ProofVerification
impl Send for ProofVerification
impl Sync for ProofVerification
impl Unpin for ProofVerification
impl UnsafeUnpin for ProofVerification
impl UnwindSafe for ProofVerification
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.