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