@openvtc/trust-tasks 0.16.9 → 0.16.11
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 +220 -0
- package/dist/_shared/components.d.ts +206 -5
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts +22 -0
- package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -0
- package/dist/persona/_shared/0.1/persona-record.js +6 -0
- package/dist/persona/_shared/0.1/persona-record.js.map +1 -0
- package/dist/persona/attribute/delete/1.0/payload.d.ts +351 -0
- package/dist/persona/attribute/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/delete/1.0/payload.js +188 -0
- package/dist/persona/attribute/delete/1.0/payload.js.map +1 -0
- package/dist/persona/attribute/list/1.0/payload.d.ts +895 -0
- package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/list/1.0/payload.js +530 -0
- package/dist/persona/attribute/list/1.0/payload.js.map +1 -0
- package/dist/persona/attribute/put/1.0/payload.d.ts +829 -0
- package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/put/1.0/payload.js +487 -0
- package/dist/persona/attribute/put/1.0/payload.js.map +1 -0
- package/dist/persona/binding/get/1.0/payload.d.ts +382 -0
- package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/binding/get/1.0/payload.js +206 -0
- package/dist/persona/binding/get/1.0/payload.js.map +1 -0
- package/dist/persona/binding/list/1.0/payload.d.ts +387 -0
- package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/binding/list/1.0/payload.js +210 -0
- package/dist/persona/binding/list/1.0/payload.js.map +1 -0
- package/dist/persona/binding/set/1.0/payload.d.ts +545 -0
- package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -0
- package/dist/persona/binding/set/1.0/payload.js +302 -0
- package/dist/persona/binding/set/1.0/payload.js.map +1 -0
- package/dist/persona/contact/delete/1.0/payload.d.ts +313 -0
- package/dist/persona/contact/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/delete/1.0/payload.js +174 -0
- package/dist/persona/contact/delete/1.0/payload.js.map +1 -0
- package/dist/persona/contact/get/1.0/payload.d.ts +1027 -0
- package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/get/1.0/payload.js +606 -0
- package/dist/persona/contact/get/1.0/payload.js.map +1 -0
- package/dist/persona/contact/list/1.0/payload.d.ts +490 -0
- package/dist/persona/contact/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/list/1.0/payload.js +262 -0
- package/dist/persona/contact/list/1.0/payload.js.map +1 -0
- package/dist/persona/contact/put/1.0/payload.d.ts +885 -0
- package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/put/1.0/payload.js +518 -0
- package/dist/persona/contact/put/1.0/payload.js.map +1 -0
- package/dist/persona/correlation/analyze/1.0/payload.d.ts +648 -0
- package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -0
- package/dist/persona/correlation/analyze/1.0/payload.js +338 -0
- package/dist/persona/correlation/analyze/1.0/payload.js.map +1 -0
- package/dist/persona/disclosure/history/1.0/payload.d.ts +639 -0
- package/dist/persona/disclosure/history/1.0/payload.d.ts.map +1 -0
- package/dist/persona/disclosure/history/1.0/payload.js +339 -0
- package/dist/persona/disclosure/history/1.0/payload.js.map +1 -0
- package/dist/persona/disclosure/present/1.0/payload.d.ts +400 -0
- package/dist/persona/disclosure/present/1.0/payload.d.ts.map +1 -0
- package/dist/persona/disclosure/present/1.0/payload.js +211 -0
- package/dist/persona/disclosure/present/1.0/payload.js.map +1 -0
- package/dist/persona/disclosure/preview/1.0/payload.d.ts +858 -0
- package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -0
- package/dist/persona/disclosure/preview/1.0/payload.js +480 -0
- package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -0
- package/dist/persona/local/binding/set/1.0/payload.d.ts +394 -0
- package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/binding/set/1.0/payload.js +226 -0
- package/dist/persona/local/binding/set/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/delete/1.0/payload.d.ts +311 -0
- package/dist/persona/local/profile/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/delete/1.0/payload.js +173 -0
- package/dist/persona/local/profile/delete/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/get/1.0/payload.d.ts +368 -0
- package/dist/persona/local/profile/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/get/1.0/payload.js +210 -0
- package/dist/persona/local/profile/get/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/list/1.0/payload.d.ts +387 -0
- package/dist/persona/local/profile/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/list/1.0/payload.js +214 -0
- package/dist/persona/local/profile/list/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/put/1.0/payload.d.ts +545 -0
- package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/put/1.0/payload.js +315 -0
- package/dist/persona/local/profile/put/1.0/payload.js.map +1 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts +350 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/delete/1.0/payload.js +189 -0
- package/dist/persona/profile/delete/1.0/payload.js.map +1 -0
- package/dist/persona/profile/get/1.0/payload.d.ts +1307 -0
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/get/1.0/payload.js +802 -0
- package/dist/persona/profile/get/1.0/payload.js.map +1 -0
- package/dist/persona/profile/list/1.0/payload.d.ts +1120 -0
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/list/1.0/payload.js +680 -0
- package/dist/persona/profile/list/1.0/payload.js.map +1 -0
- package/dist/persona/profile/put/1.0/payload.d.ts +1115 -0
- package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/put/1.0/payload.js +675 -0
- package/dist/persona/profile/put/1.0/payload.js.map +1 -0
- package/dist/persona/renderers/list/1.0/payload.d.ts +362 -0
- package/dist/persona/renderers/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/renderers/list/1.0/payload.js +197 -0
- package/dist/persona/renderers/list/1.0/payload.js.map +1 -0
- package/dist/rooms/owner/claim/0.1/payload.d.ts +391 -0
- package/dist/rooms/owner/claim/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/claim/0.1/payload.js +214 -0
- package/dist/rooms/owner/claim/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/transfer/0.1/payload.d.ts +391 -0
- package/dist/rooms/owner/transfer/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/transfer/0.1/payload.js +214 -0
- package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -0
- package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
- package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
- package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +213 -5
- package/src/index.ts +27 -0
- package/src/persona/_shared/0.1/persona-record.ts +23 -0
- package/src/persona/attribute/delete/1.0/payload.ts +238 -0
- package/src/persona/attribute/list/1.0/payload.ts +588 -0
- package/src/persona/attribute/put/1.0/payload.ts +559 -0
- package/src/persona/binding/get/1.0/payload.ts +257 -0
- package/src/persona/binding/list/1.0/payload.ts +260 -0
- package/src/persona/binding/set/1.0/payload.ts +370 -0
- package/src/persona/contact/delete/1.0/payload.ts +216 -0
- package/src/persona/contact/get/1.0/payload.ts +662 -0
- package/src/persona/contact/list/1.0/payload.ts +323 -0
- package/src/persona/contact/put/1.0/payload.ts +580 -0
- package/src/persona/correlation/analyze/1.0/payload.ts +466 -0
- package/src/persona/disclosure/history/1.0/payload.ts +415 -0
- package/src/persona/disclosure/present/1.0/payload.ts +274 -0
- package/src/persona/disclosure/preview/1.0/payload.ts +597 -0
- package/src/persona/local/binding/set/1.0/payload.ts +267 -0
- package/src/persona/local/profile/delete/1.0/payload.ts +215 -0
- package/src/persona/local/profile/get/1.0/payload.ts +251 -0
- package/src/persona/local/profile/list/1.0/payload.ts +260 -0
- package/src/persona/local/profile/put/1.0/payload.ts +373 -0
- package/src/persona/profile/delete/1.0/payload.ts +236 -0
- package/src/persona/profile/get/1.0/payload.ts +844 -0
- package/src/persona/profile/list/1.0/payload.ts +723 -0
- package/src/persona/profile/put/1.0/payload.ts +741 -0
- package/src/persona/renderers/list/1.0/payload.ts +248 -0
- package/src/rooms/owner/claim/0.1/payload.ts +268 -0
- package/src/rooms/owner/transfer/0.1/payload.ts +268 -0
- package/src/vta/_shared/0.1/app-state-record.ts +1 -1
- package/src/vta/app-state/delete/1.0/payload.ts +1 -1
- package/src/vta/app-state/get/1.0/payload.ts +1 -1
- package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
- package/src/vta/app-state/list/1.0/payload.ts +1 -1
- package/src/vta/app-state/put/1.0/payload.ts +1 -1
- package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/disclosure/present/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, Ulid } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Produce the signed disclosure a preview described. Consumes a previewId, which is what makes the two calls uncollapsible.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaDisclosurePresentPayload {
|
|
13
|
+
contextId: string;
|
|
14
|
+
/**
|
|
15
|
+
* From a prior preview. Single-use: presenting consumes it. A producer that wants to disclose twice previews twice, which is correct — the second disclosure is a second decision.
|
|
16
|
+
*/
|
|
17
|
+
previewId: Ulid;
|
|
18
|
+
/**
|
|
19
|
+
* The verifier's nonce, bound into the proof for freshness so the artifact cannot be replayed to another verifier or at another time.
|
|
20
|
+
*/
|
|
21
|
+
challenge?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optionally mint a durable, revocable self-issued credential instead of an ephemeral artifact. Off by default: a presented disclosure is read once and revoking it afterwards is meaningless, so status machinery would be maintenance with no benefit. A holder who wants a counterparty to be able to re-verify — and themselves to be able to revoke — asks for it here and takes on a credential they must now maintain.
|
|
24
|
+
*/
|
|
25
|
+
mint?: {
|
|
26
|
+
durable?: boolean;
|
|
27
|
+
validUntil?: string;
|
|
28
|
+
};
|
|
29
|
+
ext?: Ext;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.
|
|
33
|
+
*/
|
|
34
|
+
export interface PersonaDisclosurePresentResponsePayload {
|
|
35
|
+
/**
|
|
36
|
+
* Names the append-only record this disclosure wrote, so the holder can find it again in their history.
|
|
37
|
+
*/
|
|
38
|
+
disclosureId: Ulid;
|
|
39
|
+
/**
|
|
40
|
+
* The signed disclosure, in the renderer's format. Opaque to this task: the maintainer signs it, the producer relays it, and neither the schema nor the maintainer reinterprets it once formed.
|
|
41
|
+
*/
|
|
42
|
+
artifact: string;
|
|
43
|
+
/**
|
|
44
|
+
* The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone.
|
|
45
|
+
*/
|
|
46
|
+
subject: string;
|
|
47
|
+
/**
|
|
48
|
+
* Present only when a durable credential was minted. It is in the holder's own vault, appears in their credential list, and can be revoked — which is the obligation they took on by asking for it.
|
|
49
|
+
*/
|
|
50
|
+
credentialId?: string;
|
|
51
|
+
disclosedAt: string;
|
|
52
|
+
ext?: Ext;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
56
|
+
export type { Ext, Ulid };
|
|
57
|
+
|
|
58
|
+
/** Trust Task type URI. */
|
|
59
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/disclosure/present/1.0" as const;
|
|
60
|
+
|
|
61
|
+
/** Stable alias for this specification's request payload shape. */
|
|
62
|
+
export type Payload = PersonaDisclosurePresentPayload;
|
|
63
|
+
|
|
64
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
65
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/disclosure/present/1.0#response" as const;
|
|
66
|
+
|
|
67
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
68
|
+
export type Response = PersonaDisclosurePresentResponsePayload;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* This specification's payload schema, as a value.
|
|
72
|
+
*
|
|
73
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
74
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
75
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
76
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
77
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
78
|
+
*/
|
|
79
|
+
export const PAYLOAD_SCHEMA = {
|
|
80
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
81
|
+
"$id": "https://trusttasks.org/spec/persona/disclosure/present/1.0",
|
|
82
|
+
"title": "Persona Disclosure Present — payload",
|
|
83
|
+
"description": "Produce the signed disclosure a preview described. Consumes a previewId, which is what makes the two calls uncollapsible.",
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": [
|
|
87
|
+
"contextId",
|
|
88
|
+
"previewId"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"contextId": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1
|
|
94
|
+
},
|
|
95
|
+
"previewId": {
|
|
96
|
+
"$ref": "#/$defs/Ulid",
|
|
97
|
+
"description": "From a prior preview. Single-use: presenting consumes it. A producer that wants to disclose twice previews twice, which is correct — the second disclosure is a second decision."
|
|
98
|
+
},
|
|
99
|
+
"challenge": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"maxLength": 512,
|
|
102
|
+
"description": "The verifier's nonce, bound into the proof for freshness so the artifact cannot be replayed to another verifier or at another time."
|
|
103
|
+
},
|
|
104
|
+
"mint": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"description": "Optionally mint a durable, revocable self-issued credential instead of an ephemeral artifact. Off by default: a presented disclosure is read once and revoking it afterwards is meaningless, so status machinery would be maintenance with no benefit. A holder who wants a counterparty to be able to re-verify — and themselves to be able to revoke — asks for it here and takes on a credential they must now maintain.",
|
|
108
|
+
"properties": {
|
|
109
|
+
"durable": {
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"default": false
|
|
112
|
+
},
|
|
113
|
+
"validUntil": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"format": "date-time"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"ext": {
|
|
120
|
+
"$ref": "#/$defs/Ext"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"$defs": {
|
|
124
|
+
"Response": {
|
|
125
|
+
"$anchor": "response",
|
|
126
|
+
"title": "Persona Disclosure Present — response payload",
|
|
127
|
+
"description": "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.",
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": [
|
|
131
|
+
"disclosureId",
|
|
132
|
+
"artifact",
|
|
133
|
+
"subject",
|
|
134
|
+
"disclosedAt"
|
|
135
|
+
],
|
|
136
|
+
"properties": {
|
|
137
|
+
"disclosureId": {
|
|
138
|
+
"$ref": "#/$defs/Ulid",
|
|
139
|
+
"description": "Names the append-only record this disclosure wrote, so the holder can find it again in their history."
|
|
140
|
+
},
|
|
141
|
+
"artifact": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "The signed disclosure, in the renderer's format. Opaque to this task: the maintainer signs it, the producer relays it, and neither the schema nor the maintainer reinterprets it once formed."
|
|
144
|
+
},
|
|
145
|
+
"subject": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"description": "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone."
|
|
149
|
+
},
|
|
150
|
+
"credentialId": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"minLength": 1,
|
|
153
|
+
"description": "Present only when a durable credential was minted. It is in the holder's own vault, appears in their credential list, and can be revoked — which is the obligation they took on by asking for it."
|
|
154
|
+
},
|
|
155
|
+
"disclosedAt": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"format": "date-time"
|
|
158
|
+
},
|
|
159
|
+
"ext": {
|
|
160
|
+
"$ref": "#/$defs/Ext"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"Ext": {
|
|
165
|
+
"title": "Ext",
|
|
166
|
+
"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.",
|
|
167
|
+
"type": "object",
|
|
168
|
+
"minProperties": 1,
|
|
169
|
+
"additionalProperties": true,
|
|
170
|
+
"propertyNames": {
|
|
171
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"Ulid": {
|
|
175
|
+
"title": "Ulid",
|
|
176
|
+
"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.",
|
|
177
|
+
"type": "string",
|
|
178
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
} as const;
|
|
182
|
+
|
|
183
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
184
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
185
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
186
|
+
"$ref": "#/$defs/Response",
|
|
187
|
+
"$defs": {
|
|
188
|
+
"Response": {
|
|
189
|
+
"$anchor": "response",
|
|
190
|
+
"title": "Persona Disclosure Present — response payload",
|
|
191
|
+
"description": "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.",
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"required": [
|
|
195
|
+
"disclosureId",
|
|
196
|
+
"artifact",
|
|
197
|
+
"subject",
|
|
198
|
+
"disclosedAt"
|
|
199
|
+
],
|
|
200
|
+
"properties": {
|
|
201
|
+
"disclosureId": {
|
|
202
|
+
"$ref": "#/$defs/Ulid",
|
|
203
|
+
"description": "Names the append-only record this disclosure wrote, so the holder can find it again in their history."
|
|
204
|
+
},
|
|
205
|
+
"artifact": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"description": "The signed disclosure, in the renderer's format. Opaque to this task: the maintainer signs it, the producer relays it, and neither the schema nor the maintainer reinterprets it once formed."
|
|
208
|
+
},
|
|
209
|
+
"subject": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"minLength": 1,
|
|
212
|
+
"description": "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone."
|
|
213
|
+
},
|
|
214
|
+
"credentialId": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"minLength": 1,
|
|
217
|
+
"description": "Present only when a durable credential was minted. It is in the holder's own vault, appears in their credential list, and can be revoked — which is the obligation they took on by asking for it."
|
|
218
|
+
},
|
|
219
|
+
"disclosedAt": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"format": "date-time"
|
|
222
|
+
},
|
|
223
|
+
"ext": {
|
|
224
|
+
"$ref": "#/$defs/Ext"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"Ext": {
|
|
229
|
+
"title": "Ext",
|
|
230
|
+
"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.",
|
|
231
|
+
"type": "object",
|
|
232
|
+
"minProperties": 1,
|
|
233
|
+
"additionalProperties": true,
|
|
234
|
+
"propertyNames": {
|
|
235
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"Ulid": {
|
|
239
|
+
"title": "Ulid",
|
|
240
|
+
"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.",
|
|
241
|
+
"type": "string",
|
|
242
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} as const;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
249
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
250
|
+
* per-specification and cannot be derived from the document alone, and
|
|
251
|
+
* item 2 needs the schema this carries.
|
|
252
|
+
*/
|
|
253
|
+
export const SPEC = {
|
|
254
|
+
typeUri: TYPE_URI,
|
|
255
|
+
isBearer: false,
|
|
256
|
+
isProofRequired: true,
|
|
257
|
+
isRecipientRequired: true,
|
|
258
|
+
isIssuedAtRequired: true,
|
|
259
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
260
|
+
} as const;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
264
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
265
|
+
* parties (§7.3 item 5).
|
|
266
|
+
*/
|
|
267
|
+
export const RESPONSE_SPEC = {
|
|
268
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
269
|
+
isBearer: false,
|
|
270
|
+
isProofRequired: true,
|
|
271
|
+
isRecipientRequired: true,
|
|
272
|
+
isIssuedAtRequired: true,
|
|
273
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
274
|
+
} as const;
|