@openvtc/trust-tasks 0.9.0 → 0.11.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/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/_shared/0.1/context.d.ts +11 -0
- package/dist/vta/_shared/0.1/context.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/context.js +6 -0
- package/dist/vta/_shared/0.1/context.js.map +1 -0
- package/dist/vta/_shared/0.1/service.d.ts +11 -0
- package/dist/vta/_shared/0.1/service.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/service.js +6 -0
- package/dist/vta/_shared/0.1/service.js.map +1 -0
- package/dist/vta/_shared/0.1/webvh-records.d.ts +11 -0
- package/dist/vta/_shared/0.1/webvh-records.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/webvh-records.js +6 -0
- package/dist/vta/_shared/0.1/webvh-records.js.map +1 -0
- package/dist/vta/contexts/create/1.0/payload.d.ts +443 -0
- package/dist/vta/contexts/create/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/create/1.0/payload.js +226 -0
- package/dist/vta/contexts/create/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/delete/1.0/payload.d.ts +256 -0
- package/dist/vta/contexts/delete/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/delete/1.0/payload.js +143 -0
- package/dist/vta/contexts/delete/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/get/1.0/payload.d.ts +405 -0
- package/dist/vta/contexts/get/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/get/1.0/payload.js +212 -0
- package/dist/vta/contexts/get/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/list/1.0/payload.d.ts +460 -0
- package/dist/vta/contexts/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/list/1.0/payload.js +237 -0
- package/dist/vta/contexts/list/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.d.ts +394 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.js +209 -0
- package/dist/vta/contexts/preview-delete/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/update/1.0/payload.d.ts +653 -0
- package/dist/vta/contexts/update/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/update/1.0/payload.js +314 -0
- package/dist/vta/contexts/update/1.0/payload.js.map +1 -0
- package/dist/vta/contexts/update-did/1.0/payload.d.ts +419 -0
- package/dist/vta/contexts/update-did/1.0/payload.d.ts.map +1 -0
- package/dist/vta/contexts/update-did/1.0/payload.js +218 -0
- package/dist/vta/contexts/update-did/1.0/payload.js.map +1 -0
- package/dist/vta/services/disable/1.0/payload.d.ts +438 -0
- package/dist/vta/services/disable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/disable/1.0/payload.js +235 -0
- package/dist/vta/services/disable/1.0/payload.js.map +1 -0
- package/dist/vta/services/drain/cancel/1.0/payload.d.ts +234 -0
- package/dist/vta/services/drain/cancel/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/drain/cancel/1.0/payload.js +131 -0
- package/dist/vta/services/drain/cancel/1.0/payload.js.map +1 -0
- package/dist/vta/services/drain/list/1.0/payload.d.ts +352 -0
- package/dist/vta/services/drain/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/drain/list/1.0/payload.js +189 -0
- package/dist/vta/services/drain/list/1.0/payload.js.map +1 -0
- package/dist/vta/services/enable/1.0/payload.d.ts +511 -0
- package/dist/vta/services/enable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/enable/1.0/payload.js +262 -0
- package/dist/vta/services/enable/1.0/payload.js.map +1 -0
- package/dist/vta/services/get/1.0/payload.d.ts +399 -0
- package/dist/vta/services/get/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/get/1.0/payload.js +219 -0
- package/dist/vta/services/get/1.0/payload.js.map +1 -0
- package/dist/vta/services/list/1.0/payload.d.ts +409 -0
- package/dist/vta/services/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/list/1.0/payload.js +221 -0
- package/dist/vta/services/list/1.0/payload.js.map +1 -0
- package/dist/vta/services/rollback/1.0/payload.d.ts +438 -0
- package/dist/vta/services/rollback/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/rollback/1.0/payload.js +235 -0
- package/dist/vta/services/rollback/1.0/payload.js.map +1 -0
- package/dist/vta/services/update/1.0/payload.d.ts +511 -0
- package/dist/vta/services/update/1.0/payload.d.ts.map +1 -0
- package/dist/vta/services/update/1.0/payload.js +262 -0
- package/dist/vta/services/update/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts +301 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.js +165 -0
- package/dist/vta/webvh/agent-name/check/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/disable/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/enable/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts +377 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.js +201 -0
- package/dist/vta/webvh/agent-name/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/remove/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts +274 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.js +153 -0
- package/dist/vta/webvh/agent-name/set/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/create/1.0/payload.d.ts +806 -0
- package/dist/vta/webvh/dids/create/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/create/1.0/payload.js +400 -0
- package/dist/vta/webvh/dids/create/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.d.ts +257 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.js +145 -0
- package/dist/vta/webvh/dids/delete/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/get/1.0/payload.d.ts +539 -0
- package/dist/vta/webvh/dids/get/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/get/1.0/payload.js +282 -0
- package/dist/vta/webvh/dids/get/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/list/1.0/payload.d.ts +537 -0
- package/dist/vta/webvh/dids/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/list/1.0/payload.js +278 -0
- package/dist/vta/webvh/dids/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts +299 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.js +163 -0
- package/dist/vta/webvh/dids/register-with-server/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts +357 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js +196 -0
- package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/servers/list/1.0/payload.d.ts +366 -0
- package/dist/vta/webvh/servers/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/servers/list/1.0/payload.js +200 -0
- package/dist/vta/webvh/servers/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/servers/register/1.0/payload.d.ts +335 -0
- package/dist/vta/webvh/servers/register/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/servers/register/1.0/payload.js +183 -0
- package/dist/vta/webvh/servers/register/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.d.ts +237 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.js +137 -0
- package/dist/vta/webvh/servers/remove/1.0/payload.js.map +1 -0
- package/package.json +2 -1
- package/src/index.ts +33 -0
- package/src/vta/_shared/0.1/context.ts +11 -0
- package/src/vta/_shared/0.1/service.ts +11 -0
- package/src/vta/_shared/0.1/webvh-records.ts +11 -0
- package/src/vta/contexts/create/1.0/payload.ts +301 -0
- package/src/vta/contexts/delete/1.0/payload.ts +183 -0
- package/src/vta/contexts/get/1.0/payload.ts +275 -0
- package/src/vta/contexts/list/1.0/payload.ts +309 -0
- package/src/vta/contexts/preview-delete/1.0/payload.ts +267 -0
- package/src/vta/contexts/update/1.0/payload.ts +421 -0
- package/src/vta/contexts/update-did/1.0/payload.ts +285 -0
- package/src/vta/services/disable/1.0/payload.ts +302 -0
- package/src/vta/services/drain/cancel/1.0/payload.ts +169 -0
- package/src/vta/services/drain/list/1.0/payload.ts +241 -0
- package/src/vta/services/enable/1.0/payload.ts +350 -0
- package/src/vta/services/get/1.0/payload.ts +279 -0
- package/src/vta/services/list/1.0/payload.ts +283 -0
- package/src/vta/services/rollback/1.0/payload.ts +302 -0
- package/src/vta/services/update/1.0/payload.ts +350 -0
- package/src/vta/webvh/agent-name/check/1.0/payload.ts +216 -0
- package/src/vta/webvh/agent-name/disable/1.0/payload.ts +197 -0
- package/src/vta/webvh/agent-name/enable/1.0/payload.ts +197 -0
- package/src/vta/webvh/agent-name/list/1.0/payload.ts +258 -0
- package/src/vta/webvh/agent-name/remove/1.0/payload.ts +197 -0
- package/src/vta/webvh/agent-name/set/1.0/payload.ts +197 -0
- package/src/vta/webvh/dids/create/1.0/payload.ts +548 -0
- package/src/vta/webvh/dids/delete/1.0/payload.ts +182 -0
- package/src/vta/webvh/dids/get/1.0/payload.ts +363 -0
- package/src/vta/webvh/dids/list/1.0/payload.ts +361 -0
- package/src/vta/webvh/dids/register-with-server/1.0/payload.ts +212 -0
- package/src/vta/webvh/dids/rotate-keys/1.0/payload.ts +251 -0
- package/src/vta/webvh/servers/list/1.0/payload.ts +248 -0
- package/src/vta/webvh/servers/register/1.0/payload.ts +230 -0
- package/src/vta/webvh/servers/remove/1.0/payload.ts +170 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/webvh/dids/rotate-keys/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Rotate a did:webvh's signing keys by appending a log entry that moves to the pre-committed successor.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTAWebVHDIDsRotateKeysPayload {
|
|
10
|
+
did: string;
|
|
11
|
+
/**
|
|
12
|
+
* Successors to commit for the next rotation. Absent keeps the DID's current setting. Setting it to `0` disables pre-rotation from here on, which forfeits the ability to recover from a future key compromise.
|
|
13
|
+
*/
|
|
14
|
+
preRotationCount?: number;
|
|
15
|
+
label?: string;
|
|
16
|
+
ext?: Ext;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 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.
|
|
20
|
+
*/
|
|
21
|
+
export interface Ext {
|
|
22
|
+
[k: string]: unknown | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Success response to vta/webvh/dids/rotate-keys. Type https://trusttasks.org/spec/vta/webvh/dids/rotate-keys/1.0#response.
|
|
26
|
+
*/
|
|
27
|
+
export interface VTAWebVHDIDsRotateKeysResponsePayload {
|
|
28
|
+
did: string;
|
|
29
|
+
/**
|
|
30
|
+
* Version id of the appended entry.
|
|
31
|
+
*/
|
|
32
|
+
newVersionId: string;
|
|
33
|
+
/**
|
|
34
|
+
* The DID's SCID. Unchanged by a rotation — a rotation appends to the log, it does not re-create it.
|
|
35
|
+
*/
|
|
36
|
+
newScid: string;
|
|
37
|
+
/**
|
|
38
|
+
* The appended entry.
|
|
39
|
+
*/
|
|
40
|
+
newLogEntry: string;
|
|
41
|
+
updateKeysCount: number;
|
|
42
|
+
preRotationKeyCount: number;
|
|
43
|
+
/**
|
|
44
|
+
* True when no hosting server holds this DID. **The caller must publish `newLogEntry` themselves** — until they do, the rotation has happened in the VTA and nowhere else, and resolvers still see the old keys.
|
|
45
|
+
*/
|
|
46
|
+
serverless: boolean;
|
|
47
|
+
ext?: Ext;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/rotate-keys/1.0" as const;
|
|
52
|
+
|
|
53
|
+
/** Stable alias for this specification's request payload shape. */
|
|
54
|
+
export type Payload = VTAWebVHDIDsRotateKeysPayload;
|
|
55
|
+
|
|
56
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
57
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/rotate-keys/1.0#response" as const;
|
|
58
|
+
|
|
59
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
60
|
+
export type Response = VTAWebVHDIDsRotateKeysResponsePayload;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* This specification's payload schema, as a value.
|
|
64
|
+
*
|
|
65
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
66
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
67
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
68
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
69
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
70
|
+
*/
|
|
71
|
+
export const PAYLOAD_SCHEMA = {
|
|
72
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
73
|
+
"$id": "https://trusttasks.org/spec/vta/webvh/dids/rotate-keys/1.0",
|
|
74
|
+
"title": "VTA WebVH DIDs Rotate-Keys — payload",
|
|
75
|
+
"description": "Rotate a did:webvh's signing keys by appending a log entry that moves to the pre-committed successor.",
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"required": [
|
|
79
|
+
"did"
|
|
80
|
+
],
|
|
81
|
+
"properties": {
|
|
82
|
+
"did": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1
|
|
85
|
+
},
|
|
86
|
+
"preRotationCount": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 0,
|
|
89
|
+
"description": "Successors to commit for the next rotation. Absent keeps the DID's current setting. Setting it to `0` disables pre-rotation from here on, which forfeits the ability to recover from a future key compromise."
|
|
90
|
+
},
|
|
91
|
+
"label": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"ext": {
|
|
95
|
+
"$ref": "#/$defs/Ext"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"$defs": {
|
|
99
|
+
"Response": {
|
|
100
|
+
"$anchor": "response",
|
|
101
|
+
"title": "VTA WebVH DIDs Rotate-Keys — response payload",
|
|
102
|
+
"description": "Success response to vta/webvh/dids/rotate-keys. Type https://trusttasks.org/spec/vta/webvh/dids/rotate-keys/1.0#response.",
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"did",
|
|
107
|
+
"newVersionId",
|
|
108
|
+
"newScid",
|
|
109
|
+
"newLogEntry",
|
|
110
|
+
"updateKeysCount",
|
|
111
|
+
"preRotationKeyCount",
|
|
112
|
+
"serverless"
|
|
113
|
+
],
|
|
114
|
+
"properties": {
|
|
115
|
+
"did": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"newVersionId": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Version id of the appended entry."
|
|
121
|
+
},
|
|
122
|
+
"newScid": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "The DID's SCID. Unchanged by a rotation — a rotation appends to the log, it does not re-create it."
|
|
125
|
+
},
|
|
126
|
+
"newLogEntry": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "The appended entry."
|
|
129
|
+
},
|
|
130
|
+
"updateKeysCount": {
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"minimum": 0
|
|
133
|
+
},
|
|
134
|
+
"preRotationKeyCount": {
|
|
135
|
+
"type": "integer",
|
|
136
|
+
"minimum": 0
|
|
137
|
+
},
|
|
138
|
+
"serverless": {
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"description": "True when no hosting server holds this DID. **The caller must publish `newLogEntry` themselves** — until they do, the rotation has happened in the VTA and nowhere else, and resolvers still see the old keys."
|
|
141
|
+
},
|
|
142
|
+
"ext": {
|
|
143
|
+
"$ref": "#/$defs/Ext"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"Ext": {
|
|
148
|
+
"title": "Ext",
|
|
149
|
+
"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.",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"minProperties": 1,
|
|
152
|
+
"additionalProperties": true,
|
|
153
|
+
"propertyNames": {
|
|
154
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
} as const;
|
|
159
|
+
|
|
160
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
161
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
162
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
163
|
+
"$ref": "#/$defs/Response",
|
|
164
|
+
"$defs": {
|
|
165
|
+
"Response": {
|
|
166
|
+
"$anchor": "response",
|
|
167
|
+
"title": "VTA WebVH DIDs Rotate-Keys — response payload",
|
|
168
|
+
"description": "Success response to vta/webvh/dids/rotate-keys. Type https://trusttasks.org/spec/vta/webvh/dids/rotate-keys/1.0#response.",
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": [
|
|
172
|
+
"did",
|
|
173
|
+
"newVersionId",
|
|
174
|
+
"newScid",
|
|
175
|
+
"newLogEntry",
|
|
176
|
+
"updateKeysCount",
|
|
177
|
+
"preRotationKeyCount",
|
|
178
|
+
"serverless"
|
|
179
|
+
],
|
|
180
|
+
"properties": {
|
|
181
|
+
"did": {
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
"newVersionId": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"description": "Version id of the appended entry."
|
|
187
|
+
},
|
|
188
|
+
"newScid": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"description": "The DID's SCID. Unchanged by a rotation — a rotation appends to the log, it does not re-create it."
|
|
191
|
+
},
|
|
192
|
+
"newLogEntry": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"description": "The appended entry."
|
|
195
|
+
},
|
|
196
|
+
"updateKeysCount": {
|
|
197
|
+
"type": "integer",
|
|
198
|
+
"minimum": 0
|
|
199
|
+
},
|
|
200
|
+
"preRotationKeyCount": {
|
|
201
|
+
"type": "integer",
|
|
202
|
+
"minimum": 0
|
|
203
|
+
},
|
|
204
|
+
"serverless": {
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"description": "True when no hosting server holds this DID. **The caller must publish `newLogEntry` themselves** — until they do, the rotation has happened in the VTA and nowhere else, and resolvers still see the old keys."
|
|
207
|
+
},
|
|
208
|
+
"ext": {
|
|
209
|
+
"$ref": "#/$defs/Ext"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"Ext": {
|
|
214
|
+
"title": "Ext",
|
|
215
|
+
"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.",
|
|
216
|
+
"type": "object",
|
|
217
|
+
"minProperties": 1,
|
|
218
|
+
"additionalProperties": true,
|
|
219
|
+
"propertyNames": {
|
|
220
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
} as const;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
228
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
229
|
+
* per-specification and cannot be derived from the document alone, and
|
|
230
|
+
* item 2 needs the schema this carries.
|
|
231
|
+
*/
|
|
232
|
+
export const SPEC = {
|
|
233
|
+
typeUri: TYPE_URI,
|
|
234
|
+
isBearer: false,
|
|
235
|
+
isProofRequired: true,
|
|
236
|
+
isRecipientRequired: true,
|
|
237
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
238
|
+
} as const;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
242
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
243
|
+
* parties (§7.3 item 5).
|
|
244
|
+
*/
|
|
245
|
+
export const RESPONSE_SPEC = {
|
|
246
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
247
|
+
isBearer: false,
|
|
248
|
+
isProofRequired: true,
|
|
249
|
+
isRecipientRequired: true,
|
|
250
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
251
|
+
} as const;
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/webvh/servers/list/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTAWebVHServersListPayload {
|
|
7
|
+
ext?: Ext;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
12
|
+
export interface Ext {
|
|
13
|
+
[k: string]: unknown | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Success response to vta/webvh/servers/list. Type https://trusttasks.org/spec/vta/webvh/servers/list/1.0#response.
|
|
17
|
+
*/
|
|
18
|
+
export interface VTAWebVHServersListResponsePayload {
|
|
19
|
+
/**
|
|
20
|
+
* Hosting servers the VTA is registered with. Carries no credentials — what the VTA holds to authenticate against a server never appears in a response.
|
|
21
|
+
*/
|
|
22
|
+
servers: WebvhServerRecord[];
|
|
23
|
+
ext?: Ext;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A hosting server the VTA is registered with. Carries no credential: what the VTA holds to authenticate against the server is never part of this record and never leaves it.
|
|
27
|
+
*/
|
|
28
|
+
export interface WebvhServerRecord {
|
|
29
|
+
/**
|
|
30
|
+
* Local id for the server, chosen by the operator.
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* The server's own DID, used to authenticate it.
|
|
35
|
+
*/
|
|
36
|
+
did: string;
|
|
37
|
+
label?: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Trust Task type URI. */
|
|
44
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/list/1.0" as const;
|
|
45
|
+
|
|
46
|
+
/** Stable alias for this specification's request payload shape. */
|
|
47
|
+
export type Payload = VTAWebVHServersListPayload;
|
|
48
|
+
|
|
49
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
50
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/servers/list/1.0#response" as const;
|
|
51
|
+
|
|
52
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
53
|
+
export type Response = VTAWebVHServersListResponsePayload;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* This specification's payload schema, as a value.
|
|
57
|
+
*
|
|
58
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
59
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
60
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
61
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
62
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
63
|
+
*/
|
|
64
|
+
export const PAYLOAD_SCHEMA = {
|
|
65
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
66
|
+
"$id": "https://trusttasks.org/spec/vta/webvh/servers/list/1.0",
|
|
67
|
+
"title": "VTA WebVH Servers List — payload",
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"properties": {
|
|
71
|
+
"ext": {
|
|
72
|
+
"$ref": "#/$defs/Ext"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"$defs": {
|
|
76
|
+
"Response": {
|
|
77
|
+
"$anchor": "response",
|
|
78
|
+
"title": "VTA WebVH Servers List — response payload",
|
|
79
|
+
"description": "Success response to vta/webvh/servers/list. Type https://trusttasks.org/spec/vta/webvh/servers/list/1.0#response.",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": [
|
|
83
|
+
"servers"
|
|
84
|
+
],
|
|
85
|
+
"properties": {
|
|
86
|
+
"servers": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"description": "Hosting servers the VTA is registered with. Carries no credentials — what the VTA holds to authenticate against a server never appears in a response.",
|
|
89
|
+
"items": {
|
|
90
|
+
"$ref": "#/$defs/WebvhServerRecord"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"ext": {
|
|
94
|
+
"$ref": "#/$defs/Ext"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"Ext": {
|
|
99
|
+
"title": "Ext",
|
|
100
|
+
"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.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"minProperties": 1,
|
|
103
|
+
"additionalProperties": true,
|
|
104
|
+
"propertyNames": {
|
|
105
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"WebvhServerRecord": {
|
|
109
|
+
"title": "WebvhServerRecord",
|
|
110
|
+
"description": "A hosting server the VTA is registered with. Carries no credential: what the VTA holds to authenticate against the server is never part of this record and never leaves it.",
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": [
|
|
114
|
+
"id",
|
|
115
|
+
"did",
|
|
116
|
+
"createdAt",
|
|
117
|
+
"updatedAt"
|
|
118
|
+
],
|
|
119
|
+
"properties": {
|
|
120
|
+
"id": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "Local id for the server, chosen by the operator."
|
|
123
|
+
},
|
|
124
|
+
"did": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "The server's own DID, used to authenticate it."
|
|
127
|
+
},
|
|
128
|
+
"label": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
},
|
|
131
|
+
"createdAt": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"format": "date-time"
|
|
134
|
+
},
|
|
135
|
+
"updatedAt": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"format": "date-time"
|
|
138
|
+
},
|
|
139
|
+
"ext": {
|
|
140
|
+
"$ref": "#/$defs/Ext"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
} as const;
|
|
146
|
+
|
|
147
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
148
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
149
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
150
|
+
"$ref": "#/$defs/Response",
|
|
151
|
+
"$defs": {
|
|
152
|
+
"Response": {
|
|
153
|
+
"$anchor": "response",
|
|
154
|
+
"title": "VTA WebVH Servers List — response payload",
|
|
155
|
+
"description": "Success response to vta/webvh/servers/list. Type https://trusttasks.org/spec/vta/webvh/servers/list/1.0#response.",
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": [
|
|
159
|
+
"servers"
|
|
160
|
+
],
|
|
161
|
+
"properties": {
|
|
162
|
+
"servers": {
|
|
163
|
+
"type": "array",
|
|
164
|
+
"description": "Hosting servers the VTA is registered with. Carries no credentials — what the VTA holds to authenticate against a server never appears in a response.",
|
|
165
|
+
"items": {
|
|
166
|
+
"$ref": "#/$defs/WebvhServerRecord"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"ext": {
|
|
170
|
+
"$ref": "#/$defs/Ext"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"Ext": {
|
|
175
|
+
"title": "Ext",
|
|
176
|
+
"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.",
|
|
177
|
+
"type": "object",
|
|
178
|
+
"minProperties": 1,
|
|
179
|
+
"additionalProperties": true,
|
|
180
|
+
"propertyNames": {
|
|
181
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"WebvhServerRecord": {
|
|
185
|
+
"title": "WebvhServerRecord",
|
|
186
|
+
"description": "A hosting server the VTA is registered with. Carries no credential: what the VTA holds to authenticate against the server is never part of this record and never leaves it.",
|
|
187
|
+
"type": "object",
|
|
188
|
+
"additionalProperties": false,
|
|
189
|
+
"required": [
|
|
190
|
+
"id",
|
|
191
|
+
"did",
|
|
192
|
+
"createdAt",
|
|
193
|
+
"updatedAt"
|
|
194
|
+
],
|
|
195
|
+
"properties": {
|
|
196
|
+
"id": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"description": "Local id for the server, chosen by the operator."
|
|
199
|
+
},
|
|
200
|
+
"did": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "The server's own DID, used to authenticate it."
|
|
203
|
+
},
|
|
204
|
+
"label": {
|
|
205
|
+
"type": "string"
|
|
206
|
+
},
|
|
207
|
+
"createdAt": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"format": "date-time"
|
|
210
|
+
},
|
|
211
|
+
"updatedAt": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"format": "date-time"
|
|
214
|
+
},
|
|
215
|
+
"ext": {
|
|
216
|
+
"$ref": "#/$defs/Ext"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
} as const;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
225
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
226
|
+
* per-specification and cannot be derived from the document alone, and
|
|
227
|
+
* item 2 needs the schema this carries.
|
|
228
|
+
*/
|
|
229
|
+
export const SPEC = {
|
|
230
|
+
typeUri: TYPE_URI,
|
|
231
|
+
isBearer: false,
|
|
232
|
+
isProofRequired: false,
|
|
233
|
+
isRecipientRequired: true,
|
|
234
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
235
|
+
} as const;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
239
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
240
|
+
* parties (§7.3 item 5).
|
|
241
|
+
*/
|
|
242
|
+
export const RESPONSE_SPEC = {
|
|
243
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
244
|
+
isBearer: false,
|
|
245
|
+
isProofRequired: false,
|
|
246
|
+
isRecipientRequired: true,
|
|
247
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
248
|
+
} as const;
|