pub struct WitnessData {
pub chora_node_id: String,
pub receipt_hash: String,
pub timestamp: u64,
pub metadata: SchemaValue,
}Expand description
Witness Data (CHORA Append-Only Log) Proves the receipt issuance parameters.
Fields§
§chora_node_id: String§receipt_hash: String§timestamp: u64§metadata: SchemaValueDiagnostic or display-only fields that are NOT part of the commitment surface.
Implementations§
Source§impl WitnessData
impl WitnessData
Sourcepub fn to_commitment_hash(&self) -> Result<Hash, String>
pub fn to_commitment_hash(&self) -> Result<Hash, String>
Compute the “witness_hash” using the v0.3 Minimal Witness spec. ONLY chora_node_id and timestamp are committed. receipt_hash is post-seal metadata and is NOT part of the witness commitment surface. Ref: CHORA_VERIFICATION_CONTRACT_v0.3.md
pub fn to_jcs_hash(&self) -> Result<Hash, String>
Trait Implementations§
Source§impl Clone for WitnessData
impl Clone for WitnessData
Source§fn clone(&self) -> WitnessData
fn clone(&self) -> WitnessData
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 ComposeSchema for WitnessData
impl ComposeSchema for WitnessData
Source§impl Debug for WitnessData
impl Debug for WitnessData
Source§impl<'de> Deserialize<'de> for WitnessData
impl<'de> Deserialize<'de> for WitnessData
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 WitnessData
impl PartialEq for WitnessData
Source§impl Serialize for WitnessData
impl Serialize for WitnessData
Source§impl ToSchema for WitnessData
impl ToSchema for WitnessData
impl Eq for WitnessData
impl StructuralPartialEq for WitnessData
Auto Trait Implementations§
impl Freeze for WitnessData
impl RefUnwindSafe for WitnessData
impl Send for WitnessData
impl Sync for WitnessData
impl Unpin for WitnessData
impl UnsafeUnpin for WitnessData
impl UnwindSafe for WitnessData
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more