@openvtc/trust-tasks 0.26.14 → 0.26.15
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 +114 -0
- package/dist/_shared/components.d.ts +392 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.1/personal-label.d.ts +16 -0
- package/dist/rooms/_shared/0.1/personal-label.d.ts.map +1 -0
- package/dist/rooms/_shared/0.1/personal-label.js +6 -0
- package/dist/rooms/_shared/0.1/personal-label.js.map +1 -0
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/blobs/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/blobs/get/0.1/payload.js +2 -2
- package/dist/rooms/blobs/get/0.1/payload.js.map +1 -1
- package/dist/rooms/blobs/get/0.2/payload.d.ts +4 -4
- package/dist/rooms/blobs/get/0.2/payload.js +2 -2
- package/dist/rooms/blobs/get/0.2/payload.js.map +1 -1
- package/dist/rooms/blobs/upload/begin/0.1/payload.d.ts +4 -4
- package/dist/rooms/blobs/upload/begin/0.1/payload.js +2 -2
- package/dist/rooms/blobs/upload/begin/0.1/payload.js.map +1 -1
- package/dist/rooms/blobs/upload/begin/0.2/payload.d.ts +4 -4
- package/dist/rooms/blobs/upload/begin/0.2/payload.js +2 -2
- package/dist/rooms/blobs/upload/begin/0.2/payload.js.map +1 -1
- package/dist/rooms/epoch/chain/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/chain/0.1/payload.js +2 -2
- package/dist/rooms/epoch/chain/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/commits/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/commits/0.1/payload.js +2 -2
- package/dist/rooms/epoch/commits/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/mint/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/mint/0.1/payload.js +2 -2
- package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/prune/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/prune/0.1/payload.js +2 -2
- package/dist/rooms/epoch/prune/0.1/payload.js.map +1 -1
- package/dist/rooms/info/0.1/payload.d.ts +4 -4
- package/dist/rooms/info/0.1/payload.js +2 -2
- package/dist/rooms/info/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/label/0.1/payload.d.ts +757 -0
- package/dist/rooms/keys/label/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/label/0.1/payload.js +388 -0
- package/dist/rooms/keys/label/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/list/0.2/payload.d.ts +667 -0
- package/dist/rooms/keys/list/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/list/0.2/payload.js +350 -0
- package/dist/rooms/keys/list/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/present/0.2/payload.d.ts +4 -4
- package/dist/rooms/keys/present/0.2/payload.js +2 -2
- package/dist/rooms/keys/present/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/profile/read/0.1/payload.d.ts +1652 -0
- package/dist/rooms/keys/profile/read/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/profile/read/0.1/payload.js +649 -0
- package/dist/rooms/keys/profile/read/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/profile/write/0.1/payload.d.ts +583 -0
- package/dist/rooms/keys/profile/write/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/profile/write/0.1/payload.js +319 -0
- package/dist/rooms/keys/profile/write/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/claim/0.1/payload.d.ts +4 -4
- package/dist/rooms/owner/claim/0.1/payload.js +2 -2
- package/dist/rooms/owner/claim/0.1/payload.js.map +1 -1
- package/dist/rooms/owner/group/remove/0.2/payload.d.ts +600 -0
- package/dist/rooms/owner/group/remove/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/owner/group/remove/0.2/payload.js +310 -0
- package/dist/rooms/owner/group/remove/0.2/payload.js.map +1 -0
- package/dist/rooms/owner/revoke/0.1/payload.d.ts +1481 -0
- package/dist/rooms/owner/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/revoke/0.1/payload.js +811 -0
- package/dist/rooms/owner/revoke/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/transfer/0.1/payload.d.ts +4 -4
- package/dist/rooms/owner/transfer/0.1/payload.js +2 -2
- package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -1
- package/dist/rooms/records/curate/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/curate/0.1/payload.js +2 -2
- package/dist/rooms/records/curate/0.1/payload.js.map +1 -1
- package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.1/payload.js +2 -2
- package/dist/rooms/records/get/0.1/payload.js.map +1 -1
- package/dist/rooms/records/get/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.2/payload.js +2 -2
- package/dist/rooms/records/get/0.2/payload.js.map +1 -1
- package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.1/payload.js +2 -2
- package/dist/rooms/records/list/0.1/payload.js.map +1 -1
- package/dist/rooms/records/list/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.2/payload.js +2 -2
- package/dist/rooms/records/list/0.2/payload.js.map +1 -1
- package/dist/rooms/records/put/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.1/payload.js +2 -2
- package/dist/rooms/records/put/0.1/payload.js.map +1 -1
- package/dist/rooms/records/put/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.2/payload.js +2 -2
- package/dist/rooms/records/put/0.2/payload.js.map +1 -1
- package/dist/rooms/revocations/get/0.1/payload.d.ts +905 -0
- package/dist/rooms/revocations/get/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/revocations/get/0.1/payload.js +512 -0
- package/dist/rooms/revocations/get/0.1/payload.js.map +1 -0
- package/dist/rooms/revocations/put/0.1/payload.d.ts +1021 -0
- package/dist/rooms/revocations/put/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/revocations/put/0.1/payload.js +583 -0
- package/dist/rooms/revocations/put/0.1/payload.js.map +1 -0
- package/dist/rooms/usage/0.1/payload.d.ts +4 -4
- package/dist/rooms/usage/0.1/payload.js +2 -2
- package/dist/rooms/usage/0.1/payload.js.map +1 -1
- package/dist/vtc/_shared/0.1/community-room.d.ts +1 -1
- package/dist/vtc/_shared/0.1/community-room.d.ts.map +1 -1
- package/dist/vtc/rooms/community/create/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/create/0.1/payload.js +2 -2
- package/dist/vtc/rooms/community/create/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/create/0.2/payload.d.ts +989 -0
- package/dist/vtc/rooms/community/create/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/create/0.2/payload.js +559 -0
- package/dist/vtc/rooms/community/create/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/create/0.3/payload.d.ts +1013 -0
- package/dist/vtc/rooms/community/create/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/create/0.3/payload.js +577 -0
- package/dist/vtc/rooms/community/create/0.3/payload.js.map +1 -0
- package/dist/vtc/rooms/community/get/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/get/0.1/payload.js +2 -2
- package/dist/vtc/rooms/community/get/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/get/0.2/payload.d.ts +887 -0
- package/dist/vtc/rooms/community/get/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/get/0.2/payload.js +517 -0
- package/dist/vtc/rooms/community/get/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/community/list/0.1/payload.js +2 -2
- package/dist/vtc/rooms/community/list/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/community/list/0.2/payload.d.ts +960 -0
- package/dist/vtc/rooms/community/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/list/0.2/payload.js +544 -0
- package/dist/vtc/rooms/community/list/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts +681 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.js +393 -0
- package/dist/vtc/rooms/community/members/remove/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/community/update/0.1/payload.d.ts +1013 -0
- package/dist/vtc/rooms/community/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/update/0.1/payload.js +573 -0
- package/dist/vtc/rooms/community/update/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/community/update/0.2/payload.d.ts +1037 -0
- package/dist/vtc/rooms/community/update/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/community/update/0.2/payload.js +593 -0
- package/dist/vtc/rooms/community/update/0.2/payload.js.map +1 -0
- package/dist/vtc/rooms/offers/list/0.1/payload.d.ts +4 -4
- package/dist/vtc/rooms/offers/list/0.1/payload.js +2 -2
- package/dist/vtc/rooms/offers/list/0.1/payload.js.map +1 -1
- package/dist/vtc/rooms/offers/list/0.2/payload.d.ts +736 -0
- package/dist/vtc/rooms/offers/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/offers/list/0.2/payload.js +430 -0
- package/dist/vtc/rooms/offers/list/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +426 -1
- package/src/index.ts +17 -0
- package/src/rooms/_shared/0.1/personal-label.ts +17 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/blobs/get/0.1/payload.ts +2 -2
- package/src/rooms/blobs/get/0.2/payload.ts +2 -2
- package/src/rooms/blobs/upload/begin/0.1/payload.ts +2 -2
- package/src/rooms/blobs/upload/begin/0.2/payload.ts +2 -2
- package/src/rooms/epoch/chain/0.1/payload.ts +2 -2
- package/src/rooms/epoch/commits/0.1/payload.ts +2 -2
- package/src/rooms/epoch/mint/0.1/payload.ts +2 -2
- package/src/rooms/epoch/prune/0.1/payload.ts +2 -2
- package/src/rooms/info/0.1/payload.ts +2 -2
- package/src/rooms/keys/label/0.1/payload.ts +474 -0
- package/src/rooms/keys/list/0.2/payload.ts +412 -0
- package/src/rooms/keys/present/0.2/payload.ts +2 -2
- package/src/rooms/keys/profile/read/0.1/payload.ts +1617 -0
- package/src/rooms/keys/profile/write/0.1/payload.ts +388 -0
- package/src/rooms/owner/claim/0.1/payload.ts +2 -2
- package/src/rooms/owner/group/remove/0.2/payload.ts +415 -0
- package/src/rooms/owner/revoke/0.1/payload.ts +954 -0
- package/src/rooms/owner/transfer/0.1/payload.ts +2 -2
- package/src/rooms/records/curate/0.1/payload.ts +2 -2
- package/src/rooms/records/get/0.1/payload.ts +2 -2
- package/src/rooms/records/get/0.2/payload.ts +2 -2
- package/src/rooms/records/list/0.1/payload.ts +2 -2
- package/src/rooms/records/list/0.2/payload.ts +2 -2
- package/src/rooms/records/put/0.1/payload.ts +2 -2
- package/src/rooms/records/put/0.2/payload.ts +2 -2
- package/src/rooms/revocations/get/0.1/payload.ts +562 -0
- package/src/rooms/revocations/put/0.1/payload.ts +637 -0
- package/src/rooms/usage/0.1/payload.ts +2 -2
- package/src/vtc/_shared/0.1/community-room.ts +1 -1
- package/src/vtc/rooms/community/create/0.1/payload.ts +2 -2
- package/src/vtc/rooms/community/create/0.2/payload.ts +613 -0
- package/src/vtc/rooms/community/create/0.3/payload.ts +635 -0
- package/src/vtc/rooms/community/get/0.1/payload.ts +2 -2
- package/src/vtc/rooms/community/get/0.2/payload.ts +549 -0
- package/src/vtc/rooms/community/list/0.1/payload.ts +2 -2
- package/src/vtc/rooms/community/list/0.2/payload.ts +591 -0
- package/src/vtc/rooms/community/members/remove/0.2/payload.ts +439 -0
- package/src/vtc/rooms/community/update/0.1/payload.ts +629 -0
- package/src/vtc/rooms/community/update/0.2/payload.ts +653 -0
- package/src/vtc/rooms/offers/list/0.1/payload.ts +2 -2
- package/src/vtc/rooms/offers/list/0.2/payload.ts +473 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/profile/write/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, RoomProfile } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A member holding `curate` or `admin` in a room asks their own key holder to set what the room is called and what it is for — or to clear it. The key holder signs the profile as the member, with the member's authority chain inside it, seals it under the room's current epoch, and stores it at the host at the location only members can compute. Exactly one of `profile` and `clear`. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export type RoomsKeysProfileWritePayload = {
|
|
13
|
+
[k: string]: unknown | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
/**
|
|
16
|
+
* The room whose profile to set. The recipient MUST hold its principal's membership of it.
|
|
17
|
+
*/
|
|
18
|
+
roomId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The host to write to, as a DID. Named by the caller for the reason `rooms/keys/read` gives. A room registered with more than one host is written at the one that takes its writes.
|
|
21
|
+
*/
|
|
22
|
+
host: string;
|
|
23
|
+
/**
|
|
24
|
+
* The room's new profile, replacing the whole of the current one: a member absent here is absent from the room's profile afterwards. Mutually exclusive with `clear`.
|
|
25
|
+
*/
|
|
26
|
+
profile?: RoomProfile;
|
|
27
|
+
/**
|
|
28
|
+
* Remove the room's profile: retract the record at the current epoch's profile location, so that readers find `cleared` there and stop. Only `true` is meaningful, so only `true` is accepted. Takes `curate`, which the host enforces on a retraction. Mutually exclusive with `profile`.
|
|
29
|
+
*/
|
|
30
|
+
clear?: true;
|
|
31
|
+
/**
|
|
32
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
33
|
+
*/
|
|
34
|
+
ext?: Ext;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Success response to rooms/keys/profile/write. Type https://trusttasks.org/spec/rooms/keys/profile/write/0.1#response. Where the profile now is at the host, and under which epoch.
|
|
39
|
+
*/
|
|
40
|
+
export interface RoomsKeysProfileWriteResponsePayload {
|
|
41
|
+
roomId: string;
|
|
42
|
+
/**
|
|
43
|
+
* `written`: the profile given is the room's profile, stored and checked to open. `cleared`: the record at the current epoch's profile location is retracted.
|
|
44
|
+
*/
|
|
45
|
+
outcome: "written" | "cleared";
|
|
46
|
+
/**
|
|
47
|
+
* The record key the profile is stored at: `profile_key(epoch)` on a sealed tier, `room-profile` on an `open` room. Returned because it is already the host's to see; the caller needs it for nothing but diagnosis.
|
|
48
|
+
*/
|
|
49
|
+
key: string;
|
|
50
|
+
/**
|
|
51
|
+
* The version the host assigned to the write or the retraction.
|
|
52
|
+
*/
|
|
53
|
+
version: number;
|
|
54
|
+
/**
|
|
55
|
+
* The epoch the profile was sealed under. Absent on an `open` room.
|
|
56
|
+
*/
|
|
57
|
+
epoch?: number;
|
|
58
|
+
ext?: Ext;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
62
|
+
export type { Ext, RoomProfile };
|
|
63
|
+
|
|
64
|
+
/** Trust Task type URI. */
|
|
65
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/profile/write/0.1" as const;
|
|
66
|
+
|
|
67
|
+
/** Stable alias for this specification's request payload shape. */
|
|
68
|
+
export type Payload = RoomsKeysProfileWritePayload;
|
|
69
|
+
|
|
70
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
71
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/profile/write/0.1#response" as const;
|
|
72
|
+
|
|
73
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
74
|
+
export type Response = RoomsKeysProfileWriteResponsePayload;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* This specification's payload schema, as a value.
|
|
78
|
+
*
|
|
79
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
80
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
81
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
82
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
83
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
84
|
+
*/
|
|
85
|
+
export const PAYLOAD_SCHEMA = {
|
|
86
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
87
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/profile/write/0.1",
|
|
88
|
+
"title": "Rooms Keys Profile Write — payload",
|
|
89
|
+
"description": "A member holding `curate` or `admin` in a room asks their own key holder to set what the room is called and what it is for — or to clear it. The key holder signs the profile as the member, with the member's authority chain inside it, seals it under the room's current epoch, and stores it at the host at the location only members can compute. Exactly one of `profile` and `clear`. The outer document members are owned by the framework — SPEC §6.3.",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"roomId",
|
|
94
|
+
"host"
|
|
95
|
+
],
|
|
96
|
+
"anyOf": [
|
|
97
|
+
{
|
|
98
|
+
"required": [
|
|
99
|
+
"profile"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"required": [
|
|
104
|
+
"clear"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"dependentSchemas": {
|
|
109
|
+
"clear": {
|
|
110
|
+
"not": {
|
|
111
|
+
"required": [
|
|
112
|
+
"profile"
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"properties": {
|
|
118
|
+
"roomId": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"minLength": 1,
|
|
121
|
+
"maxLength": 512,
|
|
122
|
+
"description": "The room whose profile to set. The recipient MUST hold its principal's membership of it."
|
|
123
|
+
},
|
|
124
|
+
"host": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"maxLength": 2048,
|
|
128
|
+
"pattern": "^did:",
|
|
129
|
+
"description": "The host to write to, as a DID. Named by the caller for the reason `rooms/keys/read` gives. A room registered with more than one host is written at the one that takes its writes."
|
|
130
|
+
},
|
|
131
|
+
"profile": {
|
|
132
|
+
"$ref": "#/$defs/RoomProfile",
|
|
133
|
+
"description": "The room's new profile, replacing the whole of the current one: a member absent here is absent from the room's profile afterwards. Mutually exclusive with `clear`."
|
|
134
|
+
},
|
|
135
|
+
"clear": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"const": true,
|
|
138
|
+
"description": "Remove the room's profile: retract the record at the current epoch's profile location, so that readers find `cleared` there and stop. Only `true` is meaningful, so only `true` is accepted. Takes `curate`, which the host enforces on a retraction. Mutually exclusive with `profile`."
|
|
139
|
+
},
|
|
140
|
+
"ext": {
|
|
141
|
+
"$ref": "#/$defs/Ext",
|
|
142
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"$defs": {
|
|
146
|
+
"Response": {
|
|
147
|
+
"$anchor": "response",
|
|
148
|
+
"title": "Rooms Keys Profile Write — response payload",
|
|
149
|
+
"description": "Success response to rooms/keys/profile/write. Type https://trusttasks.org/spec/rooms/keys/profile/write/0.1#response. Where the profile now is at the host, and under which epoch.",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"required": [
|
|
153
|
+
"roomId",
|
|
154
|
+
"outcome",
|
|
155
|
+
"key",
|
|
156
|
+
"version"
|
|
157
|
+
],
|
|
158
|
+
"properties": {
|
|
159
|
+
"roomId": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"minLength": 1,
|
|
162
|
+
"maxLength": 512
|
|
163
|
+
},
|
|
164
|
+
"outcome": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"enum": [
|
|
167
|
+
"written",
|
|
168
|
+
"cleared"
|
|
169
|
+
],
|
|
170
|
+
"description": "`written`: the profile given is the room's profile, stored and checked to open. `cleared`: the record at the current epoch's profile location is retracted."
|
|
171
|
+
},
|
|
172
|
+
"key": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"minLength": 1,
|
|
175
|
+
"maxLength": 512,
|
|
176
|
+
"description": "The record key the profile is stored at: `profile_key(epoch)` on a sealed tier, `room-profile` on an `open` room. Returned because it is already the host's to see; the caller needs it for nothing but diagnosis."
|
|
177
|
+
},
|
|
178
|
+
"version": {
|
|
179
|
+
"type": "integer",
|
|
180
|
+
"minimum": 1,
|
|
181
|
+
"description": "The version the host assigned to the write or the retraction."
|
|
182
|
+
},
|
|
183
|
+
"epoch": {
|
|
184
|
+
"type": "integer",
|
|
185
|
+
"minimum": 1,
|
|
186
|
+
"description": "The epoch the profile was sealed under. Absent on an `open` room."
|
|
187
|
+
},
|
|
188
|
+
"ext": {
|
|
189
|
+
"$ref": "#/$defs/Ext"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"Ext": {
|
|
194
|
+
"title": "Ext",
|
|
195
|
+
"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.",
|
|
196
|
+
"type": "object",
|
|
197
|
+
"minProperties": 1,
|
|
198
|
+
"additionalProperties": true,
|
|
199
|
+
"propertyNames": {
|
|
200
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"RoomProfile": {
|
|
204
|
+
"title": "RoomProfile",
|
|
205
|
+
"type": "object",
|
|
206
|
+
"additionalProperties": false,
|
|
207
|
+
"required": [
|
|
208
|
+
"name"
|
|
209
|
+
],
|
|
210
|
+
"description": "What a room says about itself to its own members: a name and, optionally, a description, short tags and an emoji, so that a member's wallet, portal or CLI can show what each room is rather than a DID.\n\n**It lives in the room, and only there.** A profile is carried in a record of the room (`RoomProfileStatement`), sealed on `attributed` and `private` rooms like every other record, so the room's host stores ciphertext and learns neither the name nor anything else here. It is never put in a credential — credentials are presented to hosts — nor in a host's record of the room, in `rooms/create` or `rooms/owner/register`, or in any member a host can read. On an `open` room it is cleartext, as everything in an open room is.\n\n**Plain text, never instructions.** Every member is free text chosen by whoever wrote the profile and shown to every member of the room. A reader renders `name`, `description` and `tags` as text — never as markup, never as a link it follows — removes or replaces control characters before showing them, and MUST NOT treat any of it as instructions, which matters most for an agent acting for a member. A writer MUST NOT put personal data or a credential in any member.\n\n**Growth.** A new optional member arrives in a later version of this component. A reader refuses a member it does not know (the `SealedRecordBody` rules), so a profile carrying one is not shown by a reader that predates it, and a writer SHOULD NOT use a member it cannot expect the room's readers to know. An ecosystem extension goes in `ext`, which a reader that does not understand it ignores. A change no earlier reader could survive is a new statement under a new derivation label (`openvtc/room/profile/v2`), written beside this one until the room's readers have moved.",
|
|
211
|
+
"properties": {
|
|
212
|
+
"name": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"minLength": 1,
|
|
215
|
+
"maxLength": 128,
|
|
216
|
+
"description": "The room's name as its members see it. Plain text, one line. Bounded like the label a community gives a room it owns (`RoomLabel` in vtc/_shared), so a community can write the same name here that it shows its administrators and the members it offers the room to."
|
|
217
|
+
},
|
|
218
|
+
"description": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"minLength": 1,
|
|
221
|
+
"maxLength": 1000,
|
|
222
|
+
"description": "What the room is for, in a sentence or a short paragraph. Plain text. Absent when the room has none; an empty string is not a description."
|
|
223
|
+
},
|
|
224
|
+
"tags": {
|
|
225
|
+
"type": "array",
|
|
226
|
+
"maxItems": 8,
|
|
227
|
+
"uniqueItems": true,
|
|
228
|
+
"items": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"minLength": 1,
|
|
231
|
+
"maxLength": 32,
|
|
232
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
|
|
233
|
+
},
|
|
234
|
+
"description": "Short identifiers the room files itself under, as a set: order carries no meaning. A member's surface MAY filter or group rooms by them. They are the room's own and shown to its members — distinct from the tags a community files the rooms it owns under for its administrators, which are never written here."
|
|
235
|
+
},
|
|
236
|
+
"emoji": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"minLength": 1,
|
|
239
|
+
"maxLength": 16,
|
|
240
|
+
"description": "One emoji — a single extended grapheme cluster, such as `📋` — that a surface MAY show beside the name. Text, rendered as text: never an image, never a URL, never anything a reader fetches, since a fetched icon would tell whoever serves it which member opened which room, and when. A reader that cannot render it shows nothing in its place."
|
|
241
|
+
},
|
|
242
|
+
"ext": {
|
|
243
|
+
"$ref": "#/$defs/Ext",
|
|
244
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1. A reader ignores what it does not understand."
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
} as const;
|
|
250
|
+
|
|
251
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
252
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
253
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
254
|
+
"$ref": "#/$defs/Response",
|
|
255
|
+
"$defs": {
|
|
256
|
+
"Response": {
|
|
257
|
+
"$anchor": "response",
|
|
258
|
+
"title": "Rooms Keys Profile Write — response payload",
|
|
259
|
+
"description": "Success response to rooms/keys/profile/write. Type https://trusttasks.org/spec/rooms/keys/profile/write/0.1#response. Where the profile now is at the host, and under which epoch.",
|
|
260
|
+
"type": "object",
|
|
261
|
+
"additionalProperties": false,
|
|
262
|
+
"required": [
|
|
263
|
+
"roomId",
|
|
264
|
+
"outcome",
|
|
265
|
+
"key",
|
|
266
|
+
"version"
|
|
267
|
+
],
|
|
268
|
+
"properties": {
|
|
269
|
+
"roomId": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"minLength": 1,
|
|
272
|
+
"maxLength": 512
|
|
273
|
+
},
|
|
274
|
+
"outcome": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"enum": [
|
|
277
|
+
"written",
|
|
278
|
+
"cleared"
|
|
279
|
+
],
|
|
280
|
+
"description": "`written`: the profile given is the room's profile, stored and checked to open. `cleared`: the record at the current epoch's profile location is retracted."
|
|
281
|
+
},
|
|
282
|
+
"key": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"minLength": 1,
|
|
285
|
+
"maxLength": 512,
|
|
286
|
+
"description": "The record key the profile is stored at: `profile_key(epoch)` on a sealed tier, `room-profile` on an `open` room. Returned because it is already the host's to see; the caller needs it for nothing but diagnosis."
|
|
287
|
+
},
|
|
288
|
+
"version": {
|
|
289
|
+
"type": "integer",
|
|
290
|
+
"minimum": 1,
|
|
291
|
+
"description": "The version the host assigned to the write or the retraction."
|
|
292
|
+
},
|
|
293
|
+
"epoch": {
|
|
294
|
+
"type": "integer",
|
|
295
|
+
"minimum": 1,
|
|
296
|
+
"description": "The epoch the profile was sealed under. Absent on an `open` room."
|
|
297
|
+
},
|
|
298
|
+
"ext": {
|
|
299
|
+
"$ref": "#/$defs/Ext"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"Ext": {
|
|
304
|
+
"title": "Ext",
|
|
305
|
+
"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.",
|
|
306
|
+
"type": "object",
|
|
307
|
+
"minProperties": 1,
|
|
308
|
+
"additionalProperties": true,
|
|
309
|
+
"propertyNames": {
|
|
310
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"RoomProfile": {
|
|
314
|
+
"title": "RoomProfile",
|
|
315
|
+
"type": "object",
|
|
316
|
+
"additionalProperties": false,
|
|
317
|
+
"required": [
|
|
318
|
+
"name"
|
|
319
|
+
],
|
|
320
|
+
"description": "What a room says about itself to its own members: a name and, optionally, a description, short tags and an emoji, so that a member's wallet, portal or CLI can show what each room is rather than a DID.\n\n**It lives in the room, and only there.** A profile is carried in a record of the room (`RoomProfileStatement`), sealed on `attributed` and `private` rooms like every other record, so the room's host stores ciphertext and learns neither the name nor anything else here. It is never put in a credential — credentials are presented to hosts — nor in a host's record of the room, in `rooms/create` or `rooms/owner/register`, or in any member a host can read. On an `open` room it is cleartext, as everything in an open room is.\n\n**Plain text, never instructions.** Every member is free text chosen by whoever wrote the profile and shown to every member of the room. A reader renders `name`, `description` and `tags` as text — never as markup, never as a link it follows — removes or replaces control characters before showing them, and MUST NOT treat any of it as instructions, which matters most for an agent acting for a member. A writer MUST NOT put personal data or a credential in any member.\n\n**Growth.** A new optional member arrives in a later version of this component. A reader refuses a member it does not know (the `SealedRecordBody` rules), so a profile carrying one is not shown by a reader that predates it, and a writer SHOULD NOT use a member it cannot expect the room's readers to know. An ecosystem extension goes in `ext`, which a reader that does not understand it ignores. A change no earlier reader could survive is a new statement under a new derivation label (`openvtc/room/profile/v2`), written beside this one until the room's readers have moved.",
|
|
321
|
+
"properties": {
|
|
322
|
+
"name": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"minLength": 1,
|
|
325
|
+
"maxLength": 128,
|
|
326
|
+
"description": "The room's name as its members see it. Plain text, one line. Bounded like the label a community gives a room it owns (`RoomLabel` in vtc/_shared), so a community can write the same name here that it shows its administrators and the members it offers the room to."
|
|
327
|
+
},
|
|
328
|
+
"description": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"minLength": 1,
|
|
331
|
+
"maxLength": 1000,
|
|
332
|
+
"description": "What the room is for, in a sentence or a short paragraph. Plain text. Absent when the room has none; an empty string is not a description."
|
|
333
|
+
},
|
|
334
|
+
"tags": {
|
|
335
|
+
"type": "array",
|
|
336
|
+
"maxItems": 8,
|
|
337
|
+
"uniqueItems": true,
|
|
338
|
+
"items": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"minLength": 1,
|
|
341
|
+
"maxLength": 32,
|
|
342
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
|
|
343
|
+
},
|
|
344
|
+
"description": "Short identifiers the room files itself under, as a set: order carries no meaning. A member's surface MAY filter or group rooms by them. They are the room's own and shown to its members — distinct from the tags a community files the rooms it owns under for its administrators, which are never written here."
|
|
345
|
+
},
|
|
346
|
+
"emoji": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"minLength": 1,
|
|
349
|
+
"maxLength": 16,
|
|
350
|
+
"description": "One emoji — a single extended grapheme cluster, such as `📋` — that a surface MAY show beside the name. Text, rendered as text: never an image, never a URL, never anything a reader fetches, since a fetched icon would tell whoever serves it which member opened which room, and when. A reader that cannot render it shows nothing in its place."
|
|
351
|
+
},
|
|
352
|
+
"ext": {
|
|
353
|
+
"$ref": "#/$defs/Ext",
|
|
354
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1. A reader ignores what it does not understand."
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
} as const;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
363
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
364
|
+
* per-specification and cannot be derived from the document alone, and
|
|
365
|
+
* item 2 needs the schema this carries.
|
|
366
|
+
*/
|
|
367
|
+
export const SPEC = {
|
|
368
|
+
typeUri: TYPE_URI,
|
|
369
|
+
isBearer: false,
|
|
370
|
+
isProofRequired: true,
|
|
371
|
+
isRecipientRequired: true,
|
|
372
|
+
isIssuedAtRequired: true,
|
|
373
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
374
|
+
} as const;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
378
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
379
|
+
* parties (§7.3 item 5).
|
|
380
|
+
*/
|
|
381
|
+
export const RESPONSE_SPEC = {
|
|
382
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
383
|
+
isBearer: false,
|
|
384
|
+
isProofRequired: true,
|
|
385
|
+
isRecipientRequired: true,
|
|
386
|
+
isIssuedAtRequired: true,
|
|
387
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
388
|
+
} as const;
|
|
@@ -144,7 +144,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
144
144
|
"membership",
|
|
145
145
|
"authority"
|
|
146
146
|
],
|
|
147
|
-
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
147
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.",
|
|
148
148
|
"properties": {
|
|
149
149
|
"membership": {
|
|
150
150
|
"type": "string",
|
|
@@ -214,7 +214,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
214
214
|
"membership",
|
|
215
215
|
"authority"
|
|
216
216
|
],
|
|
217
|
-
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
217
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.\n\n**Every credential is its issuer's attestation, and only its issuer's.** For the membership credential and for every link of `authority`, a host MUST verify the credential's `proof` with a key that the credential's own `issuer` lists for `assertionMethod` in its DID document, and MUST refuse a credential whose proof names a verification method that is not its issuer's. A proof that verifies under some other party's key is that party's statement, not the issuer's, and confers nothing. The same binding holds for every other document a room signs, such as a `RevocationList`.\n\n**A chain that verifies may still be revoked.** A host that has accepted a `RevocationList` for the room (`rooms/revocations/put`) MUST, from the moment it accepted it, refuse every presentation in which the membership credential or any link of `authority` is revoked by that list, under every task and every version of every task it serves for the room. A chain from which any link is revoked is refused whole: a credential delegated from a revoked one confers nothing, however it was attenuated. The refusal is the same `permissionDenied` as any other failed presentation.",
|
|
218
218
|
"properties": {
|
|
219
219
|
"membership": {
|
|
220
220
|
"type": "string",
|