Skip to content

Commit 4075738

Browse files
authored
Merge pull request #56 from nostrability/pr-50-updated
Unified relay tag schemas on the shared alias to eliminate drift: NIP-17 now just layers its tighter DM URL pattern atop the alias, NIP-42 keeps only its extra description/error messaging, and the unused NIP-88 relay schema is removed. pnpm build passed.
2 parents 731c69a + 5c22c13 commit 4075738

File tree

4 files changed

+4
-26
lines changed

4 files changed

+4
-26
lines changed

nips/nip-17/tag/relay/schema.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
$schema: "http://json-schema.org/draft-07/schema#"
22
allOf:
3-
- $ref: "@/tag.yaml"
3+
- $ref: "@/tag/relay.yaml"
44
- type: array
55
description: "Preferred relay endpoint for receiving direct messages"
6-
minItems: 2
76
items:
87
- const: "relay"
98
- type: string
109
pattern: '^wss?://[a-zA-Z0-9.-]+(?::[0-9]+)?(?:/.*)?$'
11-
additionalItems: false

nips/nip-42/tag/relay/schema.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
$schema: "http://json-schema.org/draft-07/schema#"
22
allOf:
3-
- $ref: "@/tag.yaml"
3+
- $ref: "@/tag/relay.yaml"
44
- type: array
55
description: "Relay endpoint that issued the NIP-42 authentication challenge"
6-
minItems: 2
7-
items:
8-
- const: "relay"
9-
- type: string
10-
pattern: '^(ws://|wss://).+$'
11-
additionalItems: false
12-
errorMessage:
13-
pattern: "relay tag must include a valid ws or wss URL"
14-
additionalItems: "relay tag cannot contain extra fields"
6+
errorMessage: "relay tag must include a valid ws or wss URL and cannot contain extra fields"

nips/nip-88/tag/relay/schema.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nostrability/schemata",
3-
"version": "0.1.6",
3+
"version": "0.1.9",
44
"type": "module",
55
"main": "dist/bundle/schemas.js",
66
"license": "MIT",

0 commit comments

Comments
 (0)