Skip to content

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.

rid instance-attribute

rid: str

Unique attestation resource identifier.

issuer instance-attribute

issuer: str

DID of the identity that issued this attestation.

subject instance-attribute

subject: str

DID of the entity this attestation authorizes.

device_did instance-attribute

device_did: str

DID of the device key bound by this attestation.

capabilities instance-attribute

capabilities: list[str]

Granted capabilities (e.g. ["sign", "verify"]).

signer_type instance-attribute

signer_type: str | None

Signer classification: "Human", "Agent", or "Workload".

expires_at instance-attribute

expires_at: str | None

ISO 8601 expiry timestamp, or None for non-expiring attestations.

revoked_at instance-attribute

revoked_at: str | None

ISO 8601 revocation timestamp, or None if still active.

created_at instance-attribute

created_at: str | None

ISO 8601 creation timestamp.

delegated_by instance-attribute

delegated_by: str | None

DID of the delegating identity, if this is a delegation attestation.

json instance-attribute

json: str

Canonical JSON representation of the attestation.

is_active property

is_active: bool

True if not revoked.

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.