Skip to content

feat(nip34,nip22): add git-over-nostr collaboration (NIP-34) and NIP-22 comments - #24

Merged
naliyi merged 4 commits into
mainfrom
develop
Sep 16, 2026
Merged

naliyi merged 4 commits into
mainfrom
develop

Conversation

@naliyi

@naliyi naliyi commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Brings develop's three commits (all from #23, already merged into develop) into main:

No other changes. develop is otherwise even with main.

…22 comments

Adds nip34: repository announcements (30617) and state (30618), patches
(1617), pull requests (1618) and updates (1619), issues (1621), status
events (1630-1633) with ResolveStatus/ResolveRevisionStatus helpers, user
grasp lists (10317), and nostr:// clone URL parsing/building. Replies
follow NIP-22's kind:1111 comment shape, added here as its own nip22
package since other NIPs may want it too.

Both packages follow this SDK's existing split: a dependency-free
protocol library (New*/Parse*/Validate* per event kind, sentinel errors)
plus a relayreg subpackage that registers relay-side support and
validators. There's no nip34/client subpackage -- unlike Blossom/ecash,
NIP-34 has no second transport to dial out to, so publishing/subscribing
goes through the existing generic nip01/relay-client plumbing.

Also adds utils.FormatATag, the build-side counterpart to the existing
ParseATag, needed by both new packages to construct "a" tag addresses.
Replaces the single announce+issue example with one subsection per
nip34 operation: announce a repo and publish its state, submit a
patch series/revision/PR/PR-update, open an issue and thread top-level
and nested replies, set and resolve all four status kinds, publish a
grasp server list, build/parse every nostr:// clone URL form, and
subscribe to a repository's activity (and its replies) from a relay.

Every example was compile-checked and executed standalone against this
branch. That review caught a real bug in the previous example: its
otherPrivateKeyHex literal was 63 hex characters (odd length), which
type-checks fine but panics at runtime in Sign() -- go build/vet alone
would never have caught it.
feat(nip34,nip22): add git-over-nostr collaboration (NIP-34) and NIP-22 comments
@naliyi
naliyi merged commit e408d6e into main Sep 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant