@openvtc/trust-tasks 0.16.8 → 0.16.10
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 +285 -0
- package/dist/_shared/components.d.ts +206 -7
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +6 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +6 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +6 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +6 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -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 +532 -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 +804 -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/keys/commit/0.1/payload.d.ts +266 -0
- package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/commit/0.1/payload.js +146 -0
- package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
- package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
- package/dist/rooms/keys/welcome/0.1/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/rooms/records/curate/0.1/payload.d.ts +500 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.js +277 -0
- package/dist/rooms/records/curate/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 +217 -7
- package/src/device/list/0.1/payload.ts +6 -2
- package/src/device/list/0.2/payload.ts +6 -2
- package/src/device/register/0.1/payload.ts +6 -2
- package/src/device/register/0.2/payload.ts +6 -2
- package/src/index.ts +31 -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 +590 -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 +846 -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/keys/commit/0.1/payload.ts +195 -0
- package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
- package/src/rooms/keys/welcome/0.1/payload.ts +201 -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/rooms/records/curate/0.1/payload.ts +357 -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,400 @@
|
|
|
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
|
+
import type { Ext, Ulid } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Produce the signed disclosure a preview described. Consumes a previewId, which is what makes the two calls uncollapsible.
|
|
8
|
+
*/
|
|
9
|
+
export interface PersonaDisclosurePresentPayload {
|
|
10
|
+
contextId: string;
|
|
11
|
+
/**
|
|
12
|
+
* 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.
|
|
13
|
+
*/
|
|
14
|
+
previewId: Ulid;
|
|
15
|
+
/**
|
|
16
|
+
* The verifier's nonce, bound into the proof for freshness so the artifact cannot be replayed to another verifier or at another time.
|
|
17
|
+
*/
|
|
18
|
+
challenge?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 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.
|
|
21
|
+
*/
|
|
22
|
+
mint?: {
|
|
23
|
+
durable?: boolean;
|
|
24
|
+
validUntil?: string;
|
|
25
|
+
};
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.
|
|
30
|
+
*/
|
|
31
|
+
export interface PersonaDisclosurePresentResponsePayload {
|
|
32
|
+
/**
|
|
33
|
+
* Names the append-only record this disclosure wrote, so the holder can find it again in their history.
|
|
34
|
+
*/
|
|
35
|
+
disclosureId: Ulid;
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
38
|
+
*/
|
|
39
|
+
artifact: string;
|
|
40
|
+
/**
|
|
41
|
+
* The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone.
|
|
42
|
+
*/
|
|
43
|
+
subject: string;
|
|
44
|
+
/**
|
|
45
|
+
* 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.
|
|
46
|
+
*/
|
|
47
|
+
credentialId?: string;
|
|
48
|
+
disclosedAt: string;
|
|
49
|
+
ext?: Ext;
|
|
50
|
+
}
|
|
51
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
52
|
+
export type { Ext, Ulid };
|
|
53
|
+
/** Trust Task type URI. */
|
|
54
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/persona/disclosure/present/1.0";
|
|
55
|
+
/** Stable alias for this specification's request payload shape. */
|
|
56
|
+
export type Payload = PersonaDisclosurePresentPayload;
|
|
57
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
58
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/persona/disclosure/present/1.0#response";
|
|
59
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
60
|
+
export type Response = PersonaDisclosurePresentResponsePayload;
|
|
61
|
+
/**
|
|
62
|
+
* This specification's payload schema, as a value.
|
|
63
|
+
*
|
|
64
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
65
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
66
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
67
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
68
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
69
|
+
*/
|
|
70
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
71
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
72
|
+
readonly $id: "https://trusttasks.org/spec/persona/disclosure/present/1.0";
|
|
73
|
+
readonly title: "Persona Disclosure Present — payload";
|
|
74
|
+
readonly description: "Produce the signed disclosure a preview described. Consumes a previewId, which is what makes the two calls uncollapsible.";
|
|
75
|
+
readonly type: "object";
|
|
76
|
+
readonly additionalProperties: false;
|
|
77
|
+
readonly required: readonly ["contextId", "previewId"];
|
|
78
|
+
readonly properties: {
|
|
79
|
+
readonly contextId: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly minLength: 1;
|
|
82
|
+
};
|
|
83
|
+
readonly previewId: {
|
|
84
|
+
readonly $ref: "#/$defs/Ulid";
|
|
85
|
+
readonly 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.";
|
|
86
|
+
};
|
|
87
|
+
readonly challenge: {
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly maxLength: 512;
|
|
90
|
+
readonly description: "The verifier's nonce, bound into the proof for freshness so the artifact cannot be replayed to another verifier or at another time.";
|
|
91
|
+
};
|
|
92
|
+
readonly mint: {
|
|
93
|
+
readonly type: "object";
|
|
94
|
+
readonly additionalProperties: false;
|
|
95
|
+
readonly 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.";
|
|
96
|
+
readonly properties: {
|
|
97
|
+
readonly durable: {
|
|
98
|
+
readonly type: "boolean";
|
|
99
|
+
readonly default: false;
|
|
100
|
+
};
|
|
101
|
+
readonly validUntil: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly format: "date-time";
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
readonly ext: {
|
|
108
|
+
readonly $ref: "#/$defs/Ext";
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly $defs: {
|
|
112
|
+
readonly Response: {
|
|
113
|
+
readonly $anchor: "response";
|
|
114
|
+
readonly title: "Persona Disclosure Present — response payload";
|
|
115
|
+
readonly description: "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.";
|
|
116
|
+
readonly type: "object";
|
|
117
|
+
readonly additionalProperties: false;
|
|
118
|
+
readonly required: readonly ["disclosureId", "artifact", "subject", "disclosedAt"];
|
|
119
|
+
readonly properties: {
|
|
120
|
+
readonly disclosureId: {
|
|
121
|
+
readonly $ref: "#/$defs/Ulid";
|
|
122
|
+
readonly description: "Names the append-only record this disclosure wrote, so the holder can find it again in their history.";
|
|
123
|
+
};
|
|
124
|
+
readonly artifact: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
readonly 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.";
|
|
127
|
+
};
|
|
128
|
+
readonly subject: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly minLength: 1;
|
|
131
|
+
readonly description: "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone.";
|
|
132
|
+
};
|
|
133
|
+
readonly credentialId: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly minLength: 1;
|
|
136
|
+
readonly 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.";
|
|
137
|
+
};
|
|
138
|
+
readonly disclosedAt: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
readonly format: "date-time";
|
|
141
|
+
};
|
|
142
|
+
readonly ext: {
|
|
143
|
+
readonly $ref: "#/$defs/Ext";
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly Ext: {
|
|
148
|
+
readonly title: "Ext";
|
|
149
|
+
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.";
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly minProperties: 1;
|
|
152
|
+
readonly additionalProperties: true;
|
|
153
|
+
readonly propertyNames: {
|
|
154
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
readonly Ulid: {
|
|
158
|
+
readonly title: "Ulid";
|
|
159
|
+
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.";
|
|
160
|
+
readonly type: "string";
|
|
161
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
166
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
167
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
168
|
+
readonly $ref: "#/$defs/Response";
|
|
169
|
+
readonly $defs: {
|
|
170
|
+
readonly Response: {
|
|
171
|
+
readonly $anchor: "response";
|
|
172
|
+
readonly title: "Persona Disclosure Present — response payload";
|
|
173
|
+
readonly description: "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.";
|
|
174
|
+
readonly type: "object";
|
|
175
|
+
readonly additionalProperties: false;
|
|
176
|
+
readonly required: readonly ["disclosureId", "artifact", "subject", "disclosedAt"];
|
|
177
|
+
readonly properties: {
|
|
178
|
+
readonly disclosureId: {
|
|
179
|
+
readonly $ref: "#/$defs/Ulid";
|
|
180
|
+
readonly description: "Names the append-only record this disclosure wrote, so the holder can find it again in their history.";
|
|
181
|
+
};
|
|
182
|
+
readonly artifact: {
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
readonly 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.";
|
|
185
|
+
};
|
|
186
|
+
readonly subject: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly minLength: 1;
|
|
189
|
+
readonly description: "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone.";
|
|
190
|
+
};
|
|
191
|
+
readonly credentialId: {
|
|
192
|
+
readonly type: "string";
|
|
193
|
+
readonly minLength: 1;
|
|
194
|
+
readonly 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.";
|
|
195
|
+
};
|
|
196
|
+
readonly disclosedAt: {
|
|
197
|
+
readonly type: "string";
|
|
198
|
+
readonly format: "date-time";
|
|
199
|
+
};
|
|
200
|
+
readonly ext: {
|
|
201
|
+
readonly $ref: "#/$defs/Ext";
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
readonly Ext: {
|
|
206
|
+
readonly title: "Ext";
|
|
207
|
+
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.";
|
|
208
|
+
readonly type: "object";
|
|
209
|
+
readonly minProperties: 1;
|
|
210
|
+
readonly additionalProperties: true;
|
|
211
|
+
readonly propertyNames: {
|
|
212
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
readonly Ulid: {
|
|
216
|
+
readonly title: "Ulid";
|
|
217
|
+
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.";
|
|
218
|
+
readonly type: "string";
|
|
219
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
225
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
226
|
+
* per-specification and cannot be derived from the document alone, and
|
|
227
|
+
* item 2 needs the schema this carries.
|
|
228
|
+
*/
|
|
229
|
+
export declare const SPEC: {
|
|
230
|
+
readonly typeUri: "https://trusttasks.org/spec/persona/disclosure/present/1.0";
|
|
231
|
+
readonly isBearer: false;
|
|
232
|
+
readonly isProofRequired: true;
|
|
233
|
+
readonly isRecipientRequired: true;
|
|
234
|
+
readonly isIssuedAtRequired: true;
|
|
235
|
+
readonly payloadSchema: {
|
|
236
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
237
|
+
readonly $id: "https://trusttasks.org/spec/persona/disclosure/present/1.0";
|
|
238
|
+
readonly title: "Persona Disclosure Present — payload";
|
|
239
|
+
readonly description: "Produce the signed disclosure a preview described. Consumes a previewId, which is what makes the two calls uncollapsible.";
|
|
240
|
+
readonly type: "object";
|
|
241
|
+
readonly additionalProperties: false;
|
|
242
|
+
readonly required: readonly ["contextId", "previewId"];
|
|
243
|
+
readonly properties: {
|
|
244
|
+
readonly contextId: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
readonly minLength: 1;
|
|
247
|
+
};
|
|
248
|
+
readonly previewId: {
|
|
249
|
+
readonly $ref: "#/$defs/Ulid";
|
|
250
|
+
readonly 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.";
|
|
251
|
+
};
|
|
252
|
+
readonly challenge: {
|
|
253
|
+
readonly type: "string";
|
|
254
|
+
readonly maxLength: 512;
|
|
255
|
+
readonly description: "The verifier's nonce, bound into the proof for freshness so the artifact cannot be replayed to another verifier or at another time.";
|
|
256
|
+
};
|
|
257
|
+
readonly mint: {
|
|
258
|
+
readonly type: "object";
|
|
259
|
+
readonly additionalProperties: false;
|
|
260
|
+
readonly 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.";
|
|
261
|
+
readonly properties: {
|
|
262
|
+
readonly durable: {
|
|
263
|
+
readonly type: "boolean";
|
|
264
|
+
readonly default: false;
|
|
265
|
+
};
|
|
266
|
+
readonly validUntil: {
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
readonly format: "date-time";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly ext: {
|
|
273
|
+
readonly $ref: "#/$defs/Ext";
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
readonly $defs: {
|
|
277
|
+
readonly Response: {
|
|
278
|
+
readonly $anchor: "response";
|
|
279
|
+
readonly title: "Persona Disclosure Present — response payload";
|
|
280
|
+
readonly description: "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.";
|
|
281
|
+
readonly type: "object";
|
|
282
|
+
readonly additionalProperties: false;
|
|
283
|
+
readonly required: readonly ["disclosureId", "artifact", "subject", "disclosedAt"];
|
|
284
|
+
readonly properties: {
|
|
285
|
+
readonly disclosureId: {
|
|
286
|
+
readonly $ref: "#/$defs/Ulid";
|
|
287
|
+
readonly description: "Names the append-only record this disclosure wrote, so the holder can find it again in their history.";
|
|
288
|
+
};
|
|
289
|
+
readonly artifact: {
|
|
290
|
+
readonly type: "string";
|
|
291
|
+
readonly 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.";
|
|
292
|
+
};
|
|
293
|
+
readonly subject: {
|
|
294
|
+
readonly type: "string";
|
|
295
|
+
readonly minLength: 1;
|
|
296
|
+
readonly description: "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone.";
|
|
297
|
+
};
|
|
298
|
+
readonly credentialId: {
|
|
299
|
+
readonly type: "string";
|
|
300
|
+
readonly minLength: 1;
|
|
301
|
+
readonly 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.";
|
|
302
|
+
};
|
|
303
|
+
readonly disclosedAt: {
|
|
304
|
+
readonly type: "string";
|
|
305
|
+
readonly format: "date-time";
|
|
306
|
+
};
|
|
307
|
+
readonly ext: {
|
|
308
|
+
readonly $ref: "#/$defs/Ext";
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
readonly Ext: {
|
|
313
|
+
readonly title: "Ext";
|
|
314
|
+
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.";
|
|
315
|
+
readonly type: "object";
|
|
316
|
+
readonly minProperties: 1;
|
|
317
|
+
readonly additionalProperties: true;
|
|
318
|
+
readonly propertyNames: {
|
|
319
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
readonly Ulid: {
|
|
323
|
+
readonly title: "Ulid";
|
|
324
|
+
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.";
|
|
325
|
+
readonly type: "string";
|
|
326
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
333
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
334
|
+
* parties (§7.3 item 5).
|
|
335
|
+
*/
|
|
336
|
+
export declare const RESPONSE_SPEC: {
|
|
337
|
+
readonly typeUri: "https://trusttasks.org/spec/persona/disclosure/present/1.0#response";
|
|
338
|
+
readonly isBearer: false;
|
|
339
|
+
readonly isProofRequired: true;
|
|
340
|
+
readonly isRecipientRequired: true;
|
|
341
|
+
readonly isIssuedAtRequired: true;
|
|
342
|
+
readonly payloadSchema: {
|
|
343
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
344
|
+
readonly $ref: "#/$defs/Response";
|
|
345
|
+
readonly $defs: {
|
|
346
|
+
readonly Response: {
|
|
347
|
+
readonly $anchor: "response";
|
|
348
|
+
readonly title: "Persona Disclosure Present — response payload";
|
|
349
|
+
readonly description: "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.";
|
|
350
|
+
readonly type: "object";
|
|
351
|
+
readonly additionalProperties: false;
|
|
352
|
+
readonly required: readonly ["disclosureId", "artifact", "subject", "disclosedAt"];
|
|
353
|
+
readonly properties: {
|
|
354
|
+
readonly disclosureId: {
|
|
355
|
+
readonly $ref: "#/$defs/Ulid";
|
|
356
|
+
readonly description: "Names the append-only record this disclosure wrote, so the holder can find it again in their history.";
|
|
357
|
+
};
|
|
358
|
+
readonly artifact: {
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly 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.";
|
|
361
|
+
};
|
|
362
|
+
readonly subject: {
|
|
363
|
+
readonly type: "string";
|
|
364
|
+
readonly minLength: 1;
|
|
365
|
+
readonly description: "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone.";
|
|
366
|
+
};
|
|
367
|
+
readonly credentialId: {
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
readonly minLength: 1;
|
|
370
|
+
readonly 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.";
|
|
371
|
+
};
|
|
372
|
+
readonly disclosedAt: {
|
|
373
|
+
readonly type: "string";
|
|
374
|
+
readonly format: "date-time";
|
|
375
|
+
};
|
|
376
|
+
readonly ext: {
|
|
377
|
+
readonly $ref: "#/$defs/Ext";
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
readonly Ext: {
|
|
382
|
+
readonly title: "Ext";
|
|
383
|
+
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.";
|
|
384
|
+
readonly type: "object";
|
|
385
|
+
readonly minProperties: 1;
|
|
386
|
+
readonly additionalProperties: true;
|
|
387
|
+
readonly propertyNames: {
|
|
388
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
readonly Ulid: {
|
|
392
|
+
readonly title: "Ulid";
|
|
393
|
+
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.";
|
|
394
|
+
readonly type: "string";
|
|
395
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/persona/disclosure/present/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AAGnE;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACtD;;OAEG;IACH,YAAY,EAAE,IAAI,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAE1B,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,4DAAqE,CAAC;AAE9F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,+BAA+B,CAAC;AAEtD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,qEAA8E,CAAC;AAEhH,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,uCAAuC,CAAC;AAE/D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -0,0 +1,211 @@
|
|
|
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
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/disclosure/present/1.0";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/disclosure/present/1.0#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/persona/disclosure/present/1.0",
|
|
21
|
+
"title": "Persona Disclosure Present — payload",
|
|
22
|
+
"description": "Produce the signed disclosure a preview described. Consumes a previewId, which is what makes the two calls uncollapsible.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"contextId",
|
|
27
|
+
"previewId"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"contextId": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1
|
|
33
|
+
},
|
|
34
|
+
"previewId": {
|
|
35
|
+
"$ref": "#/$defs/Ulid",
|
|
36
|
+
"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."
|
|
37
|
+
},
|
|
38
|
+
"challenge": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"maxLength": 512,
|
|
41
|
+
"description": "The verifier's nonce, bound into the proof for freshness so the artifact cannot be replayed to another verifier or at another time."
|
|
42
|
+
},
|
|
43
|
+
"mint": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"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.",
|
|
47
|
+
"properties": {
|
|
48
|
+
"durable": {
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"default": false
|
|
51
|
+
},
|
|
52
|
+
"validUntil": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": "date-time"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"ext": {
|
|
59
|
+
"$ref": "#/$defs/Ext"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"$defs": {
|
|
63
|
+
"Response": {
|
|
64
|
+
"$anchor": "response",
|
|
65
|
+
"title": "Persona Disclosure Present — response payload",
|
|
66
|
+
"description": "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.",
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": [
|
|
70
|
+
"disclosureId",
|
|
71
|
+
"artifact",
|
|
72
|
+
"subject",
|
|
73
|
+
"disclosedAt"
|
|
74
|
+
],
|
|
75
|
+
"properties": {
|
|
76
|
+
"disclosureId": {
|
|
77
|
+
"$ref": "#/$defs/Ulid",
|
|
78
|
+
"description": "Names the append-only record this disclosure wrote, so the holder can find it again in their history."
|
|
79
|
+
},
|
|
80
|
+
"artifact": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"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."
|
|
83
|
+
},
|
|
84
|
+
"subject": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone."
|
|
88
|
+
},
|
|
89
|
+
"credentialId": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1,
|
|
92
|
+
"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."
|
|
93
|
+
},
|
|
94
|
+
"disclosedAt": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"format": "date-time"
|
|
97
|
+
},
|
|
98
|
+
"ext": {
|
|
99
|
+
"$ref": "#/$defs/Ext"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"Ext": {
|
|
104
|
+
"title": "Ext",
|
|
105
|
+
"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.",
|
|
106
|
+
"type": "object",
|
|
107
|
+
"minProperties": 1,
|
|
108
|
+
"additionalProperties": true,
|
|
109
|
+
"propertyNames": {
|
|
110
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"Ulid": {
|
|
114
|
+
"title": "Ulid",
|
|
115
|
+
"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.",
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
122
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
123
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
124
|
+
"$ref": "#/$defs/Response",
|
|
125
|
+
"$defs": {
|
|
126
|
+
"Response": {
|
|
127
|
+
"$anchor": "response",
|
|
128
|
+
"title": "Persona Disclosure Present — response payload",
|
|
129
|
+
"description": "Success response to persona/disclosure/present. Type https://trusttasks.org/spec/persona/disclosure/present/1.0#response.",
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": [
|
|
133
|
+
"disclosureId",
|
|
134
|
+
"artifact",
|
|
135
|
+
"subject",
|
|
136
|
+
"disclosedAt"
|
|
137
|
+
],
|
|
138
|
+
"properties": {
|
|
139
|
+
"disclosureId": {
|
|
140
|
+
"$ref": "#/$defs/Ulid",
|
|
141
|
+
"description": "Names the append-only record this disclosure wrote, so the holder can find it again in their history."
|
|
142
|
+
},
|
|
143
|
+
"artifact": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"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."
|
|
146
|
+
},
|
|
147
|
+
"subject": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"minLength": 1,
|
|
150
|
+
"description": "The identifier the artifact was issued under — pairwise by default, so this disclosure cannot be joined to another by subject alone."
|
|
151
|
+
},
|
|
152
|
+
"credentialId": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"minLength": 1,
|
|
155
|
+
"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."
|
|
156
|
+
},
|
|
157
|
+
"disclosedAt": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"format": "date-time"
|
|
160
|
+
},
|
|
161
|
+
"ext": {
|
|
162
|
+
"$ref": "#/$defs/Ext"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"Ext": {
|
|
167
|
+
"title": "Ext",
|
|
168
|
+
"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.",
|
|
169
|
+
"type": "object",
|
|
170
|
+
"minProperties": 1,
|
|
171
|
+
"additionalProperties": true,
|
|
172
|
+
"propertyNames": {
|
|
173
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"Ulid": {
|
|
177
|
+
"title": "Ulid",
|
|
178
|
+
"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.",
|
|
179
|
+
"type": "string",
|
|
180
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
186
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
187
|
+
* per-specification and cannot be derived from the document alone, and
|
|
188
|
+
* item 2 needs the schema this carries.
|
|
189
|
+
*/
|
|
190
|
+
export const SPEC = {
|
|
191
|
+
typeUri: TYPE_URI,
|
|
192
|
+
isBearer: false,
|
|
193
|
+
isProofRequired: true,
|
|
194
|
+
isRecipientRequired: true,
|
|
195
|
+
isIssuedAtRequired: true,
|
|
196
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
200
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
201
|
+
* parties (§7.3 item 5).
|
|
202
|
+
*/
|
|
203
|
+
export const RESPONSE_SPEC = {
|
|
204
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
205
|
+
isBearer: false,
|
|
206
|
+
isProofRequired: true,
|
|
207
|
+
isRecipientRequired: true,
|
|
208
|
+
isIssuedAtRequired: true,
|
|
209
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/persona/disclosure/present/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,4DAAqE,CAAC;AAK9F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,qEAA8E,CAAC;AAKhH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,4DAA4D;IACnE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