@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.
Files changed (105) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/dist/_shared/components.d.ts +520 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +45 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +45 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/messaging/mux/_shared/0.1/mux.d.ts +16 -0
  9. package/dist/messaging/mux/_shared/0.1/mux.d.ts.map +1 -0
  10. package/dist/messaging/mux/_shared/0.1/mux.js +6 -0
  11. package/dist/messaging/mux/_shared/0.1/mux.js.map +1 -0
  12. package/dist/messaging/mux/attach/0.1/payload.d.ts +996 -0
  13. package/dist/messaging/mux/attach/0.1/payload.d.ts.map +1 -0
  14. package/dist/messaging/mux/attach/0.1/payload.js +594 -0
  15. package/dist/messaging/mux/attach/0.1/payload.js.map +1 -0
  16. package/dist/messaging/mux/detach/0.1/payload.d.ts +398 -0
  17. package/dist/messaging/mux/detach/0.1/payload.d.ts.map +1 -0
  18. package/dist/messaging/mux/detach/0.1/payload.js +215 -0
  19. package/dist/messaging/mux/detach/0.1/payload.js.map +1 -0
  20. package/dist/messaging/mux/event/0.1/payload.d.ts +513 -0
  21. package/dist/messaging/mux/event/0.1/payload.d.ts.map +1 -0
  22. package/dist/messaging/mux/event/0.1/payload.js +260 -0
  23. package/dist/messaging/mux/event/0.1/payload.js.map +1 -0
  24. package/dist/messaging/mux/grant/0.1/payload.d.ts +1008 -0
  25. package/dist/messaging/mux/grant/0.1/payload.d.ts.map +1 -0
  26. package/dist/messaging/mux/grant/0.1/payload.js +606 -0
  27. package/dist/messaging/mux/grant/0.1/payload.js.map +1 -0
  28. package/dist/messaging/mux/list/0.1/payload.d.ts +1241 -0
  29. package/dist/messaging/mux/list/0.1/payload.d.ts.map +1 -0
  30. package/dist/messaging/mux/list/0.1/payload.js +715 -0
  31. package/dist/messaging/mux/list/0.1/payload.js.map +1 -0
  32. package/dist/messaging/mux/notice/0.1/payload.d.ts +489 -0
  33. package/dist/messaging/mux/notice/0.1/payload.d.ts.map +1 -0
  34. package/dist/messaging/mux/notice/0.1/payload.js +249 -0
  35. package/dist/messaging/mux/notice/0.1/payload.js.map +1 -0
  36. package/dist/messaging/mux/revoke/0.1/payload.d.ts +585 -0
  37. package/dist/messaging/mux/revoke/0.1/payload.d.ts.map +1 -0
  38. package/dist/messaging/mux/revoke/0.1/payload.js +311 -0
  39. package/dist/messaging/mux/revoke/0.1/payload.js.map +1 -0
  40. package/dist/messaging/mux/revoke-all/0.1/payload.d.ts +682 -0
  41. package/dist/messaging/mux/revoke-all/0.1/payload.d.ts.map +1 -0
  42. package/dist/messaging/mux/revoke-all/0.1/payload.js +397 -0
  43. package/dist/messaging/mux/revoke-all/0.1/payload.js.map +1 -0
  44. package/dist/messaging/mux/update/0.1/payload.d.ts +995 -0
  45. package/dist/messaging/mux/update/0.1/payload.d.ts.map +1 -0
  46. package/dist/messaging/mux/update/0.1/payload.js +586 -0
  47. package/dist/messaging/mux/update/0.1/payload.js.map +1 -0
  48. package/dist/vta/_shared/0.1/memory-record.d.ts +22 -0
  49. package/dist/vta/_shared/0.1/memory-record.d.ts.map +1 -0
  50. package/dist/vta/_shared/0.1/memory-record.js +6 -0
  51. package/dist/vta/_shared/0.1/memory-record.js.map +1 -0
  52. package/dist/vta/memory/delete/0.1/payload.d.ts +13 -2
  53. package/dist/vta/memory/delete/0.1/payload.d.ts.map +1 -1
  54. package/dist/vta/memory/delete/0.1/payload.js +1 -1
  55. package/dist/vta/memory/delete/0.1/payload.js.map +1 -1
  56. package/dist/vta/memory/delete/0.2/payload.d.ts +415 -0
  57. package/dist/vta/memory/delete/0.2/payload.d.ts.map +1 -0
  58. package/dist/vta/memory/delete/0.2/payload.js +224 -0
  59. package/dist/vta/memory/delete/0.2/payload.js.map +1 -0
  60. package/dist/vta/memory/get/0.1/payload.d.ts +646 -0
  61. package/dist/vta/memory/get/0.1/payload.d.ts.map +1 -0
  62. package/dist/vta/memory/get/0.1/payload.js +349 -0
  63. package/dist/vta/memory/get/0.1/payload.js.map +1 -0
  64. package/dist/vta/memory/list/0.1/payload.d.ts +13 -2
  65. package/dist/vta/memory/list/0.1/payload.d.ts.map +1 -1
  66. package/dist/vta/memory/list/0.1/payload.js +1 -1
  67. package/dist/vta/memory/list/0.1/payload.js.map +1 -1
  68. package/dist/vta/memory/list/0.2/payload.d.ts +693 -0
  69. package/dist/vta/memory/list/0.2/payload.d.ts.map +1 -0
  70. package/dist/vta/memory/list/0.2/payload.js +363 -0
  71. package/dist/vta/memory/list/0.2/payload.js.map +1 -0
  72. package/dist/vta/memory/put/0.1/payload.d.ts +13 -2
  73. package/dist/vta/memory/put/0.1/payload.d.ts.map +1 -1
  74. package/dist/vta/memory/put/0.1/payload.js +1 -1
  75. package/dist/vta/memory/put/0.1/payload.js.map +1 -1
  76. package/dist/vta/memory/put/0.2/payload.d.ts +490 -0
  77. package/dist/vta/memory/put/0.2/payload.d.ts.map +1 -0
  78. package/dist/vta/memory/put/0.2/payload.js +264 -0
  79. package/dist/vta/memory/put/0.2/payload.js.map +1 -0
  80. package/dist/vtc/members/rotate/0.1/payload.d.ts +12 -5
  81. package/dist/vtc/members/rotate/0.1/payload.d.ts.map +1 -1
  82. package/dist/vtc/members/rotate/0.1/payload.js +8 -2
  83. package/dist/vtc/members/rotate/0.1/payload.js.map +1 -1
  84. package/package.json +1 -1
  85. package/src/_shared/components.ts +581 -0
  86. package/src/index.ts +45 -0
  87. package/src/messaging/mux/_shared/0.1/mux.ts +17 -0
  88. package/src/messaging/mux/attach/0.1/payload.ts +682 -0
  89. package/src/messaging/mux/detach/0.1/payload.ts +278 -0
  90. package/src/messaging/mux/event/0.1/payload.ts +371 -0
  91. package/src/messaging/mux/grant/0.1/payload.ts +710 -0
  92. package/src/messaging/mux/list/0.1/payload.ts +793 -0
  93. package/src/messaging/mux/notice/0.1/payload.ts +362 -0
  94. package/src/messaging/mux/revoke/0.1/payload.ts +389 -0
  95. package/src/messaging/mux/revoke-all/0.1/payload.ts +452 -0
  96. package/src/messaging/mux/update/0.1/payload.ts +644 -0
  97. package/src/vta/_shared/0.1/memory-record.ts +23 -0
  98. package/src/vta/memory/delete/0.1/payload.ts +14 -3
  99. package/src/vta/memory/delete/0.2/payload.ts +288 -0
  100. package/src/vta/memory/get/0.1/payload.ts +414 -0
  101. package/src/vta/memory/list/0.1/payload.ts +14 -3
  102. package/src/vta/memory/list/0.2/payload.ts +445 -0
  103. package/src/vta/memory/put/0.1/payload.ts +14 -3
  104. package/src/vta/memory/put/0.2/payload.ts +333 -0
  105. package/src/vtc/members/rotate/0.1/payload.ts +12 -3
