For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::facts

Struct Fact

pub struct Fact {
    pub fact_type_id: Field,
    pub payload: EphemeralArray<Field>,
    pub origin_block: Option<OriginBlock>,
}

A single immutable fact in a collection.

Fields

fact_type_id: Field

A user-defined identifier for fact kinds. Typically used to determine how to deserialize payload.

origin_block: Option<OriginBlock>

The block the fact is associated to, if any. A fact with an origin block is said to be a 'retractable' fact, and will be automatically deleted if its origin block gets pruned in a reorg. Typically used by facts associated with a transaction (e.g. 'processed entry X using data from tx Y in block Z').

Trait implementations

impl Deserialize for Fact

pub fn deserialize(fields: [Field; 5]) -> Self pub fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self

impl Serialize for Fact

pub fn serialize(self) -> [Field; 5] pub fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>)