@openvtc/trust-tasks 0.26.18 → 0.26.20

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 +87 -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,261 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/directory/card/publish/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { DigestMultibase, Ext, ExternalCard, PublishedCard } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A member publishes their external card: their `public` values as a JSContact card they signed. The community serves it as signed and points its trust registry to it; it never signs or composes the card itself. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCDirectoryCardPublishPayload {
13
+ card: PublishedCard;
14
+ /**
15
+ * The card revision the member signed against. Where the card has changed since, the answer is `superseded` and nothing is published.
16
+ */
17
+ expectedRevision?: number;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * The success response to a vtc/directory/card/publish/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/card/publish/0.1#response.
22
+ */
23
+ export interface VTCDirectoryCardPublishResponsePayload {
24
+ /**
25
+ * `published`, with the digest of the card now served.
26
+ */
27
+ externalCard: ExternalCard;
28
+ ext?: Ext;
29
+ }
30
+
31
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
32
+ export type { DigestMultibase, Ext, ExternalCard, PublishedCard };
33
+
34
+ /** Trust Task type URI. */
35
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/directory/card/publish/0.1" as const;
36
+
37
+ /** Stable alias for this specification's request payload shape. */
38
+ export type Payload = VTCDirectoryCardPublishPayload;
39
+
40
+ /** Trust Task response type URI (request type URI + "#response"). */
41
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/directory/card/publish/0.1#response" as const;
42
+
43
+ /** Stable alias for this specification's success-response payload shape. */
44
+ export type Response = VTCDirectoryCardPublishResponsePayload;
45
+
46
+ /**
47
+ * This specification's payload schema, as a value.
48
+ *
49
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
50
+ * rather than only as a `.json` file because TypeScript types are erased
51
+ * at runtime: without a schema a consumer has nothing to validate, and
52
+ * every REQUIRED payload member is optional in practice. Cross-file
53
+ * `$ref`s are already inlined, so it needs no resolver.
54
+ */
55
+ export const PAYLOAD_SCHEMA = {
56
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
57
+ "$id": "https://trusttasks.org/spec/vtc/directory/card/publish/0.1",
58
+ "title": "VTC Directory — Card — Publish — payload",
59
+ "description": "A member publishes their external card: their `public` values as a JSContact card they signed. The community serves it as signed and points its trust registry to it; it never signs or composes the card itself. The outer document members are owned by the framework — SPEC §6.3.",
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": [
63
+ "card"
64
+ ],
65
+ "properties": {
66
+ "card": {
67
+ "$ref": "#/$defs/PublishedCard"
68
+ },
69
+ "expectedRevision": {
70
+ "type": "integer",
71
+ "minimum": 0,
72
+ "description": "The card revision the member signed against. Where the card has changed since, the answer is `superseded` and nothing is published."
73
+ },
74
+ "ext": {
75
+ "$ref": "#/$defs/Ext"
76
+ }
77
+ },
78
+ "$defs": {
79
+ "Response": {
80
+ "$anchor": "response",
81
+ "title": "VTC Directory — Card — Publish — response payload",
82
+ "description": "The success response to a vtc/directory/card/publish/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/card/publish/0.1#response.",
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "externalCard"
87
+ ],
88
+ "properties": {
89
+ "externalCard": {
90
+ "$ref": "#/$defs/ExternalCard",
91
+ "description": "`published`, with the digest of the card now served."
92
+ },
93
+ "ext": {
94
+ "$ref": "#/$defs/Ext"
95
+ }
96
+ }
97
+ },
98
+ "Ext": {
99
+ "title": "Ext",
100
+ "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.",
101
+ "type": "object",
102
+ "minProperties": 1,
103
+ "additionalProperties": true,
104
+ "propertyNames": {
105
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
106
+ }
107
+ },
108
+ "ExternalCard": {
109
+ "title": "ExternalCard",
110
+ "description": "Where the member's external card stands. Present on a card exactly when `discoverability.external` is true. `published`: the community is serving the card the member signed, and its trust registry points to it. `awaitingSignature`: the member's `public` values have changed since they signed, so the community has withdrawn the card it was serving and serves none until the member signs the current values (vtc/directory/card/publish). The community never serves a card the member did not sign, and never one that differs from their current `public` values.",
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "state"
115
+ ],
116
+ "properties": {
117
+ "state": {
118
+ "type": "string",
119
+ "enum": [
120
+ "published",
121
+ "awaitingSignature"
122
+ ]
123
+ },
124
+ "cardDigest": {
125
+ "$ref": "#/$defs/DigestMultibase",
126
+ "description": "Present while `published`: digest of the card served, as vtc/directory/card/publish defines it."
127
+ },
128
+ "publishedAt": {
129
+ "type": "string",
130
+ "format": "date-time",
131
+ "description": "Present while `published`: when the card now served was published."
132
+ }
133
+ }
134
+ },
135
+ "DigestMultibase": {
136
+ "title": "DigestMultibase",
137
+ "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`.",
138
+ "type": "string",
139
+ "minLength": 16,
140
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
141
+ "examples": [
142
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
143
+ ]
144
+ },
145
+ "PublishedCard": {
146
+ "title": "PublishedCard",
147
+ "description": "A member's external card: a JSContact `Card` (RFC 9553) holding exactly their values whose visibility is `public`, mapped as `JSContactCard` maps them, with the member's W3C Data Integrity `proof`. The community serves it as received and never signs, composes or edits it (VTI-REG-004 item 4).\n\nCarried as an open object, and deliberately so: the proof covers every member of the card, and a typed binding that kept only the members named here would drop the rest and break the signature. So this schema constrains none of its members, and a consumer MUST check them itself: `@type`, `version`, `uid`, `issuer` and `proof` are present; `@type` is `Card`; `version` is `1.0`; `uid` is `urn:vtc-directory:<EntryId>`; `issuer` is the member's membership DID; `proof` is a `DataIntegrityProof` with `cryptosuite` `eddsa-jcs-2022` or `ecdsa-jcs-2019`, `proofPurpose` `assertionMethod`, and a `verificationMethod` of the member's membership DID authorized for `assertionMethod`; and the proof verifies over the card without it, before any member is relied on.",
148
+ "type": "object",
149
+ "additionalProperties": true
150
+ }
151
+ }
152
+ } as const;
153
+
154
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
155
+ export const RESPONSE_PAYLOAD_SCHEMA = {
156
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
157
+ "$ref": "#/$defs/Response",
158
+ "$defs": {
159
+ "Response": {
160
+ "$anchor": "response",
161
+ "title": "VTC Directory — Card — Publish — response payload",
162
+ "description": "The success response to a vtc/directory/card/publish/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/directory/card/publish/0.1#response.",
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "externalCard"
167
+ ],
168
+ "properties": {
169
+ "externalCard": {
170
+ "$ref": "#/$defs/ExternalCard",
171
+ "description": "`published`, with the digest of the card now served."
172
+ },
173
+ "ext": {
174
+ "$ref": "#/$defs/Ext"
175
+ }
176
+ }
177
+ },
178
+ "Ext": {
179
+ "title": "Ext",
180
+ "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.",
181
+ "type": "object",
182
+ "minProperties": 1,
183
+ "additionalProperties": true,
184
+ "propertyNames": {
185
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
186
+ }
187
+ },
188
+ "ExternalCard": {
189
+ "title": "ExternalCard",
190
+ "description": "Where the member's external card stands. Present on a card exactly when `discoverability.external` is true. `published`: the community is serving the card the member signed, and its trust registry points to it. `awaitingSignature`: the member's `public` values have changed since they signed, so the community has withdrawn the card it was serving and serves none until the member signs the current values (vtc/directory/card/publish). The community never serves a card the member did not sign, and never one that differs from their current `public` values.",
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": [
194
+ "state"
195
+ ],
196
+ "properties": {
197
+ "state": {
198
+ "type": "string",
199
+ "enum": [
200
+ "published",
201
+ "awaitingSignature"
202
+ ]
203
+ },
204
+ "cardDigest": {
205
+ "$ref": "#/$defs/DigestMultibase",
206
+ "description": "Present while `published`: digest of the card served, as vtc/directory/card/publish defines it."
207
+ },
208
+ "publishedAt": {
209
+ "type": "string",
210
+ "format": "date-time",
211
+ "description": "Present while `published`: when the card now served was published."
212
+ }
213
+ }
214
+ },
215
+ "DigestMultibase": {
216
+ "title": "DigestMultibase",
217
+ "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`.",
218
+ "type": "string",
219
+ "minLength": 16,
220
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
221
+ "examples": [
222
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
223
+ ]
224
+ },
225
+ "PublishedCard": {
226
+ "title": "PublishedCard",
227
+ "description": "A member's external card: a JSContact `Card` (RFC 9553) holding exactly their values whose visibility is `public`, mapped as `JSContactCard` maps them, with the member's W3C Data Integrity `proof`. The community serves it as received and never signs, composes or edits it (VTI-REG-004 item 4).\n\nCarried as an open object, and deliberately so: the proof covers every member of the card, and a typed binding that kept only the members named here would drop the rest and break the signature. So this schema constrains none of its members, and a consumer MUST check them itself: `@type`, `version`, `uid`, `issuer` and `proof` are present; `@type` is `Card`; `version` is `1.0`; `uid` is `urn:vtc-directory:<EntryId>`; `issuer` is the member's membership DID; `proof` is a `DataIntegrityProof` with `cryptosuite` `eddsa-jcs-2022` or `ecdsa-jcs-2019`, `proofPurpose` `assertionMethod`, and a `verificationMethod` of the member's membership DID authorized for `assertionMethod`; and the proof verifies over the card without it, before any member is relied on.",
228
+ "type": "object",
229
+ "additionalProperties": true
230
+ }
231
+ }
232
+ } as const;
233
+
234
+ /**
235
+ * SPEC.md §7.2 policy for the request variant, from this specification's
236
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
237
+ * per-specification and cannot be derived from the document alone, and
238
+ * item 2 needs the schema this carries.
239
+ */
240
+ export const SPEC = {
241
+ typeUri: TYPE_URI,
242
+ isBearer: false,
243
+ isProofRequired: true,
244
+ isRecipientRequired: true,
245
+ isIssuedAtRequired: true,
246
+ payloadSchema: PAYLOAD_SCHEMA,
247
+ } as const;
248
+
249
+ /**
250
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
251
+ * tracks the *issuer* party's requirement because a response swaps the
252
+ * parties (§7.3 item 5).
253
+ */
254
+ export const RESPONSE_SPEC = {
255
+ typeUri: RESPONSE_TYPE_URI,
256
+ isBearer: false,
257
+ isProofRequired: true,
258
+ isRecipientRequired: true,
259
+ isIssuedAtRequired: true,
260
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
261
+ } as const;
@@ -3,7 +3,7 @@
3
3
  * Source: specs/vtc/directory/card/show/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Audience, CardBlobRef, CardValues, DirectoryCard, Discoverability, EntryId, Ext, FieldKey, FieldValue, FieldVisibility, Introductions, Listing, VerifiedValue } from "../../../../../_shared/components.js";
6
+ import type { Audience, CardBlobRef, CardValues, DigestMultibase, DirectoryCard, Discoverability, EntryId, Ext, ExternalCard, FieldKey, FieldValue, FieldVisibility, Introductions, Listing, VerifiedValue } from "../../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**
@@ -27,7 +27,7 @@ export interface VTCDirectoryCardShowResponsePayload {
27
27
  }
28
28
 
29
29
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
30
- export type { Audience, CardBlobRef, CardValues, DirectoryCard, Discoverability, EntryId, Ext, FieldKey, FieldValue, FieldVisibility, Introductions, Listing, VerifiedValue };
30
+ export type { Audience, CardBlobRef, CardValues, DigestMultibase, DirectoryCard, Discoverability, EntryId, Ext, ExternalCard, FieldKey, FieldValue, FieldVisibility, Introductions, Listing, VerifiedValue };
31
31
 
32
32
  /** Trust Task type URI. */
33
33
  export const TYPE_URI = "https://trusttasks.org/spec/vtc/directory/card/show/0.1" as const;
@@ -148,6 +148,9 @@ export const PAYLOAD_SCHEMA = {
148
148
  },
149
149
  "description": "The community groups whose members count as the `groups` audience for this card. Absent: every community group the subject belongs to. A group the subject has left stops counting at once."
