Skip to main content

ActivityRecord

Struct ActivityRecord 

Source
pub struct ActivityRecord {
Show 20 fields pub schema: String, pub id: String, pub frontier_id: String, pub against_head: String, pub assertion: String, pub assertion_type: String, pub artifacts: Vec<RecordArtifact>, pub verifier_runs: Vec<RecordVerifierRun>, pub caveats: Vec<String>, pub source: Option<RecordSource>, pub source_refs: Vec<String>, pub receipt_digest: String, pub receipt_path: String, pub operation_id: String, pub lineage: Option<ReceiptLineage>, pub supersedes: Option<String>, pub emitted_by: String, pub emitted_at: String, pub signature: String, pub signer_pubkey_hex: String,
}

Fields§

§schema: String§id: String

Content-addressed id: vrc_ + sha256(canonical body, id = “”)[:16].

§frontier_id: String

The frontier this proposes against.

§against_head: String

The frontier head (event_log_hash) at emit time — the staleness pin.

§assertion: String

The claim: what the emitter asserts is now known / bounded / refuted.

§assertion_type: String

Claim type, mirroring finding types: theoretical, computational, empirical, negative.

§artifacts: Vec<RecordArtifact>§verifier_runs: Vec<RecordVerifierRun>§caveats: Vec<String>

What this claim does NOT establish. Required non-empty: a receipt with no stated limits is advertising, not science.

§source: Option<RecordSource>

Scientific source of record. Optional for legacy records.

§source_refs: Vec<String>

External references the proposal should cite. They are descriptive provenance and may include content-addressed artifact refs.

§receipt_digest: String

Canonical digest of the complete logical receipt supplied to land. It binds review input but carries no acceptance authority.

§receipt_path: String

Frontier-relative locator of the canonical, lossless Receipt v1 bytes. New records use this pointer as their evidence source of truth; the older flattened fields remain a deterministic compatibility index.

§operation_id: String

Client operation identity that made the record durable. This separates an exact retry from a same-claim receipt carrying independent evidence.

§lineage: Option<ReceiptLineage>

Producer-declared lineage copied from the receipt for review. The gate may validate it; its presence never makes the claim accepted.

§supersedes: Option<String>

The vrc_ id of the record revision this one supersedes (optional; absent on legacy records, so their ids are byte-unchanged). Records are content-addressed — a revision mints a new id — so continuity across revisions is a back-pointer chain, the same affordance as FindingBundle.previous_version and ScientificDiffPack.parent_pack. Deliberate substitute for a stable-id + revision-digest pairing; see docs/adr/0002.

§emitted_by: String

Who emitted (agent:…, ci:…, reviewer:…). Agents welcome — emitting is proposing, never deciding.

§emitted_at: String§signature: String

Ed25519 over the canonical body with signature empty. OPTIONAL: an unsigned receipt is still validatable and landable; validate reports signed=false loudly.

§signer_pubkey_hex: String

Implementations§

Source§

impl ActivityRecord

Source

pub fn build( draft: ActivityRecordDraft, key: Option<&SigningKey>, ) -> Result<Self, String>

Build and content-address; sign iff a key is supplied.

Source

pub fn signing_bytes(&self) -> Result<Vec<u8>, String>

Canonical bytes with signature cleared (the id is signed content; the signature is not part of the id).

Source

pub fn derive_id(&self) -> Result<String, String>

Source

pub fn to_finding_draft( &self, staleness: &str, signed: bool, ) -> FindingDraftOptions

Shape this record into the standard finding.add proposal draft. The emitter is the acting originator. When source metadata is present, scientific authorship comes from the external source of record.

Source

pub fn to_finding_proposal_at( &self, staleness: &str, signed: bool, at: &str, ) -> Result<StateProposal, String>

Build the pending finding proposal that indexes this record while retaining the canonical receipt as the evidence source of truth.

The vela_submission block carries typed roots and relations only; it does not flatten a second receipt body into the proposal. The injected timestamp lets a transaction stage deterministic bytes before its durable marker.

Source

pub fn verify(&self) -> Result<bool, String>

Full integrity check: schema, id re-derivation, namespace, and — when a signature is present — verification under the embedded pubkey. Returns whether the receipt is signed.

Trait Implementations§

Source§

impl Clone for ActivityRecord

Source§

fn clone(&self) -> ActivityRecord

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ActivityRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ActivityRecord

Source§

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 ActivityRecord

Source§

fn eq(&self, other: &ActivityRecord) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ActivityRecord

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ActivityRecord

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V