@openvtc/trust-tasks 0.26.18 → 0.26.19

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 (104) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/_shared/components.d.ts +113 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +9 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +9 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/owner/group/add/0.3/payload.d.ts +417 -0
  9. package/dist/rooms/owner/group/add/0.3/payload.d.ts.map +1 -0
  10. package/dist/rooms/owner/group/add/0.3/payload.js +218 -0
  11. package/dist/rooms/owner/group/add/0.3/payload.js.map +1 -0
  12. package/dist/rooms/owner/group/renew/0.2/payload.d.ts +299 -0
  13. package/dist/rooms/owner/group/renew/0.2/payload.d.ts.map +1 -0
  14. package/dist/rooms/owner/group/renew/0.2/payload.js +163 -0
  15. package/dist/rooms/owner/group/renew/0.2/payload.js.map +1 -0
  16. package/dist/vtc/directory/_shared/0.1/directory-card.d.ts +1 -1
  17. package/dist/vtc/directory/_shared/0.1/directory-card.d.ts.map +1 -1
  18. package/dist/vtc/directory/_shared/0.1/disclosure-statement.d.ts +18 -0
  19. package/dist/vtc/directory/_shared/0.1/disclosure-statement.d.ts.map +1 -0
  20. package/dist/vtc/directory/_shared/0.1/disclosure-statement.js +6 -0
  21. package/dist/vtc/directory/_shared/0.1/disclosure-statement.js.map +1 -0
  22. package/dist/vtc/directory/card/assert/0.1/payload.d.ts +4 -4
  23. package/dist/vtc/directory/card/assert/0.1/payload.js +2 -2
  24. package/dist/vtc/directory/card/assert/0.1/payload.js.map +1 -1
  25. package/dist/vtc/directory/card/public/0.1/payload.d.ts +348 -0
  26. package/dist/vtc/directory/card/public/0.1/payload.d.ts.map +1 -0
  27. package/dist/vtc/directory/card/public/0.1/payload.js +197 -0
  28. package/dist/vtc/directory/card/public/0.1/payload.js.map +1 -0
  29. package/dist/vtc/directory/card/publish/0.1/payload.d.ts +384 -0
  30. package/dist/vtc/directory/card/publish/0.1/payload.d.ts.map +1 -0
  31. package/dist/vtc/directory/card/publish/0.1/payload.js +222 -0
  32. package/dist/vtc/directory/card/publish/0.1/payload.js.map +1 -0
  33. package/dist/vtc/directory/card/show/0.1/payload.d.ts +138 -6
  34. package/dist/vtc/directory/card/show/0.1/payload.d.ts.map +1 -1
  35. package/dist/vtc/directory/card/show/0.1/payload.js +82 -2
  36. package/dist/vtc/directory/card/show/0.1/payload.js.map +1 -1
  37. package/dist/vtc/directory/card/update/0.1/payload.d.ts +138 -6
  38. package/dist/vtc/directory/card/update/0.1/payload.d.ts.map +1 -1
  39. package/dist/vtc/directory/card/update/0.1/payload.js +82 -2
  40. package/dist/vtc/directory/card/update/0.1/payload.js.map +1 -1
  41. package/dist/vtc/directory/disclosure/0.1/payload.d.ts +951 -0
  42. package/dist/vtc/directory/disclosure/0.1/payload.d.ts.map +1 -0
  43. package/dist/vtc/directory/disclosure/0.1/payload.js +613 -0
  44. package/dist/vtc/directory/disclosure/0.1/payload.js.map +1 -0
  45. package/dist/vtc/directory/entries/list/0.1/payload.d.ts +4 -4
  46. package/dist/vtc/directory/entries/list/0.1/payload.js +2 -2
  47. package/dist/vtc/directory/entries/list/0.1/payload.js.map +1 -1
  48. package/dist/vtc/directory/entries/show/0.1/payload.d.ts +4 -4
  49. package/dist/vtc/directory/entries/show/0.1/payload.js +2 -2
  50. package/dist/vtc/directory/entries/show/0.1/payload.js.map +1 -1
  51. package/dist/vtc/directory/images/get/0.1/payload.d.ts +484 -0
  52. package/dist/vtc/directory/images/get/0.1/payload.d.ts.map +1 -0
  53. package/dist/vtc/directory/images/get/0.1/payload.js +273 -0
  54. package/dist/vtc/directory/images/get/0.1/payload.js.map +1 -0
  55. package/dist/vtc/directory/images/upload/0.1/payload.d.ts +441 -0
  56. package/dist/vtc/directory/images/upload/0.1/payload.d.ts.map +1 -0
  57. package/dist/vtc/directory/images/upload/0.1/payload.js +262 -0
  58. package/dist/vtc/directory/images/upload/0.1/payload.js.map +1 -0
  59. package/dist/vtc/directory/introduction/0.1/payload.d.ts +2 -2
  60. package/dist/vtc/directory/introduction/0.1/payload.js +1 -1
  61. package/dist/vtc/directory/introduction/0.1/payload.js.map +1 -1
  62. package/dist/vtc/groups/join/0.1/payload.d.ts +4 -4
  63. package/dist/vtc/groups/join/0.1/payload.js +2 -2
  64. package/dist/vtc/groups/join/0.1/payload.js.map +1 -1
  65. package/dist/vtc/groups/members/add/0.1/payload.d.ts +4 -4
  66. package/dist/vtc/groups/members/add/0.1/payload.js +2 -2
  67. package/dist/vtc/groups/members/add/0.1/payload.js.map +1 -1
  68. package/dist/vtc/groups/members/list/0.1/payload.d.ts +4 -4
  69. package/dist/vtc/groups/members/list/0.1/payload.js +2 -2
  70. package/dist/vtc/groups/members/list/0.1/payload.js.map +1 -1
  71. package/dist/vtc/groups/requests/decide/0.1/payload.d.ts +4 -4
  72. package/dist/vtc/groups/requests/decide/0.1/payload.js +2 -2
  73. package/dist/vtc/groups/requests/decide/0.1/payload.js.map +1 -1
  74. package/dist/vtc/groups/requests/list/0.1/payload.d.ts +4 -4
  75. package/dist/vtc/groups/requests/list/0.1/payload.js +2 -2
  76. package/dist/vtc/groups/requests/list/0.1/payload.js.map +1 -1
  77. package/dist/vtc/join-requests/manifest/0.4/payload.d.ts +2303 -0
  78. package/dist/vtc/join-requests/manifest/0.4/payload.d.ts.map +1 -0
  79. package/dist/vtc/join-requests/manifest/0.4/payload.js +1293 -0
  80. package/dist/vtc/join-requests/manifest/0.4/payload.js.map +1 -0
  81. package/package.json +1 -1
  82. package/src/_shared/components.ts +113 -1
  83. package/src/index.ts +9 -0
  84. package/src/rooms/owner/group/add/0.3/payload.ts +288 -0
  85. package/src/rooms/owner/group/renew/0.2/payload.ts +213 -0
  86. package/src/vtc/directory/_shared/0.1/directory-card.ts +1 -1
  87. package/src/vtc/directory/_shared/0.1/disclosure-statement.ts +19 -0
  88. package/src/vtc/directory/card/assert/0.1/payload.ts +2 -2
  89. package/src/vtc/directory/card/public/0.1/payload.ts +238 -0
  90. package/src/vtc/directory/card/publish/0.1/payload.ts +261 -0
  91. package/src/vtc/directory/card/show/0.1/payload.ts +84 -4
  92. package/src/vtc/directory/card/update/0.1/payload.ts +84 -4
  93. package/src/vtc/directory/disclosure/0.1/payload.ts +645 -0
  94. package/src/vtc/directory/entries/list/0.1/payload.ts +2 -2
  95. package/src/vtc/directory/entries/show/0.1/payload.ts +2 -2
  96. package/src/vtc/directory/images/get/0.1/payload.ts +320 -0
  97. package/src/vtc/directory/images/upload/0.1/payload.ts +308 -0
  98. package/src/vtc/directory/introduction/0.1/payload.ts +1 -1
  99. package/src/vtc/groups/join/0.1/payload.ts +2 -2
  100. package/src/vtc/groups/members/add/0.1/payload.ts +2 -2
  101. package/src/vtc/groups/members/list/0.1/payload.ts +2 -2
  102. package/src/vtc/groups/requests/decide/0.1/payload.ts +2 -2
  103. package/src/vtc/groups/requests/list/0.1/payload.ts +2 -2
  104. package/src/vtc/join-requests/manifest/0.4/payload.ts +1490 -0
