@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.
Files changed (171) hide show
  1. package/dist/index.d.ts +33 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +33 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/vta/_shared/0.1/context.d.ts +11 -0
  6. package/dist/vta/_shared/0.1/context.d.ts.map +1 -0
  7. package/dist/vta/_shared/0.1/context.js +6 -0
  8. package/dist/vta/_shared/0.1/context.js.map +1 -0
  9. package/dist/vta/_shared/0.1/service.d.ts +11 -0
  10. package/dist/vta/_shared/0.1/service.d.ts.map +1 -0
  11. package/dist/vta/_shared/0.1/service.js +6 -0
  12. package/dist/vta/_shared/0.1/service.js.map +1 -0
  13. package/dist/vta/_shared/0.1/webvh-records.d.ts +11 -0
  14. package/dist/vta/_shared/0.1/webvh-records.d.ts.map +1 -0
  15. package/dist/vta/_shared/0.1/webvh-records.js +6 -0
  16. package/dist/vta/_shared/0.1/webvh-records.js.map +1 -0
  17. package/dist/vta/contexts/create/1.0/payload.d.ts +443 -0
  18. package/dist/vta/contexts/create/1.0/payload.d.ts.map +1 -0
  19. package/dist/vta/contexts/create/1.0/payload.js +226 -0
  20. package/dist/vta/contexts/create/1.0/payload.js.map +1 -0
  21. package/dist/vta/contexts/delete/1.0/payload.d.ts +256 -0
  22. package/dist/vta/contexts/delete/1.0/payload.d.ts.map +1 -0
  23. package/dist/vta/contexts/delete/1.0/payload.js +143 -0
  24. package/dist/vta/contexts/delete/1.0/payload.js.map +1 -0
  25. package/dist/vta/contexts/get/1.0/payload.d.ts +405 -0
  26. package/dist/vta/contexts/get/1.0/payload.d.ts.map +1 -0
  27. package/dist/vta/contexts/get/1.0/payload.js +212 -0
  28. package/dist/vta/contexts/get/1.0/payload.js.map +1 -0
  29. package/dist/vta/contexts/list/1.0/payload.d.ts +460 -0
  30. package/dist/vta/contexts/list/1.0/payload.d.ts.map +1 -0
  31. package/dist/vta/contexts/list/1.0/payload.js +237 -0
  32. package/dist/vta/contexts/list/1.0/payload.js.map +1 -0
  33. package/dist/vta/contexts/preview-delete/1.0/payload.d.ts +394 -0
  34. package/dist/vta/contexts/preview-delete/1.0/payload.d.ts.map +1 -0
  35. package/dist/vta/contexts/preview-delete/1.0/payload.js +209 -0
  36. package/dist/vta/contexts/preview-delete/1.0/payload.js.map +1 -0
  37. package/dist/vta/contexts/update/1.0/payload.d.ts +653 -0
  38. package/dist/vta/contexts/update/1.0/payload.d.ts.map +1 -0
  39. package/dist/vta/contexts/update/1.0/payload.js +314 -0
  40. package/dist/vta/contexts/update/1.0/payload.js.map +1 -0
  41. package/dist/vta/contexts/update-did/1.0/payload.d.ts +419 -0
  42. package/dist/vta/contexts/update-did/1.0/payload.d.ts.map +1 -0
  43. package/dist/vta/contexts/update-did/1.0/payload.js +218 -0
  44. package/dist/vta/contexts/update-did/1.0/payload.js.map +1 -0
  45. package/dist/vta/services/disable/1.0/payload.d.ts +438 -0
  46. package/dist/vta/services/disable/1.0/payload.d.ts.map +1 -0
  47. package/dist/vta/services/disable/1.0/payload.js +235 -0
  48. package/dist/vta/services/disable/1.0/payload.js.map +1 -0
  49. package/dist/vta/services/drain/cancel/1.0/payload.d.ts +234 -0
  50. package/dist/vta/services/drain/cancel/1.0/payload.d.ts.map +1 -0
  51. package/dist/vta/services/drain/cancel/1.0/payload.js +131 -0
  52. package/dist/vta/services/drain/cancel/1.0/payload.js.map +1 -0
  53. package/dist/vta/services/drain/list/1.0/payload.d.ts +352 -0
  54. package/dist/vta/services/drain/list/1.0/payload.d.ts.map +1 -0
  55. package/dist/vta/services/drain/list/1.0/payload.js +189 -0
  56. package/dist/vta/services/drain/list/1.0/payload.js.map +1 -0
  57. package/dist/vta/services/enable/1.0/payload.d.ts +511 -0
  58. package/dist/vta/services/enable/1.0/payload.d.ts.map +1 -0
  59. package/dist/vta/services/enable/1.0/payload.js +262 -0
  60. package/dist/vta/services/enable/1.0/payload.js.map +1 -0
  61. package/dist/vta/services/get/1.0/payload.d.ts +399 -0
  62. package/dist/vta/services/get/1.0/payload.d.ts.map +1 -0
  63. package/dist/vta/services/get/1.0/payload.js +219 -0
  64. package/dist/vta/services/get/1.0/payload.js.map +1 -0
  65. package/dist/vta/services/list/1.0/payload.d.ts +409 -0
  66. package/dist/vta/services/list/1.0/payload.d.ts.map +1 -0
  67. package/dist/vta/services/list/1.0/payload.js +221 -0
  68. package/dist/vta/services/list/1.0/payload.js.map +1 -0
  69. package/dist/vta/services/rollback/1.0/payload.d.ts +438 -0
  70. package/dist/vta/services/rollback/1.0/payload.d.ts.map +1 -0
  71. package/dist/vta/services/rollback/1.0/payload.js +235 -0
  72. package/dist/vta/services/rollback/1.0/payload.js.map +1 -0
  73. package/dist/vta/services/update/1.0/payload.d.ts +511 -0
  74. package/dist/vta/services/update/1.0/payload.d.ts.map +1 -0
  75. package/dist/vta/services/update/1.0/payload.js +262 -0
  76. package/dist/vta/services/update/1.0/payload.js.map +1 -0
  77. package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts +301 -0
  78. package/dist/vta/webvh/agent-name/check/1.0/payload.d.ts.map +1 -0
  79. package/dist/vta/webvh/agent-name/check/1.0/payload.js +165 -0
  80. package/dist/vta/webvh/agent-name/check/1.0/payload.js.map +1 -0
  81. package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts +274 -0
  82. package/dist/vta/webvh/agent-name/disable/1.0/payload.d.ts.map +1 -0
  83. package/dist/vta/webvh/agent-name/disable/1.0/payload.js +153 -0
  84. package/dist/vta/webvh/agent-name/disable/1.0/payload.js.map +1 -0
  85. package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts +274 -0
  86. package/dist/vta/webvh/agent-name/enable/1.0/payload.d.ts.map +1 -0
  87. package/dist/vta/webvh/agent-name/enable/1.0/payload.js +153 -0
  88. package/dist/vta/webvh/agent-name/enable/1.0/payload.js.map +1 -0
  89. package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts +377 -0
  90. package/dist/vta/webvh/agent-name/list/1.0/payload.d.ts.map +1 -0
  91. package/dist/vta/webvh/agent-name/list/1.0/payload.js +201 -0
  92. package/dist/vta/webvh/agent-name/list/1.0/payload.js.map +1 -0
  93. package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts +274 -0
  94. package/dist/vta/webvh/agent-name/remove/1.0/payload.d.ts.map +1 -0
  95. package/dist/vta/webvh/agent-name/remove/1.0/payload.js +153 -0
  96. package/dist/vta/webvh/agent-name/remove/1.0/payload.js.map +1 -0
  97. package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts +274 -0
  98. package/dist/vta/webvh/agent-name/set/1.0/payload.d.ts.map +1 -0
  99. package/dist/vta/webvh/agent-name/set/1.0/payload.js +153 -0
  100. package/dist/vta/webvh/agent-name/set/1.0/payload.js.map +1 -0
  101. package/dist/vta/webvh/dids/create/1.0/payload.d.ts +806 -0
  102. package/dist/vta/webvh/dids/create/1.0/payload.d.ts.map +1 -0
  103. package/dist/vta/webvh/dids/create/1.0/payload.js +400 -0
  104. package/dist/vta/webvh/dids/create/1.0/payload.js.map +1 -0
  105. package/dist/vta/webvh/dids/delete/1.0/payload.d.ts +257 -0
  106. package/dist/vta/webvh/dids/delete/1.0/payload.d.ts.map +1 -0
  107. package/dist/vta/webvh/dids/delete/1.0/payload.js +145 -0
  108. package/dist/vta/webvh/dids/delete/1.0/payload.js.map +1 -0
  109. package/dist/vta/webvh/dids/get/1.0/payload.d.ts +539 -0
  110. package/dist/vta/webvh/dids/get/1.0/payload.d.ts.map +1 -0
  111. package/dist/vta/webvh/dids/get/1.0/payload.js +282 -0
  112. package/dist/vta/webvh/dids/get/1.0/payload.js.map +1 -0
  113. package/dist/vta/webvh/dids/list/1.0/payload.d.ts +537 -0
  114. package/dist/vta/webvh/dids/list/1.0/payload.d.ts.map +1 -0
  115. package/dist/vta/webvh/dids/list/1.0/payload.js +278 -0
  116. package/dist/vta/webvh/dids/list/1.0/payload.js.map +1 -0
  117. package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts +299 -0
  118. package/dist/vta/webvh/dids/register-with-server/1.0/payload.d.ts.map +1 -0
  119. package/dist/vta/webvh/dids/register-with-server/1.0/payload.js +163 -0
  120. package/dist/vta/webvh/dids/register-with-server/1.0/payload.js.map +1 -0
  121. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts +357 -0
  122. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.d.ts.map +1 -0
  123. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js +196 -0
  124. package/dist/vta/webvh/dids/rotate-keys/1.0/payload.js.map +1 -0
  125. package/dist/vta/webvh/servers/list/1.0/payload.d.ts +366 -0
  126. package/dist/vta/webvh/servers/list/1.0/payload.d.ts.map +1 -0
  127. package/dist/vta/webvh/servers/list/1.0/payload.js +200 -0
  128. package/dist/vta/webvh/servers/list/1.0/payload.js.map +1 -0
  129. package/dist/vta/webvh/servers/register/1.0/payload.d.ts +335 -0
  130. package/dist/vta/webvh/servers/register/1.0/payload.d.ts.map +1 -0
  131. package/dist/vta/webvh/servers/register/1.0/payload.js +183 -0
  132. package/dist/vta/webvh/servers/register/1.0/payload.js.map +1 -0
  133. package/dist/vta/webvh/servers/remove/1.0/payload.d.ts +237 -0
  134. package/dist/vta/webvh/servers/remove/1.0/payload.d.ts.map +1 -0
  135. package/dist/vta/webvh/servers/remove/1.0/payload.js +137 -0
  136. package/dist/vta/webvh/servers/remove/1.0/payload.js.map +1 -0
  137. package/package.json +2 -1
  138. package/src/index.ts +33 -0
  139. package/src/vta/_shared/0.1/context.ts +11 -0
  140. package/src/vta/_shared/0.1/service.ts +11 -0
  141. package/src/vta/_shared/0.1/webvh-records.ts +11 -0
  142. package/src/vta/contexts/create/1.0/payload.ts +301 -0
  143. package/src/vta/contexts/delete/1.0/payload.ts +183 -0
  144. package/src/vta/contexts/get/1.0/payload.ts +275 -0
  145. package/src/vta/contexts/list/1.0/payload.ts +309 -0
  146. package/src/vta/contexts/preview-delete/1.0/payload.ts +267 -0
  147. package/src/vta/contexts/update/1.0/payload.ts +421 -0
  148. package/src/vta/contexts/update-did/1.0/payload.ts +285 -0
  149. package/src/vta/services/disable/1.0/payload.ts +302 -0
  150. package/src/vta/services/drain/cancel/1.0/payload.ts +169 -0
  151. package/src/vta/services/drain/list/1.0/payload.ts +241 -0
  152. package/src/vta/services/enable/1.0/payload.ts +350 -0
  153. package/src/vta/services/get/1.0/payload.ts +279 -0
  154. package/src/vta/services/list/1.0/payload.ts +283 -0
  155. package/src/vta/services/rollback/1.0/payload.ts +302 -0
  156. package/src/vta/services/update/1.0/payload.ts +350 -0
  157. package/src/vta/webvh/agent-name/check/1.0/payload.ts +216 -0
  158. package/src/vta/webvh/agent-name/disable/1.0/payload.ts +197 -0
  159. package/src/vta/webvh/agent-name/enable/1.0/payload.ts +197 -0
  160. package/src/vta/webvh/agent-name/list/1.0/payload.ts +258 -0
  161. package/src/vta/webvh/agent-name/remove/1.0/payload.ts +197 -0
  162. package/src/vta/webvh/agent-name/set/1.0/payload.ts +197 -0
  163. package/src/vta/webvh/dids/create/1.0/payload.ts +548 -0
  164. package/src/vta/webvh/dids/delete/1.0/payload.ts +182 -0
  165. package/src/vta/webvh/dids/get/1.0/payload.ts +363 -0
  166. package/src/vta/webvh/dids/list/1.0/payload.ts +361 -0
  167. package/src/vta/webvh/dids/register-with-server/1.0/payload.ts +212 -0
  168. package/src/vta/webvh/dids/rotate-keys/1.0/payload.ts +251 -0
  169. package/src/vta/webvh/servers/list/1.0/payload.ts +248 -0
  170. package/src/vta/webvh/servers/register/1.0/payload.ts +230 -0
  171. package/src/vta/webvh/servers/remove/1.0/payload.ts +170 -0
