A receipt's content holds exactly:¶
- "type":
-
"provared.stub.v0"¶
- "id":
-
An identifier.¶
- "slip":
-
The digest of the permission.¶
- "seq":
-
Its place in its chain, from 0.¶
- "previous":
-
The digest of the receipt before it; present if and only if "seq" is
not 0.¶
- "action":
-
An action name.¶
- "amount":
-
Optional: an amount.¶
- "with":
-
Optional: the "id" of a service.¶
- "details":
-
Optional: 1 to 32 maps {"name", "sha256"}, the documents involved.¶
- "approval":
-
Optional: the digest of an approval.¶
- "pass":
-
Optional: the digest of the delegation a helper acts under.¶
- "terms":
-
Optional, with "with": the digest of a service's terms [FORMAT].¶
- "when":
-
The time of the action, as the agent states it.¶
Document names that begin "provared." are reserved. In a receipt's or
an approval's "details", a name that begins so MUST be one of the seven
names of Section 27 of [FORMAT]:
"provared.arguments", "provared.http-request",
"provared.http-response", "provared.trace-id", "provared.request-id",
"provared.event-id", or "provared.error" (bad-field). Of these, only
"provared.trace-id", "provared.request-id", and "provared.event-id" may
be named more than once in one record (bad-field). [FORMAT] states
the exact text whose digest each reserved name carries; a core verifier
checks the names, not the digests.¶
The permission and any delegation named are records relied on
(Section 4.8). Both signatures MUST verify with the agent's keys or, for
a helper, with the "to" keys of its delegation (signature-invalid). A
core verifier accepts no terms entry, so it reports a receipt that holds
"terms" as terms-not-found.¶
The receipts of the permission's own agent form one chain, and those
under each delegation another. In each chain, in log order, the first
has "seq" 0. Each later one has the next "seq" and names the one before
in "previous" (chain-broken), and is not dated before it
(time-went-backwards). A receipt with a problem keeps its place in its
chain, provided its content could be read and the records it relies on
were found: the next receipt is checked against it. So one break is
reported once.¶
A countersignature has exactly the content {"stub": the receipt's
digest, "type": "provared.countersignature.v0", "when": a time}, and
states that the action took place with the service. It is carried in
the receipt's log entry and signed with the key set the permission
gives for the service the receipt names in "with". A verifier MUST
confirm "stub" (countersignature-wrong-stub), that such keys exist
(countersignature-not-possible), and both signatures
(countersignature-invalid). A receipt without a countersignature is
one-sided. This is a reported state, not a problem: such a receipt shows
only what the agent stated.¶
Where an executor (Section 2) is to countersign, a receipt names the
executor in "with", since a countersignature is verified with the keys
that the permission gives for the service the receipt names. The party
beyond the executor, if there is one, is then not named in "with", and
the permission's "with" does not limit which such parties the agent
deals with; a reserved document name such as "provared.http-request"
can bind the receipt to the call the executor made. Where that party
countersigns instead, the receipt names it, and the executor is not
named.¶
An approval is the principal's approval of exactly one action. Its
content holds exactly "type" ("provared.approval.v0"), "id", "slip",
"action", and "when", and optionally "amount", "with", and "details". It
is signed with the permission's passkey and carried in the receipt's
entry, and the receipt names it by its digest. The receipt MUST name
the approval in its entry (approval-mismatch), and an approval it names
MUST be there (approval-not-found). The approval's "slip", "action",
"amount", "with", and "details" MUST match the receipt's, each present
in both or neither (approval-mismatch). Its "id" MUST NOT be that of an
approval in an earlier entry (approval-reused) or of another record
(duplicate-id). Its passkey signature MUST verify against the
permission's "issuer" (approval-invalid). It MUST NOT be dated more than
300 seconds after the receipt, which was signed after it
(approval-dated-after-stub). An approval shows that the passkey
approved the action, not that the principal read it.¶