150
150
  },
151
+ "externalCard": {
152
+ "$ref": "#/$defs/ExternalCard"
153
+ },
151
154
  "revision": {
152
155
  "type": "integer",
153
156
  "minimum": 0,
@@ -164,6 +167,43 @@ export const PAYLOAD_SCHEMA = {
164
167
  }
165
168
  }
166
169
  },
170
+ "ExternalCard": {
171
+ "title": "ExternalCard",
172
+ "description": "Where the member's external card stands. Present on a card exactly when `discoverability.external` is true. `published`: the community is serving the card the member signed, and its trust registry points to it. `awaitingSignature`: the member's `public` values have changed since they signed, so the community has withdrawn the card it was serving and serves none until the member signs the current values (vtc/directory/card/publish). The community never serves a card the member did not sign, and never one that differs from their current `public` values.",
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": [
176
+ "state"
177
+ ],
178
+ "properties": {
179
+ "state": {
180
+ "type": "string",
181
+ "enum": [
182
+ "published",
183
+ "awaitingSignature"
184
+ ]
185
+ },
186
+ "cardDigest": {
187
+ "$ref": "#/$defs/DigestMultibase",
188
+ "description": "Present while `published`: digest of the card served, as vtc/directory/card/publish defines it."
189
+ },
190
+ "publishedAt": {
191
+ "type": "string",
192
+ "format": "date-time",
193
+ "description": "Present while `published`: when the card now served was published."
194
+ }
195
+ }
196
+ },
197
+ "DigestMultibase": {
198
+ "title": "DigestMultibase",
199
+ "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`.",
200
+ "type": "string",
201
+ "minLength": 16,
202
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
203
+ "examples": [
204
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
205
+ ]
206
+ },
167
207
  "Introductions": {
168
208
  "title": "Introductions",
169
209
  "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.",
@@ -329,7 +369,7 @@ export const PAYLOAD_SCHEMA = {
329
369
  },
330
370
  "CardBlobRef": {
331
371
  "title": "CardBlobRef",
332
- "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (metadata stripped, dimensions capped) so its digest does not link the member across communities. `url` and `urlExpiresAt` appear only in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL.",
372
+ "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.",
333
373
  "type": "object",
334
374
  "additionalProperties": false,
335
375
  "required": [
@@ -470,6 +510,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
470
510
  },
471
511
  "description": "The community groups whose members count as the `groups` audience for this card. Absent: every community group the subject belongs to. A group the subject has left stops counting at once."
472
512
  },
513
+ "externalCard": {
514
+ "$ref": "#/$defs/ExternalCard"
515
+ },
473
516
  "revision": {
474
517
  "type": "integer",
475
518
  "minimum": 0,
@@ -486,6 +529,43 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
486
529
  }
487
530
  }
