@openvtc/trust-tasks 0.20.7 → 0.21.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 (253) hide show
  1. package/CHANGELOG.md +320 -0
  2. package/dist/_shared/components.d.ts +299 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts +456 -0
  5. package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts.map +1 -0
  6. package/dist/auth/passkey/enroll/invite/0.2/payload.js +248 -0
  7. package/dist/auth/passkey/enroll/invite/0.2/payload.js.map +1 -0
  8. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts +728 -0
  9. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts.map +1 -0
  10. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js +430 -0
  11. package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js.map +1 -0
  12. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts +1043 -0
  13. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts.map +1 -0
  14. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js +628 -0
  15. package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js.map +1 -0
  16. package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts +533 -0
  17. package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts.map +1 -0
  18. package/dist/auth/passkey/revoke/finish/0.2/payload.js +315 -0
  19. package/dist/auth/passkey/revoke/finish/0.2/payload.js.map +1 -0
  20. package/dist/auth/passkey/revoke/start/0.2/payload.d.ts +511 -0
  21. package/dist/auth/passkey/revoke/start/0.2/payload.d.ts.map +1 -0
  22. package/dist/auth/passkey/revoke/start/0.2/payload.js +297 -0
  23. package/dist/auth/passkey/revoke/start/0.2/payload.js.map +1 -0
  24. package/dist/auth/step-up/approve-request/0.3/payload.d.ts +613 -0
  25. package/dist/auth/step-up/approve-request/0.3/payload.d.ts.map +1 -0
  26. package/dist/auth/step-up/approve-request/0.3/payload.js +345 -0
  27. package/dist/auth/step-up/approve-request/0.3/payload.js.map +1 -0
  28. package/dist/auth/step-up/approve-response/0.4/payload.d.ts +887 -0
  29. package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -0
  30. package/dist/auth/step-up/approve-response/0.4/payload.js +504 -0
  31. package/dist/auth/step-up/approve-response/0.4/payload.js.map +1 -0
  32. package/dist/auth/step-up/approve-response/0.5/payload.d.ts +887 -0
  33. package/dist/auth/step-up/approve-response/0.5/payload.d.ts.map +1 -0
  34. package/dist/auth/step-up/approve-response/0.5/payload.js +504 -0
  35. package/dist/auth/step-up/approve-response/0.5/payload.js.map +1 -0
  36. package/dist/backup/abort/0.1/payload.d.ts +262 -0
  37. package/dist/backup/abort/0.1/payload.d.ts.map +1 -0
  38. package/dist/backup/abort/0.1/payload.js +146 -0
  39. package/dist/backup/abort/0.1/payload.js.map +1 -0
  40. package/dist/backup/complete-export/0.1/payload.d.ts +262 -0
  41. package/dist/backup/complete-export/0.1/payload.d.ts.map +1 -0
  42. package/dist/backup/complete-export/0.1/payload.js +146 -0
  43. package/dist/backup/complete-export/0.1/payload.js.map +1 -0
  44. package/dist/backup/finalize-import/0.1/payload.d.ts +395 -0
  45. package/dist/backup/finalize-import/0.1/payload.d.ts.map +1 -0
  46. package/dist/backup/finalize-import/0.1/payload.js +209 -0
  47. package/dist/backup/finalize-import/0.1/payload.js.map +1 -0
  48. package/dist/backup/get-chunk/0.1/payload.d.ts +461 -0
  49. package/dist/backup/get-chunk/0.1/payload.d.ts.map +1 -0
  50. package/dist/backup/get-chunk/0.1/payload.js +250 -0
  51. package/dist/backup/get-chunk/0.1/payload.js.map +1 -0
  52. package/dist/backup/initiate-export/0.1/payload.d.ts +896 -0
  53. package/dist/backup/initiate-export/0.1/payload.d.ts.map +1 -0
  54. package/dist/backup/initiate-export/0.1/payload.js +507 -0
  55. package/dist/backup/initiate-export/0.1/payload.js.map +1 -0
  56. package/dist/backup/initiate-import/0.1/payload.d.ts +888 -0
  57. package/dist/backup/initiate-import/0.1/payload.d.ts.map +1 -0
  58. package/dist/backup/initiate-import/0.1/payload.js +504 -0
  59. package/dist/backup/initiate-import/0.1/payload.js.map +1 -0
  60. package/dist/backup/put-chunk/0.1/payload.d.ts +495 -0
  61. package/dist/backup/put-chunk/0.1/payload.d.ts.map +1 -0
  62. package/dist/backup/put-chunk/0.1/payload.js +265 -0
  63. package/dist/backup/put-chunk/0.1/payload.js.map +1 -0
  64. package/dist/device/list/0.1/payload.d.ts +4 -4
  65. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  66. package/dist/device/list/0.1/payload.js +4 -2
  67. package/dist/device/list/0.1/payload.js.map +1 -1
  68. package/dist/device/list/0.2/payload.d.ts +4 -4
  69. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  70. package/dist/device/list/0.2/payload.js +4 -2
  71. package/dist/device/list/0.2/payload.js.map +1 -1
  72. package/dist/device/register/0.1/payload.d.ts +4 -4
  73. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  74. package/dist/device/register/0.1/payload.js +4 -2
  75. package/dist/device/register/0.1/payload.js.map +1 -1
  76. package/dist/device/register/0.2/payload.d.ts +4 -4
  77. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  78. package/dist/device/register/0.2/payload.js +4 -2
  79. package/dist/device/register/0.2/payload.js.map +1 -1
  80. package/dist/git-ns/_shared/0.4/git-ns.d.ts +16 -0
  81. package/dist/git-ns/_shared/0.4/git-ns.d.ts.map +1 -0
  82. package/dist/git-ns/_shared/0.4/git-ns.js +6 -0
  83. package/dist/git-ns/_shared/0.4/git-ns.js.map +1 -0
  84. package/dist/git-ns/account/link-status/0.1/payload.d.ts +2 -2
  85. package/dist/git-ns/account/link-status/0.1/payload.js +2 -2
  86. package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -1
  87. package/dist/git-ns/account/unlink/0.1/payload.d.ts +411 -0
  88. package/dist/git-ns/account/unlink/0.1/payload.d.ts.map +1 -0
  89. package/dist/git-ns/account/unlink/0.1/payload.js +228 -0
  90. package/dist/git-ns/account/unlink/0.1/payload.js.map +1 -0
  91. package/dist/git-ns/bridge/event/0.3/payload.d.ts +1682 -0
  92. package/dist/git-ns/bridge/event/0.3/payload.d.ts.map +1 -0
  93. package/dist/git-ns/bridge/event/0.3/payload.js +971 -0
  94. package/dist/git-ns/bridge/event/0.3/payload.js.map +1 -0
  95. package/dist/git-ns/bridge/job/0.4/payload.d.ts +1068 -0
  96. package/dist/git-ns/bridge/job/0.4/payload.d.ts.map +1 -0
  97. package/dist/git-ns/bridge/job/0.4/payload.js +573 -0
  98. package/dist/git-ns/bridge/job/0.4/payload.js.map +1 -0
  99. package/dist/git-ns/drift/resolve/0.3/payload.d.ts +1072 -0
  100. package/dist/git-ns/drift/resolve/0.3/payload.d.ts.map +1 -0
  101. package/dist/git-ns/drift/resolve/0.3/payload.js +634 -0
  102. package/dist/git-ns/drift/resolve/0.3/payload.js.map +1 -0
  103. package/dist/git-ns/namespace/reseat/0.3/payload.d.ts +515 -0
  104. package/dist/git-ns/namespace/reseat/0.3/payload.d.ts.map +1 -0
  105. package/dist/git-ns/namespace/reseat/0.3/payload.js +296 -0
  106. package/dist/git-ns/namespace/reseat/0.3/payload.js.map +1 -0
  107. package/dist/git-ns/repo/create/0.3/payload.d.ts +1101 -0
  108. package/dist/git-ns/repo/create/0.3/payload.d.ts.map +1 -0
  109. package/dist/git-ns/repo/create/0.3/payload.js +646 -0
  110. package/dist/git-ns/repo/create/0.3/payload.js.map +1 -0
  111. package/dist/git-ns/right/break-glass/0.1/payload.d.ts +685 -0
  112. package/dist/git-ns/right/break-glass/0.1/payload.d.ts.map +1 -0
  113. package/dist/git-ns/right/break-glass/0.1/payload.js +397 -0
  114. package/dist/git-ns/right/break-glass/0.1/payload.js.map +1 -0
  115. package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts +384 -0
  116. package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts.map +1 -0
  117. package/dist/git-ns/right/break-glass-notice/0.1/payload.js +216 -0
  118. package/dist/git-ns/right/break-glass-notice/0.1/payload.js.map +1 -0
  119. package/dist/git-ns/right/grant/0.3/payload.d.ts +678 -0
  120. package/dist/git-ns/right/grant/0.3/payload.d.ts.map +1 -0
  121. package/dist/git-ns/right/grant/0.3/payload.js +383 -0
  122. package/dist/git-ns/right/grant/0.3/payload.js.map +1 -0
  123. package/dist/git-ns/right/ratify/0.1/payload.d.ts +702 -0
  124. package/dist/git-ns/right/ratify/0.1/payload.d.ts.map +1 -0
  125. package/dist/git-ns/right/ratify/0.1/payload.js +404 -0
  126. package/dist/git-ns/right/ratify/0.1/payload.js.map +1 -0
  127. package/dist/git-ns/right/revoke/0.3/payload.d.ts +664 -0
  128. package/dist/git-ns/right/revoke/0.3/payload.d.ts.map +1 -0
  129. package/dist/git-ns/right/revoke/0.3/payload.js +378 -0
  130. package/dist/git-ns/right/revoke/0.3/payload.js.map +1 -0
  131. package/dist/git-ns/roles/reproject/0.1/payload.d.ts +325 -0
  132. package/dist/git-ns/roles/reproject/0.1/payload.d.ts.map +1 -0
  133. package/dist/git-ns/roles/reproject/0.1/payload.js +176 -0
  134. package/dist/git-ns/roles/reproject/0.1/payload.js.map +1 -0
  135. package/dist/git-ns/view/0.1/payload.d.ts +2 -2
  136. package/dist/git-ns/view/0.1/payload.js +2 -2
  137. package/dist/git-ns/view/0.1/payload.js.map +1 -1
  138. package/dist/git-ns/view/0.2/payload.d.ts +2 -2
  139. package/dist/git-ns/view/0.2/payload.js +2 -2
  140. package/dist/git-ns/view/0.2/payload.js.map +1 -1
  141. package/dist/git-ns/view/0.3/payload.d.ts +2 -2
  142. package/dist/git-ns/view/0.3/payload.js +2 -2
  143. package/dist/git-ns/view/0.3/payload.js.map +1 -1
  144. package/dist/git-ns/view/0.4/payload.d.ts +1696 -0
  145. package/dist/git-ns/view/0.4/payload.d.ts.map +1 -0
  146. package/dist/git-ns/view/0.4/payload.js +1012 -0
  147. package/dist/git-ns/view/0.4/payload.js.map +1 -0
  148. package/dist/index.d.ts +39 -0
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +39 -0
  151. package/dist/index.js.map +1 -1
  152. package/dist/messaging/message/status/0.1/payload.d.ts +372 -0
  153. package/dist/messaging/message/status/0.1/payload.d.ts.map +1 -0
  154. package/dist/messaging/message/status/0.1/payload.js +214 -0
  155. package/dist/messaging/message/status/0.1/payload.js.map +1 -0
  156. package/dist/vta/_shared/0.3/did-key-roles.d.ts +16 -0
  157. package/dist/vta/_shared/0.3/did-key-roles.d.ts.map +1 -0
  158. package/dist/vta/_shared/0.3/did-key-roles.js +6 -0
  159. package/dist/vta/_shared/0.3/did-key-roles.js.map +1 -0
  160. package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts +326 -0
  161. package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts.map +1 -0
  162. package/dist/vta/attestation/mnemonic-export/1.0/payload.js +175 -0
  163. package/dist/vta/attestation/mnemonic-export/1.0/payload.js.map +1 -0
  164. package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts +1914 -0
  165. package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts.map +1 -0
  166. package/dist/vta/webvh/dids/keys/add/1.0/payload.js +1128 -0
  167. package/dist/vta/webvh/dids/keys/add/1.0/payload.js.map +1 -0
  168. package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts +1603 -0
  169. package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts.map +1 -0
  170. package/dist/vta/webvh/dids/keys/list/1.0/payload.js +942 -0
  171. package/dist/vta/webvh/dids/keys/list/1.0/payload.js.map +1 -0
  172. package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts +1914 -0
  173. package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts.map +1 -0
  174. package/dist/vta/webvh/dids/keys/retire/1.0/payload.js +1123 -0
  175. package/dist/vta/webvh/dids/keys/retire/1.0/payload.js.map +1 -0
  176. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts +2021 -0
  177. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts.map +1 -0
  178. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js +1168 -0
  179. package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js.map +1 -0
  180. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts +1992 -0
  181. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts.map +1 -0
  182. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js +1151 -0
  183. package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js.map +1 -0
  184. package/dist/vta/webvh/dids/update/2.0/payload.d.ts +1062 -0
  185. package/dist/vta/webvh/dids/update/2.0/payload.d.ts.map +1 -0
  186. package/dist/vta/webvh/dids/update/2.0/payload.js +616 -0
  187. package/dist/vta/webvh/dids/update/2.0/payload.js.map +1 -0
  188. package/dist/vtc/credentials/reissue/0.1/payload.d.ts +502 -0
  189. package/dist/vtc/credentials/reissue/0.1/payload.d.ts.map +1 -0
  190. package/dist/vtc/credentials/reissue/0.1/payload.js +282 -0
  191. package/dist/vtc/credentials/reissue/0.1/payload.js.map +1 -0
  192. package/dist/vtc/members/personhood/challenge/0.1/payload.d.ts +2 -2
  193. package/dist/vtc/members/personhood/challenge/0.1/payload.js +2 -2
  194. package/dist/vtc/members/personhood/challenge/0.1/payload.js.map +1 -1
  195. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +2 -2
  196. package/dist/vtc/vetting/vetters/profile/0.1/payload.js +2 -2
  197. package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -1
  198. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +2 -2
  199. package/dist/vtc/vetting/vetters/resend/0.1/payload.js +2 -2
  200. package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -1
  201. package/package.json +1 -1
  202. package/src/_shared/components.ts +313 -2
  203. package/src/auth/passkey/enroll/invite/0.2/payload.ts +325 -0
  204. package/src/auth/passkey/enroll/redeem/finish/0.1/payload.ts +499 -0
  205. package/src/auth/passkey/enroll/redeem/start/0.1/payload.ts +700 -0
  206. package/src/auth/passkey/revoke/finish/0.2/payload.ts +379 -0
  207. package/src/auth/passkey/revoke/start/0.2/payload.ts +349 -0
  208. package/src/auth/step-up/approve-request/0.3/payload.ts +421 -0
  209. package/src/auth/step-up/approve-response/0.4/payload.ts +593 -0
  210. package/src/auth/step-up/approve-response/0.5/payload.ts +593 -0
  211. package/src/backup/abort/0.1/payload.ts +191 -0
  212. package/src/backup/complete-export/0.1/payload.ts +191 -0
  213. package/src/backup/finalize-import/0.1/payload.ts +279 -0
  214. package/src/backup/get-chunk/0.1/payload.ts +308 -0
  215. package/src/backup/initiate-export/0.1/payload.ts +564 -0
  216. package/src/backup/initiate-import/0.1/payload.ts +561 -0
  217. package/src/backup/put-chunk/0.1/payload.ts +331 -0
  218. package/src/device/list/0.1/payload.ts +4 -2
  219. package/src/device/list/0.2/payload.ts +4 -2
  220. package/src/device/register/0.1/payload.ts +4 -2
  221. package/src/device/register/0.2/payload.ts +4 -2
  222. package/src/git-ns/_shared/0.4/git-ns.ts +17 -0
  223. package/src/git-ns/account/link-status/0.1/payload.ts +2 -2
  224. package/src/git-ns/account/unlink/0.1/payload.ts +274 -0
  225. package/src/git-ns/bridge/event/0.3/payload.ts +1132 -0
  226. package/src/git-ns/bridge/job/0.4/payload.ts +691 -0
  227. package/src/git-ns/drift/resolve/0.3/payload.ts +707 -0
  228. package/src/git-ns/namespace/reseat/0.3/payload.ts +342 -0
  229. package/src/git-ns/repo/create/0.3/payload.ts +706 -0
  230. package/src/git-ns/right/break-glass/0.1/payload.ts +443 -0
  231. package/src/git-ns/right/break-glass-notice/0.1/payload.ts +258 -0
  232. package/src/git-ns/right/grant/0.3/payload.ts +434 -0
  233. package/src/git-ns/right/ratify/0.1/payload.ts +455 -0
  234. package/src/git-ns/right/revoke/0.3/payload.ts +425 -0
  235. package/src/git-ns/roles/reproject/0.1/payload.ts +220 -0
  236. package/src/git-ns/view/0.1/payload.ts +2 -2
  237. package/src/git-ns/view/0.2/payload.ts +2 -2
  238. package/src/git-ns/view/0.3/payload.ts +2 -2
  239. package/src/git-ns/view/0.4/payload.ts +1075 -0
  240. package/src/index.ts +39 -0
  241. package/src/messaging/message/status/0.1/payload.ts +270 -0
  242. package/src/vta/_shared/0.3/did-key-roles.ts +17 -0
  243. package/src/vta/attestation/mnemonic-export/1.0/payload.ts +232 -0
  244. package/src/vta/webvh/dids/keys/add/1.0/payload.ts +1217 -0
  245. package/src/vta/webvh/dids/keys/list/1.0/payload.ts +1004 -0
  246. package/src/vta/webvh/dids/keys/retire/1.0/payload.ts +1212 -0
  247. package/src/vta/webvh/dids/keys/revoke/1.0/payload.ts +1276 -0
  248. package/src/vta/webvh/dids/rotate-keys/2.0/payload.ts +1262 -0
  249. package/src/vta/webvh/dids/update/2.0/payload.ts +713 -0
  250. package/src/vtc/credentials/reissue/0.1/payload.ts +357 -0
  251. package/src/vtc/members/personhood/challenge/0.1/payload.ts +2 -2
  252. package/src/vtc/vetting/vetters/profile/0.1/payload.ts +2 -2
  253. package/src/vtc/vetting/vetters/resend/0.1/payload.ts +2 -2