@@ -0,0 +1,951 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/directory/disclosure/0.1/payload.schema.json
4
+ */
5
+ import type { Audience, DigestMultibase, DirectoryDisclosure, DisclosedField, Ext, FieldDescription, FieldKey, FieldLabel, FieldSource, FieldType, GroupDisclosure, Introductions, Listing, NewCardDefaults } from "../../../../_shared/components.js";
6
+ /**
7
+ * Read the statement of what a community's directory discloses about its members, and to whom, generated from the configuration in force. Anyone may read it, applicants above all, so the request carries nothing about the reader. The outer document members are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface VTCDirectoryDisclosurePayload {
10
+ ext?: Ext;
11
+ }
12
+ /**
13
+ * The success response to a vtc/directory/disclosure/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/disclosure/0.1#response.
14
+ */
15
+ export interface VTCDirectoryDisclosureResponsePayload {
16
+ communityDid: string;
17
+ disclosure: DirectoryDisclosure;
18
+ ext?: Ext;
19
+ }
20
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
21
+ export type { Audience, DigestMultibase, DirectoryDisclosure, DisclosedField, Ext, FieldDescription, FieldKey, FieldLabel, FieldSource, FieldType, GroupDisclosure, Introductions, Listing, NewCardDefaults };
22
+ /** Trust Task type URI. */
23
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/directory/disclosure/0.1";
24
+ /** Stable alias for this specification's request payload shape. */
25
+ export type Payload = VTCDirectoryDisclosurePayload;
26
+ /** Trust Task response type URI (request type URI + "#response"). */
27
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/directory/disclosure/0.1#response";
28
+ /** Stable alias for this specification's success-response payload shape. */
29
+ export type Response = VTCDirectoryDisclosureResponsePayload;
30
+ /**
31
+ * This specification's payload schema, as a value.
32
+ *
33
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
34
+ * rather than only as a `.json` file because TypeScript types are erased
35
+ * at runtime: without a schema a consumer has nothing to validate, and
36
+ * every REQUIRED payload member is optional in practice. Cross-file
37
+ * `$ref`s are already inlined, so it needs no resolver.
38
+ */
39
+ export declare const PAYLOAD_SCHEMA: {
40
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
41
+ readonly $id: "https://trusttasks.org/spec/vtc/directory/disclosure/0.1";
42
+ readonly title: "VTC Directory — Disclosure — payload";
43
+ readonly description: "Read the statement of what a community's directory discloses about its members, and to whom, generated from the configuration in force. Anyone may read it, applicants above all, so the request carries nothing about the reader. The outer document members are owned by the framework — SPEC §6.3.";
44
+ readonly type: "object";
45
+ readonly additionalProperties: false;
46
+ readonly properties: {
47
+ readonly ext: {
48
+ readonly $ref: "#/$defs/Ext";
49
+ };
50
+ };
51
+ readonly $defs: {
52
+ readonly Response: {
53
+ readonly $anchor: "response";
54
+ readonly title: "VTC Directory — Disclosure — response payload";
55
+ readonly description: "The success response to a vtc/directory/disclosure/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/disclosure/0.1#response.";
56
+ readonly type: "object";
57
+ readonly additionalProperties: false;
58
+ readonly required: readonly ["communityDid", "disclosure"];
59
+ readonly properties: {
60
+ readonly communityDid: {
61
+ readonly type: "string";
62
+ readonly pattern: "^did:";
63
+ readonly maxLength: 2048;
64
+ };
65
+ readonly disclosure: {
66
+ readonly $ref: "#/$defs/DirectoryDisclosure";
67
+ };
68
+ readonly ext: {
69
+ readonly $ref: "#/$defs/Ext";
70
+ };
71
+ };
72
+ };
73
+ readonly Ext: {
74
+ readonly title: "Ext";
75
+ 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.";
76
+ readonly type: "object";
77
+ readonly minProperties: 1;
78
+ readonly additionalProperties: true;
79
+ readonly propertyNames: {
80
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
81
+ };
82
+ };
83
+ readonly DirectoryDisclosure: {
84
+ readonly title: "DirectoryDisclosure";
85
+ readonly description: "The statement itself. Every member is generated from the community's configuration when the statement is read. `statementDigest` names this exact statement, so an applicant can record which one it was shown.";
86
+ readonly type: "object";
87
+ readonly additionalProperties: false;
88
+ readonly required: readonly ["fields", "newCard", "membershipIdentifiers", "adminNotes", "externalCards", "statementDigest"];
89
+ readonly properties: {
90
+ readonly fields: {
91
+ readonly type: "array";
92
+ readonly maxItems: 128;
93
+ readonly items: {
94
+ readonly $ref: "#/$defs/DisclosedField";
95
+ };
96
+ readonly description: "Every active field, base and community-defined, in display order. A base field the community has disabled is absent, which is how a reader learns it is not collected.";
97
+ };
98
+ readonly newCard: {
99
+ readonly $ref: "#/$defs/NewCardDefaults";
100
+ };
101
+ readonly membershipIdentifiers: {
102
+ readonly $ref: "#/$defs/Audience";
103
+ readonly description: "The widest audience a member's membership identifier — the DID they joined with — can reach through the directory: the ceiling of the base field `did`, or `admins` where that field is disabled. `members` or `public` means a member may choose to show it that widely; a new card never shows it beyond `admins` (VTI-DIR-042). Administrators always see it.";
104
+ };
105
+ readonly adminNotes: {
106
+ readonly type: "boolean";
107
+ readonly description: "Whether administrators keep notes about members. Notes are never on a card and never reach another member; a member may ask for the notes about them.";
108
+ };
109
+ readonly groups: {
110
+ readonly $ref: "#/$defs/GroupDisclosure";
111
+ };
112
+ readonly externalCards: {
113
+ readonly type: "boolean";
114
+ readonly description: "Whether a member may publish a card beyond the community: their `public` values, signed by them, offered through the community's trust registry. Always the member's own choice, and off on a new card. False where the community cannot publish external cards.";
115
+ };
116
+ readonly statementDigest: {
117
+ readonly $ref: "#/$defs/DigestMultibase";
118
+ readonly description: "Digest over the RFC 8785 (JCS) canonicalization of this statement with the `statementDigest` member removed, as a multibase-encoded multihash (SHA-256 and base58btc RECOMMENDED). Changes exactly when what the statement says changes.";
119
+ };
120
+ readonly ext: {
121
+ readonly $ref: "#/$defs/Ext";
122
+ };
123
+ };
124
+ };
125
+ readonly GroupDisclosure: {
126
+ readonly title: "GroupDisclosure";
127
+ readonly description: "Present when the community has groups. A member of a group holds a credential, issued by the group's own identifier, that evidences their membership, and can present it outside the community — which is why an applicant is told.";
128
+ readonly type: "object";
129
+ readonly additionalProperties: false;
130
+ readonly required: readonly ["credentialValidity"];
131
+ readonly properties: {
132
+ readonly credentialValidity: {
133
+ readonly type: "string";
134
+ readonly maxLength: 32;
135
+ readonly pattern: "^P(([0-9]+W)?([0-9]+D)?T([0-9]+H([0-9]+M)?([0-9]+S)?|[0-9]+M([0-9]+S)?|[0-9]+S)|[0-9]+W([0-9]+D)?|[0-9]+D)$";
136
+ readonly description: "How long each group membership credential is valid for, as an ISO 8601 duration in weeks, days, hours, minutes and seconds (`P30D`). It is renewed while the member stays in the group, and a credential already issued stays valid until it expires even after its holder leaves.";
137
+ };
138
+ };
139
+ };
140
+ readonly NewCardDefaults: {
141
+ readonly title: "NewCardDefaults";
142
+ readonly description: "The discoverability a card has when the community creates it, before its member chooses. A new card is never published beyond the community (VTI-DIR-042), so there is no member for that here: `externalCards` says whether the member may turn it on.";
143
+ readonly type: "object";
144
+ readonly additionalProperties: false;
145
+ readonly required: readonly ["listing", "search"];
146
+ readonly properties: {
147
+ readonly listing: {
148
+ readonly $ref: "#/$defs/Listing";
149
+ readonly description: "The listing a new card starts with: the community's `defaultListing` (vtc/directory/fields/list). Every member may always choose `hidden`.";
150
+ };
151
+ readonly search: {
152
+ readonly type: "string";
153
+ readonly enum: readonly ["byName", "exactNickname", "off"];
154
+ readonly description: "What a member's search may match, as the card's `discoverability.search`.";
155
+ };
156
+ readonly introductions: {
157
+ readonly $ref: "#/$defs/Introductions";
158
+ readonly description: "From whom a new card accepts introductions. Absent where the community does not deliver introductions.";
159
+ };
160
+ };
161
+ };
162
+ readonly Introductions: {
163
+ readonly title: "Introductions";
164
+ readonly description: "Who may ask the community to introduce them to this member. `anyone`: any active member who can find the entry. `groups`: only members who share a community group with them. `connections`: only members holding an attributed, in-force verified relationship with them. `off`: nobody. A refused introduction is never reported to its sender.";
165
+ readonly type: "string";
166
+ readonly enum: readonly ["anyone", "groups", "connections", "off"];
167
+ };
168
+ readonly Listing: {
169
+ readonly title: "Listing";
170
+ readonly description: "Whether members can find the entry. `listed`: it appears when members browse. `findable`: it does not appear when browsing, but a search that matches it under `search` returns it. `hidden`: no member finds it by browsing or searching; administrators still see it, and members who share a group that shows its members see it in that group's member list.";
171
+ readonly type: "string";
172
+ readonly enum: readonly ["listed", "findable", "hidden"];
173
+ };
174
+ readonly DisclosedField: {
175
+ readonly title: "DisclosedField";
176
+ readonly description: "One active field of the community's directory, as an applicant needs to see it: what it is, who writes its value, the widest audience it may ever reach and the audience a new card gives it. Disabled and retired fields are not listed: no projection shows them.";
177
+ readonly type: "object";
178
+ readonly additionalProperties: false;
179
+ readonly required: readonly ["key", "label", "type", "source", "ceiling", "defaultVisibility", "searchable"];
180
+ readonly properties: {
181
+ readonly key: {
182
+ readonly $ref: "#/$defs/FieldKey";
183
+ };
184
+ readonly label: {
185
+ readonly $ref: "#/$defs/FieldLabel";
186
+ };
187
+ readonly description: {
188
+ readonly $ref: "#/$defs/FieldDescription";
189
+ };
190
+ readonly type: {
191
+ readonly $ref: "#/$defs/FieldType";
192
+ };
193
+ readonly source: {
194
+ readonly $ref: "#/$defs/FieldSource";
195
+ readonly description: "Who writes the value. `admin` and `credential` matter most to an applicant: an `admin` field holds what the community asserts about the member, which the member reads and cannot change.";
196
+ };
197
+ readonly ceiling: {
198
+ readonly $ref: "#/$defs/Audience";
199
+ readonly description: "The widest audience the field may ever reach, whatever the member chooses.";
200
+ };
201
+ readonly defaultVisibility: {
202
+ readonly $ref: "#/$defs/Audience";
203
+ readonly description: "The audience a new card gives the field until its member chooses. Never wider than `ceiling`.";
204
+ };
205
+ readonly searchable: {
206
+ readonly type: "boolean";
207
+ readonly description: "Whether a member's search may match the field, within what the searcher may see.";
208
+ };
209
+ readonly facet: {
210
+ readonly type: "boolean";
211
+ readonly description: "Whether members may filter on the field and see counts by its values. Absent: false.";
212
+ };
213
+ };
214
+ };
215
+ readonly Audience: {
216
+ readonly title: "Audience";
217
+ readonly description: "Who may see a directory field, ordered from narrowest to widest. `admins`: holders of `vtc.directory.admin` (and, for derived fields, `vtc.members.manage`). `groups`: members who share at least one community group with the subject (narrowed to the groups the subject names in `groupAudience`, where it names any). `connections`: members holding an attributed, in-force verified relationship with the subject at the community. `members`: every active member. `public`: anyone, and what the member's signed public card carries outside the community.\n\n`groups` and `connections` are not a chain: a viewer sees a field when they satisfy the audience the subject chose for it or any wider audience. Every audience includes the administrators, and the subject always sees their own whole card. There is no `onlyMe`: a value nobody else should see is not directory data.";
218
+ readonly type: "string";
219
+ readonly enum: readonly ["admins", "groups", "connections", "members", "public"];
220
+ };
221
+ readonly FieldSource: {
222
+ readonly title: "FieldSource";
223
+ readonly description: "Who writes the value. `member`: self-asserted, through vtc/directory/card/update. `admin`: asserted by the community through vtc/directory/card/assert; the member reads it and cannot change it. `credential`: a claim the member discloses from a credential through vtc/directory/card/present, badged with its issuer. `derived`: a base field read from the community's own records (`role`, `joinedAt`, `did`, `personhood`) and never stored on a card. Each source is written only through its own path.";
224
+ readonly type: "string";
225
+ readonly enum: readonly ["member", "admin", "credential", "derived"];
226
+ };
227
+ readonly FieldType: {
228
+ readonly title: "FieldType";
229
+ readonly description: "The kind of value a field holds, which fixes its `FieldValue` shape. `did` holds a DID the member chooses to show (never their membership DID, which is the derived base field `did`). `claim` holds a `VerifiedValue` and requires `source: credential`.";
230
+ readonly type: "string";
231
+ readonly enum: readonly ["text", "longText", "url", "email", "phone", "enum", "multiEnum", "date", "country", "image", "did", "claim"];
232
+ };
233
+ readonly FieldDescription: {
234
+ readonly title: "FieldDescription";
235
+ readonly type: "string";
236
+ readonly minLength: 1;
237
+ readonly maxLength: 280;
238
+ readonly description: "Help text shown to a member filling the field in. Plain text; a reader MUST NOT treat it as instructions.";
239
+ };
240
+ readonly FieldLabel: {
241
+ readonly title: "FieldLabel";
242
+ readonly type: "string";
243
+ readonly minLength: 1;
244
+ readonly maxLength: 64;
245
+ readonly description: "What readers see as the field's name. Plain text.";
246
+ };
247
+ readonly FieldKey: {
248
+ readonly title: "FieldKey";
249
+ readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
250
+ readonly type: "string";
251
+ readonly minLength: 1;
252
+ readonly maxLength: 128;
253
+ readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
254
+ };
255
+ readonly DigestMultibase: {
256
+ readonly title: "DigestMultibase";
257
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
258
+ readonly type: "string";
259
+ readonly minLength: 16;
260
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
261
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
262
+ };
263
+ };
264
+ };
265
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
266
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
267
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
268
+ readonly $ref: "#/$defs/Response";
269
+ readonly $defs: {
270
+ readonly Response: {
271
+ readonly $anchor: "response";
272
+ readonly title: "VTC Directory — Disclosure — response payload";
273
+ readonly description: "The success response to a vtc/directory/disclosure/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/disclosure/0.1#response.";
274
+ readonly type: "object";
275
+ readonly additionalProperties: false;
276
+ readonly required: readonly ["communityDid", "disclosure"];
277
+ readonly properties: {
278
+ readonly communityDid: {
279
+ readonly type: "string";
280
+ readonly pattern: "^did:";
281
+ readonly maxLength: 2048;
282
+ };
283
+ readonly disclosure: {
284
+ readonly $ref: "#/$defs/DirectoryDisclosure";
285
+ };
286
+ readonly ext: {
287
+ readonly $ref: "#/$defs/Ext";
288
+ };
289
+ };
290
+ };
291
+ readonly Ext: {
292
+ readonly title: "Ext";
293
+ 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.";
294
+ readonly type: "object";
295
+ readonly minProperties: 1;
296
+ readonly additionalProperties: true;
297
+ readonly propertyNames: {
298
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
299
+ };
300
+ };
301
+ readonly DirectoryDisclosure: {
302
+ readonly title: "DirectoryDisclosure";
303
+ readonly description: "The statement itself. Every member is generated from the community's configuration when the statement is read. `statementDigest` names this exact statement, so an applicant can record which one it was shown.";
304
+ readonly type: "object";
305
+ readonly additionalProperties: false;
306
+ readonly required: readonly ["fields", "newCard", "membershipIdentifiers", "adminNotes", "externalCards", "statementDigest"];
307
+ readonly properties: {
308
+ readonly fields: {
309
+ readonly type: "array";
310
+ readonly maxItems: 128;
311
+ readonly items: {
312
+ readonly $ref: "#/$defs/DisclosedField";
313
+ };
314
+ readonly description: "Every active field, base and community-defined, in display order. A base field the community has disabled is absent, which is how a reader learns it is not collected.";
315
+ };
316
+ readonly newCard: {
317
+ readonly $ref: "#/$defs/NewCardDefaults";
318
+ };
319
+ readonly membershipIdentifiers: {
320
+ readonly $ref: "#/$defs/Audience";
321
+ readonly description: "The widest audience a member's membership identifier — the DID they joined with — can reach through the directory: the ceiling of the base field `did`, or `admins` where that field is disabled. `members` or `public` means a member may choose to show it that widely; a new card never shows it beyond `admins` (VTI-DIR-042). Administrators always see it.";
322
+ };
323
+ readonly adminNotes: {
324
+ readonly type: "boolean";
325
+ readonly description: "Whether administrators keep notes about members. Notes are never on a card and never reach another member; a member may ask for the notes about them.";
326
+ };
327
+ readonly groups: {
328
+ readonly $ref: "#/$defs/GroupDisclosure";
329
+ };
330
+ readonly externalCards: {
331
+ readonly type: "boolean";
332
+ readonly description: "Whether a member may publish a card beyond the community: their `public` values, signed by them, offered through the community's trust registry. Always the member's own choice, and off on a new card. False where the community cannot publish external cards.";
333
+ };
334
+ readonly statementDigest: {
335
+ readonly $ref: "#/$defs/DigestMultibase";
336
+ readonly description: "Digest over the RFC 8785 (JCS) canonicalization of this statement with the `statementDigest` member removed, as a multibase-encoded multihash (SHA-256 and base58btc RECOMMENDED). Changes exactly when what the statement says changes.";
337
+ };
338
+ readonly ext: {
339
+ readonly $ref: "#/$defs/Ext";
340
+ };
341
+ };
342
+ };
343
+ readonly GroupDisclosure: {
344
+ readonly title: "GroupDisclosure";
345
+ readonly description: "Present when the community has groups. A member of a group holds a credential, issued by the group's own identifier, that evidences their membership, and can present it outside the community — which is why an applicant is told.";
346
+ readonly type: "object";
347
+ readonly additionalProperties: false;
348
+ readonly required: readonly ["credentialValidity"];
349
+ readonly properties: {
350
+ readonly credentialValidity: {
351
+ readonly type: "string";
352
+ readonly maxLength: 32;
353
+ readonly pattern: "^P(([0-9]+W)?([0-9]+D)?T([0-9]+H([0-9]+M)?([0-9]+S)?|[0-9]+M([0-9]+S)?|[0-9]+S)|[0-9]+W([0-9]+D)?|[0-9]+D)$";
354
+ readonly description: "How long each group membership credential is valid for, as an ISO 8601 duration in weeks, days, hours, minutes and seconds (`P30D`). It is renewed while the member stays in the group, and a credential already issued stays valid until it expires even after its holder leaves.";
355
+ };
356
+ };
357
+ };
358
+ readonly NewCardDefaults: {
359
+ readonly title: "NewCardDefaults";
360
+ readonly description: "The discoverability a card has when the community creates it, before its member chooses. A new card is never published beyond the community (VTI-DIR-042), so there is no member for that here: `externalCards` says whether the member may turn it on.";
361
+ readonly type: "object";
362
+ readonly additionalProperties: false;
363
+ readonly required: readonly ["listing", "search"];
364
+ readonly properties: {
365
+ readonly listing: {
366
+ readonly $ref: "#/$defs/Listing";
367
+ readonly description: "The listing a new card starts with: the community's `defaultListing` (vtc/directory/fields/list). Every member may always choose `hidden`.";
368
+ };
369
+ readonly search: {
370
+ readonly type: "string";
371
+ readonly enum: readonly ["byName", "exactNickname", "off"];
372
+ readonly description: "What a member's search may match, as the card's `discoverability.search`.";
373
+ };
374
+ readonly introductions: {
375
+ readonly $ref: "#/$defs/Introductions";
376
+ readonly description: "From whom a new card accepts introductions. Absent where the community does not deliver introductions.";
377
+ };
378
+ };
379
+ };
380
+ readonly Introductions: {
381
+ readonly title: "Introductions";
382
+ readonly description: "Who may ask the community to introduce them to this member. `anyone`: any active member who can find the entry. `groups`: only members who share a community group with them. `connections`: only members holding an attributed, in-force verified relationship with them. `off`: nobody. A refused introduction is never reported to its sender.";
383
+ readonly type: "string";
384
+ readonly enum: readonly ["anyone", "groups", "connections", "off"];
385
+ };
386
+ readonly Listing: {
387
+ readonly title: "Listing";
388
+ readonly description: "Whether members can find the entry. `listed`: it appears when members browse. `findable`: it does not appear when browsing, but a search that matches it under `search` returns it. `hidden`: no member finds it by browsing or searching; administrators still see it, and members who share a group that shows its members see it in that group's member list.";
389
+ readonly type: "string";
390
+ readonly enum: readonly ["listed", "findable", "hidden"];
391
+ };
392
+ readonly DisclosedField: {
393
+ readonly title: "DisclosedField";
394
+ readonly description: "One active field of the community's directory, as an applicant needs to see it: what it is, who writes its value, the widest audience it may ever reach and the audience a new card gives it. Disabled and retired fields are not listed: no projection shows them.";
395
+ readonly type: "object";
396
+ readonly additionalProperties: false;
397
+ readonly required: readonly ["key", "label", "type", "source", "ceiling", "defaultVisibility", "searchable"];
398
+ readonly properties: {
399
+ readonly key: {
400
+ readonly $ref: "#/$defs/FieldKey";
401
+ };
402
+ readonly label: {
403
+ readonly $ref: "#/$defs/FieldLabel";
404
+ };
405
+ readonly description: {
406
+ readonly $ref: "#/$defs/FieldDescription";
407
+ };
408
+ readonly type: {
409
+ readonly $ref: "#/$defs/FieldType";
410
+ };
411
+ readonly source: {
412
+ readonly $ref: "#/$defs/FieldSource";
413
+ readonly description: "Who writes the value. `admin` and `credential` matter most to an applicant: an `admin` field holds what the community asserts about the member, which the member reads and cannot change.";
414
+ };
415
+ readonly ceiling: {
416
+ readonly $ref: "#/$defs/Audience";
417
+ readonly description: "The widest audience the field may ever reach, whatever the member chooses.";
418
+ };
419
+ readonly defaultVisibility: {
420
+ readonly $ref: "#/$defs/Audience";
421
+ readonly description: "The audience a new card gives the field until its member chooses. Never wider than `ceiling`.";
422
+ };
423
+ readonly searchable: {
424
+ readonly type: "boolean";
425
+ readonly description: "Whether a member's search may match the field, within what the searcher may see.";
426
+ };
427
+ readonly facet: {
428
+ readonly type: "boolean";
429
+ readonly description: "Whether members may filter on the field and see counts by its values. Absent: false.";
430
+ };
431
+ };
432
+ };
433
+ readonly Audience: {
434
+ readonly title: "Audience";
435
+ readonly description: "Who may see a directory field, ordered from narrowest to widest. `admins`: holders of `vtc.directory.admin` (and, for derived fields, `vtc.members.manage`). `groups`: members who share at least one community group with the subject (narrowed to the groups the subject names in `groupAudience`, where it names any). `connections`: members holding an attributed, in-force verified relationship with the subject at the community. `members`: every active member. `public`: anyone, and what the member's signed public card carries outside the community.\n\n`groups` and `connections` are not a chain: a viewer sees a field when they satisfy the audience the subject chose for it or any wider audience. Every audience includes the administrators, and the subject always sees their own whole card. There is no `onlyMe`: a value nobody else should see is not directory data.";
436
+ readonly type: "string";
437
+ readonly enum: readonly ["admins", "groups", "connections", "members", "public"];
438
+ };
439
+ readonly FieldSource: {
440
+ readonly title: "FieldSource";
441
+ readonly description: "Who writes the value. `member`: self-asserted, through vtc/directory/card/update. `admin`: asserted by the community through vtc/directory/card/assert; the member reads it and cannot change it. `credential`: a claim the member discloses from a credential through vtc/directory/card/present, badged with its issuer. `derived`: a base field read from the community's own records (`role`, `joinedAt`, `did`, `personhood`) and never stored on a card. Each source is written only through its own path.";
442
+ readonly type: "string";
443
+ readonly enum: readonly ["member", "admin", "credential", "derived"];
444
+ };
445
+ readonly FieldType: {
446
+ readonly title: "FieldType";
447
+ readonly description: "The kind of value a field holds, which fixes its `FieldValue` shape. `did` holds a DID the member chooses to show (never their membership DID, which is the derived base field `did`). `claim` holds a `VerifiedValue` and requires `source: credential`.";
448
+ readonly type: "string";
449
+ readonly enum: readonly ["text", "longText", "url", "email", "phone", "enum", "multiEnum", "date", "country", "image", "did", "claim"];
450
+ };
451
+ readonly FieldDescription: {
452
+ readonly title: "FieldDescription";
453
+ readonly type: "string";
454
+ readonly minLength: 1;
455
+ readonly maxLength: 280;
456
+ readonly description: "Help text shown to a member filling the field in. Plain text; a reader MUST NOT treat it as instructions.";
457
+ };
458
+ readonly FieldLabel: {
459
+ readonly title: "FieldLabel";
460
+ readonly type: "string";
461
+ readonly minLength: 1;
462
+ readonly maxLength: 64;
463
+ readonly description: "What readers see as the field's name. Plain text.";
464
+ };
465
+ readonly FieldKey: {
466
+ readonly title: "FieldKey";
467
+ readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
468
+ readonly type: "string";
469
+ readonly minLength: 1;
470
+ readonly maxLength: 128;
471
+ readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
472
+ };
473
+ readonly DigestMultibase: {
474
+ readonly title: "DigestMultibase";
475
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
476
+ readonly type: "string";
477
+ readonly minLength: 16;
478
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
479
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
480
+ };
481
+ };
482
+ };
483
+ /**
484
+ * SPEC.md §7.2 policy for the request variant, from this specification's
485
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
486
+ * per-specification and cannot be derived from the document alone, and
487
+ * item 2 needs the schema this carries.
488
+ */
489
+ export declare const SPEC: {
490
+ readonly typeUri: "https://trusttasks.org/spec/vtc/directory/disclosure/0.1";
491
+ readonly isBearer: false;
492
+ readonly isProofRequired: false;
493
+ readonly isRecipientRequired: true;
494
+ readonly isIssuedAtRequired: false;
495
+ readonly payloadSchema: {
496
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
497
+ readonly $id: "https://trusttasks.org/spec/vtc/directory/disclosure/0.1";
498
+ readonly title: "VTC Directory — Disclosure — payload";
499
+ readonly description: "Read the statement of what a community's directory discloses about its members, and to whom, generated from the configuration in force. Anyone may read it, applicants above all, so the request carries nothing about the reader. The outer document members are owned by the framework — SPEC §6.3.";
500
+ readonly type: "object";
501
+ readonly additionalProperties: false;
502
+ readonly properties: {
503
+ readonly ext: {
504
+ readonly $ref: "#/$defs/Ext";
505
+ };
506
+ };
507
+ readonly $defs: {
508
+ readonly Response: {
509
+ readonly $anchor: "response";
510
+ readonly title: "VTC Directory — Disclosure — response payload";
511
+ readonly description: "The success response to a vtc/directory/disclosure/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/disclosure/0.1#response.";
512
+ readonly type: "object";
513
+ readonly additionalProperties: false;
514
+ readonly required: readonly ["communityDid", "disclosure"];
515
+ readonly properties: {
516
+ readonly communityDid: {
517
+ readonly type: "string";
518
+ readonly pattern: "^did:";
519
+ readonly maxLength: 2048;
520
+ };
521
+ readonly disclosure: {
522
+ readonly $ref: "#/$defs/DirectoryDisclosure";
523
+ };
524
+ readonly ext: {
525
+ readonly $ref: "#/$defs/Ext";
526
+ };
527
+ };
528
+ };
529
+ readonly Ext: {
530
+ readonly title: "Ext";
531
+ 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.";
532
+ readonly type: "object";
533
+ readonly minProperties: 1;
534
+ readonly additionalProperties: true;
535
+ readonly propertyNames: {
536
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
537
+ };
538
+ };
539
+ readonly DirectoryDisclosure: {
540
+ readonly title: "DirectoryDisclosure";
541
+ readonly description: "The statement itself. Every member is generated from the community's configuration when the statement is read. `statementDigest` names this exact statement, so an applicant can record which one it was shown.";
542
+ readonly type: "object";
543
+ readonly additionalProperties: false;
544
+ readonly required: readonly ["fields", "newCard", "membershipIdentifiers", "adminNotes", "externalCards", "statementDigest"];
545
+ readonly properties: {
546
+ readonly fields: {
547
+ readonly type: "array";
548
+ readonly maxItems: 128;
549
+ readonly items: {
550
+ readonly $ref: "#/$defs/DisclosedField";
551
+ };
552
+ readonly description: "Every active field, base and community-defined, in display order. A base field the community has disabled is absent, which is how a reader learns it is not collected.";
553
+ };
554
+ readonly newCard: {
555
+ readonly $ref: "#/$defs/NewCardDefaults";
556
+ };
557
+ readonly membershipIdentifiers: {
558
+ readonly $ref: "#/$defs/Audience";
559
+ readonly description: "The widest audience a member's membership identifier — the DID they joined with — can reach through the directory: the ceiling of the base field `did`, or `admins` where that field is disabled. `members` or `public` means a member may choose to show it that widely; a new card never shows it beyond `admins` (VTI-DIR-042). Administrators always see it.";
560
+ };
561
+ readonly adminNotes: {
562
+ readonly type: "boolean";
563
+ readonly description: "Whether administrators keep notes about members. Notes are never on a card and never reach another member; a member may ask for the notes about them.";
564
+ };
565
+ readonly groups: {
566
+ readonly $ref: "#/$defs/GroupDisclosure";
567
+ };
568
+ readonly externalCards: {
569
+ readonly type: "boolean";
570
+ readonly description: "Whether a member may publish a card beyond the community: their `public` values, signed by them, offered through the community's trust registry. Always the member's own choice, and off on a new card. False where the community cannot publish external cards.";
571
+ };
572
+ readonly statementDigest: {
573
+ readonly $ref: "#/$defs/DigestMultibase";
574
+ readonly description: "Digest over the RFC 8785 (JCS) canonicalization of this statement with the `statementDigest` member removed, as a multibase-encoded multihash (SHA-256 and base58btc RECOMMENDED). Changes exactly when what the statement says changes.";
575
+ };
576
+ readonly ext: {
577
+ readonly $ref: "#/$defs/Ext";
578
+ };
579
+ };
580
+ };
581
+ readonly GroupDisclosure: {
582
+ readonly title: "GroupDisclosure";
583
+ readonly description: "Present when the community has groups. A member of a group holds a credential, issued by the group's own identifier, that evidences their membership, and can present it outside the community — which is why an applicant is told.";
584
+ readonly type: "object";
585
+ readonly additionalProperties: false;
586
+ readonly required: readonly ["credentialValidity"];
587
+ readonly properties: {
588
+ readonly credentialValidity: {
589
+ readonly type: "string";
590
+ readonly maxLength: 32;
591
+ readonly pattern: "^P(([0-9]+W)?([0-9]+D)?T([0-9]+H([0-9]+M)?([0-9]+S)?|[0-9]+M([0-9]+S)?|[0-9]+S)|[0-9]+W([0-9]+D)?|[0-9]+D)$";
592
+ readonly description: "How long each group membership credential is valid for, as an ISO 8601 duration in weeks, days, hours, minutes and seconds (`P30D`). It is renewed while the member stays in the group, and a credential already issued stays valid until it expires even after its holder leaves.";
593
+ };
594
+ };
595
+ };
596
+ readonly NewCardDefaults: {
597
+ readonly title: "NewCardDefaults";
598
+ readonly description: "The discoverability a card has when the community creates it, before its member chooses. A new card is never published beyond the community (VTI-DIR-042), so there is no member for that here: `externalCards` says whether the member may turn it on.";
599
+ readonly type: "object";
600
+ readonly additionalProperties: false;
601
+ readonly required: readonly ["listing", "search"];
602
+ readonly properties: {
603
+ readonly listing: {
604
+ readonly $ref: "#/$defs/Listing";
605
+ readonly description: "The listing a new card starts with: the community's `defaultListing` (vtc/directory/fields/list). Every member may always choose `hidden`.";
606
+ };
607
+ readonly search: {
608
+ readonly type: "string";
609
+ readonly enum: readonly ["byName", "exactNickname", "off"];
610
+ readonly description: "What a member's search may match, as the card's `discoverability.search`.";
611
+ };
612
+ readonly introductions: {
613
+ readonly $ref: "#/$defs/Introductions";
614
+ readonly description: "From whom a new card accepts introductions. Absent where the community does not deliver introductions.";
615
+ };
616
+ };
617
+ };
618
+ readonly Introductions: {
619
+ readonly title: "Introductions";
620
+ readonly description: "Who may ask the community to introduce them to this member. `anyone`: any active member who can find the entry. `groups`: only members who share a community group with them. `connections`: only members holding an attributed, in-force verified relationship with them. `off`: nobody. A refused introduction is never reported to its sender.";
621
+ readonly type: "string";
622
+ readonly enum: readonly ["anyone", "groups", "connections", "off"];
623
+ };
624
+ readonly Listing: {
625
+ readonly title: "Listing";
626
+ readonly description: "Whether members can find the entry. `listed`: it appears when members browse. `findable`: it does not appear when browsing, but a search that matches it under `search` returns it. `hidden`: no member finds it by browsing or searching; administrators still see it, and members who share a group that shows its members see it in that group's member list.";
627
+ readonly type: "string";
628
+ readonly enum: readonly ["listed", "findable", "hidden"];
629
+ };
630
+ readonly DisclosedField: {
631
+ readonly title: "DisclosedField";
632
+ readonly description: "One active field of the community's directory, as an applicant needs to see it: what it is, who writes its value, the widest audience it may ever reach and the audience a new card gives it. Disabled and retired fields are not listed: no projection shows them.";
633
+ readonly type: "object";
634
+ readonly additionalProperties: false;
635
+ readonly required: readonly ["key", "label", "type", "source", "ceiling", "defaultVisibility", "searchable"];
636
+ readonly properties: {
637
+ readonly key: {
638
+ readonly $ref: "#/$defs/FieldKey";
639
+ };
640
+ readonly label: {
641
+ readonly $ref: "#/$defs/FieldLabel";
642
+ };
643
+ readonly description: {
644
+ readonly $ref: "#/$defs/FieldDescription";
645
+ };
646
+ readonly type: {
647
+ readonly $ref: "#/$defs/FieldType";
648
+ };
649
+ readonly source: {
650
+ readonly $ref: "#/$defs/FieldSource";
651
+ readonly description: "Who writes the value. `admin` and `credential` matter most to an applicant: an `admin` field holds what the community asserts about the member, which the member reads and cannot change.";
652
+ };
653
+ readonly ceiling: {
654
+ readonly $ref: "#/$defs/Audience";
655
+ readonly description: "The widest audience the field may ever reach, whatever the member chooses.";
656
+ };
657
+ readonly defaultVisibility: {
658
+ readonly $ref: "#/$defs/Audience";
659
+ readonly description: "The audience a new card gives the field until its member chooses. Never wider than `ceiling`.";
660
+ };
661
+ readonly searchable: {
662
+ readonly type: "boolean";
663
+ readonly description: "Whether a member's search may match the field, within what the searcher may see.";
664
+ };
665
+ readonly facet: {
666
+ readonly type: "boolean";
667
+ readonly description: "Whether members may filter on the field and see counts by its values. Absent: false.";
668
+ };
669
+ };
670
+ };
671
+ readonly Audience: {
672
+ readonly title: "Audience";
673
+ readonly description: "Who may see a directory field, ordered from narrowest to widest. `admins`: holders of `vtc.directory.admin` (and, for derived fields, `vtc.members.manage`). `groups`: members who share at least one community group with the subject (narrowed to the groups the subject names in `groupAudience`, where it names any). `connections`: members holding an attributed, in-force verified relationship with the subject at the community. `members`: every active member. `public`: anyone, and what the member's signed public card carries outside the community.\n\n`groups` and `connections` are not a chain: a viewer sees a field when they satisfy the audience the subject chose for it or any wider audience. Every audience includes the administrators, and the subject always sees their own whole card. There is no `onlyMe`: a value nobody else should see is not directory data.";
674
+ readonly type: "string";
675
+ readonly enum: readonly ["admins", "groups", "connections", "members", "public"];
676
+ };
677
+ readonly FieldSource: {
678
+ readonly title: "FieldSource";
679
+ readonly description: "Who writes the value. `member`: self-asserted, through vtc/directory/card/update. `admin`: asserted by the community through vtc/directory/card/assert; the member reads it and cannot change it. `credential`: a claim the member discloses from a credential through vtc/directory/card/present, badged with its issuer. `derived`: a base field read from the community's own records (`role`, `joinedAt`, `did`, `personhood`) and never stored on a card. Each source is written only through its own path.";
680
+ readonly type: "string";
681
+ readonly enum: readonly ["member", "admin", "credential", "derived"];
682
+ };
683
+ readonly FieldType: {
684
+ readonly title: "FieldType";
685
+ readonly description: "The kind of value a field holds, which fixes its `FieldValue` shape. `did` holds a DID the member chooses to show (never their membership DID, which is the derived base field `did`). `claim` holds a `VerifiedValue` and requires `source: credential`.";
686
+ readonly type: "string";
687
+ readonly enum: readonly ["text", "longText", "url", "email", "phone", "enum", "multiEnum", "date", "country", "image", "did", "claim"];
688
+ };
689
+ readonly FieldDescription: {
690
+ readonly title: "FieldDescription";
691
+ readonly type: "string";
692
+ readonly minLength: 1;
693
+ readonly maxLength: 280;
694
+ readonly description: "Help text shown to a member filling the field in. Plain text; a reader MUST NOT treat it as instructions.";
695
+ };
696
+ readonly FieldLabel: {
697
+ readonly title: "FieldLabel";
698
+ readonly type: "string";
699
+ readonly minLength: 1;
700
+ readonly maxLength: 64;
701
+ readonly description: "What readers see as the field's name. Plain text.";
702
+ };
703
+ readonly FieldKey: {
704
+ readonly title: "FieldKey";
705
+ readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
706
+ readonly type: "string";
707
+ readonly minLength: 1;
708
+ readonly maxLength: 128;
709
+ readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
710
+ };
711
+ readonly DigestMultibase: {
712
+ readonly title: "DigestMultibase";
713
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
714
+ readonly type: "string";
715
+ readonly minLength: 16;
716
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
717
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
718
+ };
719
+ };
720
+ };
721
+ };
722
+ /**
723
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
724
+ * tracks the *issuer* party's requirement because a response swaps the
725
+ * parties (§7.3 item 5).
726
+ */
727
+ export declare const RESPONSE_SPEC: {
728
+ readonly typeUri: "https://trusttasks.org/spec/vtc/directory/disclosure/0.1#response";
729
+ readonly isBearer: false;
730
+ readonly isProofRequired: false;
731
+ readonly isRecipientRequired: true;
732
+ readonly isIssuedAtRequired: false;
733
+ readonly payloadSchema: {
734
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
735
+ readonly $ref: "#/$defs/Response";
736
+ readonly $defs: {
737
+ readonly Response: {
738
+ readonly $anchor: "response";
739
+ readonly title: "VTC Directory — Disclosure — response payload";
740
+ readonly description: "The success response to a vtc/directory/disclosure/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/disclosure/0.1#response.";
741
+ readonly type: "object";
742
+ readonly additionalProperties: false;
743
+ readonly required: readonly ["communityDid", "disclosure"];
744
+ readonly properties: {
745
+ readonly communityDid: {
746
+ readonly type: "string";
747
+ readonly pattern: "^did:";
748
+ readonly maxLength: 2048;
749
+ };
750
+ readonly disclosure: {
751
+ readonly $ref: "#/$defs/DirectoryDisclosure";
752
+ };
753
+ readonly ext: {
754
+ readonly $ref: "#/$defs/Ext";
755
+ };
756
+ };
757
+ };
758
+ readonly Ext: {
759
+ readonly title: "Ext";
760
+ 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.";
761
+ readonly type: "object";
762
+ readonly minProperties: 1;
763
+ readonly additionalProperties: true;
764
+ readonly propertyNames: {
765
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
766
+ };
767
+ };
768
+ readonly DirectoryDisclosure: {
769
+ readonly title: "DirectoryDisclosure";
770
+ readonly description: "The statement itself. Every member is generated from the community's configuration when the statement is read. `statementDigest` names this exact statement, so an applicant can record which one it was shown.";
771
+ readonly type: "object";
772
+ readonly additionalProperties: false;
773
+ readonly required: readonly ["fields", "newCard", "membershipIdentifiers", "adminNotes", "externalCards", "statementDigest"];
774
+ readonly properties: {
775
+ readonly fields: {
776
+ readonly type: "array";
777
+ readonly maxItems: 128;
778
+ readonly items: {
779
+ readonly $ref: "#/$defs/DisclosedField";
780
+ };
781
+ readonly description: "Every active field, base and community-defined, in display order. A base field the community has disabled is absent, which is how a reader learns it is not collected.";
782
+ };
783
+ readonly newCard: {
784
+ readonly $ref: "#/$defs/NewCardDefaults";
785
+ };
786
+ readonly membershipIdentifiers: {
787
+ readonly $ref: "#/$defs/Audience";
788
+ readonly description: "The widest audience a member's membership identifier — the DID they joined with — can reach through the directory: the ceiling of the base field `did`, or `admins` where that field is disabled. `members` or `public` means a member may choose to show it that widely; a new card never shows it beyond `admins` (VTI-DIR-042). Administrators always see it.";
789
+ };
790
+ readonly adminNotes: {
791
+ readonly type: "boolean";
792
+ readonly description: "Whether administrators keep notes about members. Notes are never on a card and never reach another member; a member may ask for the notes about them.";
793
+ };
794
+ readonly groups: {
795
+ readonly $ref: "#/$defs/GroupDisclosure";
796
+ };
797
+ readonly externalCards: {
798
+ readonly type: "boolean";
799
+ readonly description: "Whether a member may publish a card beyond the community: their `public` values, signed by them, offered through the community's trust registry. Always the member's own choice, and off on a new card. False where the community cannot publish external cards.";
800
+ };
801
+ readonly statementDigest: {
802
+ readonly $ref: "#/$defs/DigestMultibase";
803
+ readonly description: "Digest over the RFC 8785 (JCS) canonicalization of this statement with the `statementDigest` member removed, as a multibase-encoded multihash (SHA-256 and base58btc RECOMMENDED). Changes exactly when what the statement says changes.";
804
+ };
805
+ readonly ext: {
806
+ readonly $ref: "#/$defs/Ext";
807
+ };
808
+ };
809
+ };
810
+ readonly GroupDisclosure: {
811
+ readonly title: "GroupDisclosure";
812
+ readonly description: "Present when the community has groups. A member of a group holds a credential, issued by the group's own identifier, that evidences their membership, and can present it outside the community — which is why an applicant is told.";
813
+ readonly type: "object";
814
+ readonly additionalProperties: false;
815
+ readonly required: readonly ["credentialValidity"];
816
+ readonly properties: {
817
+ readonly credentialValidity: {
818
+ readonly type: "string";
819
+ readonly maxLength: 32;
820
+ readonly pattern: "^P(([0-9]+W)?([0-9]+D)?T([0-9]+H([0-9]+M)?([0-9]+S)?|[0-9]+M([0-9]+S)?|[0-9]+S)|[0-9]+W([0-9]+D)?|[0-9]+D)$";
821
+ readonly description: "How long each group membership credential is valid for, as an ISO 8601 duration in weeks, days, hours, minutes and seconds (`P30D`). It is renewed while the member stays in the group, and a credential already issued stays valid until it expires even after its holder leaves.";
822
+ };
823
+ };
824
+ };
825
+ readonly NewCardDefaults: {
826
+ readonly title: "NewCardDefaults";
827
+ readonly description: "The discoverability a card has when the community creates it, before its member chooses. A new card is never published beyond the community (VTI-DIR-042), so there is no member for that here: `externalCards` says whether the member may turn it on.";
828
+ readonly type: "object";
829
+ readonly additionalProperties: false;
830
+ readonly required: readonly ["listing", "search"];
831
+ readonly properties: {
832
+ readonly listing: {
833
+ readonly $ref: "#/$defs/Listing";
834
+ readonly description: "The listing a new card starts with: the community's `defaultListing` (vtc/directory/fields/list). Every member may always choose `hidden`.";
835
+ };
836
+ readonly search: {
837
+ readonly type: "string";
838
+ readonly enum: readonly ["byName", "exactNickname", "off"];
839
+ readonly description: "What a member's search may match, as the card's `discoverability.search`.";
840
+ };
841
+ readonly introductions: {
842
+ readonly $ref: "#/$defs/Introductions";
843
+ readonly description: "From whom a new card accepts introductions. Absent where the community does not deliver introductions.";
844
+ };
845
+ };
846
+ };
847
+ readonly Introductions: {
848
+ readonly title: "Introductions";
849
+ readonly description: "Who may ask the community to introduce them to this member. `anyone`: any active member who can find the entry. `groups`: only members who share a community group with them. `connections`: only members holding an attributed, in-force verified relationship with them. `off`: nobody. A refused introduction is never reported to its sender.";
850
+ readonly type: "string";
851
+ readonly enum: readonly ["anyone", "groups", "connections", "off"];
852
+ };
853
+ readonly Listing: {
854
+ readonly title: "Listing";
855
+ readonly description: "Whether members can find the entry. `listed`: it appears when members browse. `findable`: it does not appear when browsing, but a search that matches it under `search` returns it. `hidden`: no member finds it by browsing or searching; administrators still see it, and members who share a group that shows its members see it in that group's member list.";
856
+ readonly type: "string";
857
+ readonly enum: readonly ["listed", "findable", "hidden"];
858
+ };
859
+ readonly DisclosedField: {
860
+ readonly title: "DisclosedField";
861
+ readonly description: "One active field of the community's directory, as an applicant needs to see it: what it is, who writes its value, the widest audience it may ever reach and the audience a new card gives it. Disabled and retired fields are not listed: no projection shows them.";
862
+ readonly type: "object";
863
+ readonly additionalProperties: false;
864
+ readonly required: readonly ["key", "label", "type", "source", "ceiling", "defaultVisibility", "searchable"];
865
+ readonly properties: {
866
+ readonly key: {
867
+ readonly $ref: "#/$defs/FieldKey";
868
+ };
869
+ readonly label: {
870
+ readonly $ref: "#/$defs/FieldLabel";
871
+ };
872
+ readonly description: {
873
+ readonly $ref: "#/$defs/FieldDescription";
874
+ };
875
+ readonly type: {
876
+ readonly $ref: "#/$defs/FieldType";
877
+ };
878
+ readonly source: {
879
+ readonly $ref: "#/$defs/FieldSource";
880
+ readonly description: "Who writes the value. `admin` and `credential` matter most to an applicant: an `admin` field holds what the community asserts about the member, which the member reads and cannot change.";
881
+ };
882
+ readonly ceiling: {
883
+ readonly $ref: "#/$defs/Audience";
884
+ readonly description: "The widest audience the field may ever reach, whatever the member chooses.";
885
+ };
886
+ readonly defaultVisibility: {
887
+ readonly $ref: "#/$defs/Audience";
888
+ readonly description: "The audience a new card gives the field until its member chooses. Never wider than `ceiling`.";
889
+ };
890
+ readonly searchable: {
891
+ readonly type: "boolean";
892
+ readonly description: "Whether a member's search may match the field, within what the searcher may see.";
893
+ };
894
+ readonly facet: {
895
+ readonly type: "boolean";
896
+ readonly description: "Whether members may filter on the field and see counts by its values. Absent: false.";
897
+ };
898
+ };
899
+ };
900
+ readonly Audience: {
901
+ readonly title: "Audience";
902
+ readonly description: "Who may see a directory field, ordered from narrowest to widest. `admins`: holders of `vtc.directory.admin` (and, for derived fields, `vtc.members.manage`). `groups`: members who share at least one community group with the subject (narrowed to the groups the subject names in `groupAudience`, where it names any). `connections`: members holding an attributed, in-force verified relationship with the subject at the community. `members`: every active member. `public`: anyone, and what the member's signed public card carries outside the community.\n\n`groups` and `connections` are not a chain: a viewer sees a field when they satisfy the audience the subject chose for it or any wider audience. Every audience includes the administrators, and the subject always sees their own whole card. There is no `onlyMe`: a value nobody else should see is not directory data.";
903
+ readonly type: "string";
904
+ readonly enum: readonly ["admins", "groups", "connections", "members", "public"];
905
+ };
906
+ readonly FieldSource: {
907
+ readonly title: "FieldSource";
908
+ readonly description: "Who writes the value. `member`: self-asserted, through vtc/directory/card/update. `admin`: asserted by the community through vtc/directory/card/assert; the member reads it and cannot change it. `credential`: a claim the member discloses from a credential through vtc/directory/card/present, badged with its issuer. `derived`: a base field read from the community's own records (`role`, `joinedAt`, `did`, `personhood`) and never stored on a card. Each source is written only through its own path.";
909
+ readonly type: "string";
910
+ readonly enum: readonly ["member", "admin", "credential", "derived"];
911
+ };
912
+ readonly FieldType: {
913
+ readonly title: "FieldType";
914
+ readonly description: "The kind of value a field holds, which fixes its `FieldValue` shape. `did` holds a DID the member chooses to show (never their membership DID, which is the derived base field `did`). `claim` holds a `VerifiedValue` and requires `source: credential`.";
915
+ readonly type: "string";
916
+ readonly enum: readonly ["text", "longText", "url", "email", "phone", "enum", "multiEnum", "date", "country", "image", "did", "claim"];
917
+ };
918
+ readonly FieldDescription: {
919
+ readonly title: "FieldDescription";
920
+ readonly type: "string";
921
+ readonly minLength: 1;
922
+ readonly maxLength: 280;
923
+ readonly description: "Help text shown to a member filling the field in. Plain text; a reader MUST NOT treat it as instructions.";
924
+ };
925
+ readonly FieldLabel: {
926
+ readonly title: "FieldLabel";
927
+ readonly type: "string";
928
+ readonly minLength: 1;
929
+ readonly maxLength: 64;
930
+ readonly description: "What readers see as the field's name. Plain text.";
931
+ };
932
+ readonly FieldKey: {
933
+ readonly title: "FieldKey";
934
+ readonly description: "Identifier of a directory field. A key with no `.` is a BASE field, the same in every community: `displayName`, `nickname`, `avatar`, `pronouns`, `bio`, `links` (written by the member) and `role`, `joinedAt`, `did`, `personhood` (derived from the community's own records, never stored on a card). A community-defined field MUST use a reverse-DNS key (`org.example.employer`), so a base key never collides with one, and a key is never reused with a different meaning once defined.";
935
+ readonly type: "string";
936
+ readonly minLength: 1;
937
+ readonly maxLength: 128;
938
+ readonly pattern: "^([a-z][a-z0-9-]*\\.)*[a-z][a-zA-Z0-9]{0,63}$";
939
+ };
940
+ readonly DigestMultibase: {
941
+ readonly title: "DigestMultibase";
942
+ readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
943
+ readonly type: "string";
944
+ readonly minLength: 16;
945
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
946
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
947
+ };
948
+ };
949
+ };
950
+ };
951
+ //# sourceMappingURL=payload.d.ts.map