pub struct TrustRootWitness {
pub witness_did: CanonicalDid,
pub name: String,
pub public_key: Ed25519PublicKey,
pub operator_info: Option<WitnessOperatorInfo>,
}Expand description
A trusted witness in the TrustRoot.
Args:
witness_did— The witness’s device DID.name— Human-readable witness name.public_key— Witness Ed25519 public key.
Usage:
ⓘ
let witness = TrustRootWitness {
witness_did: CanonicalDid::parse("did:key:z6Mk...")?,
name: "witness-1".into(),
public_key: Ed25519PublicKey::from_bytes(key_bytes),
};Fields§
§witness_did: CanonicalDidThe witness’s device DID.
name: StringHuman-readable witness name.
public_key: Ed25519PublicKeyWitness Ed25519 public key.
operator_info: Option<WitnessOperatorInfo>Operator-independence attributes (shared WitnessOperatorInfo). Absent ⇒
this witness cannot contribute to proving cosigning-quorum independence.
Implementations§
Source§impl TrustRootWitness
impl TrustRootWitness
Sourcepub fn operator_attributes(&self) -> Option<OperatorAttributes>
pub fn operator_attributes(&self) -> Option<OperatorAttributes>
Build the OperatorAttributes for this witness, keyed by its public key.
Returns None when the witness has no operator_info — the caller must
treat that as “independence cannot be proven”, not as a distinct operator.
Args:
self: The trusted witness.
Usage:
ⓘ
let attrs = witness.operator_attributes();Trait Implementations§
Source§impl Clone for TrustRootWitness
impl Clone for TrustRootWitness
Source§fn clone(&self) -> TrustRootWitness
fn clone(&self) -> TrustRootWitness
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 TrustRootWitness
impl Debug for TrustRootWitness
Source§impl<'de> Deserialize<'de> for TrustRootWitness
impl<'de> Deserialize<'de> for TrustRootWitness
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
Auto Trait Implementations§
impl Freeze for TrustRootWitness
impl RefUnwindSafe for TrustRootWitness
impl Send for TrustRootWitness
impl Sync for TrustRootWitness
impl Unpin for TrustRootWitness
impl UnsafeUnpin for TrustRootWitness
impl UnwindSafe for TrustRootWitness
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