An open format for curated, subscribable, Bitcoin-verifiable catalogues of publishers, places and routes. Anyone can publish one; any client speaking the standard can consume it. The BE_TAM app ships with the BE_TAM catalogue as its pre-installed primary source and lets users add any other catalogue by URL.
Redefined 2026-07-21 (pre-publication, no documents existed in the wild): unified entry model with a
kinddiscriminator and a required cataloguetitle. One theme = one catalogue: "Kam na pivo" IS a catalogue; a curator with N themes publishes N catalogues.
1. Document #
A catalogue is a single JSON document served over HTTPS:
{
"standard": "betam-catalog/1",
"publishedAt": "2026-09-01T12:00:00Z",
"publisher": { "name": "BE_TAM", "npub": "<64-hex, optional>" },
"title": "Kam na pivo",
"description": "optional, ≤500 chars",
"entries": [
{
"kind": "creator",
"npub": "<64-hex publisher pubkey>",
"registryKey": "<64-hex channel-registry pointer>",
"displayName": "Cvernovka",
"category": "venue",
"description": "optional, ≤500 chars",
"placeId": "<64-hex, optional: links the entry to a BE_TAM place>",
"geohash": "u2s1v (optional, precision 4–8)",
"promoted": { "rank": 1 }
},
{
"kind": "place",
"id": "cvernovka-taproom",
"name": "Cvernovka Taproom",
"lat": 48.1543,
"lng": 17.1348,
"type": "pub",
"note": "optional curator sentence, ≤280",
"castle:history": "rich extensions attach as namespaced fields"
},
{
"kind": "catalog",
"url": "https://curator.example/kam-na-kavu/catalog.json",
"name": "Kam na kávu"
},
{
"kind": "route",
"routeKey": "<64-hex route key>",
"name": "Pivný okruh Starým Mestom",
"description": "optional, ≤500 chars"
}
]
}
titleis required: the catalogue's theme.descriptionoptional.- Every entry carries a required
kind. Four kinds are defined:kind: "creator": a subscribable publisher. Required:npub,registryKey,displayName,category.npub+registryKeyform the subscribe handle (tam://<npub>?r=<registryKey>); both are 64-hex. Optional:description(≤500),placeId,geohash,promoted.kind: "place": a named point in space; no betam identity required (a curator lists a venue before the venue ever claims one). Required core is exactlyid(free string, unique within the document),name(≤80),lat,lng,type(free string, ≤32); a motivated developer must produce a valid catalogue from a CSV in one afternoon. Optional:description(≤1000),address(≤200),photo(URL),note(≤280),hours(opening-hours string; interpretation is the client's concern),links(URL list),npub(the venue's own identity once claimed),placeId(explicit join to an in-app BE_TAM place).kind: "catalog": a reference to anotherbetam-catalog/1document: catalogues compose (playlists of playlists). Required:url(https only, ≤500) andname(≤80); optionaldescription(≤500). A referenced catalogue is an independent document; its verify state is its own. Readers resolving references MUST guard against cycles and SHOULD cap resolution depth (the BE_TAM app caps at 3 levels).kind: "route": a published BE_TAM route, listed by reference. Required:routeKey(64-hex, the public key of the route's append-only core; the route itself, its stops and every later version live there, not in the catalogue) andname(≤80). Optional:description(≤500) andnpub(64-hex, the route's creator as the curator states it, so a client can keep a user's own routes out of a feed of other people's content; a client names a route's creator from the route itself, never from this field). A route key appears at most once per document. As with a place entry, a malformed route entry (a key ornpubthat is not 64-hex, a missing or over-long name) invalidates the document; only an unknownkindis skipped. A route's stops may name places (§7).
- Per-entry forward compatibility: an entry with an unknown
kindMUST be skipped (readers may surface a warning); it never invalidates the document. Future kinds extend the same list. - Unknown extra fields MUST be tolerated everywhere (read-tolerance). Rich optional data attaches as namespaced fields (
"castle:history","gov:heritage_id"); validators warn on unknown non-namespaced keys but never fail. Validation schema:packages/protocol/schemas/curated-catalog.js. - Extensions: a place's own catalogue (a hotel's "what's nearby") may add languages, inline sections, an origin, bookable services and an owner signature, all optional, all ignored by readers that predate them (§8).
- Canonical encoding: the published bytes are canonical JSON: objects with their keys sorted, no insignificant whitespace (
packages/protocol/schemas/canonical-json.js). The timestamp proof commits to these exact bytes. The order is exactly the one §8 states ("The canonical bytes, exactly"): keys sorted by UTF-16 code unit, strings and numbers as ECMAScript'sJSON.stringifywrites them, which writes an integer-like key (0,9,10…) before every other key, in numeric order. An implementation in another language must do the same for a document that holds one.
2. Ordering, promotion & consumption #
entriesarray order = the publisher's editorial order, across kinds.- Creator entries MAY carry
promoted.rank(integer ≥ 1). Clients render promoted entries first (ascending rank), then the rest in array order, and MUST label promoted entries visibly (the BE_TAM app renders[PROMOTED]+ a paid-placement caption). - In multi-source clients, catalogues MUST NOT be interleaved: each source renders as its own attributed section. Promotion is only honoured for the client's primary source.
- Consumption by kind (how the BE_TAM app does it):
creatorentries render in the catalogue/Discover surface;placeentries flow into geo surfaces (Nearby) with provenance back to the catalogue;routeentries render as route cards (the catalogue's detail and the feed), and the app reads each route from its core by the key. Other clients may choose differently; the document just carries every kind.
3. Timestamp proof (detached OpenTimestamps) #
- The proof lives at
<catalog-url>.otsand is a standard OpenTimestamps detached proof forsha256(canonical-json bytes). - Detached is mandatory: a proof cannot live inside the document whose hash it commits to. Re-stamping or upgrading the proof never rewrites
catalog.json. - Publishing flow (see
tools/catalog-publisher/):build(editorial list → canonical JSON) → optionalsign(§4) →stamp(submit to OTS calendars → pending proof) → host both files →upgradeonce the calendars anchor into Bitcoin (hours) → re-host the.ots.
4. Publisher signature (optional) #
The timestamp proof answers when; it cannot answer who. A publisher MAY additionally sign the document with a secp256k1 key:
{
"standard": "betam-catalog/1",
"…": "…",
"signature": {
"npub": "<64-hex BIP-340 x-only public key>",
"sig": "<128-hex BIP-340 schnorr signature>"
}
}
- Fully additive.
signatureis an optional top-level object; readers that predate it treat it as an unknown extra field (read-tolerance, §1) and lose nothing. An unsigned document is exactly as valid as before. - Signed message: the sha256 digest of the canonical-JSON bytes (§1) of the document with the
signaturefield removed. Because canonical encoding is key-order independent, verification survives any JSON re-serialisation that preserves content. - Scheme: BIP-340 schnorr over secp256k1, the same key family as
npubidentities elsewhere in the standard.npubis the signer's x-only public key (64-hex),sigthe 128-hex signature. - Ordering with the timestamp proof: the detached OTS proof commits to the full served bytes, signature included: sign before
stamp. Re-signing changes the bytes and requires a re-stamp. Verifying the signature never requires the proof and vice versa: the two are independent axes. - Verification verdict (separate from document validity):
| Verdict | Meaning |
|---|---|
unsigned |
No signature field. Absence of a claim: not a defect, not a downgrade of the document. |
valid |
The signature verifies over the signature-stripped canonical bytes against the embedded npub. |
invalid |
The signature object is malformed or does not verify. The document remains schema-valid: a tampered signature is not an invalid document (same honesty split as no-proof vs failed in §5). |
- What
validmeans, and what it does not. A valid signature proves integrity: these exact bytes were produced by the holder ofnpub. It does not prove identity: anyone can mint a key and put any name inpublisher. A signature whosenpubmerely matches the document's ownpublisher.npubis self-attestation. Clients MUST NOT present a valid signature as "official" or as endorsement; the honest client claim is "signed by<npub>" (the BE_TAM app renders aSIGNEDpill suffix and a# signed by <short-npub>caption). "Official" labels require an out-of-band trust anchor (a client-side list of known keys), which is outside this document's scope.
5. Verification levels (what clients should display) #
| State | Meaning |
|---|---|
verified (block H) |
Proof parses, commits to the fetched bytes, and its Bitcoin attestation digest equals the merkle root of block H (checked against independent block explorers). |
pending |
Proof commits to the bytes but only carries calendar (pending) attestations, not yet anchored. |
structural-only |
Proof commits to the bytes; the chain check was unavailable (offline / explorers unreachable or disagreeing). Show the last successful full verification if known. |
no-proof |
No .ots published. An unstamped catalogue is unverifiable, not tampered. |
failed |
The proof does not commit to the fetched bytes, or the merkle root does not match: the snapshot is not what was anchored. |
Honesty rule: never render verified without the chain check, and never claim tamper (failed) for a merely missing/unconfirmed proof.
6. Serving #
Static hosting is sufficient: two files (catalog.json, catalog.json.ots), any CDN or web server, CORS open (Access-Control-Allow-Origin: *) so in-app fetch works. Cache headers short enough for edits to propagate (the proof pins content, not the URL).
7. Place types (shared vocabulary) #
type stays a free string (§1): a hand-written catalogue from a CSV must stay possible. So that a client can filter places from any curator's catalogue the same way, the standard recommends a vocabulary: an English type id for the common kinds of place, grouped into eight kinds. A client maps a place's type to its kind; the document itself does not change.
Matching: a client compares a folded spelling. Folding, in this order:
- trim, then lower-case;
- fold the Slovak and Czech letters á ä č ď é ě í ĺ ľ ň ó ô ö ŕ ř š ť ú ů ü ý ž to their base letter;
- drop any combining accent that is left (U+0300–U+036F, so decomposed input reads the same as precomposed);
- read the dashes U+2010–U+2015 as a hyphen;
- join each run of spaces and hyphens into one
_.
So
Zámokreads aszamok, andwine barorwine–barreads aswine_bar.Aliases: a Slovak, Czech or legacy spelling listed below stands for the type id written before its arrow, so catalogues already published need no re-publish (
hradiscastle,Kopecispeak).Anything else (an empty, unknown or misspelt
type) is the kind Other. Clients MUST NOT guess a kind from a place's name or its catalogue's title. Leisure types such as an aquapark or a spa have no kind yet and read as Other.Publishers SHOULD use the type ids. A
typeoutside the list stays valid; it shows as Other.The BE_TAM app shows the kinds as the feed's "Druh miesta" filter chips, labelled as in the first column (English, then Slovak). The vocabulary's source of truth is
packages/protocol/enums/place-kinds.js.Route stops. A
routeentry carries notype; its stops can each name the place they are: a BE_TAM place by itsplaceId, or a place of anybetam-catalog/1document by that document'surland the entry'sid, together with thenameandtypethe place had when the route's author linked it. A client reads thattypethrough this vocabulary as well, so a stop shows its place's kind even when the reader's catalogues do not hold the place. The link lives in the route (BE_TAM's route records, not this document); a catalogue that lists the place needs no change.
| Kind | Type ids | Aliases (type id ← spellings) |
|---|---|---|
| Food (Jedlo) | restaurant bistro fast_food street_food bakery ice_cream |
restaurant ← reštaurácia jedáleň pizzeria salaš; fast_food ← fastfood; street_food ← food truck stánok; bakery ← pekáreň cukráreň; ice_cream ← zmrzlina zmrzlináreň |
| Drink (Pitie) | pub bar wine_bar brewery winery cocktail_bar club |
pub ← krčma hostinec piváreň pivo taproom hospoda; wine_bar ← vináreň vinotéka víno; brewery ← pivovar brewpub; winery ← vinárstvo; club ← klub nightclub |
| Coffee (Káva) | cafe tea_room |
cafe ← kaviareň kavárna káva coffee coffee shop; tea_room ← čajovňa tea house |
| Heritage (Pamiatky) | castle chateau ruins fortress monument church monastery memorial |
castle ← hrad; chateau ← zámok zámek kaštieľ palace palác; ruins ← zrúcanina zřícenina ruin castle ruins; fortress ← pevnosť fort; monument ← pamätník; church ← kostol chrám kaplnka katedrála cathedral; monastery ← kláštor klášter; memorial ← pomník |
| Nature (Príroda) | peak viewpoint park garden lake waterfall cave forest zoo |
peak ← kopec vrch vrchol hill mountain; viewpoint ← vyhliadka rozhľadňa rozhledna; garden ← záhrada; lake ← jazero; waterfall ← vodopád; cave ← jaskyňa; forest ← les |
| Culture (Kultúra) | museum gallery theatre cinema library concert_hall |
museum ← múzeum skanzen; gallery ← galéria; theatre ← divadlo theater; cinema ← kino; library ← knižnica |
| Shopping (Obchody) | shop market bookshop farm_shop |
shop ← obchod store; market ← trh trhovisko; bookshop ← kníhkupectvo |
| Lodging (Nocľah) | hotel hostel guesthouse apartment camping |
hotel ← motel; guesthouse ← penzión pension ubytovanie chata; apartment ← apartmány apartmán; camping ← kemp campsite |
8. Extensions: a place's own catalogue #
A catalogue a place makes for its guests (a hotel's selection of what is nearby) may carry these optional fields on top of §1. Each is read per field: a reader that predates them ignores them all and lists the places flat in the plain language; a newer reader that finds one broken reads that field as absent and never fails the document for it (validators warn).
{
"standard": "betam-catalog/1",
"…": "…",
"id": "q4z7m2k9x3c8v6b1n5t0r7w2ya",
"seq": 12,
"lang": "sk",
"i18n": { "en": { "title": "Tips from Hotel Dunaj", "description": "What to do nearby" } },
"origin": "hotel",
"sections": [
{ "id": "plaz", "title": "Plážový deň", "i18n": { "en": { "title": "Beach day" } } }
],
"entries": [
{ "kind": "place", "id": "hotel", "name": "Hotel Dunaj", "lat": 48.1435, "lng": 17.1077, "type": "hotel" },
{
"kind": "place",
"id": "kajak",
"name": "Požičovňa kajakov",
"lat": 48.139,
"lng": 17.115,
"type": "shop",
"npub": "<64-hex, the venue's own identity>",
"sections": ["plaz"],
"i18n": { "en": { "name": "Kayak rental", "description": "…", "note": "…" } },
"services": [{ "product": "<32-hex listing id>", "name": "Kajak 1 h", "i18n": { "en": { "name": "Kayak 1 h" } } }]
}
],
"owner": {
"key": "<64-hex ed25519 public key>",
"name": { "type": "tam/name/1", "…": "…" },
"registry": "<64-hex, optional>",
"sig": "<128-hex ed25519 signature>"
}
}
id: the catalogue's own id, 26 lowercase Crockford base32 characters (0–9anda–zwithouti,l,o,u), drawn at random by its author (128 bits). Withowner.keyit names one catalogue across all its copies.seq: a positive integer, strictly increasing per (owner.key,id): of two copies, the one with the higherseqis the newer.lang: the language of the plain text fields (title,description, an entry'sname, …), a BCP 47 primary language subtag in lower case (sk,en). Defaultsk.i18n: translations,{ "<lang>": { "<field>": "<text>" } }, on the document (title,description), on an inline section (title), on a place entry (name,description,note) and on a service (name). Keys are primary subtags; each text has the cap of the plain field it translates. At most 6 languages per text holder and per catalogue; per catalogue, the plainlangcounts as one of them (a writer's rule; a reader only drops a text holder's translations past 6).origin: theidof the place entry distances are measured from (the hotel itself). A client measures every place from it in a straight line, and states once which place that is.sections: themed sections inside the one document, in display order, each{ id, title, i18n? }with a uniqueidof 1–64 characters froma–z,0–9,_and-, and atitleof at most 80, at most 12 sections. A place entry lists the sections it is in by id ("sections": ["plaz"]); it may sit in several, and places in none come after them. These are tags, not sub-catalogues: a section published as its own document stays akind: "catalog"entry (§1).serviceson a place entry: what can be booked there, at most 6, each{ product, name, i18n? }, whereproductis the seller's 32-hex listing id andnameat most 80 characters. The seller is the place's ownnpub; a place without one has no services. The catalogue only names them: times, free places and the booking itself are the venue's.
Reading rules.
A broken field reads as absent: an
originthat names no well-formed place entry,sectionsorservicesthat are not a list, translations that are not an object of languages or hold more than 6. A malformed section or service is dropped (the first of a repeatedidorproductwins), and at most 12 sections and 6 services are read: only the first 12 items ofsections(on the document and on a place) and the first 6 ofservices, so a reader's cost does not grow with a hostile list.A
langthat names no language makes the plain fields' language unknown (never assumed Slovak): the text rule below then skips its step 2. A region tag reads as its language (de-ATis German).A section title and a service name are shown cleaned, like every text (one plain line).
Validators list at most 50 problems, then count the rest.
Text in the reader's language. One rule for apps and the web, "their own language, otherwise English":
- the translation into the reader's language (the primary subtag of the phone's or the browser's language);
- the plain field, when that language is the catalogue's
lang; - the English translation;
- the plain field.
A text counts only when it is within its cap and not blank once cleaned, so an empty translation falls back. A catalogue written in one language shows that language. Reference implementation:
pickTextinpackages/protocol/schemas/curated-catalog.js.
Owner signature #
owner names the BE_TAM identity that made the catalogue, and its signature:
key: the owner's identity, an ed25519 public key, 64 lowercase hex.name(optional): the owner's own signed name, atam/name/1record. A reader shows it only when the record'skeyisowner.keyand the record's own signature holds.registry(optional): the owner's channel-registry key, 64 lowercase hex.sig: ed25519 (RFC 8032, strict: canonical encodings, no small-order key) bykeyover the bytesbetam/catalog-owner/v1and a line feed, followed by the 32-byte sha256 digest of the canonical JSON (§1) of the document withsignatureremoved and withowner.sigremoved. It covers every field but the publisher signature (§4),publisher.npubincluded; the publisher signature, made after it, coversowner. The two keys vouch for each other: a reader that shows both checks thatsignature.npubispublisher.npub.
| Verdict | Meaning |
|---|---|
unsigned |
No owner field. |
valid |
The signature verifies over the signed bytes against owner.key. |
invalid |
The owner block is malformed (it carries exactly key and sig, plus an optional name and registry), the signed body is not plain JSON data, or the signature does not verify. The document remains schema-valid. |
- Plain JSON data: the document as received (not a copy of it) holds no
__proto__,constructororprototypekey at any depth, no integer-like key (0,9,10…), no lone UTF-16 surrogate in a string or a key, only finite numbers, and nests at most 32 levels; its signed body is at most 1.5 MiB (1 572 864 bytes) of canonical JSON. A key a parser or a copy would turn into a prototype, or a value serialised as another value, would make the signed bytes differ from the document a reader keeps, so such a document isinvalid. - The canonical bytes, exactly: object keys sorted by UTF-16 code unit, arrays in order, strings and numbers as ECMAScript's
JSON.stringifywrites them, no whitespace.JSON.stringifywrites an integer-like key before every other key, in numeric order; an owner-signed body never holds one, so the order is the plain sort in every language. - Verify the parsed object, and show that same object.
JSON.parsekeeps the last of two equal keys; an implementation whose parser does otherwise must reject a document with a duplicate key. - Writers' caps: a writer writes a catalogue with an owner of at most 300 entries and 256 KiB (262 144 bytes) of signed canonical JSON. A reader checks up to 1.5 MiB, the most the BE_TAM app stores. The reference implementation's
catalogOwnerBody,catalogOwnerDigestandcatalogOwnerMessageare a writer's: they enforce these caps, so a reader verifies withverifyCatalogOwnerand never computes the digest through them. validproves integrity and authorship by that key, not who the key belongs to (§4's rule holds).- Reference implementation:
packages/protocol/schemas/catalog-owner.js.
Mixed versions. A reader that predates this section validates such a catalogue unchanged, lists its places flat in the plain language, shows the publisher as a stated claim, and reads an owner-signed document without a publisher signature as unsigned (§4). A client that finds no origin keeps its usual view of the catalogue.