pub struct WitnessStatement {
pub format_version: u16,
pub witness: String,
pub home_node_id: String,
pub snapshot: String,
pub at_seq: u64,
pub seen_at_seq: u64,
}Expand description
A seed’s word that it folded the home’s attestation snapshot (D80).
Its own object, under its own format_version, served and never
written into anybody’s log: a seed that cosigned through the home
would have to win a race against every new attestation, and a
statement compared by ancestry does not care how many landed since.
Fields§
§format_version: u16Version of this object’s shape; 1.
witness: StringThe seed’s actor id: the hash of the key that signs this.
home_node_id: StringThe home’s node actor id, which signed the attestation.
snapshot: StringThe attestation’s id, choir_view::RefSnapshot::id, as hex.
at_seq: u64The log position the attestation occupies.
seen_at_seq: u64The last seq the seed had folded when it signed.
Implementations§
Source§impl WitnessStatement
impl WitnessStatement
Sourcepub fn canonical_bytes(&self) -> Vec<u8> ⓘ
pub fn canonical_bytes(&self) -> Vec<u8> ⓘ
The bytes that are signed: compact JSON, fields in declaration order.
Written out rather than left to a map’s iteration order, because
whether serde_json sorts object keys depends on a feature any
crate in a build can switch on, and a signature over bytes that
move with the build is a signature over nothing.
Trait Implementations§
Source§impl Clone for WitnessStatement
impl Clone for WitnessStatement
Source§fn clone(&self) -> WitnessStatement
fn clone(&self) -> WitnessStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WitnessStatement
impl Debug for WitnessStatement
Source§impl PartialEq for WitnessStatement
impl PartialEq for WitnessStatement
Source§fn eq(&self, other: &WitnessStatement) -> bool
fn eq(&self, other: &WitnessStatement) -> bool
self and other values to be equal, and is used by ==.