488
531
  },
532
+ "ExternalCard": {
533
+ "title": "ExternalCard",
534
+ "description": "Where the member's external card stands. Present on a card exactly when `discoverability.external` is true. `published`: the community is serving the card the member signed, and its trust registry points to it. `awaitingSignature`: the member's `public` values have changed since they signed, so the community has withdrawn the card it was serving and serves none until the member signs the current values (vtc/directory/card/publish). The community never serves a card the member did not sign, and never one that differs from their current `public` values.",
535
+ "type": "object",
536
+ "additionalProperties": false,
537
+ "required": [
538
+ "state"
539
+ ],
540
+ "properties": {
541
+ "state": {
542
+ "type": "string",
543
+ "enum": [
544
+ "published",
545
+ "awaitingSignature"
546
+ ]
547
+ },
548
+ "cardDigest": {
549
+ "$ref": "#/$defs/DigestMultibase",
550
+ "description": "Present while `published`: digest of the card served, as vtc/directory/card/publish defines it."
551
+ },
552
+ "publishedAt": {
553
+ "type": "string",
554
+ "format": "date-time",
555
+ "description": "Present while `published`: when the card now served was published."
556
+ }
557
+ }
558
+ },
559
+ "DigestMultibase": {
560
+ "title": "DigestMultibase",
561
+ "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`.",
562
+ "type": "string",
563
+ "minLength": 16,
564
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
565
+ "examples": [
566
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
567
+ ]
568
+ },
489
569
  "Introductions": {
490
570
  "title": "Introductions",
491
571
  "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.",
@@ -651,7 +731,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
651
731
  },
