Repository navigation
Declare the gib overlay in the manifest, per BRC-180 - #3
Merged
Merged
Conversation
BRC-180 (bsv-blockchain/BRCs#262) adds a `metanet.overlays` object to `/manifest.json`: a map from overlay service name to the base URL a client resolves that service's routes against. It answers "what does this domain host", which BRC-88 SHIP does not — SHIP says who on the network serves a topic, this says what one named domain claims. gibhub declares exactly the two services the 1Sat stack runs for gib and nothing else: `tm_gib` and `ls_gib`, verified against `TopicName` and `LookupName` in 1sat-stack's `pkg/gib/config.go` and against the live `listTopicManagers` / `listLookupServiceProviders` on api.1sat.app. The stack hosts other overlays; this site has nothing to do with them. Both values are `${STACK_URL}/1sat/gib/overlay`, built with `stackApiUrl`, so the manifest follows NEXT_PUBLIC_ONESAT_STACK_URL instead of repeating the hostname. The path matters: BRC-180 keys name BRC-22 topic managers and BRC-24 lookup services, and the stack mounts `/submit`, `/lookup` and the list routes under `/1sat/gib/overlay` — at the stack root they 404. The stack's plain REST routes and ORDFS `/content/…` resolve against the root, but a BRC-180 consumer is not calling those. The Go CLI splits it the same way, keeping a host-only `Base` and appending its own `OverlayPath`. The PWA fields, the BRC-73 `groupPermissions` block, `babbage.trust` and the CORS header are untouched. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EM5trZ4BfZpW7pBjq2onqX
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BRC-180 adds a
metanet.overlaysobject to/manifest.json: a map from overlay service name to the base URL a client resolves that service's routes against. It answers what does this domain host — complementary to BRC-88 SHIP, which answers who on the network serves this topic. It sits alongside the BRC-73groupPermissionsblock already in the samemetanetnamespace.As served:
Service names
Exactly the two services the 1Sat stack runs for gib, and nothing else — the stack hosts other overlays, but this site has nothing to do with them. Verified two ways:
TopicName = "tm_gib"andLookupName = "ls_gib"in 1sat-stackpkg/gib/config.go(the constantspkg/gib/topic.goandpkg/gib/lookup.goreport as their metadata).GET /1sat/gib/overlay/listTopicManagers→{"tm_gib":…},listLookupServiceProviders→{"ls_gib":…}.Why the value carries a path
This is the one part that deviates from the brief, deliberately. BRC-180 keys name BRC-22 topic managers and BRC-24 lookup services, so the base has to be where those routes live. On api.1sat.app:
POST /submitPOST /lookupGET /listTopicManagersPOST /1sat/gib/overlay/submitGET /1sat/gib/overlay/listTopicManagersA conforming client handed the bare host would POST to
https://api.1sat.app/submitand get a 404. The stack's plain REST routes (/1sat/gib/heads,/1sat/beef/{txid}) and ORDFS/content/…do resolve against the root, which is what makes the bare host tempting — but a BRC-180 consumer is not calling those. The Go CLI splits it the same way:internal/remote/client.gokeeps a host-onlyBaseand appends its ownOverlayPath = "/1sat/gib/overlay"before submitting. The spec's own example includes a path-bearing value for the same reason.Derivation
Both values are built with
stackApiUrlfromlib/stack.ts, so the manifest followsNEXT_PUBLIC_ONESAT_STACK_URLand the hostname is never written down twice.Untouched
PWA fields,
groupPermissions,babbage.trust, and theaccess-control-allow-origin: *header.Verified
bun run lint,bun run typecheck,bun test(37 pass),bun run buildall pass. Fetched/manifest.jsonfrom a dev server: the object parses and sits insidemetanetnext togroupPermissions, with the CORS and cache headers intact.Docs updated in
AGENTS.md(route table plus a new section on the path, since it is the easy thing to get wrong) andskills/gibhub/SKILL.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01EM5trZ4BfZpW7pBjq2onqX