@openvtc/trust-tasks 0.17.6 → 0.17.8
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 +158 -0
- package/dist/_shared/components.d.ts +4 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -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/create/0.1/payload.d.ts +42 -2
- package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/create/0.1/payload.js +24 -0
- package/dist/rooms/create/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/backfill/0.1/payload.d.ts +336 -0
- package/dist/rooms/keys/backfill/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/backfill/0.1/payload.js +177 -0
- package/dist/rooms/keys/backfill/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/chain/0.1/payload.d.ts +382 -0
- package/dist/rooms/keys/chain/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/chain/0.1/payload.js +213 -0
- package/dist/rooms/keys/chain/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts +314 -0
- package/dist/rooms/keys/list/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/list/0.1/payload.js +175 -0
- package/dist/rooms/keys/list/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts +352 -0
- package/dist/rooms/keys/seal/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/seal/0.1/payload.js +199 -0
- package/dist/rooms/keys/seal/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/invite/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/invite/0.1/payload.js +158 -0
- package/dist/rooms/owner/invite/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts +315 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js +173 -0
- package/dist/rooms/owner/issue-authority/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts +291 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js +158 -0
- package/dist/rooms/owner/issue-membership/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/register/0.1/payload.d.ts +382 -0
- package/dist/rooms/owner/register/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/register/0.1/payload.js +215 -0
- package/dist/rooms/owner/register/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +4 -0
- package/src/index.ts +8 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/create/0.1/payload.ts +30 -2
- package/src/rooms/keys/backfill/0.1/payload.ts +236 -0
- package/src/rooms/keys/chain/0.1/payload.ts +262 -0
- package/src/rooms/keys/list/0.1/payload.ts +222 -0
- package/src/rooms/keys/seal/0.1/payload.ts +246 -0
- package/src/rooms/owner/invite/0.1/payload.ts +212 -0
- package/src/rooms/owner/issue-authority/0.1/payload.ts +233 -0
- package/src/rooms/owner/issue-membership/0.1/payload.ts +212 -0
- package/src/rooms/owner/register/0.1/payload.ts +278 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/list/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/list/0.1#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/rooms/keys/list/0.1",
|
|
21
|
+
"title": "Rooms Keys List — payload",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"properties": {
|
|
25
|
+
"ext": {
|
|
26
|
+
"$ref": "#/$defs/Ext",
|
|
27
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"$defs": {
|
|
31
|
+
"Response": {
|
|
32
|
+
"$anchor": "response",
|
|
33
|
+
"title": "Rooms Keys List — response payload",
|
|
34
|
+
"description": "Success response to rooms/keys/list. Type https://trusttasks.org/spec/rooms/keys/list/0.1#response. The rooms this key holder can open, which is a different set from the rooms its principal is a member of: membership is a credential the room issued, and this is key custody. A room whose group state was never delivered is absent here and the principal may still hold a perfectly good VMC for it.",
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": [
|
|
38
|
+
"rooms"
|
|
39
|
+
],
|
|
40
|
+
"properties": {
|
|
41
|
+
"rooms": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"description": "One entry per room, in no guaranteed order.",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": [
|
|
48
|
+
"roomId",
|
|
49
|
+
"epoch",
|
|
50
|
+
"earliestReadableEpoch"
|
|
51
|
+
],
|
|
52
|
+
"properties": {
|
|
53
|
+
"roomId": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "The room's identifier."
|
|
56
|
+
},
|
|
57
|
+
"epoch": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 1,
|
|
60
|
+
"description": "The epoch this key holder is at. Behind the room's own epoch means a commit has not been delivered, and records sealed since will not open."
|
|
61
|
+
},
|
|
62
|
+
"earliestReadableEpoch": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 1,
|
|
65
|
+
"description": "The earliest epoch this key holder can derive a key for, walking the epoch key chain it holds. Equal to `epoch` means it reads only from where it joined; `1` means the room's whole retained history. Anything between is a chain that has been delivered in part, or one deliberately severed below that point."
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"ext": {
|
|
71
|
+
"$ref": "#/$defs/Ext"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"Ext": {
|
|
76
|
+
"title": "Ext",
|
|
77
|
+
"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.",
|
|
78
|
+
"type": "object",
|
|
79
|
+
"minProperties": 1,
|
|
80
|
+
"additionalProperties": true,
|
|
81
|
+
"propertyNames": {
|
|
82
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
88
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
89
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
90
|
+
"$ref": "#/$defs/Response",
|
|
91
|
+
"$defs": {
|
|
92
|
+
"Response": {
|
|
93
|
+
"$anchor": "response",
|
|
94
|
+
"title": "Rooms Keys List — response payload",
|
|
95
|
+
"description": "Success response to rooms/keys/list. Type https://trusttasks.org/spec/rooms/keys/list/0.1#response. The rooms this key holder can open, which is a different set from the rooms its principal is a member of: membership is a credential the room issued, and this is key custody. A room whose group state was never delivered is absent here and the principal may still hold a perfectly good VMC for it.",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"required": [
|
|
99
|
+
"rooms"
|
|
100
|
+
],
|
|
101
|
+
"properties": {
|
|
102
|
+
"rooms": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"description": "One entry per room, in no guaranteed order.",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": [
|
|
109
|
+
"roomId",
|
|
110
|
+
"epoch",
|
|
111
|
+
"earliestReadableEpoch"
|
|
112
|
+
],
|
|
113
|
+
"properties": {
|
|
114
|
+
"roomId": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "The room's identifier."
|
|
117
|
+
},
|
|
118
|
+
"epoch": {
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"minimum": 1,
|
|
121
|
+
"description": "The epoch this key holder is at. Behind the room's own epoch means a commit has not been delivered, and records sealed since will not open."
|
|
122
|
+
},
|
|
123
|
+
"earliestReadableEpoch": {
|
|
124
|
+
"type": "integer",
|
|
125
|
+
"minimum": 1,
|
|
126
|
+
"description": "The earliest epoch this key holder can derive a key for, walking the epoch key chain it holds. Equal to `epoch` means it reads only from where it joined; `1` means the room's whole retained history. Anything between is a chain that has been delivered in part, or one deliberately severed below that point."
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"ext": {
|
|
132
|
+
"$ref": "#/$defs/Ext"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"Ext": {
|
|
137
|
+
"title": "Ext",
|
|
138
|
+
"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.",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"minProperties": 1,
|
|
141
|
+
"additionalProperties": true,
|
|
142
|
+
"propertyNames": {
|
|
143
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
150
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
151
|
+
* per-specification and cannot be derived from the document alone, and
|
|
152
|
+
* item 2 needs the schema this carries.
|
|
153
|
+
*/
|
|
154
|
+
export const SPEC = {
|
|
155
|
+
typeUri: TYPE_URI,
|
|
156
|
+
isBearer: false,
|
|
157
|
+
isProofRequired: true,
|
|
158
|
+
isRecipientRequired: true,
|
|
159
|
+
isIssuedAtRequired: true,
|
|
160
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
164
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
165
|
+
* parties (§7.3 item 5).
|
|
166
|
+
*/
|
|
167
|
+
export const RESPONSE_SPEC = {
|
|
168
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
169
|
+
isBearer: false,
|
|
170
|
+
isProofRequired: true,
|
|
171
|
+
isRecipientRequired: true,
|
|
172
|
+
isIssuedAtRequired: true,
|
|
173
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../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,KAAK;YACd,aAAa,EAAE,uKAAuK;YACtL,MAAM,EAAE,QAAQ;YAChB,eAAe,EAAE,CAAC;YAClB,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE;gBACf,SAAS,EAAE,mCAAmC;aAC/C;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/seal/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext, SealedRecord } from "../../../../_shared/components.js";
|
|
6
|
+
export interface RoomsKeysSealPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The room to seal for. The recipient MUST hold group state for it.
|
|
9
|
+
*/
|
|
10
|
+
roomId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The record key this will be stored under. Bound into the associated data, so a record sealed for one key does not open under another. On a sealed tier keys MUST be opaque — a descriptive key defeats the encryption beside it, and structured naming belongs inside the sealed body.
|
|
13
|
+
*/
|
|
14
|
+
key: string;
|
|
15
|
+
/**
|
|
16
|
+
* The version the writer INTENDS the record to take, bound into the associated data before the host assigns it. A caller that lets the host assign a different one will find the record does not open, which is the correct failure: accepting whatever came back would mean the binding commits to nothing. The shape that works is a create-only write (`expectedVersion: 0`) or a read of the current version before a rewrite.
|
|
17
|
+
*/
|
|
18
|
+
version: number;
|
|
19
|
+
/**
|
|
20
|
+
* The record body to seal, base64url. Sealed whole rather than field by field: splitting it would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.
|
|
21
|
+
*/
|
|
22
|
+
plaintext: string;
|
|
23
|
+
/**
|
|
24
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
25
|
+
*/
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Success response to rooms/keys/seal. Type https://trusttasks.org/spec/rooms/keys/seal/0.1#response. The sealed record, ready to hand to a host with rooms/records/put.
|
|
30
|
+
*/
|
|
31
|
+
export interface RoomsKeysSealResponsePayload {
|
|
32
|
+
sealed: SealedRecord;
|
|
33
|
+
ext?: Ext;
|
|
34
|
+
}
|
|
35
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
36
|
+
export type { Ext, SealedRecord };
|
|
37
|
+
/** Trust Task type URI. */
|
|
38
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/seal/0.1";
|
|
39
|
+
/** Stable alias for this specification's request payload shape. */
|
|
40
|
+
export type Payload = RoomsKeysSealPayload;
|
|
41
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
42
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/seal/0.1#response";
|
|
43
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
44
|
+
export type Response = RoomsKeysSealResponsePayload;
|
|
45
|
+
/**
|
|
46
|
+
* This specification's payload schema, as a value.
|
|
47
|
+
*
|
|
48
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
49
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
50
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
51
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
52
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
53
|
+
*/
|
|
54
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
55
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
56
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/seal/0.1";
|
|
57
|
+
readonly title: "Rooms Keys Seal — payload";
|
|
58
|
+
readonly type: "object";
|
|
59
|
+
readonly additionalProperties: false;
|
|
60
|
+
readonly required: readonly ["roomId", "key", "version", "plaintext"];
|
|
61
|
+
readonly properties: {
|
|
62
|
+
readonly roomId: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
readonly description: "The room to seal for. The recipient MUST hold group state for it.";
|
|
65
|
+
};
|
|
66
|
+
readonly key: {
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
readonly maxLength: 512;
|
|
69
|
+
readonly description: "The record key this will be stored under. Bound into the associated data, so a record sealed for one key does not open under another. On a sealed tier keys MUST be opaque — a descriptive key defeats the encryption beside it, and structured naming belongs inside the sealed body.";
|
|
70
|
+
};
|
|
71
|
+
readonly version: {
|
|
72
|
+
readonly type: "integer";
|
|
73
|
+
readonly minimum: 0;
|
|
74
|
+
readonly description: "The version the writer INTENDS the record to take, bound into the associated data before the host assigns it. A caller that lets the host assign a different one will find the record does not open, which is the correct failure: accepting whatever came back would mean the binding commits to nothing. The shape that works is a create-only write (`expectedVersion: 0`) or a read of the current version before a rewrite.";
|
|
75
|
+
};
|
|
76
|
+
readonly plaintext: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly description: "The record body to seal, base64url. Sealed whole rather than field by field: splitting it would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
79
|
+
};
|
|
80
|
+
readonly ext: {
|
|
81
|
+
readonly $ref: "#/$defs/Ext";
|
|
82
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly $defs: {
|
|
86
|
+
readonly Response: {
|
|
87
|
+
readonly $anchor: "response";
|
|
88
|
+
readonly title: "Rooms Keys Seal — response payload";
|
|
89
|
+
readonly description: "Success response to rooms/keys/seal. Type https://trusttasks.org/spec/rooms/keys/seal/0.1#response. The sealed record, ready to hand to a host with rooms/records/put.";
|
|
90
|
+
readonly type: "object";
|
|
91
|
+
readonly additionalProperties: false;
|
|
92
|
+
readonly required: readonly ["sealed"];
|
|
93
|
+
readonly properties: {
|
|
94
|
+
readonly sealed: {
|
|
95
|
+
readonly $ref: "#/$defs/SealedRecord";
|
|
96
|
+
};
|
|
97
|
+
readonly ext: {
|
|
98
|
+
readonly $ref: "#/$defs/Ext";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly Ext: {
|
|
103
|
+
readonly title: "Ext";
|
|
104
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
105
|
+
readonly type: "object";
|
|
106
|
+
readonly minProperties: 1;
|
|
107
|
+
readonly additionalProperties: true;
|
|
108
|
+
readonly propertyNames: {
|
|
109
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
readonly SealedRecord: {
|
|
113
|
+
readonly title: "SealedRecord";
|
|
114
|
+
readonly type: "object";
|
|
115
|
+
readonly additionalProperties: false;
|
|
116
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
117
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
118
|
+
readonly properties: {
|
|
119
|
+
readonly ciphertext: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it.";
|
|
122
|
+
};
|
|
123
|
+
readonly nonce: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly description: "AEAD nonce, base64url.";
|
|
126
|
+
};
|
|
127
|
+
readonly epoch: {
|
|
128
|
+
readonly type: "integer";
|
|
129
|
+
readonly minimum: 1;
|
|
130
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
137
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
138
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
139
|
+
readonly $ref: "#/$defs/Response";
|
|
140
|
+
readonly $defs: {
|
|
141
|
+
readonly Response: {
|
|
142
|
+
readonly $anchor: "response";
|
|
143
|
+
readonly title: "Rooms Keys Seal — response payload";
|
|
144
|
+
readonly description: "Success response to rooms/keys/seal. Type https://trusttasks.org/spec/rooms/keys/seal/0.1#response. The sealed record, ready to hand to a host with rooms/records/put.";
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly additionalProperties: false;
|
|
147
|
+
readonly required: readonly ["sealed"];
|
|
148
|
+
readonly properties: {
|
|
149
|
+
readonly sealed: {
|
|
150
|
+
readonly $ref: "#/$defs/SealedRecord";
|
|
151
|
+
};
|
|
152
|
+
readonly ext: {
|
|
153
|
+
readonly $ref: "#/$defs/Ext";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
readonly Ext: {
|
|
158
|
+
readonly title: "Ext";
|
|
159
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
160
|
+
readonly type: "object";
|
|
161
|
+
readonly minProperties: 1;
|
|
162
|
+
readonly additionalProperties: true;
|
|
163
|
+
readonly propertyNames: {
|
|
164
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly SealedRecord: {
|
|
168
|
+
readonly title: "SealedRecord";
|
|
169
|
+
readonly type: "object";
|
|
170
|
+
readonly additionalProperties: false;
|
|
171
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
172
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
173
|
+
readonly properties: {
|
|
174
|
+
readonly ciphertext: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it.";
|
|
177
|
+
};
|
|
178
|
+
readonly nonce: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
readonly description: "AEAD nonce, base64url.";
|
|
181
|
+
};
|
|
182
|
+
readonly epoch: {
|
|
183
|
+
readonly type: "integer";
|
|
184
|
+
readonly minimum: 1;
|
|
185
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
193
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
194
|
+
* per-specification and cannot be derived from the document alone, and
|
|
195
|
+
* item 2 needs the schema this carries.
|
|
196
|
+
*/
|
|
197
|
+
export declare const SPEC: {
|
|
198
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/seal/0.1";
|
|
199
|
+
readonly isBearer: false;
|
|
200
|
+
readonly isProofRequired: true;
|
|
201
|
+
readonly isRecipientRequired: true;
|
|
202
|
+
readonly isIssuedAtRequired: true;
|
|
203
|
+
readonly payloadSchema: {
|
|
204
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
205
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/seal/0.1";
|
|
206
|
+
readonly title: "Rooms Keys Seal — payload";
|
|
207
|
+
readonly type: "object";
|
|
208
|
+
readonly additionalProperties: false;
|
|
209
|
+
readonly required: readonly ["roomId", "key", "version", "plaintext"];
|
|
210
|
+
readonly properties: {
|
|
211
|
+
readonly roomId: {
|
|
212
|
+
readonly type: "string";
|
|
213
|
+
readonly description: "The room to seal for. The recipient MUST hold group state for it.";
|
|
214
|
+
};
|
|
215
|
+
readonly key: {
|
|
216
|
+
readonly type: "string";
|
|
217
|
+
readonly maxLength: 512;
|
|
218
|
+
readonly description: "The record key this will be stored under. Bound into the associated data, so a record sealed for one key does not open under another. On a sealed tier keys MUST be opaque — a descriptive key defeats the encryption beside it, and structured naming belongs inside the sealed body.";
|
|
219
|
+
};
|
|
220
|
+
readonly version: {
|
|
221
|
+
readonly type: "integer";
|
|
222
|
+
readonly minimum: 0;
|
|
223
|
+
readonly description: "The version the writer INTENDS the record to take, bound into the associated data before the host assigns it. A caller that lets the host assign a different one will find the record does not open, which is the correct failure: accepting whatever came back would mean the binding commits to nothing. The shape that works is a create-only write (`expectedVersion: 0`) or a read of the current version before a rewrite.";
|
|
224
|
+
};
|
|
225
|
+
readonly plaintext: {
|
|
226
|
+
readonly type: "string";
|
|
227
|
+
readonly description: "The record body to seal, base64url. Sealed whole rather than field by field: splitting it would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
228
|
+
};
|
|
229
|
+
readonly ext: {
|
|
230
|
+
readonly $ref: "#/$defs/Ext";
|
|
231
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
readonly $defs: {
|
|
235
|
+
readonly Response: {
|
|
236
|
+
readonly $anchor: "response";
|
|
237
|
+
readonly title: "Rooms Keys Seal — response payload";
|
|
238
|
+
readonly description: "Success response to rooms/keys/seal. Type https://trusttasks.org/spec/rooms/keys/seal/0.1#response. The sealed record, ready to hand to a host with rooms/records/put.";
|
|
239
|
+
readonly type: "object";
|
|
240
|
+
readonly additionalProperties: false;
|
|
241
|
+
readonly required: readonly ["sealed"];
|
|
242
|
+
readonly properties: {
|
|
243
|
+
readonly sealed: {
|
|
244
|
+
readonly $ref: "#/$defs/SealedRecord";
|
|
245
|
+
};
|
|
246
|
+
readonly ext: {
|
|
247
|
+
readonly $ref: "#/$defs/Ext";
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
readonly Ext: {
|
|
252
|
+
readonly title: "Ext";
|
|
253
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
254
|
+
readonly type: "object";
|
|
255
|
+
readonly minProperties: 1;
|
|
256
|
+
readonly additionalProperties: true;
|
|
257
|
+
readonly propertyNames: {
|
|
258
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
readonly SealedRecord: {
|
|
262
|
+
readonly title: "SealedRecord";
|
|
263
|
+
readonly type: "object";
|
|
264
|
+
readonly additionalProperties: false;
|
|
265
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
266
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
267
|
+
readonly properties: {
|
|
268
|
+
readonly ciphertext: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it.";
|
|
271
|
+
};
|
|
272
|
+
readonly nonce: {
|
|
273
|
+
readonly type: "string";
|
|
274
|
+
readonly description: "AEAD nonce, base64url.";
|
|
275
|
+
};
|
|
276
|
+
readonly epoch: {
|
|
277
|
+
readonly type: "integer";
|
|
278
|
+
readonly minimum: 1;
|
|
279
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
288
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
289
|
+
* parties (§7.3 item 5).
|
|
290
|
+
*/
|
|
291
|
+
export declare const RESPONSE_SPEC: {
|
|
292
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/seal/0.1#response";
|
|
293
|
+
readonly isBearer: false;
|
|
294
|
+
readonly isProofRequired: true;
|
|
295
|
+
readonly isRecipientRequired: true;
|
|
296
|
+
readonly isIssuedAtRequired: true;
|
|
297
|
+
readonly payloadSchema: {
|
|
298
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
299
|
+
readonly $ref: "#/$defs/Response";
|
|
300
|
+
readonly $defs: {
|
|
301
|
+
readonly Response: {
|
|
302
|
+
readonly $anchor: "response";
|
|
303
|
+
readonly title: "Rooms Keys Seal — response payload";
|
|
304
|
+
readonly description: "Success response to rooms/keys/seal. Type https://trusttasks.org/spec/rooms/keys/seal/0.1#response. The sealed record, ready to hand to a host with rooms/records/put.";
|
|
305
|
+
readonly type: "object";
|
|
306
|
+
readonly additionalProperties: false;
|
|
307
|
+
readonly required: readonly ["sealed"];
|
|
308
|
+
readonly properties: {
|
|
309
|
+
readonly sealed: {
|
|
310
|
+
readonly $ref: "#/$defs/SealedRecord";
|
|
311
|
+
};
|
|
312
|
+
readonly ext: {
|
|
313
|
+
readonly $ref: "#/$defs/Ext";
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly Ext: {
|
|
318
|
+
readonly title: "Ext";
|
|
319
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
320
|
+
readonly type: "object";
|
|
321
|
+
readonly minProperties: 1;
|
|
322
|
+
readonly additionalProperties: true;
|
|
323
|
+
readonly propertyNames: {
|
|
324
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly SealedRecord: {
|
|
328
|
+
readonly title: "SealedRecord";
|
|
329
|
+
readonly type: "object";
|
|
330
|
+
readonly additionalProperties: false;
|
|
331
|
+
readonly required: readonly ["ciphertext", "nonce", "epoch"];
|
|
332
|
+
readonly description: "A record as a host stores it on an `attributed` or `private` room. Title, description, body, author and tags are sealed together in one blob rather than separately: splitting them would let a host learn the shape of the material from ciphertext lengths, for no benefit, since a reader decrypts the whole record either way.";
|
|
333
|
+
readonly properties: {
|
|
334
|
+
readonly ciphertext: {
|
|
335
|
+
readonly type: "string";
|
|
336
|
+
readonly description: "The sealed record, base64url. Bound by AEAD associated data to `roomId`, `key`, `version` and `epoch`, so a host that relocates it to another key, version, epoch or room produces a mismatch and the open fails. The record cannot be moved undetected even though the host holds every byte of it.";
|
|
337
|
+
};
|
|
338
|
+
readonly nonce: {
|
|
339
|
+
readonly type: "string";
|
|
340
|
+
readonly description: "AEAD nonce, base64url.";
|
|
341
|
+
};
|
|
342
|
+
readonly epoch: {
|
|
343
|
+
readonly type: "integer";
|
|
344
|
+
readonly minimum: 1;
|
|
345
|
+
readonly description: "The key epoch this record was sealed under. Cleartext because the host must serve the right ciphertext, and bound into the associated data so that relabelling it fails authentication rather than causing a reader to try the wrong key.";
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/seal/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAG3E,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAElC,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,iDAA0D,CAAC;AAEnF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC;AAE3C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,0DAAmE,CAAC;AAErG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,4BAA4B,CAAC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