@@ -0,0 +1,548 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/dids/create/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * How the path under the host is chosen. Absent means `autoAssign`.
8
+ */
9
+ export type WebvhPathMode =
10
+ | {
11
+ mode: "wellKnown";
12
+ }
13
+ | {
14
+ mode: "explicit";
15
+ path: string;
16
+ }
17
+ | {
18
+ mode: "autoAssign";
19
+ };
20
+
21
+ /**
22
+ * Mint a did:webvh: the VTA generates the keys, writes the log's first entry, and either hands it to a hosting server or returns it for the caller to serve.
23
+ */
24
+ export interface VTAWebVHDIDsCreatePayload {
25
+ /**
26
+ * Context the DID belongs to. Its keys are minted here, and deleting the context destroys the DID.
27
+ */
28
+ contextId: string;
29
+ /**
30
+ * Hosting server to publish through. Absent means **serverless**: the caller serves the log itself at `url`, and the VTA holds no hosting registration for it.
31
+ */
32
+ serverId?: string;
33
+ /**
34
+ * Where the log will be served, for the serverless case. The DID's identity derives from this location, so changing it later is only possible for a `portable` DID.
35
+ */
36
+ url?: string;
37
+ /**
38
+ * Explicit path label under the host. Shorthand for pathMode `explicit`; supplying both is an error.
39
+ */
40
+ path?: string;
41
+ pathMode?: WebvhPathMode;
42
+ /**
43
+ * Hosting domain to publish under, when the server serves more than one.
44
+ */
45
+ domain?: string;
46
+ label?: string;
47
+ /**
48
+ * Whether this DID may later move to another domain and keep its identity. **Fixed at creation** — portability is committed in the first log entry and cannot be added afterwards. A DID created non-portable is tied to where it was published for its whole life.
49
+ */
50
+ portable?: boolean;
51
+ /**
52
+ * Add a DIDComm mediator service entry to the document.
53
+ */
54
+ addMediatorService?: boolean;
55
+ /**
56
+ * Add a TSP transport service entry to the document.
57
+ */
58
+ addTspService?: boolean;
59
+ /**
60
+ * Further service entries, verbatim.
61
+ */
62
+ additionalServices?: {}[];
63
+ /**
64
+ * How many successor keys to commit in advance. **`0` disables pre-rotation**, which means a compromise of the current key cannot be recovered from by rotating: the successor was never committed, so a thief can rotate to their own key as convincingly as the owner can.
65
+ */
66
+ preRotationCount?: number;
67
+ /**
68
+ * A DID document to publish rather than one the VTA composes.
69
+ */
70
+ didDocument?: {};
71
+ /**
72
+ * An existing log to adopt, for importing a DID minted elsewhere.
73
+ */
74
+ didLog?: string;
75
+ /**
76
+ * Make this the context's primary DID.
77
+ */
78
+ setPrimary?: boolean;
79
+ /**
80
+ * Existing key to sign log entries with. Absent mints a new one.
81
+ */
82
+ signingKeyId?: string;
83
+ /**
84
+ * Existing key-agreement key to publish. Absent mints a new one.
85
+ */
86
+ kaKeyId?: string;
87
+ /**
88
+ * DID template to render the document from (see vta/did-templates/*).
89
+ */
90
+ template?: string;
91
+ /**
92
+ * Context whose templates to resolve `template` against. Absent uses the global scope, which is a different namespace and may hold a different template of the same name.
93
+ */
94
+ templateContext?: string;
95
+ /**
96
+ * Variables for the template's placeholders.
97
+ */
98
+ templateVars?: {
99
+ [k: string]: string | undefined;
100
+ };
101
+ ext?: Ext;
102
+ }
103
+ /**
104
+ * 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.
105
+ */
106
+ export interface Ext {
107
+ [k: string]: unknown | undefined;
108
+ }
109
+ /**
110
+ * Success response to vta/webvh/dids/create. Type https://trusttasks.org/spec/vta/webvh/dids/create/1.0#response.
111
+ */
112
+ export interface VTAWebVHDIDsCreateResponsePayload {
113
+ did: string;
114
+ contextId: string;
115
+ serverId?: string;
116
+ /**
117
+ * The hosting server's handle for the record. Absent for a serverless DID.
118
+ */
119
+ mnemonic?: string;
120
+ /**
121
+ * Self-certifying identifier committing to the log's first entry.
122
+ */
123
+ scid: string;
124
+ portable: boolean;
125
+ signingKeyId: string;
126
+ kaKeyId: string;
127
+ /**
128
+ * Successor keys committed. `0` means pre-rotation is off for this DID.
129
+ */
130
+ preRotationKeyCount: number;
131
+ createdAt: string;
132
+ /**
133
+ * The published document, when the VTA composed one.
134
+ */
135
+ didDocument?: {};
136
+ /**
137
+ * The log's first entry. For a serverless DID this is what the caller must serve — the DID does not resolve until they do.
138
+ */
139
+ logEntry?: string;
140
+ ext?: Ext;
141
+ }
142
+
143
+ /** Trust Task type URI. */
144
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/create/1.0" as const;
145
+
146
+ /** Stable alias for this specification's request payload shape. */
147
+ export type Payload = VTAWebVHDIDsCreatePayload;
148
+
149
+ /** Trust Task response type URI (request type URI + "#response"). */
150
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/create/1.0#response" as const;
151
+
152
+ /** Stable alias for this specification's success-response payload shape. */
153
+ export type Response = VTAWebVHDIDsCreateResponsePayload;
154
+
155
+ /**
156
+ * This specification's payload schema, as a value.
157
+ *
158
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
159
+ * rather than only as a `.json` file because TypeScript types are erased
160
+ * at runtime: without a schema a consumer has nothing to validate, and
161
+ * every REQUIRED payload member is optional in practice. Cross-file
162
+ * `$ref`s are already inlined, so it needs no resolver.
163
+ */
164
+ export const PAYLOAD_SCHEMA = {
165
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
166
+ "$id": "https://trusttasks.org/spec/vta/webvh/dids/create/1.0",
167
+ "title": "VTA WebVH DIDs Create — payload",
168
+ "description": "Mint a did:webvh: the VTA generates the keys, writes the log's first entry, and either hands it to a hosting server or returns it for the caller to serve.",
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": [
172
+ "contextId"
173
+ ],
174
+ "properties": {
175
+ "contextId": {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "description": "Context the DID belongs to. Its keys are minted here, and deleting the context destroys the DID."
179
+ },
180
+ "serverId": {
181
+ "type": "string",
182
+ "description": "Hosting server to publish through. Absent means **serverless**: the caller serves the log itself at `url`, and the VTA holds no hosting registration for it."
183
+ },
184
+ "url": {
185
+ "type": "string",
186
+ "description": "Where the log will be served, for the serverless case. The DID's identity derives from this location, so changing it later is only possible for a `portable` DID."
187
+ },
188
+ "path": {
189
+ "type": "string",
190
+ "description": "Explicit path label under the host. Shorthand for pathMode `explicit`; supplying both is an error."
191
+ },
192
+ "pathMode": {
193
+ "$ref": "#/$defs/WebvhPathMode",
194
+ "description": "How the path under the host is chosen. Absent means `autoAssign`."
195
+ },
196
+ "domain": {
197
+ "type": "string",
198
+ "description": "Hosting domain to publish under, when the server serves more than one."
199
+ },
200
+ "label": {
201
+ "type": "string"
202
+ },
203
+ "portable": {
204
+ "type": "boolean",
205
+ "default": false,
206
+ "description": "Whether this DID may later move to another domain and keep its identity. **Fixed at creation** — portability is committed in the first log entry and cannot be added afterwards. A DID created non-portable is tied to where it was published for its whole life."
207
+ },
208
+ "addMediatorService": {
209
+ "type": "boolean",
210
+ "description": "Add a DIDComm mediator service entry to the document."
211
+ },
212
+ "addTspService": {
213
+ "type": "boolean",
214
+ "description": "Add a TSP transport service entry to the document."
215
+ },
216
+ "additionalServices": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object"
220
+ },
221
+ "description": "Further service entries, verbatim."
222
+ },
223
+ "preRotationCount": {
224
+ "type": "integer",
225
+ "minimum": 0,
226
+ "description": "How many successor keys to commit in advance. **`0` disables pre-rotation**, which means a compromise of the current key cannot be recovered from by rotating: the successor was never committed, so a thief can rotate to their own key as convincingly as the owner can."
227
+ },
228
+ "didDocument": {
229
+ "type": "object",
230
+ "description": "A DID document to publish rather than one the VTA composes."
231
+ },
232
+ "didLog": {
233
+ "type": "string",
234
+ "description": "An existing log to adopt, for importing a DID minted elsewhere."
235
+ },
236
+ "setPrimary": {
237
+ "type": "boolean",
238
+ "description": "Make this the context's primary DID."
239
+ },
240
+ "signingKeyId": {
241
+ "type": "string",
242
+ "description": "Existing key to sign log entries with. Absent mints a new one."
243
+ },
244
+ "kaKeyId": {
245
+ "type": "string",
246
+ "description": "Existing key-agreement key to publish. Absent mints a new one."
247
+ },
248
+ "template": {
249
+ "type": "string",
250
+ "description": "DID template to render the document from (see vta/did-templates/*)."
251
+ },
252
+ "templateContext": {
253
+ "type": "string",
254
+ "description": "Context whose templates to resolve `template` against. Absent uses the global scope, which is a different namespace and may hold a different template of the same name."
255
+ },
256
+ "templateVars": {
257
+ "type": "object",
258
+ "additionalProperties": {
259
+ "type": "string"
260
+ },
261
+ "description": "Variables for the template's placeholders."
262
+ },
263
+ "ext": {
264
+ "$ref": "#/$defs/Ext"
265
+ }
266
+ },
267
+ "$defs": {
268
+ "WebvhPathMode": {
269
+ "title": "WebvhPathMode",
270
+ "description": "Where under the host the DID is served. `wellKnown` puts it at the host root (`/.well-known/did.jsonl`) — at most one DID per host can hold that. `explicit` names the path. `autoAssign` lets the server allocate one.",
271
+ "oneOf": [
272
+ {
273
+ "type": "object",
274
+ "additionalProperties": false,
275
+ "required": [
276
+ "mode"
277
+ ],
278
+ "properties": {
279
+ "mode": {
280
+ "const": "wellKnown"
281
+ }
282
+ }
283
+ },
284
+ {
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "required": [
288
+ "mode",
289
+ "path"
290
+ ],
291
+ "properties": {
292
+ "mode": {
293
+ "const": "explicit"
294
+ },
295
+ "path": {
296
+ "type": "string",
297
+ "minLength": 1
298
+ }
299
+ }
300
+ },
301
+ {
302
+ "type": "object",
303
+ "additionalProperties": false,
304
+ "required": [
305
+ "mode"
306
+ ],
307
+ "properties": {
308
+ "mode": {
309
+ "const": "autoAssign"
310
+ }
311
+ }
312
+ }
313
+ ]
314
+ },
315
+ "Response": {
316
+ "$anchor": "response",
317
+ "title": "VTA WebVH DIDs Create — response payload",
318
+ "description": "Success response to vta/webvh/dids/create. Type https://trusttasks.org/spec/vta/webvh/dids/create/1.0#response.",
319
+ "type": "object",
320
+ "additionalProperties": false,
321
+ "required": [
322
+ "did",
323
+ "contextId",
324
+ "scid",
325
+ "portable",
326
+ "signingKeyId",
327
+ "kaKeyId",
328
+ "preRotationKeyCount",
329
+ "createdAt"
330
+ ],
331
+ "properties": {
332
+ "did": {
333
+ "type": "string"
334
+ },
335
+ "contextId": {
336
+ "type": "string"
337
+ },
338
+ "serverId": {
339
+ "type": "string"
340
+ },
341
+ "mnemonic": {
342
+ "type": "string",
343
+ "description": "The hosting server's handle for the record. Absent for a serverless DID."
344
+ },
345
+ "scid": {
346
+ "type": "string",
347
+ "description": "Self-certifying identifier committing to the log's first entry."
348
+ },
349
+ "portable": {
350
+ "type": "boolean"
351
+ },
352
+ "signingKeyId": {
353
+ "type": "string"
354
+ },
355
+ "kaKeyId": {
356
+ "type": "string"
357
+ },
358
+ "preRotationKeyCount": {
359
+ "type": "integer",
360
+ "minimum": 0,
361
+ "description": "Successor keys committed. `0` means pre-rotation is off for this DID."
362
+ },
363
+ "createdAt": {
364
+ "type": "string",
365
+ "format": "date-time"
366
+ },
367
+ "didDocument": {
368
+ "type": "object",
369
+ "description": "The published document, when the VTA composed one."
370
+ },
371
+ "logEntry": {
372
+ "type": "string",
373
+ "description": "The log's first entry. For a serverless DID this is what the caller must serve — the DID does not resolve until they do."
374
+ },
375
+ "ext": {
376
+ "$ref": "#/$defs/Ext"
377
+ }
378
+ }
379
+ },
380
+ "Ext": {
381
+ "title": "Ext",
382
+ "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.",
383
+ "type": "object",
384
+ "minProperties": 1,
385
+ "additionalProperties": true,
386
+ "propertyNames": {
387
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
388
+ }
389
+ }
390
+ }
391
+ } as const;
392
+
393
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
394
+ export const RESPONSE_PAYLOAD_SCHEMA = {
395
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
396
+ "$ref": "#/$defs/Response",
397
+ "$defs": {
398
+ "WebvhPathMode": {
399
+ "title": "WebvhPathMode",
400
+ "description": "Where under the host the DID is served. `wellKnown` puts it at the host root (`/.well-known/did.jsonl`) — at most one DID per host can hold that. `explicit` names the path. `autoAssign` lets the server allocate one.",
401
+ "oneOf": [
402
+ {
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "required": [
406
+ "mode"
407
+ ],
408
+ "properties": {
409
+ "mode": {
410
+ "const": "wellKnown"
411
+ }
412
+ }
413
+ },
414
+ {
415
+ "type": "object",
416
+ "additionalProperties": false,
417
+ "required": [
418
+ "mode",
419
+ "path"
420
+ ],
421
+ "properties": {
422
+ "mode": {
423
+ "const": "explicit"
424
+ },
425
+ "path": {
426
+ "type": "string",
427
+ "minLength": 1
428
+ }
429
+ }
430
+ },
431
+ {
432
+ "type": "object",
433
+ "additionalProperties": false,
434
+ "required": [
435
+ "mode"
436
+ ],
437
+ "properties": {
438
+ "mode": {
439
+ "const": "autoAssign"
440
+ }
441
+ }
442
+ }
443
+ ]
444
+ },
445
+ "Response": {
446
+ "$anchor": "response",
447
+ "title": "VTA WebVH DIDs Create — response payload",
448
+ "description": "Success response to vta/webvh/dids/create. Type https://trusttasks.org/spec/vta/webvh/dids/create/1.0#response.",
449
+ "type": "object",
450
+ "additionalProperties": false,
451
+ "required": [
452
+ "did",
453
+ "contextId",
454
+ "scid",
455
+ "portable",
456
+ "signingKeyId",
457
+ "kaKeyId",
458
+ "preRotationKeyCount",
459
+ "createdAt"
460
+ ],
461
+ "properties": {
462
+ "did": {
463
+ "type": "string"
464
+ },
465
+ "contextId": {
466
+ "type": "string"
467
+ },
468
+ "serverId": {
469
+ "type": "string"
470
+ },
471
+ "mnemonic": {
472
+ "type": "string",
473
+ "description": "The hosting server's handle for the record. Absent for a serverless DID."
474
+ },
475
+ "scid": {
476
+ "type": "string",
477
+ "description": "Self-certifying identifier committing to the log's first entry."
478
+ },
479
+ "portable": {
480
+ "type": "boolean"
481
+ },
482
+ "signingKeyId": {
483
+ "type": "string"
484
+ },
485
+ "kaKeyId": {
486
+ "type": "string"
487
+ },
488
+ "preRotationKeyCount": {
489
+ "type": "integer",
490
+ "minimum": 0,
491
+ "description": "Successor keys committed. `0` means pre-rotation is off for this DID."
492
+ },
493
+ "createdAt": {
494
+ "type": "string",
495
+ "format": "date-time"
496
+ },
497
+ "didDocument": {
498
+ "type": "object",
499
+ "description": "The published document, when the VTA composed one."
500
+ },
501
+ "logEntry": {
502
+ "type": "string",
503
+ "description": "The log's first entry. For a serverless DID this is what the caller must serve — the DID does not resolve until they do."
504
+ },
505
+ "ext": {
506
+ "$ref": "#/$defs/Ext"
507
+ }
508
+ }
509
+ },
510
+ "Ext": {
511
+ "title": "Ext",
512
+ "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.",
513
+ "type": "object",
514
+ "minProperties": 1,
515
+ "additionalProperties": true,
516
+ "propertyNames": {
517
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
518
+ }
519
+ }
520
+ }
521
+ } as const;
522
+
523
+ /**
524
+ * SPEC.md §7.2 policy for the request variant, from this specification's
525
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
526
+ * per-specification and cannot be derived from the document alone, and
527
+ * item 2 needs the schema this carries.
528
+ */
529
+ export const SPEC = {
530
+ typeUri: TYPE_URI,
531
+ isBearer: false,
532
+ isProofRequired: true,
533
+ isRecipientRequired: true,
534
+ payloadSchema: PAYLOAD_SCHEMA,
535
+ } as const;
536
+
537
+ /**
538
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
539
+ * tracks the *issuer* party's requirement because a response swaps the
540
+ * parties (§7.3 item 5).
541
+ */
542
+ export const RESPONSE_SPEC = {
543
+ typeUri: RESPONSE_TYPE_URI,
544
+ isBearer: false,
545
+ isProofRequired: true,
546
+ isRecipientRequired: true,
547
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
548
+ } as const;