@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,361 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/dids/list/1.0/payload.schema.json
4
+ */
5
+
6
+ export interface VTAWebVHDIDsListPayload {
7
+ /**
8
+ * Only DIDs in this context.
9
+ */
10
+ contextId?: string;
11
+ /**
12
+ * Only DIDs published through this hosting server.
13
+ */
14
+ serverId?: string;
15
+ ext?: Ext;
16
+ }
17
+ /**
18
+ * 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.
19
+ */
20
+ export interface Ext {
21
+ [k: string]: unknown | undefined;
22
+ }
23
+ /**
24
+ * Success response to vta/webvh/dids/list. Type https://trusttasks.org/spec/vta/webvh/dids/list/1.0#response.
25
+ */
26
+ export interface VTAWebVHDIDsListResponsePayload {
27
+ /**
28
+ * Matching DIDs the caller may see. An empty array is a successful answer and does not imply the VTA holds none.
29
+ */
30
+ dids: WebvhDidRecord[];
31
+ ext?: Ext;
32
+ }
33
+ /**
34
+ * A did:webvh DID as the VTA holds it. The DID document itself is not here — it lives in the log, which `vta/webvh/dids/get` returns on request.
35
+ */
36
+ export interface WebvhDidRecord {
37
+ /**
38
+ * The DID, e.g. `did:webvh:<scid>:example.com:alice`.
39
+ */
40
+ did: string;
41
+ /**
42
+ * Id of the hosting server serving this DID's log. Empty for a serverless DID, whose location comes from the URL it was created with.
43
+ */
44
+ serverId: string;
45
+ /**
46
+ * The hosting server's handle for the record. Unrelated to a BIP-39 phrase; the collision of terms is historical.
47
+ */
48
+ mnemonic: string;
49
+ /**
50
+ * Self-certifying identifier: the hash committing to the log's first entry. It is what makes the DID's history tamper-evident, and it changes only when the log is re-created — never in place.
51
+ */
52
+ scid: string;
53
+ /**
54
+ * Context this DID belongs to. Deleting that context destroys this DID.
55
+ */
56
+ contextId: string;
57
+ /**
58
+ * Whether the DID may be moved to another domain without losing its identity. Fixed at creation: a DID created non-portable cannot be made portable later, because portability is a commitment recorded in the log's first entry.
59
+ */
60
+ portable: boolean;
61
+ /**
62
+ * Number of entries in the log.
63
+ */
64
+ logEntryCount: number;
65
+ /**
66
+ * Pre-rotation keys committed by the most recent entry. `0` means pre-rotation is disabled — a compromise of the current key is then unrecoverable by rotation, because the successor was never committed in advance.
67
+ */
68
+ preRotationCount?: number;
69
+ /**
70
+ * Next `#key-{n}` fragment id to mint. Monotonic and never decremented, so a fragment is never reused for a different key.
71
+ */
72
+ nextFragmentId?: number;
73
+ createdAt: string;
74
+ updatedAt: string;
75
+ ext?: Ext;
76
+ }
77
+
78
+ /** Trust Task type URI. */
79
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/list/1.0" as const;
80
+
81
+ /** Stable alias for this specification's request payload shape. */
82
+ export type Payload = VTAWebVHDIDsListPayload;
83
+
84
+ /** Trust Task response type URI (request type URI + "#response"). */
85
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/list/1.0#response" as const;
86
+
87
+ /** Stable alias for this specification's success-response payload shape. */
88
+ export type Response = VTAWebVHDIDsListResponsePayload;
89
+
90
+ /**
91
+ * This specification's payload schema, as a value.
92
+ *
93
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
94
+ * rather than only as a `.json` file because TypeScript types are erased
95
+ * at runtime: without a schema a consumer has nothing to validate, and
96
+ * every REQUIRED payload member is optional in practice. Cross-file
97
+ * `$ref`s are already inlined, so it needs no resolver.
98
+ */
99
+ export const PAYLOAD_SCHEMA = {
100
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
101
+ "$id": "https://trusttasks.org/spec/vta/webvh/dids/list/1.0",
102
+ "title": "VTA WebVH DIDs List — payload",
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "properties": {
106
+ "contextId": {
107
+ "type": "string",
108
+ "description": "Only DIDs in this context."
109
+ },
110
+ "serverId": {
111
+ "type": "string",
112
+ "description": "Only DIDs published through this hosting server."
113
+ },
114
+ "ext": {
115
+ "$ref": "#/$defs/Ext"
116
+ }
117
+ },
118
+ "$defs": {
119
+ "Response": {
120
+ "$anchor": "response",
121
+ "title": "VTA WebVH DIDs List — response payload",
122
+ "description": "Success response to vta/webvh/dids/list. Type https://trusttasks.org/spec/vta/webvh/dids/list/1.0#response.",
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "dids"
127
+ ],
128
+ "properties": {
129
+ "dids": {
130
+ "type": "array",
131
+ "description": "Matching DIDs the caller may see. An empty array is a successful answer and does not imply the VTA holds none.",
132
+ "items": {
133
+ "$ref": "#/$defs/WebvhDidRecord"
134
+ }
135
+ },
136
+ "ext": {
137
+ "$ref": "#/$defs/Ext"
138
+ }
139
+ }
140
+ },
141
+ "Ext": {
142
+ "title": "Ext",
143
+ "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.",
144
+ "type": "object",
145
+ "minProperties": 1,
146
+ "additionalProperties": true,
147
+ "propertyNames": {
148
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
149
+ }
150
+ },
151
+ "WebvhDidRecord": {
152
+ "title": "WebvhDidRecord",
153
+ "description": "A did:webvh DID as the VTA holds it. The DID document itself is not here — it lives in the log, which `vta/webvh/dids/get` returns on request.",
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": [
157
+ "did",
158
+ "serverId",
159
+ "mnemonic",
160
+ "scid",
161
+ "contextId",
162
+ "portable",
163
+ "logEntryCount",
164
+ "createdAt",
165
+ "updatedAt"
166
+ ],
167
+ "properties": {
168
+ "did": {
169
+ "type": "string",
170
+ "description": "The DID, e.g. `did:webvh:<scid>:example.com:alice`."
171
+ },
172
+ "serverId": {
173
+ "type": "string",
174
+ "description": "Id of the hosting server serving this DID's log. Empty for a serverless DID, whose location comes from the URL it was created with."
175
+ },
176
+ "mnemonic": {
177
+ "type": "string",
178
+ "description": "The hosting server's handle for the record. Unrelated to a BIP-39 phrase; the collision of terms is historical."
179
+ },
180
+ "scid": {
181
+ "type": "string",
182
+ "description": "Self-certifying identifier: the hash committing to the log's first entry. It is what makes the DID's history tamper-evident, and it changes only when the log is re-created — never in place."
183
+ },
184
+ "contextId": {
185
+ "type": "string",
186
+ "description": "Context this DID belongs to. Deleting that context destroys this DID."
187
+ },
188
+ "portable": {
189
+ "type": "boolean",
190
+ "description": "Whether the DID may be moved to another domain without losing its identity. Fixed at creation: a DID created non-portable cannot be made portable later, because portability is a commitment recorded in the log's first entry."
191
+ },
192
+ "logEntryCount": {
193
+ "type": "integer",
194
+ "minimum": 0,
195
+ "description": "Number of entries in the log."
196
+ },
197
+ "preRotationCount": {
198
+ "type": "integer",
199
+ "minimum": 0,
200
+ "default": 0,
201
+ "description": "Pre-rotation keys committed by the most recent entry. `0` means pre-rotation is disabled — a compromise of the current key is then unrecoverable by rotation, because the successor was never committed in advance."
202
+ },
203
+ "nextFragmentId": {
204
+ "type": "integer",
205
+ "minimum": 1,
206
+ "default": 1,
207
+ "description": "Next `#key-{n}` fragment id to mint. Monotonic and never decremented, so a fragment is never reused for a different key."
208
+ },
209
+ "createdAt": {
210
+ "type": "string",
211
+ "format": "date-time"
212
+ },
213
+ "updatedAt": {
214
+ "type": "string",
215
+ "format": "date-time"
216
+ },
217
+ "ext": {
218
+ "$ref": "#/$defs/Ext"
219
+ }
220
+ }
221
+ }
222
+ }
223
+ } as const;
224
+
225
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
226
+ export const RESPONSE_PAYLOAD_SCHEMA = {
227
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
228
+ "$ref": "#/$defs/Response",
229
+ "$defs": {
230
+ "Response": {
231
+ "$anchor": "response",
232
+ "title": "VTA WebVH DIDs List — response payload",
233
+ "description": "Success response to vta/webvh/dids/list. Type https://trusttasks.org/spec/vta/webvh/dids/list/1.0#response.",
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "required": [
237
+ "dids"
238
+ ],
239
+ "properties": {
240
+ "dids": {
241
+ "type": "array",
242
+ "description": "Matching DIDs the caller may see. An empty array is a successful answer and does not imply the VTA holds none.",
243
+ "items": {
244
+ "$ref": "#/$defs/WebvhDidRecord"
245
+ }
246
+ },
247
+ "ext": {
248
+ "$ref": "#/$defs/Ext"
249
+ }
250
+ }
251
+ },
252
+ "Ext": {
253
+ "title": "Ext",
254
+ "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.",
255
+ "type": "object",
256
+ "minProperties": 1,
257
+ "additionalProperties": true,
258
+ "propertyNames": {
259
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
260
+ }
261
+ },
262
+ "WebvhDidRecord": {
263
+ "title": "WebvhDidRecord",
264
+ "description": "A did:webvh DID as the VTA holds it. The DID document itself is not here — it lives in the log, which `vta/webvh/dids/get` returns on request.",
265
+ "type": "object",
266
+ "additionalProperties": false,
267
+ "required": [
268
+ "did",
269
+ "serverId",
270
+ "mnemonic",
271
+ "scid",
272
+ "contextId",
273
+ "portable",
274
+ "logEntryCount",
275
+ "createdAt",
276
+ "updatedAt"
277
+ ],
278
+ "properties": {
279
+ "did": {
280
+ "type": "string",
281
+ "description": "The DID, e.g. `did:webvh:<scid>:example.com:alice`."
282
+ },
283
+ "serverId": {
284
+ "type": "string",
285
+ "description": "Id of the hosting server serving this DID's log. Empty for a serverless DID, whose location comes from the URL it was created with."
286
+ },
287
+ "mnemonic": {
288
+ "type": "string",
289
+ "description": "The hosting server's handle for the record. Unrelated to a BIP-39 phrase; the collision of terms is historical."
290
+ },
291
+ "scid": {
292
+ "type": "string",
293
+ "description": "Self-certifying identifier: the hash committing to the log's first entry. It is what makes the DID's history tamper-evident, and it changes only when the log is re-created — never in place."
294
+ },
295
+ "contextId": {
296
+ "type": "string",
297
+ "description": "Context this DID belongs to. Deleting that context destroys this DID."
298
+ },
299
+ "portable": {
300
+ "type": "boolean",
301
+ "description": "Whether the DID may be moved to another domain without losing its identity. Fixed at creation: a DID created non-portable cannot be made portable later, because portability is a commitment recorded in the log's first entry."
302
+ },
303
+ "logEntryCount": {
304
+ "type": "integer",
305
+ "minimum": 0,
306
+ "description": "Number of entries in the log."
307
+ },
308
+ "preRotationCount": {
309
+ "type": "integer",
310
+ "minimum": 0,
311
+ "default": 0,
312
+ "description": "Pre-rotation keys committed by the most recent entry. `0` means pre-rotation is disabled — a compromise of the current key is then unrecoverable by rotation, because the successor was never committed in advance."
313
+ },
314
+ "nextFragmentId": {
315
+ "type": "integer",
316
+ "minimum": 1,
317
+ "default": 1,
318
+ "description": "Next `#key-{n}` fragment id to mint. Monotonic and never decremented, so a fragment is never reused for a different key."
319
+ },
320
+ "createdAt": {
321
+ "type": "string",
322
+ "format": "date-time"
323
+ },
324
+ "updatedAt": {
325
+ "type": "string",
326
+ "format": "date-time"
327
+ },
328
+ "ext": {
329
+ "$ref": "#/$defs/Ext"
330
+ }
331
+ }
332
+ }
333
+ }
334
+ } as const;
335
+
336
+ /**
337
+ * SPEC.md §7.2 policy for the request variant, from this specification's
338
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
339
+ * per-specification and cannot be derived from the document alone, and
340
+ * item 2 needs the schema this carries.
341
+ */
342
+ export const SPEC = {
343
+ typeUri: TYPE_URI,
344
+ isBearer: false,
345
+ isProofRequired: false,
346
+ isRecipientRequired: true,
347
+ payloadSchema: PAYLOAD_SCHEMA,
348
+ } as const;
349
+
350
+ /**
351
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
352
+ * tracks the *issuer* party's requirement because a response swaps the
353
+ * parties (§7.3 item 5).
354
+ */
355
+ export const RESPONSE_SPEC = {
356
+ typeUri: RESPONSE_TYPE_URI,
357
+ isBearer: false,
358
+ isProofRequired: false,
359
+ isRecipientRequired: true,
360
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
361
+ } as const;
@@ -0,0 +1,212 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/webvh/dids/register-with-server/1.0/payload.schema.json
4
+ */
5
+
6
+ /**
7
+ * Hand an existing DID's log to a hosting server so it is served there.
8
+ */
9
+ export interface VTAWebVHDIDsRegisterWithServerPayload {
10
+ did: string;
11
+ /**
12
+ * Hosting server to register with.
13
+ */
14
+ serverId: string;
15
+ /**
16
+ * Overwrite a registration the server already holds at this location. Default false: the location may be somebody else's identity.
17
+ */
18
+ force?: boolean;
19
+ /**
20
+ * Domain to publish under, when the server serves more than one.
21
+ */
22
+ domain?: string;
23
+ ext?: Ext;
24
+ }
25
+ /**
26
+ * 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.
27
+ */
28
+ export interface Ext {
29
+ [k: string]: unknown | undefined;
30
+ }
31
+ /**
32
+ * Success response to vta/webvh/dids/register-with-server. Type https://trusttasks.org/spec/vta/webvh/dids/register-with-server/1.0#response.
33
+ */
34
+ export interface VTAWebVHDIDsRegisterWithServerResponsePayload {
35
+ did: string;
36
+ serverId: string;
37
+ /**
38
+ * Entries the server accepted. Compare it with the DID's own log length: a shorter count means the server holds a truncated history and will resolve to an older document.
39
+ */
40
+ logEntryCount: number;
41
+ ext?: Ext;
42
+ }
43
+
44
+ /** Trust Task type URI. */
45
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/register-with-server/1.0" as const;
46
+
47
+ /** Stable alias for this specification's request payload shape. */
48
+ export type Payload = VTAWebVHDIDsRegisterWithServerPayload;
49
+
50
+ /** Trust Task response type URI (request type URI + "#response"). */
51
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/webvh/dids/register-with-server/1.0#response" as const;
52
+
53
+ /** Stable alias for this specification's success-response payload shape. */
54
+ export type Response = VTAWebVHDIDsRegisterWithServerResponsePayload;
55
+
56
+ /**
57
+ * This specification's payload schema, as a value.
58
+ *
59
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
60
+ * rather than only as a `.json` file because TypeScript types are erased
61
+ * at runtime: without a schema a consumer has nothing to validate, and
62
+ * every REQUIRED payload member is optional in practice. Cross-file
63
+ * `$ref`s are already inlined, so it needs no resolver.
64
+ */
65
+ export const PAYLOAD_SCHEMA = {
66
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
67
+ "$id": "https://trusttasks.org/spec/vta/webvh/dids/register-with-server/1.0",
68
+ "title": "VTA WebVH DIDs Register-With-Server — payload",
69
+ "description": "Hand an existing DID's log to a hosting server so it is served there.",
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "did",
74
+ "serverId"
75
+ ],
76
+ "properties": {
77
+ "did": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "serverId": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "description": "Hosting server to register with."
85
+ },
86
+ "force": {
87
+ "type": "boolean",
88
+ "default": false,
89
+ "description": "Overwrite a registration the server already holds at this location. Default false: the location may be somebody else's identity."
90
+ },
91
+ "domain": {
92
+ "type": "string",
93
+ "description": "Domain to publish under, when the server serves more than one."
94
+ },
95
+ "ext": {
96
+ "$ref": "#/$defs/Ext"
97
+ }
98
+ },
99
+ "$defs": {
100
+ "Response": {
101
+ "$anchor": "response",
102
+ "title": "VTA WebVH DIDs Register-With-Server — response payload",
103
+ "description": "Success response to vta/webvh/dids/register-with-server. Type https://trusttasks.org/spec/vta/webvh/dids/register-with-server/1.0#response.",
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": [
107
+ "did",
108
+ "serverId",
109
+ "logEntryCount"
110
+ ],
111
+ "properties": {
112
+ "did": {
113
+ "type": "string"
114
+ },
115
+ "serverId": {
116
+ "type": "string"
117
+ },
118
+ "logEntryCount": {
119
+ "type": "integer",
120
+ "minimum": 0,
121
+ "description": "Entries the server accepted. Compare it with the DID's own log length: a shorter count means the server holds a truncated history and will resolve to an older document."
122
+ },
123
+ "ext": {
124
+ "$ref": "#/$defs/Ext"
125
+ }
126
+ }
127
+ },
128
+ "Ext": {
129
+ "title": "Ext",
130
+ "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.",
131
+ "type": "object",
132
+ "minProperties": 1,
133
+ "additionalProperties": true,
134
+ "propertyNames": {
135
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
136
+ }
137
+ }
138
+ }
139
+ } as const;
140
+
141
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
142
+ export const RESPONSE_PAYLOAD_SCHEMA = {
143
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
144
+ "$ref": "#/$defs/Response",
145
+ "$defs": {
146
+ "Response": {
147
+ "$anchor": "response",
148
+ "title": "VTA WebVH DIDs Register-With-Server — response payload",
149
+ "description": "Success response to vta/webvh/dids/register-with-server. Type https://trusttasks.org/spec/vta/webvh/dids/register-with-server/1.0#response.",
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "required": [
153
+ "did",
154
+ "serverId",
155
+ "logEntryCount"
156
+ ],
157
+ "properties": {
158
+ "did": {
159
+ "type": "string"
160
+ },
161
+ "serverId": {
162
+ "type": "string"
163
+ },
164
+ "logEntryCount": {
165
+ "type": "integer",
166
+ "minimum": 0,
167
+ "description": "Entries the server accepted. Compare it with the DID's own log length: a shorter count means the server holds a truncated history and will resolve to an older document."
168
+ },
169
+ "ext": {
170
+ "$ref": "#/$defs/Ext"
171
+ }
172
+ }
173
+ },
174
+ "Ext": {
175
+ "title": "Ext",
176
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
177
+ "type": "object",
178
+ "minProperties": 1,
179
+ "additionalProperties": true,
180
+ "propertyNames": {
181
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
182
+ }
183
+ }
184
+ }
185
+ } as const;
186
+
187
+ /**
188
+ * SPEC.md §7.2 policy for the request variant, from this specification's
189
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
190
+ * per-specification and cannot be derived from the document alone, and
191
+ * item 2 needs the schema this carries.
192
+ */
193
+ export const SPEC = {
194
+ typeUri: TYPE_URI,
195
+ isBearer: false,
196
+ isProofRequired: true,
197
+ isRecipientRequired: true,
198
+ payloadSchema: PAYLOAD_SCHEMA,
199
+ } as const;
200
+
201
+ /**
202
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
203
+ * tracks the *issuer* party's requirement because a response swaps the
204
+ * parties (§7.3 item 5).
205
+ */
206
+ export const RESPONSE_SPEC = {
207
+ typeUri: RESPONSE_TYPE_URI,
208
+ isBearer: false,
209
+ isProofRequired: true,
210
+ isRecipientRequired: true,
211
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
212
+ } as const;