@openvtc/trust-tasks 0.28.3 → 0.28.5
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 +85 -0
- package/dist/_extends.d.ts.map +1 -1
- package/dist/_extends.js +2 -0
- package/dist/_extends.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/peer-check/ask/0.1/payload.d.ts +397 -0
- package/dist/peer-check/ask/0.1/payload.d.ts.map +1 -0
- package/dist/peer-check/ask/0.1/payload.js +235 -0
- package/dist/peer-check/ask/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/act/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.1/payload.js +1 -1
- package/dist/rooms/keys/act/0.2/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.2/payload.js +1 -1
- package/dist/rooms/keys/act/0.3/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.3/payload.js +1 -1
- package/dist/rooms/keys/act/0.4/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.4/payload.js +1 -1
- package/dist/rooms/keys/act/0.5/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.5/payload.js +1 -1
- package/dist/rooms/keys/act/0.6/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.6/payload.js +1 -1
- package/dist/rooms/keys/act/0.7/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.7/payload.js +1 -1
- package/dist/rooms/keys/act/0.8/payload.d.ts +14 -2
- package/dist/rooms/keys/act/0.8/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.8/payload.js +1 -1
- package/dist/rooms/keys/act/0.8/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.9/payload.d.ts +560 -0
- package/dist/rooms/keys/act/0.9/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.9/payload.js +319 -0
- package/dist/rooms/keys/act/0.9/payload.js.map +1 -0
- package/dist/vta/webvh/dids/update/1.0/payload.d.ts +14 -2
- package/dist/vta/webvh/dids/update/1.0/payload.d.ts.map +1 -1
- package/dist/vta/webvh/dids/update/1.0/payload.js +1 -1
- package/dist/vta/webvh/dids/update/1.0/payload.js.map +1 -1
- package/dist/vta/webvh/dids/update/1.1/payload.d.ts +511 -0
- package/dist/vta/webvh/dids/update/1.1/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/update/1.1/payload.js +251 -0
- package/dist/vta/webvh/dids/update/1.1/payload.js.map +1 -0
- package/dist/vtc/elections/ballot-boxes/list/0.1/payload.d.ts +366 -0
- package/dist/vtc/elections/ballot-boxes/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/ballot-boxes/list/0.1/payload.js +205 -0
- package/dist/vtc/elections/ballot-boxes/list/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_extends.ts +2 -0
- package/src/index.ts +12 -0
- package/src/peer-check/ask/0.1/payload.ts +301 -0
- package/src/rooms/keys/act/0.1/payload.ts +5 -5
- package/src/rooms/keys/act/0.2/payload.ts +5 -5
- package/src/rooms/keys/act/0.3/payload.ts +5 -5
- package/src/rooms/keys/act/0.4/payload.ts +5 -5
- package/src/rooms/keys/act/0.5/payload.ts +5 -5
- package/src/rooms/keys/act/0.6/payload.ts +5 -5
- package/src/rooms/keys/act/0.7/payload.ts +5 -5
- package/src/rooms/keys/act/0.8/payload.ts +15 -3
- package/src/rooms/keys/act/0.9/payload.ts +396 -0
- package/src/vta/webvh/dids/update/1.0/payload.ts +15 -3
- package/src/vta/webvh/dids/update/1.1/payload.ts +351 -0
- package/src/vtc/elections/ballot-boxes/list/0.1/payload.ts +260 -0
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/webvh/dids/update/1.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Ask a Verifiable Trust Agent to publish a new entry in a did:webvh log it holds the update key for. The agent decides whether to do so; the caller proposes.
|
|
8
|
+
*/
|
|
9
|
+
export interface WebVHDIDUpdatePayload {
|
|
10
|
+
/**
|
|
11
|
+
* The did:webvh being updated. The agent MUST verify it speaks for this subject.
|
|
12
|
+
*/
|
|
13
|
+
did: string;
|
|
14
|
+
/**
|
|
15
|
+
* The new DID document. Omit to leave it unchanged. Supplying this ROTATES the DID's update key and refreshes its pre-rotation commitments, as a parallel consequence of the change — a consequence not visible anywhere in this payload, because it lives in the executing handler's semantics. A consent surface MUST therefore render effects the executor computed, and MUST NOT derive them from this document.
|
|
16
|
+
*/
|
|
17
|
+
document?: {};
|
|
18
|
+
/**
|
|
19
|
+
* Number of pre-rotation commitments to publish. Omit to keep the current count; `0` disables pre-rotation going forward.
|
|
20
|
+
*/
|
|
21
|
+
preRotationCount?: number;
|
|
22
|
+
/**
|
|
23
|
+
* New witness configuration. Omit to keep the current one.
|
|
24
|
+
*/
|
|
25
|
+
witnesses?: {
|
|
26
|
+
[k: string]: unknown | undefined;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* New watcher URLs. Omit to keep the current set; an empty array removes them.
|
|
30
|
+
*/
|
|
31
|
+
watchers?: string[];
|
|
32
|
+
/**
|
|
33
|
+
* New TTL in seconds. Omit to keep the current value.
|
|
34
|
+
*/
|
|
35
|
+
ttl?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Operator-facing audit label.
|
|
38
|
+
*/
|
|
39
|
+
label?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Optimistic-concurrency precondition: the versionId the caller based this edit on. The agent MUST refuse the update if the DID's latest entry no longer matches. Without it a `get -> edit -> save` cycle silently overwrites a concurrent edit with a chain that is structurally valid, verifies perfectly, and is based on a stale read. Where a human approves the update the window is minutes wide, so this is a routine race rather than an exotic one. OPTIONAL because a scripted caller with no concurrent writers has nothing to protect against; not optional for anything a person looked at.
|
|
42
|
+
*/
|
|
43
|
+
expectedVersionId?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the published document lists this log's `did:scid:vh:1:<scid>?src=<source>` DID URL in `alsoKnownAs`, linking the did:webvh and did:scid forms as one subject (VTI-KEY-164). `true` adds it, for the log's current location, after the entries the document already has; `false` removes every did:scid entry naming this log's SCID. Applied to `document` when one is supplied, otherwise to the current document. Omit to leave `alsoKnownAs` as `document` (or the current document) has it. The agent derives the DID URL itself — the caller never writes it. Changing it publishes an entry, and so ROTATES the update key exactly as supplying `document` does.
|
|
46
|
+
*/
|
|
47
|
+
scidAlsoKnownAs?: boolean;
|
|
48
|
+
ext?: Ext;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The published entry. camelCase per the framework convention — note the counts are the state AFTER the update, including the rotation the caller did not ask for.
|
|
52
|
+
*/
|
|
53
|
+
export interface WebVHDIDUpdateResponsePayload {
|
|
54
|
+
did: string;
|
|
55
|
+
/**
|
|
56
|
+
* versionId of the entry just appended. A caller intending a further edit SHOULD pass this back as the next request's `expectedVersionId`.
|
|
57
|
+
*/
|
|
58
|
+
newVersionId: string;
|
|
59
|
+
newScid?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The appended log entry, as JSON text.
|
|
62
|
+
*/
|
|
63
|
+
newLogEntry?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Update keys authorized AFTER this entry. Where `document` was supplied these are new keys — the previous ones no longer authorize anything.
|
|
66
|
+
*/
|
|
67
|
+
updateKeysCount?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Pre-rotation commitments published by this entry.
|
|
70
|
+
*/
|
|
71
|
+
preRotationKeyCount?: number;
|
|
72
|
+
/**
|
|
73
|
+
* True when the agent holds the log itself and no hosting server was published to — the operator must fetch and redeploy `did.jsonl`.
|
|
74
|
+
*/
|
|
75
|
+
serverless?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the published document lists `scidDidUrl` in `alsoKnownAs`. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.
|
|
78
|
+
*/
|
|
79
|
+
scidAlsoKnownAs?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The `did:scid:vh:1:<scid>?src=<source>` DID URL of the log at its current location — the did:scid DID with the locator a recipient needs to resolve it. Reported whether or not it is listed. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.
|
|
82
|
+
*/
|
|
83
|
+
scidDidUrl?: string;
|
|
84
|
+
ext?: Ext;
|
|
85
|
+
}
|
|
86
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
87
|
+
export type { Ext };
|
|
88
|
+
/** Trust Task type URI. */
|
|
89
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vta/webvh/dids/update/1.1";
|
|
90
|
+
/**
|
|
91
|
+
* The earlier version of this specification that this one declares it
|
|
92
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
93
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
94
|
+
* `extendsChain` / `readForSpec`.
|
|
95
|
+
*/
|
|
96
|
+
export declare const EXTENDS: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
99
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
100
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
101
|
+
* Versions").
|
|
102
|
+
*/
|
|
103
|
+
export declare const DEPRECATION: string | null;
|
|
104
|
+
/** Stable alias for this specification's request payload shape. */
|
|
105
|
+
export type Payload = WebVHDIDUpdatePayload;
|
|
106
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
107
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/webvh/dids/update/1.1#response";
|
|
108
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
109
|
+
export type Response = WebVHDIDUpdateResponsePayload;
|
|
110
|
+
/**
|
|
111
|
+
* This specification's payload schema, as a value.
|
|
112
|
+
*
|
|
113
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
114
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
115
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
116
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
117
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
118
|
+
*/
|
|
119
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
120
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
121
|
+
readonly $id: "https://trusttasks.org/spec/vta/webvh/dids/update/1.1";
|
|
122
|
+
readonly title: "WebVH DID Update — payload";
|
|
123
|
+
readonly description: "Ask a Verifiable Trust Agent to publish a new entry in a did:webvh log it holds the update key for. The agent decides whether to do so; the caller proposes.";
|
|
124
|
+
readonly type: "object";
|
|
125
|
+
readonly additionalProperties: false;
|
|
126
|
+
readonly required: readonly ["did"];
|
|
127
|
+
readonly properties: {
|
|
128
|
+
readonly did: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly minLength: 1;
|
|
131
|
+
readonly description: "The did:webvh being updated. The agent MUST verify it speaks for this subject.";
|
|
132
|
+
};
|
|
133
|
+
readonly document: {
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly description: "The new DID document. Omit to leave it unchanged. Supplying this ROTATES the DID's update key and refreshes its pre-rotation commitments, as a parallel consequence of the change — a consequence not visible anywhere in this payload, because it lives in the executing handler's semantics. A consent surface MUST therefore render effects the executor computed, and MUST NOT derive them from this document.";
|
|
136
|
+
};
|
|
137
|
+
readonly preRotationCount: {
|
|
138
|
+
readonly type: "integer";
|
|
139
|
+
readonly minimum: 0;
|
|
140
|
+
readonly description: "Number of pre-rotation commitments to publish. Omit to keep the current count; `0` disables pre-rotation going forward.";
|
|
141
|
+
};
|
|
142
|
+
readonly witnesses: {
|
|
143
|
+
readonly description: "New witness configuration. Omit to keep the current one.";
|
|
144
|
+
};
|
|
145
|
+
readonly watchers: {
|
|
146
|
+
readonly type: "array";
|
|
147
|
+
readonly items: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
};
|
|
150
|
+
readonly description: "New watcher URLs. Omit to keep the current set; an empty array removes them.";
|
|
151
|
+
};
|
|
152
|
+
readonly ttl: {
|
|
153
|
+
readonly type: "integer";
|
|
154
|
+
readonly minimum: 0;
|
|
155
|
+
readonly description: "New TTL in seconds. Omit to keep the current value.";
|
|
156
|
+
};
|
|
157
|
+
readonly label: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly maxLength: 256;
|
|
160
|
+
readonly description: "Operator-facing audit label.";
|
|
161
|
+
};
|
|
162
|
+
readonly expectedVersionId: {
|
|
163
|
+
readonly type: "string";
|
|
164
|
+
readonly minLength: 1;
|
|
165
|
+
readonly description: "Optimistic-concurrency precondition: the versionId the caller based this edit on. The agent MUST refuse the update if the DID's latest entry no longer matches. Without it a `get -> edit -> save` cycle silently overwrites a concurrent edit with a chain that is structurally valid, verifies perfectly, and is based on a stale read. Where a human approves the update the window is minutes wide, so this is a routine race rather than an exotic one. OPTIONAL because a scripted caller with no concurrent writers has nothing to protect against; not optional for anything a person looked at.";
|
|
166
|
+
};
|
|
167
|
+
readonly scidAlsoKnownAs: {
|
|
168
|
+
readonly type: "boolean";
|
|
169
|
+
readonly description: "Whether the published document lists this log's `did:scid:vh:1:<scid>?src=<source>` DID URL in `alsoKnownAs`, linking the did:webvh and did:scid forms as one subject (VTI-KEY-164). `true` adds it, for the log's current location, after the entries the document already has; `false` removes every did:scid entry naming this log's SCID. Applied to `document` when one is supplied, otherwise to the current document. Omit to leave `alsoKnownAs` as `document` (or the current document) has it. The agent derives the DID URL itself — the caller never writes it. Changing it publishes an entry, and so ROTATES the update key exactly as supplying `document` does.";
|
|
170
|
+
};
|
|
171
|
+
readonly ext: {
|
|
172
|
+
readonly $ref: "#/$defs/Ext";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
readonly $defs: {
|
|
176
|
+
readonly Response: {
|
|
177
|
+
readonly $anchor: "response";
|
|
178
|
+
readonly title: "WebVH DID Update — response payload";
|
|
179
|
+
readonly description: "The published entry. camelCase per the framework convention — note the counts are the state AFTER the update, including the rotation the caller did not ask for.";
|
|
180
|
+
readonly type: "object";
|
|
181
|
+
readonly additionalProperties: false;
|
|
182
|
+
readonly required: readonly ["did", "newVersionId"];
|
|
183
|
+
readonly properties: {
|
|
184
|
+
readonly did: {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
};
|
|
187
|
+
readonly newVersionId: {
|
|
188
|
+
readonly type: "string";
|
|
189
|
+
readonly description: "versionId of the entry just appended. A caller intending a further edit SHOULD pass this back as the next request's `expectedVersionId`.";
|
|
190
|
+
};
|
|
191
|
+
readonly newScid: {
|
|
192
|
+
readonly type: "string";
|
|
193
|
+
};
|
|
194
|
+
readonly newLogEntry: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly description: "The appended log entry, as JSON text.";
|
|
197
|
+
};
|
|
198
|
+
readonly updateKeysCount: {
|
|
199
|
+
readonly type: "integer";
|
|
200
|
+
readonly minimum: 0;
|
|
201
|
+
readonly description: "Update keys authorized AFTER this entry. Where `document` was supplied these are new keys — the previous ones no longer authorize anything.";
|
|
202
|
+
};
|
|
203
|
+
readonly preRotationKeyCount: {
|
|
204
|
+
readonly type: "integer";
|
|
205
|
+
readonly minimum: 0;
|
|
206
|
+
readonly description: "Pre-rotation commitments published by this entry.";
|
|
207
|
+
};
|
|
208
|
+
readonly serverless: {
|
|
209
|
+
readonly type: "boolean";
|
|
210
|
+
readonly description: "True when the agent holds the log itself and no hosting server was published to — the operator must fetch and redeploy `did.jsonl`.";
|
|
211
|
+
};
|
|
212
|
+
readonly scidAlsoKnownAs: {
|
|
213
|
+
readonly type: "boolean";
|
|
214
|
+
readonly description: "Whether the published document lists `scidDidUrl` in `alsoKnownAs`. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
215
|
+
};
|
|
216
|
+
readonly scidDidUrl: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
readonly description: "The `did:scid:vh:1:<scid>?src=<source>` DID URL of the log at its current location — the did:scid DID with the locator a recipient needs to resolve it. Reported whether or not it is listed. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
219
|
+
};
|
|
220
|
+
readonly ext: {
|
|
221
|
+
readonly $ref: "#/$defs/Ext";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
readonly Ext: {
|
|
226
|
+
readonly title: "Ext";
|
|
227
|
+
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.";
|
|
228
|
+
readonly type: "object";
|
|
229
|
+
readonly minProperties: 1;
|
|
230
|
+
readonly additionalProperties: true;
|
|
231
|
+
readonly propertyNames: {
|
|
232
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
238
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
239
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
240
|
+
readonly $ref: "#/$defs/Response";
|
|
241
|
+
readonly $defs: {
|
|
242
|
+
readonly Response: {
|
|
243
|
+
readonly $anchor: "response";
|
|
244
|
+
readonly title: "WebVH DID Update — response payload";
|
|
245
|
+
readonly description: "The published entry. camelCase per the framework convention — note the counts are the state AFTER the update, including the rotation the caller did not ask for.";
|
|
246
|
+
readonly type: "object";
|
|
247
|
+
readonly additionalProperties: false;
|
|
248
|
+
readonly required: readonly ["did", "newVersionId"];
|
|
249
|
+
readonly properties: {
|
|
250
|
+
readonly did: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
};
|
|
253
|
+
readonly newVersionId: {
|
|
254
|
+
readonly type: "string";
|
|
255
|
+
readonly description: "versionId of the entry just appended. A caller intending a further edit SHOULD pass this back as the next request's `expectedVersionId`.";
|
|
256
|
+
};
|
|
257
|
+
readonly newScid: {
|
|
258
|
+
readonly type: "string";
|
|
259
|
+
};
|
|
260
|
+
readonly newLogEntry: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly description: "The appended log entry, as JSON text.";
|
|
263
|
+
};
|
|
264
|
+
readonly updateKeysCount: {
|
|
265
|
+
readonly type: "integer";
|
|
266
|
+
readonly minimum: 0;
|
|
267
|
+
readonly description: "Update keys authorized AFTER this entry. Where `document` was supplied these are new keys — the previous ones no longer authorize anything.";
|
|
268
|
+
};
|
|
269
|
+
readonly preRotationKeyCount: {
|
|
270
|
+
readonly type: "integer";
|
|
271
|
+
readonly minimum: 0;
|
|
272
|
+
readonly description: "Pre-rotation commitments published by this entry.";
|
|
273
|
+
};
|
|
274
|
+
readonly serverless: {
|
|
275
|
+
readonly type: "boolean";
|
|
276
|
+
readonly description: "True when the agent holds the log itself and no hosting server was published to — the operator must fetch and redeploy `did.jsonl`.";
|
|
277
|
+
};
|
|
278
|
+
readonly scidAlsoKnownAs: {
|
|
279
|
+
readonly type: "boolean";
|
|
280
|
+
readonly description: "Whether the published document lists `scidDidUrl` in `alsoKnownAs`. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
281
|
+
};
|
|
282
|
+
readonly scidDidUrl: {
|
|
283
|
+
readonly type: "string";
|
|
284
|
+
readonly description: "The `did:scid:vh:1:<scid>?src=<source>` DID URL of the log at its current location — the did:scid DID with the locator a recipient needs to resolve it. Reported whether or not it is listed. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
285
|
+
};
|
|
286
|
+
readonly ext: {
|
|
287
|
+
readonly $ref: "#/$defs/Ext";
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
readonly Ext: {
|
|
292
|
+
readonly title: "Ext";
|
|
293
|
+
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.";
|
|
294
|
+
readonly type: "object";
|
|
295
|
+
readonly minProperties: 1;
|
|
296
|
+
readonly additionalProperties: true;
|
|
297
|
+
readonly propertyNames: {
|
|
298
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
305
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
306
|
+
* per-specification and cannot be derived from the document alone, and
|
|
307
|
+
* item 2 needs the schema this carries.
|
|
308
|
+
*/
|
|
309
|
+
export declare const SPEC: {
|
|
310
|
+
readonly typeUri: "https://trusttasks.org/spec/vta/webvh/dids/update/1.1";
|
|
311
|
+
readonly isBearer: false;
|
|
312
|
+
readonly isProofRequired: true;
|
|
313
|
+
readonly isRecipientRequired: true;
|
|
314
|
+
readonly isIssuedAtRequired: true;
|
|
315
|
+
readonly payloadSchema: {
|
|
316
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
317
|
+
readonly $id: "https://trusttasks.org/spec/vta/webvh/dids/update/1.1";
|
|
318
|
+
readonly title: "WebVH DID Update — payload";
|
|
319
|
+
readonly description: "Ask a Verifiable Trust Agent to publish a new entry in a did:webvh log it holds the update key for. The agent decides whether to do so; the caller proposes.";
|
|
320
|
+
readonly type: "object";
|
|
321
|
+
readonly additionalProperties: false;
|
|
322
|
+
readonly required: readonly ["did"];
|
|
323
|
+
readonly properties: {
|
|
324
|
+
readonly did: {
|
|
325
|
+
readonly type: "string";
|
|
326
|
+
readonly minLength: 1;
|
|
327
|
+
readonly description: "The did:webvh being updated. The agent MUST verify it speaks for this subject.";
|
|
328
|
+
};
|
|
329
|
+
readonly document: {
|
|
330
|
+
readonly type: "object";
|
|
331
|
+
readonly description: "The new DID document. Omit to leave it unchanged. Supplying this ROTATES the DID's update key and refreshes its pre-rotation commitments, as a parallel consequence of the change — a consequence not visible anywhere in this payload, because it lives in the executing handler's semantics. A consent surface MUST therefore render effects the executor computed, and MUST NOT derive them from this document.";
|
|
332
|
+
};
|
|
333
|
+
readonly preRotationCount: {
|
|
334
|
+
readonly type: "integer";
|
|
335
|
+
readonly minimum: 0;
|
|
336
|
+
readonly description: "Number of pre-rotation commitments to publish. Omit to keep the current count; `0` disables pre-rotation going forward.";
|
|
337
|
+
};
|
|
338
|
+
readonly witnesses: {
|
|
339
|
+
readonly description: "New witness configuration. Omit to keep the current one.";
|
|
340
|
+
};
|
|
341
|
+
readonly watchers: {
|
|
342
|
+
readonly type: "array";
|
|
343
|
+
readonly items: {
|
|
344
|
+
readonly type: "string";
|
|
345
|
+
};
|
|
346
|
+
readonly description: "New watcher URLs. Omit to keep the current set; an empty array removes them.";
|
|
347
|
+
};
|
|
348
|
+
readonly ttl: {
|
|
349
|
+
readonly type: "integer";
|
|
350
|
+
readonly minimum: 0;
|
|
351
|
+
readonly description: "New TTL in seconds. Omit to keep the current value.";
|
|
352
|
+
};
|
|
353
|
+
readonly label: {
|
|
354
|
+
readonly type: "string";
|
|
355
|
+
readonly maxLength: 256;
|
|
356
|
+
readonly description: "Operator-facing audit label.";
|
|
357
|
+
};
|
|
358
|
+
readonly expectedVersionId: {
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly minLength: 1;
|
|
361
|
+
readonly description: "Optimistic-concurrency precondition: the versionId the caller based this edit on. The agent MUST refuse the update if the DID's latest entry no longer matches. Without it a `get -> edit -> save` cycle silently overwrites a concurrent edit with a chain that is structurally valid, verifies perfectly, and is based on a stale read. Where a human approves the update the window is minutes wide, so this is a routine race rather than an exotic one. OPTIONAL because a scripted caller with no concurrent writers has nothing to protect against; not optional for anything a person looked at.";
|
|
362
|
+
};
|
|
363
|
+
readonly scidAlsoKnownAs: {
|
|
364
|
+
readonly type: "boolean";
|
|
365
|
+
readonly description: "Whether the published document lists this log's `did:scid:vh:1:<scid>?src=<source>` DID URL in `alsoKnownAs`, linking the did:webvh and did:scid forms as one subject (VTI-KEY-164). `true` adds it, for the log's current location, after the entries the document already has; `false` removes every did:scid entry naming this log's SCID. Applied to `document` when one is supplied, otherwise to the current document. Omit to leave `alsoKnownAs` as `document` (or the current document) has it. The agent derives the DID URL itself — the caller never writes it. Changing it publishes an entry, and so ROTATES the update key exactly as supplying `document` does.";
|
|
366
|
+
};
|
|
367
|
+
readonly ext: {
|
|
368
|
+
readonly $ref: "#/$defs/Ext";
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
readonly $defs: {
|
|
372
|
+
readonly Response: {
|
|
373
|
+
readonly $anchor: "response";
|
|
374
|
+
readonly title: "WebVH DID Update — response payload";
|
|
375
|
+
readonly description: "The published entry. camelCase per the framework convention — note the counts are the state AFTER the update, including the rotation the caller did not ask for.";
|
|
376
|
+
readonly type: "object";
|
|
377
|
+
readonly additionalProperties: false;
|
|
378
|
+
readonly required: readonly ["did", "newVersionId"];
|
|
379
|
+
readonly properties: {
|
|
380
|
+
readonly did: {
|
|
381
|
+
readonly type: "string";
|
|
382
|
+
};
|
|
383
|
+
readonly newVersionId: {
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
readonly description: "versionId of the entry just appended. A caller intending a further edit SHOULD pass this back as the next request's `expectedVersionId`.";
|
|
386
|
+
};
|
|
387
|
+
readonly newScid: {
|
|
388
|
+
readonly type: "string";
|
|
389
|
+
};
|
|
390
|
+
readonly newLogEntry: {
|
|
391
|
+
readonly type: "string";
|
|
392
|
+
readonly description: "The appended log entry, as JSON text.";
|
|
393
|
+
};
|
|
394
|
+
readonly updateKeysCount: {
|
|
395
|
+
readonly type: "integer";
|
|
396
|
+
readonly minimum: 0;
|
|
397
|
+
readonly description: "Update keys authorized AFTER this entry. Where `document` was supplied these are new keys — the previous ones no longer authorize anything.";
|
|
398
|
+
};
|
|
399
|
+
readonly preRotationKeyCount: {
|
|
400
|
+
readonly type: "integer";
|
|
401
|
+
readonly minimum: 0;
|
|
402
|
+
readonly description: "Pre-rotation commitments published by this entry.";
|
|
403
|
+
};
|
|
404
|
+
readonly serverless: {
|
|
405
|
+
readonly type: "boolean";
|
|
406
|
+
readonly description: "True when the agent holds the log itself and no hosting server was published to — the operator must fetch and redeploy `did.jsonl`.";
|
|
407
|
+
};
|
|
408
|
+
readonly scidAlsoKnownAs: {
|
|
409
|
+
readonly type: "boolean";
|
|
410
|
+
readonly description: "Whether the published document lists `scidDidUrl` in `alsoKnownAs`. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
411
|
+
};
|
|
412
|
+
readonly scidDidUrl: {
|
|
413
|
+
readonly type: "string";
|
|
414
|
+
readonly description: "The `did:scid:vh:1:<scid>?src=<source>` DID URL of the log at its current location — the did:scid DID with the locator a recipient needs to resolve it. Reported whether or not it is listed. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
415
|
+
};
|
|
416
|
+
readonly ext: {
|
|
417
|
+
readonly $ref: "#/$defs/Ext";
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
readonly Ext: {
|
|
422
|
+
readonly title: "Ext";
|
|
423
|
+
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.";
|
|
424
|
+
readonly type: "object";
|
|
425
|
+
readonly minProperties: 1;
|
|
426
|
+
readonly additionalProperties: true;
|
|
427
|
+
readonly propertyNames: {
|
|
428
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
436
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
437
|
+
* parties (§7.3 item 5).
|
|
438
|
+
*/
|
|
439
|
+
export declare const RESPONSE_SPEC: {
|
|
440
|
+
readonly typeUri: "https://trusttasks.org/spec/vta/webvh/dids/update/1.1#response";
|
|
441
|
+
readonly isBearer: false;
|
|
442
|
+
readonly isProofRequired: true;
|
|
443
|
+
readonly isRecipientRequired: true;
|
|
444
|
+
readonly isIssuedAtRequired: true;
|
|
445
|
+
readonly payloadSchema: {
|
|
446
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
447
|
+
readonly $ref: "#/$defs/Response";
|
|
448
|
+
readonly $defs: {
|
|
449
|
+
readonly Response: {
|
|
450
|
+
readonly $anchor: "response";
|
|
451
|
+
readonly title: "WebVH DID Update — response payload";
|
|
452
|
+
readonly description: "The published entry. camelCase per the framework convention — note the counts are the state AFTER the update, including the rotation the caller did not ask for.";
|
|
453
|
+
readonly type: "object";
|
|
454
|
+
readonly additionalProperties: false;
|
|
455
|
+
readonly required: readonly ["did", "newVersionId"];
|
|
456
|
+
readonly properties: {
|
|
457
|
+
readonly did: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
};
|
|
460
|
+
readonly newVersionId: {
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly description: "versionId of the entry just appended. A caller intending a further edit SHOULD pass this back as the next request's `expectedVersionId`.";
|
|
463
|
+
};
|
|
464
|
+
readonly newScid: {
|
|
465
|
+
readonly type: "string";
|
|
466
|
+
};
|
|
467
|
+
readonly newLogEntry: {
|
|
468
|
+
readonly type: "string";
|
|
469
|
+
readonly description: "The appended log entry, as JSON text.";
|
|
470
|
+
};
|
|
471
|
+
readonly updateKeysCount: {
|
|
472
|
+
readonly type: "integer";
|
|
473
|
+
readonly minimum: 0;
|
|
474
|
+
readonly description: "Update keys authorized AFTER this entry. Where `document` was supplied these are new keys — the previous ones no longer authorize anything.";
|
|
475
|
+
};
|
|
476
|
+
readonly preRotationKeyCount: {
|
|
477
|
+
readonly type: "integer";
|
|
478
|
+
readonly minimum: 0;
|
|
479
|
+
readonly description: "Pre-rotation commitments published by this entry.";
|
|
480
|
+
};
|
|
481
|
+
readonly serverless: {
|
|
482
|
+
readonly type: "boolean";
|
|
483
|
+
readonly description: "True when the agent holds the log itself and no hosting server was published to — the operator must fetch and redeploy `did.jsonl`.";
|
|
484
|
+
};
|
|
485
|
+
readonly scidAlsoKnownAs: {
|
|
486
|
+
readonly type: "boolean";
|
|
487
|
+
readonly description: "Whether the published document lists `scidDidUrl` in `alsoKnownAs`. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
488
|
+
};
|
|
489
|
+
readonly scidDidUrl: {
|
|
490
|
+
readonly type: "string";
|
|
491
|
+
readonly description: "The `did:scid:vh:1:<scid>?src=<source>` DID URL of the log at its current location — the did:scid DID with the locator a recipient needs to resolve it. Reported whether or not it is listed. A 1.1 consumer MUST report it; it is optional in the schema only because 1.1 extends 1.0.";
|
|
492
|
+
};
|
|
493
|
+
readonly ext: {
|
|
494
|
+
readonly $ref: "#/$defs/Ext";
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
readonly Ext: {
|
|
499
|
+
readonly title: "Ext";
|
|
500
|
+
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.";
|
|
501
|
+
readonly type: "object";
|
|
502
|
+
readonly minProperties: 1;
|
|
503
|
+
readonly additionalProperties: true;
|
|
504
|
+
readonly propertyNames: {
|
|
505
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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