Skip to main content

Module receipt

Module receipt 

Source
Expand description

The Receipt: an offline-verifiable, Ed25519-signed record of a session.

Payload per the brief Module G: session id, agent identity block (version/charter/instance_uid), tool-call summary, cost, stop reason, event-chain hash, signature, signer public-key reference. Subjects are an enum so the same envelope covers signed-workflow chains and retroactive ATIF promotions (Module H reconciliation).

Money is carried as integer micro-USD — floats never touch a signed field.

Structs§

CostSummary
Aggregate cost for the session (integers only — JCS-exact).
Receipt
A complete receipt: body + detached signature over the version’s signing message (see signing_message — bare JCS(body) for v1, domain-tagged and length-framed JCS(body) for v2).
ReceiptBody
The signed body (everything except the signature itself).
ToolCallSummary
Aggregate tool-call statistics for the session.

Enums§

ReceiptError
Receipt errors.
ReceiptSubject
What this receipt attests.

Constants§

RECEIPT_DOMAIN_TAG_V2
Domain-separation tag prepended to every version-2 receipt signing message. The trailing NUL makes the tag self-delimiting so no JCS body could extend it into a different tag.
RECEIPT_VERSION
Version of the receipt format itself (evolution surface).

Functions§

new_body
Convenience constructor filling issuance time and ids.
signing_message
Build the exact byte message the receipt signature covers for a given receipt_version, from the JCS canonical form of the body.