{"id":"854af14262ac9d21b9d510e723c8ce489de614d7d5ec7d0261c1d095d509a427","pubkey":"df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200","created_at":1766882096,"kind":30817,"tags":[["d","nip-73"],["title","NipId & NIP References"],["s","draft"],["v","0.1.0","Change this NIP from an update (that changes NIP-73) to an extension that adds functionality to NIP-73."],["versions","1766586295"],["i","github.com:nostr-protocol/nips:73","extends"],["k","nip"],["i","30817:df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200:versioned-event-kinds","requires"],["k","nip"],["a","30817:df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200:versioned-event-kinds","","requires"],["p","df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200"],["i","30817:df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200:external-reference-rel","requires"],["k","nip"],["a","30817:df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200:external-reference-rel","","requires"],["p","df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200"],["client","nostrhub.io"]],"content":"## NipId & NIP References\n\n`draft`\n\nThis NIP extends `NIP-73` \"External References\" to allow 'all of nostr' to reference, comment, and react on any published NIP spec in a standardized manner, regardless of which repo or nostr event kind they are posted to. It ALSO establishes a `NipId` convention by which NIPs from ANY source can be identified universally, which MAY prove useful in other cases. \n\n\n### NipId\n\n**Seeing as :**\n\n- ANY Nostr event kind or public website MAY become a source for published Nostr NIPS, \n- AND NO SINGLE website or app or service can reliably claim to be THE canonical source,\n- AND NO SINGLE author or version of a proposal can possibly claim to be the final \"way things are done\" on Nostr,\n- AND EVERY implementer (and the protocol itself) COULD benefit by having a standardized access to these proposals, \n- AND such a standard SHOULD follow the Nostr protocol for referencing addressable events (content which MAY change over time),\n- AND a working protocol CANNOT be established on a body of NIPs whose content MAY be constantly changing and evolving,\n- ...\n\n\n**Therefore :**\n\nThis NIP establishes the following `NipId` standard, a colon `:` separated format for identifying a Nostr NIP proposal from ANY source : \n\n```\n// canonical NipId reference format\n<source>:<author>:localid>:<version?>\n\n// specific NipId format for NIPs proposed in Nostr event kinds\n<kind>:<pubkey>:<d_tag>:<created_at?>\n\n// specific NipId format for NIPs proposed in online NIP repositories\n<domain>:<user_name>/<repo_name?>:<file_name>:<commit_id?>\n```\n\n**Where :**\n\n1. `source` : \n  - For NIPS published as Nostr events, this is the event `kind` (unsigned integer) number. \n  - OTHERWISE, this is a `domain` ([URI hostname](https://en.wikipedia.org/wiki/Hostname#Syntax)) where the NIP is published.\n2. `author` : \n  - For NIPS published as Nostr events, this is the author `pubkey` (32-bytes lowercase hex). \n  - OTHERWISE, this is a [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_in_a_URI)  `user_name` and maybe a `repo_name`, separated by a single backslash `/`. \n3. `localid` : \n  - For NIPS published as Nostr events, this is the event's `d` tag value. \n  - OTHERWISE, this can be any `file_name` in [URL slug](https://en.wikipedia.org/wiki/Clean_URL#Slug) format (without a file extension).\n4. `version`  (OPTIONAL) : \n  - For NIPS published as Nostr events, this is the event's `created_at` value. \n  - OTHERWISE, this is a repo branch or tag name OR some other string referencing a single IMMUTABLE saved version of this NIP. IF OMITTED, the latest version is ALWAYS the one being referenced. \n\n\n**Examples :**\n\n- `github.com:nostr-protocol/nips:73` : NIP-73 on the primary nips repo\n- `30817:0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd:nips-on-nostr` : \"Custom Nips\" NIP by Alex Gleason (latest)\n- `30818:fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1:nkbip-01` : NKBIP-01 by Laeserin (latest) \n- `30817:df67f9a7e41125745cbe7acfbdcd03691780c643df7bad70f5d2108f2d4fc200:versioned-event-kinds:1766760671` : \"Versioned Event Kinds\" by ManiMe (version)\n- `git.vanderwarker.family:nostr/snips:02:b3e05871f03872c413d289c2d405c8f77927c0b9` : SNIP-02 by Stephen Vanderwarker (version)\n\n\n\n### External References\n\nNIP-73 standard `i` tags MAY be used to reference NIPs as external content (using NipId consistently across all use cases), with `k` tag identifying the (preceding) reference as a 'nip'.\n\n| Type                   | `i` tag                                         | `k` tag                  |\n| ---                    | ---                                             | ---                      |\n| Nostr NIPs             | `[\"i\", \"<nipid>\", \"<url_hint>\", \"<rel>\"]`       | `[\"k\",\"nip\"]`            |\n\n\n**the `i` tag :**\n\n1. A NipId (as specified above) MUST be the first argument of a NIP reference `i` tag.\n2. A URL hint MAY be added as the second argument of the `i` tag, to suggest a web page without hard linking the reference to a specific repo or nostr client.\n3. A `rel` string MAY be added as the third argument of the `i` tag, to designate this referenced NIP as being `upstream`, `preferred`, `alternate`, `deprecated`, `suggested`, `related`, or having some other relationship to the current event. (useful when forking or commenting about NIP events) \n\n**the `k` tag**\n\n1. A `k` tag MUST directly follow the `i` tag and it MUST have `nip` as its value.\n\n**Examples :**\n\nA reference to a NIP published in the GitHub \"primary\" NIPs repo SHOULD look like this:\n\n```jsonc\n// preferred format matches `a` tag\n// <repo-domain>:<repo-owner>/<repo-name>:<NIP-identifier>\n[\n  [\"i\", \"github.com:nostr-protocol/nips:73\", \"https://github.com/nostr-protocol/nips/blob/master/73.md\", \"upstream\"],\n  [\"k\", \"nip\"]\n]\n// deprecated format matches arbitrary NIP number\n[\n  [\"i\", \"73\", \"https://github.com/nostr-protocol/nips/blob/master/73.md\"],\n  [\"k\", \"nip\"]\n]\n```\n\nA reference to a NIP published as kind `30817` to NostrHub SHOULD look like this:\n\n```jsonc\n// format matches `a` tag\n// <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>\n[\n  [\"i\", \"30817:0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd:nips-on-nostr\", \"https://nostrhub.io/naddr1qvzqqqrcvypzqprpljlvcnpnw3pejvkkhrc3y6wvmd7vjuad0fg2ud3dky66gaxaqqxku6tswvkk7m3ddehhxarjqk4nmy\", \"related\"],\n  [\"k\", \"nip\"]\n]\n```\n\nA reference to a NIP published as kind `30818` to WikiStr SHOULD look like this:\n\n```jsonc\n// format matches `a` tag\n// <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>\n[\n  [\"i\", \"30818:fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1:nkbip-01\", \"https://wikistr.com/nkbip-01*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1\"],\n  [\"k\", \"nip\"]\n]\n```","sig":"6b3b9f0bafe6466e201eec4c6ce0811c58508171a4286f239d26d17e3157f9eda2f2fb0519bfd8e1574a14f1b546f3693b4a0ac4c14f65df712b976670c6fd22"}