@openvtc/trust-tasks 0.20.0 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +90 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/attribute/get/1.0/payload.d.ts +1221 -0
- package/dist/persona/attribute/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/get/1.0/payload.js +719 -0
- package/dist/persona/attribute/get/1.0/payload.js.map +1 -0
- package/dist/vetting/attestation/0.1/payload.d.ts +690 -0
- package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -0
- package/dist/vetting/attestation/0.1/payload.js +374 -0
- package/dist/vetting/attestation/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts +261 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.js +145 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts +546 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js +290 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts +336 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js +178 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts +402 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js +205 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
- package/src/persona/attribute/get/1.0/payload.ts +785 -0
- package/src/vetting/attestation/0.1/payload.ts +493 -0
- package/src/vtc/vetting/pcs-challenge/0.1/payload.ts +187 -0
- package/src/vtc/vetting/vetters/event-mode/0.1/payload.ts +375 -0
- package/src/vtc/vetting/vetters/pcs-root/0.1/payload.ts +241 -0
- package/src/vtc/vetting/vetters/pcs-tokens/0.1/payload.ts +286 -0
|
@@ -0,0 +1,1221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/attribute/get/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Attribute, ClaimType, Ext, ProofRung, Provenance, ReleaseRequirement, Sensitivity, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Read one attribute the holder holds, by identifier. Values are withheld unless asked for, on the same two-step as persona/attribute/list: the expensive, disclosing path is the one a producer has to name.
|
|
8
|
+
*/
|
|
9
|
+
export interface PersonaAttributeGetPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The attribute to read. One identifier, never a list: a maintainer that accepted several would recreate the enumeration this task exists to avoid.
|
|
12
|
+
*/
|
|
13
|
+
attributeId: Ulid;
|
|
14
|
+
/**
|
|
15
|
+
* When false (the default), the attribute's metadata is returned and its `value` is not. The default is false even though a caller naming one attribute usually wants its value, because the alternative makes the disclosing path the one nobody has to ask for — and the audit row can then say whether plaintext left, which is the question worth being able to answer later.
|
|
16
|
+
*/
|
|
17
|
+
includeValue?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* When false (the default), a request that asked for the value still does not receive it for an attribute resolving to `sensitivity: high` — the metadata is returned, the plaintext is not. Setting it asks for that too.
|
|
20
|
+
*
|
|
21
|
+
* The second flag is not ceremony. A consumer that masks a value it has already received defends a screen; it does not keep a passport number out of a log, a crash dump, or a process's memory. The value never being sent is what does.
|
|
22
|
+
*/
|
|
23
|
+
includeSensitive?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Read a retained earlier version instead of the current one. Absent means current.
|
|
26
|
+
*
|
|
27
|
+
* This is what makes "what did I show them in March" answerable: a disclosure record and a pinned profile entry both name a version, and without this a caller holding one has no way to read what it said. A version the holder has purged is `persona/attribute/get:versionPurged` — never a silent fall back to the current value, which would answer a question about the past with a fact about the present.
|
|
28
|
+
*/
|
|
29
|
+
version?: Version;
|
|
30
|
+
ext?: Ext;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Success response to persona/attribute/get. Type https://trusttasks.org/spec/persona/attribute/get/1.0#response.
|
|
34
|
+
*/
|
|
35
|
+
export interface PersonaAttributeGetResponsePayload {
|
|
36
|
+
/**
|
|
37
|
+
* The attribute as at `version`, or as it stands when none was asked for. Its `value` is present only if the request asked for it and the attribute's sensitivity permitted it.
|
|
38
|
+
*/
|
|
39
|
+
attribute: Attribute;
|
|
40
|
+
/**
|
|
41
|
+
* True when the value was withheld although `includeValue` asked for it — the attribute resolves to `sensitivity: high` and `includeSensitive` was not set. Stated rather than left to inference: a consumer that reads an absent `value` as "this attribute has none" will show the holder an empty field where a passport number is, and conclude the record is broken.
|
|
42
|
+
*/
|
|
43
|
+
valueWithheld?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The versions of this attribute the maintainer still holds, newest first, including the current one. Names versions and never their values.
|
|
46
|
+
*
|
|
47
|
+
* It is here because a holder deciding whether to purge cannot see what purging would take away: which earlier versions exist, and therefore which pinned profile entries would stop presenting. A consumer that cannot enumerate them asks the holder to make an irreversible decision blind.
|
|
48
|
+
*
|
|
49
|
+
* @maxItems 64
|
|
50
|
+
*/
|
|
51
|
+
retainedVersions?: Version[];
|
|
52
|
+
ext?: Ext;
|
|
53
|
+
}
|
|
54
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
55
|
+
export type { Attribute, ClaimType, Ext, ProofRung, Provenance, ReleaseRequirement, Sensitivity, Ulid, ValueType, Version };
|
|
56
|
+
/** Trust Task type URI. */
|
|
57
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/persona/attribute/get/1.0";
|
|
58
|
+
/** Stable alias for this specification's request payload shape. */
|
|
59
|
+
export type Payload = PersonaAttributeGetPayload;
|
|
60
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
61
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/persona/attribute/get/1.0#response";
|
|
62
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
63
|
+
export type Response = PersonaAttributeGetResponsePayload;
|
|
64
|
+
/**
|
|
65
|
+
* This specification's payload schema, as a value.
|
|
66
|
+
*
|
|
67
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
68
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
69
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
70
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
71
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
72
|
+
*/
|
|
73
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
74
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
75
|
+
readonly $id: "https://trusttasks.org/spec/persona/attribute/get/1.0";
|
|
76
|
+
readonly title: "Persona Attribute — Get — payload";
|
|
77
|
+
readonly description: "Read one attribute the holder holds, by identifier. Values are withheld unless asked for, on the same two-step as persona/attribute/list: the expensive, disclosing path is the one a producer has to name.";
|
|
78
|
+
readonly type: "object";
|
|
79
|
+
readonly additionalProperties: false;
|
|
80
|
+
readonly required: readonly ["attributeId"];
|
|
81
|
+
readonly properties: {
|
|
82
|
+
readonly attributeId: {
|
|
83
|
+
readonly $ref: "#/$defs/Ulid";
|
|
84
|
+
readonly description: "The attribute to read. One identifier, never a list: a maintainer that accepted several would recreate the enumeration this task exists to avoid.";
|
|
85
|
+
};
|
|
86
|
+
readonly includeValue: {
|
|
87
|
+
readonly type: "boolean";
|
|
88
|
+
readonly default: false;
|
|
89
|
+
readonly description: "When false (the default), the attribute's metadata is returned and its `value` is not. The default is false even though a caller naming one attribute usually wants its value, because the alternative makes the disclosing path the one nobody has to ask for — and the audit row can then say whether plaintext left, which is the question worth being able to answer later.";
|
|
90
|
+
readonly $comment: "Mirrors includeValues on persona/attribute/list. The plural is a listing of many; this is one.";
|
|
91
|
+
};
|
|
92
|
+
readonly includeSensitive: {
|
|
93
|
+
readonly type: "boolean";
|
|
94
|
+
readonly default: false;
|
|
95
|
+
readonly description: "When false (the default), a request that asked for the value still does not receive it for an attribute resolving to `sensitivity: high` — the metadata is returned, the plaintext is not. Setting it asks for that too.\n\nThe second flag is not ceremony. A consumer that masks a value it has already received defends a screen; it does not keep a passport number out of a log, a crash dump, or a process's memory. The value never being sent is what does.";
|
|
96
|
+
};
|
|
97
|
+
readonly version: {
|
|
98
|
+
readonly $ref: "#/$defs/Version";
|
|
99
|
+
readonly description: "Read a retained earlier version instead of the current one. Absent means current.\n\nThis is what makes \"what did I show them in March\" answerable: a disclosure record and a pinned profile entry both name a version, and without this a caller holding one has no way to read what it said. A version the holder has purged is `persona/attribute/get:versionPurged` — never a silent fall back to the current value, which would answer a question about the past with a fact about the present.";
|
|
100
|
+
};
|
|
101
|
+
readonly ext: {
|
|
102
|
+
readonly $ref: "#/$defs/Ext";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
readonly $defs: {
|
|
106
|
+
readonly Response: {
|
|
107
|
+
readonly $anchor: "response";
|
|
108
|
+
readonly title: "Persona Attribute — Get — response payload";
|
|
109
|
+
readonly description: "Success response to persona/attribute/get. Type https://trusttasks.org/spec/persona/attribute/get/1.0#response.";
|
|
110
|
+
readonly type: "object";
|
|
111
|
+
readonly additionalProperties: false;
|
|
112
|
+
readonly required: readonly ["attribute"];
|
|
113
|
+
readonly properties: {
|
|
114
|
+
readonly attribute: {
|
|
115
|
+
readonly $ref: "#/$defs/Attribute";
|
|
116
|
+
readonly description: "The attribute as at `version`, or as it stands when none was asked for. Its `value` is present only if the request asked for it and the attribute's sensitivity permitted it.";
|
|
117
|
+
};
|
|
118
|
+
readonly valueWithheld: {
|
|
119
|
+
readonly type: "boolean";
|
|
120
|
+
readonly description: "True when the value was withheld although `includeValue` asked for it — the attribute resolves to `sensitivity: high` and `includeSensitive` was not set. Stated rather than left to inference: a consumer that reads an absent `value` as \"this attribute has none\" will show the holder an empty field where a passport number is, and conclude the record is broken.";
|
|
121
|
+
};
|
|
122
|
+
readonly retainedVersions: {
|
|
123
|
+
readonly type: "array";
|
|
124
|
+
readonly maxItems: 64;
|
|
125
|
+
readonly description: "The versions of this attribute the maintainer still holds, newest first, including the current one. Names versions and never their values.\n\nIt is here because a holder deciding whether to purge cannot see what purging would take away: which earlier versions exist, and therefore which pinned profile entries would stop presenting. A consumer that cannot enumerate them asks the holder to make an irreversible decision blind.";
|
|
126
|
+
readonly items: {
|
|
127
|
+
readonly $ref: "#/$defs/Version";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
readonly ext: {
|
|
131
|
+
readonly $ref: "#/$defs/Ext";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly Ext: {
|
|
136
|
+
readonly title: "Ext";
|
|
137
|
+
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.";
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly minProperties: 1;
|
|
140
|
+
readonly additionalProperties: true;
|
|
141
|
+
readonly propertyNames: {
|
|
142
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
readonly Version: {
|
|
146
|
+
readonly title: "Version";
|
|
147
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
148
|
+
readonly type: "integer";
|
|
149
|
+
readonly minimum: 1;
|
|
150
|
+
};
|
|
151
|
+
readonly Attribute: {
|
|
152
|
+
readonly title: "Attribute";
|
|
153
|
+
readonly description: "One atomic fact a holder keeps about themselves. Several attributes MAY share a `type` — three phone numbers, a legal name and a preferred name — which is why `attributeId` is the identity of a fact and `type` is not. The pool is flat and unordered; ordering is a profile's concern.";
|
|
154
|
+
readonly type: "object";
|
|
155
|
+
readonly additionalProperties: false;
|
|
156
|
+
readonly required: readonly ["attributeId", "type", "valueType", "provenance", "version", "updatedAt"];
|
|
157
|
+
readonly properties: {
|
|
158
|
+
readonly attributeId: {
|
|
159
|
+
readonly $ref: "#/$defs/Ulid";
|
|
160
|
+
};
|
|
161
|
+
readonly type: {
|
|
162
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
163
|
+
};
|
|
164
|
+
readonly valueType: {
|
|
165
|
+
readonly $ref: "#/$defs/ValueType";
|
|
166
|
+
};
|
|
167
|
+
readonly value: {
|
|
168
|
+
readonly description: "The fact itself, agreeing with `valueType`. Encrypted at rest by the maintainer.\n\nOPTIONAL, and its absence is meaningful in two distinct situations a consumer MUST NOT conflate: the caller asked for a metadata-only view (`list` without `includeValues`, which is the DEFAULT and the common case), or a credential-backed value could not be re-derived. `stale` tells them apart. Requiring this member would make the default listing unrepresentable — a maintainer would have to choose between disclosing every value in bulk and emitting a non-conformant response.";
|
|
169
|
+
};
|
|
170
|
+
readonly label: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly maxLength: 128;
|
|
173
|
+
readonly description: "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self.";
|
|
174
|
+
};
|
|
175
|
+
readonly provenance: {
|
|
176
|
+
readonly $ref: "#/$defs/Provenance";
|
|
177
|
+
};
|
|
178
|
+
readonly stale: {
|
|
179
|
+
readonly type: "boolean";
|
|
180
|
+
readonly description: "Present and true when a `credentialBacked` value could not be re-derived. `staleReason` says why. A maintainer MUST refuse to disclose a stale attribute.";
|
|
181
|
+
};
|
|
182
|
+
readonly staleReason: {
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
readonly enum: readonly ["revoked", "expired", "archived", "deleted", "notFound"];
|
|
185
|
+
readonly description: "Why re-derivation failed. Present only alongside `stale`.";
|
|
186
|
+
};
|
|
187
|
+
readonly sensitivity: {
|
|
188
|
+
readonly $ref: "#/$defs/Sensitivity";
|
|
189
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry — see CLAIM-TYPES.md §4, 'store the override, derive the default'.";
|
|
190
|
+
};
|
|
191
|
+
readonly release: {
|
|
192
|
+
readonly $ref: "#/$defs/ReleaseRequirement";
|
|
193
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry.";
|
|
194
|
+
};
|
|
195
|
+
readonly endorsements: {
|
|
196
|
+
readonly type: "array";
|
|
197
|
+
readonly maxItems: 64;
|
|
198
|
+
readonly uniqueItems: true;
|
|
199
|
+
readonly items: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly minLength: 1;
|
|
202
|
+
};
|
|
203
|
+
readonly description: "Vault identifiers of credentials in which a third party endorses this value — a colleague vouching for a skill, an employer confirming a title. INVENTORY, not evidence: the value remains whatever its `provenance` says, and a vouched self-assertion is still self-asserted. Folding a vouch into `provenance` would make it render as attested, which is the one thing provenance exists to prevent. Not disclosed with the value; a holder who wants a counterparty to see an endorsement presents the credential itself. Absent when there are none.";
|
|
204
|
+
};
|
|
205
|
+
readonly version: {
|
|
206
|
+
readonly $ref: "#/$defs/Version";
|
|
207
|
+
};
|
|
208
|
+
readonly retainedVersions: {
|
|
209
|
+
readonly type: "array";
|
|
210
|
+
readonly maxItems: 64;
|
|
211
|
+
readonly description: "Earlier versions of this attribute the maintainer still holds, and why. A maintainer that keeps a replaced value to serve `pinVersion` MUST list it here: a holder who overwrote a value may reasonably believe it gone, and this is how they learn otherwise. Values are not included — the holder reads one through the profile that pins it, or removes it with persona/attribute/purge-version. Absent when none are held.";
|
|
212
|
+
readonly items: {
|
|
213
|
+
readonly type: "object";
|
|
214
|
+
readonly additionalProperties: false;
|
|
215
|
+
readonly required: readonly ["version", "pinnedBy"];
|
|
216
|
+
readonly properties: {
|
|
217
|
+
readonly version: {
|
|
218
|
+
readonly $ref: "#/$defs/Version";
|
|
219
|
+
};
|
|
220
|
+
readonly updatedAt: {
|
|
221
|
+
readonly type: "string";
|
|
222
|
+
readonly format: "date-time";
|
|
223
|
+
readonly description: "When this version was written.";
|
|
224
|
+
};
|
|
225
|
+
readonly pinnedBy: {
|
|
226
|
+
readonly type: "array";
|
|
227
|
+
readonly minItems: 1;
|
|
228
|
+
readonly maxItems: 256;
|
|
229
|
+
readonly items: {
|
|
230
|
+
readonly $ref: "#/$defs/Ulid";
|
|
231
|
+
};
|
|
232
|
+
readonly description: "The profiles pinning this version — the reason it is kept. A version no profile pins is not retained.";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
readonly createdAt: {
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
readonly format: "date-time";
|
|
240
|
+
};
|
|
241
|
+
readonly updatedAt: {
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
readonly format: "date-time";
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
readonly Ulid: {
|
|
248
|
+
readonly title: "Ulid";
|
|
249
|
+
readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
|
|
250
|
+
readonly type: "string";
|
|
251
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
252
|
+
};
|
|
253
|
+
readonly ReleaseRequirement: {
|
|
254
|
+
readonly title: "ReleaseRequirement";
|
|
255
|
+
readonly description: "What it takes to let a value LEAVE. Distinct from `Sensitivity`, which governs showing it to the holder.\n\n`consent` is the ordinary gate: `persona/disclosure/preview` renders what would leave and `persona/disclosure/present` releases it, so a human sees it once.\n\n`stepUp` additionally requires a fresh authentication bound to THAT preview — not to the session. Without the binding, \"each time\" degrades into \"once per login\", which is the failure the requirement exists to prevent; the single-use `previewId` the preview already mints is what an implementation binds to. A maintainer MUST refuse `persona/disclosure/present` for a `stepUp` attribute when no such approval accompanies it.\n\nAbsent means *not decided by the holder* and resolves from the claim-type registry, which defaults `payment.*` and `gov.*` to `stepUp`.";
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
readonly enum: readonly ["consent", "stepUp"];
|
|
258
|
+
};
|
|
259
|
+
readonly Sensitivity: {
|
|
260
|
+
readonly title: "Sensitivity";
|
|
261
|
+
readonly description: "How carefully a value is shown TO ITS OWN HOLDER. `high` means a consumer masks it by default, reveals it one attribute at a time on a deliberate act, and — the half that is not cosmetic — omits it from a listing that did not ask for sensitive values.\n\nAbsent means *not decided by the holder*, not `normal`: a consumer resolves it from the claim-type registry (see CLAIM-TYPES.md §4), which is why this member is optional and why an unregistered token resolves conservatively rather than permissively.\n\nDistinct from how linkable the value is. A payment card is highly sensitive and barely linkable — every card number is unique, so knowing one tells a second verifier nothing about the first. Reading either as a proxy for the other produces a consumer that hides the wrong things.";
|
|
262
|
+
readonly type: "string";
|
|
263
|
+
readonly enum: readonly ["normal", "high"];
|
|
264
|
+
};
|
|
265
|
+
readonly Provenance: {
|
|
266
|
+
readonly title: "Provenance";
|
|
267
|
+
readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.\n\n`derived` — the value was taken from a source the holder connected or supplied — a code-hosting profile, an uploaded CV — rather than typed by them or attested by an issuer. Nobody signed it: it is the holder's claim that the source said so, and a consumer MUST NOT present it as attested. It exists as its own kind because a derived value is neither of the others — the holder did not author it, and no one vouches for it — and a holder deciding whether to disclose deserves to know which of their values they typed.\n\nFor how strongly a disclosed value identifies the holder, the kinds rank `credentialBacked` above `derived` above `selfAsserted`; `generated` values are per-verifier and do not correlate.";
|
|
268
|
+
readonly type: "object";
|
|
269
|
+
readonly required: readonly ["kind"];
|
|
270
|
+
readonly oneOf: readonly [{
|
|
271
|
+
readonly additionalProperties: false;
|
|
272
|
+
readonly required: readonly ["kind"];
|
|
273
|
+
readonly properties: {
|
|
274
|
+
readonly kind: {
|
|
275
|
+
readonly const: "selfAsserted";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
}, {
|
|
279
|
+
readonly additionalProperties: false;
|
|
280
|
+
readonly required: readonly ["kind", "credentialId", "claimPath"];
|
|
281
|
+
readonly properties: {
|
|
282
|
+
readonly kind: {
|
|
283
|
+
readonly const: "credentialBacked";
|
|
284
|
+
};
|
|
285
|
+
readonly credentialId: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
readonly minLength: 1;
|
|
288
|
+
readonly description: "Vault identifier of the backing credential.";
|
|
289
|
+
};
|
|
290
|
+
readonly claimPath: {
|
|
291
|
+
readonly type: "string";
|
|
292
|
+
readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
|
|
293
|
+
readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
|
|
294
|
+
};
|
|
295
|
+
readonly issuerDid: {
|
|
296
|
+
readonly type: "string";
|
|
297
|
+
readonly minLength: 1;
|
|
298
|
+
readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
|
|
299
|
+
};
|
|
300
|
+
readonly proof: {
|
|
301
|
+
readonly $ref: "#/$defs/ProofRung";
|
|
302
|
+
readonly description: "The disclosure rung this claim was, or will be, presented at.";
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
}, {
|
|
306
|
+
readonly additionalProperties: false;
|
|
307
|
+
readonly required: readonly ["kind", "generator"];
|
|
308
|
+
readonly properties: {
|
|
309
|
+
readonly kind: {
|
|
310
|
+
readonly const: "generated";
|
|
311
|
+
};
|
|
312
|
+
readonly generator: {
|
|
313
|
+
readonly type: "string";
|
|
314
|
+
readonly minLength: 1;
|
|
315
|
+
readonly maxLength: 64;
|
|
316
|
+
readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
|
|
317
|
+
};
|
|
318
|
+
readonly perVerifier: {
|
|
319
|
+
readonly type: "boolean";
|
|
320
|
+
readonly default: true;
|
|
321
|
+
readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
}, {
|
|
325
|
+
readonly additionalProperties: false;
|
|
326
|
+
readonly required: readonly ["kind", "source", "derivedAt"];
|
|
327
|
+
readonly properties: {
|
|
328
|
+
readonly kind: {
|
|
329
|
+
readonly const: "derived";
|
|
330
|
+
};
|
|
331
|
+
readonly source: {
|
|
332
|
+
readonly type: "string";
|
|
333
|
+
readonly minLength: 1;
|
|
334
|
+
readonly maxLength: 64;
|
|
335
|
+
readonly pattern: "^[a-z][A-Za-z0-9.-]*$";
|
|
336
|
+
readonly description: "The KIND of source the value was taken from — `github`, `cvUpload`, `linkedIn` — never an account, handle or URL. Provenance survives to the verifier, so this member is disclosed with the claim; a handle here would disclose an identifier the holder never chose to share.";
|
|
337
|
+
};
|
|
338
|
+
readonly derivedAt: {
|
|
339
|
+
readonly type: "string";
|
|
340
|
+
readonly format: "date-time";
|
|
341
|
+
readonly description: "When the value was taken from the source. A derived value is a snapshot: the source may have changed since, and nothing re-derives it.";
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
}];
|
|
345
|
+
};
|
|
346
|
+
readonly ProofRung: {
|
|
347
|
+
readonly title: "ProofRung";
|
|
348
|
+
readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
|
|
349
|
+
readonly type: "string";
|
|
350
|
+
readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
|
|
351
|
+
};
|
|
352
|
+
readonly ValueType: {
|
|
353
|
+
readonly title: "ValueType";
|
|
354
|
+
readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
|
|
355
|
+
readonly type: "string";
|
|
356
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
357
|
+
};
|
|
358
|
+
readonly ClaimType: {
|
|
359
|
+
readonly title: "ClaimType";
|
|
360
|
+
readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
|
|
361
|
+
readonly type: "string";
|
|
362
|
+
readonly minLength: 1;
|
|
363
|
+
readonly maxLength: 128;
|
|
364
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
369
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
370
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
371
|
+
readonly $ref: "#/$defs/Response";
|
|
372
|
+
readonly $defs: {
|
|
373
|
+
readonly Response: {
|
|
374
|
+
readonly $anchor: "response";
|
|
375
|
+
readonly title: "Persona Attribute — Get — response payload";
|
|
376
|
+
readonly description: "Success response to persona/attribute/get. Type https://trusttasks.org/spec/persona/attribute/get/1.0#response.";
|
|
377
|
+
readonly type: "object";
|
|
378
|
+
readonly additionalProperties: false;
|
|
379
|
+
readonly required: readonly ["attribute"];
|
|
380
|
+
readonly properties: {
|
|
381
|
+
readonly attribute: {
|
|
382
|
+
readonly $ref: "#/$defs/Attribute";
|
|
383
|
+
readonly description: "The attribute as at `version`, or as it stands when none was asked for. Its `value` is present only if the request asked for it and the attribute's sensitivity permitted it.";
|
|
384
|
+
};
|
|
385
|
+
readonly valueWithheld: {
|
|
386
|
+
readonly type: "boolean";
|
|
387
|
+
readonly description: "True when the value was withheld although `includeValue` asked for it — the attribute resolves to `sensitivity: high` and `includeSensitive` was not set. Stated rather than left to inference: a consumer that reads an absent `value` as \"this attribute has none\" will show the holder an empty field where a passport number is, and conclude the record is broken.";
|
|
388
|
+
};
|
|
389
|
+
readonly retainedVersions: {
|
|
390
|
+
readonly type: "array";
|
|
391
|
+
readonly maxItems: 64;
|
|
392
|
+
readonly description: "The versions of this attribute the maintainer still holds, newest first, including the current one. Names versions and never their values.\n\nIt is here because a holder deciding whether to purge cannot see what purging would take away: which earlier versions exist, and therefore which pinned profile entries would stop presenting. A consumer that cannot enumerate them asks the holder to make an irreversible decision blind.";
|
|
393
|
+
readonly items: {
|
|
394
|
+
readonly $ref: "#/$defs/Version";
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
readonly ext: {
|
|
398
|
+
readonly $ref: "#/$defs/Ext";
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
readonly Ext: {
|
|
403
|
+
readonly title: "Ext";
|
|
404
|
+
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.";
|
|
405
|
+
readonly type: "object";
|
|
406
|
+
readonly minProperties: 1;
|
|
407
|
+
readonly additionalProperties: true;
|
|
408
|
+
readonly propertyNames: {
|
|
409
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
readonly Version: {
|
|
413
|
+
readonly title: "Version";
|
|
414
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
415
|
+
readonly type: "integer";
|
|
416
|
+
readonly minimum: 1;
|
|
417
|
+
};
|
|
418
|
+
readonly Attribute: {
|
|
419
|
+
readonly title: "Attribute";
|
|
420
|
+
readonly description: "One atomic fact a holder keeps about themselves. Several attributes MAY share a `type` — three phone numbers, a legal name and a preferred name — which is why `attributeId` is the identity of a fact and `type` is not. The pool is flat and unordered; ordering is a profile's concern.";
|
|
421
|
+
readonly type: "object";
|
|
422
|
+
readonly additionalProperties: false;
|
|
423
|
+
readonly required: readonly ["attributeId", "type", "valueType", "provenance", "version", "updatedAt"];
|
|
424
|
+
readonly properties: {
|
|
425
|
+
readonly attributeId: {
|
|
426
|
+
readonly $ref: "#/$defs/Ulid";
|
|
427
|
+
};
|
|
428
|
+
readonly type: {
|
|
429
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
430
|
+
};
|
|
431
|
+
readonly valueType: {
|
|
432
|
+
readonly $ref: "#/$defs/ValueType";
|
|
433
|
+
};
|
|
434
|
+
readonly value: {
|
|
435
|
+
readonly description: "The fact itself, agreeing with `valueType`. Encrypted at rest by the maintainer.\n\nOPTIONAL, and its absence is meaningful in two distinct situations a consumer MUST NOT conflate: the caller asked for a metadata-only view (`list` without `includeValues`, which is the DEFAULT and the common case), or a credential-backed value could not be re-derived. `stale` tells them apart. Requiring this member would make the default listing unrepresentable — a maintainer would have to choose between disclosing every value in bulk and emitting a non-conformant response.";
|
|
436
|
+
};
|
|
437
|
+
readonly label: {
|
|
438
|
+
readonly type: "string";
|
|
439
|
+
readonly maxLength: 128;
|
|
440
|
+
readonly description: "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self.";
|
|
441
|
+
};
|
|
442
|
+
readonly provenance: {
|
|
443
|
+
readonly $ref: "#/$defs/Provenance";
|
|
444
|
+
};
|
|
445
|
+
readonly stale: {
|
|
446
|
+
readonly type: "boolean";
|
|
447
|
+
readonly description: "Present and true when a `credentialBacked` value could not be re-derived. `staleReason` says why. A maintainer MUST refuse to disclose a stale attribute.";
|
|
448
|
+
};
|
|
449
|
+
readonly staleReason: {
|
|
450
|
+
readonly type: "string";
|
|
451
|
+
readonly enum: readonly ["revoked", "expired", "archived", "deleted", "notFound"];
|
|
452
|
+
readonly description: "Why re-derivation failed. Present only alongside `stale`.";
|
|
453
|
+
};
|
|
454
|
+
readonly sensitivity: {
|
|
455
|
+
readonly $ref: "#/$defs/Sensitivity";
|
|
456
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry — see CLAIM-TYPES.md §4, 'store the override, derive the default'.";
|
|
457
|
+
};
|
|
458
|
+
readonly release: {
|
|
459
|
+
readonly $ref: "#/$defs/ReleaseRequirement";
|
|
460
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry.";
|
|
461
|
+
};
|
|
462
|
+
readonly endorsements: {
|
|
463
|
+
readonly type: "array";
|
|
464
|
+
readonly maxItems: 64;
|
|
465
|
+
readonly uniqueItems: true;
|
|
466
|
+
readonly items: {
|
|
467
|
+
readonly type: "string";
|
|
468
|
+
readonly minLength: 1;
|
|
469
|
+
};
|
|
470
|
+
readonly description: "Vault identifiers of credentials in which a third party endorses this value — a colleague vouching for a skill, an employer confirming a title. INVENTORY, not evidence: the value remains whatever its `provenance` says, and a vouched self-assertion is still self-asserted. Folding a vouch into `provenance` would make it render as attested, which is the one thing provenance exists to prevent. Not disclosed with the value; a holder who wants a counterparty to see an endorsement presents the credential itself. Absent when there are none.";
|
|
471
|
+
};
|
|
472
|
+
readonly version: {
|
|
473
|
+
readonly $ref: "#/$defs/Version";
|
|
474
|
+
};
|
|
475
|
+
readonly retainedVersions: {
|
|
476
|
+
readonly type: "array";
|
|
477
|
+
readonly maxItems: 64;
|
|
478
|
+
readonly description: "Earlier versions of this attribute the maintainer still holds, and why. A maintainer that keeps a replaced value to serve `pinVersion` MUST list it here: a holder who overwrote a value may reasonably believe it gone, and this is how they learn otherwise. Values are not included — the holder reads one through the profile that pins it, or removes it with persona/attribute/purge-version. Absent when none are held.";
|
|
479
|
+
readonly items: {
|
|
480
|
+
readonly type: "object";
|
|
481
|
+
readonly additionalProperties: false;
|
|
482
|
+
readonly required: readonly ["version", "pinnedBy"];
|
|
483
|
+
readonly properties: {
|
|
484
|
+
readonly version: {
|
|
485
|
+
readonly $ref: "#/$defs/Version";
|
|
486
|
+
};
|
|
487
|
+
readonly updatedAt: {
|
|
488
|
+
readonly type: "string";
|
|
489
|
+
readonly format: "date-time";
|
|
490
|
+
readonly description: "When this version was written.";
|
|
491
|
+
};
|
|
492
|
+
readonly pinnedBy: {
|
|
493
|
+
readonly type: "array";
|
|
494
|
+
readonly minItems: 1;
|
|
495
|
+
readonly maxItems: 256;
|
|
496
|
+
readonly items: {
|
|
497
|
+
readonly $ref: "#/$defs/Ulid";
|
|
498
|
+
};
|
|
499
|
+
readonly description: "The profiles pinning this version — the reason it is kept. A version no profile pins is not retained.";
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
readonly createdAt: {
|
|
505
|
+
readonly type: "string";
|
|
506
|
+
readonly format: "date-time";
|
|
507
|
+
};
|
|
508
|
+
readonly updatedAt: {
|
|
509
|
+
readonly type: "string";
|
|
510
|
+
readonly format: "date-time";
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
readonly Ulid: {
|
|
515
|
+
readonly title: "Ulid";
|
|
516
|
+
readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
|
|
517
|
+
readonly type: "string";
|
|
518
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
519
|
+
};
|
|
520
|
+
readonly ReleaseRequirement: {
|
|
521
|
+
readonly title: "ReleaseRequirement";
|
|
522
|
+
readonly description: "What it takes to let a value LEAVE. Distinct from `Sensitivity`, which governs showing it to the holder.\n\n`consent` is the ordinary gate: `persona/disclosure/preview` renders what would leave and `persona/disclosure/present` releases it, so a human sees it once.\n\n`stepUp` additionally requires a fresh authentication bound to THAT preview — not to the session. Without the binding, \"each time\" degrades into \"once per login\", which is the failure the requirement exists to prevent; the single-use `previewId` the preview already mints is what an implementation binds to. A maintainer MUST refuse `persona/disclosure/present` for a `stepUp` attribute when no such approval accompanies it.\n\nAbsent means *not decided by the holder* and resolves from the claim-type registry, which defaults `payment.*` and `gov.*` to `stepUp`.";
|
|
523
|
+
readonly type: "string";
|
|
524
|
+
readonly enum: readonly ["consent", "stepUp"];
|
|
525
|
+
};
|
|
526
|
+
readonly Sensitivity: {
|
|
527
|
+
readonly title: "Sensitivity";
|
|
528
|
+
readonly description: "How carefully a value is shown TO ITS OWN HOLDER. `high` means a consumer masks it by default, reveals it one attribute at a time on a deliberate act, and — the half that is not cosmetic — omits it from a listing that did not ask for sensitive values.\n\nAbsent means *not decided by the holder*, not `normal`: a consumer resolves it from the claim-type registry (see CLAIM-TYPES.md §4), which is why this member is optional and why an unregistered token resolves conservatively rather than permissively.\n\nDistinct from how linkable the value is. A payment card is highly sensitive and barely linkable — every card number is unique, so knowing one tells a second verifier nothing about the first. Reading either as a proxy for the other produces a consumer that hides the wrong things.";
|
|
529
|
+
readonly type: "string";
|
|
530
|
+
readonly enum: readonly ["normal", "high"];
|
|
531
|
+
};
|
|
532
|
+
readonly Provenance: {
|
|
533
|
+
readonly title: "Provenance";
|
|
534
|
+
readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.\n\n`derived` — the value was taken from a source the holder connected or supplied — a code-hosting profile, an uploaded CV — rather than typed by them or attested by an issuer. Nobody signed it: it is the holder's claim that the source said so, and a consumer MUST NOT present it as attested. It exists as its own kind because a derived value is neither of the others — the holder did not author it, and no one vouches for it — and a holder deciding whether to disclose deserves to know which of their values they typed.\n\nFor how strongly a disclosed value identifies the holder, the kinds rank `credentialBacked` above `derived` above `selfAsserted`; `generated` values are per-verifier and do not correlate.";
|
|
535
|
+
readonly type: "object";
|
|
536
|
+
readonly required: readonly ["kind"];
|
|
537
|
+
readonly oneOf: readonly [{
|
|
538
|
+
readonly additionalProperties: false;
|
|
539
|
+
readonly required: readonly ["kind"];
|
|
540
|
+
readonly properties: {
|
|
541
|
+
readonly kind: {
|
|
542
|
+
readonly const: "selfAsserted";
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
}, {
|
|
546
|
+
readonly additionalProperties: false;
|
|
547
|
+
readonly required: readonly ["kind", "credentialId", "claimPath"];
|
|
548
|
+
readonly properties: {
|
|
549
|
+
readonly kind: {
|
|
550
|
+
readonly const: "credentialBacked";
|
|
551
|
+
};
|
|
552
|
+
readonly credentialId: {
|
|
553
|
+
readonly type: "string";
|
|
554
|
+
readonly minLength: 1;
|
|
555
|
+
readonly description: "Vault identifier of the backing credential.";
|
|
556
|
+
};
|
|
557
|
+
readonly claimPath: {
|
|
558
|
+
readonly type: "string";
|
|
559
|
+
readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
|
|
560
|
+
readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
|
|
561
|
+
};
|
|
562
|
+
readonly issuerDid: {
|
|
563
|
+
readonly type: "string";
|
|
564
|
+
readonly minLength: 1;
|
|
565
|
+
readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
|
|
566
|
+
};
|
|
567
|
+
readonly proof: {
|
|
568
|
+
readonly $ref: "#/$defs/ProofRung";
|
|
569
|
+
readonly description: "The disclosure rung this claim was, or will be, presented at.";
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
}, {
|
|
573
|
+
readonly additionalProperties: false;
|
|
574
|
+
readonly required: readonly ["kind", "generator"];
|
|
575
|
+
readonly properties: {
|
|
576
|
+
readonly kind: {
|
|
577
|
+
readonly const: "generated";
|
|
578
|
+
};
|
|
579
|
+
readonly generator: {
|
|
580
|
+
readonly type: "string";
|
|
581
|
+
readonly minLength: 1;
|
|
582
|
+
readonly maxLength: 64;
|
|
583
|
+
readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
|
|
584
|
+
};
|
|
585
|
+
readonly perVerifier: {
|
|
586
|
+
readonly type: "boolean";
|
|
587
|
+
readonly default: true;
|
|
588
|
+
readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
}, {
|
|
592
|
+
readonly additionalProperties: false;
|
|
593
|
+
readonly required: readonly ["kind", "source", "derivedAt"];
|
|
594
|
+
readonly properties: {
|
|
595
|
+
readonly kind: {
|
|
596
|
+
readonly const: "derived";
|
|
597
|
+
};
|
|
598
|
+
readonly source: {
|
|
599
|
+
readonly type: "string";
|
|
600
|
+
readonly minLength: 1;
|
|
601
|
+
readonly maxLength: 64;
|
|
602
|
+
readonly pattern: "^[a-z][A-Za-z0-9.-]*$";
|
|
603
|
+
readonly description: "The KIND of source the value was taken from — `github`, `cvUpload`, `linkedIn` — never an account, handle or URL. Provenance survives to the verifier, so this member is disclosed with the claim; a handle here would disclose an identifier the holder never chose to share.";
|
|
604
|
+
};
|
|
605
|
+
readonly derivedAt: {
|
|
606
|
+
readonly type: "string";
|
|
607
|
+
readonly format: "date-time";
|
|
608
|
+
readonly description: "When the value was taken from the source. A derived value is a snapshot: the source may have changed since, and nothing re-derives it.";
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
}];
|
|
612
|
+
};
|
|
613
|
+
readonly ProofRung: {
|
|
614
|
+
readonly title: "ProofRung";
|
|
615
|
+
readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
|
|
616
|
+
readonly type: "string";
|
|
617
|
+
readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
|
|
618
|
+
};
|
|
619
|
+
readonly ValueType: {
|
|
620
|
+
readonly title: "ValueType";
|
|
621
|
+
readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
|
|
622
|
+
readonly type: "string";
|
|
623
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
624
|
+
};
|
|
625
|
+
readonly ClaimType: {
|
|
626
|
+
readonly title: "ClaimType";
|
|
627
|
+
readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
|
|
628
|
+
readonly type: "string";
|
|
629
|
+
readonly minLength: 1;
|
|
630
|
+
readonly maxLength: 128;
|
|
631
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
637
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
638
|
+
* per-specification and cannot be derived from the document alone, and
|
|
639
|
+
* item 2 needs the schema this carries.
|
|
640
|
+
*/
|
|
641
|
+
export declare const SPEC: {
|
|
642
|
+
readonly typeUri: "https://trusttasks.org/spec/persona/attribute/get/1.0";
|
|
643
|
+
readonly isBearer: false;
|
|
644
|
+
readonly isProofRequired: true;
|
|
645
|
+
readonly isRecipientRequired: true;
|
|
646
|
+
readonly isIssuedAtRequired: false;
|
|
647
|
+
readonly payloadSchema: {
|
|
648
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
649
|
+
readonly $id: "https://trusttasks.org/spec/persona/attribute/get/1.0";
|
|
650
|
+
readonly title: "Persona Attribute — Get — payload";
|
|
651
|
+
readonly description: "Read one attribute the holder holds, by identifier. Values are withheld unless asked for, on the same two-step as persona/attribute/list: the expensive, disclosing path is the one a producer has to name.";
|
|
652
|
+
readonly type: "object";
|
|
653
|
+
readonly additionalProperties: false;
|
|
654
|
+
readonly required: readonly ["attributeId"];
|
|
655
|
+
readonly properties: {
|
|
656
|
+
readonly attributeId: {
|
|
657
|
+
readonly $ref: "#/$defs/Ulid";
|
|
658
|
+
readonly description: "The attribute to read. One identifier, never a list: a maintainer that accepted several would recreate the enumeration this task exists to avoid.";
|
|
659
|
+
};
|
|
660
|
+
readonly includeValue: {
|
|
661
|
+
readonly type: "boolean";
|
|
662
|
+
readonly default: false;
|
|
663
|
+
readonly description: "When false (the default), the attribute's metadata is returned and its `value` is not. The default is false even though a caller naming one attribute usually wants its value, because the alternative makes the disclosing path the one nobody has to ask for — and the audit row can then say whether plaintext left, which is the question worth being able to answer later.";
|
|
664
|
+
readonly $comment: "Mirrors includeValues on persona/attribute/list. The plural is a listing of many; this is one.";
|
|
665
|
+
};
|
|
666
|
+
readonly includeSensitive: {
|
|
667
|
+
readonly type: "boolean";
|
|
668
|
+
readonly default: false;
|
|
669
|
+
readonly description: "When false (the default), a request that asked for the value still does not receive it for an attribute resolving to `sensitivity: high` — the metadata is returned, the plaintext is not. Setting it asks for that too.\n\nThe second flag is not ceremony. A consumer that masks a value it has already received defends a screen; it does not keep a passport number out of a log, a crash dump, or a process's memory. The value never being sent is what does.";
|
|
670
|
+
};
|
|
671
|
+
readonly version: {
|
|
672
|
+
readonly $ref: "#/$defs/Version";
|
|
673
|
+
readonly description: "Read a retained earlier version instead of the current one. Absent means current.\n\nThis is what makes \"what did I show them in March\" answerable: a disclosure record and a pinned profile entry both name a version, and without this a caller holding one has no way to read what it said. A version the holder has purged is `persona/attribute/get:versionPurged` — never a silent fall back to the current value, which would answer a question about the past with a fact about the present.";
|
|
674
|
+
};
|
|
675
|
+
readonly ext: {
|
|
676
|
+
readonly $ref: "#/$defs/Ext";
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
readonly $defs: {
|
|
680
|
+
readonly Response: {
|
|
681
|
+
readonly $anchor: "response";
|
|
682
|
+
readonly title: "Persona Attribute — Get — response payload";
|
|
683
|
+
readonly description: "Success response to persona/attribute/get. Type https://trusttasks.org/spec/persona/attribute/get/1.0#response.";
|
|
684
|
+
readonly type: "object";
|
|
685
|
+
readonly additionalProperties: false;
|
|
686
|
+
readonly required: readonly ["attribute"];
|
|
687
|
+
readonly properties: {
|
|
688
|
+
readonly attribute: {
|
|
689
|
+
readonly $ref: "#/$defs/Attribute";
|
|
690
|
+
readonly description: "The attribute as at `version`, or as it stands when none was asked for. Its `value` is present only if the request asked for it and the attribute's sensitivity permitted it.";
|
|
691
|
+
};
|
|
692
|
+
readonly valueWithheld: {
|
|
693
|
+
readonly type: "boolean";
|
|
694
|
+
readonly description: "True when the value was withheld although `includeValue` asked for it — the attribute resolves to `sensitivity: high` and `includeSensitive` was not set. Stated rather than left to inference: a consumer that reads an absent `value` as \"this attribute has none\" will show the holder an empty field where a passport number is, and conclude the record is broken.";
|
|
695
|
+
};
|
|
696
|
+
readonly retainedVersions: {
|
|
697
|
+
readonly type: "array";
|
|
698
|
+
readonly maxItems: 64;
|
|
699
|
+
readonly description: "The versions of this attribute the maintainer still holds, newest first, including the current one. Names versions and never their values.\n\nIt is here because a holder deciding whether to purge cannot see what purging would take away: which earlier versions exist, and therefore which pinned profile entries would stop presenting. A consumer that cannot enumerate them asks the holder to make an irreversible decision blind.";
|
|
700
|
+
readonly items: {
|
|
701
|
+
readonly $ref: "#/$defs/Version";
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
readonly ext: {
|
|
705
|
+
readonly $ref: "#/$defs/Ext";
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
readonly Ext: {
|
|
710
|
+
readonly title: "Ext";
|
|
711
|
+
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.";
|
|
712
|
+
readonly type: "object";
|
|
713
|
+
readonly minProperties: 1;
|
|
714
|
+
readonly additionalProperties: true;
|
|
715
|
+
readonly propertyNames: {
|
|
716
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
readonly Version: {
|
|
720
|
+
readonly title: "Version";
|
|
721
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
722
|
+
readonly type: "integer";
|
|
723
|
+
readonly minimum: 1;
|
|
724
|
+
};
|
|
725
|
+
readonly Attribute: {
|
|
726
|
+
readonly title: "Attribute";
|
|
727
|
+
readonly description: "One atomic fact a holder keeps about themselves. Several attributes MAY share a `type` — three phone numbers, a legal name and a preferred name — which is why `attributeId` is the identity of a fact and `type` is not. The pool is flat and unordered; ordering is a profile's concern.";
|
|
728
|
+
readonly type: "object";
|
|
729
|
+
readonly additionalProperties: false;
|
|
730
|
+
readonly required: readonly ["attributeId", "type", "valueType", "provenance", "version", "updatedAt"];
|
|
731
|
+
readonly properties: {
|
|
732
|
+
readonly attributeId: {
|
|
733
|
+
readonly $ref: "#/$defs/Ulid";
|
|
734
|
+
};
|
|
735
|
+
readonly type: {
|
|
736
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
737
|
+
};
|
|
738
|
+
readonly valueType: {
|
|
739
|
+
readonly $ref: "#/$defs/ValueType";
|
|
740
|
+
};
|
|
741
|
+
readonly value: {
|
|
742
|
+
readonly description: "The fact itself, agreeing with `valueType`. Encrypted at rest by the maintainer.\n\nOPTIONAL, and its absence is meaningful in two distinct situations a consumer MUST NOT conflate: the caller asked for a metadata-only view (`list` without `includeValues`, which is the DEFAULT and the common case), or a credential-backed value could not be re-derived. `stale` tells them apart. Requiring this member would make the default listing unrepresentable — a maintainer would have to choose between disclosing every value in bulk and emitting a non-conformant response.";
|
|
743
|
+
};
|
|
744
|
+
readonly label: {
|
|
745
|
+
readonly type: "string";
|
|
746
|
+
readonly maxLength: 128;
|
|
747
|
+
readonly description: "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self.";
|
|
748
|
+
};
|
|
749
|
+
readonly provenance: {
|
|
750
|
+
readonly $ref: "#/$defs/Provenance";
|
|
751
|
+
};
|
|
752
|
+
readonly stale: {
|
|
753
|
+
readonly type: "boolean";
|
|
754
|
+
readonly description: "Present and true when a `credentialBacked` value could not be re-derived. `staleReason` says why. A maintainer MUST refuse to disclose a stale attribute.";
|
|
755
|
+
};
|
|
756
|
+
readonly staleReason: {
|
|
757
|
+
readonly type: "string";
|
|
758
|
+
readonly enum: readonly ["revoked", "expired", "archived", "deleted", "notFound"];
|
|
759
|
+
readonly description: "Why re-derivation failed. Present only alongside `stale`.";
|
|
760
|
+
};
|
|
761
|
+
readonly sensitivity: {
|
|
762
|
+
readonly $ref: "#/$defs/Sensitivity";
|
|
763
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry — see CLAIM-TYPES.md §4, 'store the override, derive the default'.";
|
|
764
|
+
};
|
|
765
|
+
readonly release: {
|
|
766
|
+
readonly $ref: "#/$defs/ReleaseRequirement";
|
|
767
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry.";
|
|
768
|
+
};
|
|
769
|
+
readonly endorsements: {
|
|
770
|
+
readonly type: "array";
|
|
771
|
+
readonly maxItems: 64;
|
|
772
|
+
readonly uniqueItems: true;
|
|
773
|
+
readonly items: {
|
|
774
|
+
readonly type: "string";
|
|
775
|
+
readonly minLength: 1;
|
|
776
|
+
};
|
|
777
|
+
readonly description: "Vault identifiers of credentials in which a third party endorses this value — a colleague vouching for a skill, an employer confirming a title. INVENTORY, not evidence: the value remains whatever its `provenance` says, and a vouched self-assertion is still self-asserted. Folding a vouch into `provenance` would make it render as attested, which is the one thing provenance exists to prevent. Not disclosed with the value; a holder who wants a counterparty to see an endorsement presents the credential itself. Absent when there are none.";
|
|
778
|
+
};
|
|
779
|
+
readonly version: {
|
|
780
|
+
readonly $ref: "#/$defs/Version";
|
|
781
|
+
};
|
|
782
|
+
readonly retainedVersions: {
|
|
783
|
+
readonly type: "array";
|
|
784
|
+
readonly maxItems: 64;
|
|
785
|
+
readonly description: "Earlier versions of this attribute the maintainer still holds, and why. A maintainer that keeps a replaced value to serve `pinVersion` MUST list it here: a holder who overwrote a value may reasonably believe it gone, and this is how they learn otherwise. Values are not included — the holder reads one through the profile that pins it, or removes it with persona/attribute/purge-version. Absent when none are held.";
|
|
786
|
+
readonly items: {
|
|
787
|
+
readonly type: "object";
|
|
788
|
+
readonly additionalProperties: false;
|
|
789
|
+
readonly required: readonly ["version", "pinnedBy"];
|
|
790
|
+
readonly properties: {
|
|
791
|
+
readonly version: {
|
|
792
|
+
readonly $ref: "#/$defs/Version";
|
|
793
|
+
};
|
|
794
|
+
readonly updatedAt: {
|
|
795
|
+
readonly type: "string";
|
|
796
|
+
readonly format: "date-time";
|
|
797
|
+
readonly description: "When this version was written.";
|
|
798
|
+
};
|
|
799
|
+
readonly pinnedBy: {
|
|
800
|
+
readonly type: "array";
|
|
801
|
+
readonly minItems: 1;
|
|
802
|
+
readonly maxItems: 256;
|
|
803
|
+
readonly items: {
|
|
804
|
+
readonly $ref: "#/$defs/Ulid";
|
|
805
|
+
};
|
|
806
|
+
readonly description: "The profiles pinning this version — the reason it is kept. A version no profile pins is not retained.";
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
readonly createdAt: {
|
|
812
|
+
readonly type: "string";
|
|
813
|
+
readonly format: "date-time";
|
|
814
|
+
};
|
|
815
|
+
readonly updatedAt: {
|
|
816
|
+
readonly type: "string";
|
|
817
|
+
readonly format: "date-time";
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
readonly Ulid: {
|
|
822
|
+
readonly title: "Ulid";
|
|
823
|
+
readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
|
|
824
|
+
readonly type: "string";
|
|
825
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
826
|
+
};
|
|
827
|
+
readonly ReleaseRequirement: {
|
|
828
|
+
readonly title: "ReleaseRequirement";
|
|
829
|
+
readonly description: "What it takes to let a value LEAVE. Distinct from `Sensitivity`, which governs showing it to the holder.\n\n`consent` is the ordinary gate: `persona/disclosure/preview` renders what would leave and `persona/disclosure/present` releases it, so a human sees it once.\n\n`stepUp` additionally requires a fresh authentication bound to THAT preview — not to the session. Without the binding, \"each time\" degrades into \"once per login\", which is the failure the requirement exists to prevent; the single-use `previewId` the preview already mints is what an implementation binds to. A maintainer MUST refuse `persona/disclosure/present` for a `stepUp` attribute when no such approval accompanies it.\n\nAbsent means *not decided by the holder* and resolves from the claim-type registry, which defaults `payment.*` and `gov.*` to `stepUp`.";
|
|
830
|
+
readonly type: "string";
|
|
831
|
+
readonly enum: readonly ["consent", "stepUp"];
|
|
832
|
+
};
|
|
833
|
+
readonly Sensitivity: {
|
|
834
|
+
readonly title: "Sensitivity";
|
|
835
|
+
readonly description: "How carefully a value is shown TO ITS OWN HOLDER. `high` means a consumer masks it by default, reveals it one attribute at a time on a deliberate act, and — the half that is not cosmetic — omits it from a listing that did not ask for sensitive values.\n\nAbsent means *not decided by the holder*, not `normal`: a consumer resolves it from the claim-type registry (see CLAIM-TYPES.md §4), which is why this member is optional and why an unregistered token resolves conservatively rather than permissively.\n\nDistinct from how linkable the value is. A payment card is highly sensitive and barely linkable — every card number is unique, so knowing one tells a second verifier nothing about the first. Reading either as a proxy for the other produces a consumer that hides the wrong things.";
|
|
836
|
+
readonly type: "string";
|
|
837
|
+
readonly enum: readonly ["normal", "high"];
|
|
838
|
+
};
|
|
839
|
+
readonly Provenance: {
|
|
840
|
+
readonly title: "Provenance";
|
|
841
|
+
readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.\n\n`derived` — the value was taken from a source the holder connected or supplied — a code-hosting profile, an uploaded CV — rather than typed by them or attested by an issuer. Nobody signed it: it is the holder's claim that the source said so, and a consumer MUST NOT present it as attested. It exists as its own kind because a derived value is neither of the others — the holder did not author it, and no one vouches for it — and a holder deciding whether to disclose deserves to know which of their values they typed.\n\nFor how strongly a disclosed value identifies the holder, the kinds rank `credentialBacked` above `derived` above `selfAsserted`; `generated` values are per-verifier and do not correlate.";
|
|
842
|
+
readonly type: "object";
|
|
843
|
+
readonly required: readonly ["kind"];
|
|
844
|
+
readonly oneOf: readonly [{
|
|
845
|
+
readonly additionalProperties: false;
|
|
846
|
+
readonly required: readonly ["kind"];
|
|
847
|
+
readonly properties: {
|
|
848
|
+
readonly kind: {
|
|
849
|
+
readonly const: "selfAsserted";
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
}, {
|
|
853
|
+
readonly additionalProperties: false;
|
|
854
|
+
readonly required: readonly ["kind", "credentialId", "claimPath"];
|
|
855
|
+
readonly properties: {
|
|
856
|
+
readonly kind: {
|
|
857
|
+
readonly const: "credentialBacked";
|
|
858
|
+
};
|
|
859
|
+
readonly credentialId: {
|
|
860
|
+
readonly type: "string";
|
|
861
|
+
readonly minLength: 1;
|
|
862
|
+
readonly description: "Vault identifier of the backing credential.";
|
|
863
|
+
};
|
|
864
|
+
readonly claimPath: {
|
|
865
|
+
readonly type: "string";
|
|
866
|
+
readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
|
|
867
|
+
readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
|
|
868
|
+
};
|
|
869
|
+
readonly issuerDid: {
|
|
870
|
+
readonly type: "string";
|
|
871
|
+
readonly minLength: 1;
|
|
872
|
+
readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
|
|
873
|
+
};
|
|
874
|
+
readonly proof: {
|
|
875
|
+
readonly $ref: "#/$defs/ProofRung";
|
|
876
|
+
readonly description: "The disclosure rung this claim was, or will be, presented at.";
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
}, {
|
|
880
|
+
readonly additionalProperties: false;
|
|
881
|
+
readonly required: readonly ["kind", "generator"];
|
|
882
|
+
readonly properties: {
|
|
883
|
+
readonly kind: {
|
|
884
|
+
readonly const: "generated";
|
|
885
|
+
};
|
|
886
|
+
readonly generator: {
|
|
887
|
+
readonly type: "string";
|
|
888
|
+
readonly minLength: 1;
|
|
889
|
+
readonly maxLength: 64;
|
|
890
|
+
readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
|
|
891
|
+
};
|
|
892
|
+
readonly perVerifier: {
|
|
893
|
+
readonly type: "boolean";
|
|
894
|
+
readonly default: true;
|
|
895
|
+
readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
}, {
|
|
899
|
+
readonly additionalProperties: false;
|
|
900
|
+
readonly required: readonly ["kind", "source", "derivedAt"];
|
|
901
|
+
readonly properties: {
|
|
902
|
+
readonly kind: {
|
|
903
|
+
readonly const: "derived";
|
|
904
|
+
};
|
|
905
|
+
readonly source: {
|
|
906
|
+
readonly type: "string";
|
|
907
|
+
readonly minLength: 1;
|
|
908
|
+
readonly maxLength: 64;
|
|
909
|
+
readonly pattern: "^[a-z][A-Za-z0-9.-]*$";
|
|
910
|
+
readonly description: "The KIND of source the value was taken from — `github`, `cvUpload`, `linkedIn` — never an account, handle or URL. Provenance survives to the verifier, so this member is disclosed with the claim; a handle here would disclose an identifier the holder never chose to share.";
|
|
911
|
+
};
|
|
912
|
+
readonly derivedAt: {
|
|
913
|
+
readonly type: "string";
|
|
914
|
+
readonly format: "date-time";
|
|
915
|
+
readonly description: "When the value was taken from the source. A derived value is a snapshot: the source may have changed since, and nothing re-derives it.";
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
}];
|
|
919
|
+
};
|
|
920
|
+
readonly ProofRung: {
|
|
921
|
+
readonly title: "ProofRung";
|
|
922
|
+
readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
|
|
923
|
+
readonly type: "string";
|
|
924
|
+
readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
|
|
925
|
+
};
|
|
926
|
+
readonly ValueType: {
|
|
927
|
+
readonly title: "ValueType";
|
|
928
|
+
readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
|
|
929
|
+
readonly type: "string";
|
|
930
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
931
|
+
};
|
|
932
|
+
readonly ClaimType: {
|
|
933
|
+
readonly title: "ClaimType";
|
|
934
|
+
readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
|
|
935
|
+
readonly type: "string";
|
|
936
|
+
readonly minLength: 1;
|
|
937
|
+
readonly maxLength: 128;
|
|
938
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
939
|
+
};
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
/**
|
|
944
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
945
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
946
|
+
* parties (§7.3 item 5).
|
|
947
|
+
*/
|
|
948
|
+
export declare const RESPONSE_SPEC: {
|
|
949
|
+
readonly typeUri: "https://trusttasks.org/spec/persona/attribute/get/1.0#response";
|
|
950
|
+
readonly isBearer: false;
|
|
951
|
+
readonly isProofRequired: true;
|
|
952
|
+
readonly isRecipientRequired: true;
|
|
953
|
+
readonly isIssuedAtRequired: false;
|
|
954
|
+
readonly payloadSchema: {
|
|
955
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
956
|
+
readonly $ref: "#/$defs/Response";
|
|
957
|
+
readonly $defs: {
|
|
958
|
+
readonly Response: {
|
|
959
|
+
readonly $anchor: "response";
|
|
960
|
+
readonly title: "Persona Attribute — Get — response payload";
|
|
961
|
+
readonly description: "Success response to persona/attribute/get. Type https://trusttasks.org/spec/persona/attribute/get/1.0#response.";
|
|
962
|
+
readonly type: "object";
|
|
963
|
+
readonly additionalProperties: false;
|
|
964
|
+
readonly required: readonly ["attribute"];
|
|
965
|
+
readonly properties: {
|
|
966
|
+
readonly attribute: {
|
|
967
|
+
readonly $ref: "#/$defs/Attribute";
|
|
968
|
+
readonly description: "The attribute as at `version`, or as it stands when none was asked for. Its `value` is present only if the request asked for it and the attribute's sensitivity permitted it.";
|
|
969
|
+
};
|
|
970
|
+
readonly valueWithheld: {
|
|
971
|
+
readonly type: "boolean";
|
|
972
|
+
readonly description: "True when the value was withheld although `includeValue` asked for it — the attribute resolves to `sensitivity: high` and `includeSensitive` was not set. Stated rather than left to inference: a consumer that reads an absent `value` as \"this attribute has none\" will show the holder an empty field where a passport number is, and conclude the record is broken.";
|
|
973
|
+
};
|
|
974
|
+
readonly retainedVersions: {
|
|
975
|
+
readonly type: "array";
|
|
976
|
+
readonly maxItems: 64;
|
|
977
|
+
readonly description: "The versions of this attribute the maintainer still holds, newest first, including the current one. Names versions and never their values.\n\nIt is here because a holder deciding whether to purge cannot see what purging would take away: which earlier versions exist, and therefore which pinned profile entries would stop presenting. A consumer that cannot enumerate them asks the holder to make an irreversible decision blind.";
|
|
978
|
+
readonly items: {
|
|
979
|
+
readonly $ref: "#/$defs/Version";
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
readonly ext: {
|
|
983
|
+
readonly $ref: "#/$defs/Ext";
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
readonly Ext: {
|
|
988
|
+
readonly title: "Ext";
|
|
989
|
+
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.";
|
|
990
|
+
readonly type: "object";
|
|
991
|
+
readonly minProperties: 1;
|
|
992
|
+
readonly additionalProperties: true;
|
|
993
|
+
readonly propertyNames: {
|
|
994
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
readonly Version: {
|
|
998
|
+
readonly title: "Version";
|
|
999
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
1000
|
+
readonly type: "integer";
|
|
1001
|
+
readonly minimum: 1;
|
|
1002
|
+
};
|
|
1003
|
+
readonly Attribute: {
|
|
1004
|
+
readonly title: "Attribute";
|
|
1005
|
+
readonly description: "One atomic fact a holder keeps about themselves. Several attributes MAY share a `type` — three phone numbers, a legal name and a preferred name — which is why `attributeId` is the identity of a fact and `type` is not. The pool is flat and unordered; ordering is a profile's concern.";
|
|
1006
|
+
readonly type: "object";
|
|
1007
|
+
readonly additionalProperties: false;
|
|
1008
|
+
readonly required: readonly ["attributeId", "type", "valueType", "provenance", "version", "updatedAt"];
|
|
1009
|
+
readonly properties: {
|
|
1010
|
+
readonly attributeId: {
|
|
1011
|
+
readonly $ref: "#/$defs/Ulid";
|
|
1012
|
+
};
|
|
1013
|
+
readonly type: {
|
|
1014
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
1015
|
+
};
|
|
1016
|
+
readonly valueType: {
|
|
1017
|
+
readonly $ref: "#/$defs/ValueType";
|
|
1018
|
+
};
|
|
1019
|
+
readonly value: {
|
|
1020
|
+
readonly description: "The fact itself, agreeing with `valueType`. Encrypted at rest by the maintainer.\n\nOPTIONAL, and its absence is meaningful in two distinct situations a consumer MUST NOT conflate: the caller asked for a metadata-only view (`list` without `includeValues`, which is the DEFAULT and the common case), or a credential-backed value could not be re-derived. `stale` tells them apart. Requiring this member would make the default listing unrepresentable — a maintainer would have to choose between disclosing every value in bulk and emitting a non-conformant response.";
|
|
1021
|
+
};
|
|
1022
|
+
readonly label: {
|
|
1023
|
+
readonly type: "string";
|
|
1024
|
+
readonly maxLength: 128;
|
|
1025
|
+
readonly description: "The holder's own words for this attribute, shown in a picker. Never disclosed to a verifier; it is a note to self.";
|
|
1026
|
+
};
|
|
1027
|
+
readonly provenance: {
|
|
1028
|
+
readonly $ref: "#/$defs/Provenance";
|
|
1029
|
+
};
|
|
1030
|
+
readonly stale: {
|
|
1031
|
+
readonly type: "boolean";
|
|
1032
|
+
readonly description: "Present and true when a `credentialBacked` value could not be re-derived. `staleReason` says why. A maintainer MUST refuse to disclose a stale attribute.";
|
|
1033
|
+
};
|
|
1034
|
+
readonly staleReason: {
|
|
1035
|
+
readonly type: "string";
|
|
1036
|
+
readonly enum: readonly ["revoked", "expired", "archived", "deleted", "notFound"];
|
|
1037
|
+
readonly description: "Why re-derivation failed. Present only alongside `stale`.";
|
|
1038
|
+
};
|
|
1039
|
+
readonly sensitivity: {
|
|
1040
|
+
readonly $ref: "#/$defs/Sensitivity";
|
|
1041
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry — see CLAIM-TYPES.md §4, 'store the override, derive the default'.";
|
|
1042
|
+
};
|
|
1043
|
+
readonly release: {
|
|
1044
|
+
readonly $ref: "#/$defs/ReleaseRequirement";
|
|
1045
|
+
readonly description: "Set only where the holder decided it explicitly. Absent resolves from the claim-type registry.";
|
|
1046
|
+
};
|
|
1047
|
+
readonly endorsements: {
|
|
1048
|
+
readonly type: "array";
|
|
1049
|
+
readonly maxItems: 64;
|
|
1050
|
+
readonly uniqueItems: true;
|
|
1051
|
+
readonly items: {
|
|
1052
|
+
readonly type: "string";
|
|
1053
|
+
readonly minLength: 1;
|
|
1054
|
+
};
|
|
1055
|
+
readonly description: "Vault identifiers of credentials in which a third party endorses this value — a colleague vouching for a skill, an employer confirming a title. INVENTORY, not evidence: the value remains whatever its `provenance` says, and a vouched self-assertion is still self-asserted. Folding a vouch into `provenance` would make it render as attested, which is the one thing provenance exists to prevent. Not disclosed with the value; a holder who wants a counterparty to see an endorsement presents the credential itself. Absent when there are none.";
|
|
1056
|
+
};
|
|
1057
|
+
readonly version: {
|
|
1058
|
+
readonly $ref: "#/$defs/Version";
|
|
1059
|
+
};
|
|
1060
|
+
readonly retainedVersions: {
|
|
1061
|
+
readonly type: "array";
|
|
1062
|
+
readonly maxItems: 64;
|
|
1063
|
+
readonly description: "Earlier versions of this attribute the maintainer still holds, and why. A maintainer that keeps a replaced value to serve `pinVersion` MUST list it here: a holder who overwrote a value may reasonably believe it gone, and this is how they learn otherwise. Values are not included — the holder reads one through the profile that pins it, or removes it with persona/attribute/purge-version. Absent when none are held.";
|
|
1064
|
+
readonly items: {
|
|
1065
|
+
readonly type: "object";
|
|
1066
|
+
readonly additionalProperties: false;
|
|
1067
|
+
readonly required: readonly ["version", "pinnedBy"];
|
|
1068
|
+
readonly properties: {
|
|
1069
|
+
readonly version: {
|
|
1070
|
+
readonly $ref: "#/$defs/Version";
|
|
1071
|
+
};
|
|
1072
|
+
readonly updatedAt: {
|
|
1073
|
+
readonly type: "string";
|
|
1074
|
+
readonly format: "date-time";
|
|
1075
|
+
readonly description: "When this version was written.";
|
|
1076
|
+
};
|
|
1077
|
+
readonly pinnedBy: {
|
|
1078
|
+
readonly type: "array";
|
|
1079
|
+
readonly minItems: 1;
|
|
1080
|
+
readonly maxItems: 256;
|
|
1081
|
+
readonly items: {
|
|
1082
|
+
readonly $ref: "#/$defs/Ulid";
|
|
1083
|
+
};
|
|
1084
|
+
readonly description: "The profiles pinning this version — the reason it is kept. A version no profile pins is not retained.";
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
readonly createdAt: {
|
|
1090
|
+
readonly type: "string";
|
|
1091
|
+
readonly format: "date-time";
|
|
1092
|
+
};
|
|
1093
|
+
readonly updatedAt: {
|
|
1094
|
+
readonly type: "string";
|
|
1095
|
+
readonly format: "date-time";
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
};
|
|
1099
|
+
readonly Ulid: {
|
|
1100
|
+
readonly title: "Ulid";
|
|
1101
|
+
readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
|
|
1102
|
+
readonly type: "string";
|
|
1103
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
1104
|
+
};
|
|
1105
|
+
readonly ReleaseRequirement: {
|
|
1106
|
+
readonly title: "ReleaseRequirement";
|
|
1107
|
+
readonly description: "What it takes to let a value LEAVE. Distinct from `Sensitivity`, which governs showing it to the holder.\n\n`consent` is the ordinary gate: `persona/disclosure/preview` renders what would leave and `persona/disclosure/present` releases it, so a human sees it once.\n\n`stepUp` additionally requires a fresh authentication bound to THAT preview — not to the session. Without the binding, \"each time\" degrades into \"once per login\", which is the failure the requirement exists to prevent; the single-use `previewId` the preview already mints is what an implementation binds to. A maintainer MUST refuse `persona/disclosure/present` for a `stepUp` attribute when no such approval accompanies it.\n\nAbsent means *not decided by the holder* and resolves from the claim-type registry, which defaults `payment.*` and `gov.*` to `stepUp`.";
|
|
1108
|
+
readonly type: "string";
|
|
1109
|
+
readonly enum: readonly ["consent", "stepUp"];
|
|
1110
|
+
};
|
|
1111
|
+
readonly Sensitivity: {
|
|
1112
|
+
readonly title: "Sensitivity";
|
|
1113
|
+
readonly description: "How carefully a value is shown TO ITS OWN HOLDER. `high` means a consumer masks it by default, reveals it one attribute at a time on a deliberate act, and — the half that is not cosmetic — omits it from a listing that did not ask for sensitive values.\n\nAbsent means *not decided by the holder*, not `normal`: a consumer resolves it from the claim-type registry (see CLAIM-TYPES.md §4), which is why this member is optional and why an unregistered token resolves conservatively rather than permissively.\n\nDistinct from how linkable the value is. A payment card is highly sensitive and barely linkable — every card number is unique, so knowing one tells a second verifier nothing about the first. Reading either as a proxy for the other produces a consumer that hides the wrong things.";
|
|
1114
|
+
readonly type: "string";
|
|
1115
|
+
readonly enum: readonly ["normal", "high"];
|
|
1116
|
+
};
|
|
1117
|
+
readonly Provenance: {
|
|
1118
|
+
readonly title: "Provenance";
|
|
1119
|
+
readonly description: "Where a value comes from, and the member that makes this family worth building on a trust stack rather than in an address book. It survives to the verifier, so a recipient can tell — per field — what the holder typed from what an issuer attested.\n\n`selfAsserted` — the holder supplied it.\n\n`credentialBacked` — the value is derived from a credential in the vault at `claimPath`. The stored value is a CACHE FOR DISPLAY; the credential is the truth. A maintainer MUST re-derive it on read and MUST fail closed (never presenting a stale value) when the credential has been revoked, has expired, or has been archived or deleted.\n\n`generated` — the value is minted per verifier at disclosure time and recorded against that verifier, so every relying party receives a different one that routes back to the holder. This is the shape of the most widely adopted consumer privacy feature in this space; a maintainer need not operate a relay to conform, but the shape must exist, because retrofitting per-verifier values into a pool-of-values model is a migration rather than an addition.\n\n`derived` — the value was taken from a source the holder connected or supplied — a code-hosting profile, an uploaded CV — rather than typed by them or attested by an issuer. Nobody signed it: it is the holder's claim that the source said so, and a consumer MUST NOT present it as attested. It exists as its own kind because a derived value is neither of the others — the holder did not author it, and no one vouches for it — and a holder deciding whether to disclose deserves to know which of their values they typed.\n\nFor how strongly a disclosed value identifies the holder, the kinds rank `credentialBacked` above `derived` above `selfAsserted`; `generated` values are per-verifier and do not correlate.";
|
|
1120
|
+
readonly type: "object";
|
|
1121
|
+
readonly required: readonly ["kind"];
|
|
1122
|
+
readonly oneOf: readonly [{
|
|
1123
|
+
readonly additionalProperties: false;
|
|
1124
|
+
readonly required: readonly ["kind"];
|
|
1125
|
+
readonly properties: {
|
|
1126
|
+
readonly kind: {
|
|
1127
|
+
readonly const: "selfAsserted";
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
}, {
|
|
1131
|
+
readonly additionalProperties: false;
|
|
1132
|
+
readonly required: readonly ["kind", "credentialId", "claimPath"];
|
|
1133
|
+
readonly properties: {
|
|
1134
|
+
readonly kind: {
|
|
1135
|
+
readonly const: "credentialBacked";
|
|
1136
|
+
};
|
|
1137
|
+
readonly credentialId: {
|
|
1138
|
+
readonly type: "string";
|
|
1139
|
+
readonly minLength: 1;
|
|
1140
|
+
readonly description: "Vault identifier of the backing credential.";
|
|
1141
|
+
};
|
|
1142
|
+
readonly claimPath: {
|
|
1143
|
+
readonly type: "string";
|
|
1144
|
+
readonly pattern: "^(/[^/~]*(~[01][^/~]*)*)*$";
|
|
1145
|
+
readonly description: "RFC 6901 JSON Pointer to the claim within the credential, e.g. `/credentialSubject/familyName`.";
|
|
1146
|
+
};
|
|
1147
|
+
readonly issuerDid: {
|
|
1148
|
+
readonly type: "string";
|
|
1149
|
+
readonly minLength: 1;
|
|
1150
|
+
readonly description: "Issuer of the backing credential. Advisory: a consumer MUST verify the credential rather than trusting this member.";
|
|
1151
|
+
};
|
|
1152
|
+
readonly proof: {
|
|
1153
|
+
readonly $ref: "#/$defs/ProofRung";
|
|
1154
|
+
readonly description: "The disclosure rung this claim was, or will be, presented at.";
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
}, {
|
|
1158
|
+
readonly additionalProperties: false;
|
|
1159
|
+
readonly required: readonly ["kind", "generator"];
|
|
1160
|
+
readonly properties: {
|
|
1161
|
+
readonly kind: {
|
|
1162
|
+
readonly const: "generated";
|
|
1163
|
+
};
|
|
1164
|
+
readonly generator: {
|
|
1165
|
+
readonly type: "string";
|
|
1166
|
+
readonly minLength: 1;
|
|
1167
|
+
readonly maxLength: 64;
|
|
1168
|
+
readonly description: "Names the minting scheme, e.g. `relayEmail`. Maintainer-defined.";
|
|
1169
|
+
};
|
|
1170
|
+
readonly perVerifier: {
|
|
1171
|
+
readonly type: "boolean";
|
|
1172
|
+
readonly default: true;
|
|
1173
|
+
readonly description: "When true (the default and the only useful setting), a distinct value is minted for each verifier.";
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
}, {
|
|
1177
|
+
readonly additionalProperties: false;
|
|
1178
|
+
readonly required: readonly ["kind", "source", "derivedAt"];
|
|
1179
|
+
readonly properties: {
|
|
1180
|
+
readonly kind: {
|
|
1181
|
+
readonly const: "derived";
|
|
1182
|
+
};
|
|
1183
|
+
readonly source: {
|
|
1184
|
+
readonly type: "string";
|
|
1185
|
+
readonly minLength: 1;
|
|
1186
|
+
readonly maxLength: 64;
|
|
1187
|
+
readonly pattern: "^[a-z][A-Za-z0-9.-]*$";
|
|
1188
|
+
readonly description: "The KIND of source the value was taken from — `github`, `cvUpload`, `linkedIn` — never an account, handle or URL. Provenance survives to the verifier, so this member is disclosed with the claim; a handle here would disclose an identifier the holder never chose to share.";
|
|
1189
|
+
};
|
|
1190
|
+
readonly derivedAt: {
|
|
1191
|
+
readonly type: "string";
|
|
1192
|
+
readonly format: "date-time";
|
|
1193
|
+
readonly description: "When the value was taken from the source. A derived value is a snapshot: the source may have changed since, and nothing re-derives it.";
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
}];
|
|
1197
|
+
};
|
|
1198
|
+
readonly ProofRung: {
|
|
1199
|
+
readonly title: "ProofRung";
|
|
1200
|
+
readonly description: "How strongly a credential-backed claim is hidden when presented, ordered most private first. `predicate` proves a statement over a claim without disclosing the claim. `derived` discloses exactly the claims needed via an unlinkable derived proof, so two presentations cannot be joined. `selectiveDisclosure` discloses exactly the claims needed but carries the issuer's signature unchanged, so two presentations ARE linkable. `whole` discloses the entire credential.\n\nThe distinction between the first two and the last two is of kind, not degree: only `predicate` and `derived` avoid handing two verifiers a join key. A maintainer MUST default to the highest rung the credential's format supports, and MUST NOT silently fall to a lower one — a request that cannot be satisfied at the rung a producer asked for is refused, because a silent privacy downgrade discloses material the holder believed was hidden.";
|
|
1201
|
+
readonly type: "string";
|
|
1202
|
+
readonly enum: readonly ["predicate", "derived", "selectiveDisclosure", "whole"];
|
|
1203
|
+
};
|
|
1204
|
+
readonly ValueType: {
|
|
1205
|
+
readonly title: "ValueType";
|
|
1206
|
+
readonly description: "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.";
|
|
1207
|
+
readonly type: "string";
|
|
1208
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
1209
|
+
};
|
|
1210
|
+
readonly ClaimType: {
|
|
1211
|
+
readonly title: "ClaimType";
|
|
1212
|
+
readonly description: "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.";
|
|
1213
|
+
readonly type: "string";
|
|
1214
|
+
readonly minLength: 1;
|
|
1215
|
+
readonly maxLength: 128;
|
|
1216
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
1221
|
+
//# sourceMappingURL=payload.d.ts.map
|