Skip to content

Vocabulary

The cardano: predicates emitted by cq-rdf body are defined by an ontology owned by this repository. Treasury-accountability overlays use the separate treasury: namespace so application terms do not pollute the ledger-level Cardano vocabulary; treasury predicates are emitted by cq-rdf overlay when an operator overlay.yaml imports them.

Namespaces and dereference URLs

Prefix Namespace IRI Ontology file
cardano: https://lambdasistemi.github.io/cardano-ledger-rdf/vocab/cardano# vocab/cardano/transactions.ttl
treasury: https://lambdasistemi.github.io/cardano-ledger-rdf/vocab/treasury# vocab/treasury/overlay.ttl

The namespace IRI ends in #; stripping the fragment yields the base URL of the namespace. Each base URL serves a small landing page that links to the canonical Turtle document, so an LLM, an RDF tool, or a human pasting the IRI into a browser always lands on something useful:

The TTL sources are mirrored from the repository root verbatim:

Ownership

lambdasistemi/cardano-ledger-rdf is the source of truth for the cardano: namespace. Changes go through PRs on this repo; downstream consumers (the case studies here, cardano-tx-tools, the cardano-knowledge-maps graph browser) pin against tagged releases.

The vocabulary was migrated from cardano-knowledge-maps in #19 so the ontology now travels with the code that emits its predicates.

Standard prefix in SPARQL

PREFIX cardano:  <https://lambdasistemi.github.io/cardano-ledger-rdf/vocab/cardano#>
PREFIX treasury: <https://lambdasistemi.github.io/cardano-ledger-rdf/vocab/treasury#>

Every query under Case studies opens with this PREFIX line. Case-study overlay.yaml files opt in to the treasury namespace via an imports: [treasury] block; predicates from non-imported ontologies fail the YAML parser with a clear error.

Validation

A local validation gate (#40, ported from cardano-knowledge-maps) runs in CI and nix flake check, and locally via just:

Gate Recipe Script Checks
vocab-validate just vocab-validate scripts/validate-ttl.py TTL well-formedness of every vocab/**/*.ttl
vocab-owl-smoke just vocab-owl-smoke scripts/owl-smoke.py OWL 2 RL inference smokes over the EYE closure
vocab-accessibility just vocab-accessibility scripts/vocab-accessibility.py every term carries a label/comment for dereference

All three are also nix flake check derivations (vocab-validate, vocab-owl-smoke, vocab-accessibility in nix/checks.nix) and run on every push.