Barcode verified
The protocol,for machines.
Two schemas and one suite. Everything an implementation needs to conform.
match record · receipt · conformance
Conformance suite
The suite an implementation runs to be listed on the keyring as an issuer. Each case names what it checks; a node scopes the cases for its market and adds its own.
Matcher (section 1)
| Case | Checks |
|---|---|
| M-01 | A barcode given as words resolves to itself, outcome one, confidence 1 |
| M-02 | An offer line naming brand, product and size resolves to one barcode when the record holds exactly one |
| M-03 | Two candidates the words cannot tell apart give ambiguous, both listed, none chosen |
| M-04 | Words the record holds nothing for give unknown, never a nearest guess |
| M-05 | A size that disagrees (500 ml asked, 330 ml held) never binds |
| M-06 | A multipack count that disagrees (6 asked, 4 held) never binds |
| M-07 | A variant word on the candidate the words lack (flavour, scent, size word) lowers it below the exact product |
| M-08 | The United Kingdom is written UK |
| M-09 | Every call writes one match record with its match hash |
Policy (section 2)
| Case | Checks |
|---|---|
| P-01 | The four dimensions are read independently and returned on every single-match result |
| P-02 | verified only when all four hold; listed when the record holds the product and one fails |
| P-03 | A field past its clock gives stale, never verified |
| P-04 | Price, stock and offer are never returned as verified from the record |
| P-05 | When the record is not answering, the result is unknown and says so; no cached answer |
Receipt (section 3)
| Case | Checks |
|---|---|
| R-01 | The receipt carries every required field, both versions pinned |
| R-02 | The hash recomputes; the id derives from the hash; the signature verifies under the key id on the keyring |
| R-03 | prev_hash is the hash of the issuer's previous receipt; seq rises by one |
| R-04 | A changed field fails verification |
| R-05 | A superseding receipt names the one it supersedes; the earlier one still verifies |
| R-06 | Writing needs the issuer credential; verifying needs none |
Node scope
A node lists which cases apply in its market and adds market cases (its pack words, its units, its private-label terms) in its scope file.
Contact
Questions about the specification. One form, read by a person.