@estiva-app/protocol 0.26.2 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/anchors.d.ts +107 -1
- package/dist/anchors.d.ts.map +1 -1
- package/dist/anchors.js +96 -1
- package/dist/anchors.js.map +1 -1
- package/dist/events.d.ts +0 -23
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +1 -37
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/anchors.ts +140 -2
- package/src/events.ts +1 -50
- package/src/index.ts +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ Every entry answers the wire question explicitly, including when the answer is
|
|
|
4
4
|
nothing (ADR 0002 §4b). A change to the bytes an app publishes is a MAJOR — in
|
|
5
5
|
`0.x`, a MINOR — even when no TypeScript signature moved.
|
|
6
6
|
|
|
7
|
+
## 0.28.0 — 2026-10-07
|
|
8
|
+
|
|
9
|
+
**Wire behaviour: no builder's bytes changed; one tag is new and one is read
|
|
10
|
+
more narrowly** (COM-2, SPEC §13.6.1).
|
|
11
|
+
|
|
12
|
+
- New: a message points at one block of another object with
|
|
13
|
+
`["part", <address>, <block id>]`. `partTag`, `partsOf` (one per address,
|
|
14
|
+
first wins), `resolvePart` (five states: `resolved`, `unaddressable`,
|
|
15
|
+
`detached`, `deleted`, `unreadable`) and `absenceOf`, which tells a deleted
|
|
16
|
+
object from one you cannot read by a `kind:5` naming the address. The signer
|
|
17
|
+
is not compared with the author: the relay accepts the author's owner too
|
|
18
|
+
(§6.5), which no client can check. A part's block id must match
|
|
19
|
+
`[A-Za-z0-9_-]{1,64}`; any other is dropped, because it ends up in a URL
|
|
20
|
+
fragment and a selector.
|
|
21
|
+
- **Narrower:** `blockAnchorOf` returns `undefined` for an event whose `kind`
|
|
22
|
+
is given and is not 1111. A `kind:9` has no `A` to say whose block it names;
|
|
23
|
+
Ship read one against the page it was drawn on. Callers that pass only
|
|
24
|
+
`{ tags }` behave as before.
|
|
25
|
+
|
|
26
|
+
## 0.27.0 — 2026-10-06
|
|
27
|
+
|
|
28
|
+
**Wire behaviour: no builder's bytes changed.** One builder removed (COM-3).
|
|
29
|
+
|
|
30
|
+
- **Breaking:** `buildComponent` and `KIND.COMPONENT` are gone. Kind 30841
|
|
31
|
+
(NIP-FC Component) is retired: production never held one, no app published or
|
|
32
|
+
read one, Estiva ID grants it to no app, and the relay refuses it. Never
|
|
33
|
+
reallocate the number (KINDS.md).
|
|
34
|
+
|
|
7
35
|
## 0.26.2 — 2026-10-03
|
|
8
36
|
|
|
9
37
|
**Wire behaviour: unchanged.** One error message (MAN-17).
|
package/dist/anchors.d.ts
CHANGED
|
@@ -53,8 +53,18 @@ export type BlockAnchor =
|
|
|
53
53
|
state: 'detached';
|
|
54
54
|
id: string;
|
|
55
55
|
};
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The block id a comment anchors to, or `undefined` when it anchors to none.
|
|
58
|
+
*
|
|
59
|
+
* Only a `kind:1111` anchors (§13.6): its `A` says which object the block is
|
|
60
|
+
* in. A `kind:9` has no `A`, so a `block` tag on one names a part of nothing in
|
|
61
|
+
* particular, and a reader that resolved it against the page it happened to be
|
|
62
|
+
* drawn on would report a confident "deleted" about the wrong document. Pass
|
|
63
|
+
* the event's kind and that case is refused; a message pointing at a block of
|
|
64
|
+
* another object says so with a `part` tag instead ({@link partsOf}).
|
|
65
|
+
*/
|
|
57
66
|
export declare function blockAnchorOf(event: {
|
|
67
|
+
kind?: number;
|
|
58
68
|
tags: string[][];
|
|
59
69
|
}): string | undefined;
|
|
60
70
|
/**
|
|
@@ -66,4 +76,100 @@ export declare function blockAnchorOf(event: {
|
|
|
66
76
|
* has no parts either, and a reader that throws renders nothing at all.
|
|
67
77
|
*/
|
|
68
78
|
export declare function resolveBlockAnchor(id: string | undefined, value: string, format: ContentFormat): BlockAnchor;
|
|
79
|
+
/**
|
|
80
|
+
* A message pointing at one block of another object — SPEC §13.6.1 (COM-2).
|
|
81
|
+
*
|
|
82
|
+
* `["part", <address>, <block id>]`, beside the `a` for the same address and a
|
|
83
|
+
* body that names it. The same `(object, block)` pair as an anchor, but a
|
|
84
|
+
* different relation: an anchor is what a comment is *about* (like a reply's
|
|
85
|
+
* `e`), a part is what a message *shows* (like a `q`). They are separate tags
|
|
86
|
+
* so that one comment can be both anchored and pointing, and so that a reader
|
|
87
|
+
* which knows neither draws an ordinary reference to the object.
|
|
88
|
+
*
|
|
89
|
+
* Index 3 is left free for an extent (a section, a range), which is not built.
|
|
90
|
+
*/
|
|
91
|
+
export declare const PART_TAG = "part";
|
|
92
|
+
/** One `part` tag, read. */
|
|
93
|
+
export interface PartPointer {
|
|
94
|
+
/** `kind:pubkey:d` — the object the block is in. */
|
|
95
|
+
address: string;
|
|
96
|
+
/** §13.3's block id within that object's body. */
|
|
97
|
+
block: string;
|
|
98
|
+
}
|
|
99
|
+
/** The `part` tag for one block of one object. */
|
|
100
|
+
export declare function partTag(address: string, block: string): string[];
|
|
101
|
+
/**
|
|
102
|
+
* The blocks a message points at, one per address, in tag order.
|
|
103
|
+
*
|
|
104
|
+
* The first tag for an address wins: a message shows one block of a given
|
|
105
|
+
* object, and a second tag for it would be a second card nobody can tell
|
|
106
|
+
* apart from the first by its reference in the text.
|
|
107
|
+
*
|
|
108
|
+
* **This is the tags only.** A reader draws a part only while the body still
|
|
109
|
+
* names its address — by `nostr:naddr…` or an app URL (§7.7) — because an edit
|
|
110
|
+
* carries no `part` (§6.8) and a person who removed the reference meant the
|
|
111
|
+
* card to go too. Which addresses the body names is the reader's own
|
|
112
|
+
* reference set; this function does not guess it.
|
|
113
|
+
*/
|
|
114
|
+
export declare function partsOf(event: {
|
|
115
|
+
tags: string[][];
|
|
116
|
+
}): PartPointer[];
|
|
117
|
+
/**
|
|
118
|
+
* What a part resolved to. Five states, and like {@link BlockAnchor} none of
|
|
119
|
+
* them is a degree of another:
|
|
120
|
+
*
|
|
121
|
+
* - `resolved` — the block is there; draw it.
|
|
122
|
+
* - `unaddressable` — the object's body is not a block document, so it has no
|
|
123
|
+
* parts. Permanent for that body, and nothing was deleted.
|
|
124
|
+
* - `detached` — the object is readable and the block is gone from it.
|
|
125
|
+
* - `deleted` — the whole object was deleted: its author's `kind:5` names it.
|
|
126
|
+
* - `unreadable` — nothing came back and no deletion did either. **Not
|
|
127
|
+
* "exists but forbidden"**: an address that never existed reads exactly the
|
|
128
|
+
* same, and saying more would confirm a hidden object to anyone holding its
|
|
129
|
+
* address. A reader says it is not available to them, and shows no title and
|
|
130
|
+
* no text.
|
|
131
|
+
*
|
|
132
|
+
* `deleted` and `unreadable` must not render alike. That is the rule this
|
|
133
|
+
* union is shaped to make hard to break.
|
|
134
|
+
*/
|
|
135
|
+
export type Part = {
|
|
136
|
+
state: 'resolved';
|
|
137
|
+
block: Block;
|
|
138
|
+
} | {
|
|
139
|
+
state: 'unaddressable';
|
|
140
|
+
} | {
|
|
141
|
+
state: 'detached';
|
|
142
|
+
} | {
|
|
143
|
+
state: 'deleted';
|
|
144
|
+
} | {
|
|
145
|
+
state: 'unreadable';
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* What a reader holds for the object a part points at: its body, or the reason
|
|
149
|
+
* it has none — from {@link absenceOf}.
|
|
150
|
+
*/
|
|
151
|
+
export type PartSource = {
|
|
152
|
+
value: string;
|
|
153
|
+
format: ContentFormat;
|
|
154
|
+
} | 'deleted' | 'unreadable';
|
|
155
|
+
/** Which of the five states a part is in, against its object as it is now. */
|
|
156
|
+
export declare function resolvePart(block: string, source: PartSource): Part;
|
|
157
|
+
/**
|
|
158
|
+
* Why a read by address came back empty: `deleted` when the relay holds a
|
|
159
|
+
* deletion of it by address (a `kind:5` with that `a`), else `unreadable`.
|
|
160
|
+
*
|
|
161
|
+
* `deletions` is what `{kinds: [5], "#a": [address]}` returned. **The signer is
|
|
162
|
+
* not compared with the address's author**, because a client cannot make that
|
|
163
|
+
* comparison correctly (SPEC §6.5, corrected 2026-09-06): the relay accepts a
|
|
164
|
+
* deletion from the author *or the author's owner*, and ownership is visible
|
|
165
|
+
* only to the relay. Most objects here are written by an agent and deleted by
|
|
166
|
+
* the person who owns it; an author-only check would call every one of those
|
|
167
|
+
* "not available to you". A relay that stores deletions it did not adjudicate
|
|
168
|
+
* can at worst make an object you cannot read say "deleted" — less than you
|
|
169
|
+
* were told before, never more.
|
|
170
|
+
*/
|
|
171
|
+
export declare function absenceOf(address: string, deletions: readonly {
|
|
172
|
+
kind: number;
|
|
173
|
+
tags: string[][];
|
|
174
|
+
}[]): 'deleted' | 'unreadable';
|
|
69
175
|
//# sourceMappingURL=anchors.d.ts.map
|
package/dist/anchors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchors.d.ts","sourceRoot":"","sources":["../src/anchors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,KAAK,KAAK,EAAqD,MAAM,aAAa,CAAA;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,kCAAkC;AAClC,eAAO,MAAM,gBAAgB,UAAU,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,MAAM,WAAW;AACrB,wEAAwE;AACtE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE;AACzB,6CAA6C;GAC3C;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE;AACjD;;;;;GAKG;GACD;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AACxC,+DAA+D;GAC7D;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAEr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,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEhE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;CAAE,GAAG,WAAW,EAAE,CAWlE;AAeD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,IAAI,GACZ;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GACnC;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAC1B;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,GACrB;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,GACpB;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,CAAA;AAE3B;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GAAG,SAAS,GAAG,YAAY,CAAA;AAE5F,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAMnE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;CAAE,EAAE,GACvD,SAAS,GAAG,YAAY,CAG1B"}
|
package/dist/anchors.js
CHANGED
|
@@ -19,8 +19,19 @@
|
|
|
19
19
|
import { findBlock, parseBlockDocument } from './blocks.js';
|
|
20
20
|
/** The tag SPEC §13.6 defines. */
|
|
21
21
|
export const BLOCK_ANCHOR_TAG = 'block';
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The block id a comment anchors to, or `undefined` when it anchors to none.
|
|
24
|
+
*
|
|
25
|
+
* Only a `kind:1111` anchors (§13.6): its `A` says which object the block is
|
|
26
|
+
* in. A `kind:9` has no `A`, so a `block` tag on one names a part of nothing in
|
|
27
|
+
* particular, and a reader that resolved it against the page it happened to be
|
|
28
|
+
* drawn on would report a confident "deleted" about the wrong document. Pass
|
|
29
|
+
* the event's kind and that case is refused; a message pointing at a block of
|
|
30
|
+
* another object says so with a `part` tag instead ({@link partsOf}).
|
|
31
|
+
*/
|
|
23
32
|
export function blockAnchorOf(event) {
|
|
33
|
+
if (event.kind !== undefined && event.kind !== 1111)
|
|
34
|
+
return undefined;
|
|
24
35
|
const id = event.tags.find((t) => t[0] === BLOCK_ANCHOR_TAG)?.[1];
|
|
25
36
|
return id === undefined || id === '' ? undefined : id;
|
|
26
37
|
}
|
|
@@ -47,4 +58,88 @@ export function resolveBlockAnchor(id, value, format) {
|
|
|
47
58
|
const block = findBlock(document, id);
|
|
48
59
|
return block ? { state: 'resolved', id, block } : { state: 'detached', id };
|
|
49
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* A message pointing at one block of another object — SPEC §13.6.1 (COM-2).
|
|
63
|
+
*
|
|
64
|
+
* `["part", <address>, <block id>]`, beside the `a` for the same address and a
|
|
65
|
+
* body that names it. The same `(object, block)` pair as an anchor, but a
|
|
66
|
+
* different relation: an anchor is what a comment is *about* (like a reply's
|
|
67
|
+
* `e`), a part is what a message *shows* (like a `q`). They are separate tags
|
|
68
|
+
* so that one comment can be both anchored and pointing, and so that a reader
|
|
69
|
+
* which knows neither draws an ordinary reference to the object.
|
|
70
|
+
*
|
|
71
|
+
* Index 3 is left free for an extent (a section, a range), which is not built.
|
|
72
|
+
*/
|
|
73
|
+
export const PART_TAG = 'part';
|
|
74
|
+
/** The `part` tag for one block of one object. */
|
|
75
|
+
export function partTag(address, block) {
|
|
76
|
+
return [PART_TAG, address, block];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The blocks a message points at, one per address, in tag order.
|
|
80
|
+
*
|
|
81
|
+
* The first tag for an address wins: a message shows one block of a given
|
|
82
|
+
* object, and a second tag for it would be a second card nobody can tell
|
|
83
|
+
* apart from the first by its reference in the text.
|
|
84
|
+
*
|
|
85
|
+
* **This is the tags only.** A reader draws a part only while the body still
|
|
86
|
+
* names its address — by `nostr:naddr…` or an app URL (§7.7) — because an edit
|
|
87
|
+
* carries no `part` (§6.8) and a person who removed the reference meant the
|
|
88
|
+
* card to go too. Which addresses the body names is the reader's own
|
|
89
|
+
* reference set; this function does not guess it.
|
|
90
|
+
*/
|
|
91
|
+
export function partsOf(event) {
|
|
92
|
+
const out = [];
|
|
93
|
+
const seen = new Set();
|
|
94
|
+
for (const tag of event.tags) {
|
|
95
|
+
if (tag[0] !== PART_TAG)
|
|
96
|
+
continue;
|
|
97
|
+
const [, address, block] = tag;
|
|
98
|
+
if (!address || !block || !isAddress(address) || !BLOCK_ID.test(block) || seen.has(address))
|
|
99
|
+
continue;
|
|
100
|
+
seen.add(address);
|
|
101
|
+
out.push({ address, block });
|
|
102
|
+
}
|
|
103
|
+
return out;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The block ids a part may name. §13.3 fixes no grammar (`newBlockId` writes 12
|
|
107
|
+
* hex; SPEC's examples say `b1`), but a part's id arrives from a stranger's tag
|
|
108
|
+
* or a pasted URL and ends up in a fragment and, in an app, a selector — so a
|
|
109
|
+
* reader takes only ids that are safe in both and drops the rest.
|
|
110
|
+
*/
|
|
111
|
+
const BLOCK_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
112
|
+
/** `kind:pubkey:d` with a numeric kind and a 64-hex pubkey. */
|
|
113
|
+
function isAddress(value) {
|
|
114
|
+
return /^\d+:[0-9a-f]{64}:/.test(value);
|
|
115
|
+
}
|
|
116
|
+
/** Which of the five states a part is in, against its object as it is now. */
|
|
117
|
+
export function resolvePart(block, source) {
|
|
118
|
+
if (source === 'deleted' || source === 'unreadable')
|
|
119
|
+
return { state: source };
|
|
120
|
+
const anchor = resolveBlockAnchor(block, source.value, source.format);
|
|
121
|
+
if (anchor.state === 'resolved')
|
|
122
|
+
return { state: 'resolved', block: anchor.block };
|
|
123
|
+
if (anchor.state === 'detached')
|
|
124
|
+
return { state: 'detached' };
|
|
125
|
+
return { state: 'unaddressable' };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Why a read by address came back empty: `deleted` when the relay holds a
|
|
129
|
+
* deletion of it by address (a `kind:5` with that `a`), else `unreadable`.
|
|
130
|
+
*
|
|
131
|
+
* `deletions` is what `{kinds: [5], "#a": [address]}` returned. **The signer is
|
|
132
|
+
* not compared with the address's author**, because a client cannot make that
|
|
133
|
+
* comparison correctly (SPEC §6.5, corrected 2026-09-06): the relay accepts a
|
|
134
|
+
* deletion from the author *or the author's owner*, and ownership is visible
|
|
135
|
+
* only to the relay. Most objects here are written by an agent and deleted by
|
|
136
|
+
* the person who owns it; an author-only check would call every one of those
|
|
137
|
+
* "not available to you". A relay that stores deletions it did not adjudicate
|
|
138
|
+
* can at worst make an object you cannot read say "deleted" — less than you
|
|
139
|
+
* were told before, never more.
|
|
140
|
+
*/
|
|
141
|
+
export function absenceOf(address, deletions) {
|
|
142
|
+
const deleted = deletions.some((event) => event.kind === 5 && event.tags.some((t) => t[0] === 'a' && t[1] === address));
|
|
143
|
+
return deleted ? 'deleted' : 'unreadable';
|
|
144
|
+
}
|
|
50
145
|
//# sourceMappingURL=anchors.js.map
|
package/dist/anchors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchors.js","sourceRoot":"","sources":["../src/anchors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAkC,SAAS,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAG3F,kCAAkC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAwBvC
|
|
1
|
+
{"version":3,"file":"anchors.js","sourceRoot":"","sources":["../src/anchors.ts"],"names":[],"mappings":"AAAA;;;;;;;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AS,IAAI,MAAM,KAAK,YAAY;QAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;IAC7E,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACrE,IAAI,MAAM,CAAC,KAAK,KAAK,UAAU;QAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAA;IAClF,IAAI,MAAM,CAAC,KAAK,KAAK,UAAU;QAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAA;IAC7D,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAA;AACnC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,SAAwD;IAExD,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAA;IACvH,OAAO,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAA;AAC3C,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -79,8 +79,6 @@ export declare const KIND: {
|
|
|
79
79
|
readonly APP_DATA: 30078;
|
|
80
80
|
/** NIP-FC File — see docs/buzz-compat/nips/NIP-FC.md in the Peek repo. */
|
|
81
81
|
readonly FILE: 30840;
|
|
82
|
-
/** NIP-FC Component. */
|
|
83
|
-
readonly COMPONENT: 30841;
|
|
84
82
|
/**
|
|
85
83
|
* NIP-42 relay auth — the challenge response that turns a connected socket
|
|
86
84
|
* into an authenticated one (`Kind::Authentication`, PEE-5).
|
|
@@ -592,27 +590,6 @@ export declare function buildBareFile(pubkey: string, createdAtMs: number, args:
|
|
|
592
590
|
/** The body, when there is one. Serialized with `serializeBlockDocument`. */
|
|
593
591
|
document?: BlockDocument;
|
|
594
592
|
}): UnsignedEvent;
|
|
595
|
-
/**
|
|
596
|
-
* kind:30841 Component — NIP-FC.
|
|
597
|
-
*
|
|
598
|
-
* `type` must be namespaced `<namespace>/<name>`. The protocol defines the
|
|
599
|
-
* container; the payload shape belongs to the type.
|
|
600
|
-
*
|
|
601
|
-
* @deprecated Nothing publishes one and nothing reads one: blocks carry their
|
|
602
|
-
* own ids (SPEC §13.3), attachments are blocks (RFC 0.6 §3), and the bare file
|
|
603
|
-
* above needs no component list. Kept until COM-3 decides whether `30841` is
|
|
604
|
-
* retired or repurposed; do not build on it.
|
|
605
|
-
*/
|
|
606
|
-
export declare function buildComponent(pubkey: string, createdAtMs: number, args: {
|
|
607
|
-
componentId: string;
|
|
608
|
-
/** Parent File's `d` tag. */
|
|
609
|
-
fileId: string;
|
|
610
|
-
/** Namespaced, e.g. `nfb/todo`. */
|
|
611
|
-
type: string;
|
|
612
|
-
payload: Record<string, unknown>;
|
|
613
|
-
channelUuid?: string;
|
|
614
|
-
labels?: Label[];
|
|
615
|
-
}): UnsignedEvent;
|
|
616
593
|
/**
|
|
617
594
|
* kind:9802 highlight — NIP-84.
|
|
618
595
|
*
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,aAAa,CAAA;AAExE,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAA;AAE/B,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA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Q,EAAE,MAAM,CAAA;IAChB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAA;IACjB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAWhB"}
|
package/dist/events.js
CHANGED
|
@@ -100,8 +100,7 @@ export const KIND = {
|
|
|
100
100
|
APP_DATA: 30078,
|
|
101
101
|
/** NIP-FC File — see docs/buzz-compat/nips/NIP-FC.md in the Peek repo. */
|
|
102
102
|
FILE: 30840,
|
|
103
|
-
|
|
104
|
-
COMPONENT: 30841,
|
|
103
|
+
// 30841 (NIP-FC Component) is retired — never reallocate it (COM-3, KINDS.md).
|
|
105
104
|
/**
|
|
106
105
|
* NIP-42 relay auth — the challenge response that turns a connected socket
|
|
107
106
|
* into an authenticated one (`Kind::Authentication`, PEE-5).
|
|
@@ -799,41 +798,6 @@ export function buildBareFile(pubkey, createdAtMs, args) {
|
|
|
799
798
|
content: args.document ? serializeBlockDocument(args.document) : '',
|
|
800
799
|
};
|
|
801
800
|
}
|
|
802
|
-
/**
|
|
803
|
-
* kind:30841 Component — NIP-FC.
|
|
804
|
-
*
|
|
805
|
-
* `type` must be namespaced `<namespace>/<name>`. The protocol defines the
|
|
806
|
-
* container; the payload shape belongs to the type.
|
|
807
|
-
*
|
|
808
|
-
* @deprecated Nothing publishes one and nothing reads one: blocks carry their
|
|
809
|
-
* own ids (SPEC §13.3), attachments are blocks (RFC 0.6 §3), and the bare file
|
|
810
|
-
* above needs no component list. Kept until COM-3 decides whether `30841` is
|
|
811
|
-
* retired or repurposed; do not build on it.
|
|
812
|
-
*/
|
|
813
|
-
export function buildComponent(pubkey, createdAtMs, args) {
|
|
814
|
-
assertHex64(pubkey, 'pubkey');
|
|
815
|
-
if (!args.type.includes('/')) {
|
|
816
|
-
throw new Error(`component type must be namespaced "<namespace>/<name>", got "${args.type}"`);
|
|
817
|
-
}
|
|
818
|
-
const tags = [
|
|
819
|
-
['d', args.componentId],
|
|
820
|
-
['a', addr(KIND.FILE, pubkey, args.fileId)],
|
|
821
|
-
['type', args.type],
|
|
822
|
-
];
|
|
823
|
-
if (args.channelUuid)
|
|
824
|
-
tags.push(['h', args.channelUuid]);
|
|
825
|
-
for (const label of args.labels ?? []) {
|
|
826
|
-
tags.push(['L', label.namespace]);
|
|
827
|
-
tags.push(['l', label.value, label.namespace]);
|
|
828
|
-
}
|
|
829
|
-
return {
|
|
830
|
-
pubkey,
|
|
831
|
-
created_at: toNostrSeconds(createdAtMs),
|
|
832
|
-
kind: KIND.COMPONENT,
|
|
833
|
-
tags,
|
|
834
|
-
content: JSON.stringify(args.payload),
|
|
835
|
-
};
|
|
836
|
-
}
|
|
837
801
|
/**
|
|
838
802
|
* kind:9802 highlight — NIP-84.
|
|
839
803
|
*
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,EAAsB,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAoBxE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,kBAAkB,EAAE,IAAI;IACxB;;;;OAIG;IACH,cAAc,EAAE,IAAI;IACpB;;;;;;;;;;OAUG;IACH,SAAS,EAAE,IAAI;IACf;;;;;;;;OAQG;IACH,OAAO,EAAE,IAAI;IACb,wBAAwB;IACxB,SAAS,EAAE,IAAI;IACf;;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I,EAAE;YACJ,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACtC,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;SAC9B;QACD,OAAO,EAAE,EAAE;KACZ,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
/** Bumped by hand with the version in package.json — `test/version.test.ts`
|
|
47
47
|
* pins the two together. It exists so "the upgrade reached the app" can be
|
|
48
48
|
* checked by grepping a built bundle rather than by trusting a lockfile. */
|
|
49
|
-
export declare const PROTOCOL_VERSION = "0.
|
|
50
|
-
export { type NostrTag, type UnsignedEvent, type SignedEvent, type Profile, type ThreadRef, type ChannelVisibility, type ChannelKind, type MemberRole, type FolderOp, type Label, type ResolutionAction, KIND, MAX_EMOJI_CHARS, MAX_MESSAGE_BYTES, MAX_MENTIONS, MAX_DM_OTHERS, MAX_RATIONALE_BYTES, RELAY_AUTH_TOLERANCE_SECS, ASSERTION_SUBTYPE, computeEventId, toNostrSeconds, canonicalChannelName, threadTags, addr, relayAuthUrl, buildProfile, parseProfile, buildCreateChannel, buildDeleteChannel, buildEditChannelMetadata, buildFolderCommand, buildAddMember, buildDmOpen, buildDmHide, buildReaction, buildDeletion, buildEdit, buildMessage, buildResolution, buildBareFile,
|
|
49
|
+
export declare const PROTOCOL_VERSION = "0.28.0";
|
|
50
|
+
export { type NostrTag, type UnsignedEvent, type SignedEvent, type Profile, type ThreadRef, type ChannelVisibility, type ChannelKind, type MemberRole, type FolderOp, type Label, type ResolutionAction, KIND, MAX_EMOJI_CHARS, MAX_MESSAGE_BYTES, MAX_MENTIONS, MAX_DM_OTHERS, MAX_RATIONALE_BYTES, RELAY_AUTH_TOLERANCE_SECS, ASSERTION_SUBTYPE, computeEventId, toNostrSeconds, canonicalChannelName, threadTags, addr, relayAuthUrl, buildProfile, parseProfile, buildCreateChannel, buildDeleteChannel, buildEditChannelMetadata, buildFolderCommand, buildAddMember, buildDmOpen, buildDmHide, buildReaction, buildDeletion, buildEdit, buildMessage, buildResolution, buildBareFile, buildHighlight, buildUnsignedRelayAuthEvent, } from './events.js';
|
|
51
51
|
export { type AddressPointer, type EventPointer, encodeNevent, decodeNevent, convertBits, bech32Encode, bech32Decode, encodeNaddr, decodeNaddr, pointerToAddress, addressToPointer, addrToNaddr, naddrToAddr, referenceToPointer, NADDR_RE, findNaddrs, stripNaddrs, encodeNpub, decodeNpub, NOSTR_URI_RE, findNostrUris, } from './nip19.js';
|
|
52
52
|
export { type AuthEventArgs, TIMESTAMP_TOLERANCE_SECS, normalizeUrl, buildUnsignedAuthEvent, base64, authorizationHeaderFor, authorizationHeader, } from './nip98.js';
|
|
53
53
|
export { type Signer, type SignerKind, publicKeyFromSecret, signEvent, secretKeySigner, } from './sign.js';
|
|
@@ -59,6 +59,6 @@ export { type Block, type BlockDocument, type KnownBlockType, KNOWN_BLOCK_TYPES,
|
|
|
59
59
|
export { type RenderInline, type RenderBlock, type RenderFormat, type ContentFormat, CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, contentFormatOf, toRenderTree, renderTreeText, standaloneReference, referencesIn, } from './render.js';
|
|
60
60
|
export { markerTextToBlockDocument, blockDocumentToMarkerText, } from './bridge-content.js';
|
|
61
61
|
export { type EditorNode, type EditorDocument, EDITOR_BLOCK_TYPES, UNKNOWN_BLOCK_NODE, REFERENCE_NODE, documentForEditing, toEditorDocument, fromEditorDocument, publishableFromEditor, } from './editor.js';
|
|
62
|
-
export { type BlockAnchor, BLOCK_ANCHOR_TAG, blockAnchorOf, resolveBlockAnchor, } from './anchors.js';
|
|
62
|
+
export { type BlockAnchor, type Part, type PartPointer, type PartSource, BLOCK_ANCHOR_TAG, PART_TAG, absenceOf, blockAnchorOf, partTag, partsOf, resolveBlockAnchor, resolvePart, } from './anchors.js';
|
|
63
63
|
export { type BlossomVerb, type Imeta, BLOSSOM_AUTH_TTL_SECS, buildBlossomAuth, blossomAuthHeader, imetaTag, imetaOf, imetaFromAttrs, attachmentsInDocument, type BlobFetchLike, type BlobResponseLike, type FetchedBlob, sha256FromMediaUrl, fetchBlob, sha256Of, uploadBlob, imetaFor, canonicalizeImage, type UploadedBlob, type BlobUploadFetchLike, } from './media.js';
|
|
64
64
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH;;4EAE4E;AAC5E,eAAO,MAAM,gBAAgB,WAAW,CAAA;AAExC,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,gBAAgB,EAErB,IAAI,EACJ,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EAEjB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,IAAI,EACJ,YAAY,EAEZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACT,YAAY,EACZ,eAAe,EACf,aAAa,EACb,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH;;4EAE4E;AAC5E,eAAO,MAAM,gBAAgB,WAAW,CAAA;AAExC,OA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AAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,WAAW,GACZ,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,cAAc,EACd,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
/** Bumped by hand with the version in package.json — `test/version.test.ts`
|
|
47
47
|
* pins the two together. It exists so "the upgrade reached the app" can be
|
|
48
48
|
* checked by grepping a built bundle rather than by trusting a lockfile. */
|
|
49
|
-
export const PROTOCOL_VERSION = '0.
|
|
49
|
+
export const PROTOCOL_VERSION = '0.28.0';
|
|
50
50
|
export {
|
|
51
51
|
// constants
|
|
52
52
|
KIND, MAX_EMOJI_CHARS, MAX_MESSAGE_BYTES, MAX_MENTIONS, MAX_DM_OTHERS, MAX_RATIONALE_BYTES, RELAY_AUTH_TOLERANCE_SECS, ASSERTION_SUBTYPE,
|
|
53
53
|
// the id preimage and the pieces that feed it
|
|
54
54
|
computeEventId, toNostrSeconds, canonicalChannelName, threadTags, addr, relayAuthUrl,
|
|
55
55
|
// builders
|
|
56
|
-
buildProfile, parseProfile, buildCreateChannel, buildDeleteChannel, buildEditChannelMetadata, buildFolderCommand, buildAddMember, buildDmOpen, buildDmHide, buildReaction, buildDeletion, buildEdit, buildMessage, buildResolution, buildBareFile,
|
|
56
|
+
buildProfile, parseProfile, buildCreateChannel, buildDeleteChannel, buildEditChannelMetadata, buildFolderCommand, buildAddMember, buildDmOpen, buildDmHide, buildReaction, buildDeletion, buildEdit, buildMessage, buildResolution, buildBareFile, buildHighlight, buildUnsignedRelayAuthEvent, } from './events.js';
|
|
57
57
|
export { encodeNevent, decodeNevent, convertBits, bech32Encode, bech32Decode, encodeNaddr, decodeNaddr, pointerToAddress, addressToPointer, addrToNaddr, naddrToAddr, referenceToPointer, NADDR_RE, findNaddrs, stripNaddrs, encodeNpub, decodeNpub, NOSTR_URI_RE, findNostrUris, } from './nip19.js';
|
|
58
58
|
export { TIMESTAMP_TOLERANCE_SECS, normalizeUrl, buildUnsignedAuthEvent, base64, authorizationHeaderFor, authorizationHeader, } from './nip98.js';
|
|
59
59
|
export { publicKeyFromSecret, signEvent, secretKeySigner, } from './sign.js';
|
|
@@ -65,6 +65,6 @@ export { KNOWN_BLOCK_TYPES, BlockDocumentError, validateBlockDocument, parseBloc
|
|
|
65
65
|
export { CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, contentFormatOf, toRenderTree, renderTreeText, standaloneReference, referencesIn, } from './render.js';
|
|
66
66
|
export { markerTextToBlockDocument, blockDocumentToMarkerText, } from './bridge-content.js';
|
|
67
67
|
export { EDITOR_BLOCK_TYPES, UNKNOWN_BLOCK_NODE, REFERENCE_NODE, documentForEditing, toEditorDocument, fromEditorDocument, publishableFromEditor, } from './editor.js';
|
|
68
|
-
export { BLOCK_ANCHOR_TAG, blockAnchorOf, resolveBlockAnchor, } from './anchors.js';
|
|
68
|
+
export { BLOCK_ANCHOR_TAG, PART_TAG, absenceOf, blockAnchorOf, partTag, partsOf, resolveBlockAnchor, resolvePart, } from './anchors.js';
|
|
69
69
|
export { BLOSSOM_AUTH_TTL_SECS, buildBlossomAuth, blossomAuthHeader, imetaTag, imetaOf, imetaFromAttrs, attachmentsInDocument, sha256FromMediaUrl, fetchBlob, sha256Of, uploadBlob, imetaFor, canonicalizeImage, } from './media.js';
|
|
70
70
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH;;4EAE4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAA;AAExC,OAAO;AAaL,YAAY;AACZ,IAAI,EACJ,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB;AACjB,8CAA8C;AAC9C,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,IAAI,EACJ,YAAY;AACZ,WAAW;AACX,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACT,YAAY,EACZ,eAAe,EACf,aAAa,EACb,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH;;4EAE4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAA;AAExC,OAAO;AAaL,YAAY;AACZ,IAAI,EACJ,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB;AACjB,8CAA8C;AAC9C,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,IAAI,EACJ,YAAY;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,YAAY,GACb,MAAM,aAAa,CAAA;AAEpB,OAAO,EAKL,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,YAAY,GACb,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAGL,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAKL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,WAAW,GACZ,MAAM,cAAc,CAAA;AACrB,OAAO,EAGL,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,cAAc,EACd,qBAAqB,EAIrB,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,iBAAiB,GAGlB,MAAM,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@estiva-app/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "The Estiva wire format: Buzz-shaped Nostr event builders, NIP-01 ids, NIP-19 naddr, NIP-98 HTTP auth, and the relay clients. Speaks the protocol; interprets nothing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/anchors.ts
CHANGED
|
@@ -44,8 +44,18 @@ export type BlockAnchor =
|
|
|
44
44
|
/** The tag names a block that is no longer in the document. */
|
|
45
45
|
| { state: 'detached'; id: string }
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The block id a comment anchors to, or `undefined` when it anchors to none.
|
|
49
|
+
*
|
|
50
|
+
* Only a `kind:1111` anchors (§13.6): its `A` says which object the block is
|
|
51
|
+
* in. A `kind:9` has no `A`, so a `block` tag on one names a part of nothing in
|
|
52
|
+
* particular, and a reader that resolved it against the page it happened to be
|
|
53
|
+
* drawn on would report a confident "deleted" about the wrong document. Pass
|
|
54
|
+
* the event's kind and that case is refused; a message pointing at a block of
|
|
55
|
+
* another object says so with a `part` tag instead ({@link partsOf}).
|
|
56
|
+
*/
|
|
57
|
+
export function blockAnchorOf(event: { kind?: number; tags: string[][] }): string | undefined {
|
|
58
|
+
if (event.kind !== undefined && event.kind !== 1111) return undefined
|
|
49
59
|
const id = event.tags.find((t) => t[0] === BLOCK_ANCHOR_TAG)?.[1]
|
|
50
60
|
return id === undefined || id === '' ? undefined : id
|
|
51
61
|
}
|
|
@@ -74,3 +84,131 @@ export function resolveBlockAnchor(
|
|
|
74
84
|
const block = findBlock(document, id)
|
|
75
85
|
return block ? { state: 'resolved', id, block } : { state: 'detached', id }
|
|
76
86
|
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A message pointing at one block of another object — SPEC §13.6.1 (COM-2).
|
|
90
|
+
*
|
|
91
|
+
* `["part", <address>, <block id>]`, beside the `a` for the same address and a
|
|
92
|
+
* body that names it. The same `(object, block)` pair as an anchor, but a
|
|
93
|
+
* different relation: an anchor is what a comment is *about* (like a reply's
|
|
94
|
+
* `e`), a part is what a message *shows* (like a `q`). They are separate tags
|
|
95
|
+
* so that one comment can be both anchored and pointing, and so that a reader
|
|
96
|
+
* which knows neither draws an ordinary reference to the object.
|
|
97
|
+
*
|
|
98
|
+
* Index 3 is left free for an extent (a section, a range), which is not built.
|
|
99
|
+
*/
|
|
100
|
+
export const PART_TAG = 'part'
|
|
101
|
+
|
|
102
|
+
/** One `part` tag, read. */
|
|
103
|
+
export interface PartPointer {
|
|
104
|
+
/** `kind:pubkey:d` — the object the block is in. */
|
|
105
|
+
address: string
|
|
106
|
+
/** §13.3's block id within that object's body. */
|
|
107
|
+
block: string
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** The `part` tag for one block of one object. */
|
|
111
|
+
export function partTag(address: string, block: string): string[] {
|
|
112
|
+
return [PART_TAG, address, block]
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The blocks a message points at, one per address, in tag order.
|
|
117
|
+
*
|
|
118
|
+
* The first tag for an address wins: a message shows one block of a given
|
|
119
|
+
* object, and a second tag for it would be a second card nobody can tell
|
|
120
|
+
* apart from the first by its reference in the text.
|
|
121
|
+
*
|
|
122
|
+
* **This is the tags only.** A reader draws a part only while the body still
|
|
123
|
+
* names its address — by `nostr:naddr…` or an app URL (§7.7) — because an edit
|
|
124
|
+
* carries no `part` (§6.8) and a person who removed the reference meant the
|
|
125
|
+
* card to go too. Which addresses the body names is the reader's own
|
|
126
|
+
* reference set; this function does not guess it.
|
|
127
|
+
*/
|
|
128
|
+
export function partsOf(event: { tags: string[][] }): PartPointer[] {
|
|
129
|
+
const out: PartPointer[] = []
|
|
130
|
+
const seen = new Set<string>()
|
|
131
|
+
for (const tag of event.tags) {
|
|
132
|
+
if (tag[0] !== PART_TAG) continue
|
|
133
|
+
const [, address, block] = tag
|
|
134
|
+
if (!address || !block || !isAddress(address) || !BLOCK_ID.test(block) || seen.has(address)) continue
|
|
135
|
+
seen.add(address)
|
|
136
|
+
out.push({ address, block })
|
|
137
|
+
}
|
|
138
|
+
return out
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The block ids a part may name. §13.3 fixes no grammar (`newBlockId` writes 12
|
|
143
|
+
* hex; SPEC's examples say `b1`), but a part's id arrives from a stranger's tag
|
|
144
|
+
* or a pasted URL and ends up in a fragment and, in an app, a selector — so a
|
|
145
|
+
* reader takes only ids that are safe in both and drops the rest.
|
|
146
|
+
*/
|
|
147
|
+
const BLOCK_ID = /^[A-Za-z0-9_-]{1,64}$/
|
|
148
|
+
|
|
149
|
+
/** `kind:pubkey:d` with a numeric kind and a 64-hex pubkey. */
|
|
150
|
+
function isAddress(value: string): boolean {
|
|
151
|
+
return /^\d+:[0-9a-f]{64}:/.test(value)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* What a part resolved to. Five states, and like {@link BlockAnchor} none of
|
|
156
|
+
* them is a degree of another:
|
|
157
|
+
*
|
|
158
|
+
* - `resolved` — the block is there; draw it.
|
|
159
|
+
* - `unaddressable` — the object's body is not a block document, so it has no
|
|
160
|
+
* parts. Permanent for that body, and nothing was deleted.
|
|
161
|
+
* - `detached` — the object is readable and the block is gone from it.
|
|
162
|
+
* - `deleted` — the whole object was deleted: its author's `kind:5` names it.
|
|
163
|
+
* - `unreadable` — nothing came back and no deletion did either. **Not
|
|
164
|
+
* "exists but forbidden"**: an address that never existed reads exactly the
|
|
165
|
+
* same, and saying more would confirm a hidden object to anyone holding its
|
|
166
|
+
* address. A reader says it is not available to them, and shows no title and
|
|
167
|
+
* no text.
|
|
168
|
+
*
|
|
169
|
+
* `deleted` and `unreadable` must not render alike. That is the rule this
|
|
170
|
+
* union is shaped to make hard to break.
|
|
171
|
+
*/
|
|
172
|
+
export type Part =
|
|
173
|
+
| { state: 'resolved'; block: Block }
|
|
174
|
+
| { state: 'unaddressable' }
|
|
175
|
+
| { state: 'detached' }
|
|
176
|
+
| { state: 'deleted' }
|
|
177
|
+
| { state: 'unreadable' }
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* What a reader holds for the object a part points at: its body, or the reason
|
|
181
|
+
* it has none — from {@link absenceOf}.
|
|
182
|
+
*/
|
|
183
|
+
export type PartSource = { value: string; format: ContentFormat } | 'deleted' | 'unreadable'
|
|
184
|
+
|
|
185
|
+
/** Which of the five states a part is in, against its object as it is now. */
|
|
186
|
+
export function resolvePart(block: string, source: PartSource): Part {
|
|
187
|
+
if (source === 'deleted' || source === 'unreadable') return { state: source }
|
|
188
|
+
const anchor = resolveBlockAnchor(block, source.value, source.format)
|
|
189
|
+
if (anchor.state === 'resolved') return { state: 'resolved', block: anchor.block }
|
|
190
|
+
if (anchor.state === 'detached') return { state: 'detached' }
|
|
191
|
+
return { state: 'unaddressable' }
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Why a read by address came back empty: `deleted` when the relay holds a
|
|
196
|
+
* deletion of it by address (a `kind:5` with that `a`), else `unreadable`.
|
|
197
|
+
*
|
|
198
|
+
* `deletions` is what `{kinds: [5], "#a": [address]}` returned. **The signer is
|
|
199
|
+
* not compared with the address's author**, because a client cannot make that
|
|
200
|
+
* comparison correctly (SPEC §6.5, corrected 2026-09-06): the relay accepts a
|
|
201
|
+
* deletion from the author *or the author's owner*, and ownership is visible
|
|
202
|
+
* only to the relay. Most objects here are written by an agent and deleted by
|
|
203
|
+
* the person who owns it; an author-only check would call every one of those
|
|
204
|
+
* "not available to you". A relay that stores deletions it did not adjudicate
|
|
205
|
+
* can at worst make an object you cannot read say "deleted" — less than you
|
|
206
|
+
* were told before, never more.
|
|
207
|
+
*/
|
|
208
|
+
export function absenceOf(
|
|
209
|
+
address: string,
|
|
210
|
+
deletions: readonly { kind: number; tags: string[][] }[],
|
|
211
|
+
): 'deleted' | 'unreadable' {
|
|
212
|
+
const deleted = deletions.some((event) => event.kind === 5 && event.tags.some((t) => t[0] === 'a' && t[1] === address))
|
|
213
|
+
return deleted ? 'deleted' : 'unreadable'
|
|
214
|
+
}
|
package/src/events.ts
CHANGED
|
@@ -119,8 +119,7 @@ export const KIND = {
|
|
|
119
119
|
APP_DATA: 30078,
|
|
120
120
|
/** NIP-FC File — see docs/buzz-compat/nips/NIP-FC.md in the Peek repo. */
|
|
121
121
|
FILE: 30840,
|
|
122
|
-
|
|
123
|
-
COMPONENT: 30841,
|
|
122
|
+
// 30841 (NIP-FC Component) is retired — never reallocate it (COM-3, KINDS.md).
|
|
124
123
|
/**
|
|
125
124
|
* NIP-42 relay auth — the challenge response that turns a connected socket
|
|
126
125
|
* into an authenticated one (`Kind::Authentication`, PEE-5).
|
|
@@ -975,54 +974,6 @@ export function buildBareFile(
|
|
|
975
974
|
}
|
|
976
975
|
}
|
|
977
976
|
|
|
978
|
-
/**
|
|
979
|
-
* kind:30841 Component — NIP-FC.
|
|
980
|
-
*
|
|
981
|
-
* `type` must be namespaced `<namespace>/<name>`. The protocol defines the
|
|
982
|
-
* container; the payload shape belongs to the type.
|
|
983
|
-
*
|
|
984
|
-
* @deprecated Nothing publishes one and nothing reads one: blocks carry their
|
|
985
|
-
* own ids (SPEC §13.3), attachments are blocks (RFC 0.6 §3), and the bare file
|
|
986
|
-
* above needs no component list. Kept until COM-3 decides whether `30841` is
|
|
987
|
-
* retired or repurposed; do not build on it.
|
|
988
|
-
*/
|
|
989
|
-
export function buildComponent(
|
|
990
|
-
pubkey: string,
|
|
991
|
-
createdAtMs: number,
|
|
992
|
-
args: {
|
|
993
|
-
componentId: string
|
|
994
|
-
/** Parent File's `d` tag. */
|
|
995
|
-
fileId: string
|
|
996
|
-
/** Namespaced, e.g. `nfb/todo`. */
|
|
997
|
-
type: string
|
|
998
|
-
payload: Record<string, unknown>
|
|
999
|
-
channelUuid?: string
|
|
1000
|
-
labels?: Label[]
|
|
1001
|
-
},
|
|
1002
|
-
): UnsignedEvent {
|
|
1003
|
-
assertHex64(pubkey, 'pubkey')
|
|
1004
|
-
if (!args.type.includes('/')) {
|
|
1005
|
-
throw new Error(`component type must be namespaced "<namespace>/<name>", got "${args.type}"`)
|
|
1006
|
-
}
|
|
1007
|
-
const tags: NostrTag[] = [
|
|
1008
|
-
['d', args.componentId],
|
|
1009
|
-
['a', addr(KIND.FILE, pubkey, args.fileId)],
|
|
1010
|
-
['type', args.type],
|
|
1011
|
-
]
|
|
1012
|
-
if (args.channelUuid) tags.push(['h', args.channelUuid])
|
|
1013
|
-
for (const label of args.labels ?? []) {
|
|
1014
|
-
tags.push(['L', label.namespace])
|
|
1015
|
-
tags.push(['l', label.value, label.namespace])
|
|
1016
|
-
}
|
|
1017
|
-
return {
|
|
1018
|
-
pubkey,
|
|
1019
|
-
created_at: toNostrSeconds(createdAtMs),
|
|
1020
|
-
kind: KIND.COMPONENT,
|
|
1021
|
-
tags,
|
|
1022
|
-
content: JSON.stringify(args.payload),
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
977
|
/**
|
|
1027
978
|
* kind:9802 highlight — NIP-84.
|
|
1028
979
|
*
|
package/src/index.ts
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
/** Bumped by hand with the version in package.json — `test/version.test.ts`
|
|
48
48
|
* pins the two together. It exists so "the upgrade reached the app" can be
|
|
49
49
|
* checked by grepping a built bundle rather than by trusting a lockfile. */
|
|
50
|
-
export const PROTOCOL_VERSION = '0.
|
|
50
|
+
export const PROTOCOL_VERSION = '0.28.0'
|
|
51
51
|
|
|
52
52
|
export {
|
|
53
53
|
// types
|
|
@@ -94,7 +94,6 @@ export {
|
|
|
94
94
|
buildMessage,
|
|
95
95
|
buildResolution,
|
|
96
96
|
buildBareFile,
|
|
97
|
-
buildComponent,
|
|
98
97
|
buildHighlight,
|
|
99
98
|
buildUnsignedRelayAuthEvent,
|
|
100
99
|
} from './events.js'
|
|
@@ -241,9 +240,17 @@ export {
|
|
|
241
240
|
|
|
242
241
|
export {
|
|
243
242
|
type BlockAnchor,
|
|
243
|
+
type Part,
|
|
244
|
+
type PartPointer,
|
|
245
|
+
type PartSource,
|
|
244
246
|
BLOCK_ANCHOR_TAG,
|
|
247
|
+
PART_TAG,
|
|
248
|
+
absenceOf,
|
|
245
249
|
blockAnchorOf,
|
|
250
|
+
partTag,
|
|
251
|
+
partsOf,
|
|
246
252
|
resolveBlockAnchor,
|
|
253
|
+
resolvePart,
|
|
247
254
|
} from './anchors.js'
|
|
248
255
|
export {
|
|
249
256
|
type BlossomVerb,
|