652
732
  "CardBlobRef": {
653
733
  "title": "CardBlobRef",
654
- "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (metadata stripped, dimensions capped) so its digest does not link the member across communities. `url` and `urlExpiresAt` appear only in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL.",
734
+ "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.",
655
735
  "type": "object",
656
736
  "additionalProperties": false,
657
737
  "required": [
@@ -3,7 +3,7 @@
3
3
  * Source: specs/vtc/directory/card/update/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Audience, CardBlobRef, CardValues, DirectoryCard, Discoverability, EntryId, Ext, FieldKey, FieldValue, FieldVisibility, GroupId, Introductions, Listing, VerifiedValue } from "../../../../../_shared/components.js";
6
+ import type { Audience, CardBlobRef, CardValues, DigestMultibase, DirectoryCard, Discoverability, EntryId, Ext, ExternalCard, FieldKey, FieldValue, FieldVisibility, GroupId, Introductions, Listing, VerifiedValue } from "../../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**
@@ -52,7 +52,7 @@ export interface VTCDirectoryCardUpdateResponsePayload {
52
52
  }
53
53
 
54
54
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
55
- export type { Audience, CardBlobRef, CardValues, DirectoryCard, Discoverability, EntryId, Ext, FieldKey, FieldValue, FieldVisibility, GroupId, Introductions, Listing, VerifiedValue };
55
+ export type { Audience, CardBlobRef, CardValues, DigestMultibase, DirectoryCard, Discoverability, EntryId, Ext, ExternalCard, FieldKey, FieldValue, FieldVisibility, GroupId, Introductions, Listing, VerifiedValue };
56
56
 
57
57
  /** Trust Task type URI. */
58
58
  export const TYPE_URI = "https://trusttasks.org/spec/vtc/directory/card/update/0.1" as const;
@@ -232,6 +232,9 @@ export const PAYLOAD_SCHEMA = {
232
232
  },
233
233
  "description": "The community groups whose members count as the `groups` audience for this card. Absent: every community group the subject belongs to. A group the subject has left stops counting at once."
234
234
  },
235
+ "externalCard": {
236
+ "$ref": "#/$defs/ExternalCard"
237
+ },
235
238
  "revision": {
236
239
  "type": "integer",
237
240
  "minimum": 0,
@@ -248,6 +251,43 @@ export const PAYLOAD_SCHEMA = {
248
251
  }
249
252
  }
250
253
  },
