Skip to main content

Module authority_attestation

Module authority_attestation 

Source
Expand description

Authority attestation — the general domain model of which a “government letter” is one preset.

A GovernmentLetter (see welfare_support.rs) is only the narrow special case where the authorizing body happens to be a government. The general concept is an authority attestation: some authority (a government, but equally a pathology company, a university, a bank, an NGO) attests something about a subject, optionally through an agent-in-capacity (the natural person or software agent acting for that authority in a stated role), and delivers it in one of several orthogonal representations (a PDF, a verifiable credential, or a PDF with an embedded credential).

The authority type is a URI-ish string id, NOT a closed enum — "authority:government" is just a well-known upper-level constant. Downstream owners coin their own type ids freely ("authority:pathology:acme-labs", etc.) without touching this file.

Like the other WellFair Restricted records, the attestation body lives out-of-band as a blob (blob_hash) — the PDF / credential bytes live in the content-addressed blob store, and this struct is the indexable envelope over them, flagging whether the owner must act.

Re-exports§

pub use authority_type::EDUCATION;
pub use authority_type::FINANCIAL;
pub use authority_type::GOVERNMENT;
pub use authority_type::NGO;
pub use authority_type::PATHOLOGY;

Modules§

authority_type
Well-known upper-level authority type ids.

Structs§

AgentInCapacity
A natural person (or software agent) acting FOR the authority in a stated capacity/role — e.g. a pathologist signing off a result, a case officer issuing a determination.
Authority
The authorizing body behind an attestation.
AuthorityAttestation
An attestation issued by an authority (through an optional agent-in-capacity) about a subject.

Enums§

Representation
How an attestation is delivered — ORTHOGONAL to its content.

Functions§

authority_attestation_record_id
record ID.
authority_attestation_summary
A compact JSON projection of an attestation for journal display.
build_authority_attestation_envelope
Build the Restricted envelope for an authority attestation.
government_letter
The “government letter” specialization: an AuthorityAttestation whose authority is a government (authority_type::GOVERNMENT), labelled from sender, delivered as a Pdf.
parse_authority_attestation_summary
Parse a compact projection produced by authority_attestation_summary back into a value.