Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [0.1.1] - 2026-09-15

### Added

- Verified receipts now report **what the signature binds**, not just that it is
valid. A receipt that says nothing but `VALID` asks the reader to take the
substance on trust, which is the opposite of the point of an independent
verifier. The output now lists the amount, settlement state and time, rail,
purpose, agent, policy id and policy hash, authorization id, decision record
id, artifact hash, certificate id, transaction id and payment reference —
each read from the payload that just passed both the signature and
payload-hash checks, so nothing is shown as covered by a signature that does
not cover it.
- `bindings` on `ReceiptVerifyResult`, so library consumers get the same fields
programmatically rather than re-parsing the payload.

### Fixed

- **The amount was silently dropped on every real receipt.** Production emits
`amount` as a string (`"99"`); the code tested `typeof p.amount === "number"`
and so reported no amount at all. Both forms are now accepted, and a
non-numeric value is dropped rather than coerced into something wrong.

## [0.1.0] - 2026-09-07

### Added
Expand Down
34 changes: 31 additions & 3 deletions dist/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cli.js.map

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions dist/receipt.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,31 @@ export interface ReceiptVerifyResult {
settlement_state?: string | null;
amount_cents?: number | null;
currency?: string | null;
/**
* What the signature actually covers.
*
* A signature is only as interesting as the things it binds, and a receipt
* that says nothing but "VALID" invites the reader to take the rest on
* trust — which is the opposite of the point. These fields are read out of
* the *verified* payload, so they are displayed only after the signature and
* payload hash have both passed.
*/
bindings?: {
policy_id?: string | null;
policy_hash?: string | null;
policy_version?: string | null;
authorization_id?: string | null;
decision_record_id?: string | null;
artifact_hash?: string | null;
certificate_id?: string | null;
transaction_id?: string | null;
external_reference?: string | null;
purpose?: string | null;
agent_id?: string | null;
rail?: string | null;
status?: string | null;
settled_at?: string | null;
};
}
interface ReceiptEnvelope {
payload: Record<string, unknown>;
Expand Down
2 changes: 1 addition & 1 deletion dist/receipt.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 37 additions & 1 deletion dist/receipt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading