@openvtc/trust-tasks 0.25.0 → 0.25.2

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 (130) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/_shared/components.d.ts +308 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +17 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +17 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/provision/vta/_shared/0.1/vta.d.ts +16 -0
  25. package/dist/provision/vta/_shared/0.1/vta.d.ts.map +1 -0
  26. package/dist/provision/vta/_shared/0.1/vta.js +6 -0
  27. package/dist/provision/vta/_shared/0.1/vta.js.map +1 -0
  28. package/dist/provision/vta/claim/0.1/payload.d.ts +115 -0
  29. package/dist/provision/vta/claim/0.1/payload.d.ts.map +1 -0
  30. package/dist/provision/vta/claim/0.1/payload.js +69 -0
  31. package/dist/provision/vta/claim/0.1/payload.js.map +1 -0
  32. package/dist/provision/vta/redeem/0.1/payload.d.ts +371 -0
  33. package/dist/provision/vta/redeem/0.1/payload.d.ts.map +1 -0
  34. package/dist/provision/vta/redeem/0.1/payload.js +207 -0
  35. package/dist/provision/vta/redeem/0.1/payload.js.map +1 -0
  36. package/dist/vetting/_shared/0.1/hidden-vetting.d.ts +16 -0
  37. package/dist/vetting/_shared/0.1/hidden-vetting.d.ts.map +1 -0
  38. package/dist/vetting/_shared/0.1/hidden-vetting.js +6 -0
  39. package/dist/vetting/_shared/0.1/hidden-vetting.js.map +1 -0
  40. package/dist/vetting/attestation/0.1/payload.d.ts +94 -146
  41. package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -1
  42. package/dist/vetting/attestation/0.1/payload.js +43 -43
  43. package/dist/vetting/attestation/0.1/payload.js.map +1 -1
  44. package/dist/vta/_shared/0.4/pcs-engine.d.ts +16 -0
  45. package/dist/vta/_shared/0.4/pcs-engine.d.ts.map +1 -0
  46. package/dist/vta/_shared/0.4/pcs-engine.js +6 -0
  47. package/dist/vta/_shared/0.4/pcs-engine.js.map +1 -0
  48. package/dist/vta/pcs/applications/create/0.1/payload.d.ts +1215 -0
  49. package/dist/vta/pcs/applications/create/0.1/payload.d.ts.map +1 -0
  50. package/dist/vta/pcs/applications/create/0.1/payload.js +724 -0
  51. package/dist/vta/pcs/applications/create/0.1/payload.js.map +1 -0
  52. package/dist/vta/pcs/applications/delete/0.1/payload.d.ts +253 -0
  53. package/dist/vta/pcs/applications/delete/0.1/payload.d.ts.map +1 -0
  54. package/dist/vta/pcs/applications/delete/0.1/payload.js +146 -0
  55. package/dist/vta/pcs/applications/delete/0.1/payload.js.map +1 -0
  56. package/dist/vta/pcs/applications/show/0.1/payload.d.ts +733 -0
  57. package/dist/vta/pcs/applications/show/0.1/payload.d.ts.map +1 -0
  58. package/dist/vta/pcs/applications/show/0.1/payload.js +450 -0
  59. package/dist/vta/pcs/applications/show/0.1/payload.js.map +1 -0
  60. package/dist/vta/pcs/attest/0.1/payload.d.ts +1456 -0
  61. package/dist/vta/pcs/attest/0.1/payload.d.ts.map +1 -0
  62. package/dist/vta/pcs/attest/0.1/payload.js +876 -0
  63. package/dist/vta/pcs/attest/0.1/payload.js.map +1 -0
  64. package/dist/vta/pcs/prove/0.1/payload.d.ts +1348 -0
  65. package/dist/vta/pcs/prove/0.1/payload.d.ts.map +1 -0
  66. package/dist/vta/pcs/prove/0.1/payload.js +804 -0
  67. package/dist/vta/pcs/prove/0.1/payload.js.map +1 -0
  68. package/dist/vta/pcs/root-accept/0.1/payload.d.ts +1100 -0
  69. package/dist/vta/pcs/root-accept/0.1/payload.d.ts.map +1 -0
  70. package/dist/vta/pcs/root-accept/0.1/payload.js +634 -0
  71. package/dist/vta/pcs/root-accept/0.1/payload.js.map +1 -0
  72. package/dist/vta/pcs/root-request/0.1/payload.d.ts +880 -0
  73. package/dist/vta/pcs/root-request/0.1/payload.d.ts.map +1 -0
  74. package/dist/vta/pcs/root-request/0.1/payload.js +496 -0
  75. package/dist/vta/pcs/root-request/0.1/payload.js.map +1 -0
  76. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts +612 -0
  77. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts.map +1 -0
  78. package/dist/vta/pcs/tokens/abandon/0.1/payload.js +355 -0
  79. package/dist/vta/pcs/tokens/abandon/0.1/payload.js.map +1 -0
  80. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts +1149 -0
  81. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts.map +1 -0
  82. package/dist/vta/pcs/tokens/accept/0.1/payload.js +657 -0
  83. package/dist/vta/pcs/tokens/accept/0.1/payload.js.map +1 -0
  84. package/dist/vta/pcs/tokens/request/0.1/payload.d.ts +908 -0
  85. package/dist/vta/pcs/tokens/request/0.1/payload.d.ts.map +1 -0
  86. package/dist/vta/pcs/tokens/request/0.1/payload.js +508 -0
  87. package/dist/vta/pcs/tokens/request/0.1/payload.js.map +1 -0
  88. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts +1423 -0
  89. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts.map +1 -0
  90. package/dist/vta/pcs/verify-attestation/0.1/payload.js +850 -0
  91. package/dist/vta/pcs/verify-attestation/0.1/payload.js.map +1 -0
  92. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts +605 -0
  93. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts.map +1 -0
  94. package/dist/vta/pcs/vetter/show/0.1/payload.js +351 -0
  95. package/dist/vta/pcs/vetter/show/0.1/payload.js.map +1 -0
  96. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts +403 -486
  97. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts.map +1 -1
  98. package/dist/vtc/vetting/hidden/publish/0.1/payload.js +240 -240
  99. package/dist/vtc/vetting/hidden/publish/0.1/payload.js.map +1 -1
  100. package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts +482 -565
  101. package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts.map +1 -1
  102. package/dist/vtc/vetting/hidden/show/0.1/payload.js +294 -294
  103. package/dist/vtc/vetting/hidden/show/0.1/payload.js.map +1 -1
  104. package/package.json +1 -1
  105. package/src/_shared/components.ts +312 -2
  106. package/src/device/list/0.1/payload.ts +6 -2
  107. package/src/device/list/0.2/payload.ts +6 -2
  108. package/src/device/register/0.1/payload.ts +6 -2
  109. package/src/device/register/0.2/payload.ts +6 -2
  110. package/src/index.ts +17 -0
  111. package/src/provision/vta/_shared/0.1/vta.ts +17 -0
  112. package/src/provision/vta/claim/0.1/payload.ts +88 -0
  113. package/src/provision/vta/redeem/0.1/payload.ts +255 -0
  114. package/src/vetting/_shared/0.1/hidden-vetting.ts +17 -0
  115. package/src/vetting/attestation/0.1/payload.ts +49 -101
  116. package/src/vta/_shared/0.4/pcs-engine.ts +17 -0
  117. package/src/vta/pcs/applications/create/0.1/payload.ts +768 -0
  118. package/src/vta/pcs/applications/delete/0.1/payload.ts +182 -0
  119. package/src/vta/pcs/applications/show/0.1/payload.ts +482 -0
  120. package/src/vta/pcs/attest/0.1/payload.ts +943 -0
  121. package/src/vta/pcs/prove/0.1/payload.ts +845 -0
  122. package/src/vta/pcs/root-accept/0.1/payload.ts +681 -0
  123. package/src/vta/pcs/root-request/0.1/payload.ts +559 -0
  124. package/src/vta/pcs/tokens/abandon/0.1/payload.ts +392 -0
  125. package/src/vta/pcs/tokens/accept/0.1/payload.ts +713 -0
  126. package/src/vta/pcs/tokens/request/0.1/payload.ts +581 -0
  127. package/src/vta/pcs/verify-attestation/0.1/payload.ts +888 -0
  128. package/src/vta/pcs/vetter/show/0.1/payload.ts +387 -0
  129. package/src/vtc/vetting/hidden/publish/0.1/payload.ts +247 -331
  130. package/src/vtc/vetting/hidden/show/0.1/payload.ts +295 -379
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/provision/vta/claim/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, Handle } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A wallet claims a VTA that a Farm has reserved behind a `vta-claim` trigger link. The document is the first request of the exchange (VTI-LNK-054): issued and signed by a fresh Ed25519 `did:key` that becomes the VTA's administrator, addressed to the Farm, and carrying the reservation's handle both here and as the envelope's `parentThreadId`. The task defines no `#response`: the Farm answers a `trust-task-next-step` expecting `provision/vta/redeem/0.1`, whose response is the hand-over. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, parentThreadId, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface ProvisionVTAClaimPayload {
13
+ handle: Handle;
14
+ ext?: Ext;
15
+ }
16
+
17
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
18
+ export type { Ext, Handle };
19
+
20
+ /** Trust Task type URI. */
21
+ export const TYPE_URI = "https://trusttasks.org/spec/provision/vta/claim/0.1" as const;
22
+
23
+ /** Stable alias for this specification's request payload shape. */
24
+ export type Payload = ProvisionVTAClaimPayload;
25
+
26
+ /**
27
+ * This specification's payload schema, as a value.
28
+ *
29
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
30
+ * rather than only as a `.json` file because TypeScript types are erased
31
+ * at runtime: without a schema a consumer has nothing to validate, and
32
+ * every REQUIRED payload member is optional in practice. Cross-file
33
+ * `$ref`s are already inlined, so it needs no resolver.
34
+ */
35
+ export const PAYLOAD_SCHEMA = {
36
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
37
+ "$id": "https://trusttasks.org/spec/provision/vta/claim/0.1",
38
+ "title": "Provision — VTA Claim — payload",
39
+ "description": "A wallet claims a VTA that a Farm has reserved behind a `vta-claim` trigger link. The document is the first request of the exchange (VTI-LNK-054): issued and signed by a fresh Ed25519 `did:key` that becomes the VTA's administrator, addressed to the Farm, and carrying the reservation's handle both here and as the envelope's `parentThreadId`. The task defines no `#response`: the Farm answers a `trust-task-next-step` expecting `provision/vta/redeem/0.1`, whose response is the hand-over. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, parentThreadId, proof) are owned by the framework — SPEC §6.3.",
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": [
43
+ "handle"
44
+ ],
45
+ "properties": {
46
+ "handle": {
47
+ "$ref": "#/$defs/Handle"
48
+ },
49
+ "ext": {
50
+ "$ref": "#/$defs/Ext"
51
+ }
52
+ },
53
+ "$defs": {
54
+ "Ext": {
55
+ "title": "Ext",
56
+ "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.",
57
+ "type": "object",
58
+ "minProperties": 1,
59
+ "additionalProperties": true,
60
+ "propertyNames": {
61
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
62
+ }
63
+ },
64
+ "Handle": {
65
+ "title": "Handle",
66
+ "type": "string",
67
+ "minLength": 22,
68
+ "maxLength": 43,
69
+ "pattern": "^[A-Za-z0-9_-]{22,43}$",
70
+ "description": "The Farm-generated handle of one reservation: 16 to 32 bytes from a cryptographically secure random source, written as unpadded base64url (22 to 43 characters; 16 bytes, 22 characters, is what VTI-LNK-116 recommends). It is the `_id` of the trigger link (VTI-LNK-033) and is compared as a string. In a claim it MUST equal the document's `parentThreadId`. It confers no authority on its holder beyond the right to make one claim."
71
+ }
72
+ }
73
+ } as const;
74
+
75
+ /**
76
+ * SPEC.md §7.2 policy for the request variant, from this specification's
77
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
78
+ * per-specification and cannot be derived from the document alone, and
79
+ * item 2 needs the schema this carries.
80
+ */
81
+ export const SPEC = {
82
+ typeUri: TYPE_URI,
83
+ isBearer: false,
84
+ isProofRequired: true,
85
+ isRecipientRequired: true,
86
+ isIssuedAtRequired: true,
87
+ payloadSchema: PAYLOAD_SCHEMA,
88
+ } as const;
@@ -0,0 +1,255 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/provision/vta/redeem/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, Handle } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * The claimant polls the Farm, with the key that made the claim, for the outcome of its claim on a reservation. Each poll is a freshly signed document carrying the handle. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface ProvisionVTARedeemPayload {
13
+ handle: Handle;
14
+ ext?: Ext;
15
+ }
16
+ /**
17
+ * The hand-over, signed by the Farm's assertionMethod key and sent only once the claimant's key is written into the VTA as its administrator and the VTA answers: which VTA, what the claim did, and where the VTA is reachable. Every earlier state is a `trust-task-error` (`pending`, `rejected`, or a family code), never this document.
18
+ */
19
+ export interface ProvisionVTARedeemResponsePayload {
20
+ handle: Handle;
21
+ /**
22
+ * The DID of the VTA the claimant now administers. The Farm chooses the DID method; the VTA Farm issues `did:webvh`.
23
+ */
24
+ vtaDid: string;
25
+ /**
26
+ * What the claim did. `provisionVta`: the claimant is the first administrator of a VTA provisioned for this reservation. `grantAcl`: the claimant was added as an administrator of a VTA that already had one. The Farm derives it from the reservation; the wallet never chooses it.
27
+ */
28
+ operation: "provisionVta" | "grantAcl";
29
+ /**
30
+ * The DID of the DIDComm mediator the VTA is reachable through. A convenience: the wallet can also read it from the VTA's own DID document.
31
+ */
32
+ mediatorDid?: string;
33
+ /**
34
+ * Where the VTA's DID log is served. For `did:webvh` it is the `did.jsonl` URL the DID itself encodes. An `https` URL with no userinfo.
35
+ */
36
+ didLogUrl?: string;
37
+ ext?: Ext;
38
+ }
39
+
40
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
41
+ export type { Ext, Handle };
42
+
43
+ /** Trust Task type URI. */
44
+ export const TYPE_URI = "https://trusttasks.org/spec/provision/vta/redeem/0.1" as const;
45
+
46
+ /** Stable alias for this specification's request payload shape. */
47
+ export type Payload = ProvisionVTARedeemPayload;
48
+
49
+ /** Trust Task response type URI (request type URI + "#response"). */
50
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/provision/vta/redeem/0.1#response" as const;
51
+
52
+ /** Stable alias for this specification's success-response payload shape. */
53
+ export type Response = ProvisionVTARedeemResponsePayload;
54
+
55
+ /**
56
+ * This specification's payload schema, as a value.
57
+ *
58
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
59
+ * rather than only as a `.json` file because TypeScript types are erased
60
+ * at runtime: without a schema a consumer has nothing to validate, and
61
+ * every REQUIRED payload member is optional in practice. Cross-file
62
+ * `$ref`s are already inlined, so it needs no resolver.
63
+ */
64
+ export const PAYLOAD_SCHEMA = {
65
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
66
+ "$id": "https://trusttasks.org/spec/provision/vta/redeem/0.1",
67
+ "title": "Provision — VTA Redeem — payload",
68
+ "description": "The claimant polls the Farm, with the key that made the claim, for the outcome of its claim on a reservation. Each poll is a freshly signed document carrying the handle. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": [
72
+ "handle"
73
+ ],
74
+ "properties": {
75
+ "handle": {
76
+ "$ref": "#/$defs/Handle"
77
+ },
78
+ "ext": {
79
+ "$ref": "#/$defs/Ext"
80
+ }
81
+ },
82
+ "$defs": {
83
+ "Response": {
84
+ "$anchor": "response",
85
+ "title": "Provision — VTA Redeem — response payload",
86
+ "description": "The hand-over, signed by the Farm's assertionMethod key and sent only once the claimant's key is written into the VTA as its administrator and the VTA answers: which VTA, what the claim did, and where the VTA is reachable. Every earlier state is a `trust-task-error` (`pending`, `rejected`, or a family code), never this document.",
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": [
90
+ "handle",
91
+ "vtaDid",
92
+ "operation"
93
+ ],
94
+ "properties": {
95
+ "handle": {
96
+ "$ref": "#/$defs/Handle"
97
+ },
98
+ "vtaDid": {
99
+ "type": "string",
100
+ "minLength": 8,
101
+ "maxLength": 2048,
102
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$",
103
+ "description": "The DID of the VTA the claimant now administers. The Farm chooses the DID method; the VTA Farm issues `did:webvh`."
104
+ },
105
+ "operation": {
106
+ "type": "string",
107
+ "enum": [
108
+ "provisionVta",
109
+ "grantAcl"
110
+ ],
111
+ "description": "What the claim did. `provisionVta`: the claimant is the first administrator of a VTA provisioned for this reservation. `grantAcl`: the claimant was added as an administrator of a VTA that already had one. The Farm derives it from the reservation; the wallet never chooses it."
112
+ },
113
+ "mediatorDid": {
114
+ "type": "string",
115
+ "minLength": 8,
116
+ "maxLength": 2048,
117
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$",
118
+ "description": "The DID of the DIDComm mediator the VTA is reachable through. A convenience: the wallet can also read it from the VTA's own DID document."
119
+ },
120
+ "didLogUrl": {
121
+ "type": "string",
122
+ "minLength": 9,
123
+ "maxLength": 2048,
124
+ "pattern": "^https://[^@/?#\\s]+(/[^\\s]*)?$",
125
+ "description": "Where the VTA's DID log is served. For `did:webvh` it is the `did.jsonl` URL the DID itself encodes. An `https` URL with no userinfo."
126
+ },
127
+ "ext": {
128
+ "$ref": "#/$defs/Ext"
129
+ }
130
+ }
131
+ },
132
+ "Ext": {
133
+ "title": "Ext",
134
+ "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.",
135
+ "type": "object",
136
+ "minProperties": 1,
137
+ "additionalProperties": true,
138
+ "propertyNames": {
139
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
140
+ }
141
+ },
142
+ "Handle": {
143
+ "title": "Handle",
144
+ "type": "string",
145
+ "minLength": 22,
146
+ "maxLength": 43,
147
+ "pattern": "^[A-Za-z0-9_-]{22,43}$",
148
+ "description": "The Farm-generated handle of one reservation: 16 to 32 bytes from a cryptographically secure random source, written as unpadded base64url (22 to 43 characters; 16 bytes, 22 characters, is what VTI-LNK-116 recommends). It is the `_id` of the trigger link (VTI-LNK-033) and is compared as a string. In a claim it MUST equal the document's `parentThreadId`. It confers no authority on its holder beyond the right to make one claim."
149
+ }
150
+ }
151
+ } as const;
152
+
153
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
154
+ export const RESPONSE_PAYLOAD_SCHEMA = {
155
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
156
+ "$ref": "#/$defs/Response",
157
+ "$defs": {
158
+ "Response": {
159
+ "$anchor": "response",
160
+ "title": "Provision — VTA Redeem — response payload",
161
+ "description": "The hand-over, signed by the Farm's assertionMethod key and sent only once the claimant's key is written into the VTA as its administrator and the VTA answers: which VTA, what the claim did, and where the VTA is reachable. Every earlier state is a `trust-task-error` (`pending`, `rejected`, or a family code), never this document.",
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "required": [
165
+ "handle",
166
+ "vtaDid",
167
+ "operation"
168
+ ],
169
+ "properties": {
170
+ "handle": {
171
+ "$ref": "#/$defs/Handle"
172
+ },
173
+ "vtaDid": {
174
+ "type": "string",
175
+ "minLength": 8,
176
+ "maxLength": 2048,
177
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$",
178
+ "description": "The DID of the VTA the claimant now administers. The Farm chooses the DID method; the VTA Farm issues `did:webvh`."
179
+ },
180
+ "operation": {
181
+ "type": "string",
182
+ "enum": [
183
+ "provisionVta",
184
+ "grantAcl"
185
+ ],
186
+ "description": "What the claim did. `provisionVta`: the claimant is the first administrator of a VTA provisioned for this reservation. `grantAcl`: the claimant was added as an administrator of a VTA that already had one. The Farm derives it from the reservation; the wallet never chooses it."
187
+ },
188
+ "mediatorDid": {
189
+ "type": "string",
190
+ "minLength": 8,
191
+ "maxLength": 2048,
192
+ "pattern": "^did:[a-z0-9]+:[^\\s]+$",
193
+ "description": "The DID of the DIDComm mediator the VTA is reachable through. A convenience: the wallet can also read it from the VTA's own DID document."
194
+ },
195
+ "didLogUrl": {
196
+ "type": "string",
197
+ "minLength": 9,
198
+ "maxLength": 2048,
199
+ "pattern": "^https://[^@/?#\\s]+(/[^\\s]*)?$",
200
+ "description": "Where the VTA's DID log is served. For `did:webvh` it is the `did.jsonl` URL the DID itself encodes. An `https` URL with no userinfo."
201
+ },
202
+ "ext": {
203
+ "$ref": "#/$defs/Ext"
204
+ }
205
+ }
206
+ },
207
+ "Ext": {
208
+ "title": "Ext",
209
+ "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.",
210
+ "type": "object",
211
+ "minProperties": 1,
212
+ "additionalProperties": true,
213
+ "propertyNames": {
214
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
215
+ }
216
+ },
217
+ "Handle": {
218
+ "title": "Handle",
219
+ "type": "string",
220
+ "minLength": 22,
221
+ "maxLength": 43,
222
+ "pattern": "^[A-Za-z0-9_-]{22,43}$",
223
+ "description": "The Farm-generated handle of one reservation: 16 to 32 bytes from a cryptographically secure random source, written as unpadded base64url (22 to 43 characters; 16 bytes, 22 characters, is what VTI-LNK-116 recommends). It is the `_id` of the trigger link (VTI-LNK-033) and is compared as a string. In a claim it MUST equal the document's `parentThreadId`. It confers no authority on its holder beyond the right to make one claim."
224
+ }
225
+ }
226
+ } as const;
227
+
228
+ /**
229
+ * SPEC.md §7.2 policy for the request variant, from this specification's
230
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
231
+ * per-specification and cannot be derived from the document alone, and
232
+ * item 2 needs the schema this carries.
233
+ */
234
+ export const SPEC = {
235
+ typeUri: TYPE_URI,
236
+ isBearer: false,
237
+ isProofRequired: true,
238
+ isRecipientRequired: true,
239
+ isIssuedAtRequired: true,
240
+ payloadSchema: PAYLOAD_SCHEMA,
241
+ } as const;
242
+
243
+ /**
244
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
245
+ * tracks the *issuer* party's requirement because a response swaps the
246
+ * parties (§7.3 item 5).
247
+ */
248
+ export const RESPONSE_SPEC = {
249
+ typeUri: RESPONSE_TYPE_URI,
250
+ isBearer: false,
251
+ isProofRequired: true,
252
+ isRecipientRequired: true,
253
+ isIssuedAtRequired: true,
254
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
255
+ } as const;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vetting/_shared/0.1/hidden-vetting.schema.json
4
+ */
5
+
6
+ /**
7
+ * Definitions used by more than one hidden-vetting task: the parameters a community stores and publishes for a criterion (vtc/vetting/hidden/publish, vtc/vetting/hidden/show, and the member-side vta/pcs engine tasks that take them as input), and the metadata of one attestation (vetting/attestation and the vta/pcs tasks that produce, hold and prove over attestations). Not itself a Trust Task specification: the `_shared` folder is skipped by the registry build and the codegen.
8
+ */
9
+ export interface HiddenVettingSharedDefinitions {
10
+ [k: string]: unknown | undefined;
11
+ }
12
+
13
+ /**
14
+ * The definitions this shared schema publishes, hoisted to one declaration each.
15
+ * See "../../../_shared/components.js".
16
+ */
17
+ export type { PublishedConfig, PublishedEvent, StatementMeta, StoredConfig, StoredEvent, TickLength, Tier } from "../../../_shared/components.js";
@@ -3,7 +3,7 @@
3
3
  * Source: specs/vetting/attestation/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Ext } from "../../../_shared/components.js";
6
+ import type { Ext, StatementMeta } from "../../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**
@@ -18,6 +18,9 @@ export interface VettingAttestationPayload {
18
18
  * The attestation itself, multibase base58btc: a tag, a shown class credential and a proof. It carries no identifier of the vetter — the tag is deterministic for this (vetter, applicant) pair and unlinkable across applicants.
19
19
  */
20
20
  attestation: string;
21
+ /**
22
+ * The facts the community will count. Bound into the attestation, so changing one here invalidates it.
23
+ */
21
24
  meta: StatementMeta;
22
25
  /**
23
26
  * The attestation token spent for this attestation. The community records the serial, which is how a vetter's rate is capped without anybody learning who they are.
@@ -38,61 +41,6 @@ export interface VettingAttestationPayload {
38
41
  };
39
42
  ext?: Ext;
40
43
  }
41
- /**
42
- * The facts the community will count. Bound into the attestation, so changing one here invalidates it.
43
- */
44
- export interface StatementMeta {
45
- /**
46
- * The community this attestation is for. An attestation is not portable between communities.
47
- */
48
- community: string;
49
- /**
50
- * The digest of the criterion's requirements as the vetter read them.
51
- */
52
- requirementsDigest: string;
53
- /**
54
- * How the vetter met the applicant.
55
- */
56
- method: "inPerson" | "video" | "priorAcquaintance";
57
- /**
58
- * The claim types the vetter checked.
59
- *
60
- * @minItems 1
61
- */
62
- claimsVerified: [string, ...string[]];
63
- /**
64
- * Whether the vetter confirmed a live person.
65
- */
66
- livenessConfirmed: boolean;
67
- /**
68
- * The relationship the vetter declared, which the community's independence rules count.
69
- */
70
- declaredRelationship: "none" | "family" | "sameEmployer" | "closeFriend" | "other";
71
- /**
72
- * The commitment on the Vetting Card the applicant showed. Consistency across attestations is what stops two applicants pooling them.
73
- */
74
- identityCommitment: string;
75
- /**
76
- * Digest of that card, as the vetter verified it.
77
- */
78
- cardDigestMultibase: string;
79
- /**
80
- * A DATE, never a timestamp: an exact time would let a community line an attestation up with a vetter's activity, which undoes the proof without touching it.
81
- */
82
- validFrom: string;
83
- /**
84
- * A date, for the same reason.
85
- */
86
- validUntil: string;
87
- /**
88
- * The token label spent, repeated inside the bound facts so it cannot be swapped in transit.
89
- */
90
- tokenLabel: string;
91
- /**
92
- * The token serial spent, likewise bound.
93
- */
94
- tokenSerial: string;
95
- }
96
44
  /**
97
45
  * The applicant's receipt. It verifies the attestation on arrival rather than at submit, so a vetter learns immediately that what it sent is usable.
98
46
  */
@@ -109,7 +57,7 @@ export interface VettingAttestationResponsePayload {
109
57
  }
110
58
 
111
59
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
112
- export type { Ext };
60
+ export type { Ext, StatementMeta };
113
61
 
114
62
  /** Trust Task type URI. */
115
63
  export const TYPE_URI = "https://trusttasks.org/spec/vetting/attestation/0.1" as const;
@@ -194,6 +142,40 @@ export const PAYLOAD_SCHEMA = {
194
142
  }
195
143
  },
196
144
  "$defs": {
145
+ "Response": {
146
+ "$anchor": "response",
147
+ "title": "Vetting Attestation — response payload",
148
+ "type": "object",
149
+ "additionalProperties": false,
150
+ "required": [
151
+ "accepted"
152
+ ],
153
+ "description": "The applicant's receipt. It verifies the attestation on arrival rather than at submit, so a vetter learns immediately that what it sent is usable.",
154
+ "properties": {
155
+ "accepted": {
156
+ "type": "boolean",
157
+ "description": "Whether the attestation verified against the community's published parameters and the card the applicant showed."
158
+ },
159
+ "heldCount": {
160
+ "type": "integer",
161
+ "minimum": 0,
162
+ "description": "OPTIONAL. How many attestations the applicant now holds for this criterion — a courtesy so a vetter can tell someone they are done."
163
+ },
164
+ "ext": {
165
+ "$ref": "#/$defs/Ext"
166
+ }
167
+ }
168
+ },
169
+ "Ext": {
170
+ "title": "Ext",
171
+ "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.",
172
+ "type": "object",
173
+ "minProperties": 1,
174
+ "additionalProperties": true,
175
+ "propertyNames": {
176
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
177
+ }
178
+ },
197
179
  "StatementMeta": {
198
180
  "type": "object",
199
181
  "additionalProperties": false,
@@ -288,7 +270,15 @@ export const PAYLOAD_SCHEMA = {
288
270
  "description": "The token serial spent, likewise bound."
289
271
  }
290
272
  }
291
- },
273
+ }
274
+ }
275
+ } as const;
276
+
277
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
278
+ export const RESPONSE_PAYLOAD_SCHEMA = {
279
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
280
+ "$ref": "#/$defs/Response",
281
+ "$defs": {
292
282
  "Response": {
293
283
  "$anchor": "response",
294
284
  "title": "Vetting Attestation — response payload",
@@ -322,15 +312,7 @@ export const PAYLOAD_SCHEMA = {
322
312
  "propertyNames": {
323
313
  "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
324
314
  }
325
- }
326
- }
327
- } as const;
328
-
329
- /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
330
- export const RESPONSE_PAYLOAD_SCHEMA = {
331
- "$schema": "https://json-schema.org/draft/2020-12/schema",
332
- "$ref": "#/$defs/Response",
333
- "$defs": {
315
+ },
334
316
  "StatementMeta": {
335
317
  "type": "object",
336
318
  "additionalProperties": false,
@@ -425,40 +407,6 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
425
407
  "description": "The token serial spent, likewise bound."
426
408
  }
427
409
  }
428
- },
429
- "Response": {
430
- "$anchor": "response",
431
- "title": "Vetting Attestation — response payload",
432
- "type": "object",
433
- "additionalProperties": false,
434
- "required": [
435
- "accepted"
436
- ],
437
- "description": "The applicant's receipt. It verifies the attestation on arrival rather than at submit, so a vetter learns immediately that what it sent is usable.",
438
- "properties": {
439
- "accepted": {
440
- "type": "boolean",
441
- "description": "Whether the attestation verified against the community's published parameters and the card the applicant showed."
442
- },
443
- "heldCount": {
444
- "type": "integer",
445
- "minimum": 0,
446
- "description": "OPTIONAL. How many attestations the applicant now holds for this criterion — a courtesy so a vetter can tell someone they are done."
447
- },
448
- "ext": {
449
- "$ref": "#/$defs/Ext"
450
- }
451
- }
452
- },
453
- "Ext": {
454
- "title": "Ext",
455
- "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.",
456
- "type": "object",
457
- "minProperties": 1,
458
- "additionalProperties": true,
459
- "propertyNames": {
460
- "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
461
- }
462
410
  }
463
411
  }
464
412
  } as const;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/_shared/0.4/pcs-engine.schema.json
4
+ */
5
+
6
+ /**
7
+ * A VTA can act as the hidden-vetting (PCS) engine of its principal: it holds the principal's PCS secret keys, and runs every member-side PCS operation — a vetter's enrolment, token drip and attestation, and an applicant's receipt of attestations and its proof — so that the client carrying the messages never holds a PCS key. These definitions describe the inputs the engine takes and the wire forms it produces. The normative rules (custody, one key per vetter and community, authorization, audit) are in CONVENTIONS.md beside this file. Not itself a Trust Task specification: the `_shared` folder is skipped by the registry build and the codegen.
8
+ */
9
+ export interface PCSEngineSharedDefinitionsForTheVtaPcsTasks {
10
+ [k: string]: unknown | undefined;
11
+ }
12
+
13
+ /**
14
+ * The definitions this shared schema publishes, hoisted to one declaration each.
15
+ * See "../../../_shared/components.js".
16
+ */
17
+ export type { ApplicationSummary, Attestation, AttestationMeta, AttestationToken, CommunityParameters, HiddenVettingSubmission, Multibase, SubmittedStatement, TokenDraw, VetterSummary } from "../../../_shared/components.js";