@openvtc/trust-tasks 0.12.10 → 0.12.12

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 (31) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +5 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/vtc/_shared/0.1/ceremony.d.ts +11 -0
  6. package/dist/vtc/_shared/0.1/ceremony.d.ts.map +1 -0
  7. package/dist/vtc/_shared/0.1/ceremony.js +6 -0
  8. package/dist/vtc/_shared/0.1/ceremony.js.map +1 -0
  9. package/dist/vtc/auth/recognise/0.2/payload.d.ts +326 -0
  10. package/dist/vtc/auth/recognise/0.2/payload.d.ts.map +1 -0
  11. package/dist/vtc/auth/recognise/0.2/payload.js +185 -0
  12. package/dist/vtc/auth/recognise/0.2/payload.js.map +1 -0
  13. package/dist/vtc/install/claim/finish/0.2/payload.d.ts +271 -0
  14. package/dist/vtc/install/claim/finish/0.2/payload.d.ts.map +1 -0
  15. package/dist/vtc/install/claim/finish/0.2/payload.js +152 -0
  16. package/dist/vtc/install/claim/finish/0.2/payload.js.map +1 -0
  17. package/dist/vtc/install/claim/start/0.2/payload.d.ts +264 -0
  18. package/dist/vtc/install/claim/start/0.2/payload.d.ts.map +1 -0
  19. package/dist/vtc/install/claim/start/0.2/payload.js +145 -0
  20. package/dist/vtc/install/claim/start/0.2/payload.js.map +1 -0
  21. package/dist/vtc/join-requests/submit/0.2/payload.d.ts +605 -0
  22. package/dist/vtc/join-requests/submit/0.2/payload.d.ts.map +1 -0
  23. package/dist/vtc/join-requests/submit/0.2/payload.js +311 -0
  24. package/dist/vtc/join-requests/submit/0.2/payload.js.map +1 -0
  25. package/package.json +1 -1
  26. package/src/index.ts +5 -0
  27. package/src/vtc/_shared/0.1/ceremony.ts +11 -0
  28. package/src/vtc/auth/recognise/0.2/payload.ts +231 -0
  29. package/src/vtc/install/claim/finish/0.2/payload.ts +193 -0
  30. package/src/vtc/install/claim/start/0.2/payload.ts +189 -0
  31. package/src/vtc/join-requests/submit/0.2/payload.ts +409 -0
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/auth/recognise/0.2/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/auth/recognise/0.2";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/auth/recognise/0.2#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/vtc/auth/recognise/0.2",
21
+ "title": "VTC Auth Recognise — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "presentation"
26
+ ],
27
+ "properties": {
28
+ "presentation": {
29
+ "type": "object",
30
+ "description": "A holder-signed W3C Verifiable Presentation embedding the foreign membership and endorsement credentials in `verifiableCredential`.\n\nThe holder proof MUST use `proofPurpose: authentication`, MUST commit to the single-use `nonce` issued by `vtc/auth/recognise/challenge`, and MUST name the recognising community's DID as `domain`. A consumer MUST verify the holder proof, verify each embedded credential's issuer proof, and refuse unless the presentation's holder is the credentials' subject."
31
+ },
32
+ "ext": {
33
+ "$ref": "#/$defs/Ext"
34
+ }
35
+ },
36
+ "$defs": {
37
+ "Response": {
38
+ "$anchor": "response",
39
+ "title": "VTC Auth Recognise — response payload",
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": [
43
+ "sessionId",
44
+ "data"
45
+ ],
46
+ "properties": {
47
+ "sessionId": {
48
+ "type": "string",
49
+ "pattern": "^xc-",
50
+ "description": "A cross-community session id (xc-<uuid>), distinguishing it from local-member sessions."
51
+ },
52
+ "data": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "accessToken",
57
+ "accessExpiresAt",
58
+ "foreignIssuerDid",
59
+ "mappedRole"
60
+ ],
61
+ "properties": {
62
+ "accessToken": {
63
+ "type": "string"
64
+ },
65
+ "accessExpiresAt": {
66
+ "type": "integer",
67
+ "minimum": 0,
68
+ "description": "Unix-seconds expiry, clamped to min(local default, earliest of the vec/vmc validUntil)."
69
+ },
70
+ "foreignIssuerDid": {
71
+ "type": "string"
72
+ },
73
+ "mappedRole": {
74
+ "type": "string",
75
+ "description": "The LOCAL role from cross_community_roles policy — not the foreign role."
76
+ }
77
+ }
78
+ },
79
+ "ext": {
80
+ "$ref": "#/$defs/Ext"
81
+ }
82
+ }
83
+ },
84
+ "Ext": {
85
+ "title": "Ext",
86
+ "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.",
87
+ "type": "object",
88
+ "minProperties": 1,
89
+ "additionalProperties": true,
90
+ "propertyNames": {
91
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
92
+ }
93
+ }
94
+ }
95
+ };
96
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
97
+ export const RESPONSE_PAYLOAD_SCHEMA = {
98
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
99
+ "$ref": "#/$defs/Response",
100
+ "$defs": {
101
+ "Response": {
102
+ "$anchor": "response",
103
+ "title": "VTC Auth Recognise — response payload",
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": [
107
+ "sessionId",
108
+ "data"
109
+ ],
110
+ "properties": {
111
+ "sessionId": {
112
+ "type": "string",
113
+ "pattern": "^xc-",
114
+ "description": "A cross-community session id (xc-<uuid>), distinguishing it from local-member sessions."
115
+ },
116
+ "data": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": [
120
+ "accessToken",
121
+ "accessExpiresAt",
122
+ "foreignIssuerDid",
123
+ "mappedRole"
124
+ ],
125
+ "properties": {
126
+ "accessToken": {
127
+ "type": "string"
128
+ },
129
+ "accessExpiresAt": {
130
+ "type": "integer",
131
+ "minimum": 0,
132
+ "description": "Unix-seconds expiry, clamped to min(local default, earliest of the vec/vmc validUntil)."
133
+ },
134
+ "foreignIssuerDid": {
135
+ "type": "string"
136
+ },
137
+ "mappedRole": {
138
+ "type": "string",
139
+ "description": "The LOCAL role from cross_community_roles policy — not the foreign role."
140
+ }
141
+ }
142
+ },
143
+ "ext": {
144
+ "$ref": "#/$defs/Ext"
145
+ }
146
+ }
147
+ },
148
+ "Ext": {
149
+ "title": "Ext",
150
+ "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.",
151
+ "type": "object",
152
+ "minProperties": 1,
153
+ "additionalProperties": true,
154
+ "propertyNames": {
155
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
156
+ }
157
+ }
158
+ }
159
+ };
160
+ /**
161
+ * SPEC.md §7.2 policy for the request variant, from this specification's
162
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
163
+ * per-specification and cannot be derived from the document alone, and
164
+ * item 2 needs the schema this carries.
165
+ */
166
+ export const SPEC = {
167
+ typeUri: TYPE_URI,
168
+ isBearer: false,
169
+ isProofRequired: false,
170
+ isRecipientRequired: true,
171
+ payloadSchema: PAYLOAD_SCHEMA,
172
+ };
173
+ /**
174
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
175
+ * tracks the *issuer* party's requirement because a response swaps the
176
+ * parties (§7.3 item 5).
177
+ */
178
+ export const RESPONSE_SPEC = {
179
+ typeUri: RESPONSE_TYPE_URI,
180
+ isBearer: false,
181
+ isProofRequired: false,
182
+ isRecipientRequired: true,
183
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
184
+ };
185
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/auth/recognise/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,oDAA6D,CAAC;AAKtF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,6DAAsE,CAAC;AAKxG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,oDAAoD;IAC3D,OAAO,EAAE,8BAA8B;IACvC,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,cAAc;KACf;IACD,YAAY,EAAE;QACZ,cAAc,EAAE;YACd,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,+eAA+e;SAC/f;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;SACtB;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,uCAAuC;YAChD,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,WAAW;gBACX,MAAM;aACP;YACD,YAAY,EAAE;gBACZ,WAAW,EAAE;oBACX,MAAM,EAAE,QAAQ;oBAChB,SAAS,EAAE,MAAM;oBACjB,aAAa,EAAE,yFAAyF;iBACzG;gBACD,MAAM,EAAE;oBACN,MAAM,EAAE,QAAQ;oBAChB,sBAAsB,EAAE,KAAK;oBAC7B,UAAU,EAAE;wBACV,aAAa;wBACb,iBAAiB;wBACjB,kBAAkB;wBAClB,YAAY;qBACb;oBACD,YAAY,EA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AAE;4BACjB,MAAM,EAAE,SAAS;4BACjB,SAAS,EAAE,CAAC;4BACZ,aAAa,EAAE,yFAAyF;yBACzG;wBACD,kBAAkB,EAAE;4BAClB,MAAM,EAAE,QAAQ;yBACjB;wBACD,YAAY,EAAE;4BACZ,MAAM,EAAE,QAAQ;4BAChB,aAAa,EAAE,0EAA0E;yBAC1F;qBACF;iBACF;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,aAAa;iBACtB;aACF;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,uKAAuK;YACtL,MAAM,EAAE,QAAQ;YAChB,eAAe,EAAE,CAAC;YAClB,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE;gBACf,SAAS,EAAE,mCAAmC;aAC/C;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
@@ -0,0 +1,271 @@
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
+ export interface VTCInstallClaimFinishPayload {
6
+ installToken: string;
7
+ /**
8
+ * From claim/start.
9
+ */
10
+ registrationId: string;
11
+ /**
12
+ * RegisterPublicKeyCredential from navigator.credentials.create() (opaque here).
13
+ */
14
+ webauthnResponse: {};
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
+ export interface VTCInstallClaimFinishResponsePayload {
24
+ /**
25
+ * Candidate admin DID derived from the passkey's Ed25519 public key.
26
+ */
27
+ adminDid: string;
28
+ /**
29
+ * EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap.
30
+ */
31
+ setupSessionToken: string;
32
+ ext?: Ext;
33
+ }
34
+ /** Trust Task type URI. */
35
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/install/claim/finish/0.2";
36
+ /** Stable alias for this specification's request payload shape. */
37
+ export type Payload = VTCInstallClaimFinishPayload;
38
+ /** Trust Task response type URI (request type URI + "#response"). */
39
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/install/claim/finish/0.2#response";
40
+ /** Stable alias for this specification's success-response payload shape. */
41
+ export type Response = VTCInstallClaimFinishResponsePayload;
42
+ /**
43
+ * This specification's payload schema, as a value.
44
+ *
45
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
46
+ * rather than only as a `.json` file because TypeScript types are erased
47
+ * at runtime: without a schema a consumer has nothing to validate, and
48
+ * every REQUIRED payload member is optional in practice. Cross-file
49
+ * `$ref`s are already inlined, so it needs no resolver.
50
+ */
51
+ export declare const PAYLOAD_SCHEMA: {
52
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
53
+ readonly $id: "https://trusttasks.org/spec/vtc/install/claim/finish/0.2";
54
+ readonly title: "VTC Install Claim Finish — payload";
55
+ readonly type: "object";
56
+ readonly additionalProperties: false;
57
+ readonly required: readonly ["installToken", "registrationId", "webauthnResponse"];
58
+ readonly properties: {
59
+ readonly installToken: {
60
+ readonly type: "string";
61
+ readonly minLength: 1;
62
+ };
63
+ readonly registrationId: {
64
+ readonly type: "string";
65
+ readonly minLength: 1;
66
+ readonly description: "From claim/start.";
67
+ };
68
+ readonly webauthnResponse: {
69
+ readonly type: "object";
70
+ readonly description: "RegisterPublicKeyCredential from navigator.credentials.create() (opaque here).";
71
+ };
72
+ readonly ext: {
73
+ readonly $ref: "#/$defs/Ext";
74
+ };
75
+ };
76
+ readonly $defs: {
77
+ readonly Response: {
78
+ readonly $anchor: "response";
79
+ readonly title: "VTC Install Claim Finish — response payload";
80
+ readonly type: "object";
81
+ readonly additionalProperties: false;
82
+ readonly required: readonly ["adminDid", "setupSessionToken"];
83
+ readonly properties: {
84
+ readonly adminDid: {
85
+ readonly type: "string";
86
+ readonly pattern: "^did:key:z";
87
+ readonly description: "Candidate admin DID derived from the passkey's Ed25519 public key.";
88
+ };
89
+ readonly setupSessionToken: {
90
+ readonly type: "string";
91
+ readonly minLength: 1;
92
+ readonly description: "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap.";
93
+ };
94
+ readonly ext: {
95
+ readonly $ref: "#/$defs/Ext";
96
+ };
97
+ };
98
+ };
99
+ readonly Ext: {
100
+ readonly title: "Ext";
101
+ readonly 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.";
102
+ readonly type: "object";
103
+ readonly minProperties: 1;
104
+ readonly additionalProperties: true;
105
+ readonly propertyNames: {
106
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
107
+ };
108
+ };
109
+ };
110
+ };
111
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
112
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
113
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
114
+ readonly $ref: "#/$defs/Response";
115
+ readonly $defs: {
116
+ readonly Response: {
117
+ readonly $anchor: "response";
118
+ readonly title: "VTC Install Claim Finish — response payload";
119
+ readonly type: "object";
120
+ readonly additionalProperties: false;
121
+ readonly required: readonly ["adminDid", "setupSessionToken"];
122
+ readonly properties: {
123
+ readonly adminDid: {
124
+ readonly type: "string";
125
+ readonly pattern: "^did:key:z";
126
+ readonly description: "Candidate admin DID derived from the passkey's Ed25519 public key.";
127
+ };
128
+ readonly setupSessionToken: {
129
+ readonly type: "string";
130
+ readonly minLength: 1;
131
+ readonly description: "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap.";
132
+ };
133
+ readonly ext: {
134
+ readonly $ref: "#/$defs/Ext";
135
+ };
136
+ };
137
+ };
138
+ readonly Ext: {
139
+ readonly title: "Ext";
140
+ readonly 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.";
141
+ readonly type: "object";
142
+ readonly minProperties: 1;
143
+ readonly additionalProperties: true;
144
+ readonly propertyNames: {
145
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
146
+ };
147
+ };
148
+ };
149
+ };
150
+ /**
151
+ * SPEC.md §7.2 policy for the request variant, from this specification's
152
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
153
+ * per-specification and cannot be derived from the document alone, and
154
+ * item 2 needs the schema this carries.
155
+ */
156
+ export declare const SPEC: {
157
+ readonly typeUri: "https://trusttasks.org/spec/vtc/install/claim/finish/0.2";
158
+ readonly isBearer: false;
159
+ readonly isProofRequired: false;
160
+ readonly isRecipientRequired: true;
161
+ readonly payloadSchema: {
162
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
163
+ readonly $id: "https://trusttasks.org/spec/vtc/install/claim/finish/0.2";
164
+ readonly title: "VTC Install Claim Finish — payload";
165
+ readonly type: "object";
166
+ readonly additionalProperties: false;
167
+ readonly required: readonly ["installToken", "registrationId", "webauthnResponse"];
168
+ readonly properties: {
169
+ readonly installToken: {
170
+ readonly type: "string";
171
+ readonly minLength: 1;
172
+ };
173
+ readonly registrationId: {
174
+ readonly type: "string";
175
+ readonly minLength: 1;
176
+ readonly description: "From claim/start.";
177
+ };
178
+ readonly webauthnResponse: {
179
+ readonly type: "object";
180
+ readonly description: "RegisterPublicKeyCredential from navigator.credentials.create() (opaque here).";
181
+ };
182
+ readonly ext: {
183
+ readonly $ref: "#/$defs/Ext";
184
+ };
185
+ };
186
+ readonly $defs: {
187
+ readonly Response: {
188
+ readonly $anchor: "response";
189
+ readonly title: "VTC Install Claim Finish — response payload";
190
+ readonly type: "object";
191
+ readonly additionalProperties: false;
192
+ readonly required: readonly ["adminDid", "setupSessionToken"];
193
+ readonly properties: {
194
+ readonly adminDid: {
195
+ readonly type: "string";
196
+ readonly pattern: "^did:key:z";
197
+ readonly description: "Candidate admin DID derived from the passkey's Ed25519 public key.";
198
+ };
199
+ readonly setupSessionToken: {
200
+ readonly type: "string";
201
+ readonly minLength: 1;
202
+ readonly description: "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap.";
203
+ };
204
+ readonly ext: {
205
+ readonly $ref: "#/$defs/Ext";
206
+ };
207
+ };
208
+ };
209
+ readonly Ext: {
210
+ readonly title: "Ext";
211
+ readonly 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.";
212
+ readonly type: "object";
213
+ readonly minProperties: 1;
214
+ readonly additionalProperties: true;
215
+ readonly propertyNames: {
216
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
217
+ };
218
+ };
219
+ };
220
+ };
221
+ };
222
+ /**
223
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
224
+ * tracks the *issuer* party's requirement because a response swaps the
225
+ * parties (§7.3 item 5).
226
+ */
227
+ export declare const RESPONSE_SPEC: {
228
+ readonly typeUri: "https://trusttasks.org/spec/vtc/install/claim/finish/0.2#response";
229
+ readonly isBearer: false;
230
+ readonly isProofRequired: false;
231
+ readonly isRecipientRequired: true;
232
+ readonly payloadSchema: {
233
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
234
+ readonly $ref: "#/$defs/Response";
235
+ readonly $defs: {
236
+ readonly Response: {
237
+ readonly $anchor: "response";
238
+ readonly title: "VTC Install Claim Finish — response payload";
239
+ readonly type: "object";
240
+ readonly additionalProperties: false;
241
+ readonly required: readonly ["adminDid", "setupSessionToken"];
242
+ readonly properties: {
243
+ readonly adminDid: {
244
+ readonly type: "string";
245
+ readonly pattern: "^did:key:z";
246
+ readonly description: "Candidate admin DID derived from the passkey's Ed25519 public key.";
247
+ };
248
+ readonly setupSessionToken: {
249
+ readonly type: "string";
250
+ readonly minLength: 1;
251
+ readonly description: "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap.";
252
+ };
253
+ readonly ext: {
254
+ readonly $ref: "#/$defs/Ext";
255
+ };
256
+ };
257
+ };
258
+ readonly Ext: {
259
+ readonly title: "Ext";
260
+ readonly 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.";
261
+ readonly type: "object";
262
+ readonly minProperties: 1;
263
+ readonly additionalProperties: true;
264
+ readonly propertyNames: {
265
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
266
+ };
267
+ };
268
+ };
269
+ };
270
+ };
271
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/install/claim/finish/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,gBAAgB,EAAE,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,0DAAmE,CAAC;AAE5F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAEnD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,mEAA4E,CAAC;AAE9G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,oCAAoC,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}
@@ -0,0 +1,152 @@
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
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/finish/0.2";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/install/claim/finish/0.2#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/vtc/install/claim/finish/0.2",
21
+ "title": "VTC Install Claim Finish — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "installToken",
26
+ "registrationId",
27
+ "webauthnResponse"
28
+ ],
29
+ "properties": {
30
+ "installToken": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "registrationId": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "description": "From claim/start."
38
+ },
39
+ "webauthnResponse": {
40
+ "type": "object",
41
+ "description": "RegisterPublicKeyCredential from navigator.credentials.create() (opaque here)."
42
+ },
43
+ "ext": {
44
+ "$ref": "#/$defs/Ext"
45
+ }
46
+ },
47
+ "$defs": {
48
+ "Response": {
49
+ "$anchor": "response",
50
+ "title": "VTC Install Claim Finish — response payload",
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "adminDid",
55
+ "setupSessionToken"
56
+ ],
57
+ "properties": {
58
+ "adminDid": {
59
+ "type": "string",
60
+ "pattern": "^did:key:z",
61
+ "description": "Candidate admin DID derived from the passkey's Ed25519 public key."
62
+ },
63
+ "setupSessionToken": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "description": "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap."
67
+ },
68
+ "ext": {
69
+ "$ref": "#/$defs/Ext"
70
+ }
71
+ }
72
+ },
73
+ "Ext": {
74
+ "title": "Ext",
75
+ "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.",
76
+ "type": "object",
77
+ "minProperties": 1,
78
+ "additionalProperties": true,
79
+ "propertyNames": {
80
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
81
+ }
82
+ }
83
+ }
84
+ };
85
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
86
+ export const RESPONSE_PAYLOAD_SCHEMA = {
87
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
88
+ "$ref": "#/$defs/Response",
89
+ "$defs": {
90
+ "Response": {
91
+ "$anchor": "response",
92
+ "title": "VTC Install Claim Finish — response payload",
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "required": [
96
+ "adminDid",
97
+ "setupSessionToken"
98
+ ],
99
+ "properties": {
100
+ "adminDid": {
101
+ "type": "string",
102
+ "pattern": "^did:key:z",
103
+ "description": "Candidate admin DID derived from the passkey's Ed25519 public key."
104
+ },
105
+ "setupSessionToken": {
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "description": "EdDSA JWT (aud=vtc-install-session, 5min TTL) consumed by admin/bootstrap."
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext"
112
+ }
113
+ }
114
+ },
115
+ "Ext": {
116
+ "title": "Ext",
117
+ "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.",
118
+ "type": "object",
119
+ "minProperties": 1,
120
+ "additionalProperties": true,
121
+ "propertyNames": {
122
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
123
+ }
124
+ }
125
+ }
126
+ };
127
+ /**
128
+ * SPEC.md §7.2 policy for the request variant, from this specification's
129
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
130
+ * per-specification and cannot be derived from the document alone, and
131
+ * item 2 needs the schema this carries.
132
+ */
133
+ export const SPEC = {
134
+ typeUri: TYPE_URI,
135
+ isBearer: false,
136
+ isProofRequired: false,
137
+ isRecipientRequired: true,
138
+ payloadSchema: PAYLOAD_SCHEMA,
139
+ };
140
+ /**
141
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
142
+ * tracks the *issuer* party's requirement because a response swaps the
143
+ * parties (§7.3 item 5).
144
+ */
145
+ export const RESPONSE_SPEC = {
146
+ typeUri: RESPONSE_TYPE_URI,
147
+ isBearer: false,
148
+ isProofRequired: false,
149
+ isRecipientRequired: true,
150
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
151
+ };
152
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vtc/install/claim/finish/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,0DAAmE,CAAC;AAK5F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mEAA4E,CAAC;AAK9G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,0DAA0D;IACjE,OAAO,EAAE,oCAAoC;IAC7C,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,cAAc;QACd,gBAAgB;QAChB,kBAAkB;KACnB;IACD,YAAY,EAAE;QACZ,cAAc,EAAE;YACd,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;SACf;QACD,gBAAgB,EAAE;YAChB,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,mBAAmB;SACnC;QACD,kBAAkB,EAAE;YAClB,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,gFAAgF;SAChG;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;SACtB;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,6CAA6C;YACtD,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,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