@openvtc/trust-tasks 0.26.16 → 0.26.17
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 +35 -0
- package/dist/_shared/components.d.ts +35 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/keys/act/0.5/payload.d.ts +546 -0
- package/dist/rooms/keys/act/0.5/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.5/payload.js +305 -0
- package/dist/rooms/keys/act/0.5/payload.js.map +1 -0
- package/dist/rooms/keys/key-package/0.2/payload.d.ts +304 -0
- package/dist/rooms/keys/key-package/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/key-package/0.2/payload.js +166 -0
- package/dist/rooms/keys/key-package/0.2/payload.js.map +1 -0
- 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/memberships/list/0.1/payload.d.ts +696 -0
- package/dist/vtc/rooms/memberships/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/memberships/list/0.1/payload.js +402 -0
- package/dist/vtc/rooms/memberships/list/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +35 -0
- package/src/index.ts +3 -0
- package/src/rooms/keys/act/0.5/payload.ts +380 -0
- package/src/rooms/keys/key-package/0.2/payload.ts +219 -0
- package/src/vtc/_shared/0.1/community-room.ts +1 -1
- package/src/vtc/rooms/memberships/list/0.1/payload.ts +445 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/key-package/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/key-package/0.2";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/key-package/0.2#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/key-package/0.2",
|
|
21
|
+
"title": "Rooms Keys Key-Package — payload",
|
|
22
|
+
"description": "An invited party asks the agent that will hold its room keys for the MLS KeyPackage the room's owner adds to the group: the one it already holds for this room, member and invitation, or a new one. The private half stays with the agent; only the KeyPackage travels.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"roomId",
|
|
27
|
+
"invitation"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"roomId": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 512,
|
|
34
|
+
"description": "The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny."
|
|
35
|
+
},
|
|
36
|
+
"invitation": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"maxLength": 65536,
|
|
40
|
+
"description": "The invitation credential (VIC) the room issued to the member, serialized per the governing profile. It authorizes the mint, names the member — its subject — and, with the room and the member, identifies the KeyPackage the recipient returns again while it is outstanding."
|
|
41
|
+
},
|
|
42
|
+
"ext": {
|
|
43
|
+
"$ref": "#/$defs/Ext",
|
|
44
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"$defs": {
|
|
48
|
+
"Response": {
|
|
49
|
+
"$anchor": "response",
|
|
50
|
+
"title": "Rooms Keys Key-Package — response payload",
|
|
51
|
+
"description": "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.2#response.",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": [
|
|
55
|
+
"keyPackage",
|
|
56
|
+
"expiresAt",
|
|
57
|
+
"alreadyMinted"
|
|
58
|
+
],
|
|
59
|
+
"properties": {
|
|
60
|
+
"keyPackage": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1,
|
|
63
|
+
"description": "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything."
|
|
64
|
+
},
|
|
65
|
+
"expiresAt": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "date-time",
|
|
68
|
+
"description": "When the recipient stops holding the KeyPackage's private half. The same instant on every answer that returns the same KeyPackage: returning it again does not extend it."
|
|
69
|
+
},
|
|
70
|
+
"alreadyMinted": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"description": "`true` when the recipient returned a KeyPackage it had already minted for this room, member and invitation and still holds; `false` when it minted this one for this request."
|
|
73
|
+
},
|
|
74
|
+
"ext": {
|
|
75
|
+
"$ref": "#/$defs/Ext"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"Ext": {
|
|
80
|
+
"title": "Ext",
|
|
81
|
+
"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.",
|
|
82
|
+
"type": "object",
|
|
83
|
+
"minProperties": 1,
|
|
84
|
+
"additionalProperties": true,
|
|
85
|
+
"propertyNames": {
|
|
86
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
92
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
93
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
94
|
+
"$ref": "#/$defs/Response",
|
|
95
|
+
"$defs": {
|
|
96
|
+
"Response": {
|
|
97
|
+
"$anchor": "response",
|
|
98
|
+
"title": "Rooms Keys Key-Package — response payload",
|
|
99
|
+
"description": "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.2#response.",
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": [
|
|
103
|
+
"keyPackage",
|
|
104
|
+
"expiresAt",
|
|
105
|
+
"alreadyMinted"
|
|
106
|
+
],
|
|
107
|
+
"properties": {
|
|
108
|
+
"keyPackage": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1,
|
|
111
|
+
"description": "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything."
|
|
112
|
+
},
|
|
113
|
+
"expiresAt": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"format": "date-time",
|
|
116
|
+
"description": "When the recipient stops holding the KeyPackage's private half. The same instant on every answer that returns the same KeyPackage: returning it again does not extend it."
|
|
117
|
+
},
|
|
118
|
+
"alreadyMinted": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"description": "`true` when the recipient returned a KeyPackage it had already minted for this room, member and invitation and still holds; `false` when it minted this one for this request."
|
|
121
|
+
},
|
|
122
|
+
"ext": {
|
|
123
|
+
"$ref": "#/$defs/Ext"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"Ext": {
|
|
128
|
+
"title": "Ext",
|
|
129
|
+
"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.",
|
|
130
|
+
"type": "object",
|
|
131
|
+
"minProperties": 1,
|
|
132
|
+
"additionalProperties": true,
|
|
133
|
+
"propertyNames": {
|
|
134
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
141
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
142
|
+
* per-specification and cannot be derived from the document alone, and
|
|
143
|
+
* item 2 needs the schema this carries.
|
|
144
|
+
*/
|
|
145
|
+
export const SPEC = {
|
|
146
|
+
typeUri: TYPE_URI,
|
|
147
|
+
isBearer: false,
|
|
148
|
+
isProofRequired: true,
|
|
149
|
+
isRecipientRequired: true,
|
|
150
|
+
isIssuedAtRequired: true,
|
|
151
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
155
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
156
|
+
* parties (§7.3 item 5).
|
|
157
|
+
*/
|
|
158
|
+
export const RESPONSE_SPEC = {
|
|
159
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
160
|
+
isBearer: false,
|
|
161
|
+
isProofRequired: true,
|
|
162
|
+
isRecipientRequired: true,
|
|
163
|
+
isIssuedAtRequired: true,
|
|
164
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/key-package/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,wDAAiE,CAAC;AAK1F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,iEAA0E,CAAC;AAK5G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,wDAAwD;IAC/D,OAAO,EAAE,kCAAkC;IAC3C,aAAa,EAAE,0QAA0Q;IACzR,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,YAAY;KACb;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,GAAG;YAChB,aAAa,EAAE,kNAAkN;SAClO;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,iRAAiR;SACjS;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;YACrB,aAAa,EAAE,yDAAyD;SACzE;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,2CAA2C;YACpD,aAAa,EAAE,mHAAmH;YAClI,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,YAAY;gBACZ,WAAW;gBACX,eAAe;aAChB;YACD,YAAY,EAAE;gBACZ,YAAY,EAAE;oBACZ,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;oBACd,aAAa,EAAE,iJAAiJ;iBACjK;gBACD,WAAW,EAAE;oBACX,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,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"}
|
|
@@ -12,5 +12,5 @@ export interface VTCSharedCommunityOwnedRoomDefinitions {
|
|
|
12
12
|
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
13
13
|
* See "../../../_shared/components.js".
|
|
14
14
|
*/
|
|
15
|
-
export type { CommunityRoom, CommunityRoomV2, MemberAction, MemberActions, MemberState, Offer, OfferCredentials, OfferV2, Reason, RoomDescription, RoomLabel, RoomMember, RoomTag, RoomTags } from "../../../_shared/components.js";
|
|
15
|
+
export type { CommunityRoom, CommunityRoomV2, MemberAction, MemberActions, MemberState, Offer, OfferCredentials, OfferV2, Reason, RoomDescription, RoomLabel, RoomMember, RoomMembership, RoomTag, RoomTags } from "../../../_shared/components.js";
|
|
16
16
|
//# sourceMappingURL=community-room.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"community-room.d.ts","sourceRoot":"","sources":["../../../../src/vtc/_shared/0.1/community-room.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACrD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED;;;GAGG;AACH,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"community-room.d.ts","sourceRoot":"","sources":["../../../../src/vtc/_shared/0.1/community-room.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACrD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED;;;GAGG;AACH,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC"}
|