@openvtc/trust-tasks 0.28.22 → 0.28.24
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 +87 -0
- package/dist/_shared/components.d.ts +520 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -1
- package/dist/messaging/mux/_shared/0.1/mux.d.ts +16 -0
- package/dist/messaging/mux/_shared/0.1/mux.d.ts.map +1 -0
- package/dist/messaging/mux/_shared/0.1/mux.js +6 -0
- package/dist/messaging/mux/_shared/0.1/mux.js.map +1 -0
- package/dist/messaging/mux/attach/0.1/payload.d.ts +996 -0
- package/dist/messaging/mux/attach/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/attach/0.1/payload.js +594 -0
- package/dist/messaging/mux/attach/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/detach/0.1/payload.d.ts +398 -0
- package/dist/messaging/mux/detach/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/detach/0.1/payload.js +215 -0
- package/dist/messaging/mux/detach/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/event/0.1/payload.d.ts +513 -0
- package/dist/messaging/mux/event/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/event/0.1/payload.js +260 -0
- package/dist/messaging/mux/event/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/grant/0.1/payload.d.ts +1008 -0
- package/dist/messaging/mux/grant/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/grant/0.1/payload.js +606 -0
- package/dist/messaging/mux/grant/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/list/0.1/payload.d.ts +1241 -0
- package/dist/messaging/mux/list/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/list/0.1/payload.js +715 -0
- package/dist/messaging/mux/list/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/notice/0.1/payload.d.ts +489 -0
- package/dist/messaging/mux/notice/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/notice/0.1/payload.js +249 -0
- package/dist/messaging/mux/notice/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/revoke/0.1/payload.d.ts +585 -0
- package/dist/messaging/mux/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/revoke/0.1/payload.js +311 -0
- package/dist/messaging/mux/revoke/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/revoke-all/0.1/payload.d.ts +682 -0
- package/dist/messaging/mux/revoke-all/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/revoke-all/0.1/payload.js +397 -0
- package/dist/messaging/mux/revoke-all/0.1/payload.js.map +1 -0
- package/dist/messaging/mux/update/0.1/payload.d.ts +995 -0
- package/dist/messaging/mux/update/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/mux/update/0.1/payload.js +586 -0
- package/dist/messaging/mux/update/0.1/payload.js.map +1 -0
- package/dist/vta/_shared/0.1/memory-record.d.ts +22 -0
- package/dist/vta/_shared/0.1/memory-record.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/memory-record.js +6 -0
- package/dist/vta/_shared/0.1/memory-record.js.map +1 -0
- package/dist/vta/memory/delete/0.1/payload.d.ts +13 -2
- package/dist/vta/memory/delete/0.1/payload.d.ts.map +1 -1
- package/dist/vta/memory/delete/0.1/payload.js +1 -1
- package/dist/vta/memory/delete/0.1/payload.js.map +1 -1
- package/dist/vta/memory/delete/0.2/payload.d.ts +415 -0
- package/dist/vta/memory/delete/0.2/payload.d.ts.map +1 -0
- package/dist/vta/memory/delete/0.2/payload.js +224 -0
- package/dist/vta/memory/delete/0.2/payload.js.map +1 -0
- package/dist/vta/memory/get/0.1/payload.d.ts +646 -0
- package/dist/vta/memory/get/0.1/payload.d.ts.map +1 -0
- package/dist/vta/memory/get/0.1/payload.js +349 -0
- package/dist/vta/memory/get/0.1/payload.js.map +1 -0
- package/dist/vta/memory/list/0.1/payload.d.ts +13 -2
- package/dist/vta/memory/list/0.1/payload.d.ts.map +1 -1
- package/dist/vta/memory/list/0.1/payload.js +1 -1
- package/dist/vta/memory/list/0.1/payload.js.map +1 -1
- package/dist/vta/memory/list/0.2/payload.d.ts +693 -0
- package/dist/vta/memory/list/0.2/payload.d.ts.map +1 -0
- package/dist/vta/memory/list/0.2/payload.js +363 -0
- package/dist/vta/memory/list/0.2/payload.js.map +1 -0
- package/dist/vta/memory/put/0.1/payload.d.ts +13 -2
- package/dist/vta/memory/put/0.1/payload.d.ts.map +1 -1
- package/dist/vta/memory/put/0.1/payload.js +1 -1
- package/dist/vta/memory/put/0.1/payload.js.map +1 -1
- package/dist/vta/memory/put/0.2/payload.d.ts +490 -0
- package/dist/vta/memory/put/0.2/payload.d.ts.map +1 -0
- package/dist/vta/memory/put/0.2/payload.js +264 -0
- package/dist/vta/memory/put/0.2/payload.js.map +1 -0
- package/dist/vtc/members/rotate/0.1/payload.d.ts +12 -5
- package/dist/vtc/members/rotate/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/members/rotate/0.1/payload.js +8 -2
- package/dist/vtc/members/rotate/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +581 -0
- package/src/index.ts +45 -0
- package/src/messaging/mux/_shared/0.1/mux.ts +17 -0
- package/src/messaging/mux/attach/0.1/payload.ts +682 -0
- package/src/messaging/mux/detach/0.1/payload.ts +278 -0
- package/src/messaging/mux/event/0.1/payload.ts +371 -0
- package/src/messaging/mux/grant/0.1/payload.ts +710 -0
- package/src/messaging/mux/list/0.1/payload.ts +793 -0
- package/src/messaging/mux/notice/0.1/payload.ts +362 -0
- package/src/messaging/mux/revoke/0.1/payload.ts +389 -0
- package/src/messaging/mux/revoke-all/0.1/payload.ts +452 -0
- package/src/messaging/mux/update/0.1/payload.ts +644 -0
- package/src/vta/_shared/0.1/memory-record.ts +23 -0
- package/src/vta/memory/delete/0.1/payload.ts +14 -3
- package/src/vta/memory/delete/0.2/payload.ts +288 -0
- package/src/vta/memory/get/0.1/payload.ts +414 -0
- package/src/vta/memory/list/0.1/payload.ts +14 -3
- package/src/vta/memory/list/0.2/payload.ts +445 -0
- package/src/vta/memory/put/0.1/payload.ts +14 -3
- package/src/vta/memory/put/0.2/payload.ts +333 -0
- package/src/vtc/members/rotate/0.1/payload.ts +12 -3
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/messaging/mux/event/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext, GrantId, MemberChangeReason, MuxDid, MuxNonce, MuxScope, MuxScopeValue, SessionId_MessagingMuxV0_1 as SessionId } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* A live, unstored event from a mediator to the principal of one mux connection: the connection is ready (with its nonce and limits), members attached or detached, or an inbound frame for a member refused. The members present depend on `event`; see the specification. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface MessagingMuxEventPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Which event this is. Each kind carries the members the specification lists for it, and no others.
|
|
12
|
+
*/
|
|
13
|
+
event: "ready" | "attached" | "detached" | "refused";
|
|
14
|
+
/**
|
|
15
|
+
* `ready` only, REQUIRED: this connection's identifier, which attach statements sign over.
|
|
16
|
+
*/
|
|
17
|
+
sessionId?: SessionId;
|
|
18
|
+
/**
|
|
19
|
+
* `ready` only, REQUIRED: this connection's nonce, which attach statements sign over.
|
|
20
|
+
*/
|
|
21
|
+
muxNonce?: MuxNonce;
|
|
22
|
+
/**
|
|
23
|
+
* `ready` only, REQUIRED: the most members this connection may carry.
|
|
24
|
+
*/
|
|
25
|
+
maxDidsPerConnection?: number;
|
|
26
|
+
/**
|
|
27
|
+
* `ready` only, REQUIRED: the longest `exp − iat` a grant may have.
|
|
28
|
+
*/
|
|
29
|
+
maxGrantLifetimeSeconds?: number;
|
|
30
|
+
/**
|
|
31
|
+
* `ready` only, OPTIONAL: the longest an attach statement's `exp` may lie after its `iat`.
|
|
32
|
+
*/
|
|
33
|
+
maxAttachLifetimeSeconds?: number;
|
|
34
|
+
/**
|
|
35
|
+
* `ready` only, OPTIONAL: when the principal's authentication of this connection expires and the connection closes. An attach statement's `exp` may not be later.
|
|
36
|
+
*/
|
|
37
|
+
sessionExpiresAt?: string;
|
|
38
|
+
/**
|
|
39
|
+
* `ready` only, REQUIRED: how many messaging/mux/notice documents wait in the principal's inbox. Non-zero means the principal must drain them before it trusts its member set.
|
|
40
|
+
*/
|
|
41
|
+
pendingNotices?: number;
|
|
42
|
+
/**
|
|
43
|
+
* `attached` and `detached` only, REQUIRED: the members that changed, batched. A larger change is split across several events.
|
|
44
|
+
*
|
|
45
|
+
* @minItems 1
|
|
46
|
+
* @maxItems 1000
|
|
47
|
+
*/
|
|
48
|
+
dids?: [MemberChange, ...MemberChange[]];
|
|
49
|
+
/**
|
|
50
|
+
* `refused` only, REQUIRED: the lowercase hex SHA-256 of the refused frame's exact bytes — the identifier `tsp-ack` already uses.
|
|
51
|
+
*/
|
|
52
|
+
frameId?: string;
|
|
53
|
+
/**
|
|
54
|
+
* `refused` only, OPTIONAL: the frame's sender, when the mediator could read it.
|
|
55
|
+
*/
|
|
56
|
+
sender?: MuxDid;
|
|
57
|
+
/**
|
|
58
|
+
* `refused` only, OPTIONAL: the member DID or principal the frame was addressed to, when the mediator could read it.
|
|
59
|
+
*/
|
|
60
|
+
receiver?: MuxDid;
|
|
61
|
+
/**
|
|
62
|
+
* `refused` only, REQUIRED: the mediator's stable refusal code, the same code a traffic-monitor `refused` event reports.
|
|
63
|
+
*/
|
|
64
|
+
code?: string;
|
|
65
|
+
/**
|
|
66
|
+
* `refused` only, OPTIONAL: a short human-readable explanation. Never message content.
|
|
67
|
+
*/
|
|
68
|
+
reason?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
71
|
+
*/
|
|
72
|
+
ext?: Ext;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* One member's change in an `attached` or `detached` event.
|
|
76
|
+
*/
|
|
77
|
+
export interface MemberChange {
|
|
78
|
+
/**
|
|
79
|
+
* The member DID.
|
|
80
|
+
*/
|
|
81
|
+
did: MuxDid;
|
|
82
|
+
/**
|
|
83
|
+
* Why the member changed: an AttachReason value in an `attached` event, a DetachReason value in a `detached` event.
|
|
84
|
+
*/
|
|
85
|
+
reason: MemberChangeReason;
|
|
86
|
+
/**
|
|
87
|
+
* The grant concerned, where the member is or was attached through one.
|
|
88
|
+
*/
|
|
89
|
+
grantId?: GrantId;
|
|
90
|
+
/**
|
|
91
|
+
* `attached` only: the scope now in force for the member.
|
|
92
|
+
*/
|
|
93
|
+
scope?: MuxScope;
|
|
94
|
+
/**
|
|
95
|
+
* `attached` only: when the membership lapses unless renewed.
|
|
96
|
+
*/
|
|
97
|
+
expiresAt?: string;
|
|
98
|
+
/**
|
|
99
|
+
* `attached` only: false while the member DID's own direct connection keeps its live traffic.
|
|
100
|
+
*/
|
|
101
|
+
deliveryActive?: boolean;
|
|
102
|
+
}
|
|
103
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
104
|
+
export type { Ext, GrantId, MemberChangeReason, MuxDid, MuxNonce, MuxScope, MuxScopeValue, SessionId };
|
|
105
|
+
/** Trust Task type URI. */
|
|
106
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/messaging/mux/event/0.1";
|
|
107
|
+
/**
|
|
108
|
+
* The earlier version of this specification that this one declares it
|
|
109
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
110
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
111
|
+
* `extendsChain` / `readForSpec`.
|
|
112
|
+
*/
|
|
113
|
+
export declare const EXTENDS: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
116
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
117
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
118
|
+
* Versions").
|
|
119
|
+
*/
|
|
120
|
+
export declare const DEPRECATION: string | null;
|
|
121
|
+
/** Stable alias for this specification's request payload shape. */
|
|
122
|
+
export type Payload = MessagingMuxEventPayload;
|
|
123
|
+
/**
|
|
124
|
+
* This specification's payload schema, as a value.
|
|
125
|
+
*
|
|
126
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
127
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
128
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
129
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
130
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
131
|
+
*/
|
|
132
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
133
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
134
|
+
readonly $id: "https://trusttasks.org/spec/messaging/mux/event/0.1";
|
|
135
|
+
readonly title: "Messaging — Mux Event — payload";
|
|
136
|
+
readonly description: "A live, unstored event from a mediator to the principal of one mux connection: the connection is ready (with its nonce and limits), members attached or detached, or an inbound frame for a member refused. The members present depend on `event`; see the specification. The outer document members are owned by the framework — SPEC §6.3.";
|
|
137
|
+
readonly type: "object";
|
|
138
|
+
readonly additionalProperties: false;
|
|
139
|
+
readonly required: readonly ["event"];
|
|
140
|
+
readonly properties: {
|
|
141
|
+
readonly event: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly enum: readonly ["ready", "attached", "detached", "refused"];
|
|
144
|
+
readonly description: "Which event this is. Each kind carries the members the specification lists for it, and no others.";
|
|
145
|
+
};
|
|
146
|
+
readonly sessionId: {
|
|
147
|
+
readonly $ref: "#/$defs/SessionId";
|
|
148
|
+
readonly description: "`ready` only, REQUIRED: this connection's identifier, which attach statements sign over.";
|
|
149
|
+
};
|
|
150
|
+
readonly muxNonce: {
|
|
151
|
+
readonly $ref: "#/$defs/MuxNonce";
|
|
152
|
+
readonly description: "`ready` only, REQUIRED: this connection's nonce, which attach statements sign over.";
|
|
153
|
+
};
|
|
154
|
+
readonly maxDidsPerConnection: {
|
|
155
|
+
readonly type: "integer";
|
|
156
|
+
readonly minimum: 1;
|
|
157
|
+
readonly description: "`ready` only, REQUIRED: the most members this connection may carry.";
|
|
158
|
+
};
|
|
159
|
+
readonly maxGrantLifetimeSeconds: {
|
|
160
|
+
readonly type: "integer";
|
|
161
|
+
readonly minimum: 1;
|
|
162
|
+
readonly description: "`ready` only, REQUIRED: the longest `exp − iat` a grant may have.";
|
|
163
|
+
};
|
|
164
|
+
readonly maxAttachLifetimeSeconds: {
|
|
165
|
+
readonly type: "integer";
|
|
166
|
+
readonly minimum: 1;
|
|
167
|
+
readonly description: "`ready` only, OPTIONAL: the longest an attach statement's `exp` may lie after its `iat`.";
|
|
168
|
+
};
|
|
169
|
+
readonly sessionExpiresAt: {
|
|
170
|
+
readonly type: "string";
|
|
171
|
+
readonly format: "date-time";
|
|
172
|
+
readonly description: "`ready` only, OPTIONAL: when the principal's authentication of this connection expires and the connection closes. An attach statement's `exp` may not be later.";
|
|
173
|
+
};
|
|
174
|
+
readonly pendingNotices: {
|
|
175
|
+
readonly type: "integer";
|
|
176
|
+
readonly minimum: 0;
|
|
177
|
+
readonly description: "`ready` only, REQUIRED: how many messaging/mux/notice documents wait in the principal's inbox. Non-zero means the principal must drain them before it trusts its member set.";
|
|
178
|
+
};
|
|
179
|
+
readonly dids: {
|
|
180
|
+
readonly type: "array";
|
|
181
|
+
readonly minItems: 1;
|
|
182
|
+
readonly maxItems: 1000;
|
|
183
|
+
readonly items: {
|
|
184
|
+
readonly $ref: "#/$defs/MemberChange";
|
|
185
|
+
};
|
|
186
|
+
readonly description: "`attached` and `detached` only, REQUIRED: the members that changed, batched. A larger change is split across several events.";
|
|
187
|
+
};
|
|
188
|
+
readonly frameId: {
|
|
189
|
+
readonly type: "string";
|
|
190
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
191
|
+
readonly description: "`refused` only, REQUIRED: the lowercase hex SHA-256 of the refused frame's exact bytes — the identifier `tsp-ack` already uses.";
|
|
192
|
+
};
|
|
193
|
+
readonly sender: {
|
|
194
|
+
readonly $ref: "#/$defs/MuxDid";
|
|
195
|
+
readonly description: "`refused` only, OPTIONAL: the frame's sender, when the mediator could read it.";
|
|
196
|
+
};
|
|
197
|
+
readonly receiver: {
|
|
198
|
+
readonly $ref: "#/$defs/MuxDid";
|
|
199
|
+
readonly description: "`refused` only, OPTIONAL: the member DID or principal the frame was addressed to, when the mediator could read it.";
|
|
200
|
+
};
|
|
201
|
+
readonly code: {
|
|
202
|
+
readonly type: "string";
|
|
203
|
+
readonly minLength: 1;
|
|
204
|
+
readonly maxLength: 256;
|
|
205
|
+
readonly description: "`refused` only, REQUIRED: the mediator's stable refusal code, the same code a traffic-monitor `refused` event reports.";
|
|
206
|
+
};
|
|
207
|
+
readonly reason: {
|
|
208
|
+
readonly type: "string";
|
|
209
|
+
readonly minLength: 1;
|
|
210
|
+
readonly maxLength: 512;
|
|
211
|
+
readonly description: "`refused` only, OPTIONAL: a short human-readable explanation. Never message content.";
|
|
212
|
+
};
|
|
213
|
+
readonly ext: {
|
|
214
|
+
readonly $ref: "#/$defs/Ext";
|
|
215
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
readonly $defs: {
|
|
219
|
+
readonly MemberChange: {
|
|
220
|
+
readonly title: "MemberChange";
|
|
221
|
+
readonly type: "object";
|
|
222
|
+
readonly additionalProperties: false;
|
|
223
|
+
readonly required: readonly ["did", "reason"];
|
|
224
|
+
readonly description: "One member's change in an `attached` or `detached` event.";
|
|
225
|
+
readonly properties: {
|
|
226
|
+
readonly did: {
|
|
227
|
+
readonly $ref: "#/$defs/MuxDid";
|
|
228
|
+
readonly description: "The member DID.";
|
|
229
|
+
};
|
|
230
|
+
readonly reason: {
|
|
231
|
+
readonly $ref: "#/$defs/MemberChangeReason";
|
|
232
|
+
readonly description: "Why the member changed: an AttachReason value in an `attached` event, a DetachReason value in a `detached` event.";
|
|
233
|
+
};
|
|
234
|
+
readonly grantId: {
|
|
235
|
+
readonly $ref: "#/$defs/GrantId";
|
|
236
|
+
readonly description: "The grant concerned, where the member is or was attached through one.";
|
|
237
|
+
};
|
|
238
|
+
readonly scope: {
|
|
239
|
+
readonly $ref: "#/$defs/MuxScope";
|
|
240
|
+
readonly description: "`attached` only: the scope now in force for the member.";
|
|
241
|
+
};
|
|
242
|
+
readonly expiresAt: {
|
|
243
|
+
readonly type: "string";
|
|
244
|
+
readonly format: "date-time";
|
|
245
|
+
readonly description: "`attached` only: when the membership lapses unless renewed.";
|
|
246
|
+
};
|
|
247
|
+
readonly deliveryActive: {
|
|
248
|
+
readonly type: "boolean";
|
|
249
|
+
readonly description: "`attached` only: false while the member DID's own direct connection keeps its live traffic.";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
readonly MuxScope: {
|
|
254
|
+
readonly title: "MuxScope";
|
|
255
|
+
readonly type: "array";
|
|
256
|
+
readonly minItems: 1;
|
|
257
|
+
readonly maxItems: 16;
|
|
258
|
+
readonly items: {
|
|
259
|
+
readonly $ref: "#/$defs/MuxScopeValue";
|
|
260
|
+
};
|
|
261
|
+
readonly description: "A set of capabilities: a non-empty JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses into one. Never empty: an empty scope is refused, never read as \"all\". There is no default scope anywhere — every attach and every grant names its scope explicitly. A scope is always bounded by the member DID's own access-control capabilities at the mediator.";
|
|
262
|
+
};
|
|
263
|
+
readonly MuxScopeValue: {
|
|
264
|
+
readonly title: "MuxScopeValue";
|
|
265
|
+
readonly type: "string";
|
|
266
|
+
readonly enum: readonly ["receive", "pickup", "delete", "send"];
|
|
267
|
+
readonly description: "One capability a member DID extends to a principal's connection. `receive`: live delivery of the member's inbound messages on the connection. `pickup`: message-pickup status and delivery requests naming the member as `recipient_did`, and inclusion in a raw-TSP inbox drain. `delete`: deleting the member's stored messages, including delete-on-ack and delete-on-send; a member without `delete` keeps its messages in its inbox until something holding `delete` collects them. `send`: the mediator accepts on this connection frames whose sender is the member DID — the frame is still signed or authcrypted with the member's own keys; the scope only lets the mediator accept it on this socket.";
|
|
268
|
+
};
|
|
269
|
+
readonly GrantId: {
|
|
270
|
+
readonly title: "GrantId";
|
|
271
|
+
readonly type: "string";
|
|
272
|
+
readonly minLength: 1;
|
|
273
|
+
readonly maxLength: 128;
|
|
274
|
+
readonly pattern: "^[A-Za-z0-9._:-]+$";
|
|
275
|
+
readonly description: "A grant's identifier, chosen by the member DID's signer and carried in its grant statement; a UUID is RECOMMENDED. A mediator refuses a grant whose identifier is already on the member DID's record.";
|
|
276
|
+
};
|
|
277
|
+
readonly MemberChangeReason: {
|
|
278
|
+
readonly title: "MemberChangeReason";
|
|
279
|
+
readonly type: "string";
|
|
280
|
+
readonly enum: readonly ["connect", "grant", "attach", "reactivated", "revokedByMember", "revokedByPrincipal", "epochBumped", "suspendedUnknownKey", "keyRotated", "expired", "accountBlocked", "superseded", "admin", "detachRequested", "accountRemoved", "resolutionFailed"];
|
|
281
|
+
readonly description: "The reason carried by one member's change in a messaging/mux/event `attached` or `detached` event: exactly the AttachReason values followed by the DetachReason values, with their meanings. An `attached` event carries only AttachReason values and a `detached` event only DetachReason values. One closed set rather than a union, so every generated binding types it as one enumeration; it MUST be kept equal to the two sets it joins.";
|
|
282
|
+
};
|
|
283
|
+
readonly MuxDid: {
|
|
284
|
+
readonly title: "MuxDid";
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
readonly minLength: 7;
|
|
287
|
+
readonly maxLength: 2048;
|
|
288
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
289
|
+
readonly description: "A DID, carried verbatim and compared by exact string equality. Unlike the messaging family's `Vid`, never a hash: the mediator resolves it to verify a statement signed by it. For a member DID reached over TSP, the TSP VID is the DID itself.";
|
|
290
|
+
};
|
|
291
|
+
readonly Ext: {
|
|
292
|
+
readonly title: "Ext";
|
|
293
|
+
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.";
|
|
294
|
+
readonly type: "object";
|
|
295
|
+
readonly minProperties: 1;
|
|
296
|
+
readonly additionalProperties: true;
|
|
297
|
+
readonly propertyNames: {
|
|
298
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly MuxNonce: {
|
|
302
|
+
readonly title: "MuxNonce";
|
|
303
|
+
readonly type: "string";
|
|
304
|
+
readonly pattern: "^[A-Za-z0-9_-]{43}$";
|
|
305
|
+
readonly description: "32 random bytes, base64url without padding, that belong to exactly one connection and are never reused. Attach statements sign over it, which is what makes an attach statement unusable on any other connection.";
|
|
306
|
+
};
|
|
307
|
+
readonly SessionId: {
|
|
308
|
+
readonly title: "SessionId";
|
|
309
|
+
readonly type: "string";
|
|
310
|
+
readonly minLength: 1;
|
|
311
|
+
readonly maxLength: 256;
|
|
312
|
+
readonly description: "The mediator's identifier for one authenticated connection, as announced in that connection's `ready` event.";
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
318
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
319
|
+
* per-specification and cannot be derived from the document alone, and
|
|
320
|
+
* item 2 needs the schema this carries.
|
|
321
|
+
*/
|
|
322
|
+
export declare const SPEC: {
|
|
323
|
+
readonly typeUri: "https://trusttasks.org/spec/messaging/mux/event/0.1";
|
|
324
|
+
readonly isBearer: false;
|
|
325
|
+
readonly isProofRequired: false;
|
|
326
|
+
readonly isRecipientRequired: true;
|
|
327
|
+
readonly isIssuedAtRequired: true;
|
|
328
|
+
readonly payloadSchema: {
|
|
329
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
330
|
+
readonly $id: "https://trusttasks.org/spec/messaging/mux/event/0.1";
|
|
331
|
+
readonly title: "Messaging — Mux Event — payload";
|
|
332
|
+
readonly description: "A live, unstored event from a mediator to the principal of one mux connection: the connection is ready (with its nonce and limits), members attached or detached, or an inbound frame for a member refused. The members present depend on `event`; see the specification. The outer document members are owned by the framework — SPEC §6.3.";
|
|
333
|
+
readonly type: "object";
|
|
334
|
+
readonly additionalProperties: false;
|
|
335
|
+
readonly required: readonly ["event"];
|
|
336
|
+
readonly properties: {
|
|
337
|
+
readonly event: {
|
|
338
|
+
readonly type: "string";
|
|
339
|
+
readonly enum: readonly ["ready", "attached", "detached", "refused"];
|
|
340
|
+
readonly description: "Which event this is. Each kind carries the members the specification lists for it, and no others.";
|
|
341
|
+
};
|
|
342
|
+
readonly sessionId: {
|
|
343
|
+
readonly $ref: "#/$defs/SessionId";
|
|
344
|
+
readonly description: "`ready` only, REQUIRED: this connection's identifier, which attach statements sign over.";
|
|
345
|
+
};
|
|
346
|
+
readonly muxNonce: {
|
|
347
|
+
readonly $ref: "#/$defs/MuxNonce";
|
|
348
|
+
readonly description: "`ready` only, REQUIRED: this connection's nonce, which attach statements sign over.";
|
|
349
|
+
};
|
|
350
|
+
readonly maxDidsPerConnection: {
|
|
351
|
+
readonly type: "integer";
|
|
352
|
+
readonly minimum: 1;
|
|
353
|
+
readonly description: "`ready` only, REQUIRED: the most members this connection may carry.";
|
|
354
|
+
};
|
|
355
|
+
readonly maxGrantLifetimeSeconds: {
|
|
356
|
+
readonly type: "integer";
|
|
357
|
+
readonly minimum: 1;
|
|
358
|
+
readonly description: "`ready` only, REQUIRED: the longest `exp − iat` a grant may have.";
|
|
359
|
+
};
|
|
360
|
+
readonly maxAttachLifetimeSeconds: {
|
|
361
|
+
readonly type: "integer";
|
|
362
|
+
readonly minimum: 1;
|
|
363
|
+
readonly description: "`ready` only, OPTIONAL: the longest an attach statement's `exp` may lie after its `iat`.";
|
|
364
|
+
};
|
|
365
|
+
readonly sessionExpiresAt: {
|
|
366
|
+
readonly type: "string";
|
|
367
|
+
readonly format: "date-time";
|
|
368
|
+
readonly description: "`ready` only, OPTIONAL: when the principal's authentication of this connection expires and the connection closes. An attach statement's `exp` may not be later.";
|
|
369
|
+
};
|
|
370
|
+
readonly pendingNotices: {
|
|
371
|
+
readonly type: "integer";
|
|
372
|
+
readonly minimum: 0;
|
|
373
|
+
readonly description: "`ready` only, REQUIRED: how many messaging/mux/notice documents wait in the principal's inbox. Non-zero means the principal must drain them before it trusts its member set.";
|
|
374
|
+
};
|
|
375
|
+
readonly dids: {
|
|
376
|
+
readonly type: "array";
|
|
377
|
+
readonly minItems: 1;
|
|
378
|
+
readonly maxItems: 1000;
|
|
379
|
+
readonly items: {
|
|
380
|
+
readonly $ref: "#/$defs/MemberChange";
|
|
381
|
+
};
|
|
382
|
+
readonly description: "`attached` and `detached` only, REQUIRED: the members that changed, batched. A larger change is split across several events.";
|
|
383
|
+
};
|
|
384
|
+
readonly frameId: {
|
|
385
|
+
readonly type: "string";
|
|
386
|
+
readonly pattern: "^[0-9a-f]{64}$";
|
|
387
|
+
readonly description: "`refused` only, REQUIRED: the lowercase hex SHA-256 of the refused frame's exact bytes — the identifier `tsp-ack` already uses.";
|
|
388
|
+
};
|
|
389
|
+
readonly sender: {
|
|
390
|
+
readonly $ref: "#/$defs/MuxDid";
|
|
391
|
+
readonly description: "`refused` only, OPTIONAL: the frame's sender, when the mediator could read it.";
|
|
392
|
+
};
|
|
393
|
+
readonly receiver: {
|
|
394
|
+
readonly $ref: "#/$defs/MuxDid";
|
|
395
|
+
readonly description: "`refused` only, OPTIONAL: the member DID or principal the frame was addressed to, when the mediator could read it.";
|
|
396
|
+
};
|
|
397
|
+
readonly code: {
|
|
398
|
+
readonly type: "string";
|
|
399
|
+
readonly minLength: 1;
|
|
400
|
+
readonly maxLength: 256;
|
|
401
|
+
readonly description: "`refused` only, REQUIRED: the mediator's stable refusal code, the same code a traffic-monitor `refused` event reports.";
|
|
402
|
+
};
|
|
403
|
+
readonly reason: {
|
|
404
|
+
readonly type: "string";
|
|
405
|
+
readonly minLength: 1;
|
|
406
|
+
readonly maxLength: 512;
|
|
407
|
+
readonly description: "`refused` only, OPTIONAL: a short human-readable explanation. Never message content.";
|
|
408
|
+
};
|
|
409
|
+
readonly ext: {
|
|
410
|
+
readonly $ref: "#/$defs/Ext";
|
|
411
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
readonly $defs: {
|
|
415
|
+
readonly MemberChange: {
|
|
416
|
+
readonly title: "MemberChange";
|
|
417
|
+
readonly type: "object";
|
|
418
|
+
readonly additionalProperties: false;
|
|
419
|
+
readonly required: readonly ["did", "reason"];
|
|
420
|
+
readonly description: "One member's change in an `attached` or `detached` event.";
|
|
421
|
+
readonly properties: {
|
|
422
|
+
readonly did: {
|
|
423
|
+
readonly $ref: "#/$defs/MuxDid";
|
|
424
|
+
readonly description: "The member DID.";
|
|
425
|
+
};
|
|
426
|
+
readonly reason: {
|
|
427
|
+
readonly $ref: "#/$defs/MemberChangeReason";
|
|
428
|
+
readonly description: "Why the member changed: an AttachReason value in an `attached` event, a DetachReason value in a `detached` event.";
|
|
429
|
+
};
|
|
430
|
+
readonly grantId: {
|
|
431
|
+
readonly $ref: "#/$defs/GrantId";
|
|
432
|
+
readonly description: "The grant concerned, where the member is or was attached through one.";
|
|
433
|
+
};
|
|
434
|
+
readonly scope: {
|
|
435
|
+
readonly $ref: "#/$defs/MuxScope";
|
|
436
|
+
readonly description: "`attached` only: the scope now in force for the member.";
|
|
437
|
+
};
|
|
438
|
+
readonly expiresAt: {
|
|
439
|
+
readonly type: "string";
|
|
440
|
+
readonly format: "date-time";
|
|
441
|
+
readonly description: "`attached` only: when the membership lapses unless renewed.";
|
|
442
|
+
};
|
|
443
|
+
readonly deliveryActive: {
|
|
444
|
+
readonly type: "boolean";
|
|
445
|
+
readonly description: "`attached` only: false while the member DID's own direct connection keeps its live traffic.";
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
readonly MuxScope: {
|
|
450
|
+
readonly title: "MuxScope";
|
|
451
|
+
readonly type: "array";
|
|
452
|
+
readonly minItems: 1;
|
|
453
|
+
readonly maxItems: 16;
|
|
454
|
+
readonly items: {
|
|
455
|
+
readonly $ref: "#/$defs/MuxScopeValue";
|
|
456
|
+
};
|
|
457
|
+
readonly description: "A set of capabilities: a non-empty JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses into one. Never empty: an empty scope is refused, never read as \"all\". There is no default scope anywhere — every attach and every grant names its scope explicitly. A scope is always bounded by the member DID's own access-control capabilities at the mediator.";
|
|
458
|
+
};
|
|
459
|
+
readonly MuxScopeValue: {
|
|
460
|
+
readonly title: "MuxScopeValue";
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly enum: readonly ["receive", "pickup", "delete", "send"];
|
|
463
|
+
readonly description: "One capability a member DID extends to a principal's connection. `receive`: live delivery of the member's inbound messages on the connection. `pickup`: message-pickup status and delivery requests naming the member as `recipient_did`, and inclusion in a raw-TSP inbox drain. `delete`: deleting the member's stored messages, including delete-on-ack and delete-on-send; a member without `delete` keeps its messages in its inbox until something holding `delete` collects them. `send`: the mediator accepts on this connection frames whose sender is the member DID — the frame is still signed or authcrypted with the member's own keys; the scope only lets the mediator accept it on this socket.";
|
|
464
|
+
};
|
|
465
|
+
readonly GrantId: {
|
|
466
|
+
readonly title: "GrantId";
|
|
467
|
+
readonly type: "string";
|
|
468
|
+
readonly minLength: 1;
|
|
469
|
+
readonly maxLength: 128;
|
|
470
|
+
readonly pattern: "^[A-Za-z0-9._:-]+$";
|
|
471
|
+
readonly description: "A grant's identifier, chosen by the member DID's signer and carried in its grant statement; a UUID is RECOMMENDED. A mediator refuses a grant whose identifier is already on the member DID's record.";
|
|
472
|
+
};
|
|
473
|
+
readonly MemberChangeReason: {
|
|
474
|
+
readonly title: "MemberChangeReason";
|
|
475
|
+
readonly type: "string";
|
|
476
|
+
readonly enum: readonly ["connect", "grant", "attach", "reactivated", "revokedByMember", "revokedByPrincipal", "epochBumped", "suspendedUnknownKey", "keyRotated", "expired", "accountBlocked", "superseded", "admin", "detachRequested", "accountRemoved", "resolutionFailed"];
|
|
477
|
+
readonly description: "The reason carried by one member's change in a messaging/mux/event `attached` or `detached` event: exactly the AttachReason values followed by the DetachReason values, with their meanings. An `attached` event carries only AttachReason values and a `detached` event only DetachReason values. One closed set rather than a union, so every generated binding types it as one enumeration; it MUST be kept equal to the two sets it joins.";
|
|
478
|
+
};
|
|
479
|
+
readonly MuxDid: {
|
|
480
|
+
readonly title: "MuxDid";
|
|
481
|
+
readonly type: "string";
|
|
482
|
+
readonly minLength: 7;
|
|
483
|
+
readonly maxLength: 2048;
|
|
484
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
485
|
+
readonly description: "A DID, carried verbatim and compared by exact string equality. Unlike the messaging family's `Vid`, never a hash: the mediator resolves it to verify a statement signed by it. For a member DID reached over TSP, the TSP VID is the DID itself.";
|
|
486
|
+
};
|
|
487
|
+
readonly Ext: {
|
|
488
|
+
readonly title: "Ext";
|
|
489
|
+
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.";
|
|
490
|
+
readonly type: "object";
|
|
491
|
+
readonly minProperties: 1;
|
|
492
|
+
readonly additionalProperties: true;
|
|
493
|
+
readonly propertyNames: {
|
|
494
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
readonly MuxNonce: {
|
|
498
|
+
readonly title: "MuxNonce";
|
|
499
|
+
readonly type: "string";
|
|
500
|
+
readonly pattern: "^[A-Za-z0-9_-]{43}$";
|
|
501
|
+
readonly description: "32 random bytes, base64url without padding, that belong to exactly one connection and are never reused. Attach statements sign over it, which is what makes an attach statement unusable on any other connection.";
|
|
502
|
+
};
|
|
503
|
+
readonly SessionId: {
|
|
504
|
+
readonly title: "SessionId";
|
|
505
|
+
readonly type: "string";
|
|
506
|
+
readonly minLength: 1;
|
|
507
|
+
readonly maxLength: 256;
|
|
508
|
+
readonly description: "The mediator's identifier for one authenticated connection, as announced in that connection's `ready` event.";
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/messaging/mux/event/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,0BAA0B,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAG9K;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAEvG,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,qDAA8D,CAAC;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,GAAG,IAAW,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG,IAAW,CAAC;AAE/C,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuNjB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC"}
|