Conversation
…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
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.
Brings develop's three commits (all from #23, already merged into develop) into main:
No other changes. develop is otherwise even with main.