@@ -0,0 +1,995 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/messaging/mux/update/0.1/payload.schema.json
4
+ */
5
+ import type { DataIntegrityProof, Ext, GrantId, GrantState, GrantStatement, GrantView, MuxDataIntegrityProof, MuxDid, MuxScope, MuxScopeValue, StatementScope } from "../../../../_shared/components.js";
6
+ /**
7
+ * Narrow a stored grant — a smaller scope or an earlier expiry — without a new member signature. Anything that widens is refused. The outer document members are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface MessagingMuxUpdatePayload {
10
+ /**
11
+ * The grant to narrow.
12
+ */
13
+ grantId: GrantId;
14
+ /**
15
+ * The new effective scope. MUST be a subset of the grant's current effective scope.
16
+ */
17
+ scope?: MuxScope;
18
+ /**
19
+ * The new effective expiry. MUST be in the future and no later than the grant's current effective expiry.
20
+ */
21
+ expiresAt?: string;
22
+ /**
23
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
24
+ */
25
+ ext?: Ext;
26
+ }
27
+ /**
28
+ * The success response to a messaging/mux/update request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/mux/update/0.1#response.
29
+ */
30
+ export interface MessagingMuxUpdateResponsePayload {
31
+ /**
32
+ * The grant as it now stands.
33
+ */
34
+ grant: GrantView;
35
+ /**
36
+ * False when the request named the values already in force.
37
+ */
38
+ changed: boolean;
39
+ /**
40
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
41
+ */
42
+ ext?: Ext;
43
+ }
44
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
45
+ export type { DataIntegrityProof, Ext, GrantId, GrantState, GrantStatement, GrantView, MuxDataIntegrityProof, MuxDid, MuxScope, MuxScopeValue, StatementScope };
46
+ /** Trust Task type URI. */
47
+ export declare const TYPE_URI: "https://trusttasks.org/spec/messaging/mux/update/0.1";
48
+ /**
49
+ * The earlier version of this specification that this one declares it
50
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
51
+ * `null`. Only the direct declaration — follow the chain with
52
+ * `extendsChain` / `readForSpec`.
53
+ */
54
+ export declare const EXTENDS: string | null;
55
+ /**
56
+ * Why this version is deprecated, or `null` while it is current. A
57
+ * superseded or retired version is still supported, and is withdrawn from
58
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
59
+ * Versions").
60
+ */
61
+ export declare const DEPRECATION: string | null;
62
+ /** Stable alias for this specification's request payload shape. */
63
+ export type Payload = MessagingMuxUpdatePayload;
64
+ /** Trust Task response type URI (request type URI + "#response"). */
65
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/messaging/mux/update/0.1#response";
66
+ /** Stable alias for this specification's success-response payload shape. */
67
+ export type Response = MessagingMuxUpdateResponsePayload;
68
+ /**
69
+ * This specification's payload schema, as a value.
70
+ *
71
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
72
+ * rather than only as a `.json` file because TypeScript types are erased
73
+ * at runtime: without a schema a consumer has nothing to validate, and
74
+ * every REQUIRED payload member is optional in practice. Cross-file
75
+ * `$ref`s are already inlined, so it needs no resolver.
76
+ */
77
+ export declare const PAYLOAD_SCHEMA: {
78
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
79
+ readonly $id: "https://trusttasks.org/spec/messaging/mux/update/0.1";
80
+ readonly title: "Messaging — Mux Update — payload";
81
+ readonly description: "Narrow a stored grant — a smaller scope or an earlier expiry — without a new member signature. Anything that widens is refused. The outer document members are owned by the framework — SPEC §6.3.";
82
+ readonly type: "object";
83
+ readonly additionalProperties: false;
84
+ readonly required: readonly ["grantId"];
85
+ readonly properties: {
86
+ readonly grantId: {
87
+ readonly $ref: "#/$defs/GrantId";
88
+ readonly description: "The grant to narrow.";
89
+ };
90
+ readonly scope: {
91
+ readonly $ref: "#/$defs/MuxScope";
92
+ readonly description: "The new effective scope. MUST be a subset of the grant's current effective scope.";
93
+ };
94
+ readonly expiresAt: {
95
+ readonly type: "string";
96
+ readonly format: "date-time";
97
+ readonly description: "The new effective expiry. MUST be in the future and no later than the grant's current effective expiry.";
98
+ };
99
+ readonly ext: {
100
+ readonly $ref: "#/$defs/Ext";
101
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
102
+ };
103
+ };
104
+ readonly $defs: {
105
+ readonly Response: {
106
+ readonly $anchor: "response";
107
+ readonly title: "Messaging — Mux Update — response payload";
108
+ readonly description: "The success response to a messaging/mux/update request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/mux/update/0.1#response.";
109
+ readonly type: "object";
110
+ readonly additionalProperties: false;
111
+ readonly required: readonly ["grant", "changed"];
112
+ readonly properties: {
113
+ readonly grant: {
114
+ readonly $ref: "#/$defs/GrantView";
115
+ readonly description: "The grant as it now stands.";
116
+ };
117
+ readonly changed: {
118
+ readonly type: "boolean";
119
+ readonly description: "False when the request named the values already in force.";
120
+ };
121
+ readonly ext: {
122
+ readonly $ref: "#/$defs/Ext";
123
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
124
+ };
125
+ };
126
+ };
127
+ readonly Ext: {
128
+ readonly title: "Ext";
129
+ 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.";
130
+ readonly type: "object";
131
+ readonly minProperties: 1;
132
+ readonly additionalProperties: true;
133
+ readonly propertyNames: {
134
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
135
+ };
136
+ };
137
+ readonly GrantView: {
138
+ readonly title: "GrantView";
139
+ readonly type: "object";
140
+ readonly additionalProperties: false;
141
+ readonly required: readonly ["statement", "state", "scope", "expiresAt"];
142
+ readonly description: "The mediator's view of one stored grant, as messaging/mux/list and messaging/mux/update return it: the grant statement verbatim, with the state and the effective scope and expiry beside it.";
143
+ readonly properties: {
144
+ readonly statement: {
145
+ readonly $ref: "#/$defs/GrantStatement";
146
+ readonly description: "The grant statement exactly as the member signed it and the mediator stored it, proof included, so either party can re-verify it.";
147
+ };
148
+ readonly state: {
149
+ readonly $ref: "#/$defs/GrantState";
150
+ };
151
+ readonly scope: {
152
+ readonly $ref: "#/$defs/MuxScope";
153
+ readonly description: "The effective scope: the signed scope, or the narrower one messaging/mux/update set.";
154
+ };
155
+ readonly expiresAt: {
156
+ readonly type: "string";
157
+ readonly format: "date-time";
158
+ readonly description: "The effective expiry: the signed `exp` rendered as RFC 3339, or the earlier one messaging/mux/update set.";
159
+ };
160
+ readonly narrowed: {
161
+ readonly type: "boolean";
162
+ readonly description: "True when messaging/mux/update narrowed the effective scope or expiry below what the statement signs.";
163
+ };
164
+ readonly attachedNow: {
165
+ readonly type: "boolean";
166
+ readonly description: "Principal view only: whether the member is attached through this grant to the connection that carried the list request.";
167
+ };
168
+ };
169
+ };
170
+ readonly MuxScope: {
171
+ readonly title: "MuxScope";
172
+ readonly type: "array";
173
+ readonly minItems: 1;
174
+ readonly maxItems: 16;
175
+ readonly items: {
176
+ readonly $ref: "#/$defs/MuxScopeValue";
177
+ };
178
+ 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.";
179
+ };
180
+ readonly MuxScopeValue: {
181
+ readonly title: "MuxScopeValue";
182
+ readonly type: "string";
183
+ readonly enum: readonly ["receive", "pickup", "delete", "send"];
184
+ 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.";
185
+ };
186
+ readonly GrantState: {
187
+ readonly title: "GrantState";
188
+ readonly type: "string";
189
+ readonly enum: readonly ["active", "suspended", "staleKey", "expired", "epochRevoked"];
190
+ readonly description: "A stored grant's state. `active`: valid; the member is attached whenever the principal is connected. `suspended`: the member DID proved control with a key that signed none of its active grants (the unknown-key rule); terminal — the grant cannot be resumed and must be recreated by a fresh member signature. `staleKey`: the key that signed the grant is no longer in the member DID's current authentication relationship; terminal — it does not become active again if the key reappears. `expired`: an active grant past its effective expiry; computed when read, never stored. `epochRevoked`: the member DID advanced its epoch with messaging/mux/revoke-all. A grant revoked with messaging/mux/revoke has no state: it is deleted. A dead grant (every state but `active`) stays listable for the mediator's retention window after its effective expiry, then is pruned.";
191
+ };
192
+ readonly GrantStatement: {
193
+ readonly title: "GrantStatement";
194
+ readonly type: "object";
195
+ readonly additionalProperties: false;
196
+ readonly required: readonly ["type", "issuer", "audience", "grantId", "principal", "scope", "epoch", "iat", "exp", "proof"];
197
+ readonly description: "A member DID's standing statement that the named principal may carry its traffic at this mediator, on any connection, until `exp`, within `scope`, under the member's current `epoch`. Signed by the member with an embedded Data Integrity proof whose purpose is `authentication`, and stored verbatim by the mediator as the only evidence of the delegation.";
198
+ readonly properties: {
199
+ readonly type: {
200
+ readonly type: "string";
201
+ readonly const: "muxGrant";
202
+ readonly description: "Always `muxGrant`; names the statement kind, so a statement of one kind is never accepted as another.";
203
+ };
204
+ readonly issuer: {
205
+ readonly $ref: "#/$defs/MuxDid";
206
+ readonly description: "The member DID: the signer, and the DID the statement concerns.";
207
+ };
208
+ readonly audience: {
209
+ readonly $ref: "#/$defs/MuxDid";
210
+ readonly description: "The mediator's DID. A statement names exactly one mediator and is refused by every other.";
211
+ };
212
+ readonly grantId: {
213
+ readonly $ref: "#/$defs/GrantId";
214
+ };
215
+ readonly principal: {
216
+ readonly $ref: "#/$defs/MuxDid";
217
+ readonly description: "The principal DID that may carry the member's traffic. MUST differ from `issuer`.";
218
+ };
219
+ readonly scope: {
220
+ readonly $ref: "#/$defs/StatementScope";
221
+ };
222
+ readonly epoch: {
223
+ readonly type: "integer";
224
+ readonly minimum: 0;
225
+ readonly description: "The member DID's current epoch at the mediator. Only messaging/mux/revoke-all advances it.";
226
+ };
227
+ readonly iat: {
228
+ readonly type: "integer";
229
+ readonly minimum: 0;
230
+ readonly description: "JWT NumericDate (RFC 7519 §2), whole seconds since 1970-01-01T00:00:00Z UTC: when the statement was signed. MUST NOT be more than 60 seconds in the mediator's future.";
231
+ };
232
+ readonly exp: {
233
+ readonly type: "integer";
234
+ readonly minimum: 0;
235
+ readonly description: "JWT NumericDate (RFC 7519 §2): when the statement stops being accepted. REQUIRED; MUST be after `iat` and in the future.";
236
+ };
237
+ readonly proof: {
238
+ readonly $ref: "#/$defs/MuxDataIntegrityProof";
239
+ };
240
+ };
241
+ };
242
+ readonly MuxDataIntegrityProof: {
243
+ readonly title: "MuxDataIntegrityProof";
244
+ readonly type: "object";
245
+ readonly additionalProperties: false;
246
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
247
+ readonly description: "The W3C Data Integrity proof embedded in a mux statement, made by the member DID: the format and verifier Trust Tasks already use for document proofs (SPEC §4.7). The proof covers the whole statement except `proof` itself, as the cryptosuite defines. Closed: a member Data Integrity defines but this list omits is refused.";
248
+ readonly properties: {
249
+ readonly type: {
250
+ readonly type: "string";
251
+ readonly const: "DataIntegrityProof";
252
+ };
253
+ readonly cryptosuite: {
254
+ readonly type: "string";
255
+ readonly enum: readonly ["eddsa-jcs-2022", "eddsa-rdfc-2022"];
256
+ readonly description: "The W3C Data Integrity EdDSA cryptosuite used.";
257
+ };
258
+ readonly verificationMethod: {
259
+ readonly type: "string";
260
+ readonly minLength: 5;
261
+ readonly maxLength: 2048;
262
+ readonly pattern: "^did:\\S+#\\S+$";
263
+ readonly description: "The DID URL of the verification method that signed. MUST be controlled by the statement's `issuer` and listed in that DID's current `authentication` relationship.";
264
+ };
265
+ readonly proofPurpose: {
266
+ readonly type: "string";
267
+ readonly minLength: 1;
268
+ readonly maxLength: 64;
269
+ readonly description: "MUST be `authentication`. Any other value is refused with `messaging/mux:proofPurposeInvalid` — a proof made for another relationship (an `assertionMethod` credential signature, say) is never accepted as control of the DID.";
270
+ };
271
+ readonly created: {
272
+ readonly type: "string";
273
+ readonly format: "date-time";
274
+ readonly description: "OPTIONAL: when the proof was made, as Data Integrity defines it. Covered by the proof; the statement's own `iat` is what the mediator checks.";
275
+ };
276
+ readonly proofValue: {
277
+ readonly type: "string";
278
+ readonly minLength: 2;
279
+ readonly maxLength: 4096;
280
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
281
+ readonly description: "The multibase (base58btc) signature.";
282
+ };
283
+ };
284
+ };
285
+ readonly StatementScope: {
286
+ readonly title: "StatementScope";
287
+ readonly type: "array";
288
+ readonly maxItems: 16;
289
+ readonly items: {
290
+ readonly $ref: "#/$defs/MuxScopeValue";
291
+ };
292
+ readonly description: "The scope a member DID signs into a statement: a JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses. It MUST NOT be empty; an empty signed scope is refused with the task's `emptyScope` code, never read as \"all\". Unlike MuxScope, emptiness is not a schema failure here, so that the refusal is reported per statement rather than failing the whole batch.";
293
+ };
294
+ readonly MuxDid: {
295
+ readonly title: "MuxDid";
296
+ readonly type: "string";
297
+ readonly minLength: 7;
298
+ readonly maxLength: 2048;
299
+ readonly pattern: "^did:[a-z0-9]+:\\S+$";
300
+ 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.";
301
+ };
302
+ readonly GrantId: {
303
+ readonly title: "GrantId";
304
+ readonly type: "string";
305
+ readonly minLength: 1;
306
+ readonly maxLength: 128;
307
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
308
+ 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.";
309
+ };
310
+ };
311
+ };
312
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
313
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
314
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
315
+ readonly $ref: "#/$defs/Response";
316
+ readonly $defs: {
317
+ readonly Response: {
318
+ readonly $anchor: "response";
319
+ readonly title: "Messaging — Mux Update — response payload";
320
+ readonly description: "The success response to a messaging/mux/update request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/mux/update/0.1#response.";
321
+ readonly type: "object";
322
+ readonly additionalProperties: false;
323
+ readonly required: readonly ["grant", "changed"];
324
+ readonly properties: {
325
+ readonly grant: {
326
+ readonly $ref: "#/$defs/GrantView";
327
+ readonly description: "The grant as it now stands.";
328
+ };
329
+ readonly changed: {
330
+ readonly type: "boolean";
331
+ readonly description: "False when the request named the values already in force.";
332
+ };
333
+ readonly ext: {
334
+ readonly $ref: "#/$defs/Ext";
335
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
336
+ };
337
+ };
338
+ };
339
+ readonly Ext: {
340
+ readonly title: "Ext";
341
+ 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.";
342
+ readonly type: "object";
343
+ readonly minProperties: 1;
344
+ readonly additionalProperties: true;
345
+ readonly propertyNames: {
346
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
347
+ };
348
+ };
349
+ readonly GrantView: {
350
+ readonly title: "GrantView";
351
+ readonly type: "object";
352
+ readonly additionalProperties: false;
353
+ readonly required: readonly ["statement", "state", "scope", "expiresAt"];
354
+ readonly description: "The mediator's view of one stored grant, as messaging/mux/list and messaging/mux/update return it: the grant statement verbatim, with the state and the effective scope and expiry beside it.";
355
+ readonly properties: {
356
+ readonly statement: {
357
+ readonly $ref: "#/$defs/GrantStatement";
358
+ readonly description: "The grant statement exactly as the member signed it and the mediator stored it, proof included, so either party can re-verify it.";
359
+ };
360
+ readonly state: {
361
+ readonly $ref: "#/$defs/GrantState";
362
+ };
363
+ readonly scope: {
364
+ readonly $ref: "#/$defs/MuxScope";
365
+ readonly description: "The effective scope: the signed scope, or the narrower one messaging/mux/update set.";
366
+ };
367
+ readonly expiresAt: {
368
+ readonly type: "string";
369
+ readonly format: "date-time";
370
+ readonly description: "The effective expiry: the signed `exp` rendered as RFC 3339, or the earlier one messaging/mux/update set.";
371
+ };
372
+ readonly narrowed: {
373
+ readonly type: "boolean";
374
+ readonly description: "True when messaging/mux/update narrowed the effective scope or expiry below what the statement signs.";
375
+ };
376
+ readonly attachedNow: {
377
+ readonly type: "boolean";
378
+ readonly description: "Principal view only: whether the member is attached through this grant to the connection that carried the list request.";
379
+ };
380
+ };
381
+ };
382
+ readonly MuxScope: {
383
+ readonly title: "MuxScope";
384
+ readonly type: "array";
385
+ readonly minItems: 1;
386
+ readonly maxItems: 16;
387
+ readonly items: {
388
+ readonly $ref: "#/$defs/MuxScopeValue";
389
+ };
390
+ 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.";
391
+ };
392
+ readonly MuxScopeValue: {
393
+ readonly title: "MuxScopeValue";
394
+ readonly type: "string";
395
+ readonly enum: readonly ["receive", "pickup", "delete", "send"];
396
+ 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.";
397
+ };
398
+ readonly GrantState: {
399
+ readonly title: "GrantState";
400
+ readonly type: "string";
401
+ readonly enum: readonly ["active", "suspended", "staleKey", "expired", "epochRevoked"];
402
+ readonly description: "A stored grant's state. `active`: valid; the member is attached whenever the principal is connected. `suspended`: the member DID proved control with a key that signed none of its active grants (the unknown-key rule); terminal — the grant cannot be resumed and must be recreated by a fresh member signature. `staleKey`: the key that signed the grant is no longer in the member DID's current authentication relationship; terminal — it does not become active again if the key reappears. `expired`: an active grant past its effective expiry; computed when read, never stored. `epochRevoked`: the member DID advanced its epoch with messaging/mux/revoke-all. A grant revoked with messaging/mux/revoke has no state: it is deleted. A dead grant (every state but `active`) stays listable for the mediator's retention window after its effective expiry, then is pruned.";
403
+ };
404
+ readonly GrantStatement: {
405
+ readonly title: "GrantStatement";
406
+ readonly type: "object";
407
+ readonly additionalProperties: false;
408
+ readonly required: readonly ["type", "issuer", "audience", "grantId", "principal", "scope", "epoch", "iat", "exp", "proof"];
409
+ readonly description: "A member DID's standing statement that the named principal may carry its traffic at this mediator, on any connection, until `exp`, within `scope`, under the member's current `epoch`. Signed by the member with an embedded Data Integrity proof whose purpose is `authentication`, and stored verbatim by the mediator as the only evidence of the delegation.";
410
+ readonly properties: {
411
+ readonly type: {
412
+ readonly type: "string";
413
+ readonly const: "muxGrant";
414
+ readonly description: "Always `muxGrant`; names the statement kind, so a statement of one kind is never accepted as another.";
415
+ };
416
+ readonly issuer: {
417
+ readonly $ref: "#/$defs/MuxDid";
418
+ readonly description: "The member DID: the signer, and the DID the statement concerns.";
419
+ };
420
+ readonly audience: {
421
+ readonly $ref: "#/$defs/MuxDid";
422
+ readonly description: "The mediator's DID. A statement names exactly one mediator and is refused by every other.";
423
+ };
424
+ readonly grantId: {
425
+ readonly $ref: "#/$defs/GrantId";
426
+ };
427
+ readonly principal: {
428
+ readonly $ref: "#/$defs/MuxDid";
429
+ readonly description: "The principal DID that may carry the member's traffic. MUST differ from `issuer`.";
430
+ };
431
+ readonly scope: {
432
+ readonly $ref: "#/$defs/StatementScope";
433
+ };
434
+ readonly epoch: {
435
+ readonly type: "integer";
436
+ readonly minimum: 0;
437
+ readonly description: "The member DID's current epoch at the mediator. Only messaging/mux/revoke-all advances it.";
438
+ };
439
+ readonly iat: {
440
+ readonly type: "integer";
441
+ readonly minimum: 0;
442
+ readonly description: "JWT NumericDate (RFC 7519 §2), whole seconds since 1970-01-01T00:00:00Z UTC: when the statement was signed. MUST NOT be more than 60 seconds in the mediator's future.";
443
+ };
444
+ readonly exp: {
445
+ readonly type: "integer";
446
+ readonly minimum: 0;
447
+ readonly description: "JWT NumericDate (RFC 7519 §2): when the statement stops being accepted. REQUIRED; MUST be after `iat` and in the future.";
448
+ };
449
+ readonly proof: {
450
+ readonly $ref: "#/$defs/MuxDataIntegrityProof";
451
+ };
452
+ };
453
+ };
454
+ readonly MuxDataIntegrityProof: {
455
+ readonly title: "MuxDataIntegrityProof";
456
+ readonly type: "object";
457
+ readonly additionalProperties: false;
458
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
459
+ readonly description: "The W3C Data Integrity proof embedded in a mux statement, made by the member DID: the format and verifier Trust Tasks already use for document proofs (SPEC §4.7). The proof covers the whole statement except `proof` itself, as the cryptosuite defines. Closed: a member Data Integrity defines but this list omits is refused.";
460
+ readonly properties: {
461
+ readonly type: {
462
+ readonly type: "string";
463
+ readonly const: "DataIntegrityProof";
464
+ };
465
+ readonly cryptosuite: {
466
+ readonly type: "string";
467
+ readonly enum: readonly ["eddsa-jcs-2022", "eddsa-rdfc-2022"];
468
+ readonly description: "The W3C Data Integrity EdDSA cryptosuite used.";
469
+ };
470
+ readonly verificationMethod: {
471
+ readonly type: "string";
472
+ readonly minLength: 5;
473
+ readonly maxLength: 2048;
474
+ readonly pattern: "^did:\\S+#\\S+$";
475
+ readonly description: "The DID URL of the verification method that signed. MUST be controlled by the statement's `issuer` and listed in that DID's current `authentication` relationship.";
476
+ };
477
+ readonly proofPurpose: {
478
+ readonly type: "string";
479
+ readonly minLength: 1;
480
+ readonly maxLength: 64;
481
+ readonly description: "MUST be `authentication`. Any other value is refused with `messaging/mux:proofPurposeInvalid` — a proof made for another relationship (an `assertionMethod` credential signature, say) is never accepted as control of the DID.";
482
+ };
483
+ readonly created: {
484
+ readonly type: "string";
485
+ readonly format: "date-time";
486
+ readonly description: "OPTIONAL: when the proof was made, as Data Integrity defines it. Covered by the proof; the statement's own `iat` is what the mediator checks.";
487
+ };
488
+ readonly proofValue: {
489
+ readonly type: "string";
490
+ readonly minLength: 2;
491
+ readonly maxLength: 4096;
492
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
493
+ readonly description: "The multibase (base58btc) signature.";
494
+ };
495
+ };
496
+ };
497
+ readonly StatementScope: {
498
+ readonly title: "StatementScope";
499
+ readonly type: "array";
500
+ readonly maxItems: 16;
501
+ readonly items: {
502
+ readonly $ref: "#/$defs/MuxScopeValue";
503
+ };
504
+ readonly description: "The scope a member DID signs into a statement: a JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses. It MUST NOT be empty; an empty signed scope is refused with the task's `emptyScope` code, never read as \"all\". Unlike MuxScope, emptiness is not a schema failure here, so that the refusal is reported per statement rather than failing the whole batch.";
505
+ };
506
+ readonly MuxDid: {
507
+ readonly title: "MuxDid";
508
+ readonly type: "string";
509
+ readonly minLength: 7;
510
+ readonly maxLength: 2048;
511
+ readonly pattern: "^did:[a-z0-9]+:\\S+$";
512
+ 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.";
513
+ };
514
+ readonly GrantId: {
515
+ readonly title: "GrantId";
516
+ readonly type: "string";
517
+ readonly minLength: 1;
518
+ readonly maxLength: 128;
519
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
520
+ 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.";
521
+ };
522
+ };
523
+ };
524
+ /**
525
+ * SPEC.md §7.2 policy for the request variant, from this specification's
526
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
527
+ * per-specification and cannot be derived from the document alone, and
528
+ * item 2 needs the schema this carries.
529
+ */
530
+ export declare const SPEC: {
531
+ readonly typeUri: "https://trusttasks.org/spec/messaging/mux/update/0.1";
532
+ readonly isBearer: false;
533
+ readonly isProofRequired: true;
534
+ readonly isRecipientRequired: true;
535
+ readonly isIssuedAtRequired: true;
536
+ readonly payloadSchema: {
537
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
538
+ readonly $id: "https://trusttasks.org/spec/messaging/mux/update/0.1";
539
+ readonly title: "Messaging — Mux Update — payload";
540
+ readonly description: "Narrow a stored grant — a smaller scope or an earlier expiry — without a new member signature. Anything that widens is refused. The outer document members are owned by the framework — SPEC §6.3.";
541
+ readonly type: "object";
542
+ readonly additionalProperties: false;
543
+ readonly required: readonly ["grantId"];
544
+ readonly properties: {
545
+ readonly grantId: {
546
+ readonly $ref: "#/$defs/GrantId";
547
+ readonly description: "The grant to narrow.";
548
+ };
549
+ readonly scope: {
550
+ readonly $ref: "#/$defs/MuxScope";
551
+ readonly description: "The new effective scope. MUST be a subset of the grant's current effective scope.";
552
+ };
553
+ readonly expiresAt: {
554
+ readonly type: "string";
555
+ readonly format: "date-time";
556
+ readonly description: "The new effective expiry. MUST be in the future and no later than the grant's current effective expiry.";
557
+ };
558
+ readonly ext: {
559
+ readonly $ref: "#/$defs/Ext";
560
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
561
+ };
562
+ };
563
+ readonly $defs: {
564
+ readonly Response: {
565
+ readonly $anchor: "response";
566
+ readonly title: "Messaging — Mux Update — response payload";
567
+ readonly description: "The success response to a messaging/mux/update request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/mux/update/0.1#response.";
568
+ readonly type: "object";
569
+ readonly additionalProperties: false;
570
+ readonly required: readonly ["grant", "changed"];
571
+ readonly properties: {
572
+ readonly grant: {
573
+ readonly $ref: "#/$defs/GrantView";
574
+ readonly description: "The grant as it now stands.";
575
+ };
576
+ readonly changed: {
577
+ readonly type: "boolean";
578
+ readonly description: "False when the request named the values already in force.";
579
+ };
580
+ readonly ext: {
581
+ readonly $ref: "#/$defs/Ext";
582
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
583
+ };
584
+ };
585
+ };
586
+ readonly Ext: {
587
+ readonly title: "Ext";
588
+ 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.";
589
+ readonly type: "object";
590
+ readonly minProperties: 1;
591
+ readonly additionalProperties: true;
592
+ readonly propertyNames: {
593
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
594
+ };
595
+ };
596
+ readonly GrantView: {
597
+ readonly title: "GrantView";
598
+ readonly type: "object";
599
+ readonly additionalProperties: false;
600
+ readonly required: readonly ["statement", "state", "scope", "expiresAt"];
601
+ readonly description: "The mediator's view of one stored grant, as messaging/mux/list and messaging/mux/update return it: the grant statement verbatim, with the state and the effective scope and expiry beside it.";
602
+ readonly properties: {
603
+ readonly statement: {
604
+ readonly $ref: "#/$defs/GrantStatement";
605
+ readonly description: "The grant statement exactly as the member signed it and the mediator stored it, proof included, so either party can re-verify it.";
606
+ };
607
+ readonly state: {
608
+ readonly $ref: "#/$defs/GrantState";
609
+ };
610
+ readonly scope: {
611
+ readonly $ref: "#/$defs/MuxScope";
612
+ readonly description: "The effective scope: the signed scope, or the narrower one messaging/mux/update set.";
613
+ };
614
+ readonly expiresAt: {
615
+ readonly type: "string";
616
+ readonly format: "date-time";
617
+ readonly description: "The effective expiry: the signed `exp` rendered as RFC 3339, or the earlier one messaging/mux/update set.";
618
+ };
619
+ readonly narrowed: {
620
+ readonly type: "boolean";
621
+ readonly description: "True when messaging/mux/update narrowed the effective scope or expiry below what the statement signs.";
622
+ };
623
+ readonly attachedNow: {
624
+ readonly type: "boolean";
625
+ readonly description: "Principal view only: whether the member is attached through this grant to the connection that carried the list request.";
626
+ };
627
+ };
628
+ };
629
+ readonly MuxScope: {
630
+ readonly title: "MuxScope";
631
+ readonly type: "array";
632
+ readonly minItems: 1;
633
+ readonly maxItems: 16;
634
+ readonly items: {
635
+ readonly $ref: "#/$defs/MuxScopeValue";
636
+ };
637
+ 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.";
638
+ };
639
+ readonly MuxScopeValue: {
640
+ readonly title: "MuxScopeValue";
641
+ readonly type: "string";
642
+ readonly enum: readonly ["receive", "pickup", "delete", "send"];
643
+ 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.";
644
+ };
645
+ readonly GrantState: {
646
+ readonly title: "GrantState";
647
+ readonly type: "string";
648
+ readonly enum: readonly ["active", "suspended", "staleKey", "expired", "epochRevoked"];
649
+ readonly description: "A stored grant's state. `active`: valid; the member is attached whenever the principal is connected. `suspended`: the member DID proved control with a key that signed none of its active grants (the unknown-key rule); terminal — the grant cannot be resumed and must be recreated by a fresh member signature. `staleKey`: the key that signed the grant is no longer in the member DID's current authentication relationship; terminal — it does not become active again if the key reappears. `expired`: an active grant past its effective expiry; computed when read, never stored. `epochRevoked`: the member DID advanced its epoch with messaging/mux/revoke-all. A grant revoked with messaging/mux/revoke has no state: it is deleted. A dead grant (every state but `active`) stays listable for the mediator's retention window after its effective expiry, then is pruned.";
650
+ };
651
+ readonly GrantStatement: {
652
+ readonly title: "GrantStatement";
653
+ readonly type: "object";
654
+ readonly additionalProperties: false;
655
+ readonly required: readonly ["type", "issuer", "audience", "grantId", "principal", "scope", "epoch", "iat", "exp", "proof"];
656
+ readonly description: "A member DID's standing statement that the named principal may carry its traffic at this mediator, on any connection, until `exp`, within `scope`, under the member's current `epoch`. Signed by the member with an embedded Data Integrity proof whose purpose is `authentication`, and stored verbatim by the mediator as the only evidence of the delegation.";
657
+ readonly properties: {
658
+ readonly type: {
659
+ readonly type: "string";
660
+ readonly const: "muxGrant";
661
+ readonly description: "Always `muxGrant`; names the statement kind, so a statement of one kind is never accepted as another.";
662
+ };
663
+ readonly issuer: {
664
+ readonly $ref: "#/$defs/MuxDid";
665
+ readonly description: "The member DID: the signer, and the DID the statement concerns.";
666
+ };
667
+ readonly audience: {
668
+ readonly $ref: "#/$defs/MuxDid";
669
+ readonly description: "The mediator's DID. A statement names exactly one mediator and is refused by every other.";
670
+ };
671
+ readonly grantId: {
672
+ readonly $ref: "#/$defs/GrantId";
673
+ };
674
+ readonly principal: {
675
+ readonly $ref: "#/$defs/MuxDid";
676
+ readonly description: "The principal DID that may carry the member's traffic. MUST differ from `issuer`.";
677
+ };
678
+ readonly scope: {
679
+ readonly $ref: "#/$defs/StatementScope";
680
+ };
681
+ readonly epoch: {
682
+ readonly type: "integer";
683
+ readonly minimum: 0;
684
+ readonly description: "The member DID's current epoch at the mediator. Only messaging/mux/revoke-all advances it.";
685
+ };
686
+ readonly iat: {
687
+ readonly type: "integer";
688
+ readonly minimum: 0;
689
+ readonly description: "JWT NumericDate (RFC 7519 §2), whole seconds since 1970-01-01T00:00:00Z UTC: when the statement was signed. MUST NOT be more than 60 seconds in the mediator's future.";
690
+ };
691
+ readonly exp: {
692
+ readonly type: "integer";
693
+ readonly minimum: 0;
694
+ readonly description: "JWT NumericDate (RFC 7519 §2): when the statement stops being accepted. REQUIRED; MUST be after `iat` and in the future.";
695
+ };
696
+ readonly proof: {
697
+ readonly $ref: "#/$defs/MuxDataIntegrityProof";
698
+ };
699
+ };
700
+ };
701
+ readonly MuxDataIntegrityProof: {
702
+ readonly title: "MuxDataIntegrityProof";
703
+ readonly type: "object";
704
+ readonly additionalProperties: false;
705
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
706
+ readonly description: "The W3C Data Integrity proof embedded in a mux statement, made by the member DID: the format and verifier Trust Tasks already use for document proofs (SPEC §4.7). The proof covers the whole statement except `proof` itself, as the cryptosuite defines. Closed: a member Data Integrity defines but this list omits is refused.";
707
+ readonly properties: {
708
+ readonly type: {
709
+ readonly type: "string";
710
+ readonly const: "DataIntegrityProof";
711
+ };
712
+ readonly cryptosuite: {
713
+ readonly type: "string";
714
+ readonly enum: readonly ["eddsa-jcs-2022", "eddsa-rdfc-2022"];
715
+ readonly description: "The W3C Data Integrity EdDSA cryptosuite used.";
716
+ };
717
+ readonly verificationMethod: {
718
+ readonly type: "string";
719
+ readonly minLength: 5;
720
+ readonly maxLength: 2048;
721
+ readonly pattern: "^did:\\S+#\\S+$";
722
+ readonly description: "The DID URL of the verification method that signed. MUST be controlled by the statement's `issuer` and listed in that DID's current `authentication` relationship.";
723
+ };
724
+ readonly proofPurpose: {
725
+ readonly type: "string";
726
+ readonly minLength: 1;
727
+ readonly maxLength: 64;
728
+ readonly description: "MUST be `authentication`. Any other value is refused with `messaging/mux:proofPurposeInvalid` — a proof made for another relationship (an `assertionMethod` credential signature, say) is never accepted as control of the DID.";
729
+ };
730
+ readonly created: {
731
+ readonly type: "string";
732
+ readonly format: "date-time";
733
+ readonly description: "OPTIONAL: when the proof was made, as Data Integrity defines it. Covered by the proof; the statement's own `iat` is what the mediator checks.";
734
+ };
735
+ readonly proofValue: {
736
+ readonly type: "string";
737
+ readonly minLength: 2;
738
+ readonly maxLength: 4096;
739
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
740
+ readonly description: "The multibase (base58btc) signature.";
741
+ };
742
+ };
743
+ };
744
+ readonly StatementScope: {
745
+ readonly title: "StatementScope";
746
+ readonly type: "array";
747
+ readonly maxItems: 16;
748
+ readonly items: {
749
+ readonly $ref: "#/$defs/MuxScopeValue";
750
+ };
751
+ readonly description: "The scope a member DID signs into a statement: a JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses. It MUST NOT be empty; an empty signed scope is refused with the task's `emptyScope` code, never read as \"all\". Unlike MuxScope, emptiness is not a schema failure here, so that the refusal is reported per statement rather than failing the whole batch.";
752
+ };
753
+ readonly MuxDid: {
754
+ readonly title: "MuxDid";
755
+ readonly type: "string";
756
+ readonly minLength: 7;
757
+ readonly maxLength: 2048;
758
+ readonly pattern: "^did:[a-z0-9]+:\\S+$";
759
+ 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.";
760
+ };
761
+ readonly GrantId: {
762
+ readonly title: "GrantId";
763
+ readonly type: "string";
764
+ readonly minLength: 1;
765
+ readonly maxLength: 128;
766
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
767
+ 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.";
768
+ };
769
+ };
770
+ };
771
+ };
772
+ /**
773
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
774
+ * tracks the *issuer* party's requirement because a response swaps the
775
+ * parties (§7.3 item 5).
776
+ */
777
+ export declare const RESPONSE_SPEC: {
778
+ readonly typeUri: "https://trusttasks.org/spec/messaging/mux/update/0.1#response";
779
+ readonly isBearer: false;
780
+ readonly isProofRequired: false;
781
+ readonly isRecipientRequired: true;
782
+ readonly isIssuedAtRequired: true;
783
+ readonly payloadSchema: {
784
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
785
+ readonly $ref: "#/$defs/Response";
786
+ readonly $defs: {
787
+ readonly Response: {
788
+ readonly $anchor: "response";
789
+ readonly title: "Messaging — Mux Update — response payload";
790
+ readonly description: "The success response to a messaging/mux/update request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/mux/update/0.1#response.";
791
+ readonly type: "object";
792
+ readonly additionalProperties: false;
793
+ readonly required: readonly ["grant", "changed"];
794
+ readonly properties: {
795
+ readonly grant: {
796
+ readonly $ref: "#/$defs/GrantView";
797
+ readonly description: "The grant as it now stands.";
798
+ };
799
+ readonly changed: {
800
+ readonly type: "boolean";
801
+ readonly description: "False when the request named the values already in force.";
802
+ };
803
+ readonly ext: {
804
+ readonly $ref: "#/$defs/Ext";
805
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
806
+ };
807
+ };
808
+ };
809
+ readonly Ext: {
810
+ readonly title: "Ext";
811
+ 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.";
812
+ readonly type: "object";
813
+ readonly minProperties: 1;
814
+ readonly additionalProperties: true;
815
+ readonly propertyNames: {
816
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
817
+ };
818
+ };
819
+ readonly GrantView: {
820
+ readonly title: "GrantView";
821
+ readonly type: "object";
822
+ readonly additionalProperties: false;
823
+ readonly required: readonly ["statement", "state", "scope", "expiresAt"];
824
+ readonly description: "The mediator's view of one stored grant, as messaging/mux/list and messaging/mux/update return it: the grant statement verbatim, with the state and the effective scope and expiry beside it.";
825
+ readonly properties: {
826
+ readonly statement: {
827
+ readonly $ref: "#/$defs/GrantStatement";
828
+ readonly description: "The grant statement exactly as the member signed it and the mediator stored it, proof included, so either party can re-verify it.";
829
+ };
830
+ readonly state: {
831
+ readonly $ref: "#/$defs/GrantState";
832
+ };
833
+ readonly scope: {
834
+ readonly $ref: "#/$defs/MuxScope";
835
+ readonly description: "The effective scope: the signed scope, or the narrower one messaging/mux/update set.";
836
+ };
837
+ readonly expiresAt: {
838
+ readonly type: "string";
839
+ readonly format: "date-time";
840
+ readonly description: "The effective expiry: the signed `exp` rendered as RFC 3339, or the earlier one messaging/mux/update set.";
841
+ };
842
+ readonly narrowed: {
843
+ readonly type: "boolean";
844
+ readonly description: "True when messaging/mux/update narrowed the effective scope or expiry below what the statement signs.";
845
+ };
846
+ readonly attachedNow: {
847
+ readonly type: "boolean";
848
+ readonly description: "Principal view only: whether the member is attached through this grant to the connection that carried the list request.";
849
+ };
850
+ };
851
+ };
852
+ readonly MuxScope: {
853
+ readonly title: "MuxScope";
854
+ readonly type: "array";
855
+ readonly minItems: 1;
856
+ readonly maxItems: 16;
857
+ readonly items: {
858
+ readonly $ref: "#/$defs/MuxScopeValue";
859
+ };
860
+ 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.";
861
+ };
862
+ readonly MuxScopeValue: {
863
+ readonly title: "MuxScopeValue";
864
+ readonly type: "string";
865
+ readonly enum: readonly ["receive", "pickup", "delete", "send"];
866
+ 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.";
867
+ };
868
+ readonly GrantState: {
869
+ readonly title: "GrantState";
870
+ readonly type: "string";
871
+ readonly enum: readonly ["active", "suspended", "staleKey", "expired", "epochRevoked"];
872
+ readonly description: "A stored grant's state. `active`: valid; the member is attached whenever the principal is connected. `suspended`: the member DID proved control with a key that signed none of its active grants (the unknown-key rule); terminal — the grant cannot be resumed and must be recreated by a fresh member signature. `staleKey`: the key that signed the grant is no longer in the member DID's current authentication relationship; terminal — it does not become active again if the key reappears. `expired`: an active grant past its effective expiry; computed when read, never stored. `epochRevoked`: the member DID advanced its epoch with messaging/mux/revoke-all. A grant revoked with messaging/mux/revoke has no state: it is deleted. A dead grant (every state but `active`) stays listable for the mediator's retention window after its effective expiry, then is pruned.";
873
+ };
874
+ readonly GrantStatement: {
875
+ readonly title: "GrantStatement";
876
+ readonly type: "object";
877
+ readonly additionalProperties: false;
878
+ readonly required: readonly ["type", "issuer", "audience", "grantId", "principal", "scope", "epoch", "iat", "exp", "proof"];
879
+ readonly description: "A member DID's standing statement that the named principal may carry its traffic at this mediator, on any connection, until `exp`, within `scope`, under the member's current `epoch`. Signed by the member with an embedded Data Integrity proof whose purpose is `authentication`, and stored verbatim by the mediator as the only evidence of the delegation.";
880
+ readonly properties: {
881
+ readonly type: {
882
+ readonly type: "string";
883
+ readonly const: "muxGrant";
884
+ readonly description: "Always `muxGrant`; names the statement kind, so a statement of one kind is never accepted as another.";
885
+ };
886
+ readonly issuer: {
887
+ readonly $ref: "#/$defs/MuxDid";
888
+ readonly description: "The member DID: the signer, and the DID the statement concerns.";
889
+ };
890
+ readonly audience: {
891
+ readonly $ref: "#/$defs/MuxDid";
892
+ readonly description: "The mediator's DID. A statement names exactly one mediator and is refused by every other.";
893
+ };
894
+ readonly grantId: {
895
+ readonly $ref: "#/$defs/GrantId";
896
+ };
897
+ readonly principal: {
898
+ readonly $ref: "#/$defs/MuxDid";
899
+ readonly description: "The principal DID that may carry the member's traffic. MUST differ from `issuer`.";
900
+ };
901
+ readonly scope: {
902
+ readonly $ref: "#/$defs/StatementScope";
903
+ };
904
+ readonly epoch: {
905
+ readonly type: "integer";
906
+ readonly minimum: 0;
907
+ readonly description: "The member DID's current epoch at the mediator. Only messaging/mux/revoke-all advances it.";
908
+ };
909
+ readonly iat: {
910
+ readonly type: "integer";
911
+ readonly minimum: 0;
912
+ readonly description: "JWT NumericDate (RFC 7519 §2), whole seconds since 1970-01-01T00:00:00Z UTC: when the statement was signed. MUST NOT be more than 60 seconds in the mediator's future.";
913
+ };
914
+ readonly exp: {
915
+ readonly type: "integer";
916
+ readonly minimum: 0;
917
+ readonly description: "JWT NumericDate (RFC 7519 §2): when the statement stops being accepted. REQUIRED; MUST be after `iat` and in the future.";
918
+ };
919
+ readonly proof: {
920
+ readonly $ref: "#/$defs/MuxDataIntegrityProof";
921
+ };
922
+ };
923
+ };
924
+ readonly MuxDataIntegrityProof: {
925
+ readonly title: "MuxDataIntegrityProof";
926
+ readonly type: "object";
927
+ readonly additionalProperties: false;
928
+ readonly required: readonly ["type", "cryptosuite", "verificationMethod", "proofPurpose", "proofValue"];
929
+ readonly description: "The W3C Data Integrity proof embedded in a mux statement, made by the member DID: the format and verifier Trust Tasks already use for document proofs (SPEC §4.7). The proof covers the whole statement except `proof` itself, as the cryptosuite defines. Closed: a member Data Integrity defines but this list omits is refused.";
930
+ readonly properties: {
931
+ readonly type: {
932
+ readonly type: "string";
933
+ readonly const: "DataIntegrityProof";
934
+ };
935
+ readonly cryptosuite: {
936
+ readonly type: "string";
937
+ readonly enum: readonly ["eddsa-jcs-2022", "eddsa-rdfc-2022"];
938
+ readonly description: "The W3C Data Integrity EdDSA cryptosuite used.";
939
+ };
940
+ readonly verificationMethod: {
941
+ readonly type: "string";
942
+ readonly minLength: 5;
943
+ readonly maxLength: 2048;
944
+ readonly pattern: "^did:\\S+#\\S+$";
945
+ readonly description: "The DID URL of the verification method that signed. MUST be controlled by the statement's `issuer` and listed in that DID's current `authentication` relationship.";
946
+ };
947
+ readonly proofPurpose: {
948
+ readonly type: "string";
949
+ readonly minLength: 1;
950
+ readonly maxLength: 64;
951
+ readonly description: "MUST be `authentication`. Any other value is refused with `messaging/mux:proofPurposeInvalid` — a proof made for another relationship (an `assertionMethod` credential signature, say) is never accepted as control of the DID.";
952
+ };
953
+ readonly created: {
954
+ readonly type: "string";
955
+ readonly format: "date-time";
956
+ readonly description: "OPTIONAL: when the proof was made, as Data Integrity defines it. Covered by the proof; the statement's own `iat` is what the mediator checks.";
957
+ };
958
+ readonly proofValue: {
959
+ readonly type: "string";
960
+ readonly minLength: 2;
961
+ readonly maxLength: 4096;
962
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
963
+ readonly description: "The multibase (base58btc) signature.";
964
+ };
965
+ };
966
+ };
967
+ readonly StatementScope: {
968
+ readonly title: "StatementScope";
969
+ readonly type: "array";
970
+ readonly maxItems: 16;
971
+ readonly items: {
972
+ readonly $ref: "#/$defs/MuxScopeValue";
973
+ };
974
+ readonly description: "The scope a member DID signs into a statement: a JSON array of MuxScopeValue, compared as a set — order is not significant and a repeated value collapses. It MUST NOT be empty; an empty signed scope is refused with the task's `emptyScope` code, never read as \"all\". Unlike MuxScope, emptiness is not a schema failure here, so that the refusal is reported per statement rather than failing the whole batch.";
975
+ };
976
+ readonly MuxDid: {
977
+ readonly title: "MuxDid";
978
+ readonly type: "string";
979
+ readonly minLength: 7;
980
+ readonly maxLength: 2048;
981
+ readonly pattern: "^did:[a-z0-9]+:\\S+$";
982
+ 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.";
983
+ };
984
+ readonly GrantId: {
985
+ readonly title: "GrantId";
986
+ readonly type: "string";
987
+ readonly minLength: 1;
988
+ readonly maxLength: 128;
989
+ readonly pattern: "^[A-Za-z0-9._:-]+$";
990
+ 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.";
991
+ };
992
+ };
993
+ };
994
+ };
995
+ //# sourceMappingURL=payload.d.ts.map