Compare commits
8 Commits
981f9f6eec
...
b6bb933e75
Author | SHA1 | Date |
---|---|---|
|
b6bb933e75 | |
|
2ace01cf1a | |
|
396beff41b | |
|
44bda346e7 | |
|
095fe84cc1 | |
|
bd699c6349 | |
|
96c43d1168 | |
|
bf611d0ee2 |
75
34.md
75
34.md
|
@ -165,6 +165,81 @@ The most recent Status event (by `created_at` date) from either the issue/patch
|
|||
|
||||
The Status of a patch-revision is to either that of the root-patch, or `1632` (_Closed_) if the root-patch's Status is `1631` (_Applied/Merged_) and the patch-revision isn't tagged in the `1631` (_Applied/Merged_) event.
|
||||
|
||||
## Git Diffs
|
||||
|
||||
Git Diff events (`kind: 1622`) represent changes between two commits within a Git repository, encapsulated as a unified diff. This event type is distinct from Git patches as it explicitly represents the state difference between two specific commits rather than modifications intended for direct application.
|
||||
|
||||
Clients should render the event's `content` field as preformatted unified diff text (commonly displayed with diff highlighting).
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"kind": 1622,
|
||||
"content": "<git unified-diff content>",
|
||||
"tags": [
|
||||
// Reference to the repo's 30617 event if one exists
|
||||
["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"],
|
||||
// Explicit commit ID this diff represents (mandatory)
|
||||
["commit", "<current-commit-id>"],
|
||||
// Parent commit ID from which the diff is generated (mandatory)
|
||||
["parent-commit", "<parent-commit-id>"],
|
||||
|
||||
// Explicit repository URL (optional if resolvable via 'a' tag, recommended for interoperability)
|
||||
["repo", "https://github.com/user/repo.git"],
|
||||
// refs associated with the repository
|
||||
["refs/<heads|tags>/<branch-or-tag-name>","<commit-id>"]
|
||||
// File path within the repository affected by this diff (optional but recommended if diff is single-file)
|
||||
["file", "<fully-qualified-filepath>"],
|
||||
// Optional start and end lines in the diff context (recommended for precise referencing)
|
||||
["lines", "172", "196"],
|
||||
// Optional description for context or explanation of changes
|
||||
["description", "Implements new diff handling in NIP-34"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Clients rendering Git Diff events SHOULD:
|
||||
|
||||
- Display the unified diff content with syntax highlighting for added/removed lines.
|
||||
- Provide options to view or open the diff context within external repository browsers or local Git clients.
|
||||
- Use commit and parent-commit identifiers for querying or fetching the exact commit state.
|
||||
- Clearly indicate repository, branch, and file context if provided.
|
||||
|
||||
This detailed structure improves clarity, usability, and interoperability, providing clients with comprehensive context and ensuring precise referencing and rendering.
|
||||
|
||||
## Permalinks
|
||||
|
||||
Permalink events (`kind: 1623`) represent a permanent reference to specific lines within a file from a Git repository. They are intended to directly reference code or documentation precisely and immutably. Clients should render the event's `content` field as preformatted text (code blocks).
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"kind": 1623,
|
||||
"content": "<referenced code or text excerpt>",
|
||||
"tags": [
|
||||
// Reference to the repo's 30617 event if one exists
|
||||
["a", "30617:<repo-owner-pubkey>:<repo-id>"],
|
||||
// Explicit repository URL (optional if resolvable via 'a' tag, recommended for interoperability)
|
||||
["repo", "<repo.url>"],
|
||||
// refs associated with the repository (mandatory)
|
||||
["refs/<heads|tags>/<branch-or-tag-name>","<commit-id>"]
|
||||
// Specific commit identifier referencing the repository state (mandatory)
|
||||
["commit", "<commit-id>"],
|
||||
// Path to the specific file in the repository (mandatory)
|
||||
["file", "<fully-qualified-filepath>"],
|
||||
|
||||
// Start and end lines referenced within the file (optional, otherwise the event refers to the complete file)
|
||||
["lines", "<start-line>", "<optional-end-line>"],
|
||||
// Language identifier for syntax highlighting (optional but recommended)
|
||||
["l", "<language>"],
|
||||
["description", "<short-text-description>"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Clients rendering permalink events SHOULD:
|
||||
|
||||
- Fetch and display the exact lines from the referenced commit and file if the content is not explicitly included or for verification.
|
||||
- Display provided code/text using syntax highlighting according to the specified language tag (`l`).
|
||||
- Offer navigation or direct links to view the file within external repository browsers or clients.
|
||||
|
||||
## Possible things to be added later
|
||||
|
||||
|
|
18
47.md
18
47.md
|
@ -667,3 +667,21 @@ Here are some properties that are recognized by some NWC clients:
|
|||
"sig": "31f57b369459b5306a5353aa9e03be7fbde169bc881c3233625605dd12f53548179def16b9fe1137e6465d7e4d5bb27ce81fd6e75908c46b06269f4233c845d8"
|
||||
}
|
||||
```
|
||||
|
||||
### Deep-links
|
||||
|
||||
Wallet applications can register deeplinks in mobile systems to make it possible to create a linking UX that doesn't require the user scanning a QR code or pasting some code.
|
||||
|
||||
`nostrnwc://connect` and `nostrnwc+{app_name}://connect` can be registered by wallet apps and queried by apps that want to receive an NWC pairing code.
|
||||
|
||||
All URI parameters, MUST be URI-encoded.
|
||||
|
||||
URI parameters:
|
||||
* `appicon` -- URL to an icon of the client that wants to create a connection.
|
||||
* `appname` -- Name of the client that wants to create a connection.
|
||||
* `callback` -- URI schema the wallet should open with the connection string
|
||||
|
||||
Once a connection has been created by the wallet, it should be returned to the client by opening the callback with the following parameters
|
||||
* `value` -- NWC pairing code (e.g. `nostr+walletconnect://...`)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue