@openvtc/trust-tasks 0.20.1 → 0.20.3

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 (110) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/dist/_shared/components.d.ts +175 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/git-ns/_shared/0.1/git-ns.d.ts +16 -0
  5. package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -0
  6. package/dist/git-ns/_shared/0.1/git-ns.js +6 -0
  7. package/dist/git-ns/_shared/0.1/git-ns.js.map +1 -0
  8. package/dist/git-ns/account/link/0.1/payload.d.ts +355 -0
  9. package/dist/git-ns/account/link/0.1/payload.d.ts.map +1 -0
  10. package/dist/git-ns/account/link/0.1/payload.js +192 -0
  11. package/dist/git-ns/account/link/0.1/payload.js.map +1 -0
  12. package/dist/git-ns/account/link-status/0.1/payload.d.ts +403 -0
  13. package/dist/git-ns/account/link-status/0.1/payload.d.ts.map +1 -0
  14. package/dist/git-ns/account/link-status/0.1/payload.js +234 -0
  15. package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -0
  16. package/dist/git-ns/bridge/event/0.1/payload.d.ts +1348 -0
  17. package/dist/git-ns/bridge/event/0.1/payload.d.ts.map +1 -0
  18. package/dist/git-ns/bridge/event/0.1/payload.js +785 -0
  19. package/dist/git-ns/bridge/event/0.1/payload.js.map +1 -0
  20. package/dist/git-ns/bridge/job/0.1/payload.d.ts +1044 -0
  21. package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -0
  22. package/dist/git-ns/bridge/job/0.1/payload.js +564 -0
  23. package/dist/git-ns/bridge/job/0.1/payload.js.map +1 -0
  24. package/dist/git-ns/bridge/result/0.1/payload.d.ts +462 -0
  25. package/dist/git-ns/bridge/result/0.1/payload.d.ts.map +1 -0
  26. package/dist/git-ns/bridge/result/0.1/payload.js +248 -0
  27. package/dist/git-ns/bridge/result/0.1/payload.js.map +1 -0
  28. package/dist/git-ns/namespace/bind/0.1/payload.d.ts +547 -0
  29. package/dist/git-ns/namespace/bind/0.1/payload.d.ts.map +1 -0
  30. package/dist/git-ns/namespace/bind/0.1/payload.js +322 -0
  31. package/dist/git-ns/namespace/bind/0.1/payload.js.map +1 -0
  32. package/dist/git-ns/namespace/unbind/0.1/payload.d.ts +300 -0
  33. package/dist/git-ns/namespace/unbind/0.1/payload.d.ts.map +1 -0
  34. package/dist/git-ns/namespace/unbind/0.1/payload.js +168 -0
  35. package/dist/git-ns/namespace/unbind/0.1/payload.js.map +1 -0
  36. package/dist/git-ns/repo/adopt/0.1/payload.d.ts +962 -0
  37. package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -0
  38. package/dist/git-ns/repo/adopt/0.1/payload.js +583 -0
  39. package/dist/git-ns/repo/adopt/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/repo/archive/0.1/payload.d.ts +959 -0
  41. package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -0
  42. package/dist/git-ns/repo/archive/0.1/payload.js +584 -0
  43. package/dist/git-ns/repo/archive/0.1/payload.js.map +1 -0
  44. package/dist/git-ns/repo/create/0.1/payload.d.ts +1074 -0
  45. package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -0
  46. package/dist/git-ns/repo/create/0.1/payload.js +636 -0
  47. package/dist/git-ns/repo/create/0.1/payload.js.map +1 -0
  48. package/dist/git-ns/repo/transfer/0.1/payload.d.ts +947 -0
  49. package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -0
  50. package/dist/git-ns/repo/transfer/0.1/payload.js +577 -0
  51. package/dist/git-ns/repo/transfer/0.1/payload.js.map +1 -0
  52. package/dist/git-ns/right/grant/0.1/payload.d.ts +506 -0
  53. package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -0
  54. package/dist/git-ns/right/grant/0.1/payload.js +289 -0
  55. package/dist/git-ns/right/grant/0.1/payload.js.map +1 -0
  56. package/dist/git-ns/right/revoke/0.1/payload.d.ts +492 -0
  57. package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -0
  58. package/dist/git-ns/right/revoke/0.1/payload.js +284 -0
  59. package/dist/git-ns/right/revoke/0.1/payload.js.map +1 -0
  60. package/dist/git-ns/view/0.1/payload.d.ts +1407 -0
  61. package/dist/git-ns/view/0.1/payload.d.ts.map +1 -0
  62. package/dist/git-ns/view/0.1/payload.js +860 -0
  63. package/dist/git-ns/view/0.1/payload.js.map +1 -0
  64. package/dist/index.d.ts +20 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +20 -0
  67. package/dist/index.js.map +1 -1
  68. package/dist/vetting/attestation/0.1/payload.d.ts +690 -0
  69. package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -0
  70. package/dist/vetting/attestation/0.1/payload.js +374 -0
  71. package/dist/vetting/attestation/0.1/payload.js.map +1 -0
  72. package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts +261 -0
  73. package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts.map +1 -0
  74. package/dist/vtc/vetting/pcs-challenge/0.1/payload.js +145 -0
  75. package/dist/vtc/vetting/pcs-challenge/0.1/payload.js.map +1 -0
  76. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts +546 -0
  77. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts.map +1 -0
  78. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js +290 -0
  79. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js.map +1 -0
  80. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts +336 -0
  81. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts.map +1 -0
  82. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js +178 -0
  83. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js.map +1 -0
  84. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts +402 -0
  85. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts.map +1 -0
  86. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js +205 -0
  87. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js.map +1 -0
  88. package/package.json +1 -1
  89. package/src/_shared/components.ts +181 -0
  90. package/src/git-ns/_shared/0.1/git-ns.ts +17 -0
  91. package/src/git-ns/account/link/0.1/payload.ts +242 -0
  92. package/src/git-ns/account/link-status/0.1/payload.ts +276 -0
  93. package/src/git-ns/bridge/event/0.1/payload.ts +902 -0
  94. package/src/git-ns/bridge/job/0.1/payload.ts +676 -0
  95. package/src/git-ns/bridge/result/0.1/payload.ts +321 -0
  96. package/src/git-ns/namespace/bind/0.1/payload.ts +374 -0
  97. package/src/git-ns/namespace/unbind/0.1/payload.ts +211 -0
  98. package/src/git-ns/repo/adopt/0.1/payload.ts +628 -0
  99. package/src/git-ns/repo/archive/0.1/payload.ts +626 -0
  100. package/src/git-ns/repo/create/0.1/payload.ts +689 -0
  101. package/src/git-ns/repo/transfer/0.1/payload.ts +619 -0
  102. package/src/git-ns/right/grant/0.1/payload.ts +340 -0
  103. package/src/git-ns/right/revoke/0.1/payload.ts +331 -0
  104. package/src/git-ns/view/0.1/payload.ts +906 -0
  105. package/src/index.ts +20 -0
  106. package/src/vetting/attestation/0.1/payload.ts +493 -0
  107. package/src/vtc/vetting/pcs-challenge/0.1/payload.ts +187 -0
  108. package/src/vtc/vetting/vetters/event-mode/0.1/payload.ts +375 -0
  109. package/src/vtc/vetting/vetters/pcs-root/0.1/payload.ts +241 -0
  110. package/src/vtc/vetting/vetters/pcs-tokens/0.1/payload.ts +286 -0
package/src/index.ts CHANGED
@@ -131,6 +131,21 @@ export * as DidManagementRegistryDeregister_v0_1 from "./did-management/registry
131
131
  export * as DidManagementServerHealth_v0_1 from "./did-management/server/health/0.1/payload.js";
132
132
  export * as DidManagementServerRegister_v0_1 from "./did-management/server/register/0.1/payload.js";
133
133
  export * as DidManagementServerStatsSync_v0_1 from "./did-management/server/stats-sync/0.1/payload.js";
134
+ export * as GitNsShared_v0_1 from "./git-ns/_shared/0.1/git-ns.js";
135
+ export * as GitNsAccountLinkStatus_v0_1 from "./git-ns/account/link-status/0.1/payload.js";
136
+ export * as GitNsAccountLink_v0_1 from "./git-ns/account/link/0.1/payload.js";
137
+ export * as GitNsBridgeEvent_v0_1 from "./git-ns/bridge/event/0.1/payload.js";
138
+ export * as GitNsBridgeJob_v0_1 from "./git-ns/bridge/job/0.1/payload.js";
139
+ export * as GitNsBridgeResult_v0_1 from "./git-ns/bridge/result/0.1/payload.js";
140
+ export * as GitNsNamespaceBind_v0_1 from "./git-ns/namespace/bind/0.1/payload.js";
141
+ export * as GitNsNamespaceUnbind_v0_1 from "./git-ns/namespace/unbind/0.1/payload.js";
142
+ export * as GitNsRepoAdopt_v0_1 from "./git-ns/repo/adopt/0.1/payload.js";
143
+ export * as GitNsRepoArchive_v0_1 from "./git-ns/repo/archive/0.1/payload.js";
144
+ export * as GitNsRepoCreate_v0_1 from "./git-ns/repo/create/0.1/payload.js";
145
+ export * as GitNsRepoTransfer_v0_1 from "./git-ns/repo/transfer/0.1/payload.js";
146
+ export * as GitNsRightGrant_v0_1 from "./git-ns/right/grant/0.1/payload.js";
147
+ export * as GitNsRightRevoke_v0_1 from "./git-ns/right/revoke/0.1/payload.js";
148
+ export * as GitNsView_v0_1 from "./git-ns/view/0.1/payload.js";
134
149
  export * as GitTrustGrant_v0_1 from "./git-trust/grant/0.1/payload.js";
135
150
  export * as GitTrustRevoke_v0_1 from "./git-trust/revoke/0.1/payload.js";
136
151
  export * as GovernanceShared_v0_1 from "./governance/_shared/0.1/governance.js";
@@ -354,6 +369,7 @@ export * as VaultUsage_v0_2 from "./vault/usage/0.2/payload.js";
354
369
  export * as IdentityVettingShared_v0_1 from "./vetting/_shared/0.1/identity-vetting.js";
355
370
  export * as VettingCardShared_v0_1 from "./vetting/_shared/0.1/vetting-card.js";
356
371
  export * as VettingShared_v0_1 from "./vetting/_shared/0.1/vetting.js";
372
+ export * as VettingAttestation_v0_1 from "./vetting/attestation/0.1/payload.js";
357
373
  export * as VettingDecline_v0_1 from "./vetting/decline/0.1/payload.js";
358
374
  export * as VettingRequest_v0_1 from "./vetting/request/0.1/payload.js";
359
375
  export * as VettingSession_v0_1 from "./vetting/session/0.1/payload.js";
@@ -544,9 +560,13 @@ export * as VtcRelationshipsPublish_v0_2 from "./vtc/relationships/publish/0.2/p
544
560
  export * as VtcRelationshipsRequest_v0_1 from "./vtc/relationships/request/0.1/payload.js";
545
561
  export * as VtcRelationshipsRequest_v0_2 from "./vtc/relationships/request/0.2/payload.js";
546
562
  export * as VtcRelationshipsRevoke_v0_1 from "./vtc/relationships/revoke/0.1/payload.js";
563
+ export * as VtcVettingPcsChallenge_v0_1 from "./vtc/vetting/pcs-challenge/0.1/payload.js";
547
564
  export * as VtcVettingRevokeStatement_v0_1 from "./vtc/vetting/revoke-statement/0.1/payload.js";
565
+ export * as VtcVettingVettersEventMode_v0_1 from "./vtc/vetting/vetters/event-mode/0.1/payload.js";
548
566
  export * as VtcVettingVettersGrant_v0_1 from "./vtc/vetting/vetters/grant/0.1/payload.js";
549
567
  export * as VtcVettingVettersList_v0_1 from "./vtc/vetting/vetters/list/0.1/payload.js";
568
+ export * as VtcVettingVettersPcsRoot_v0_1 from "./vtc/vetting/vetters/pcs-root/0.1/payload.js";
569
+ export * as VtcVettingVettersPcsTokens_v0_1 from "./vtc/vetting/vetters/pcs-tokens/0.1/payload.js";
550
570
  export * as VtcVettingVettersProfile_v0_1 from "./vtc/vetting/vetters/profile/0.1/payload.js";
551
571
  export * as VtcVettingVettersResend_v0_1 from "./vtc/vetting/vetters/resend/0.1/payload.js";
552
572
  export * as VtcVettingVettersShow_v0_1 from "./vtc/vetting/vetters/show/0.1/payload.js";