@@ -0,0 +1,1276 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/dids/keys/revoke/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { DidDocumentChange, DidDocumentPreview, DidVerificationRelationship, Ext, KeyOrigin, KeyRole, KeyRoleApprovalState, KeyRoleChangeOutcome, KeyType, RoleKey, RoleKeyCustody, RoleKeyState, RotationKind, RotationRecord, RotationState } from "../../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Revoke a did:webvh key for compromise: withdraw it from its role in one entry, without overlap, record the compromise time so verifiers judge its past signatures accordingly, and put a generated replacement in its place where the role would otherwise be empty.
11
+ */
12
+ export interface VTAWebVHDIDsKeysRevokePayload {
13
+ /**
14
+ * The DID whose keys change.
15
+ */
16
+ did: string;
17
+ /**
18
+ * The role of the compromised key.
19
+ */
20
+ role: KeyRole;
21
+ /**
22
+ * The compromised key's verification method. REQUIRED for every role but `update`, and forbidden for `update`.
23
+ */
24
+ verificationMethod?: string;
25
+ /**
26
+ * The compromise time (VTI-KEY-121): the earliest instant from which the key is to be treated as compromised. Err early. Where it cannot be established, give the time the key was first published — `keys/list` reports it. MUST NOT be later than the request's `issuedAt`.
27
+ */
28
+ compromisedSince: string;
29
+ /**
30
+ * Generate a replacement in the same role, in the same entry. Absent means: replace only if the role would otherwise have no active key, with the revoked key's algorithm. Not permitted for `update`, whose replacement is the committed successor.
31
+ */
32
+ replacement?: {
33
+ keyType?: KeyType;
34
+ };
35
+ /**
36
+ * Optimistic-concurrency precondition: the versionId the caller based this change on (for example `keys/list`'s `versionId`). The VTA MUST refuse the change with `vta/webvh/dids:versionConflict` if the DID's latest entry no longer matches.
37
+ */
38
+ expectedVersionId?: string;
39
+ /**
40
+ * Compute and return the preview without writing anything but the plan (CONVENTIONS.md §3.1). Absent reads as false.
41
+ */
42
+ dryRun?: boolean;
43
+ /**
44
+ * Apply exactly the plan a previous dry run of this same request returned. The VTA MUST apply that plan or nothing, and MUST refuse with `vta/webvh/dids:previewStale` if it has expired, the log has moved past its base, or this request differs from the one previewed. An approval (step-up or quorum) is bound to this identifier.
45
+ */
46
+ previewId?: string;
47
+ /**
48
+ * Why the change is being made, for the audit trail and for other approvers. Never published.
49
+ */
50
+ reason?: string;
51
+ ext?: Ext;
52
+ }
53
+ /**
54
+ * Success response. Type https://trusttasks.org/spec/vta/webvh/dids/keys/revoke/1.0#response. A refusal is a `trust-task-error` document, never this.
55
+ */
56
+ export interface VTAWebVHDIDsKeysRevokeResponsePayload {
57
+ did: string;
58
+ outcome: KeyRoleChangeOutcome;
59
+ /**
60
+ * Present when `outcome` is `preview` or `pendingApproval`: the plan, and what an approval is bound to.
61
+ */
62
+ preview?: DidDocumentPreview;
63
+ /**
64
+ * Present when `outcome` is `applied`: the versionId of the appended entry. Pass it as the next change's `expectedVersionId`.
65
+ */
66
+ newVersionId?: string;
67
+ /**
68
+ * Every key whose state this change sets or would set, after the change.
69
+ */
70
+ keys: RoleKey[];
71
+ rotation?: RotationRecord;
72
+ /**
73
+ * Present when `outcome` is `pendingApproval`.
74
+ */
75
+ approvals?: KeyRoleApprovalState;
76
+ /**
77
+ * True when no hosting server holds this DID. The caller must publish `newLogEntry` itself; until it does, resolvers still see the previous version.
78
+ */
79
+ serverless?: boolean;
80
+ /**
81
+ * The appended entry as JSON text. Present when `serverless` is true.
82
+ */
83
+ newLogEntry?: string;
84
+ ext?: Ext;
85
+ /**
86
+ * What the node must now do that this entry cannot (VTI-KEY-133). Custody data, present for an `attestation` revocation.
87
+ */
88
+ followUp?: {
89
+ /**
90
+ * Status lists signed by the revoked key, which the node MUST re-sign at once under a sound attestation key.
91
+ */
92
+ statusListsToResign?: number;
93
+ /**
94
+ * Attestation artefacts still in force that the VTA's signing record shows the revoked key signed, which the node MUST re-issue.
95
+ */
96
+ artefactsToReissue?: number;
97
+ };
98
+ }
99
+
100
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
101
+ export type { DidDocumentChange, DidDocumentPreview, DidVerificationRelationship, Ext, KeyOrigin, KeyRole, KeyRoleApprovalState, KeyRoleChangeOutcome, KeyType, RoleKey, RoleKeyCustody, RoleKeyState, RotationKind, RotationRecord, RotationState };
102
+
103
+ /** Trust Task type URI. */
104
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/keys/revoke/1.0" as const;
105
+
106
+ /** Stable alias for this specification's request payload shape. */
107
+ export type Payload = VTAWebVHDIDsKeysRevokePayload;
108
+
109
+ /** Trust Task response type URI (request type URI + "#response"). */
110
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/keys/revoke/1.0#response" as const;
111
+
112
+ /** Stable alias for this specification's success-response payload shape. */
113
+ export type Response = VTAWebVHDIDsKeysRevokeResponsePayload;
114
+
115
+ /**
116
+ * This specification's payload schema, as a value.
117
+ *
118
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
119
+ * rather than only as a `.json` file because TypeScript types are erased
120
+ * at runtime: without a schema a consumer has nothing to validate, and
121
+ * every REQUIRED payload member is optional in practice. Cross-file
122
+ * `$ref`s are already inlined, so it needs no resolver.
123
+ */
124
+ export const PAYLOAD_SCHEMA = {
125
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
126
+ "$id": "https://trusttasks.org/spec/vta/webvh/dids/keys/revoke/1.0",
127
+ "title": "VTA WebVH DIDs Keys Revoke — payload",
128
+ "description": "Revoke a did:webvh key for compromise: withdraw it from its role in one entry, without overlap, record the compromise time so verifiers judge its past signatures accordingly, and put a generated replacement in its place where the role would otherwise be empty.",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "did",
133
+ "role",
134
+ "compromisedSince"
135
+ ],
136
+ "properties": {
137
+ "did": {
138
+ "type": "string",
139
+ "minLength": 1,
140
+ "description": "The DID whose keys change."
141
+ },
142
+ "role": {
143
+ "$ref": "#/$defs/KeyRole",
144
+ "description": "The role of the compromised key."
145
+ },
146
+ "verificationMethod": {
147
+ "type": "string",
148
+ "minLength": 1,
149
+ "description": "The compromised key's verification method. REQUIRED for every role but `update`, and forbidden for `update`."
150
+ },
151
+ "compromisedSince": {
152
+ "type": "string",
153
+ "format": "date-time",
154
+ "description": "The compromise time (VTI-KEY-121): the earliest instant from which the key is to be treated as compromised. Err early. Where it cannot be established, give the time the key was first published — `keys/list` reports it. MUST NOT be later than the request's `issuedAt`."
155
+ },
156
+ "replacement": {
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "properties": {
160
+ "keyType": {
161
+ "$ref": "#/$defs/KeyType"
162
+ }
163
+ },
164
+ "description": "Generate a replacement in the same role, in the same entry. Absent means: replace only if the role would otherwise have no active key, with the revoked key's algorithm. Not permitted for `update`, whose replacement is the committed successor."
165
+ },
166
+ "expectedVersionId": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "description": "Optimistic-concurrency precondition: the versionId the caller based this change on (for example `keys/list`'s `versionId`). The VTA MUST refuse the change with `vta/webvh/dids:versionConflict` if the DID's latest entry no longer matches."
170
+ },
171
+ "dryRun": {
172
+ "type": "boolean",
173
+ "description": "Compute and return the preview without writing anything but the plan (CONVENTIONS.md §3.1). Absent reads as false."
174
+ },
175
+ "previewId": {
176
+ "type": "string",
177
+ "minLength": 16,
178
+ "description": "Apply exactly the plan a previous dry run of this same request returned. The VTA MUST apply that plan or nothing, and MUST refuse with `vta/webvh/dids:previewStale` if it has expired, the log has moved past its base, or this request differs from the one previewed. An approval (step-up or quorum) is bound to this identifier."
179
+ },
180
+ "reason": {
181
+ "type": "string",
182
+ "maxLength": 1024,
183
+ "description": "Why the change is being made, for the audit trail and for other approvers. Never published."
184
+ },
185
+ "ext": {
186
+ "$ref": "#/$defs/Ext"
187
+ }
188
+ },
189
+ "$defs": {
190
+ "Response": {
191
+ "$anchor": "response",
192
+ "title": "VTA WebVH DIDs Keys Revoke — response payload",
193
+ "description": "Success response. Type https://trusttasks.org/spec/vta/webvh/dids/keys/revoke/1.0#response. A refusal is a `trust-task-error` document, never this.",
194
+ "type": "object",
195
+ "additionalProperties": false,
196
+ "required": [
197
+ "did",
198
+ "outcome",
199
+ "keys"
200
+ ],
201
+ "properties": {
202
+ "did": {
203
+ "type": "string"
204
+ },
205
+ "outcome": {
206
+ "$ref": "#/$defs/KeyRoleChangeOutcome"
207
+ },
208
+ "preview": {
209
+ "$ref": "#/$defs/DidDocumentPreview",
210
+ "description": "Present when `outcome` is `preview` or `pendingApproval`: the plan, and what an approval is bound to."
211
+ },
212
+ "newVersionId": {
213
+ "type": "string",
214
+ "description": "Present when `outcome` is `applied`: the versionId of the appended entry. Pass it as the next change's `expectedVersionId`."
215
+ },
216
+ "keys": {
217
+ "type": "array",
218
+ "items": {
219
+ "$ref": "#/$defs/RoleKey"
220
+ },
221
+ "description": "Every key whose state this change sets or would set, after the change."
222
+ },
223
+ "rotation": {
224
+ "$ref": "#/$defs/RotationRecord"
225
+ },
226
+ "approvals": {
227
+ "$ref": "#/$defs/KeyRoleApprovalState",
228
+ "description": "Present when `outcome` is `pendingApproval`."
229
+ },
230
+ "serverless": {
231
+ "type": "boolean",
232
+ "description": "True when no hosting server holds this DID. The caller must publish `newLogEntry` itself; until it does, resolvers still see the previous version."
233
+ },
234
+ "newLogEntry": {
235
+ "type": "string",
236
+ "description": "The appended entry as JSON text. Present when `serverless` is true."
237
+ },
238
+ "ext": {
239
+ "$ref": "#/$defs/Ext"
240
+ },
241
+ "followUp": {
242
+ "type": "object",
243
+ "additionalProperties": false,
244
+ "description": "What the node must now do that this entry cannot (VTI-KEY-133). Custody data, present for an `attestation` revocation.",
245
+ "properties": {
246
+ "statusListsToResign": {
247
+ "type": "integer",
248
+ "minimum": 0,
249
+ "description": "Status lists signed by the revoked key, which the node MUST re-sign at once under a sound attestation key."
250
+ },
251
+ "artefactsToReissue": {
252
+ "type": "integer",
253
+ "minimum": 0,
254
+ "description": "Attestation artefacts still in force that the VTA's signing record shows the revoked key signed, which the node MUST re-issue."
255
+ }
256
+ }
257
+ }
258
+ }
259
+ },
260
+ "Ext": {
261
+ "title": "Ext",
262
+ "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.",
263
+ "type": "object",
264
+ "minProperties": 1,
265
+ "additionalProperties": true,
266
+ "propertyNames": {
267
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
268
+ }
269
+ },
270
+ "KeyRoleApprovalState": {
271
+ "title": "KeyRoleApprovalState",
272
+ "type": "object",
273
+ "additionalProperties": false,
274
+ "required": [
275
+ "required",
276
+ "received",
277
+ "expiresAt"
278
+ ],
279
+ "description": "Approval progress of a change the VTA's policy gates on more than one approval (CONVENTIONS.md §3.3).",
280
+ "properties": {
281
+ "required": {
282
+ "type": "integer",
283
+ "minimum": 1,
284
+ "description": "Distinct approvals the VTA's policy requires."
285
+ },
286
+ "received": {
287
+ "type": "integer",
288
+ "minimum": 0,
289
+ "description": "Distinct approvals recorded so far, including the initiator's own."
290
+ },
291
+ "approvers": {
292
+ "type": "array",
293
+ "items": {
294
+ "type": "string"
295
+ },
296
+ "uniqueItems": true,
297
+ "description": "VIDs whose approvals were recorded. Custody projection only; omitted from a response to anyone who is not themselves an eligible approver of this change."
298
+ },
299
+ "expiresAt": {
300
+ "type": "string",
301
+ "format": "date-time",
302
+ "description": "When the preview, and every approval bound to it, stops being usable."
303
+ }
304
+ }
305
+ },
306
+ "RotationRecord": {
307
+ "title": "RotationRecord",
308
+ "type": "object",
309
+ "additionalProperties": false,
310
+ "required": [
311
+ "rotationId",
312
+ "role",
313
+ "kind",
314
+ "state"
315
+ ],
316
+ "description": "One change to a role's key set, from preview to completion. The rotation history of a DID is the list of these; the log is the authority for what was published, and this record adds what the log cannot say — which change was which, and (custody projection only) who asked, who approved, and why.",
317
+ "properties": {
318
+ "rotationId": {
319
+ "type": "string",
320
+ "minLength": 1
321
+ },
322
+ "role": {
323
+ "$ref": "#/$defs/KeyRole"
324
+ },
325
+ "kind": {
326
+ "$ref": "#/$defs/RotationKind"
327
+ },
328
+ "state": {
329
+ "$ref": "#/$defs/RotationState"
330
+ },
331
+ "predecessors": {
332
+ "type": "array",
333
+ "items": {
334
+ "type": "string"
335
+ },
336
+ "description": "Verification-method identifiers (or, for `update`, public keys) leaving the role."
337
+ },
338
+ "successors": {
339
+ "type": "array",
340
+ "items": {
341
+ "type": "string"
342
+ },
343
+ "description": "Verification-method identifiers (or, for `update`, public keys) entering the role."
344
+ },
345
+ "startedInVersionId": {
346
+ "type": "string"
347
+ },
348
+ "endedInVersionId": {
349
+ "type": "string"
350
+ },
351
+ "startedAt": {
352
+ "type": "string",
353
+ "format": "date-time"
354
+ },
355
+ "overlapUntil": {
356
+ "type": "string",
357
+ "format": "date-time",
358
+ "description": "Custody projection only. End of the overlap window."
359
+ },
360
+ "autoRetire": {
361
+ "type": "boolean",
362
+ "description": "Custody projection only. Whether the VTA retires the predecessor itself at `overlapUntil`."
363
+ },
364
+ "endedAt": {
365
+ "type": "string",
366
+ "format": "date-time"
367
+ },
368
+ "initiatedBy": {
369
+ "type": "string",
370
+ "description": "Custody projection only. VID of the administrator whose signed request started the change."
371
+ },
372
+ "approvals": {
373
+ "$ref": "#/$defs/KeyRoleApprovalState",
374
+ "description": "Custody projection only."
375
+ },
376
+ "reason": {
377
+ "type": "string",
378
+ "maxLength": 1024,
379
+ "description": "Custody projection only. The operator's stated reason. Never published."
380
+ },
381
+ "ext": {
382
+ "$ref": "#/$defs/Ext"
383
+ },
384
+ "activatesAt": {
385
+ "type": "string",
386
+ "format": "date-time",
387
+ "description": "When the successor becomes `active` and the predecessor `retiring`; never before `cacheHorizonAt`."
388
+ },
389
+ "cacheHorizonAt": {
390
+ "type": "string",
391
+ "format": "date-time",
392
+ "description": "Planned rotations: the publishing entry's cache horizon — publication plus the longer of the document's TTL and the verifier cache cap (CONVENTIONS.md §11.1). The switch, and any retirement of the predecessor, happen no earlier. Public: it follows from the log and the published cap."
393
+ }
394
+ }
395
+ },
396
+ "RotationState": {
397
+ "title": "RotationState",
398
+ "type": "string",
399
+ "enum": [
400
+ "pendingApproval",
401
+ "staged",
402
+ "overlapping",
403
+ "completed",
404
+ "aborted",
405
+ "expired"
406
+ ],
407
+ "description": "`pendingApproval` — awaiting the approvals the VTA's policy requires; nothing is published. `staged` — successor published, not yet used; predecessor still active. `overlapping` — successor active, predecessor `retiring`. `completed` — every predecessor retired (or, for `compromise` and `addition`, the entry is published and any overlap it began has ended). `aborted` — the successor was retired instead of the predecessor, which stayed or returned to `active`. `expired` — approvals were not gathered before the preview expired; nothing was published."
408
+ },
409
+ "RotationKind": {
410
+ "title": "RotationKind",
411
+ "type": "string",
412
+ "enum": [
413
+ "planned",
414
+ "compromise",
415
+ "addition"
416
+ ],
417
+ "description": "`planned` — a successor was staged, activated, and the predecessor retired on the operator's schedule. `compromise` — a key was revoked and, where the role would otherwise be empty, replaced in the same log entry. `addition` — a key was added to a role without anything leaving it (for example a post-quantum key alongside a classical one)."
418
+ },
419
+ "KeyRole": {
420
+ "title": "KeyRole",
421
+ "type": "string",
422
+ "enum": [
423
+ "attestation",
424
+ "operational",
425
+ "messaging",
426
+ "update"
427
+ ],
428
+ "description": "The named key role a key occupies in the DID (VTI-KEY-070 onward). `attestation` — the only keys in `assertionMethod`; sign the DID's attestation artefacts (membership and role credentials, endorsements, status lists, every other credential the node issues), through the VTA's signing service and nowhere else. Generated inside the VTA, never derived, never exportable, never in a backup. `operational` — the only keys in `authentication`; sign the node's own traffic (Trust Task requests and responses, DIDComm and TSP message signatures, invitations, notices, audit checkpoints) with proof purpose `authentication`. `messaging` — the only keys in `keyAgreement`; sign nothing. `update` — the keys that authorize appending to the DID's log (a did:webvh `updateKeys` entry) and the pre-rotation commitments that authorize the next ones; never a verification method, never in `keyRoles`. Generated inside the VTA, never derived, never exportable, never in a backup. No role permits `capabilityInvocation` or `capabilityDelegation` (VTI-KEY-075); both are reserved for a future role. The mapping is normative and is set out in CONVENTIONS.md §1. The set is an extensible registry and growing it is a MINOR change: a consumer that receives a role it does not implement MUST refuse the document rather than map the key onto a role it does know."
429
+ },
430
+ "RoleKey": {
431
+ "title": "RoleKey",
432
+ "type": "object",
433
+ "additionalProperties": false,
434
+ "required": [
435
+ "role",
436
+ "keyType",
437
+ "publicKeyMultibase",
438
+ "state"
439
+ ],
440
+ "description": "One key in one role. A key is in exactly one role for its whole life; a change of role is a retirement from one and an addition to another, under a new verification-method identifier.",
441
+ "properties": {
442
+ "verificationMethod": {
443
+ "type": "string",
444
+ "minLength": 1,
445
+ "description": "The full verification-method identifier (`did#fragment`) the document publishes the key under, and lists in `keyRoles`. Absent only for `update` keys, which are published as log parameters and never as verification methods (VTI-KEY-093). A VTA minting a new method SHOULD derive its fragment from the key (VTI-KEY-150)."
446
+ },
447
+ "role": {
448
+ "$ref": "#/$defs/KeyRole"
449
+ },
450
+ "relationships": {
451
+ "type": "array",
452
+ "items": {
453
+ "$ref": "#/$defs/DidVerificationRelationship"
454
+ },
455
+ "uniqueItems": true,
456
+ "description": "The relationships the key is (or, while `pending`, will be) listed in. Always exactly its role's single relationship (CONVENTIONS.md §1) — carried so a caller can check it against the document rather than trusting it. Empty for `update`, `retired` and `revoked` keys."
457
+ },
458
+ "keyType": {
459
+ "$ref": "#/$defs/KeyType"
460
+ },
461
+ "publicKeyMultibase": {
462
+ "type": "string",
463
+ "minLength": 1,
464
+ "description": "The public half, multibase-encoded, exactly as published."
465
+ },
466
+ "state": {
467
+ "$ref": "#/$defs/RoleKeyState"
468
+ },
469
+ "publishedInVersionId": {
470
+ "type": "string",
471
+ "description": "versionId of the log entry that first published the key. Absent while `pending`."
472
+ },
473
+ "removedInVersionId": {
474
+ "type": "string",
475
+ "description": "versionId of the log entry that retired or revoked the key."
476
+ },
477
+ "retireAfter": {
478
+ "type": "string",
479
+ "format": "date-time",
480
+ "description": "For a `retiring` key: the end of its overlap window. Custody projection only."
481
+ },
482
+ "compromisedSince": {
483
+ "type": "string",
484
+ "format": "date-time",
485
+ "description": "For a `revoked` key: the compromise time (VTI-KEY-121) — the earliest instant from which the key is treated as compromised. Where the operator cannot establish it, the time the key was first published. Published, because it is what a verifier needs."
486
+ },
487
+ "rotationId": {
488
+ "type": "string",
489
+ "description": "The rotation this key was introduced or retired by, when it was."
490
+ },
491
+ "label": {
492
+ "type": "string",
493
+ "maxLength": 256,
494
+ "description": "Operator-facing label. Custody projection only."
495
+ },
496
+ "custody": {
497
+ "$ref": "#/$defs/RoleKeyCustody"
498
+ },
499
+ "ext": {
500
+ "$ref": "#/$defs/Ext"
501
+ },
502
+ "activatesAt": {
503
+ "type": "string",
504
+ "format": "date-time",
505
+ "description": "For a `staged` key: when the VTA will begin using it — no earlier than the publishing entry's cache horizon (CONVENTIONS.md §11.1)."
506
+ }
507
+ }
508
+ },
509
+ "RoleKeyCustody": {
510
+ "title": "RoleKeyCustody",
511
+ "type": "object",
512
+ "additionalProperties": false,
513
+ "required": [
514
+ "keyId",
515
+ "exportable",
516
+ "neverExportable",
517
+ "inBackups"
518
+ ],
519
+ "description": "How the VTA holds a key. Present only in the custody projection. Carries no key material, and a conforming VTA MUST NOT place any in `ext`.",
520
+ "properties": {
521
+ "keyId": {
522
+ "type": "string",
523
+ "minLength": 1,
524
+ "description": "The custodian record identifier (`keys/*`'s `keyId`) behind this key."
525
+ },
526
+ "origin": {
527
+ "$ref": "#/$defs/KeyOrigin"
528
+ },
529
+ "exportable": {
530
+ "type": "boolean",
531
+ "description": "Whether the custodian would release the private half through `keys/export-secret`. Always `false` for `attestation` and `update` keys (CONVENTIONS.md §4). Stated explicitly — never absent — because this is the member an operator reads to confirm a role key cannot leave the VTA, and `keys/*`'s absent-means-exportable reading is the wrong default to leave them to infer."
532
+ },
533
+ "neverExportable": {
534
+ "type": "boolean",
535
+ "description": "True when no authority can make the key exportable — the role forbids it, or the material exists only inside a module that cannot release it. `true` implies `exportable: false`."
536
+ },
537
+ "hardwareBacked": {
538
+ "type": "boolean",
539
+ "description": "True when the private half is held by a hardware or enclave module that performs the operation without releasing it. Absent means the VTA does not say, not that it is false."
540
+ },
541
+ "inBackups": {
542
+ "type": "boolean",
543
+ "description": "Whether the key, or material it can be re-derived from, is included in the VTA's backups or any state transfer. Always `false` for `attestation` and `update` keys (VTI-KEY-112): they are generated, not derived, so there is no seed that recovers them, and their loss is recovered by rotation, never by restore."
544
+ },
545
+ "destroyed": {
546
+ "type": "boolean",
547
+ "description": "True once the private half has been destroyed — a retired `attestation` key (VTI-KEY-125). The record survives so the key's past signatures stay attributable."
548
+ }
549
+ }
550
+ },
551
+ "KeyOrigin": {
552
+ "title": "KeyOrigin",
553
+ "type": "string",
554
+ "enum": [
555
+ "derived",
556
+ "imported",
557
+ "internal"
558
+ ],
559
+ "description": "Where the private key came from. `derived` means the maintainer generated it from a seed it holds and can reproduce it from `derivationPath`; `imported` means it arrived from outside and exists only as stored material; `internal` means the maintainer generated it from a CSPRNG and it is reproducible from nothing at all. The distinction is operationally load-bearing: a `derived` key survives a seed restore, an `imported` one is lost unless it was backed up separately, and an `internal` one cannot be recovered by any means once the maintainer's storage is gone. This member is also the only way a consumer can confirm that a `keys/create` request for an `internal` key was honoured rather than silently downgraded to a derived one — see that specification's `internal` member.",
560
+ "default": "derived"
561
+ },
562
+ "RoleKeyState": {
563
+ "title": "RoleKeyState",
564
+ "type": "string",
565
+ "enum": [
566
+ "pending",
567
+ "staged",
568
+ "active",
569
+ "retiring",
570
+ "retired",
571
+ "revoked"
572
+ ],
573
+ "description": "Where a key is in its role's lifecycle. `pending` — planned by a preview or a change awaiting approval; not published; custody projection only. `staged` — published and bound to its role, but not yet used: a planned rotation publishes the successor and waits until the entry's cache horizon — publication plus the longer of the document's TTL and the verifier cache cap (CONVENTIONS.md §11.1) — before the VTA first uses it, so that no verifier holding a cached document sees a signature by a key it has never seen (VTI-KEY-122). Becomes `active` at the rotation's `activatesAt`. `active` — the key the VTA uses for new signatures (or, for `messaging`, advertises for new sessions). `retiring` — still published so that what it signed and sessions keyed to it keep working, but never used again: from the successor's first use the VTA MUST NOT sign with it, while a retiring `messaging` key stays usable for decryption, and senders may still encrypt to it, until it is retired (CONVENTIONS.md §11.3). `retired` — removed by planned rotation; what it signed while published remains valid, judged against the DID version current at issuance (CONVENTIONS.md §7). A retired `attestation` or `messaging` key is destroyed at retirement. `revoked` — removed from every relationship and from `keyRoles` in one entry, without overlap, because it is or may be compromised; what it signed from `compromisedSince` onward establishes nothing. `retired` and `revoked` are terminal."
574
+ },
575
+ "DidVerificationRelationship": {
576
+ "title": "DidVerificationRelationship",
577
+ "type": "string",
578
+ "enum": [
579
+ "authentication",
580
+ "assertionMethod",
581
+ "keyAgreement",
582
+ "capabilityInvocation",
583
+ "capabilityDelegation"
584
+ ],
585
+ "description": "A DID Core verification relationship."
586
+ },
587
+ "KeyType": {
588
+ "title": "KeyType",
589
+ "type": "string",
590
+ "enum": [
591
+ "ed25519",
592
+ "x25519",
593
+ "p256",
594
+ "mldsa44",
595
+ "mldsa65"
596
+ ],
597
+ "description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
598
+ },
599
+ "DidDocumentPreview": {
600
+ "title": "DidDocumentPreview",
601
+ "type": "object",
602
+ "additionalProperties": false,
603
+ "required": [
604
+ "previewId",
605
+ "baseVersionId",
606
+ "expiresAt",
607
+ "changes",
608
+ "document",
609
+ "updateKeyRotates"
610
+ ],
611
+ "description": "What a change would publish, computed by the VTA by running the handler it would run to apply it, and nothing else (CONVENTIONS.md §3.1). This is what a consent surface renders and what an approval is bound to.",
612
+ "properties": {
613
+ "previewId": {
614
+ "type": "string",
615
+ "minLength": 16,
616
+ "description": "Opaque, unguessable identifier for this exact plan. Carried back by the apply request, and the thing every approval is bound to."
617
+ },
618
+ "baseVersionId": {
619
+ "type": "string",
620
+ "description": "versionId of the log entry the plan was computed against. The plan is void once the log moves past it."
621
+ },
622
+ "expiresAt": {
623
+ "type": "string",
624
+ "format": "date-time"
625
+ },
626
+ "changes": {
627
+ "type": "array",
628
+ "items": {
629
+ "$ref": "#/$defs/DidDocumentChange"
630
+ },
631
+ "description": "Every change the entry would make, including the ones the caller did not ask for — in particular `rotateUpdateKey`, which accompanies every entry appended under pre-rotation."
632
+ },
633
+ "document": {
634
+ "type": "object",
635
+ "description": "The complete DID document the entry would publish. Public data by construction; no key material beyond public halves."
636
+ },
637
+ "warnings": {
638
+ "type": "array",
639
+ "items": {
640
+ "type": "string",
641
+ "enum": [
642
+ "preRotationDisabled",
643
+ "singleKeyRole",
644
+ "algorithmNotInAcceptedSet",
645
+ "roleWillHaveNoClassicalKey",
646
+ "attestationReissuanceRequired",
647
+ "serverless"
648
+ ]
649
+ },
650
+ "uniqueItems": true,
651
+ "description": "Conditions a human should be shown before approving. `preRotationDisabled` — the entry leaves no committed successor, so a later update-key compromise can only end in deactivation. `singleKeyRole` — the role will hold one active key, so its next compromise empties it until replaced. `algorithmNotInAcceptedSet` — a verifier population the VTA knows of does not accept the new key's algorithm. `roleWillHaveNoClassicalKey` — every remaining key is post-quantum, which verifiers without post-quantum support cannot check. `attestationReissuanceRequired` — revoking this `attestation` key obliges the node to re-issue every attestation artefact still in force and re-sign every status list (VTI-KEY-133). `serverless` — the VTA will not publish the entry; the operator must."
652
+ },
653
+ "updateKeyRotates": {
654
+ "type": "boolean",
655
+ "description": "True when appending this entry also moves the DID's update key to a committed successor. Stated as its own member, not left to be found in `changes`, because it is the consequence a reviewer most often misses."
656
+ }
657
+ }
658
+ },
659
+ "DidDocumentChange": {
660
+ "title": "DidDocumentChange",
661
+ "type": "object",
662
+ "additionalProperties": false,
663
+ "required": [
664
+ "op",
665
+ "role"
666
+ ],
667
+ "properties": {
668
+ "op": {
669
+ "type": "string",
670
+ "enum": [
671
+ "addKey",
672
+ "retireKey",
673
+ "revokeKey",
674
+ "rotateUpdateKey",
675
+ "setPreRotation"
676
+ ],
677
+ "description": "`addKey` — a verification method is added, listed in its role's relationship and in `keyRoles`. `retireKey` — a verification method leaves its relationship, `keyRoles` and the document. `revokeKey` — a verification method leaves its relationship and `keyRoles`, and the compromise is recorded (CONVENTIONS.md §7). `rotateUpdateKey` — the log's update key moves to a committed successor. `setPreRotation` — the number of successors committed changes."
678
+ },
679
+ "role": {
680
+ "$ref": "#/$defs/KeyRole"
681
+ },
682
+ "verificationMethod": {
683
+ "type": "string"
684
+ },
685
+ "keyType": {
686
+ "$ref": "#/$defs/KeyType"
687
+ },
688
+ "publicKeyMultibase": {
689
+ "type": "string"
690
+ },
691
+ "relationships": {
692
+ "type": "array",
693
+ "items": {
694
+ "$ref": "#/$defs/DidVerificationRelationship"
695
+ },
696
+ "uniqueItems": true
697
+ },
698
+ "preRotationCount": {
699
+ "type": "integer",
700
+ "minimum": 0
701
+ }
702
+ }
703
+ },
704
+ "KeyRoleChangeOutcome": {
705
+ "title": "KeyRoleChangeOutcome",
706
+ "type": "string",
707
+ "enum": [
708
+ "preview",
709
+ "applied",
710
+ "pendingApproval"
711
+ ],
712
+ "description": "`preview` — nothing was written; the response carries the plan. `applied` — the entry was appended (and published, unless `serverless`). `pendingApproval` — the plan is recorded and awaits further approvals; nothing is published until they arrive (CONVENTIONS.md §3.3)."
713
+ }
714
+ }
715
+ } as const;
716
+
717
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
718
+ export const RESPONSE_PAYLOAD_SCHEMA = {
719
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
720
+ "$ref": "#/$defs/Response",
721
+ "$defs": {
722
+ "Response": {
723
+ "$anchor": "response",
724
+ "title": "VTA WebVH DIDs Keys Revoke — response payload",
725
+ "description": "Success response. Type https://trusttasks.org/spec/vta/webvh/dids/keys/revoke/1.0#response. A refusal is a `trust-task-error` document, never this.",
726
+ "type": "object",
727
+ "additionalProperties": false,
728
+ "required": [
729
+ "did",
730
+ "outcome",
731
+ "keys"
732
+ ],
733
+ "properties": {
734
+ "did": {
735
+ "type": "string"
736
+ },
737
+ "outcome": {
738
+ "$ref": "#/$defs/KeyRoleChangeOutcome"
739
+ },
740
+ "preview": {
741
+ "$ref": "#/$defs/DidDocumentPreview",
742
+ "description": "Present when `outcome` is `preview` or `pendingApproval`: the plan, and what an approval is bound to."
743
+ },
744
+ "newVersionId": {
745
+ "type": "string",
746
+ "description": "Present when `outcome` is `applied`: the versionId of the appended entry. Pass it as the next change's `expectedVersionId`."
747
+ },
748
+ "keys": {
749
+ "type": "array",
750
+ "items": {
751
+ "$ref": "#/$defs/RoleKey"
752
+ },
753
+ "description": "Every key whose state this change sets or would set, after the change."
754
+ },
755
+ "rotation": {
756
+ "$ref": "#/$defs/RotationRecord"
757
+ },
758
+ "approvals": {
759
+ "$ref": "#/$defs/KeyRoleApprovalState",
760
+ "description": "Present when `outcome` is `pendingApproval`."
761
+ },
762
+ "serverless": {
763
+ "type": "boolean",
764
+ "description": "True when no hosting server holds this DID. The caller must publish `newLogEntry` itself; until it does, resolvers still see the previous version."
765
+ },
766
+ "newLogEntry": {
767
+ "type": "string",
768
+ "description": "The appended entry as JSON text. Present when `serverless` is true."
769
+ },
770
+ "ext": {
771
+ "$ref": "#/$defs/Ext"
772
+ },
773
+ "followUp": {
774
+ "type": "object",
775
+ "additionalProperties": false,
776
+ "description": "What the node must now do that this entry cannot (VTI-KEY-133). Custody data, present for an `attestation` revocation.",
777
+ "properties": {
778
+ "statusListsToResign": {
779
+ "type": "integer",
780
+ "minimum": 0,
781
+ "description": "Status lists signed by the revoked key, which the node MUST re-sign at once under a sound attestation key."
782
+ },
783
+ "artefactsToReissue": {
784
+ "type": "integer",
785
+ "minimum": 0,
786
+ "description": "Attestation artefacts still in force that the VTA's signing record shows the revoked key signed, which the node MUST re-issue."
787
+ }
788
+ }
789
+ }
790
+ }
791
+ },
792
+ "Ext": {
793
+ "title": "Ext",
794
+ "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.",
795
+ "type": "object",
796
+ "minProperties": 1,
797
+ "additionalProperties": true,
798
+ "propertyNames": {
799
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
800
+ }
801
+ },
802
+ "KeyRoleApprovalState": {
803
+ "title": "KeyRoleApprovalState",
804
+ "type": "object",
805
+ "additionalProperties": false,
806
+ "required": [
807
+ "required",
808
+ "received",
809
+ "expiresAt"
810
+ ],
811
+ "description": "Approval progress of a change the VTA's policy gates on more than one approval (CONVENTIONS.md §3.3).",
812
+ "properties": {
813
+ "required": {
814
+ "type": "integer",
815
+ "minimum": 1,
816
+ "description": "Distinct approvals the VTA's policy requires."
817
+ },
818
+ "received": {
819
+ "type": "integer",
820
+ "minimum": 0,
821
+ "description": "Distinct approvals recorded so far, including the initiator's own."
822
+ },
823
+ "approvers": {
824
+ "type": "array",
825
+ "items": {
826
+ "type": "string"
827
+ },
828
+ "uniqueItems": true,
829
+ "description": "VIDs whose approvals were recorded. Custody projection only; omitted from a response to anyone who is not themselves an eligible approver of this change."
830
+ },
831
+ "expiresAt": {
832
+ "type": "string",
833
+ "format": "date-time",
834
+ "description": "When the preview, and every approval bound to it, stops being usable."
835
+ }
836
+ }
837
+ },
838
+ "RotationRecord": {
839
+ "title": "RotationRecord",
840
+ "type": "object",
841
+ "additionalProperties": false,
842
+ "required": [
843
+ "rotationId",
844
+ "role",
845
+ "kind",
846
+ "state"
847
+ ],
848
+ "description": "One change to a role's key set, from preview to completion. The rotation history of a DID is the list of these; the log is the authority for what was published, and this record adds what the log cannot say — which change was which, and (custody projection only) who asked, who approved, and why.",
849
+ "properties": {
850
+ "rotationId": {
851
+ "type": "string",
852
+ "minLength": 1
853
+ },
854
+ "role": {
855
+ "$ref": "#/$defs/KeyRole"
856
+ },
857
+ "kind": {
858
+ "$ref": "#/$defs/RotationKind"
859
+ },
860
+ "state": {
861
+ "$ref": "#/$defs/RotationState"
862
+ },
863
+ "predecessors": {
864
+ "type": "array",
865
+ "items": {
866
+ "type": "string"
867
+ },
868
+ "description": "Verification-method identifiers (or, for `update`, public keys) leaving the role."
869
+ },
870
+ "successors": {
871
+ "type": "array",
872
+ "items": {
873
+ "type": "string"
874
+ },
875
+ "description": "Verification-method identifiers (or, for `update`, public keys) entering the role."
876
+ },
877
+ "startedInVersionId": {
878
+ "type": "string"
879
+ },
880
+ "endedInVersionId": {
881
+ "type": "string"
882
+ },
883
+ "startedAt": {
884
+ "type": "string",
885
+ "format": "date-time"
886
+ },
887
+ "overlapUntil": {
888
+ "type": "string",
889
+ "format": "date-time",
890
+ "description": "Custody projection only. End of the overlap window."
891
+ },
892
+ "autoRetire": {
893
+ "type": "boolean",
894
+ "description": "Custody projection only. Whether the VTA retires the predecessor itself at `overlapUntil`."
895
+ },
896
+ "endedAt": {
897
+ "type": "string",
898
+ "format": "date-time"
899
+ },
900
+ "initiatedBy": {
901
+ "type": "string",
902
+ "description": "Custody projection only. VID of the administrator whose signed request started the change."
903
+ },
904
+ "approvals": {
905
+ "$ref": "#/$defs/KeyRoleApprovalState",
906
+ "description": "Custody projection only."
907
+ },
908
+ "reason": {
909
+ "type": "string",
910
+ "maxLength": 1024,
911
+ "description": "Custody projection only. The operator's stated reason. Never published."
912
+ },
913
+ "ext": {
914
+ "$ref": "#/$defs/Ext"
915
+ },
916
+ "activatesAt": {
917
+ "type": "string",
918
+ "format": "date-time",
919
+ "description": "When the successor becomes `active` and the predecessor `retiring`; never before `cacheHorizonAt`."
920
+ },
921
+ "cacheHorizonAt": {
922
+ "type": "string",
923
+ "format": "date-time",
924
+ "description": "Planned rotations: the publishing entry's cache horizon — publication plus the longer of the document's TTL and the verifier cache cap (CONVENTIONS.md §11.1). The switch, and any retirement of the predecessor, happen no earlier. Public: it follows from the log and the published cap."
925
+ }
926
+ }
927
+ },
928
+ "RotationState": {
929
+ "title": "RotationState",
930
+ "type": "string",
931
+ "enum": [
932
+ "pendingApproval",
933
+ "staged",
934
+ "overlapping",
935
+ "completed",
936
+ "aborted",
937
+ "expired"
938
+ ],
939
+ "description": "`pendingApproval` — awaiting the approvals the VTA's policy requires; nothing is published. `staged` — successor published, not yet used; predecessor still active. `overlapping` — successor active, predecessor `retiring`. `completed` — every predecessor retired (or, for `compromise` and `addition`, the entry is published and any overlap it began has ended). `aborted` — the successor was retired instead of the predecessor, which stayed or returned to `active`. `expired` — approvals were not gathered before the preview expired; nothing was published."
940
+ },
941
+ "RotationKind": {
942
+ "title": "RotationKind",
943
+ "type": "string",
944
+ "enum": [
945
+ "planned",
946
+ "compromise",
947
+ "addition"
948
+ ],
949
+ "description": "`planned` — a successor was staged, activated, and the predecessor retired on the operator's schedule. `compromise` — a key was revoked and, where the role would otherwise be empty, replaced in the same log entry. `addition` — a key was added to a role without anything leaving it (for example a post-quantum key alongside a classical one)."
950
+ },
951
+ "KeyRole": {
952
+ "title": "KeyRole",
953
+ "type": "string",
954
+ "enum": [
955
+ "attestation",
956
+ "operational",
957
+ "messaging",
958
+ "update"
959
+ ],
960
+ "description": "The named key role a key occupies in the DID (VTI-KEY-070 onward). `attestation` — the only keys in `assertionMethod`; sign the DID's attestation artefacts (membership and role credentials, endorsements, status lists, every other credential the node issues), through the VTA's signing service and nowhere else. Generated inside the VTA, never derived, never exportable, never in a backup. `operational` — the only keys in `authentication`; sign the node's own traffic (Trust Task requests and responses, DIDComm and TSP message signatures, invitations, notices, audit checkpoints) with proof purpose `authentication`. `messaging` — the only keys in `keyAgreement`; sign nothing. `update` — the keys that authorize appending to the DID's log (a did:webvh `updateKeys` entry) and the pre-rotation commitments that authorize the next ones; never a verification method, never in `keyRoles`. Generated inside the VTA, never derived, never exportable, never in a backup. No role permits `capabilityInvocation` or `capabilityDelegation` (VTI-KEY-075); both are reserved for a future role. The mapping is normative and is set out in CONVENTIONS.md §1. The set is an extensible registry and growing it is a MINOR change: a consumer that receives a role it does not implement MUST refuse the document rather than map the key onto a role it does know."
961
+ },
962
+ "RoleKey": {
963
+ "title": "RoleKey",
964
+ "type": "object",
965
+ "additionalProperties": false,
966
+ "required": [
967
+ "role",
968
+ "keyType",
969
+ "publicKeyMultibase",
970
+ "state"
971
+ ],
972
+ "description": "One key in one role. A key is in exactly one role for its whole life; a change of role is a retirement from one and an addition to another, under a new verification-method identifier.",
973
+ "properties": {
974
+ "verificationMethod": {
975
+ "type": "string",
976
+ "minLength": 1,
977
+ "description": "The full verification-method identifier (`did#fragment`) the document publishes the key under, and lists in `keyRoles`. Absent only for `update` keys, which are published as log parameters and never as verification methods (VTI-KEY-093). A VTA minting a new method SHOULD derive its fragment from the key (VTI-KEY-150)."
978
+ },
979
+ "role": {
980
+ "$ref": "#/$defs/KeyRole"
981
+ },
982
+ "relationships": {
983
+ "type": "array",
984
+ "items": {
985
+ "$ref": "#/$defs/DidVerificationRelationship"
986
+ },
987
+ "uniqueItems": true,
988
+ "description": "The relationships the key is (or, while `pending`, will be) listed in. Always exactly its role's single relationship (CONVENTIONS.md §1) — carried so a caller can check it against the document rather than trusting it. Empty for `update`, `retired` and `revoked` keys."
989
+ },
990
+ "keyType": {
991
+ "$ref": "#/$defs/KeyType"
992
+ },
993
+ "publicKeyMultibase": {
994
+ "type": "string",
995
+ "minLength": 1,
996
+ "description": "The public half, multibase-encoded, exactly as published."
997
+ },
998
+ "state": {
999
+ "$ref": "#/$defs/RoleKeyState"
1000
+ },
1001
+ "publishedInVersionId": {
1002
+ "type": "string",
1003
+ "description": "versionId of the log entry that first published the key. Absent while `pending`."
1004
+ },
1005
+ "removedInVersionId": {
1006
+ "type": "string",
1007
+ "description": "versionId of the log entry that retired or revoked the key."
1008
+ },
1009
+ "retireAfter": {
1010
+ "type": "string",
1011
+ "format": "date-time",
1012
+ "description": "For a `retiring` key: the end of its overlap window. Custody projection only."
1013
+ },
1014
+ "compromisedSince": {
1015
+ "type": "string",
1016
+ "format": "date-time",
1017
+ "description": "For a `revoked` key: the compromise time (VTI-KEY-121) — the earliest instant from which the key is treated as compromised. Where the operator cannot establish it, the time the key was first published. Published, because it is what a verifier needs."
1018
+ },
1019
+ "rotationId": {
1020
+ "type": "string",
1021
+ "description": "The rotation this key was introduced or retired by, when it was."
1022
+ },
1023
+ "label": {
1024
+ "type": "string",
1025
+ "maxLength": 256,
1026
+ "description": "Operator-facing label. Custody projection only."
1027
+ },
1028
+ "custody": {
1029
+ "$ref": "#/$defs/RoleKeyCustody"
1030
+ },
1031
+ "ext": {
1032
+ "$ref": "#/$defs/Ext"
1033
+ },
1034
+ "activatesAt": {
1035
+ "type": "string",
1036
+ "format": "date-time",
1037
+ "description": "For a `staged` key: when the VTA will begin using it — no earlier than the publishing entry's cache horizon (CONVENTIONS.md §11.1)."
1038
+ }
1039
+ }
1040
+ },
1041
+ "RoleKeyCustody": {
1042
+ "title": "RoleKeyCustody",
1043
+ "type": "object",
1044
+ "additionalProperties": false,
1045
+ "required": [
1046
+ "keyId",
1047
+ "exportable",
1048
+ "neverExportable",
1049
+ "inBackups"
1050
+ ],
1051
+ "description": "How the VTA holds a key. Present only in the custody projection. Carries no key material, and a conforming VTA MUST NOT place any in `ext`.",
1052
+ "properties": {
1053
+ "keyId": {
1054
+ "type": "string",
1055
+ "minLength": 1,
1056
+ "description": "The custodian record identifier (`keys/*`'s `keyId`) behind this key."
1057
+ },
1058
+ "origin": {
1059
+ "$ref": "#/$defs/KeyOrigin"
1060
+ },
1061
+ "exportable": {
1062
+ "type": "boolean",
1063
+ "description": "Whether the custodian would release the private half through `keys/export-secret`. Always `false` for `attestation` and `update` keys (CONVENTIONS.md §4). Stated explicitly — never absent — because this is the member an operator reads to confirm a role key cannot leave the VTA, and `keys/*`'s absent-means-exportable reading is the wrong default to leave them to infer."
1064
+ },
1065
+ "neverExportable": {
1066
+ "type": "boolean",
1067
+ "description": "True when no authority can make the key exportable — the role forbids it, or the material exists only inside a module that cannot release it. `true` implies `exportable: false`."
1068
+ },
1069
+ "hardwareBacked": {
1070
+ "type": "boolean",
1071
+ "description": "True when the private half is held by a hardware or enclave module that performs the operation without releasing it. Absent means the VTA does not say, not that it is false."
1072
+ },
1073
+ "inBackups": {
1074
+ "type": "boolean",
1075
+ "description": "Whether the key, or material it can be re-derived from, is included in the VTA's backups or any state transfer. Always `false` for `attestation` and `update` keys (VTI-KEY-112): they are generated, not derived, so there is no seed that recovers them, and their loss is recovered by rotation, never by restore."
1076
+ },
1077
+ "destroyed": {
1078
+ "type": "boolean",
1079
+ "description": "True once the private half has been destroyed — a retired `attestation` key (VTI-KEY-125). The record survives so the key's past signatures stay attributable."
1080
+ }
1081
+ }
1082
+ },
1083
+ "KeyOrigin": {
1084
+ "title": "KeyOrigin",
1085
+ "type": "string",
1086
+ "enum": [
1087
+ "derived",
1088
+ "imported",
1089
+ "internal"
1090
+ ],
1091
+ "description": "Where the private key came from. `derived` means the maintainer generated it from a seed it holds and can reproduce it from `derivationPath`; `imported` means it arrived from outside and exists only as stored material; `internal` means the maintainer generated it from a CSPRNG and it is reproducible from nothing at all. The distinction is operationally load-bearing: a `derived` key survives a seed restore, an `imported` one is lost unless it was backed up separately, and an `internal` one cannot be recovered by any means once the maintainer's storage is gone. This member is also the only way a consumer can confirm that a `keys/create` request for an `internal` key was honoured rather than silently downgraded to a derived one — see that specification's `internal` member.",
1092
+ "default": "derived"
1093
+ },
1094
+ "RoleKeyState": {
1095
+ "title": "RoleKeyState",
1096
+ "type": "string",
1097
+ "enum": [
1098
+ "pending",
1099
+ "staged",
1100
+ "active",
1101
+ "retiring",
1102
+ "retired",
1103
+ "revoked"
1104
+ ],
1105
+ "description": "Where a key is in its role's lifecycle. `pending` — planned by a preview or a change awaiting approval; not published; custody projection only. `staged` — published and bound to its role, but not yet used: a planned rotation publishes the successor and waits until the entry's cache horizon — publication plus the longer of the document's TTL and the verifier cache cap (CONVENTIONS.md §11.1) — before the VTA first uses it, so that no verifier holding a cached document sees a signature by a key it has never seen (VTI-KEY-122). Becomes `active` at the rotation's `activatesAt`. `active` — the key the VTA uses for new signatures (or, for `messaging`, advertises for new sessions). `retiring` — still published so that what it signed and sessions keyed to it keep working, but never used again: from the successor's first use the VTA MUST NOT sign with it, while a retiring `messaging` key stays usable for decryption, and senders may still encrypt to it, until it is retired (CONVENTIONS.md §11.3). `retired` — removed by planned rotation; what it signed while published remains valid, judged against the DID version current at issuance (CONVENTIONS.md §7). A retired `attestation` or `messaging` key is destroyed at retirement. `revoked` — removed from every relationship and from `keyRoles` in one entry, without overlap, because it is or may be compromised; what it signed from `compromisedSince` onward establishes nothing. `retired` and `revoked` are terminal."
1106
+ },
1107
+ "DidVerificationRelationship": {
1108
+ "title": "DidVerificationRelationship",
1109
+ "type": "string",
1110
+ "enum": [
1111
+ "authentication",
1112
+ "assertionMethod",
1113
+ "keyAgreement",
1114
+ "capabilityInvocation",
1115
+ "capabilityDelegation"
1116
+ ],
1117
+ "description": "A DID Core verification relationship."
1118
+ },
1119
+ "KeyType": {
1120
+ "title": "KeyType",
1121
+ "type": "string",
1122
+ "enum": [
1123
+ "ed25519",
1124
+ "x25519",
1125
+ "p256",
1126
+ "mldsa44",
1127
+ "mldsa65"
1128
+ ],
1129
+ "description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
1130
+ },
1131
+ "DidDocumentPreview": {
1132
+ "title": "DidDocumentPreview",
1133
+ "type": "object",
1134
+ "additionalProperties": false,
1135
+ "required": [
1136
+ "previewId",
1137
+ "baseVersionId",
1138
+ "expiresAt",
1139
+ "changes",
1140
+ "document",
1141
+ "updateKeyRotates"
1142
+ ],
1143
+ "description": "What a change would publish, computed by the VTA by running the handler it would run to apply it, and nothing else (CONVENTIONS.md §3.1). This is what a consent surface renders and what an approval is bound to.",
1144
+ "properties": {
1145
+ "previewId": {
1146
+ "type": "string",
1147
+ "minLength": 16,
1148
+ "description": "Opaque, unguessable identifier for this exact plan. Carried back by the apply request, and the thing every approval is bound to."
1149
+ },
1150
+ "baseVersionId": {
1151
+ "type": "string",
1152
+ "description": "versionId of the log entry the plan was computed against. The plan is void once the log moves past it."
1153
+ },
1154
+ "expiresAt": {
1155
+ "type": "string",
1156
+ "format": "date-time"
1157
+ },
1158
+ "changes": {
1159
+ "type": "array",
1160
+ "items": {
1161
+ "$ref": "#/$defs/DidDocumentChange"
1162
+ },
1163
+ "description": "Every change the entry would make, including the ones the caller did not ask for — in particular `rotateUpdateKey`, which accompanies every entry appended under pre-rotation."
1164
+ },
1165
+ "document": {
1166
+ "type": "object",
1167
+ "description": "The complete DID document the entry would publish. Public data by construction; no key material beyond public halves."
1168
+ },
1169
+ "warnings": {
1170
+ "type": "array",
1171
+ "items": {
1172
+ "type": "string",
1173
+ "enum": [
1174
+ "preRotationDisabled",
1175
+ "singleKeyRole",
1176
+ "algorithmNotInAcceptedSet",
1177
+ "roleWillHaveNoClassicalKey",
1178
+ "attestationReissuanceRequired",
1179
+ "serverless"
1180
+ ]
1181
+ },
1182
+ "uniqueItems": true,
1183
+ "description": "Conditions a human should be shown before approving. `preRotationDisabled` — the entry leaves no committed successor, so a later update-key compromise can only end in deactivation. `singleKeyRole` — the role will hold one active key, so its next compromise empties it until replaced. `algorithmNotInAcceptedSet` — a verifier population the VTA knows of does not accept the new key's algorithm. `roleWillHaveNoClassicalKey` — every remaining key is post-quantum, which verifiers without post-quantum support cannot check. `attestationReissuanceRequired` — revoking this `attestation` key obliges the node to re-issue every attestation artefact still in force and re-sign every status list (VTI-KEY-133). `serverless` — the VTA will not publish the entry; the operator must."
1184
+ },
1185
+ "updateKeyRotates": {
1186
+ "type": "boolean",
1187
+ "description": "True when appending this entry also moves the DID's update key to a committed successor. Stated as its own member, not left to be found in `changes`, because it is the consequence a reviewer most often misses."
1188
+ }
1189
+ }
1190
+ },
1191
+ "DidDocumentChange": {
1192
+ "title": "DidDocumentChange",
1193
+ "type": "object",
1194
+ "additionalProperties": false,
1195
+ "required": [
1196
+ "op",
1197
+ "role"
1198
+ ],
1199
+ "properties": {
1200
+ "op": {
1201
+ "type": "string",
1202
+ "enum": [
1203
+ "addKey",
1204
+ "retireKey",
1205
+ "revokeKey",
1206
+ "rotateUpdateKey",
1207
+ "setPreRotation"
1208
+ ],
1209
+ "description": "`addKey` — a verification method is added, listed in its role's relationship and in `keyRoles`. `retireKey` — a verification method leaves its relationship, `keyRoles` and the document. `revokeKey` — a verification method leaves its relationship and `keyRoles`, and the compromise is recorded (CONVENTIONS.md §7). `rotateUpdateKey` — the log's update key moves to a committed successor. `setPreRotation` — the number of successors committed changes."
1210
+ },
1211
+ "role": {
1212
+ "$ref": "#/$defs/KeyRole"
1213
+ },
1214
+ "verificationMethod": {
1215
+ "type": "string"
1216
+ },
1217
+ "keyType": {
1218
+ "$ref": "#/$defs/KeyType"
1219
+ },
1220
+ "publicKeyMultibase": {
1221
+ "type": "string"
1222
+ },
1223
+ "relationships": {
1224
+ "type": "array",
1225
+ "items": {
1226
+ "$ref": "#/$defs/DidVerificationRelationship"
1227
+ },
1228
+ "uniqueItems": true
1229
+ },
1230
+ "preRotationCount": {
1231
+ "type": "integer",
1232
+ "minimum": 0
1233
+ }
1234
+ }
1235
+ },
1236
+ "KeyRoleChangeOutcome": {
1237
+ "title": "KeyRoleChangeOutcome",
1238
+ "type": "string",
1239
+ "enum": [
1240
+ "preview",
1241
+ "applied",
1242
+ "pendingApproval"
1243
+ ],
1244
+ "description": "`preview` — nothing was written; the response carries the plan. `applied` — the entry was appended (and published, unless `serverless`). `pendingApproval` — the plan is recorded and awaits further approvals; nothing is published until they arrive (CONVENTIONS.md §3.3)."
1245
+ }
1246
+ }
1247
+ } as const;
1248
+
1249
+ /**
1250
+ * SPEC.md §7.2 policy for the request variant, from this specification's
1251
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
1252
+ * per-specification and cannot be derived from the document alone, and
1253
+ * item 2 needs the schema this carries.
1254
+ */
1255
+ export const SPEC = {
1256
+ typeUri: TYPE_URI,
1257
+ isBearer: false,
1258
+ isProofRequired: true,
1259
+ isRecipientRequired: true,
1260
+ isIssuedAtRequired: true,
1261
+ payloadSchema: PAYLOAD_SCHEMA,
1262
+ } as const;
1263
+
1264
+ /**
1265
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
1266
+ * tracks the *issuer* party's requirement because a response swaps the
1267
+ * parties (§7.3 item 5).
1268
+ */
1269
+ export const RESPONSE_SPEC = {
1270
+ typeUri: RESPONSE_TYPE_URI,
1271
+ isBearer: false,
1272
+ isProofRequired: true,
1273
+ isRecipientRequired: true,
1274
+ isIssuedAtRequired: true,
1275
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
1276
+ } as const;