254
+ "ExternalCard": {
255
+ "title": "ExternalCard",
256
+ "description": "Where the member's external card stands. Present on a card exactly when `discoverability.external` is true. `published`: the community is serving the card the member signed, and its trust registry points to it. `awaitingSignature`: the member's `public` values have changed since they signed, so the community has withdrawn the card it was serving and serves none until the member signs the current values (vtc/directory/card/publish). The community never serves a card the member did not sign, and never one that differs from their current `public` values.",
257
+ "type": "object",
258
+ "additionalProperties": false,
259
+ "required": [
260
+ "state"
261
+ ],
262
+ "properties": {
263
+ "state": {
264
+ "type": "string",
265
+ "enum": [
266
+ "published",
267
+ "awaitingSignature"
268
+ ]
269
+ },
270
+ "cardDigest": {
271
+ "$ref": "#/$defs/DigestMultibase",
272
+ "description": "Present while `published`: digest of the card served, as vtc/directory/card/publish defines it."
273
+ },
274
+ "publishedAt": {
275
+ "type": "string",
276
+ "format": "date-time",
277
+ "description": "Present while `published`: when the card now served was published."
278
+ }
279
+ }
280
+ },
281
+ "DigestMultibase": {
282
+ "title": "DigestMultibase",
283
+ "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`.",
284
+ "type": "string",
285
+ "minLength": 16,
286
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
287
+ "examples": [
288
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
289
+ ]
290
+ },
251
291
  "Introductions": {
252
292
  "title": "Introductions",
253
293
  "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.",
@@ -413,7 +453,7 @@ export const PAYLOAD_SCHEMA = {
413
453
  },
414
454
  "CardBlobRef": {
415
455
  "title": "CardBlobRef",
416
- "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (metadata stripped, dimensions capped) so its digest does not link the member across communities. `url` and `urlExpiresAt` appear only in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL.",
456
+ "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.",
417
457
  "type": "object",
418
458
  "additionalProperties": false,
419
459
  "required": [
@@ -559,6 +599,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
559
599
  },
560
600
  "description": "The community groups whose members count as the `groups` audience for this card. Absent: every community group the subject belongs to. A group the subject has left stops counting at once."
561
601
  },
602
+ "externalCard": {
603
+ "$ref": "#/$defs/ExternalCard"
604
+ },
562
605
  "revision": {
563
606
  "type": "integer",
564
607
  "minimum": 0,
@@ -575,6 +618,43 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
575
618
  }
576
619
  }
577
620
  },
621
+ "ExternalCard": {
622
+ "title": "ExternalCard",
623
+ "description": "Where the member's external card stands. Present on a card exactly when `discoverability.external` is true. `published`: the community is serving the card the member signed, and its trust registry points to it. `awaitingSignature`: the member's `public` values have changed since they signed, so the community has withdrawn the card it was serving and serves none until the member signs the current values (vtc/directory/card/publish). The community never serves a card the member did not sign, and never one that differs from their current `public` values.",
624
+ "type": "object",
625
+ "additionalProperties": false,
626
+ "required": [
627
+ "state"
628
+ ],
629
+ "properties": {
630
+ "state": {
631
+ "type": "string",
632
+ "enum": [
633
+ "published",
634
+ "awaitingSignature"
635
+ ]
636
+ },
637
+ "cardDigest": {
638
+ "$ref": "#/$defs/DigestMultibase",
639
+ "description": "Present while `published`: digest of the card served, as vtc/directory/card/publish defines it."
640
+ },
641
+ "publishedAt": {
642
+ "type": "string",
643
+ "format": "date-time",
644
+ "description": "Present while `published`: when the card now served was published."
645
+ }
646
+ }
647
+ },
648
+ "DigestMultibase": {
649
+ "title": "DigestMultibase",
650
+ "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`.",
651
+ "type": "string",
652
+ "minLength": 16,
653
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
654
+ "examples": [
655
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
656
+ ]
657
+ },
578
658
  "Introductions": {
579
659
  "title": "Introductions",
580
660
  "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.",
@@ -740,7 +820,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
740
820
  },
741
821
  "CardBlobRef": {
742
822
  "title": "CardBlobRef",
743
- "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (metadata stripped, dimensions capped) so its digest does not link the member across communities. `url` and `urlExpiresAt` appear only in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL.",
823
+ "description": "A content-addressed image held in the community's blob store — an avatar or an `image` field. At most 256 KiB, images only, re-encoded by the community on upload (vtc/directory/images/upload: metadata stripped, dimensions capped) so its digest does not link the member across communities. A viewer reads the bytes with vtc/directory/images/get, which answers only where the same projection shows the value. `url` and `urlExpiresAt` MAY appear in a projection: a short-lived URL the community checks against the same projection, so a member-only image is never a public URL. A community that does not offer one leaves both out.",
744
824
  "type": "object",
745
825
  "additionalProperties": false,
746
826
  "required": [