pub struct Attestation {Show 16 fields
pub version: u32,
pub rid: ResourceId,
pub issuer: IdentityDID,
pub subject: DeviceDID,
pub device_public_key: Ed25519PublicKey,
pub identity_signature: Ed25519Signature,
pub device_signature: Ed25519Signature,
pub revoked_at: Option<DateTime<Utc>>,
pub expires_at: Option<DateTime<Utc>>,
pub timestamp: Option<DateTime<Utc>>,
pub note: Option<String>,
pub payload: Option<Value>,
pub role: Option<Role>,
pub capabilities: Vec<Capability>,
pub delegated_by: Option<IdentityDID>,
pub signer_type: Option<SignerType>,
}Expand description
Represents a 2-way key attestation between a primary identity and a device key.
Fields§
§version: u32Schema version.
rid: ResourceIdRecord identifier linking this attestation to its storage ref.
issuer: IdentityDIDDID of the issuing identity.
subject: DeviceDIDDID of the device being attested.
device_public_key: Ed25519PublicKeyEd25519 public key of the device (32 bytes, hex-encoded in JSON).
identity_signature: Ed25519SignatureIssuer’s Ed25519 signature over the canonical attestation data (hex-encoded in JSON).
device_signature: Ed25519SignatureDevice’s Ed25519 signature over the canonical attestation data (hex-encoded in JSON).
revoked_at: Option<DateTime<Utc>>Timestamp when the attestation was revoked, if applicable.
expires_at: Option<DateTime<Utc>>Expiration timestamp, if set.
timestamp: Option<DateTime<Utc>>Creation timestamp.
note: Option<String>Optional human-readable note.
payload: Option<Value>Optional arbitrary JSON payload.
role: Option<Role>Role for org membership attestations.
capabilities: Vec<Capability>Capabilities this attestation grants.
delegated_by: Option<IdentityDID>DID of the attestation that delegated authority (for chain tracking).
signer_type: Option<SignerType>The type of entity that produced this signature (human, agent, workload). Included in the canonical JSON before signing — the signature covers this field.
Implementations§
Source§impl Attestation
impl Attestation
Sourcepub fn is_revoked(&self) -> bool
pub fn is_revoked(&self) -> bool
Returns true if this attestation has been revoked.
Sourcepub fn from_json(json_bytes: &[u8]) -> Result<Self, AttestationError>
pub fn from_json(json_bytes: &[u8]) -> Result<Self, AttestationError>
Deserializes an Attestation from JSON bytes.
Returns an error if the input exceeds MAX_ATTESTATION_JSON_SIZE (64 KiB).
Sourcepub fn to_debug_string(&self) -> String
pub fn to_debug_string(&self) -> String
Formats the attestation contents for debug or inspection purposes.
Trait Implementations§
Source§impl Clone for Attestation
impl Clone for Attestation
Source§fn clone(&self) -> Attestation
fn clone(&self) -> Attestation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more