open-standards/wai/wai-quantum-service/testdata
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 5794be59d1 wai-quantum-service: receipts sign the RFC 8785 canonical text, so a result verifies after any JSON reader has carried it
A browser's JSON.parse and JSON.stringify turn 1.0 into 1, so a receipt over
serde_json's own text could not be checked from JavaScript (the console, or
any JS agent). The digest now covers the canonical text of the request and
the result: keys sorted by UTF-16 code units, no whitespace, every number as
ECMAScript's Number::toString writes the double, ties between equally near
shortest digits going to the even one, as the standard asks. The receipt
names the form ("canon": "rfc8785"); receipts issued before it still
verify. serde_json reads numbers correctly rounded (float_roundtrip), and a
request whose whole numbers a double cannot hold is refused. Checked against
a JavaScript engine: RFC 8785's appendix B and 3,385 vectors in the tests,
and 2 million random doubles in an opt-in test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 10:20:41 -04:00
..
es-number-tostring.txt wai-quantum-service: receipts sign the RFC 8785 canonical text, so a result verifies after any JSON reader has carried it 2026-10-18 10:20:41 -04:00