@openvtc/trust-tasks 0.18.3 → 0.18.4
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 +156 -0
- package/dist/_shared/components.d.ts +56 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/process-attestation/0.1/payload.d.ts +1190 -0
- package/dist/process-attestation/0.1/payload.d.ts.map +1 -0
- package/dist/process-attestation/0.1/payload.js +660 -0
- package/dist/process-attestation/0.1/payload.js.map +1 -0
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.d.ts +58 -2
- package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.js +32 -0
- package/dist/rooms/create/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/commits/0.1/payload.d.ts +506 -0
- package/dist/rooms/epoch/commits/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/commits/0.1/payload.js +268 -0
- package/dist/rooms/epoch/commits/0.1/payload.js.map +1 -0
- package/dist/rooms/epoch/mint/0.1/payload.d.ts +20 -0
- package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/epoch/mint/0.1/payload.js +5 -0
- package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/prune/0.1/payload.d.ts +423 -0
- package/dist/rooms/epoch/prune/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/epoch/prune/0.1/payload.js +229 -0
- package/dist/rooms/epoch/prune/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/browse/0.1/payload.d.ts +20 -0
- package/dist/rooms/keys/browse/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/browse/0.1/payload.js +24 -0
- package/dist/rooms/keys/browse/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/read/0.1/payload.d.ts +20 -0
- package/dist/rooms/keys/read/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/read/0.1/payload.js +24 -0
- package/dist/rooms/keys/read/0.1/payload.js.map +1 -1
- package/dist/rooms/owner/anchor/0.1/payload.d.ts +537 -0
- package/dist/rooms/owner/anchor/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/anchor/0.1/payload.js +291 -0
- package/dist/rooms/owner/anchor/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +56 -0
- package/src/index.ts +4 -0
- package/src/process-attestation/0.1/payload.ts +794 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/create/0.1/payload.ts +42 -2
- package/src/rooms/epoch/commits/0.1/payload.ts +341 -0
- package/src/rooms/epoch/mint/0.1/payload.ts +15 -0
- package/src/rooms/epoch/prune/0.1/payload.ts +289 -0
- package/src/rooms/keys/browse/0.1/payload.ts +24 -0
- package/src/rooms/keys/read/0.1/payload.ts +24 -0
- package/src/rooms/owner/anchor/0.1/payload.ts +353 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/epoch/prune/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { AuthorityPresentation, Ext } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* TODO: what the request payload of rooms/epoch/prune carries. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface RoomsEpochPrunePayload {
|
|
10
|
+
/**
|
|
11
|
+
* The room to prune.
|
|
12
|
+
*/
|
|
13
|
+
roomId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Drop every rung *below* this epoch, so the chain walks back no further than it.
|
|
16
|
+
*
|
|
17
|
+
* `minimum: 2` because pruning below epoch 1 would drop nothing and asking to is a caller that has misunderstood the direction — the chain walks backwards, and epoch 1 is where it ends.
|
|
18
|
+
*/
|
|
19
|
+
beforeEpoch: number;
|
|
20
|
+
/**
|
|
21
|
+
* Must confer `admin` at this room's scope. Not `curate`, and not `write`: pruning is not a statement about any record, and every member who can write can curate. It ends the room's ability to open a span of its own history, for everyone, which is the same class of act as advancing the epoch.
|
|
22
|
+
*/
|
|
23
|
+
presentation: AuthorityPresentation;
|
|
24
|
+
/**
|
|
25
|
+
* Why, for the room's audit trail. A prune is irreversible and unattributable after the fact — the rungs are simply gone — so the only record of intent is the one made at the time.
|
|
26
|
+
*/
|
|
27
|
+
reason?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
30
|
+
*/
|
|
31
|
+
ext?: Ext;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.1#response.
|
|
35
|
+
*/
|
|
36
|
+
export interface RoomsEpochPruneResponsePayload {
|
|
37
|
+
roomId: string;
|
|
38
|
+
/**
|
|
39
|
+
* How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.
|
|
40
|
+
*/
|
|
41
|
+
pruned: number;
|
|
42
|
+
/**
|
|
43
|
+
* The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.
|
|
44
|
+
*/
|
|
45
|
+
earliestRung: number;
|
|
46
|
+
ext?: Ext;
|
|
47
|
+
}
|
|
48
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
49
|
+
export type { AuthorityPresentation, Ext };
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/prune/0.1";
|
|
52
|
+
/** Stable alias for this specification's request payload shape. */
|
|
53
|
+
export type Payload = RoomsEpochPrunePayload;
|
|
54
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
55
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/epoch/prune/0.1#response";
|
|
56
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
57
|
+
export type Response = RoomsEpochPruneResponsePayload;
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
68
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
69
|
+
readonly $id: "https://trusttasks.org/spec/rooms/epoch/prune/0.1";
|
|
70
|
+
readonly title: "Rooms Epoch Prune — payload";
|
|
71
|
+
readonly description: "TODO: what the request payload of rooms/epoch/prune carries. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
72
|
+
readonly type: "object";
|
|
73
|
+
readonly additionalProperties: false;
|
|
74
|
+
readonly required: readonly ["roomId", "beforeEpoch", "presentation"];
|
|
75
|
+
readonly properties: {
|
|
76
|
+
readonly roomId: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly description: "The room to prune.";
|
|
79
|
+
};
|
|
80
|
+
readonly beforeEpoch: {
|
|
81
|
+
readonly type: "integer";
|
|
82
|
+
readonly minimum: 2;
|
|
83
|
+
readonly description: "Drop every rung *below* this epoch, so the chain walks back no further than it.\n\n`minimum: 2` because pruning below epoch 1 would drop nothing and asking to is a caller that has misunderstood the direction — the chain walks backwards, and epoch 1 is where it ends.";
|
|
84
|
+
};
|
|
85
|
+
readonly presentation: {
|
|
86
|
+
readonly $ref: "#/$defs/AuthorityPresentation";
|
|
87
|
+
readonly description: "Must confer `admin` at this room's scope. Not `curate`, and not `write`: pruning is not a statement about any record, and every member who can write can curate. It ends the room's ability to open a span of its own history, for everyone, which is the same class of act as advancing the epoch.";
|
|
88
|
+
};
|
|
89
|
+
readonly reason: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
readonly maxLength: 512;
|
|
92
|
+
readonly description: "Why, for the room's audit trail. A prune is irreversible and unattributable after the fact — the rungs are simply gone — so the only record of intent is the one made at the time.";
|
|
93
|
+
};
|
|
94
|
+
readonly ext: {
|
|
95
|
+
readonly $ref: "#/$defs/Ext";
|
|
96
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly $defs: {
|
|
100
|
+
readonly Response: {
|
|
101
|
+
readonly $anchor: "response";
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly additionalProperties: false;
|
|
104
|
+
readonly required: readonly ["roomId", "pruned", "earliestRung"];
|
|
105
|
+
readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.1#response.";
|
|
106
|
+
readonly properties: {
|
|
107
|
+
readonly roomId: {
|
|
108
|
+
readonly type: "string";
|
|
109
|
+
};
|
|
110
|
+
readonly pruned: {
|
|
111
|
+
readonly type: "integer";
|
|
112
|
+
readonly minimum: 0;
|
|
113
|
+
readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
|
|
114
|
+
};
|
|
115
|
+
readonly earliestRung: {
|
|
116
|
+
readonly type: "integer";
|
|
117
|
+
readonly minimum: 1;
|
|
118
|
+
readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
|
|
119
|
+
};
|
|
120
|
+
readonly ext: {
|
|
121
|
+
readonly $ref: "#/$defs/Ext";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly title: "Rooms Epoch Prune — response payload";
|
|
125
|
+
};
|
|
126
|
+
readonly Ext: {
|
|
127
|
+
readonly title: "Ext";
|
|
128
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
129
|
+
readonly type: "object";
|
|
130
|
+
readonly minProperties: 1;
|
|
131
|
+
readonly additionalProperties: true;
|
|
132
|
+
readonly propertyNames: {
|
|
133
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
readonly AuthorityPresentation: {
|
|
137
|
+
readonly title: "AuthorityPresentation";
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly additionalProperties: false;
|
|
140
|
+
readonly required: readonly ["membership", "authority"];
|
|
141
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
142
|
+
readonly properties: {
|
|
143
|
+
readonly membership: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
|
|
146
|
+
};
|
|
147
|
+
readonly authority: {
|
|
148
|
+
readonly type: "array";
|
|
149
|
+
readonly minItems: 1;
|
|
150
|
+
readonly maxItems: 8;
|
|
151
|
+
readonly items: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
};
|
|
154
|
+
readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
|
|
155
|
+
};
|
|
156
|
+
readonly subjectBinding: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
165
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
166
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
167
|
+
readonly $ref: "#/$defs/Response";
|
|
168
|
+
readonly $defs: {
|
|
169
|
+
readonly Response: {
|
|
170
|
+
readonly $anchor: "response";
|
|
171
|
+
readonly type: "object";
|
|
172
|
+
readonly additionalProperties: false;
|
|
173
|
+
readonly required: readonly ["roomId", "pruned", "earliestRung"];
|
|
174
|
+
readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.1#response.";
|
|
175
|
+
readonly properties: {
|
|
176
|
+
readonly roomId: {
|
|
177
|
+
readonly type: "string";
|
|
178
|
+
};
|
|
179
|
+
readonly pruned: {
|
|
180
|
+
readonly type: "integer";
|
|
181
|
+
readonly minimum: 0;
|
|
182
|
+
readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
|
|
183
|
+
};
|
|
184
|
+
readonly earliestRung: {
|
|
185
|
+
readonly type: "integer";
|
|
186
|
+
readonly minimum: 1;
|
|
187
|
+
readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
|
|
188
|
+
};
|
|
189
|
+
readonly ext: {
|
|
190
|
+
readonly $ref: "#/$defs/Ext";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
readonly title: "Rooms Epoch Prune — response payload";
|
|
194
|
+
};
|
|
195
|
+
readonly Ext: {
|
|
196
|
+
readonly title: "Ext";
|
|
197
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
198
|
+
readonly type: "object";
|
|
199
|
+
readonly minProperties: 1;
|
|
200
|
+
readonly additionalProperties: true;
|
|
201
|
+
readonly propertyNames: {
|
|
202
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
readonly AuthorityPresentation: {
|
|
206
|
+
readonly title: "AuthorityPresentation";
|
|
207
|
+
readonly type: "object";
|
|
208
|
+
readonly additionalProperties: false;
|
|
209
|
+
readonly required: readonly ["membership", "authority"];
|
|
210
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
211
|
+
readonly properties: {
|
|
212
|
+
readonly membership: {
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
|
|
215
|
+
};
|
|
216
|
+
readonly authority: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly minItems: 1;
|
|
219
|
+
readonly maxItems: 8;
|
|
220
|
+
readonly items: {
|
|
221
|
+
readonly type: "string";
|
|
222
|
+
};
|
|
223
|
+
readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
|
|
224
|
+
};
|
|
225
|
+
readonly subjectBinding: {
|
|
226
|
+
readonly type: "string";
|
|
227
|
+
readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
235
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
236
|
+
* per-specification and cannot be derived from the document alone, and
|
|
237
|
+
* item 2 needs the schema this carries.
|
|
238
|
+
*/
|
|
239
|
+
export declare const SPEC: {
|
|
240
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/epoch/prune/0.1";
|
|
241
|
+
readonly isBearer: false;
|
|
242
|
+
readonly isProofRequired: true;
|
|
243
|
+
readonly isRecipientRequired: true;
|
|
244
|
+
readonly isIssuedAtRequired: true;
|
|
245
|
+
readonly payloadSchema: {
|
|
246
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
247
|
+
readonly $id: "https://trusttasks.org/spec/rooms/epoch/prune/0.1";
|
|
248
|
+
readonly title: "Rooms Epoch Prune — payload";
|
|
249
|
+
readonly description: "TODO: what the request payload of rooms/epoch/prune carries. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
250
|
+
readonly type: "object";
|
|
251
|
+
readonly additionalProperties: false;
|
|
252
|
+
readonly required: readonly ["roomId", "beforeEpoch", "presentation"];
|
|
253
|
+
readonly properties: {
|
|
254
|
+
readonly roomId: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
readonly description: "The room to prune.";
|
|
257
|
+
};
|
|
258
|
+
readonly beforeEpoch: {
|
|
259
|
+
readonly type: "integer";
|
|
260
|
+
readonly minimum: 2;
|
|
261
|
+
readonly description: "Drop every rung *below* this epoch, so the chain walks back no further than it.\n\n`minimum: 2` because pruning below epoch 1 would drop nothing and asking to is a caller that has misunderstood the direction — the chain walks backwards, and epoch 1 is where it ends.";
|
|
262
|
+
};
|
|
263
|
+
readonly presentation: {
|
|
264
|
+
readonly $ref: "#/$defs/AuthorityPresentation";
|
|
265
|
+
readonly description: "Must confer `admin` at this room's scope. Not `curate`, and not `write`: pruning is not a statement about any record, and every member who can write can curate. It ends the room's ability to open a span of its own history, for everyone, which is the same class of act as advancing the epoch.";
|
|
266
|
+
};
|
|
267
|
+
readonly reason: {
|
|
268
|
+
readonly type: "string";
|
|
269
|
+
readonly maxLength: 512;
|
|
270
|
+
readonly description: "Why, for the room's audit trail. A prune is irreversible and unattributable after the fact — the rungs are simply gone — so the only record of intent is the one made at the time.";
|
|
271
|
+
};
|
|
272
|
+
readonly ext: {
|
|
273
|
+
readonly $ref: "#/$defs/Ext";
|
|
274
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
readonly $defs: {
|
|
278
|
+
readonly Response: {
|
|
279
|
+
readonly $anchor: "response";
|
|
280
|
+
readonly type: "object";
|
|
281
|
+
readonly additionalProperties: false;
|
|
282
|
+
readonly required: readonly ["roomId", "pruned", "earliestRung"];
|
|
283
|
+
readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.1#response.";
|
|
284
|
+
readonly properties: {
|
|
285
|
+
readonly roomId: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
};
|
|
288
|
+
readonly pruned: {
|
|
289
|
+
readonly type: "integer";
|
|
290
|
+
readonly minimum: 0;
|
|
291
|
+
readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
|
|
292
|
+
};
|
|
293
|
+
readonly earliestRung: {
|
|
294
|
+
readonly type: "integer";
|
|
295
|
+
readonly minimum: 1;
|
|
296
|
+
readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
|
|
297
|
+
};
|
|
298
|
+
readonly ext: {
|
|
299
|
+
readonly $ref: "#/$defs/Ext";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly title: "Rooms Epoch Prune — response payload";
|
|
303
|
+
};
|
|
304
|
+
readonly Ext: {
|
|
305
|
+
readonly title: "Ext";
|
|
306
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
307
|
+
readonly type: "object";
|
|
308
|
+
readonly minProperties: 1;
|
|
309
|
+
readonly additionalProperties: true;
|
|
310
|
+
readonly propertyNames: {
|
|
311
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
readonly AuthorityPresentation: {
|
|
315
|
+
readonly title: "AuthorityPresentation";
|
|
316
|
+
readonly type: "object";
|
|
317
|
+
readonly additionalProperties: false;
|
|
318
|
+
readonly required: readonly ["membership", "authority"];
|
|
319
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
320
|
+
readonly properties: {
|
|
321
|
+
readonly membership: {
|
|
322
|
+
readonly type: "string";
|
|
323
|
+
readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
|
|
324
|
+
};
|
|
325
|
+
readonly authority: {
|
|
326
|
+
readonly type: "array";
|
|
327
|
+
readonly minItems: 1;
|
|
328
|
+
readonly maxItems: 8;
|
|
329
|
+
readonly items: {
|
|
330
|
+
readonly type: "string";
|
|
331
|
+
};
|
|
332
|
+
readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
|
|
333
|
+
};
|
|
334
|
+
readonly subjectBinding: {
|
|
335
|
+
readonly type: "string";
|
|
336
|
+
readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
345
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
346
|
+
* parties (§7.3 item 5).
|
|
347
|
+
*/
|
|
348
|
+
export declare const RESPONSE_SPEC: {
|
|
349
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/epoch/prune/0.1#response";
|
|
350
|
+
readonly isBearer: false;
|
|
351
|
+
readonly isProofRequired: true;
|
|
352
|
+
readonly isRecipientRequired: true;
|
|
353
|
+
readonly isIssuedAtRequired: true;
|
|
354
|
+
readonly payloadSchema: {
|
|
355
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
356
|
+
readonly $ref: "#/$defs/Response";
|
|
357
|
+
readonly $defs: {
|
|
358
|
+
readonly Response: {
|
|
359
|
+
readonly $anchor: "response";
|
|
360
|
+
readonly type: "object";
|
|
361
|
+
readonly additionalProperties: false;
|
|
362
|
+
readonly required: readonly ["roomId", "pruned", "earliestRung"];
|
|
363
|
+
readonly description: "Success response to rooms/epoch/prune. Type https://trusttasks.org/spec/rooms/epoch/prune/0.1#response.";
|
|
364
|
+
readonly properties: {
|
|
365
|
+
readonly roomId: {
|
|
366
|
+
readonly type: "string";
|
|
367
|
+
};
|
|
368
|
+
readonly pruned: {
|
|
369
|
+
readonly type: "integer";
|
|
370
|
+
readonly minimum: 0;
|
|
371
|
+
readonly description: "How many rungs were dropped. `0` is a success: the chain already went back no further, and a caller that read it as a failure would retry an operation that has nothing left to do.";
|
|
372
|
+
};
|
|
373
|
+
readonly earliestRung: {
|
|
374
|
+
readonly type: "integer";
|
|
375
|
+
readonly minimum: 1;
|
|
376
|
+
readonly description: "The lowest epoch the chain still reaches, after pruning. **Not a restatement of `beforeEpoch`**: a chain with a gap in it already stopped somewhere, and a prune below that gap changes nothing about how far back a member can actually walk. Reporting the request back would tell an operator they had achieved something they had not.";
|
|
377
|
+
};
|
|
378
|
+
readonly ext: {
|
|
379
|
+
readonly $ref: "#/$defs/Ext";
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
readonly title: "Rooms Epoch Prune — response payload";
|
|
383
|
+
};
|
|
384
|
+
readonly Ext: {
|
|
385
|
+
readonly title: "Ext";
|
|
386
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
387
|
+
readonly type: "object";
|
|
388
|
+
readonly minProperties: 1;
|
|
389
|
+
readonly additionalProperties: true;
|
|
390
|
+
readonly propertyNames: {
|
|
391
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
readonly AuthorityPresentation: {
|
|
395
|
+
readonly title: "AuthorityPresentation";
|
|
396
|
+
readonly type: "object";
|
|
397
|
+
readonly additionalProperties: false;
|
|
398
|
+
readonly required: readonly ["membership", "authority"];
|
|
399
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
400
|
+
readonly properties: {
|
|
401
|
+
readonly membership: {
|
|
402
|
+
readonly type: "string";
|
|
403
|
+
readonly description: "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile.";
|
|
404
|
+
};
|
|
405
|
+
readonly authority: {
|
|
406
|
+
readonly type: "array";
|
|
407
|
+
readonly minItems: 1;
|
|
408
|
+
readonly maxItems: 8;
|
|
409
|
+
readonly items: {
|
|
410
|
+
readonly type: "string";
|
|
411
|
+
};
|
|
412
|
+
readonly description: "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent.";
|
|
413
|
+
};
|
|
414
|
+
readonly subjectBinding: {
|
|
415
|
+
readonly type: "string";
|
|
416
|
+
readonly description: "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this.";
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/epoch/prune/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC;AAE3C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,mDAA4D,CAAC;AAErF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAE7C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,4DAAqE,CAAC;AAEvG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0E1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|