Attestations¶
Query and inspect attestation chains.
Attestation
dataclass
¶
Attestation(rid: str, issuer: str, subject: str, device_did: str, capabilities: list[str], signer_type: str | None, expires_at: str | None, revoked_at: str | None, created_at: str | None, delegated_by: str | None, json: str)
A cryptographic authorization linking an identity to a device or agent.
The .json field contains the canonical JSON representation — pass it
directly to auths.verify() or store it for later verification.
capabilities
instance-attribute
¶
Granted capabilities (e.g. ["sign", "verify"]).
signer_type
instance-attribute
¶
Signer classification: "Human", "Agent", or "Workload".
expires_at
instance-attribute
¶
ISO 8601 expiry timestamp, or None for non-expiring attestations.
revoked_at
instance-attribute
¶
ISO 8601 revocation timestamp, or None if still active.
delegated_by
instance-attribute
¶
DID of the delegating identity, if this is a delegation attestation.
AttestationService
¶
AttestationService(client: Auths)
Query attestations in the identity graph.
Examples:
all_atts = auths.attestations.list()
device_atts = auths.attestations.list(device_did="did:key:z...")
latest = auths.attestations.latest("did:key:z...")
list
¶
list(*, identity_did: str | None = None, device_did: str | None = None) -> list[Attestation]
List attestations, optionally filtered by identity or device.
Parameters:
-
identity_did(str | None, default:None) –Filter to attestations issued by this identity.
-
device_did(str | None, default:None) –Filter to attestations for this device.
Returns:
-
list[Attestation]–List of Attestation objects. Empty list if no matches.
latest
¶
latest(device_did: str) -> Attestation | None
Get the most recent attestation for a device.
Parameters:
-
device_did(str) –The device DID to query.
Returns:
-
Attestation | None–The latest Attestation, or None if the device has no attestations.