@openvtc/trust-tasks 0.12.9 → 0.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/_shared/0.1/endorsement.d.ts +1 -1
- package/dist/vtc/ceremonies/list/0.1/payload.d.ts +22 -0
- package/dist/vtc/ceremonies/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/ceremonies/list/0.1/payload.js +8 -0
- package/dist/vtc/ceremonies/list/0.1/payload.js.map +1 -1
- package/dist/vtc/community/profile/show/0.1/payload.d.ts +81 -22
- package/dist/vtc/community/profile/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/community/profile/show/0.1/payload.js +34 -8
- package/dist/vtc/community/profile/show/0.1/payload.js.map +1 -1
- package/dist/vtc/community/profile/update/0.1/payload.d.ts +81 -22
- package/dist/vtc/community/profile/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/community/profile/update/0.1/payload.js +34 -8
- package/dist/vtc/community/profile/update/0.1/payload.js.map +1 -1
- package/dist/vtc/endorsements/issue/0.1/payload.d.ts +65 -65
- package/dist/vtc/endorsements/issue/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/endorsements/issue/0.1/payload.js +36 -32
- package/dist/vtc/endorsements/issue/0.1/payload.js.map +1 -1
- package/dist/vtc/endorsements/list/0.1/payload.d.ts +41 -61
- package/dist/vtc/endorsements/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/endorsements/list/0.1/payload.js +24 -30
- package/dist/vtc/endorsements/list/0.1/payload.js.map +1 -1
- package/dist/vtc/endorsements/show/0.1/payload.d.ts +41 -61
- package/dist/vtc/endorsements/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/endorsements/show/0.1/payload.js +24 -30
- package/dist/vtc/endorsements/show/0.1/payload.js.map +1 -1
- package/dist/vtc/install/claim/finish/0.2/payload.d.ts +271 -0
- package/dist/vtc/install/claim/finish/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/install/claim/finish/0.2/payload.js +152 -0
- package/dist/vtc/install/claim/finish/0.2/payload.js.map +1 -0
- package/dist/vtc/install/claim/start/0.1/payload.d.ts +18 -0
- package/dist/vtc/install/claim/start/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/install/claim/start/0.1/payload.js +5 -0
- package/dist/vtc/install/claim/start/0.1/payload.js.map +1 -1
- package/dist/vtc/install/claim/start/0.2/payload.d.ts +264 -0
- package/dist/vtc/install/claim/start/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/install/claim/start/0.2/payload.js +145 -0
- package/dist/vtc/install/claim/start/0.2/payload.js.map +1 -0
- package/dist/vtc/registry/diagnostics/0.1/payload.d.ts +491 -0
- package/dist/vtc/registry/diagnostics/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/registry/diagnostics/0.1/payload.js +260 -0
- package/dist/vtc/registry/diagnostics/0.1/payload.js.map +1 -1
- package/dist/vtc/website/files/list/0.1/payload.d.ts +24 -0
- package/dist/vtc/website/files/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/website/files/list/0.1/payload.js +10 -0
- package/dist/vtc/website/files/list/0.1/payload.js.map +1 -1
- package/dist/vtc/website/generations/list/0.1/payload.d.ts +48 -0
- package/dist/vtc/website/generations/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/website/generations/list/0.1/payload.js +20 -0
- package/dist/vtc/website/generations/list/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/vtc/_shared/0.1/endorsement.ts +1 -1
- package/src/vtc/ceremonies/list/0.1/payload.ts +14 -0
- package/src/vtc/community/profile/show/0.1/payload.ts +47 -10
- package/src/vtc/community/profile/update/0.1/payload.ts +47 -10
- package/src/vtc/endorsements/issue/0.1/payload.ts +45 -41
- package/src/vtc/endorsements/list/0.1/payload.ts +29 -39
- package/src/vtc/endorsements/show/0.1/payload.ts +29 -39
- package/src/vtc/install/claim/finish/0.2/payload.ts +193 -0
- package/src/vtc/install/claim/start/0.1/payload.ts +13 -0
- package/src/vtc/install/claim/start/0.2/payload.ts +189 -0
- package/src/vtc/registry/diagnostics/0.1/payload.ts +343 -0
- package/src/vtc/website/files/list/0.1/payload.ts +14 -0
- package/src/vtc/website/generations/list/0.1/payload.ts +28 -0
|
@@ -39,7 +39,7 @@ export interface Endorsement {
|
|
|
39
39
|
* The attested claim body, validated against the endorsement type's claimSchema when it declares one.
|
|
40
40
|
*/
|
|
41
41
|
claim?: {};
|
|
42
|
-
issued:
|
|
42
|
+
issued: CredentialReference;
|
|
43
43
|
/**
|
|
44
44
|
* The endorsement's slot on the community's shared Revocation status list. Published, so a foreign verifier can check revocation without contacting this community.
|
|
45
45
|
*/
|
|
@@ -50,22 +50,18 @@ export interface Endorsement {
|
|
|
50
50
|
revokedAt?: string | null;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* A pointer to the issued VEC — its identifier and lifetime, not its bytes. `endorsements/issue` additionally returns the credential itself, because that is the one call whose caller has no other way to receive it.
|
|
54
54
|
*/
|
|
55
|
-
export interface
|
|
55
|
+
export interface CredentialReference {
|
|
56
56
|
credentialId: CredentialId;
|
|
57
|
-
/**
|
|
58
|
-
* The issued Verifiable Credential (W3C VC Data Model 2.0), signed by the issuer's key. Opaque to the framework.
|
|
59
|
-
*/
|
|
60
|
-
credential: {};
|
|
61
57
|
/**
|
|
62
58
|
* When the credential was minted.
|
|
63
59
|
*/
|
|
64
60
|
issuedAt?: string;
|
|
65
61
|
/**
|
|
66
|
-
* When
|
|
62
|
+
* When it lapses, or null when it does not.
|
|
67
63
|
*/
|
|
68
|
-
expiresAt
|
|
64
|
+
expiresAt?: string | null;
|
|
69
65
|
}
|
|
70
66
|
|
|
71
67
|
/** Trust Task type URI. */
|
|
@@ -169,8 +165,8 @@ export const PAYLOAD_SCHEMA = {
|
|
|
169
165
|
"description": "The attested claim body, validated against the endorsement type's claimSchema when it declares one."
|
|
170
166
|
},
|
|
171
167
|
"issued": {
|
|
172
|
-
"$ref": "#/$defs/
|
|
173
|
-
"description": "
|
|
168
|
+
"$ref": "#/$defs/CredentialReference",
|
|
169
|
+
"description": "A pointer to the issued VEC — its identifier and lifetime, not its bytes. `endorsements/issue` additionally returns the credential itself, because that is the one call whose caller has no other way to receive it."
|
|
174
170
|
},
|
|
175
171
|
"statusListIndex": {
|
|
176
172
|
"type": "integer",
|
|
@@ -187,34 +183,31 @@ export const PAYLOAD_SCHEMA = {
|
|
|
187
183
|
}
|
|
188
184
|
}
|
|
189
185
|
},
|
|
190
|
-
"
|
|
191
|
-
"$anchor": "
|
|
192
|
-
"title": "
|
|
193
|
-
"description": "The receipt for a successfully-minted Verifiable Credential: a stable handle for revocation and audit, the signed credential itself, and when it lapses.\n\nSCOPE — this is an *issuance* receipt, returned by the party that minted the credential. It is not the shape for a *delivery* receipt, where a holder hands an already-issued credential to a party that stores it: such a task returns a receipt naming what was stored (see vtc/members/vmc and vtc/join-requests/accept) and MUST NOT echo the credential back to the party that just sent it. Reaching for this definition on a delivery task is the mistake this paragraph exists to prevent.\n\n`additionalProperties` is false, so a specification needing extra members cannot compose this by `$ref` — `allOf` evaluates each subschema against the whole object and this one would reject them. vta/credentials/issue is that case: its response is this shape plus `supersedes` and `ext`, and it therefore states the members inline while `$ref`-ing the shared CredentialId. That is deliberate, not drift.",
|
|
186
|
+
"CredentialReference": {
|
|
187
|
+
"$anchor": "credentialReference",
|
|
188
|
+
"title": "CredentialReference",
|
|
194
189
|
"type": "object",
|
|
195
190
|
"additionalProperties": false,
|
|
191
|
+
"description": "A pointer to an issued credential, without the credential itself.\n\nThe counterpart to IssuedCredential, for the far more common case of *reading about* a credential rather than being handed one. A listing that embedded the signed credential in every row would grow with the size of the credentials rather than the number of them — a page of fifty is megabytes — and a reader that only needs to know a credential exists, when it lapses, and how to revoke it does not need the bytes.\n\nThe holder can always fetch the credential itself by `credentialId`, and a verifier can check revocation from the row's status-list slot without either. Reach for IssuedCredential only at the moment of minting, where the caller has no other way to receive what was just made for them.",
|
|
196
192
|
"required": [
|
|
197
|
-
"credentialId"
|
|
198
|
-
"credential",
|
|
199
|
-
"expiresAt"
|
|
193
|
+
"credentialId"
|
|
200
194
|
],
|
|
201
195
|
"properties": {
|
|
202
196
|
"credentialId": {
|
|
203
197
|
"$ref": "#/$defs/CredentialId"
|
|
204
198
|
},
|
|
205
|
-
"credential": {
|
|
206
|
-
"type": "object",
|
|
207
|
-
"description": "The issued Verifiable Credential (W3C VC Data Model 2.0), signed by the issuer's key. Opaque to the framework."
|
|
208
|
-
},
|
|
209
199
|
"issuedAt": {
|
|
210
200
|
"type": "string",
|
|
211
201
|
"format": "date-time",
|
|
212
202
|
"description": "When the credential was minted."
|
|
213
203
|
},
|
|
214
204
|
"expiresAt": {
|
|
215
|
-
"type":
|
|
205
|
+
"type": [
|
|
206
|
+
"string",
|
|
207
|
+
"null"
|
|
208
|
+
],
|
|
216
209
|
"format": "date-time",
|
|
217
|
-
"description": "When
|
|
210
|
+
"description": "When it lapses, or null when it does not."
|
|
218
211
|
}
|
|
219
212
|
}
|
|
220
213
|
},
|
|
@@ -294,8 +287,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
294
287
|
"description": "The attested claim body, validated against the endorsement type's claimSchema when it declares one."
|
|
295
288
|
},
|
|
296
289
|
"issued": {
|
|
297
|
-
"$ref": "#/$defs/
|
|
298
|
-
"description": "
|
|
290
|
+
"$ref": "#/$defs/CredentialReference",
|
|
291
|
+
"description": "A pointer to the issued VEC — its identifier and lifetime, not its bytes. `endorsements/issue` additionally returns the credential itself, because that is the one call whose caller has no other way to receive it."
|
|
299
292
|
},
|
|
300
293
|
"statusListIndex": {
|
|
301
294
|
"type": "integer",
|
|
@@ -312,34 +305,31 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
312
305
|
}
|
|
313
306
|
}
|
|
314
307
|
},
|
|
315
|
-
"
|
|
316
|
-
"$anchor": "
|
|
317
|
-
"title": "
|
|
318
|
-
"description": "The receipt for a successfully-minted Verifiable Credential: a stable handle for revocation and audit, the signed credential itself, and when it lapses.\n\nSCOPE — this is an *issuance* receipt, returned by the party that minted the credential. It is not the shape for a *delivery* receipt, where a holder hands an already-issued credential to a party that stores it: such a task returns a receipt naming what was stored (see vtc/members/vmc and vtc/join-requests/accept) and MUST NOT echo the credential back to the party that just sent it. Reaching for this definition on a delivery task is the mistake this paragraph exists to prevent.\n\n`additionalProperties` is false, so a specification needing extra members cannot compose this by `$ref` — `allOf` evaluates each subschema against the whole object and this one would reject them. vta/credentials/issue is that case: its response is this shape plus `supersedes` and `ext`, and it therefore states the members inline while `$ref`-ing the shared CredentialId. That is deliberate, not drift.",
|
|
308
|
+
"CredentialReference": {
|
|
309
|
+
"$anchor": "credentialReference",
|
|
310
|
+
"title": "CredentialReference",
|
|
319
311
|
"type": "object",
|
|
320
312
|
"additionalProperties": false,
|
|
313
|
+
"description": "A pointer to an issued credential, without the credential itself.\n\nThe counterpart to IssuedCredential, for the far more common case of *reading about* a credential rather than being handed one. A listing that embedded the signed credential in every row would grow with the size of the credentials rather than the number of them — a page of fifty is megabytes — and a reader that only needs to know a credential exists, when it lapses, and how to revoke it does not need the bytes.\n\nThe holder can always fetch the credential itself by `credentialId`, and a verifier can check revocation from the row's status-list slot without either. Reach for IssuedCredential only at the moment of minting, where the caller has no other way to receive what was just made for them.",
|
|
321
314
|
"required": [
|
|
322
|
-
"credentialId"
|
|
323
|
-
"credential",
|
|
324
|
-
"expiresAt"
|
|
315
|
+
"credentialId"
|
|
325
316
|
],
|
|
326
317
|
"properties": {
|
|
327
318
|
"credentialId": {
|
|
328
319
|
"$ref": "#/$defs/CredentialId"
|
|
329
320
|
},
|
|
330
|
-
"credential": {
|
|
331
|
-
"type": "object",
|
|
332
|
-
"description": "The issued Verifiable Credential (W3C VC Data Model 2.0), signed by the issuer's key. Opaque to the framework."
|
|
333
|
-
},
|
|
334
321
|
"issuedAt": {
|
|
335
322
|
"type": "string",
|
|
336
323
|
"format": "date-time",
|
|
337
324
|
"description": "When the credential was minted."
|
|
338
325
|
},
|
|
339
326
|
"expiresAt": {
|
|
340
|
-
"type":
|
|
327
|
+
"type": [
|
|
328
|
+
"string",
|
|
329
|
+
"null"
|
|
330
|
+
],
|
|
341
331
|
"format": "date-time",
|
|
342
|
-
"description": "When
|
|
332
|
+
"description": "When it lapses, or null when it does not."
|
|
343
333
|
}
|
|
344
334
|
}
|
|
345
335
|
},
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/install/claim/finish/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTCInstallClaimFinishPayload {
|
|
7
|
+
installToken: string;
|
|
8
|
+
/**
|
|
9
|
+
* From claim/start.
|
|
10
|
+
*/
|
|
11
|
+
registrationId: string;
|
|
12
|
+
/**
|
|
13
|
+
* RegisterPublicKeyCredential from navigator.credentials.create() (opaque here).
|
|
14
|
+
*/
|
|
15
|
+
webauthnResponse: {};
|
|
16
|
+
ext?: Ext;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
|
|
20
|
+
*/
|
|
21
|
+
export interface Ext {
|
|
22
|
+
[k: string]: unknown | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface VTCInstallClaimFinishResponsePayload {
|
|
25
|
+
/**
|
|
26
|
+
* Candidate admin DID derived from the passkey's Ed25519 public key.
|
|
27
|
+
*/
|
|
28
|
+
adminDid: string;
|
|
29
|
+
/**
|
|
30
|
+
* EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap.
|
|
31
|
+
*/
|
|
32
|
+
setupSessionToken: string;
|
|
33
|
+
ext?: Ext;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Trust Task type URI. */
|
|
37
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/finish/0.2" as const;
|
|
38
|
+
|
|
39
|
+
/** Stable alias for this specification's request payload shape. */
|
|
40
|
+
export type Payload = VTCInstallClaimFinishPayload;
|
|
41
|
+
|
|
42
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
43
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/finish/0.2#response" as const;
|
|
44
|
+
|
|
45
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
46
|
+
export type Response = VTCInstallClaimFinishResponsePayload;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* This specification's payload schema, as a value.
|
|
50
|
+
*
|
|
51
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
52
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
53
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
54
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
55
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
56
|
+
*/
|
|
57
|
+
export const PAYLOAD_SCHEMA = {
|
|
58
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
59
|
+
"$id": "https://trusttasks.org/spec/vtc/install/claim/finish/0.2",
|
|
60
|
+
"title": "VTC Install Claim Finish — payload",
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": [
|
|
64
|
+
"installToken",
|
|
65
|
+
"registrationId",
|
|
66
|
+
"webauthnResponse"
|
|
67
|
+
],
|
|
68
|
+
"properties": {
|
|
69
|
+
"installToken": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1
|
|
72
|
+
},
|
|
73
|
+
"registrationId": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1,
|
|
76
|
+
"description": "From claim/start."
|
|
77
|
+
},
|
|
78
|
+
"webauthnResponse": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"description": "RegisterPublicKeyCredential from navigator.credentials.create() (opaque here)."
|
|
81
|
+
},
|
|
82
|
+
"ext": {
|
|
83
|
+
"$ref": "#/$defs/Ext"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"$defs": {
|
|
87
|
+
"Response": {
|
|
88
|
+
"$anchor": "response",
|
|
89
|
+
"title": "VTC Install Claim Finish — response payload",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"adminDid",
|
|
94
|
+
"setupSessionToken"
|
|
95
|
+
],
|
|
96
|
+
"properties": {
|
|
97
|
+
"adminDid": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^did:key:z",
|
|
100
|
+
"description": "Candidate admin DID derived from the passkey's Ed25519 public key."
|
|
101
|
+
},
|
|
102
|
+
"setupSessionToken": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"minLength": 1,
|
|
105
|
+
"description": "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap."
|
|
106
|
+
},
|
|
107
|
+
"ext": {
|
|
108
|
+
"$ref": "#/$defs/Ext"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"Ext": {
|
|
113
|
+
"title": "Ext",
|
|
114
|
+
"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.",
|
|
115
|
+
"type": "object",
|
|
116
|
+
"minProperties": 1,
|
|
117
|
+
"additionalProperties": true,
|
|
118
|
+
"propertyNames": {
|
|
119
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} as const;
|
|
124
|
+
|
|
125
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
126
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
127
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
128
|
+
"$ref": "#/$defs/Response",
|
|
129
|
+
"$defs": {
|
|
130
|
+
"Response": {
|
|
131
|
+
"$anchor": "response",
|
|
132
|
+
"title": "VTC Install Claim Finish — response payload",
|
|
133
|
+
"type": "object",
|
|
134
|
+
"additionalProperties": false,
|
|
135
|
+
"required": [
|
|
136
|
+
"adminDid",
|
|
137
|
+
"setupSessionToken"
|
|
138
|
+
],
|
|
139
|
+
"properties": {
|
|
140
|
+
"adminDid": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"pattern": "^did:key:z",
|
|
143
|
+
"description": "Candidate admin DID derived from the passkey's Ed25519 public key."
|
|
144
|
+
},
|
|
145
|
+
"setupSessionToken": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"description": "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap."
|
|
149
|
+
},
|
|
150
|
+
"ext": {
|
|
151
|
+
"$ref": "#/$defs/Ext"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"Ext": {
|
|
156
|
+
"title": "Ext",
|
|
157
|
+
"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.",
|
|
158
|
+
"type": "object",
|
|
159
|
+
"minProperties": 1,
|
|
160
|
+
"additionalProperties": true,
|
|
161
|
+
"propertyNames": {
|
|
162
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
} as const;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
170
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
171
|
+
* per-specification and cannot be derived from the document alone, and
|
|
172
|
+
* item 2 needs the schema this carries.
|
|
173
|
+
*/
|
|
174
|
+
export const SPEC = {
|
|
175
|
+
typeUri: TYPE_URI,
|
|
176
|
+
isBearer: false,
|
|
177
|
+
isProofRequired: false,
|
|
178
|
+
isRecipientRequired: true,
|
|
179
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
180
|
+
} as const;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
184
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
185
|
+
* parties (§7.3 item 5).
|
|
186
|
+
*/
|
|
187
|
+
export const RESPONSE_SPEC = {
|
|
188
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
189
|
+
isBearer: false,
|
|
190
|
+
isProofRequired: false,
|
|
191
|
+
isRecipientRequired: true,
|
|
192
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
193
|
+
} as const;
|
|
@@ -8,6 +8,14 @@ export interface VTCInstallClaimStartPayload {
|
|
|
8
8
|
* The EdDSA-signed install JWT (aud=vtc-install) printed by vtc setup.
|
|
9
9
|
*/
|
|
10
10
|
installToken: string;
|
|
11
|
+
/**
|
|
12
|
+
* A short code the operator receives **out of band**, alongside the install URL but through a separate channel.
|
|
13
|
+
*
|
|
14
|
+
* The second factor on a claim: the URL alone is deliberately insufficient, so a stolen or forwarded install link cannot claim the passkey by itself. A maintainer that mints one shows the plaintext once and stores only a hash; a claim that omits or fails it is refused before any registration challenge is issued.
|
|
15
|
+
*
|
|
16
|
+
* Optional in the schema because a maintainer may issue tokens without one — but a maintainer that does issue one MUST require it, and SHOULD issue one for any invite that travels over a channel it does not control.
|
|
17
|
+
*/
|
|
18
|
+
claimSecret?: string;
|
|
11
19
|
ext?: Ext;
|
|
12
20
|
}
|
|
13
21
|
/**
|
|
@@ -68,6 +76,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
68
76
|
"minLength": 1,
|
|
69
77
|
"description": "The EdDSA-signed install JWT (aud=vtc-install) printed by vtc setup."
|
|
70
78
|
},
|
|
79
|
+
"claimSecret": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"description": "A short code the operator receives **out of band**, alongside the install URL but through a separate channel.\n\nThe second factor on a claim: the URL alone is deliberately insufficient, so a stolen or forwarded install link cannot claim the passkey by itself. A maintainer that mints one shows the plaintext once and stores only a hash; a claim that omits or fails it is refused before any registration challenge is issued.\n\nOptional in the schema because a maintainer may issue tokens without one — but a maintainer that does issue one MUST require it, and SHOULD issue one for any invite that travels over a channel it does not control."
|
|
83
|
+
},
|
|
71
84
|
"ext": {
|
|
72
85
|
"$ref": "#/$defs/Ext"
|
|
73
86
|
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/install/claim/start/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface VTCInstallClaimStartPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The EdDSA-signed install JWT (aud=vtc-install) printed by vtc setup.
|
|
9
|
+
*/
|
|
10
|
+
installToken: string;
|
|
11
|
+
/**
|
|
12
|
+
* A short code the operator receives **out of band**, alongside the install URL but through a separate channel.
|
|
13
|
+
*
|
|
14
|
+
* The second factor on a claim: the URL alone is deliberately insufficient, so a stolen or forwarded install link cannot claim the passkey by itself. A maintainer that mints one shows the plaintext once and stores only a hash; a claim that omits or fails it is refused before any registration challenge is issued.
|
|
15
|
+
*
|
|
16
|
+
* Optional in the schema because a maintainer may issue tokens without one — but a maintainer that does issue one MUST require it, and SHOULD issue one for any invite that travels over a channel it does not control.
|
|
17
|
+
*/
|
|
18
|
+
claimSecret?: string;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
export interface Ext {
|
|
25
|
+
[k: string]: unknown | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface VTCInstallClaimStartResponsePayload {
|
|
28
|
+
/**
|
|
29
|
+
* Echoes the install token's jti (a UUID); pass it back to claim/finish.
|
|
30
|
+
*/
|
|
31
|
+
registrationId: string;
|
|
32
|
+
/**
|
|
33
|
+
* WebAuthn PublicKeyCredentialCreationOptions (opaque here); pubKeyCredParams = [{public-key, -8}].
|
|
34
|
+
*/
|
|
35
|
+
options: {};
|
|
36
|
+
ext?: Ext;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Trust Task type URI. */
|
|
40
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/start/0.2" as const;
|
|
41
|
+
|
|
42
|
+
/** Stable alias for this specification's request payload shape. */
|
|
43
|
+
export type Payload = VTCInstallClaimStartPayload;
|
|
44
|
+
|
|
45
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
46
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/start/0.2#response" as const;
|
|
47
|
+
|
|
48
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
49
|
+
export type Response = VTCInstallClaimStartResponsePayload;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* This specification's payload schema, as a value.
|
|
53
|
+
*
|
|
54
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
55
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
56
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
57
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
58
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
59
|
+
*/
|
|
60
|
+
export const PAYLOAD_SCHEMA = {
|
|
61
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
62
|
+
"$id": "https://trusttasks.org/spec/vtc/install/claim/start/0.2",
|
|
63
|
+
"title": "VTC Install Claim Start — payload",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": [
|
|
67
|
+
"installToken"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"installToken": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"minLength": 1,
|
|
73
|
+
"description": "The EdDSA-signed install JWT (aud=vtc-install) printed by vtc setup."
|
|
74
|
+
},
|
|
75
|
+
"claimSecret": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"description": "A short code the operator receives **out of band**, alongside the install URL but through a separate channel.\n\nThe second factor on a claim: the URL alone is deliberately insufficient, so a stolen or forwarded install link cannot claim the passkey by itself. A maintainer that mints one shows the plaintext once and stores only a hash; a claim that omits or fails it is refused before any registration challenge is issued.\n\nOptional in the schema because a maintainer may issue tokens without one — but a maintainer that does issue one MUST require it, and SHOULD issue one for any invite that travels over a channel it does not control."
|
|
79
|
+
},
|
|
80
|
+
"ext": {
|
|
81
|
+
"$ref": "#/$defs/Ext"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"$defs": {
|
|
85
|
+
"Response": {
|
|
86
|
+
"$anchor": "response",
|
|
87
|
+
"title": "VTC Install Claim Start — response payload",
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": [
|
|
91
|
+
"registrationId",
|
|
92
|
+
"options"
|
|
93
|
+
],
|
|
94
|
+
"properties": {
|
|
95
|
+
"registrationId": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"minLength": 1,
|
|
98
|
+
"description": "Echoes the install token's jti (a UUID); pass it back to claim/finish."
|
|
99
|
+
},
|
|
100
|
+
"options": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "WebAuthn PublicKeyCredentialCreationOptions (opaque here); pubKeyCredParams = [{public-key, -8}]."
|
|
103
|
+
},
|
|
104
|
+
"ext": {
|
|
105
|
+
"$ref": "#/$defs/Ext"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"Ext": {
|
|
110
|
+
"title": "Ext",
|
|
111
|
+
"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.",
|
|
112
|
+
"type": "object",
|
|
113
|
+
"minProperties": 1,
|
|
114
|
+
"additionalProperties": true,
|
|
115
|
+
"propertyNames": {
|
|
116
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} as const;
|
|
121
|
+
|
|
122
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
123
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
124
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
125
|
+
"$ref": "#/$defs/Response",
|
|
126
|
+
"$defs": {
|
|
127
|
+
"Response": {
|
|
128
|
+
"$anchor": "response",
|
|
129
|
+
"title": "VTC Install Claim Start — response payload",
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": [
|
|
133
|
+
"registrationId",
|
|
134
|
+
"options"
|
|
135
|
+
],
|
|
136
|
+
"properties": {
|
|
137
|
+
"registrationId": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"minLength": 1,
|
|
140
|
+
"description": "Echoes the install token's jti (a UUID); pass it back to claim/finish."
|
|
141
|
+
},
|
|
142
|
+
"options": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"description": "WebAuthn PublicKeyCredentialCreationOptions (opaque here); pubKeyCredParams = [{public-key, -8}]."
|
|
145
|
+
},
|
|
146
|
+
"ext": {
|
|
147
|
+
"$ref": "#/$defs/Ext"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"Ext": {
|
|
152
|
+
"title": "Ext",
|
|
153
|
+
"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.",
|
|
154
|
+
"type": "object",
|
|
155
|
+
"minProperties": 1,
|
|
156
|
+
"additionalProperties": true,
|
|
157
|
+
"propertyNames": {
|
|
158
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
} as const;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
166
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
167
|
+
* per-specification and cannot be derived from the document alone, and
|
|
168
|
+
* item 2 needs the schema this carries.
|
|
169
|
+
*/
|
|
170
|
+
export const SPEC = {
|
|
171
|
+
typeUri: TYPE_URI,
|
|
172
|
+
isBearer: false,
|
|
173
|
+
isProofRequired: false,
|
|
174
|
+
isRecipientRequired: true,
|
|
175
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
176
|
+
} as const;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
180
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
181
|
+
* parties (§7.3 item 5).
|
|
182
|
+
*/
|
|
183
|
+
export const RESPONSE_SPEC = {
|
|
184
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
185
|
+
isBearer: false,
|
|
186
|
+
isProofRequired: false,
|
|
187
|
+
isRecipientRequired: true,
|
|
188
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
189
|
+
} as const;
|