@openvtc/trust-tasks 0.21.4 → 0.21.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/_shared/components.d.ts +210 -2
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/_shared/0.1/passkey-invite.d.ts +16 -0
- package/dist/auth/_shared/0.1/passkey-invite.d.ts.map +1 -0
- package/dist/auth/_shared/0.1/passkey-invite.js +6 -0
- package/dist/auth/_shared/0.1/passkey-invite.js.map +1 -0
- package/dist/auth/passkey/enroll/invite/list/0.1/payload.d.ts +393 -0
- package/dist/auth/passkey/enroll/invite/list/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/invite/list/0.1/payload.js +234 -0
- package/dist/auth/passkey/enroll/invite/list/0.1/payload.js.map +1 -0
- package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.d.ts +228 -0
- package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.js +138 -0
- package/dist/auth/passkey/enroll/invite/revoke/0.1/payload.js.map +1 -0
- package/dist/auth/passkey/enroll/invite/update/0.1/payload.d.ts +459 -0
- package/dist/auth/passkey/enroll/invite/update/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/invite/update/0.1/payload.js +286 -0
- package/dist/auth/passkey/enroll/invite/update/0.1/payload.js.map +1 -0
- package/dist/auth/step-up/start/0.1/payload.d.ts +420 -0
- package/dist/auth/step-up/start/0.1/payload.d.ts.map +1 -0
- package/dist/auth/step-up/start/0.1/payload.js +232 -0
- package/dist/auth/step-up/start/0.1/payload.js.map +1 -0
- package/dist/did-management/_shared/0.1/service-instance.d.ts +1 -1
- package/dist/did-management/_shared/0.1/service-instance.d.ts.map +1 -1
- package/dist/did-management/_shared/0.2/metrics-snapshot.d.ts +16 -0
- package/dist/did-management/_shared/0.2/metrics-snapshot.d.ts.map +1 -0
- package/dist/did-management/_shared/0.2/metrics-snapshot.js +6 -0
- package/dist/did-management/_shared/0.2/metrics-snapshot.js.map +1 -0
- package/dist/did-management/_shared/0.2/service-instance.d.ts +16 -0
- package/dist/did-management/_shared/0.2/service-instance.d.ts.map +1 -0
- package/dist/did-management/_shared/0.2/service-instance.js +6 -0
- package/dist/did-management/_shared/0.2/service-instance.js.map +1 -0
- package/dist/did-management/agent-name/resolve/0.1/payload.d.ts +318 -0
- package/dist/did-management/agent-name/resolve/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/agent-name/resolve/0.1/payload.js +179 -0
- package/dist/did-management/agent-name/resolve/0.1/payload.js.map +1 -0
- package/dist/did-management/did/log/0.1/payload.d.ts +436 -0
- package/dist/did-management/did/log/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/did/log/0.1/payload.js +228 -0
- package/dist/did-management/did/log/0.1/payload.js.map +1 -0
- package/dist/did-management/domain/list/0.1/payload.d.ts +423 -0
- package/dist/did-management/domain/list/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/domain/list/0.1/payload.js +244 -0
- package/dist/did-management/domain/list/0.1/payload.js.map +1 -0
- package/dist/did-management/identity/list/0.1/payload.d.ts +494 -0
- package/dist/did-management/identity/list/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/identity/list/0.1/payload.js +274 -0
- package/dist/did-management/identity/list/0.1/payload.js.map +1 -0
- package/dist/did-management/identity/retire/0.1/payload.d.ts +242 -0
- package/dist/did-management/identity/retire/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/identity/retire/0.1/payload.js +142 -0
- package/dist/did-management/identity/retire/0.1/payload.js.map +1 -0
- package/dist/did-management/registry/admin-register/0.1/payload.d.ts +1 -1
- package/dist/did-management/registry/admin-register/0.1/payload.d.ts.map +1 -1
- package/dist/did-management/registry/check/0.1/payload.d.ts +639 -0
- package/dist/did-management/registry/check/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/registry/check/0.1/payload.js +383 -0
- package/dist/did-management/registry/check/0.1/payload.js.map +1 -0
- package/dist/did-management/registry/get/0.1/payload.d.ts +632 -0
- package/dist/did-management/registry/get/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/registry/get/0.1/payload.js +381 -0
- package/dist/did-management/registry/get/0.1/payload.js.map +1 -0
- package/dist/did-management/registry/list/0.1/payload.d.ts +661 -0
- package/dist/did-management/registry/list/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/registry/list/0.1/payload.js +398 -0
- package/dist/did-management/registry/list/0.1/payload.js.map +1 -0
- package/dist/did-management/registry/purge-domain/0.1/payload.d.ts +269 -0
- package/dist/did-management/registry/purge-domain/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/registry/purge-domain/0.1/payload.js +160 -0
- package/dist/did-management/registry/purge-domain/0.1/payload.js.map +1 -0
- package/dist/did-management/replica/domain/assign/0.1/payload.d.ts +233 -0
- package/dist/did-management/replica/domain/assign/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/replica/domain/assign/0.1/payload.js +143 -0
- package/dist/did-management/replica/domain/assign/0.1/payload.js.map +1 -0
- package/dist/did-management/replica/domain/purge/0.1/payload.d.ts +257 -0
- package/dist/did-management/replica/domain/purge/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/replica/domain/purge/0.1/payload.js +155 -0
- package/dist/did-management/replica/domain/purge/0.1/payload.js.map +1 -0
- package/dist/did-management/replica/domain/unassign/0.1/payload.d.ts +257 -0
- package/dist/did-management/replica/domain/unassign/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/replica/domain/unassign/0.1/payload.js +155 -0
- package/dist/did-management/replica/domain/unassign/0.1/payload.js.map +1 -0
- package/dist/did-management/replica/domain/upsert/0.1/payload.d.ts +401 -0
- package/dist/did-management/replica/domain/upsert/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/replica/domain/upsert/0.1/payload.js +241 -0
- package/dist/did-management/replica/domain/upsert/0.1/payload.js.map +1 -0
- package/dist/did-management/server/config/0.1/payload.d.ts +838 -0
- package/dist/did-management/server/config/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/server/config/0.1/payload.js +444 -0
- package/dist/did-management/server/config/0.1/payload.js.map +1 -0
- package/dist/did-management/server/info/0.1/payload.d.ts +285 -0
- package/dist/did-management/server/info/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/server/info/0.1/payload.js +160 -0
- package/dist/did-management/server/info/0.1/payload.js.map +1 -0
- package/dist/did-management/server/metrics/0.1/payload.d.ts +674 -0
- package/dist/did-management/server/metrics/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/server/metrics/0.1/payload.js +387 -0
- package/dist/did-management/server/metrics/0.1/payload.js.map +1 -0
- package/dist/did-management/stats/get/0.1/payload.d.ts +349 -0
- package/dist/did-management/stats/get/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/stats/get/0.1/payload.js +187 -0
- package/dist/did-management/stats/get/0.1/payload.js.map +1 -0
- package/dist/did-management/stats/timeseries/0.1/payload.d.ts +381 -0
- package/dist/did-management/stats/timeseries/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/stats/timeseries/0.1/payload.js +227 -0
- package/dist/did-management/stats/timeseries/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/_shared/0.1/invite.d.ts +1 -1
- package/dist/vtc/_shared/0.1/invite.d.ts.map +1 -1
- package/dist/vtc/admin/invites/list/0.1/payload.d.ts +1 -1
- package/dist/vtc/admin/invites/list/0.1/payload.d.ts.map +1 -1
- package/dist/webvh/_shared/0.1/sync-update.d.ts +16 -0
- package/dist/webvh/_shared/0.1/sync-update.d.ts.map +1 -0
- package/dist/webvh/_shared/0.1/sync-update.js +6 -0
- package/dist/webvh/_shared/0.1/sync-update.js.map +1 -0
- package/dist/webvh/_shared/0.1/witness-key.d.ts +16 -0
- package/dist/webvh/_shared/0.1/witness-key.d.ts.map +1 -0
- package/dist/webvh/_shared/0.1/witness-key.js +6 -0
- package/dist/webvh/_shared/0.1/witness-key.js.map +1 -0
- package/dist/webvh/sync/batch/0.1/payload.d.ts +503 -0
- package/dist/webvh/sync/batch/0.1/payload.d.ts.map +1 -0
- package/dist/webvh/sync/batch/0.1/payload.js +290 -0
- package/dist/webvh/sync/batch/0.1/payload.js.map +1 -0
- package/dist/webvh/sync/delete/0.2/payload.d.ts +242 -0
- package/dist/webvh/sync/delete/0.2/payload.d.ts.map +1 -0
- package/dist/webvh/sync/delete/0.2/payload.js +148 -0
- package/dist/webvh/sync/delete/0.2/payload.js.map +1 -0
- package/dist/webvh/sync/update/0.2/payload.d.ts +315 -0
- package/dist/webvh/sync/update/0.2/payload.d.ts.map +1 -0
- package/dist/webvh/sync/update/0.2/payload.js +177 -0
- package/dist/webvh/sync/update/0.2/payload.js.map +1 -0
- package/dist/webvh/witness/key/create/0.1/payload.d.ts +346 -0
- package/dist/webvh/witness/key/create/0.1/payload.d.ts.map +1 -0
- package/dist/webvh/witness/key/create/0.1/payload.js +202 -0
- package/dist/webvh/witness/key/create/0.1/payload.js.map +1 -0
- package/dist/webvh/witness/key/delete/0.1/payload.d.ts +237 -0
- package/dist/webvh/witness/key/delete/0.1/payload.d.ts.map +1 -0
- package/dist/webvh/witness/key/delete/0.1/payload.js +141 -0
- package/dist/webvh/witness/key/delete/0.1/payload.js.map +1 -0
- package/dist/webvh/witness/key/list/0.1/payload.d.ts +349 -0
- package/dist/webvh/witness/key/list/0.1/payload.d.ts.map +1 -0
- package/dist/webvh/witness/key/list/0.1/payload.js +204 -0
- package/dist/webvh/witness/key/list/0.1/payload.js.map +1 -0
- package/dist/webvh/witness/sign/0.1/payload.d.ts +401 -0
- package/dist/webvh/witness/sign/0.1/payload.d.ts.map +1 -0
- package/dist/webvh/witness/sign/0.1/payload.js +229 -0
- package/dist/webvh/witness/sign/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +210 -2
- package/src/auth/_shared/0.1/passkey-invite.ts +17 -0
- package/src/auth/passkey/enroll/invite/list/0.1/payload.ts +266 -0
- package/src/auth/passkey/enroll/invite/revoke/0.1/payload.ts +165 -0
- package/src/auth/passkey/enroll/invite/update/0.1/payload.ts +327 -0
- package/src/auth/step-up/start/0.1/payload.ts +287 -0
- package/src/did-management/_shared/0.1/service-instance.ts +1 -1
- package/src/did-management/_shared/0.2/metrics-snapshot.ts +17 -0
- package/src/did-management/_shared/0.2/service-instance.ts +17 -0
- package/src/did-management/agent-name/resolve/0.1/payload.ts +222 -0
- package/src/did-management/did/log/0.1/payload.ts +295 -0
- package/src/did-management/domain/list/0.1/payload.ts +280 -0
- package/src/did-management/identity/list/0.1/payload.ts +335 -0
- package/src/did-management/identity/retire/0.1/payload.ts +175 -0
- package/src/did-management/registry/admin-register/0.1/payload.ts +1 -1
- package/src/did-management/registry/check/0.1/payload.ts +415 -0
- package/src/did-management/registry/get/0.1/payload.ts +410 -0
- package/src/did-management/registry/list/0.1/payload.ts +434 -0
- package/src/did-management/registry/purge-domain/0.1/payload.ts +198 -0
- package/src/did-management/replica/domain/assign/0.1/payload.ts +173 -0
- package/src/did-management/replica/domain/purge/0.1/payload.ts +189 -0
- package/src/did-management/replica/domain/unassign/0.1/payload.ts +189 -0
- package/src/did-management/replica/domain/upsert/0.1/payload.ts +271 -0
- package/src/did-management/server/config/0.1/payload.ts +545 -0
- package/src/did-management/server/info/0.1/payload.ts +200 -0
- package/src/did-management/server/metrics/0.1/payload.ts +418 -0
- package/src/did-management/stats/get/0.1/payload.ts +237 -0
- package/src/did-management/stats/timeseries/0.1/payload.ts +279 -0
- package/src/index.ts +34 -0
- package/src/vtc/_shared/0.1/invite.ts +1 -1
- package/src/vtc/admin/invites/list/0.1/payload.ts +1 -1
- package/src/webvh/_shared/0.1/sync-update.ts +17 -0
- package/src/webvh/_shared/0.1/witness-key.ts +17 -0
- package/src/webvh/sync/batch/0.1/payload.ts +336 -0
- package/src/webvh/sync/delete/0.2/payload.ts +181 -0
- package/src/webvh/sync/update/0.2/payload.ts +233 -0
- package/src/webvh/witness/key/create/0.1/payload.ts +231 -0
- package/src/webvh/witness/key/delete/0.1/payload.ts +171 -0
- package/src/webvh/witness/key/list/0.1/payload.ts +232 -0
- package/src/webvh/witness/sign/0.1/payload.ts +279 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/webvh/witness/key/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, WitnessKey } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface WebVHWitnessKeyListPayload {
|
|
10
|
+
ext?: Ext;
|
|
11
|
+
}
|
|
12
|
+
export interface WebVHWitnessKeyListResponsePayload {
|
|
13
|
+
/**
|
|
14
|
+
* Every witness identity the service holds, ordered by createdAt. Empty when it holds none.
|
|
15
|
+
*/
|
|
16
|
+
keys: WitnessKey[];
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
21
|
+
export type { Ext, WitnessKey };
|
|
22
|
+
|
|
23
|
+
/** Trust Task type URI. */
|
|
24
|
+
export const TYPE_URI = "https://trusttasks.org/spec/webvh/witness/key/list/0.1" as const;
|
|
25
|
+
|
|
26
|
+
/** Stable alias for this specification's request payload shape. */
|
|
27
|
+
export type Payload = WebVHWitnessKeyListPayload;
|
|
28
|
+
|
|
29
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
30
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/webvh/witness/key/list/0.1#response" as const;
|
|
31
|
+
|
|
32
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
33
|
+
export type Response = WebVHWitnessKeyListResponsePayload;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* This specification's payload schema, as a value.
|
|
37
|
+
*
|
|
38
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
39
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
40
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
41
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
42
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
43
|
+
*/
|
|
44
|
+
export const PAYLOAD_SCHEMA = {
|
|
45
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
46
|
+
"$id": "https://trusttasks.org/spec/webvh/witness/key/list/0.1",
|
|
47
|
+
"title": "WebVH Witness Key List — payload",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"properties": {
|
|
51
|
+
"ext": {
|
|
52
|
+
"$ref": "#/$defs/Ext"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"$defs": {
|
|
56
|
+
"Response": {
|
|
57
|
+
"$anchor": "response",
|
|
58
|
+
"title": "WebVH Witness Key List — response payload",
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": [
|
|
62
|
+
"keys"
|
|
63
|
+
],
|
|
64
|
+
"properties": {
|
|
65
|
+
"keys": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"$ref": "#/$defs/WitnessKey"
|
|
69
|
+
},
|
|
70
|
+
"description": "Every witness identity the service holds, ordered by createdAt. Empty when it holds none."
|
|
71
|
+
},
|
|
72
|
+
"ext": {
|
|
73
|
+
"$ref": "#/$defs/Ext"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"Ext": {
|
|
78
|
+
"title": "Ext",
|
|
79
|
+
"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.",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"minProperties": 1,
|
|
82
|
+
"additionalProperties": true,
|
|
83
|
+
"propertyNames": {
|
|
84
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"WitnessKey": {
|
|
88
|
+
"title": "WitnessKey",
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": [
|
|
92
|
+
"witnessId",
|
|
93
|
+
"did",
|
|
94
|
+
"createdAt",
|
|
95
|
+
"proofsSigned"
|
|
96
|
+
],
|
|
97
|
+
"properties": {
|
|
98
|
+
"witnessId": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"minLength": 1,
|
|
101
|
+
"maxLength": 256,
|
|
102
|
+
"description": "The witness service's identifier for this identity. Opaque to the requester."
|
|
103
|
+
},
|
|
104
|
+
"did": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"minLength": 1,
|
|
107
|
+
"description": "The witness identity's DID (for example a `did:key`) — the value a did:webvh log names in its `witness` parameter, and the controller of the key that signs its proofs."
|
|
108
|
+
},
|
|
109
|
+
"label": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"maxLength": 256,
|
|
112
|
+
"description": "Operator-chosen display label. Untrusted free text. Absent when none was given."
|
|
113
|
+
},
|
|
114
|
+
"createdAt": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"format": "date-time"
|
|
117
|
+
},
|
|
118
|
+
"proofsSigned": {
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"minimum": 0,
|
|
121
|
+
"description": "How many witness proofs this identity has signed."
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
} as const;
|
|
127
|
+
|
|
128
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
129
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
130
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
131
|
+
"$ref": "#/$defs/Response",
|
|
132
|
+
"$defs": {
|
|
133
|
+
"Response": {
|
|
134
|
+
"$anchor": "response",
|
|
135
|
+
"title": "WebVH Witness Key List — response payload",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": [
|
|
139
|
+
"keys"
|
|
140
|
+
],
|
|
141
|
+
"properties": {
|
|
142
|
+
"keys": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"items": {
|
|
145
|
+
"$ref": "#/$defs/WitnessKey"
|
|
146
|
+
},
|
|
147
|
+
"description": "Every witness identity the service holds, ordered by createdAt. Empty when it holds none."
|
|
148
|
+
},
|
|
149
|
+
"ext": {
|
|
150
|
+
"$ref": "#/$defs/Ext"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"Ext": {
|
|
155
|
+
"title": "Ext",
|
|
156
|
+
"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.",
|
|
157
|
+
"type": "object",
|
|
158
|
+
"minProperties": 1,
|
|
159
|
+
"additionalProperties": true,
|
|
160
|
+
"propertyNames": {
|
|
161
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"WitnessKey": {
|
|
165
|
+
"title": "WitnessKey",
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": false,
|
|
168
|
+
"required": [
|
|
169
|
+
"witnessId",
|
|
170
|
+
"did",
|
|
171
|
+
"createdAt",
|
|
172
|
+
"proofsSigned"
|
|
173
|
+
],
|
|
174
|
+
"properties": {
|
|
175
|
+
"witnessId": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"minLength": 1,
|
|
178
|
+
"maxLength": 256,
|
|
179
|
+
"description": "The witness service's identifier for this identity. Opaque to the requester."
|
|
180
|
+
},
|
|
181
|
+
"did": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1,
|
|
184
|
+
"description": "The witness identity's DID (for example a `did:key`) — the value a did:webvh log names in its `witness` parameter, and the controller of the key that signs its proofs."
|
|
185
|
+
},
|
|
186
|
+
"label": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"maxLength": 256,
|
|
189
|
+
"description": "Operator-chosen display label. Untrusted free text. Absent when none was given."
|
|
190
|
+
},
|
|
191
|
+
"createdAt": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"format": "date-time"
|
|
194
|
+
},
|
|
195
|
+
"proofsSigned": {
|
|
196
|
+
"type": "integer",
|
|
197
|
+
"minimum": 0,
|
|
198
|
+
"description": "How many witness proofs this identity has signed."
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
} as const;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
207
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
208
|
+
* per-specification and cannot be derived from the document alone, and
|
|
209
|
+
* item 2 needs the schema this carries.
|
|
210
|
+
*/
|
|
211
|
+
export const SPEC = {
|
|
212
|
+
typeUri: TYPE_URI,
|
|
213
|
+
isBearer: false,
|
|
214
|
+
isProofRequired: true,
|
|
215
|
+
isRecipientRequired: true,
|
|
216
|
+
isIssuedAtRequired: false,
|
|
217
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
218
|
+
} as const;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
222
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
223
|
+
* parties (§7.3 item 5).
|
|
224
|
+
*/
|
|
225
|
+
export const RESPONSE_SPEC = {
|
|
226
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
227
|
+
isBearer: false,
|
|
228
|
+
isProofRequired: true,
|
|
229
|
+
isRecipientRequired: true,
|
|
230
|
+
isIssuedAtRequired: false,
|
|
231
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
232
|
+
} as const;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/webvh/witness/sign/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface WebVHWitnessSignPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The witness identity to sign with, as webvh/witness/key/list reports it.
|
|
12
|
+
*/
|
|
13
|
+
witnessId: string;
|
|
14
|
+
/**
|
|
15
|
+
* The versionId of the log entry to witness. MUST be the last entry of `logContent`.
|
|
16
|
+
*/
|
|
17
|
+
versionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* The did.jsonl up to and including the entry to witness, so the witness can verify what it signs.
|
|
20
|
+
*/
|
|
21
|
+
logContent: string;
|
|
22
|
+
ext?: Ext;
|
|
23
|
+
}
|
|
24
|
+
export interface WebVHWitnessSignResponsePayload {
|
|
25
|
+
witnessId: string;
|
|
26
|
+
versionId: string;
|
|
27
|
+
/**
|
|
28
|
+
* The W3C Data Integrity proof over {versionId}, by the witness identity's key. Carried verbatim into the DID's did-witness.json; further Data Integrity members are permitted.
|
|
29
|
+
*/
|
|
30
|
+
proof: {
|
|
31
|
+
type: "DataIntegrityProof";
|
|
32
|
+
cryptosuite: string;
|
|
33
|
+
verificationMethod: string;
|
|
34
|
+
proofPurpose: string;
|
|
35
|
+
proofValue: string;
|
|
36
|
+
created?: string;
|
|
37
|
+
[k: string]: unknown | undefined;
|
|
38
|
+
};
|
|
39
|
+
ext?: Ext;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
43
|
+
export type { Ext };
|
|
44
|
+
|
|
45
|
+
/** Trust Task type URI. */
|
|
46
|
+
export const TYPE_URI = "https://trusttasks.org/spec/webvh/witness/sign/0.1" as const;
|
|
47
|
+
|
|
48
|
+
/** Stable alias for this specification's request payload shape. */
|
|
49
|
+
export type Payload = WebVHWitnessSignPayload;
|
|
50
|
+
|
|
51
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
52
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/webvh/witness/sign/0.1#response" as const;
|
|
53
|
+
|
|
54
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
55
|
+
export type Response = WebVHWitnessSignResponsePayload;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export const PAYLOAD_SCHEMA = {
|
|
67
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
68
|
+
"$id": "https://trusttasks.org/spec/webvh/witness/sign/0.1",
|
|
69
|
+
"title": "WebVH Witness Sign — payload",
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": [
|
|
73
|
+
"witnessId",
|
|
74
|
+
"versionId",
|
|
75
|
+
"logContent"
|
|
76
|
+
],
|
|
77
|
+
"properties": {
|
|
78
|
+
"witnessId": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1,
|
|
81
|
+
"maxLength": 256,
|
|
82
|
+
"description": "The witness identity to sign with, as webvh/witness/key/list reports it."
|
|
83
|
+
},
|
|
84
|
+
"versionId": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "The versionId of the log entry to witness. MUST be the last entry of `logContent`."
|
|
88
|
+
},
|
|
89
|
+
"logContent": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1,
|
|
92
|
+
"description": "The did.jsonl up to and including the entry to witness, so the witness can verify what it signs."
|
|
93
|
+
},
|
|
94
|
+
"ext": {
|
|
95
|
+
"$ref": "#/$defs/Ext"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"$defs": {
|
|
99
|
+
"Response": {
|
|
100
|
+
"$anchor": "response",
|
|
101
|
+
"title": "WebVH Witness Sign — response payload",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": [
|
|
105
|
+
"witnessId",
|
|
106
|
+
"versionId",
|
|
107
|
+
"proof"
|
|
108
|
+
],
|
|
109
|
+
"properties": {
|
|
110
|
+
"witnessId": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1
|
|
113
|
+
},
|
|
114
|
+
"versionId": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"minLength": 1
|
|
117
|
+
},
|
|
118
|
+
"proof": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"description": "The W3C Data Integrity proof over {versionId}, by the witness identity's key. Carried verbatim into the DID's did-witness.json; further Data Integrity members are permitted.",
|
|
121
|
+
"additionalProperties": true,
|
|
122
|
+
"required": [
|
|
123
|
+
"type",
|
|
124
|
+
"cryptosuite",
|
|
125
|
+
"verificationMethod",
|
|
126
|
+
"proofPurpose",
|
|
127
|
+
"proofValue"
|
|
128
|
+
],
|
|
129
|
+
"properties": {
|
|
130
|
+
"type": {
|
|
131
|
+
"const": "DataIntegrityProof"
|
|
132
|
+
},
|
|
133
|
+
"cryptosuite": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1
|
|
136
|
+
},
|
|
137
|
+
"verificationMethod": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"minLength": 1
|
|
140
|
+
},
|
|
141
|
+
"proofPurpose": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 1
|
|
144
|
+
},
|
|
145
|
+
"proofValue": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1
|
|
148
|
+
},
|
|
149
|
+
"created": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"format": "date-time"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"ext": {
|
|
156
|
+
"$ref": "#/$defs/Ext"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"Ext": {
|
|
161
|
+
"title": "Ext",
|
|
162
|
+
"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.",
|
|
163
|
+
"type": "object",
|
|
164
|
+
"minProperties": 1,
|
|
165
|
+
"additionalProperties": true,
|
|
166
|
+
"propertyNames": {
|
|
167
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} as const;
|
|
172
|
+
|
|
173
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
174
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
175
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
176
|
+
"$ref": "#/$defs/Response",
|
|
177
|
+
"$defs": {
|
|
178
|
+
"Response": {
|
|
179
|
+
"$anchor": "response",
|
|
180
|
+
"title": "WebVH Witness Sign — response payload",
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"required": [
|
|
184
|
+
"witnessId",
|
|
185
|
+
"versionId",
|
|
186
|
+
"proof"
|
|
187
|
+
],
|
|
188
|
+
"properties": {
|
|
189
|
+
"witnessId": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 1
|
|
192
|
+
},
|
|
193
|
+
"versionId": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"minLength": 1
|
|
196
|
+
},
|
|
197
|
+
"proof": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"description": "The W3C Data Integrity proof over {versionId}, by the witness identity's key. Carried verbatim into the DID's did-witness.json; further Data Integrity members are permitted.",
|
|
200
|
+
"additionalProperties": true,
|
|
201
|
+
"required": [
|
|
202
|
+
"type",
|
|
203
|
+
"cryptosuite",
|
|
204
|
+
"verificationMethod",
|
|
205
|
+
"proofPurpose",
|
|
206
|
+
"proofValue"
|
|
207
|
+
],
|
|
208
|
+
"properties": {
|
|
209
|
+
"type": {
|
|
210
|
+
"const": "DataIntegrityProof"
|
|
211
|
+
},
|
|
212
|
+
"cryptosuite": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"minLength": 1
|
|
215
|
+
},
|
|
216
|
+
"verificationMethod": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"minLength": 1
|
|
219
|
+
},
|
|
220
|
+
"proofPurpose": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 1
|
|
223
|
+
},
|
|
224
|
+
"proofValue": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"minLength": 1
|
|
227
|
+
},
|
|
228
|
+
"created": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"format": "date-time"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"ext": {
|
|
235
|
+
"$ref": "#/$defs/Ext"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"Ext": {
|
|
240
|
+
"title": "Ext",
|
|
241
|
+
"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.",
|
|
242
|
+
"type": "object",
|
|
243
|
+
"minProperties": 1,
|
|
244
|
+
"additionalProperties": true,
|
|
245
|
+
"propertyNames": {
|
|
246
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
} as const;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
254
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
255
|
+
* per-specification and cannot be derived from the document alone, and
|
|
256
|
+
* item 2 needs the schema this carries.
|
|
257
|
+
*/
|
|
258
|
+
export const SPEC = {
|
|
259
|
+
typeUri: TYPE_URI,
|
|
260
|
+
isBearer: false,
|
|
261
|
+
isProofRequired: true,
|
|
262
|
+
isRecipientRequired: true,
|
|
263
|
+
isIssuedAtRequired: true,
|
|
264
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
265
|
+
} as const;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
269
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
270
|
+
* parties (§7.3 item 5).
|
|
271
|
+
*/
|
|
272
|
+
export const RESPONSE_SPEC = {
|
|
273
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
274
|
+
isBearer: false,
|
|
275
|
+
isProofRequired: true,
|
|
276
|
+
isRecipientRequired: true,
|
|
277
|
+
isIssuedAtRequired: true,
|
|
278
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
279
|
+
} as const;
|