Skip to content

Commit 12423f2

Browse files
zmeyer44claude
andauthored
docs(nips): fix stray angle brackets in created_at clauses (#4486)
## Summary The `<` in a `created_at<` condition is the comparison operator, but in three places it had been paired with a closing `>` as if it opened a `<placeholder>` bracket: - **NIP-OA** clause list: `created_at<unix-timestamp>` → `created_at<unix-timestamp` - **NIP-OA** satisfaction rule: `created_at<t>` → `created_at<t` - **NIP-GS** "Conditions in Git Context": `created_at<t>` → `created_at<t` (line 437 of the same file already used the correct form) This matches the `created_at>...` forms used alongside them, which never carried a closing bracket. Also normalizes the NIP-OA headings to ATX style and pretty-prints the signed-event JSON example for readability. ## Verification Docs-only change. The NIP-OA test vectors are untouched and were re-verified by recomputing them: the preimage SHA-256, `tag-bytes-hex`, and the signed-event `id` all still match the documented values. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: zmeyer44 <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
1 parent 45c288c commit 12423f2

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎docs/nips/NIP-GS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ To verify the owner attestation:
427427

428428
#### Conditions in Git Context
429429

430-
NIP-OA conditions (`kind=<n>`, `created_at<t>`, `created_at>t`) reference Nostr
430+
NIP-OA conditions (`kind=<n>`, `created_at<t`, `created_at>t`) reference Nostr
431431
event fields that do not exist in git commits. For git commit signing:
432432

433433
- An **empty conditions string** (unconditional authorization) is RECOMMENDED.

‎docs/nips/NIP-OA.md‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
NIP-OA
2-
======
1+
# NIP-OA
32

4-
Owner Attestation
5-
-----------------
3+
## Owner Attestation
64

75
`draft` `optional`
86

@@ -48,7 +46,7 @@ The owner MUST produce `<sig-hex>` as a BIP-340 Schnorr signature over the signe
4846
Each clause in `<conditions>` MUST be one of:
4947

5048
- `kind=<decimal>`
51-
- `created_at<unix-timestamp>`
49+
- `created_at<unix-timestamp`
5250
- `created_at>unix-timestamp`
5351

5452
The `<conditions>` string MUST be either the empty string or a non-empty ASCII string of the form `clause` or `clause&clause&...`.
@@ -65,7 +63,7 @@ Verifiers MUST evaluate every clause.
6563
Verifiers MUST reject an `auth` tag that contains an unsupported clause, malformed decimal encoding, invalid public key, or invalid signature.
6664
If `<owner-pubkey-hex>` equals `event.pubkey`, the `auth` tag is invalid and MUST be rejected.
6765
An event satisfies `kind=<n>` if and only if `event.kind = n`.
68-
An event satisfies `created_at<t>` if and only if `event.created_at < t`.
66+
An event satisfies `created_at<t` if and only if `event.created_at < t`.
6967
An event satisfies `created_at>t` if and only if `event.created_at > t`.
7068
Clause order is part of the signed preimage and verifiers MUST use the exact `<conditions>` string from the tag when verifying the signature.
7169
Implementers MUST NOT reorder, deduplicate, normalize, or canonicalize the `<conditions>` string before computing the preimage.
@@ -132,7 +130,14 @@ tag-bytes-hex=5b2261757468222c22373962653636376566396463626261633535613036323935
132130
"pubkey": "c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5",
133131
"created_at": 1713956400,
134132
"kind": 1,
135-
"tags": [["auth", "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "kind=1&created_at<1713957000", "8b7df2575caf0a108374f8471722b233c53f9ff827a8b0f91861966c3b9dd5cb2e189eae9f49d72187674c2f5bd244145e10ff86c9f257ffe65a1ee5f108b369"]],
133+
"tags": [
134+
[
135+
"auth",
136+
"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
137+
"kind=1&created_at<1713957000",
138+
"8b7df2575caf0a108374f8471722b233c53f9ff827a8b0f91861966c3b9dd5cb2e189eae9f49d72187674c2f5bd244145e10ff86c9f257ffe65a1ee5f108b369"
139+
]
140+
],
136141
"content": "owner-attested agent event",
137142
"sig": "7fd38992b70b5e9e113644e51b4c8ee2227f3bdd402b1855f8786c0600394ab3ec2621742a7bad0b0000b93d4d1ae6e39525f286a3c1029f43f46c3359a6c76f"
138143
}

0 commit comments

Comments
 (0)