Expand description
Domain licence instruments — signed grants binding licence terms to domain names.
Implements the methodology in
docs/work-in-progress/DOMAIN_LICENCE_METHODOLOGY_WIP.md: a DomainLicence
is an Ed25519-signed JSON document (.qlic.json) that names subject domains,
a licence class, a capability scope, a validity window, optional payment
evidence, and optional chain anchors carrying the canonical digest.
Structs§
- Chain
Anchor - On-chain anchor carrying the canonical licence digest (WIP §4-B).
- Delegation
- Delegated-administration scope for steward licences (WIP §2-A).
- Domain
Licence - A signed domain licence instrument (WIP §3).
- Issue
Params - Parameters for
issue.chain_anchorsandsignature_hexare set by the issuer;licence_idis derived from a provisional digest. - Licence
Amendment - A signed roster amendment chained to a licence by
licence_id(WIP §7-13). - Licence
Registry - On-disk registry of declared domains → licences.
- Licence
Status - Introspection view for
licence_status/ UI badges. Never throws. - Payment
Evidence - Payment evidence recorded at issuance (WIP §3).
- Registry
Entry - One declared domain → licence mapping.
- Represented
Principal Context - Context binding the invoking agent to the represented principal and beneficiary.
Enums§
- Agent
Kind - Licensee agent kind — mirrors the QDP
AgentTypetoken set inclient-core/domains.rs. Unknown fails closed. - Licence
Class - Recognised licence classes (WIP §2). Unknown fails closed.
- Licence
Error - Principal
Category - Represented-principal / beneficiary usage classification (
QUALIADB-IMPLEMENTATION-ROADMAP.md§13). - Registry
Source - Where a declared domain’s licence record comes from.
Constants§
- COMPILED_
IN_ LICENSED_ DOMAINS - Domains compiled into this build as licensed (WIP §4-A “compiled-in declaration”). Client-specific builds may patch this list; the default is empty — declarations should normally travel in the signed instrument.
- LICENCE_
FORMAT - Required
formatfield value.
Functions§
- amendment_
from_ json - Parse an amendment from JSON.
- amendment_
to_ json - Serialize an amendment to JSON.
- anchor_
op_ return - The OP_RETURN payload committing a licence digest on a nominated chain.
- canonical_
bytes - Canonical signed bytes for a licence (excludes
signature_hexandchain_anchors). - canonical_
digest - SHA-256 digest of the canonical licence bytes — the value anchored on-chain.
- canonical_
digest_ tag - Digest rendered as
"sha256:<hex>"forchain_anchors[].digest. - delegated_
members - Effective member roster after applying verified amendments in seq order.
- from_
json - Parse a licence from its
.qlic.jsonfile form. - issue
- Issue and sign a licence.
- issue_
amendment - Issue a signed roster amendment chained to
licence_id(WIP §7-13). - licence_
status - Compute a status view without failing.
- normalize_
domain - Normalise a domain name for comparison: lowercase, trimmed, trailing dot and a single port suffix removed.
- to_json
- Serialize a licence to its
.qlic.jsonfile form. - verify
- Full fail-closed verification of a licence for a serving domain + scope.
- verify_
amendment - Verify an amendment against its base licence (id match + issuer signature).
- verify_
represented_ principal - Verify that a
DomainLicenceclass is valid for theRepresentedPrincipalContext.