Abstract
A domain declares the overlay services it hosts in a metanet.overlays object in its /manifest.json, mapping service names to the base URL that serves them.
Motivation
Application URLs name domains, and a domain's overlay is routinely hosted somewhere other than its website. Without a declaration a client is left guessing at conventions such as an api. prefix. BRC-68 established /manifest.json as where a domain publishes details about itself, and BRC-73 and BRC-169 added their own objects there; this adds one for overlay services.
BRC-88 answers a different question. SHIP tells a client which hosts serve a topic anywhere on the network. This tells it what one named domain hosts. The two are complementary.
Specification
The key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY in this document are to be interpreted as described in RFC 2119.
A domain hosting overlay services publishes a metanet.overlays object in the /manifest.json served at its root:
{
"metanet": {
"overlays": {
"tm_example": "https://api.example.com",
"ls_example": "https://api.example.com",
"tm_other": "https://other.example.net/overlay"
}
}
}
- Each key is the name of a BRC-22 topic manager or BRC-24 lookup service, exactly as it is named in submission and lookup requests. The BRC-87 naming conventions distinguish the two, so the map needs no further structure.
- Each value is the base URL a client resolves that service's routes against. Those routes are defined by BRC-22, BRC-24 and the service's own specification, and MUST NOT be respecified here.
- Services MAY name different hosts, including hosts the domain does not control.
- A client MUST ignore keys it does not recognise.
To resolve a domain, a client fetches https://<domain>/manifest.json and reads metanet.overlays. If the document, the object, or the entry for the service sought is absent, that domain does not offer that service; the client MUST NOT probe hostnames or contact a host the user did not name.
A domain declares what it chooses to declare, secured by control of the domain. A client MUST NOT infer that a declared host is trustworthy, only that the domain claims it.