@@ -0,0 +1,493 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vetting/attestation/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A vetter gives an applicant an attestation that names nobody. It carries the same facts a Vetting Statement carries and no issuer: what proves it was made by an eligible vetter is the proof the applicant later builds over it, not a signature on this document.
11
+ */
12
+ export interface VettingAttestationPayload {
13
+ /**
14
+ * The hidden-vetting suite this attestation was made under, exactly as the community's criterion publishes it. An applicant holding attestations under two suites cannot mix them in one proof.
15
+ */
16
+ suite: string;
17
+ /**
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
+ */
20
+ attestation: string;
21
+ meta: StatementMeta;
22
+ /**
23
+ * 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.
24
+ */
25
+ token: {
26
+ /**
27
+ * The token label spent under.
28
+ */
29
+ label: string;
30
+ /**
31
+ * The serial revealed by the spend. Recorded by the community; a second appearance is a double spend.
32
+ */
33
+ serial: string;
34
+ /**
35
+ * The re-randomised token signature, verifiable under the published token key.
36
+ */
37
+ shown: string;
38
+ };
39
+ ext?: Ext;
40
+ }
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
+ /**
97
+ * 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
+ */
99
+ export interface VettingAttestationResponsePayload {
100
+ /**
101
+ * Whether the attestation verified against the community's published parameters and the card the applicant showed.
102
+ */
103
+ accepted: boolean;
104
+ /**
105
+ * OPTIONAL. How many attestations the applicant now holds for this criterion — a courtesy so a vetter can tell someone they are done.
106
+ */
107
+ heldCount?: number;
108
+ ext?: Ext;
109
+ }
110
+
111
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
112
+ export type { Ext };
113
+
114
+ /** Trust Task type URI. */
115
+ export const TYPE_URI = "https://trusttasks.org/spec/vetting/attestation/0.1" as const;
116
+
117
+ /** Stable alias for this specification's request payload shape. */
118
+ export type Payload = VettingAttestationPayload;
119
+
120
+ /** Trust Task response type URI (request type URI + "#response"). */
121
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vetting/attestation/0.1#response" as const;
122
+
123
+ /** Stable alias for this specification's success-response payload shape. */
124
+ export type Response = VettingAttestationResponsePayload;
125
+
126
+ /**
127
+ * This specification's payload schema, as a value.
128
+ *
129
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
130
+ * rather than only as a `.json` file because TypeScript types are erased
131
+ * at runtime: without a schema a consumer has nothing to validate, and
132
+ * every REQUIRED payload member is optional in practice. Cross-file
133
+ * `$ref`s are already inlined, so it needs no resolver.
134
+ */
135
+ export const PAYLOAD_SCHEMA = {
136
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
137
+ "$id": "https://trusttasks.org/spec/vetting/attestation/0.1",
138
+ "title": "Vetting — Attestation — payload",
139
+ "description": "A vetter gives an applicant an attestation that names nobody. It carries the same facts a Vetting Statement carries and no issuer: what proves it was made by an eligible vetter is the proof the applicant later builds over it, not a signature on this document.",
140
+ "type": "object",
141
+ "additionalProperties": false,
142
+ "required": [
143
+ "suite",
144
+ "attestation",
145
+ "meta",
146
+ "token"
147
+ ],
148
+ "properties": {
149
+ "suite": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "maxLength": 64,
153
+ "description": "The hidden-vetting suite this attestation was made under, exactly as the community's criterion publishes it. An applicant holding attestations under two suites cannot mix them in one proof."
154
+ },
155
+ "attestation": {
156
+ "type": "string",
157
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
158
+ "description": "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."
159
+ },
160
+ "meta": {
161
+ "$ref": "#/$defs/StatementMeta",
162
+ "description": "The facts the community will count. Bound into the attestation, so changing one here invalidates it."
163
+ },
164
+ "token": {
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": [
168
+ "label",
169
+ "serial",
170
+ "shown"
171
+ ],
172
+ "description": "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.",
173
+ "properties": {
174
+ "label": {
175
+ "type": "string",
176
+ "minLength": 1,
177
+ "maxLength": 128,
178
+ "description": "The token label spent under."
179
+ },
180
+ "serial": {
181
+ "type": "string",
182
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
183
+ "description": "The serial revealed by the spend. Recorded by the community; a second appearance is a double spend."
184
+ },
185
+ "shown": {
186
+ "type": "string",
187
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
188
+ "description": "The re-randomised token signature, verifiable under the published token key."
189
+ }
190
+ }
191
+ },
192
+ "ext": {
193
+ "$ref": "#/$defs/Ext"
194
+ }
195
+ },
196
+ "$defs": {
197
+ "StatementMeta": {
198
+ "type": "object",
199
+ "additionalProperties": false,
200
+ "required": [
201
+ "community",
202
+ "requirementsDigest",
203
+ "method",
204
+ "claimsVerified",
205
+ "livenessConfirmed",
206
+ "declaredRelationship",
207
+ "identityCommitment",
208
+ "cardDigestMultibase",
209
+ "validFrom",
210
+ "validUntil",
211
+ "tokenLabel",
212
+ "tokenSerial"
213
+ ],
214
+ "description": "What a Vetting Statement would have said, minus its issuer.",
215
+ "properties": {
216
+ "community": {
217
+ "type": "string",
218
+ "minLength": 1,
219
+ "description": "The community this attestation is for. An attestation is not portable between communities."
220
+ },
221
+ "requirementsDigest": {
222
+ "type": "string",
223
+ "minLength": 1,
224
+ "description": "The digest of the criterion's requirements as the vetter read them."
225
+ },
226
+ "method": {
227
+ "type": "string",
228
+ "enum": [
229
+ "inPerson",
230
+ "video",
231
+ "priorAcquaintance"
232
+ ],
233
+ "description": "How the vetter met the applicant."
234
+ },
235
+ "claimsVerified": {
236
+ "type": "array",
237
+ "minItems": 1,
238
+ "items": {
239
+ "type": "string",
240
+ "minLength": 1
241
+ },
242
+ "description": "The claim types the vetter checked."
243
+ },
244
+ "livenessConfirmed": {
245
+ "type": "boolean",
246
+ "description": "Whether the vetter confirmed a live person."
247
+ },
248
+ "declaredRelationship": {
249
+ "type": "string",
250
+ "enum": [
251
+ "none",
252
+ "family",
253
+ "sameEmployer",
254
+ "closeFriend",
255
+ "other"
256
+ ],
257
+ "description": "The relationship the vetter declared, which the community's independence rules count."
258
+ },
259
+ "identityCommitment": {
260
+ "type": "string",
261
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
262
+ "description": "The commitment on the Vetting Card the applicant showed. Consistency across attestations is what stops two applicants pooling them."
263
+ },
264
+ "cardDigestMultibase": {
265
+ "type": "string",
266
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
267
+ "description": "Digest of that card, as the vetter verified it."
268
+ },
269
+ "validFrom": {
270
+ "type": "string",
271
+ "format": "date",
272
+ "description": "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."
273
+ },
274
+ "validUntil": {
275
+ "type": "string",
276
+ "format": "date",
277
+ "description": "A date, for the same reason."
278
+ },
279
+ "tokenLabel": {
280
+ "type": "string",
281
+ "minLength": 1,
282
+ "maxLength": 128,
283
+ "description": "The token label spent, repeated inside the bound facts so it cannot be swapped in transit."
284
+ },
285
+ "tokenSerial": {
286
+ "type": "string",
287
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
288
+ "description": "The token serial spent, likewise bound."
289
+ }
290
+ }
291
+ },
292
+ "Response": {
293
+ "$anchor": "response",
294
+ "title": "Vetting Attestation — response payload",
295
+ "type": "object",
296
+ "additionalProperties": false,
297
+ "required": [
298
+ "accepted"
299
+ ],
300
+ "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.",
301
+ "properties": {
302
+ "accepted": {
303
+ "type": "boolean",
304
+ "description": "Whether the attestation verified against the community's published parameters and the card the applicant showed."
305
+ },
306
+ "heldCount": {
307
+ "type": "integer",
308
+ "minimum": 0,
309
+ "description": "OPTIONAL. How many attestations the applicant now holds for this criterion — a courtesy so a vetter can tell someone they are done."
310
+ },
311
+ "ext": {
312
+ "$ref": "#/$defs/Ext"
313
+ }
314
+ }
315
+ },
316
+ "Ext": {
317
+ "title": "Ext",
318
+ "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.",
319
+ "type": "object",
320
+ "minProperties": 1,
321
+ "additionalProperties": true,
322
+ "propertyNames": {
323
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
324
+ }
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": {
334
+ "StatementMeta": {
335
+ "type": "object",
336
+ "additionalProperties": false,
337
+ "required": [
338
+ "community",
339
+ "requirementsDigest",
340
+ "method",
341
+ "claimsVerified",
342
+ "livenessConfirmed",
343
+ "declaredRelationship",
344
+ "identityCommitment",
345
+ "cardDigestMultibase",
346
+ "validFrom",
347
+ "validUntil",
348
+ "tokenLabel",
349
+ "tokenSerial"
350
+ ],
351
+ "description": "What a Vetting Statement would have said, minus its issuer.",
352
+ "properties": {
353
+ "community": {
354
+ "type": "string",
355
+ "minLength": 1,
356
+ "description": "The community this attestation is for. An attestation is not portable between communities."
357
+ },
358
+ "requirementsDigest": {
359
+ "type": "string",
360
+ "minLength": 1,
361
+ "description": "The digest of the criterion's requirements as the vetter read them."
362
+ },
363
+ "method": {
364
+ "type": "string",
365
+ "enum": [
366
+ "inPerson",
367
+ "video",
368
+ "priorAcquaintance"
369
+ ],
370
+ "description": "How the vetter met the applicant."
371
+ },
372
+ "claimsVerified": {
373
+ "type": "array",
374
+ "minItems": 1,
375
+ "items": {
376
+ "type": "string",
377
+ "minLength": 1
378
+ },
379
+ "description": "The claim types the vetter checked."
380
+ },
381
+ "livenessConfirmed": {
382
+ "type": "boolean",
383
+ "description": "Whether the vetter confirmed a live person."
384
+ },
385
+ "declaredRelationship": {
386
+ "type": "string",
387
+ "enum": [
388
+ "none",
389
+ "family",
390
+ "sameEmployer",
391
+ "closeFriend",
392
+ "other"
393
+ ],
394
+ "description": "The relationship the vetter declared, which the community's independence rules count."
395
+ },
396
+ "identityCommitment": {
397
+ "type": "string",
398
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
399
+ "description": "The commitment on the Vetting Card the applicant showed. Consistency across attestations is what stops two applicants pooling them."
400
+ },
401
+ "cardDigestMultibase": {
402
+ "type": "string",
403
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
404
+ "description": "Digest of that card, as the vetter verified it."
405
+ },
406
+ "validFrom": {
407
+ "type": "string",
408
+ "format": "date",
409
+ "description": "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."
410
+ },
411
+ "validUntil": {
412
+ "type": "string",
413
+ "format": "date",
414
+ "description": "A date, for the same reason."
415
+ },
416
+ "tokenLabel": {
417
+ "type": "string",
418
+ "minLength": 1,
419
+ "maxLength": 128,
420
+ "description": "The token label spent, repeated inside the bound facts so it cannot be swapped in transit."
421
+ },
422
+ "tokenSerial": {
423
+ "type": "string",
424
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
425
+ "description": "The token serial spent, likewise bound."
426
+ }
427
+ }
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
+ }
463
+ }
464
+ } as const;
465
+
466
+ /**
467
+ * SPEC.md §7.2 policy for the request variant, from this specification's
468
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
469
+ * per-specification and cannot be derived from the document alone, and
470
+ * item 2 needs the schema this carries.
471
+ */
472
+ export const SPEC = {
473
+ typeUri: TYPE_URI,
474
+ isBearer: false,
475
+ isProofRequired: true,
476
+ isRecipientRequired: true,
477
+ isIssuedAtRequired: true,
478
+ payloadSchema: PAYLOAD_SCHEMA,
479
+ } as const;
480
+
481
+ /**
482
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
483
+ * tracks the *issuer* party's requirement because a response swaps the
484
+ * parties (§7.3 item 5).
485
+ */
486
+ export const RESPONSE_SPEC = {
487
+ typeUri: RESPONSE_TYPE_URI,
488
+ isBearer: false,
489
+ isProofRequired: true,
490
+ isRecipientRequired: true,
491
+ isIssuedAtRequired: true,
492
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
493
+ } as const;