@openvtc/trust-tasks 0.28.14 → 0.28.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 +43 -0
- package/dist/_extends.d.ts.map +1 -1
- package/dist/_extends.js +5 -0
- package/dist/_extends.js.map +1 -1
- package/dist/_shared/components.d.ts +344 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/did-management/stats/set-resolution/0.1/payload.d.ts +398 -0
- package/dist/did-management/stats/set-resolution/0.1/payload.d.ts.map +1 -0
- package/dist/did-management/stats/set-resolution/0.1/payload.js +247 -0
- package/dist/did-management/stats/set-resolution/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -1
- 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/_shared/0.2/room.d.ts +1 -1
- package/dist/rooms/_shared/0.2/room.d.ts.map +1 -1
- package/dist/rooms/_shared/0.3/member-profile.d.ts +11 -0
- package/dist/rooms/_shared/0.3/member-profile.d.ts.map +1 -0
- package/dist/rooms/_shared/0.3/member-profile.js +6 -0
- package/dist/rooms/_shared/0.3/member-profile.js.map +1 -0
- package/dist/rooms/changed/0.1/payload.d.ts +139 -0
- package/dist/rooms/changed/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/changed/0.1/payload.js +84 -0
- package/dist/rooms/changed/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/act/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.1/payload.js +1 -1
- package/dist/rooms/keys/act/0.10/payload.d.ts +14 -2
- package/dist/rooms/keys/act/0.10/payload.d.ts.map +1 -1
- package/dist/rooms/keys/act/0.10/payload.js +1 -1
- package/dist/rooms/keys/act/0.10/payload.js.map +1 -1
- package/dist/rooms/keys/act/0.11/payload.d.ts +572 -0
- package/dist/rooms/keys/act/0.11/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.11/payload.js +319 -0
- package/dist/rooms/keys/act/0.11/payload.js.map +1 -0
- package/dist/rooms/keys/act/0.12/payload.d.ts +560 -0
- package/dist/rooms/keys/act/0.12/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.12/payload.js +319 -0
- package/dist/rooms/keys/act/0.12/payload.js.map +1 -0
- package/dist/rooms/keys/act/0.2/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.2/payload.js +1 -1
- package/dist/rooms/keys/act/0.3/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.3/payload.js +1 -1
- package/dist/rooms/keys/act/0.4/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.4/payload.js +1 -1
- package/dist/rooms/keys/act/0.5/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.5/payload.js +1 -1
- package/dist/rooms/keys/act/0.6/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.6/payload.js +1 -1
- package/dist/rooms/keys/act/0.7/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.7/payload.js +1 -1
- package/dist/rooms/keys/act/0.8/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.8/payload.js +1 -1
- package/dist/rooms/keys/act/0.9/payload.d.ts +4 -4
- package/dist/rooms/keys/act/0.9/payload.js +1 -1
- package/dist/rooms/keys/browse/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/browse/0.1/payload.js +1 -1
- package/dist/rooms/keys/browse/0.2/payload.d.ts +4 -4
- package/dist/rooms/keys/browse/0.2/payload.js +1 -1
- package/dist/rooms/keys/browse/0.3/payload.d.ts +14 -2
- package/dist/rooms/keys/browse/0.3/payload.d.ts.map +1 -1
- package/dist/rooms/keys/browse/0.3/payload.js +1 -1
- package/dist/rooms/keys/browse/0.3/payload.js.map +1 -1
- package/dist/rooms/keys/browse/0.4/payload.d.ts +1127 -0
- package/dist/rooms/keys/browse/0.4/payload.d.ts.map +1 -0
- package/dist/rooms/keys/browse/0.4/payload.js +658 -0
- package/dist/rooms/keys/browse/0.4/payload.js.map +1 -0
- package/dist/rooms/keys/changed/0.1/payload.d.ts +173 -0
- package/dist/rooms/keys/changed/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/changed/0.1/payload.js +99 -0
- package/dist/rooms/keys/changed/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/profile/read/0.1/payload.d.ts +56 -4
- package/dist/rooms/keys/profile/read/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/profile/read/0.1/payload.js +28 -2
- package/dist/rooms/keys/profile/read/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/profile/write/0.1/payload.d.ts +56 -4
- package/dist/rooms/keys/profile/write/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/profile/write/0.1/payload.js +28 -2
- package/dist/rooms/keys/profile/write/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/read/0.1/payload.d.ts +14 -2
- package/dist/rooms/keys/read/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/keys/read/0.1/payload.js +1 -1
- package/dist/rooms/keys/read/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/read/0.2/payload.d.ts +1287 -0
- package/dist/rooms/keys/read/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/read/0.2/payload.js +689 -0
- package/dist/rooms/keys/read/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts +4 -4
- package/dist/rooms/keys/seal/0.1/payload.js +1 -1
- package/dist/rooms/keys/seal/0.2/payload.d.ts +13 -2
- package/dist/rooms/keys/seal/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/keys/seal/0.2/payload.js +1 -1
- package/dist/rooms/keys/seal/0.2/payload.js.map +1 -1
- package/dist/rooms/keys/seal/0.3/payload.d.ts +402 -0
- package/dist/rooms/keys/seal/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/keys/seal/0.3/payload.js +229 -0
- package/dist/rooms/keys/seal/0.3/payload.js.map +1 -0
- package/dist/rooms/keys/watch/0.1/payload.d.ts +652 -0
- package/dist/rooms/keys/watch/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/watch/0.1/payload.js +343 -0
- package/dist/rooms/keys/watch/0.1/payload.js.map +1 -0
- package/dist/rooms/records/get/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/get/0.1/payload.js +1 -1
- package/dist/rooms/records/get/0.2/payload.d.ts +13 -2
- package/dist/rooms/records/get/0.2/payload.d.ts.map +1 -1
- package/dist/rooms/records/get/0.2/payload.js +1 -1
- package/dist/rooms/records/get/0.2/payload.js.map +1 -1
- package/dist/rooms/records/get/0.3/payload.d.ts +1064 -0
- package/dist/rooms/records/get/0.3/payload.d.ts.map +1 -0
- package/dist/rooms/records/get/0.3/payload.js +571 -0
- package/dist/rooms/records/get/0.3/payload.js.map +1 -0
- package/dist/rooms/records/list/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.1/payload.js +1 -1
- package/dist/rooms/records/list/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.2/payload.js +1 -1
- package/dist/rooms/records/list/0.3/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.3/payload.js +1 -1
- package/dist/rooms/records/list/0.4/payload.d.ts +4 -4
- package/dist/rooms/records/list/0.4/payload.js +1 -1
- package/dist/rooms/records/list/0.5/payload.d.ts +13 -2
- package/dist/rooms/records/list/0.5/payload.d.ts.map +1 -1
- package/dist/rooms/records/list/0.5/payload.js +1 -1
- package/dist/rooms/records/list/0.5/payload.js.map +1 -1
- package/dist/rooms/records/list/0.6/payload.d.ts +1096 -0
- package/dist/rooms/records/list/0.6/payload.d.ts.map +1 -0
- package/dist/rooms/records/list/0.6/payload.js +596 -0
- package/dist/rooms/records/list/0.6/payload.js.map +1 -0
- package/dist/rooms/records/put/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.1/payload.js +1 -1
- package/dist/rooms/records/put/0.2/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.2/payload.js +1 -1
- package/dist/rooms/records/put/0.3/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.3/payload.js +1 -1
- package/dist/rooms/records/put/0.4/payload.d.ts +146 -6
- package/dist/rooms/records/put/0.4/payload.d.ts.map +1 -1
- package/dist/rooms/records/put/0.4/payload.js +81 -3
- package/dist/rooms/records/put/0.4/payload.js.map +1 -1
- package/dist/rooms/records/put/0.5/payload.d.ts +1808 -0
- package/dist/rooms/records/put/0.5/payload.d.ts.map +1 -0
- package/dist/rooms/records/put/0.5/payload.js +984 -0
- package/dist/rooms/records/put/0.5/payload.js.map +1 -0
- package/dist/rooms/watch/0.1/payload.d.ts +497 -0
- package/dist/rooms/watch/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/watch/0.1/payload.js +268 -0
- package/dist/rooms/watch/0.1/payload.js.map +1 -0
- package/dist/vtc/_shared/0.7/network-membership.d.ts +16 -0
- package/dist/vtc/_shared/0.7/network-membership.d.ts.map +1 -0
- package/dist/vtc/_shared/0.7/network-membership.js +6 -0
- package/dist/vtc/_shared/0.7/network-membership.js.map +1 -0
- package/dist/vtc/boards/delete/0.1/payload.d.ts +416 -0
- package/dist/vtc/boards/delete/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/boards/delete/0.1/payload.js +236 -0
- package/dist/vtc/boards/delete/0.1/payload.js.map +1 -0
- package/dist/vtc/boards/update/0.1/payload.d.ts +147 -2
- package/dist/vtc/boards/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/boards/update/0.1/payload.js +72 -0
- package/dist/vtc/boards/update/0.1/payload.js.map +1 -1
- package/dist/vtc/elections/list/0.5/payload.d.ts +3 -3
- package/dist/vtc/elections/list/0.5/payload.js +1 -1
- package/dist/vtc/elections/list/0.5/payload.js.map +1 -1
- package/dist/vtc/elections/show/0.6/payload.d.ts +3 -3
- package/dist/vtc/elections/show/0.6/payload.js +1 -1
- package/dist/vtc/elections/show/0.6/payload.js.map +1 -1
- package/dist/vtc/elections/tombstones/show/0.1/payload.d.ts +593 -0
- package/dist/vtc/elections/tombstones/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/elections/tombstones/show/0.1/payload.js +335 -0
- package/dist/vtc/elections/tombstones/show/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/deliver/0.1/payload.d.ts +354 -0
- package/dist/vtc/networks/deliver/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/deliver/0.1/payload.js +213 -0
- package/dist/vtc/networks/deliver/0.1/payload.js.map +1 -0
- package/dist/vtc/networks/evidence/0.1/payload.d.ts +14 -2
- package/dist/vtc/networks/evidence/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/networks/evidence/0.1/payload.js +1 -1
- package/dist/vtc/networks/evidence/0.1/payload.js.map +1 -1
- package/dist/vtc/networks/evidence/0.2/payload.d.ts +412 -0
- package/dist/vtc/networks/evidence/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/networks/evidence/0.2/payload.js +233 -0
- package/dist/vtc/networks/evidence/0.2/payload.js.map +1 -0
- package/dist/vtc/networks/groups/register/0.1/payload.d.ts +14 -2
- package/dist/vtc/networks/groups/register/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/networks/groups/register/0.1/payload.js +1 -1
- package/dist/vtc/networks/groups/register/0.1/payload.js.map +1 -1
- package/dist/vtc/networks/groups/register/0.2/payload.d.ts +680 -0
- package/dist/vtc/networks/groups/register/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/networks/groups/register/0.2/payload.js +401 -0
- package/dist/vtc/networks/groups/register/0.2/payload.js.map +1 -0
- package/dist/vtc/networks/join/0.1/payload.d.ts +14 -2
- package/dist/vtc/networks/join/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/networks/join/0.1/payload.js +1 -1
- package/dist/vtc/networks/join/0.1/payload.js.map +1 -1
- package/dist/vtc/networks/join/0.2/payload.d.ts +760 -0
- package/dist/vtc/networks/join/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/networks/join/0.2/payload.js +445 -0
- package/dist/vtc/networks/join/0.2/payload.js.map +1 -0
- package/dist/vtc/networks/leave/0.1/payload.d.ts +14 -2
- package/dist/vtc/networks/leave/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/networks/leave/0.1/payload.js +1 -1
- package/dist/vtc/networks/leave/0.1/payload.js.map +1 -1
- package/dist/vtc/networks/leave/0.2/payload.d.ts +664 -0
- package/dist/vtc/networks/leave/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/networks/leave/0.2/payload.js +393 -0
- package/dist/vtc/networks/leave/0.2/payload.js.map +1 -0
- package/dist/vtc/networks/list/0.1/payload.d.ts +14 -2
- package/dist/vtc/networks/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/networks/list/0.1/payload.js +1 -1
- package/dist/vtc/networks/list/0.1/payload.js.map +1 -1
- package/dist/vtc/networks/list/0.2/payload.d.ts +713 -0
- package/dist/vtc/networks/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/networks/list/0.2/payload.js +417 -0
- package/dist/vtc/networks/list/0.2/payload.js.map +1 -0
- package/dist/vtc/networks/repudiate/0.1/payload.d.ts +14 -2
- package/dist/vtc/networks/repudiate/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/networks/repudiate/0.1/payload.js +1 -1
- package/dist/vtc/networks/repudiate/0.1/payload.js.map +1 -1
- package/dist/vtc/networks/repudiate/0.2/payload.d.ts +680 -0
- package/dist/vtc/networks/repudiate/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/networks/repudiate/0.2/payload.js +400 -0
- package/dist/vtc/networks/repudiate/0.2/payload.js.map +1 -0
- package/dist/vtc/networks/show/0.1/payload.d.ts +14 -2
- package/dist/vtc/networks/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/networks/show/0.1/payload.js +1 -1
- package/dist/vtc/networks/show/0.1/payload.js.map +1 -1
- package/dist/vtc/networks/show/0.2/payload.d.ts +650 -0
- package/dist/vtc/networks/show/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/networks/show/0.2/payload.js +388 -0
- package/dist/vtc/networks/show/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_extends.ts +5 -0
- package/src/_shared/components.ts +352 -1
- package/src/did-management/stats/set-resolution/0.1/payload.ts +312 -0
- package/src/index.ts +75 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/_shared/0.2/room.ts +1 -1
- package/src/rooms/_shared/0.3/member-profile.ts +11 -0
- package/src/rooms/changed/0.1/payload.ts +115 -0
- package/src/rooms/keys/act/0.1/payload.ts +5 -5
- package/src/rooms/keys/act/0.10/payload.ts +15 -3
- package/src/rooms/keys/act/0.11/payload.ts +408 -0
- package/src/rooms/keys/act/0.12/payload.ts +396 -0
- package/src/rooms/keys/act/0.2/payload.ts +5 -5
- package/src/rooms/keys/act/0.3/payload.ts +5 -5
- package/src/rooms/keys/act/0.4/payload.ts +5 -5
- package/src/rooms/keys/act/0.5/payload.ts +5 -5
- package/src/rooms/keys/act/0.6/payload.ts +5 -5
- package/src/rooms/keys/act/0.7/payload.ts +5 -5
- package/src/rooms/keys/act/0.8/payload.ts +5 -5
- package/src/rooms/keys/act/0.9/payload.ts +5 -5
- package/src/rooms/keys/browse/0.1/payload.ts +5 -5
- package/src/rooms/keys/browse/0.2/payload.ts +5 -5
- package/src/rooms/keys/browse/0.3/payload.ts +15 -3
- package/src/rooms/keys/browse/0.4/payload.ts +730 -0
- package/src/rooms/keys/changed/0.1/payload.ts +138 -0
- package/src/rooms/keys/profile/read/0.1/payload.ts +28 -2
- package/src/rooms/keys/profile/write/0.1/payload.ts +28 -2
- package/src/rooms/keys/read/0.1/payload.ts +15 -3
- package/src/rooms/keys/read/0.2/payload.ts +855 -0
- package/src/rooms/keys/seal/0.1/payload.ts +5 -5
- package/src/rooms/keys/seal/0.2/payload.ts +14 -3
- package/src/rooms/keys/seal/0.3/payload.ts +282 -0
- package/src/rooms/keys/watch/0.1/payload.ts +452 -0
- package/src/rooms/records/get/0.1/payload.ts +5 -5
- package/src/rooms/records/get/0.2/payload.ts +14 -3
- package/src/rooms/records/get/0.3/payload.ts +684 -0
- package/src/rooms/records/list/0.1/payload.ts +5 -5
- package/src/rooms/records/list/0.2/payload.ts +5 -5
- package/src/rooms/records/list/0.3/payload.ts +5 -5
- package/src/rooms/records/list/0.4/payload.ts +5 -5
- package/src/rooms/records/list/0.5/payload.ts +14 -3
- package/src/rooms/records/list/0.6/payload.ts +673 -0
- package/src/rooms/records/put/0.1/payload.ts +5 -5
- package/src/rooms/records/put/0.2/payload.ts +5 -5
- package/src/rooms/records/put/0.3/payload.ts +5 -5
- package/src/rooms/records/put/0.4/payload.ts +95 -5
- package/src/rooms/records/put/0.5/payload.ts +1095 -0
- package/src/rooms/watch/0.1/payload.ts +340 -0
- package/src/vtc/_shared/0.7/network-membership.ts +17 -0
- package/src/vtc/boards/delete/0.1/payload.ts +293 -0
- package/src/vtc/boards/update/0.1/payload.ts +91 -2
- package/src/vtc/elections/list/0.5/payload.ts +2 -2
- package/src/vtc/elections/show/0.6/payload.ts +2 -2
- package/src/vtc/elections/tombstones/show/0.1/payload.ts +401 -0
- package/src/vtc/networks/deliver/0.1/payload.ts +254 -0
- package/src/vtc/networks/evidence/0.1/payload.ts +15 -3
- package/src/vtc/networks/evidence/0.2/payload.ts +290 -0
- package/src/vtc/networks/groups/register/0.1/payload.ts +15 -3
- package/src/vtc/networks/groups/register/0.2/payload.ts +446 -0
- package/src/vtc/networks/join/0.1/payload.ts +15 -3
- package/src/vtc/networks/join/0.2/payload.ts +492 -0
- package/src/vtc/networks/leave/0.1/payload.ts +15 -3
- package/src/vtc/networks/leave/0.2/payload.ts +434 -0
- package/src/vtc/networks/list/0.1/payload.ts +15 -3
- package/src/vtc/networks/list/0.2/payload.ts +463 -0
- package/src/vtc/networks/repudiate/0.1/payload.ts +15 -3
- package/src/vtc/networks/repudiate/0.2/payload.ts +445 -0
- package/src/vtc/networks/show/0.1/payload.ts +15 -3
- package/src/vtc/networks/show/0.2/payload.ts +425 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { AuthorityPresentation, Ext, SealedRecord } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
/** @deprecated superseded by rooms/records/put/0.
|
|
9
|
+
/** @deprecated superseded by rooms/records/put/0.5 */
|
|
10
10
|
export interface RoomsRecordsPutPayload {
|
|
11
11
|
/**
|
|
12
12
|
* The room's identifier. A host verifies the presentation against credentials issued by this identifier, never against a member list of its own — which is what lets a room move hosts without reissuing a credential.
|
|
@@ -48,7 +48,7 @@ export interface RoomsRecordsPutPayload {
|
|
|
48
48
|
/**
|
|
49
49
|
* Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.1#response.
|
|
50
50
|
*
|
|
51
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
51
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
52
52
|
*/
|
|
53
53
|
export interface RoomsRecordsPutResponsePayload {
|
|
54
54
|
/**
|
|
@@ -86,12 +86,12 @@ export const EXTENDS: string | null = null;
|
|
|
86
86
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
87
87
|
* Versions").
|
|
88
88
|
*/
|
|
89
|
-
export const DEPRECATION: string | null = "superseded by rooms/records/put/0.
|
|
89
|
+
export const DEPRECATION: string | null = "superseded by rooms/records/put/0.5";
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Stable alias for this specification's request payload shape.
|
|
93
93
|
*
|
|
94
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
94
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
95
95
|
*/
|
|
96
96
|
export type Payload = RoomsRecordsPutPayload;
|
|
97
97
|
|
|
@@ -101,7 +101,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/records/put/
|
|
|
101
101
|
/**
|
|
102
102
|
* Stable alias for this specification's success-response payload shape.
|
|
103
103
|
*
|
|
104
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
104
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
105
105
|
*/
|
|
106
106
|
export type Response = RoomsRecordsPutResponsePayload;
|
|
107
107
|
|
|
@@ -9,7 +9,7 @@ import type { AuthorityPresentation, BlobRef, DigestMultibase, Ext, SealedRecord
|
|
|
9
9
|
/**
|
|
10
10
|
* A member writes a record to a data room, authorized by an authority chain the room itself issued. 0.2 adds `blobs`: a record can carry a file, whose ciphertext the host stores outside the record and whose description is sealed inside it.
|
|
11
11
|
*
|
|
12
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
12
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
13
13
|
*/
|
|
14
14
|
export interface RoomsRecordsPutPayload {
|
|
15
15
|
/**
|
|
@@ -59,7 +59,7 @@ export interface RoomsRecordsPutPayload {
|
|
|
59
59
|
/**
|
|
60
60
|
* Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.2#response.
|
|
61
61
|
*
|
|
62
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
62
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
63
63
|
*/
|
|
64
64
|
export interface RoomsRecordsPutResponsePayload {
|
|
65
65
|
/**
|
|
@@ -97,12 +97,12 @@ export const EXTENDS: string | null = null;
|
|
|
97
97
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
98
98
|
* Versions").
|
|
99
99
|
*/
|
|
100
|
-
export const DEPRECATION: string | null = "superseded by rooms/records/put/0.
|
|
100
|
+
export const DEPRECATION: string | null = "superseded by rooms/records/put/0.5";
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* Stable alias for this specification's request payload shape.
|
|
104
104
|
*
|
|
105
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
105
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
106
106
|
*/
|
|
107
107
|
export type Payload = RoomsRecordsPutPayload;
|
|
108
108
|
|
|
@@ -112,7 +112,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/records/put/
|
|
|
112
112
|
/**
|
|
113
113
|
* Stable alias for this specification's success-response payload shape.
|
|
114
114
|
*
|
|
115
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
115
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
116
116
|
*/
|
|
117
117
|
export type Response = RoomsRecordsPutResponsePayload;
|
|
118
118
|
|
|
@@ -9,7 +9,7 @@ import type { AuthorityPresentation, BlobRef, DigestMultibase, Ext, PermittedUse
|
|
|
9
9
|
/**
|
|
10
10
|
* A member writes a record to a data room, authorized by an authority chain the room itself issued. 0.2 added `blobs`: a record can carry a file, whose ciphertext the host stores outside the record and whose description is sealed inside it. 0.3 lets an `open` room's `cleartext` carry the record's provenance — `basis`, `confidence`, `evidence`, `validFor` — and its `validUntil`, which the sealed tiers carry inside the signed `SealedRecordBody`.
|
|
11
11
|
*
|
|
12
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
12
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
13
13
|
*/
|
|
14
14
|
export interface RoomsRecordsPutPayload {
|
|
15
15
|
/**
|
|
@@ -70,7 +70,7 @@ export interface RoomsRecordsPutPayload {
|
|
|
70
70
|
/**
|
|
71
71
|
* Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.3#response.
|
|
72
72
|
*
|
|
73
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
73
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
74
74
|
*/
|
|
75
75
|
export interface RoomsRecordsPutResponsePayload {
|
|
76
76
|
/**
|
|
@@ -108,12 +108,12 @@ export const EXTENDS: string | null = null;
|
|
|
108
108
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
109
109
|
* Versions").
|
|
110
110
|
*/
|
|
111
|
-
export const DEPRECATION: string | null = "superseded by rooms/records/put/0.
|
|
111
|
+
export const DEPRECATION: string | null = "superseded by rooms/records/put/0.5";
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Stable alias for this specification's request payload shape.
|
|
115
115
|
*
|
|
116
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
116
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
117
117
|
*/
|
|
118
118
|
export type Payload = RoomsRecordsPutPayload;
|
|
119
119
|
|
|
@@ -123,7 +123,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/records/put/
|
|
|
123
123
|
/**
|
|
124
124
|
* Stable alias for this specification's success-response payload shape.
|
|
125
125
|
*
|
|
126
|
-
* @deprecated superseded by rooms/records/put/0.
|
|
126
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
127
127
|
*/
|
|
128
128
|
export type Response = RoomsRecordsPutResponsePayload;
|
|
129
129
|
|
|
@@ -8,6 +8,8 @@ import type { AuthorityPresentation, BlobRef, DigestMultibase, Ext, FileManifest
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* A member writes a record to a data room, authorized by an authority chain the room itself issued. 0.2 added `blobs`: a record can carry a file, whose ciphertext the host stores outside the record and whose description is sealed inside it. 0.3 lets an `open` room's `cleartext` carry the record's provenance — `basis`, `confidence`, `evidence`, `validFor` — and its `validUntil`, which the sealed tiers carry inside the signed `SealedRecordBody`. 0.4 lets an `open` room's record carry a file: its `FileManifest`, with the file key it was sealed under, in `cleartext.file`.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
11
13
|
*/
|
|
12
14
|
export interface RoomsRecordsPutPayload {
|
|
13
15
|
/**
|
|
@@ -71,6 +73,8 @@ export interface RoomsRecordsPutPayload {
|
|
|
71
73
|
}
|
|
72
74
|
/**
|
|
73
75
|
* Success response to rooms/records/put. Type https://trusttasks.org/spec/rooms/records/put/0.3#response.
|
|
76
|
+
*
|
|
77
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
74
78
|
*/
|
|
75
79
|
export interface RoomsRecordsPutResponsePayload {
|
|
76
80
|
/**
|
|
@@ -108,15 +112,23 @@ export const EXTENDS: string | null = "0.3";
|
|
|
108
112
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
109
113
|
* Versions").
|
|
110
114
|
*/
|
|
111
|
-
export const DEPRECATION: string | null =
|
|
115
|
+
export const DEPRECATION: string | null = "superseded by rooms/records/put/0.5";
|
|
112
116
|
|
|
113
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Stable alias for this specification's request payload shape.
|
|
119
|
+
*
|
|
120
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
121
|
+
*/
|
|
114
122
|
export type Payload = RoomsRecordsPutPayload;
|
|
115
123
|
|
|
116
124
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
117
125
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/records/put/0.4#response" as const;
|
|
118
126
|
|
|
119
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* Stable alias for this specification's success-response payload shape.
|
|
129
|
+
*
|
|
130
|
+
* @deprecated superseded by rooms/records/put/0.5
|
|
131
|
+
*/
|
|
120
132
|
export type Response = RoomsRecordsPutResponsePayload;
|
|
121
133
|
|
|
122
134
|
/**
|
|
@@ -299,7 +311,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
299
311
|
"segmentSize",
|
|
300
312
|
"blobRef"
|
|
301
313
|
],
|
|
302
|
-
"description": "Everything that describes a file. On an `attributed` or `private` room it is the `file` member of the sealed record body: sealed with the record, signed by the record's author, and never seen by the host. On an `open` room it is the `file` member of the record's `cleartext` (rooms/records/put/0.4), carrying its own `fileKey`, and the host reads it like the rest of the record. Defined here so that clients interoperate.\n\n**Byte encodings.** In every derivation below, `fileId` is its **32 decoded bytes**, never its base64url text; `roomId` is the **UTF-8 bytes** of the room identifier exactly as it appears on the wire; string constants are their ASCII bytes; `u8`, `u32be` and `u64be` are unsigned integers of that width, big-endian. Epochs are unsigned 64-bit on the wire. An implementation that holds epochs in a narrower type **MUST** refuse a value it cannot represent with `malformedRequest` (or, reading a manifest, refuse the file), and **MUST NOT** truncate it.\n\n**The file key.** `file_key = HKDF-SHA256(ikm = storage_key(epoch), salt = fileId, info = \"openvtc/room/file/v1\" || roomId || u64be(epoch))`, where `storage_key(epoch)` is the room's per-epoch storage key, the one records are sealed under. It is derived per file and never stored. It is bound to the room and the epoch, so a key released for one room cannot open a blob relocated from another, and releasing it exposes one file and nothing else.\n\n**The file key on an `open` room.** An open room has no group and so no storage key to derive from. There the uploader mints the file key itself — 32 bytes from a cryptographically secure random source, for this file only — and carries it in `fileKey`; a reader uses that key and derives nothing. Everything else below (padding, STREAM, the associated data, reading) is the same on every tier, with `epoch` the room's epoch when the file was written. `fileKey` **MUST** be present in an open room's manifest and **MUST** be absent from a sealed record body's, where the key is derived; a reader **MUST** refuse a file whose manifest breaks either rule. The key in the clear withholds nothing from the host or from anyone it serves the record to — the open tier withholds nothing from them — but it keeps the stored blob opaque to whoever holds only the storage, and keeps one blob format, and one reader, for every tier.\n\n**Padding.** With `padding: \"padme\"`, the plaintext of length `L = size` is extended with zero bytes to `padme(L)`: for `L < 2`, `padme(L) = L`; otherwise `E = floor(log2 L)`, `S = floor(log2 E) + 1`, `z = E − S`, `mask = 2^z − 1`, and `padme(L) = (L + mask) & ~mask`. The padded length is `padme(size)`; without padding it is `size`. Padding bytes **MUST** be zero.\n\n**The STREAM construction.** The padded plaintext is cut into `segmentSize`-byte segments, the last holding the remainder; an empty plaintext is one empty final segment. Segment `i` is sealed with ChaCha20-Poly1305 under `file_key`, with nonce `u32be(0) || u64be(i)` and associated data `\"openvtc/room/file/v1\" || roomId || fileId || u64be(epoch) || u64be(i) || u8(final)`, where `final` is 1 on the last segment and 0 on every other. A host that truncates, reorders or splices ciphertext produces an authentication failure, never a shorter or rearranged file. The nonces are counters, so a `file_key` MUST NOT seal two different files; a fresh random `fileId` is what guarantees it. Each sealed segment is one transfer chunk of the blob (BlobManifest), so `segmentSize + 16` is the blob's `chunks.chunkSize`, and an empty file is one 16-byte chunk.\n\n**Reading.** A reader opens the record, derives or obtains the file key, and **MUST**, before trusting a byte:\n- check that the blob's `chunks.chunkSize` equals `segmentSize + 16` and that `chunks.chunkCount` equals `max(1, ceil(paddedLength / segmentSize))`, and refuse the file otherwise;\n- decrypt every segment in order, refusing the file on any authentication failure or on a final flag anywhere but the last segment;\n- check that the decrypted length equals the padded length, that every padding byte is zero, and, after removing the padding, that the plaintext matches `digest`.\n\nA reader **MUST** refuse a file that fails any check, and **MUST NOT** present it with a warning instead. A reader that streams **MUST NOT** treat the plaintext as received — save it under its final name, render it, or hand it to another component — until the digest has verified; it writes to a temporary destination and discards that destination on a mismatch.",
|
|
314
|
+
"description": "Everything that describes a file. On an `attributed` or `private` room it is the `file` member of the sealed record body: sealed with the record, signed by the record's author, and never seen by the host. On an `open` room it is the `file` member of the record's `cleartext` (rooms/records/put/0.4), carrying its own `fileKey`, and the host reads it like the rest of the record. Defined here so that clients interoperate.\n\n**Byte encodings.** In every derivation below, `fileId` is its **32 decoded bytes**, never its base64url text; `roomId` is the **UTF-8 bytes** of the room identifier exactly as it appears on the wire; string constants are their ASCII bytes; `u8`, `u32be` and `u64be` are unsigned integers of that width, big-endian. Epochs are unsigned 64-bit on the wire. An implementation that holds epochs in a narrower type **MUST** refuse a value it cannot represent with `malformedRequest` (or, reading a manifest, refuse the file), and **MUST NOT** truncate it.\n\n**The file key.** `file_key = HKDF-SHA256(ikm = storage_key(epoch), salt = fileId, info = \"openvtc/room/file/v1\" || roomId || u64be(epoch))`, where `storage_key(epoch)` is the room's per-epoch storage key, the one records are sealed under. It is derived per file and never stored. It is bound to the room and the epoch, so a key released for one room cannot open a blob relocated from another, and releasing it exposes one file and nothing else.\n\n**The file key on an `open` room.** An open room has no group and so no storage key to derive from. There the uploader mints the file key itself — 32 bytes from a cryptographically secure random source, for this file only — and carries it in `fileKey`; a reader uses that key and derives nothing. Everything else below (padding, STREAM, the associated data, reading) is the same on every tier, with `epoch` the room's epoch when the file was written. `fileKey` **MUST** be present in an open room's manifest and **MUST** be absent from a sealed record body's, where the key is derived; a reader **MUST** refuse a file whose manifest breaks either rule. The key in the clear withholds nothing from the host or from anyone it serves the record to — the open tier withholds nothing from them — but it keeps the stored blob opaque to whoever holds only the storage, and keeps one blob format, and one reader, for every tier.\n\n**Padding.** With `padding: \"padme\"`, the plaintext of length `L = size` is extended with zero bytes to `padme(L)`: for `L < 2`, `padme(L) = L`; otherwise `E = floor(log2 L)`, `S = floor(log2 E) + 1`, `z = E − S`, `mask = 2^z − 1`, and `padme(L) = (L + mask) & ~mask`. The padded length is `padme(size)`; without padding it is `size`. Padding bytes **MUST** be zero.\n\n**The STREAM construction.** The padded plaintext is cut into `segmentSize`-byte segments, the last holding the remainder; an empty plaintext is one empty final segment. Segment `i` is sealed with ChaCha20-Poly1305 under `file_key`, with nonce `u32be(0) || u64be(i)` and associated data `\"openvtc/room/file/v1\" || roomId || fileId || u64be(epoch) || u64be(i) || u8(final)`, where `final` is 1 on the last segment and 0 on every other. A host that truncates, reorders or splices ciphertext produces an authentication failure, never a shorter or rearranged file. The nonces are counters, so a `file_key` MUST NOT seal two different files; a fresh random `fileId` is what guarantees it. Each sealed segment is one transfer chunk of the blob (BlobManifest), so `segmentSize + 16` is the blob's `chunks.chunkSize`, and an empty file is one 16-byte chunk.\n\n**Reading.** A reader opens the record, derives or obtains the file key, and **MUST**, before trusting a byte:\n- check that the blob's `chunks.chunkSize` equals `segmentSize + 16` and that `chunks.chunkCount` equals `max(1, ceil(paddedLength / segmentSize))`, and refuse the file otherwise;\n- decrypt every segment in order, refusing the file on any authentication failure or on a final flag anywhere but the last segment;\n- check that the decrypted length equals the padded length, that every padding byte is zero, and, after removing the padding, that the plaintext matches `digest`.\n\nA reader **MUST** refuse a file that fails any check, and **MUST NOT** present it with a warning instead. A reader that streams **MUST NOT** treat the plaintext as received — save it under its final name, render it, or hand it to another component — until the digest has verified; it writes to a temporary destination and discards that destination on a mismatch.\n\n**An image's size and preview.** `width`, `height` and `preview` are OPTIONAL and advisory: they let a reader lay out an image, and show something, before it fetches and decrypts the blob. A reader that fetches the file checks them against the bytes — the decoded image's dimensions, and that the file is an image at all — and on a mismatch uses the bytes and discards them; it MUST NOT treat any of them as evidence about the file. On `attributed` and `private` rooms they are inside the sealed, signed body like the rest of the manifest, so the host learns nothing from them; on an `open` room they are in the clear, as everything there is, and a writer carries them only with `rooms/records/put/0.5` or later. A writer uses them only once the room's profile lists them in `recordMembers` (`RoomProfile`), as with the other members a reader that predates them refuses.",
|
|
303
315
|
"properties": {
|
|
304
316
|
"fileId": {
|
|
305
317
|
"type": "string",
|
|
@@ -353,6 +365,45 @@ export const PAYLOAD_SCHEMA = {
|
|
|
353
365
|
"type": "string",
|
|
354
366
|
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
355
367
|
"description": "The file key itself, 32 bytes base64url without padding: present on an `open` room only, where there is no storage key to derive it from. Minted by the uploader from a cryptographically secure random source for this one file and never reused. MUST be absent on `attributed` and `private` rooms, where the key is derived and never stored."
|
|
368
|
+
},
|
|
369
|
+
"width": {
|
|
370
|
+
"type": "integer",
|
|
371
|
+
"minimum": 1,
|
|
372
|
+
"maximum": 1048576,
|
|
373
|
+
"description": "The image's width in pixels, as the uploader read it. Advisory. A writer sets `width` and `height` together or neither; a reader ignores one without the other. A reader checks it against the decoded image."
|
|
374
|
+
},
|
|
375
|
+
"height": {
|
|
376
|
+
"type": "integer",
|
|
377
|
+
"minimum": 1,
|
|
378
|
+
"maximum": 1048576,
|
|
379
|
+
"description": "The image's height in pixels, as the uploader read it. Advisory. A writer sets `width` and `height` together or neither; a reader ignores one without the other. A reader checks it against the decoded image."
|
|
380
|
+
},
|
|
381
|
+
"preview": {
|
|
382
|
+
"type": "object",
|
|
383
|
+
"additionalProperties": false,
|
|
384
|
+
"required": [
|
|
385
|
+
"mediaType",
|
|
386
|
+
"data"
|
|
387
|
+
],
|
|
388
|
+
"description": "A small image standing in for the file until it is fetched: at most 8192 bytes before encoding, enough for a blurred thumbnail and small enough not to swell the record every listing reader opens. A reader renders it only as a raster image it decodes itself — never as SVG or any other type that can carry active content, never as a link, never fetching anything — and replaces it with the file once fetched. It is the uploader's rendering of the file, not a digest of it: a reader MUST NOT present it as the file's contents.",
|
|
389
|
+
"properties": {
|
|
390
|
+
"mediaType": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"enum": [
|
|
393
|
+
"image/jpeg",
|
|
394
|
+
"image/png",
|
|
395
|
+
"image/webp"
|
|
396
|
+
],
|
|
397
|
+
"description": "The preview's own media type. Raster types only."
|
|
398
|
+
},
|
|
399
|
+
"data": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
402
|
+
"minLength": 1,
|
|
403
|
+
"maxLength": 10923,
|
|
404
|
+
"description": "The preview's bytes, base64url without padding: at most 8192 bytes decoded."
|
|
405
|
+
}
|
|
406
|
+
}
|
|
356
407
|
}
|
|
357
408
|
}
|
|
358
409
|
},
|
|
@@ -624,7 +675,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
624
675
|
"segmentSize",
|
|
625
676
|
"blobRef"
|
|
626
677
|
],
|
|
627
|
-
"description": "Everything that describes a file. On an `attributed` or `private` room it is the `file` member of the sealed record body: sealed with the record, signed by the record's author, and never seen by the host. On an `open` room it is the `file` member of the record's `cleartext` (rooms/records/put/0.4), carrying its own `fileKey`, and the host reads it like the rest of the record. Defined here so that clients interoperate.\n\n**Byte encodings.** In every derivation below, `fileId` is its **32 decoded bytes**, never its base64url text; `roomId` is the **UTF-8 bytes** of the room identifier exactly as it appears on the wire; string constants are their ASCII bytes; `u8`, `u32be` and `u64be` are unsigned integers of that width, big-endian. Epochs are unsigned 64-bit on the wire. An implementation that holds epochs in a narrower type **MUST** refuse a value it cannot represent with `malformedRequest` (or, reading a manifest, refuse the file), and **MUST NOT** truncate it.\n\n**The file key.** `file_key = HKDF-SHA256(ikm = storage_key(epoch), salt = fileId, info = \"openvtc/room/file/v1\" || roomId || u64be(epoch))`, where `storage_key(epoch)` is the room's per-epoch storage key, the one records are sealed under. It is derived per file and never stored. It is bound to the room and the epoch, so a key released for one room cannot open a blob relocated from another, and releasing it exposes one file and nothing else.\n\n**The file key on an `open` room.** An open room has no group and so no storage key to derive from. There the uploader mints the file key itself — 32 bytes from a cryptographically secure random source, for this file only — and carries it in `fileKey`; a reader uses that key and derives nothing. Everything else below (padding, STREAM, the associated data, reading) is the same on every tier, with `epoch` the room's epoch when the file was written. `fileKey` **MUST** be present in an open room's manifest and **MUST** be absent from a sealed record body's, where the key is derived; a reader **MUST** refuse a file whose manifest breaks either rule. The key in the clear withholds nothing from the host or from anyone it serves the record to — the open tier withholds nothing from them — but it keeps the stored blob opaque to whoever holds only the storage, and keeps one blob format, and one reader, for every tier.\n\n**Padding.** With `padding: \"padme\"`, the plaintext of length `L = size` is extended with zero bytes to `padme(L)`: for `L < 2`, `padme(L) = L`; otherwise `E = floor(log2 L)`, `S = floor(log2 E) + 1`, `z = E − S`, `mask = 2^z − 1`, and `padme(L) = (L + mask) & ~mask`. The padded length is `padme(size)`; without padding it is `size`. Padding bytes **MUST** be zero.\n\n**The STREAM construction.** The padded plaintext is cut into `segmentSize`-byte segments, the last holding the remainder; an empty plaintext is one empty final segment. Segment `i` is sealed with ChaCha20-Poly1305 under `file_key`, with nonce `u32be(0) || u64be(i)` and associated data `\"openvtc/room/file/v1\" || roomId || fileId || u64be(epoch) || u64be(i) || u8(final)`, where `final` is 1 on the last segment and 0 on every other. A host that truncates, reorders or splices ciphertext produces an authentication failure, never a shorter or rearranged file. The nonces are counters, so a `file_key` MUST NOT seal two different files; a fresh random `fileId` is what guarantees it. Each sealed segment is one transfer chunk of the blob (BlobManifest), so `segmentSize + 16` is the blob's `chunks.chunkSize`, and an empty file is one 16-byte chunk.\n\n**Reading.** A reader opens the record, derives or obtains the file key, and **MUST**, before trusting a byte:\n- check that the blob's `chunks.chunkSize` equals `segmentSize + 16` and that `chunks.chunkCount` equals `max(1, ceil(paddedLength / segmentSize))`, and refuse the file otherwise;\n- decrypt every segment in order, refusing the file on any authentication failure or on a final flag anywhere but the last segment;\n- check that the decrypted length equals the padded length, that every padding byte is zero, and, after removing the padding, that the plaintext matches `digest`.\n\nA reader **MUST** refuse a file that fails any check, and **MUST NOT** present it with a warning instead. A reader that streams **MUST NOT** treat the plaintext as received — save it under its final name, render it, or hand it to another component — until the digest has verified; it writes to a temporary destination and discards that destination on a mismatch.",
|
|
678
|
+
"description": "Everything that describes a file. On an `attributed` or `private` room it is the `file` member of the sealed record body: sealed with the record, signed by the record's author, and never seen by the host. On an `open` room it is the `file` member of the record's `cleartext` (rooms/records/put/0.4), carrying its own `fileKey`, and the host reads it like the rest of the record. Defined here so that clients interoperate.\n\n**Byte encodings.** In every derivation below, `fileId` is its **32 decoded bytes**, never its base64url text; `roomId` is the **UTF-8 bytes** of the room identifier exactly as it appears on the wire; string constants are their ASCII bytes; `u8`, `u32be` and `u64be` are unsigned integers of that width, big-endian. Epochs are unsigned 64-bit on the wire. An implementation that holds epochs in a narrower type **MUST** refuse a value it cannot represent with `malformedRequest` (or, reading a manifest, refuse the file), and **MUST NOT** truncate it.\n\n**The file key.** `file_key = HKDF-SHA256(ikm = storage_key(epoch), salt = fileId, info = \"openvtc/room/file/v1\" || roomId || u64be(epoch))`, where `storage_key(epoch)` is the room's per-epoch storage key, the one records are sealed under. It is derived per file and never stored. It is bound to the room and the epoch, so a key released for one room cannot open a blob relocated from another, and releasing it exposes one file and nothing else.\n\n**The file key on an `open` room.** An open room has no group and so no storage key to derive from. There the uploader mints the file key itself — 32 bytes from a cryptographically secure random source, for this file only — and carries it in `fileKey`; a reader uses that key and derives nothing. Everything else below (padding, STREAM, the associated data, reading) is the same on every tier, with `epoch` the room's epoch when the file was written. `fileKey` **MUST** be present in an open room's manifest and **MUST** be absent from a sealed record body's, where the key is derived; a reader **MUST** refuse a file whose manifest breaks either rule. The key in the clear withholds nothing from the host or from anyone it serves the record to — the open tier withholds nothing from them — but it keeps the stored blob opaque to whoever holds only the storage, and keeps one blob format, and one reader, for every tier.\n\n**Padding.** With `padding: \"padme\"`, the plaintext of length `L = size` is extended with zero bytes to `padme(L)`: for `L < 2`, `padme(L) = L`; otherwise `E = floor(log2 L)`, `S = floor(log2 E) + 1`, `z = E − S`, `mask = 2^z − 1`, and `padme(L) = (L + mask) & ~mask`. The padded length is `padme(size)`; without padding it is `size`. Padding bytes **MUST** be zero.\n\n**The STREAM construction.** The padded plaintext is cut into `segmentSize`-byte segments, the last holding the remainder; an empty plaintext is one empty final segment. Segment `i` is sealed with ChaCha20-Poly1305 under `file_key`, with nonce `u32be(0) || u64be(i)` and associated data `\"openvtc/room/file/v1\" || roomId || fileId || u64be(epoch) || u64be(i) || u8(final)`, where `final` is 1 on the last segment and 0 on every other. A host that truncates, reorders or splices ciphertext produces an authentication failure, never a shorter or rearranged file. The nonces are counters, so a `file_key` MUST NOT seal two different files; a fresh random `fileId` is what guarantees it. Each sealed segment is one transfer chunk of the blob (BlobManifest), so `segmentSize + 16` is the blob's `chunks.chunkSize`, and an empty file is one 16-byte chunk.\n\n**Reading.** A reader opens the record, derives or obtains the file key, and **MUST**, before trusting a byte:\n- check that the blob's `chunks.chunkSize` equals `segmentSize + 16` and that `chunks.chunkCount` equals `max(1, ceil(paddedLength / segmentSize))`, and refuse the file otherwise;\n- decrypt every segment in order, refusing the file on any authentication failure or on a final flag anywhere but the last segment;\n- check that the decrypted length equals the padded length, that every padding byte is zero, and, after removing the padding, that the plaintext matches `digest`.\n\nA reader **MUST** refuse a file that fails any check, and **MUST NOT** present it with a warning instead. A reader that streams **MUST NOT** treat the plaintext as received — save it under its final name, render it, or hand it to another component — until the digest has verified; it writes to a temporary destination and discards that destination on a mismatch.\n\n**An image's size and preview.** `width`, `height` and `preview` are OPTIONAL and advisory: they let a reader lay out an image, and show something, before it fetches and decrypts the blob. A reader that fetches the file checks them against the bytes — the decoded image's dimensions, and that the file is an image at all — and on a mismatch uses the bytes and discards them; it MUST NOT treat any of them as evidence about the file. On `attributed` and `private` rooms they are inside the sealed, signed body like the rest of the manifest, so the host learns nothing from them; on an `open` room they are in the clear, as everything there is, and a writer carries them only with `rooms/records/put/0.5` or later. A writer uses them only once the room's profile lists them in `recordMembers` (`RoomProfile`), as with the other members a reader that predates them refuses.",
|
|
628
679
|
"properties": {
|
|
629
680
|
"fileId": {
|
|
630
681
|
"type": "string",
|
|
@@ -678,6 +729,45 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
678
729
|
"type": "string",
|
|
679
730
|
"pattern": "^[A-Za-z0-9_-]{43}$",
|
|
680
731
|
"description": "The file key itself, 32 bytes base64url without padding: present on an `open` room only, where there is no storage key to derive it from. Minted by the uploader from a cryptographically secure random source for this one file and never reused. MUST be absent on `attributed` and `private` rooms, where the key is derived and never stored."
|
|
732
|
+
},
|
|
733
|
+
"width": {
|
|
734
|
+
"type": "integer",
|
|
735
|
+
"minimum": 1,
|
|
736
|
+
"maximum": 1048576,
|
|
737
|
+
"description": "The image's width in pixels, as the uploader read it. Advisory. A writer sets `width` and `height` together or neither; a reader ignores one without the other. A reader checks it against the decoded image."
|
|
738
|
+
},
|
|
739
|
+
"height": {
|
|
740
|
+
"type": "integer",
|
|
741
|
+
"minimum": 1,
|
|
742
|
+
"maximum": 1048576,
|
|
743
|
+
"description": "The image's height in pixels, as the uploader read it. Advisory. A writer sets `width` and `height` together or neither; a reader ignores one without the other. A reader checks it against the decoded image."
|
|
744
|
+
},
|
|
745
|
+
"preview": {
|
|
746
|
+
"type": "object",
|
|
747
|
+
"additionalProperties": false,
|
|
748
|
+
"required": [
|
|
749
|
+
"mediaType",
|
|
750
|
+
"data"
|
|
751
|
+
],
|
|
752
|
+
"description": "A small image standing in for the file until it is fetched: at most 8192 bytes before encoding, enough for a blurred thumbnail and small enough not to swell the record every listing reader opens. A reader renders it only as a raster image it decodes itself — never as SVG or any other type that can carry active content, never as a link, never fetching anything — and replaces it with the file once fetched. It is the uploader's rendering of the file, not a digest of it: a reader MUST NOT present it as the file's contents.",
|
|
753
|
+
"properties": {
|
|
754
|
+
"mediaType": {
|
|
755
|
+
"type": "string",
|
|
756
|
+
"enum": [
|
|
757
|
+
"image/jpeg",
|
|
758
|
+
"image/png",
|
|
759
|
+
"image/webp"
|
|
760
|
+
],
|
|
761
|
+
"description": "The preview's own media type. Raster types only."
|
|
762
|
+
},
|
|
763
|
+
"data": {
|
|
764
|
+
"type": "string",
|
|
765
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
766
|
+
"minLength": 1,
|
|
767
|
+
"maxLength": 10923,
|
|
768
|
+
"description": "The preview's bytes, base64url without padding: at most 8192 bytes decoded."
|
|
769
|
+
}
|
|
770
|
+
}
|
|
681
771
|
}
|
|
682
772
|
}
|
|
683
773
|
},
|