@openvtc/trust-tasks 0.26.3 → 0.26.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/dist/_shared/components.d.ts +47 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.1/blobs.d.ts +1 -1
- package/dist/rooms/_shared/0.1/blobs.d.ts.map +1 -1
- package/dist/rooms/blobs/get/0.2/payload.d.ts +1005 -0
- package/dist/rooms/blobs/get/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/get/0.2/payload.js +559 -0
- package/dist/rooms/blobs/get/0.2/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/abort/0.2/payload.d.ts +263 -0
- package/dist/rooms/blobs/upload/abort/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/abort/0.2/payload.js +151 -0
- package/dist/rooms/blobs/upload/abort/0.2/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/begin/0.2/payload.d.ts +1191 -0
- package/dist/rooms/blobs/upload/begin/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/begin/0.2/payload.js +659 -0
- package/dist/rooms/blobs/upload/begin/0.2/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/chunk/0.2/payload.d.ts +459 -0
- package/dist/rooms/blobs/upload/chunk/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/chunk/0.2/payload.js +256 -0
- package/dist/rooms/blobs/upload/chunk/0.2/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/commit/0.2/payload.d.ts +326 -0
- package/dist/rooms/blobs/upload/commit/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/commit/0.2/payload.js +185 -0
- package/dist/rooms/blobs/upload/commit/0.2/payload.js.map +1 -0
- package/dist/rooms/keys/act/0.1/payload.d.ts +546 -0
- package/dist/rooms/keys/act/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/act/0.1/payload.js +305 -0
- package/dist/rooms/keys/act/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/seal/0.2/payload.d.ts +368 -0
- package/dist/rooms/keys/seal/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/seal/0.2/payload.js +205 -0
- package/dist/rooms/keys/seal/0.2/payload.js.map +1 -0
- package/dist/rooms/owner/group/renew/0.1/payload.d.ts +299 -0
- package/dist/rooms/owner/group/renew/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/group/renew/0.1/payload.js +163 -0
- package/dist/rooms/owner/group/renew/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +47 -0
- package/src/index.ts +8 -0
- package/src/rooms/_shared/0.1/blobs.ts +1 -1
- package/src/rooms/blobs/get/0.2/payload.ts +625 -0
- package/src/rooms/blobs/upload/abort/0.2/payload.ts +187 -0
- package/src/rooms/blobs/upload/begin/0.2/payload.ts +731 -0
- package/src/rooms/blobs/upload/chunk/0.2/payload.ts +304 -0
- package/src/rooms/blobs/upload/commit/0.2/payload.ts +224 -0
- package/src/rooms/keys/act/0.1/payload.ts +380 -0
- package/src/rooms/keys/seal/0.2/payload.ts +256 -0
- package/src/rooms/owner/group/renew/0.1/payload.ts +213 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/blobs/get/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAG1O;;GAEG;AACH,MAAM,WAA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
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/blobs/get/0.2";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/blobs/get/0.2#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/rooms/blobs/get/0.2",
|
|
21
|
+
"title": "Rooms Blobs — Get — payload",
|
|
22
|
+
"description": "Open a download of one blob committed in a data room: the host returns its ciphertext manifest and either a time-limited storage URL for the object (direct) or a handle for fetching its chunks through the host (proxied). The outer document members are owned by the framework — SPEC §6.3.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"roomId",
|
|
27
|
+
"presentation",
|
|
28
|
+
"blobRef"
|
|
29
|
+
],
|
|
30
|
+
"properties": {
|
|
31
|
+
"roomId": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"maxLength": 2048,
|
|
34
|
+
"description": "The room the blob belongs to. The host verifies the presentation against credentials this identifier issued."
|
|
35
|
+
},
|
|
36
|
+
"presentation": {
|
|
37
|
+
"$ref": "#/$defs/AuthorityPresentation",
|
|
38
|
+
"description": "Must confer the `read` action at this room's scope. Its leaf's subject must be the party the host authenticated for this request."
|
|
39
|
+
},
|
|
40
|
+
"blobRef": {
|
|
41
|
+
"$ref": "#/$defs/BlobRef",
|
|
42
|
+
"description": "The blob to fetch, as the record's `blobs` member names it."
|
|
43
|
+
},
|
|
44
|
+
"direct": {
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"description": "True when the producer accepts a storage URL for the object. Absent or false: the host answers in proxied mode."
|
|
47
|
+
},
|
|
48
|
+
"ext": {
|
|
49
|
+
"$ref": "#/$defs/Ext"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"$defs": {
|
|
53
|
+
"Response": {
|
|
54
|
+
"$anchor": "response",
|
|
55
|
+
"title": "Rooms Blobs — Get — response payload",
|
|
56
|
+
"description": "Success response to rooms/blobs/get. Type https://trusttasks.org/spec/rooms/blobs/get/0.2#response.",
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": [
|
|
60
|
+
"mode",
|
|
61
|
+
"manifest",
|
|
62
|
+
"expiresAt"
|
|
63
|
+
],
|
|
64
|
+
"properties": {
|
|
65
|
+
"mode": {
|
|
66
|
+
"$ref": "#/$defs/TransferMode",
|
|
67
|
+
"description": "`direct`: fetch the object over `target`. `proxied`: fetch its chunks with rooms/blobs/chunk under `downloadId`."
|
|
68
|
+
},
|
|
69
|
+
"manifest": {
|
|
70
|
+
"$ref": "#/$defs/BlobManifest",
|
|
71
|
+
"description": "The ciphertext manifest committed at upload. A reader MUST check that its digest equals the requested BlobRef before relying on it, and every chunk against it on arrival."
|
|
72
|
+
},
|
|
73
|
+
"downloadId": {
|
|
74
|
+
"$ref": "#/$defs/TransferId",
|
|
75
|
+
"description": "Proxied mode only: the download handle for rooms/blobs/chunk. Absent in direct mode."
|
|
76
|
+
},
|
|
77
|
+
"target": {
|
|
78
|
+
"$ref": "#/$defs/TransferTarget",
|
|
79
|
+
"description": "Direct mode only: a GET for the one object holding this blob, expiring within minutes. Ranged requests MAY be permitted. Absent in proxied mode."
|
|
80
|
+
},
|
|
81
|
+
"expiresAt": {
|
|
82
|
+
"$ref": "#/$defs/ExpiresAt",
|
|
83
|
+
"description": "When the handle (proxied) or the target (direct) stops being honoured."
|
|
84
|
+
},
|
|
85
|
+
"ext": {
|
|
86
|
+
"$ref": "#/$defs/Ext"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"Ext": {
|
|
91
|
+
"title": "Ext",
|
|
92
|
+
"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.",
|
|
93
|
+
"type": "object",
|
|
94
|
+
"minProperties": 1,
|
|
95
|
+
"additionalProperties": true,
|
|
96
|
+
"propertyNames": {
|
|
97
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"ExpiresAt": {
|
|
101
|
+
"title": "ExpiresAt",
|
|
102
|
+
"description": "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.",
|
|
103
|
+
"type": "string",
|
|
104
|
+
"format": "date-time"
|
|
105
|
+
},
|
|
106
|
+
"TransferTarget": {
|
|
107
|
+
"title": "TransferTarget",
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": [
|
|
111
|
+
"index",
|
|
112
|
+
"method",
|
|
113
|
+
"url",
|
|
114
|
+
"expiresAt"
|
|
115
|
+
],
|
|
116
|
+
"description": "One time-limited URL at the room's storage, issued by the host for one object and one method. A bearer credential for its lifetime: whoever holds it may perform exactly that request. A host MUST bind it to one object, one method and — for a write — the part's exact length and checksum, so that storage itself refuses any other bytes, and MUST give it the shortest practical lifetime, never more than 5 minutes. No party logs it.",
|
|
117
|
+
"properties": {
|
|
118
|
+
"index": {
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"minimum": 0,
|
|
121
|
+
"maximum": 1023,
|
|
122
|
+
"description": "The part this target writes, or 0 for a read of the whole object."
|
|
123
|
+
},
|
|
124
|
+
"method": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"enum": [
|
|
127
|
+
"PUT",
|
|
128
|
+
"GET"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"url": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"format": "uri",
|
|
134
|
+
"pattern": "^https://",
|
|
135
|
+
"maxLength": 8192,
|
|
136
|
+
"description": "Where to send the request. HTTPS only."
|
|
137
|
+
},
|
|
138
|
+
"headers": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"maxProperties": 16,
|
|
141
|
+
"additionalProperties": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"maxLength": 1024
|
|
144
|
+
},
|
|
145
|
+
"propertyNames": {
|
|
146
|
+
"maxLength": 128
|
|
147
|
+
},
|
|
148
|
+
"description": "Headers the request MUST carry exactly as given — for a write, the part's length and checksum, which the URL's signature covers. A client adds nothing the storage would treat as signed."
|
|
149
|
+
},
|
|
150
|
+
"expiresAt": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"format": "date-time",
|
|
153
|
+
"description": "When the storage stops honouring the URL. A request begun after it is refused by the storage."
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"TransferId": {
|
|
158
|
+
"title": "TransferId",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
161
|
+
"description": "Handle for one upload (begin → chunk → commit or abort) or one download (get → chunk). Host-generated and unguessable, which is what lets a reference to another party's transfer be answered as not-found without confirming that it exists. Bound at creation to the party that opened it: the subject the host authenticated for the opening request. Opaque: a producer quotes what it was given."
|
|
162
|
+
},
|
|
163
|
+
"BlobManifest": {
|
|
164
|
+
"title": "BlobManifest",
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": [
|
|
168
|
+
"size",
|
|
169
|
+
"chunks",
|
|
170
|
+
"digest"
|
|
171
|
+
],
|
|
172
|
+
"description": "The ciphertext manifest of one blob, committed by the uploader before any byte moves. Its digest is the BlobRef. Every chunk is checked against `chunks.chunkDigests` on arrival and the reassembled blob against `digest`, so a host can neither accept nor serve bytes the uploader did not commit to. The manifest also appears, by its BlobRef, inside the sealed FileManifest the author signs; a reader who opens the record therefore knows which ciphertext its author meant, and a host cannot substitute a different blob under the same record.\n\nConsistency rules JSON Schema cannot state: `chunks.chunkCount` MUST equal ceil(size / chunks.chunkSize), and `chunks.chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.\n\nEach transfer chunk is exactly one sealed STREAM segment (see FileManifest): every chunk but the last is `chunkSize` bytes, and `chunkSize` is the plaintext segment size plus the 16-byte AEAD tag. The 262144-byte ceiling of ChunkSize therefore puts the largest plaintext segment at 262128 bytes, and the 4096-chunk ceiling of ChunkCount puts the largest blob at 1 GiB of ciphertext.",
|
|
173
|
+
"properties": {
|
|
174
|
+
"size": {
|
|
175
|
+
"$ref": "#/$defs/ExpectedSizeBytes",
|
|
176
|
+
"description": "Ciphertext bytes, padding included. What the host stores, and what every limit and usage figure is stated in."
|
|
177
|
+
},
|
|
178
|
+
"chunks": {
|
|
179
|
+
"$ref": "#/$defs/ChunkManifest"
|
|
180
|
+
},
|
|
181
|
+
"digest": {
|
|
182
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
183
|
+
"description": "Digest of the whole ciphertext, over its bytes. Checked after reassembly, so a correct set of chunks in the wrong order is still caught."
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"DigestMultibase": {
|
|
188
|
+
"title": "DigestMultibase",
|
|
189
|
+
"description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 16,
|
|
192
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
193
|
+
"examples": [
|
|
194
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"ChunkManifest": {
|
|
198
|
+
"title": "ChunkManifest",
|
|
199
|
+
"description": "The terms of a `chunkedTrustTask` transfer, committed before any chunk moves. On export the recipient states them in the descriptor; on import the producer pre-commits them in the request and the recipient echoes them. Either way the manifest arrives in a document whose proof is REQUIRED, so the per-chunk digests are authenticated by the party that computed them and each chunk can be verified — and a single bad chunk re-fetched or refused — on arrival rather than only after reassembly.\n\nConsistency rules JSON Schema cannot state: `chunkCount` MUST equal ceil(expectedSizeBytes / chunkSize) for the bundle the manifest describes, and `chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.",
|
|
200
|
+
"type": "object",
|
|
201
|
+
"additionalProperties": false,
|
|
202
|
+
"required": [
|
|
203
|
+
"chunkSize",
|
|
204
|
+
"chunkCount",
|
|
205
|
+
"chunkDigests"
|
|
206
|
+
],
|
|
207
|
+
"properties": {
|
|
208
|
+
"chunkSize": {
|
|
209
|
+
"$ref": "#/$defs/ChunkSize"
|
|
210
|
+
},
|
|
211
|
+
"chunkCount": {
|
|
212
|
+
"$ref": "#/$defs/ChunkCount"
|
|
213
|
+
},
|
|
214
|
+
"chunkDigests": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"minItems": 1,
|
|
217
|
+
"maxItems": 4096,
|
|
218
|
+
"description": "Digest of each chunk's raw bytes (not of its base64url encoding), in index order. Compared as decoded multihash bytes, never as encoded strings. sha2-256 is RECOMMENDED and MUST be implemented by every party; a party that does not implement the hash a digest names MUST treat the manifest as unverifiable rather than skip the check.",
|
|
219
|
+
"items": {
|
|
220
|
+
"$ref": "#/$defs/DigestMultibase"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"ChunkCount": {
|
|
226
|
+
"title": "ChunkCount",
|
|
227
|
+
"description": "Number of chunks in the bundle, equal to ceil(expectedSizeBytes / chunkSize). Bounded at 4096 so that the manifest itself — one digest per chunk — fits in the single document that carries it under the same message-size reasoning as a chunk.",
|
|
228
|
+
"type": "integer",
|
|
229
|
+
"minimum": 1,
|
|
230
|
+
"maximum": 4096
|
|
231
|
+
},
|
|
232
|
+
"ChunkSize": {
|
|
233
|
+
"title": "ChunkSize",
|
|
234
|
+
"description": "Size in bytes of every chunk except the last, which carries the remainder and is between 1 and this value inclusive. The ceiling of 262144 (256 KiB) is normative and is derived in `vta/backup/initiate-export/1.1` under Chunked transfer: it is the largest power of two whose `get-chunk` or `put-chunk` document still fits a 1 MiB mediator message after base64url encoding of `data`, DIDComm authcrypt encoding, and two nested forward wrappers. The floor of 16384 keeps a 1 GiB bundle within `ChunkCount`'s ceiling at sizes a constrained transport can still choose.",
|
|
235
|
+
"type": "integer",
|
|
236
|
+
"minimum": 16384,
|
|
237
|
+
"maximum": 262144
|
|
238
|
+
},
|
|
239
|
+
"ExpectedSizeBytes": {
|
|
240
|
+
"title": "ExpectedSizeBytes",
|
|
241
|
+
"description": "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.",
|
|
242
|
+
"type": "integer",
|
|
243
|
+
"minimum": 1
|
|
244
|
+
},
|
|
245
|
+
"TransferMode": {
|
|
246
|
+
"title": "TransferMode",
|
|
247
|
+
"type": "string",
|
|
248
|
+
"enum": [
|
|
249
|
+
"direct",
|
|
250
|
+
"proxied"
|
|
251
|
+
],
|
|
252
|
+
"description": "How a blob's bytes move. `proxied`: through the host, as chunk documents (rooms/blobs/upload/chunk, rooms/blobs/chunk). `direct`: straight between the member and the storage the room is assigned to, over time-limited URLs the host issues for one object and one method each; the host authorizes every object and verifies every upload, and never carries a byte. Which mode applies is the host's answer, from what the producer accepts, what the room's storage can do, and the room's tier."
|
|
253
|
+
},
|
|
254
|
+
"BlobRef": {
|
|
255
|
+
"title": "BlobRef",
|
|
256
|
+
"description": "The name of one blob: the digest of its BlobManifest, taken over the manifest's RFC 8785 (JCS) canonicalization. sha2-256 is RECOMMENDED and MUST be implemented. Content addressing over ciphertext, never plaintext, so a BlobRef says nothing about what the file contains, and two uploads of one file have different BlobRefs (a fresh `fileId` gives a different key, and so different ciphertext). Rooms cannot be correlated by the files they share. Compared as decoded multihash bytes, never as encoded strings. A BlobRef is defined over the manifest's JSON, as this schema states it and RFC 8785 canonicalizes it, never over any binding's generated type: two bindings that model the manifest as distinct types still compute the same BlobRef from the same JSON.",
|
|
257
|
+
"$ref": "#/$defs/DigestMultibase"
|
|
258
|
+
},
|
|
259
|
+
"AuthorityPresentation": {
|
|
260
|
+
"title": "AuthorityPresentation",
|
|
261
|
+
"type": "object",
|
|
262
|
+
"additionalProperties": false,
|
|
263
|
+
"required": [
|
|
264
|
+
"membership",
|
|
265
|
+
"authority"
|
|
266
|
+
],
|
|
267
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
268
|
+
"properties": {
|
|
269
|
+
"membership": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
272
|
+
},
|
|
273
|
+
"authority": {
|
|
274
|
+
"type": "array",
|
|
275
|
+
"minItems": 1,
|
|
276
|
+
"maxItems": 8,
|
|
277
|
+
"items": {
|
|
278
|
+
"type": "string"
|
|
279
|
+
},
|
|
280
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
281
|
+
},
|
|
282
|
+
"subjectBinding": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
291
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
292
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
293
|
+
"$ref": "#/$defs/Response",
|
|
294
|
+
"$defs": {
|
|
295
|
+
"Response": {
|
|
296
|
+
"$anchor": "response",
|
|
297
|
+
"title": "Rooms Blobs — Get — response payload",
|
|
298
|
+
"description": "Success response to rooms/blobs/get. Type https://trusttasks.org/spec/rooms/blobs/get/0.2#response.",
|
|
299
|
+
"type": "object",
|
|
300
|
+
"additionalProperties": false,
|
|
301
|
+
"required": [
|
|
302
|
+
"mode",
|
|
303
|
+
"manifest",
|
|
304
|
+
"expiresAt"
|
|
305
|
+
],
|
|
306
|
+
"properties": {
|
|
307
|
+
"mode": {
|
|
308
|
+
"$ref": "#/$defs/TransferMode",
|
|
309
|
+
"description": "`direct`: fetch the object over `target`. `proxied`: fetch its chunks with rooms/blobs/chunk under `downloadId`."
|
|
310
|
+
},
|
|
311
|
+
"manifest": {
|
|
312
|
+
"$ref": "#/$defs/BlobManifest",
|
|
313
|
+
"description": "The ciphertext manifest committed at upload. A reader MUST check that its digest equals the requested BlobRef before relying on it, and every chunk against it on arrival."
|
|
314
|
+
},
|
|
315
|
+
"downloadId": {
|
|
316
|
+
"$ref": "#/$defs/TransferId",
|
|
317
|
+
"description": "Proxied mode only: the download handle for rooms/blobs/chunk. Absent in direct mode."
|
|
318
|
+
},
|
|
319
|
+
"target": {
|
|
320
|
+
"$ref": "#/$defs/TransferTarget",
|
|
321
|
+
"description": "Direct mode only: a GET for the one object holding this blob, expiring within minutes. Ranged requests MAY be permitted. Absent in proxied mode."
|
|
322
|
+
},
|
|
323
|
+
"expiresAt": {
|
|
324
|
+
"$ref": "#/$defs/ExpiresAt",
|
|
325
|
+
"description": "When the handle (proxied) or the target (direct) stops being honoured."
|
|
326
|
+
},
|
|
327
|
+
"ext": {
|
|
328
|
+
"$ref": "#/$defs/Ext"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"Ext": {
|
|
333
|
+
"title": "Ext",
|
|
334
|
+
"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.",
|
|
335
|
+
"type": "object",
|
|
336
|
+
"minProperties": 1,
|
|
337
|
+
"additionalProperties": true,
|
|
338
|
+
"propertyNames": {
|
|
339
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"ExpiresAt": {
|
|
343
|
+
"title": "ExpiresAt",
|
|
344
|
+
"description": "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.",
|
|
345
|
+
"type": "string",
|
|
346
|
+
"format": "date-time"
|
|
347
|
+
},
|
|
348
|
+
"TransferTarget": {
|
|
349
|
+
"title": "TransferTarget",
|
|
350
|
+
"type": "object",
|
|
351
|
+
"additionalProperties": false,
|
|
352
|
+
"required": [
|
|
353
|
+
"index",
|
|
354
|
+
"method",
|
|
355
|
+
"url",
|
|
356
|
+
"expiresAt"
|
|
357
|
+
],
|
|
358
|
+
"description": "One time-limited URL at the room's storage, issued by the host for one object and one method. A bearer credential for its lifetime: whoever holds it may perform exactly that request. A host MUST bind it to one object, one method and — for a write — the part's exact length and checksum, so that storage itself refuses any other bytes, and MUST give it the shortest practical lifetime, never more than 5 minutes. No party logs it.",
|
|
359
|
+
"properties": {
|
|
360
|
+
"index": {
|
|
361
|
+
"type": "integer",
|
|
362
|
+
"minimum": 0,
|
|
363
|
+
"maximum": 1023,
|
|
364
|
+
"description": "The part this target writes, or 0 for a read of the whole object."
|
|
365
|
+
},
|
|
366
|
+
"method": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"enum": [
|
|
369
|
+
"PUT",
|
|
370
|
+
"GET"
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"url": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"format": "uri",
|
|
376
|
+
"pattern": "^https://",
|
|
377
|
+
"maxLength": 8192,
|
|
378
|
+
"description": "Where to send the request. HTTPS only."
|
|
379
|
+
},
|
|
380
|
+
"headers": {
|
|
381
|
+
"type": "object",
|
|
382
|
+
"maxProperties": 16,
|
|
383
|
+
"additionalProperties": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"maxLength": 1024
|
|
386
|
+
},
|
|
387
|
+
"propertyNames": {
|
|
388
|
+
"maxLength": 128
|
|
389
|
+
},
|
|
390
|
+
"description": "Headers the request MUST carry exactly as given — for a write, the part's length and checksum, which the URL's signature covers. A client adds nothing the storage would treat as signed."
|
|
391
|
+
},
|
|
392
|
+
"expiresAt": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"format": "date-time",
|
|
395
|
+
"description": "When the storage stops honouring the URL. A request begun after it is refused by the storage."
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"TransferId": {
|
|
400
|
+
"title": "TransferId",
|
|
401
|
+
"type": "string",
|
|
402
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
403
|
+
"description": "Handle for one upload (begin → chunk → commit or abort) or one download (get → chunk). Host-generated and unguessable, which is what lets a reference to another party's transfer be answered as not-found without confirming that it exists. Bound at creation to the party that opened it: the subject the host authenticated for the opening request. Opaque: a producer quotes what it was given."
|
|
404
|
+
},
|
|
405
|
+
"BlobManifest": {
|
|
406
|
+
"title": "BlobManifest",
|
|
407
|
+
"type": "object",
|
|
408
|
+
"additionalProperties": false,
|
|
409
|
+
"required": [
|
|
410
|
+
"size",
|
|
411
|
+
"chunks",
|
|
412
|
+
"digest"
|
|
413
|
+
],
|
|
414
|
+
"description": "The ciphertext manifest of one blob, committed by the uploader before any byte moves. Its digest is the BlobRef. Every chunk is checked against `chunks.chunkDigests` on arrival and the reassembled blob against `digest`, so a host can neither accept nor serve bytes the uploader did not commit to. The manifest also appears, by its BlobRef, inside the sealed FileManifest the author signs; a reader who opens the record therefore knows which ciphertext its author meant, and a host cannot substitute a different blob under the same record.\n\nConsistency rules JSON Schema cannot state: `chunks.chunkCount` MUST equal ceil(size / chunks.chunkSize), and `chunks.chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.\n\nEach transfer chunk is exactly one sealed STREAM segment (see FileManifest): every chunk but the last is `chunkSize` bytes, and `chunkSize` is the plaintext segment size plus the 16-byte AEAD tag. The 262144-byte ceiling of ChunkSize therefore puts the largest plaintext segment at 262128 bytes, and the 4096-chunk ceiling of ChunkCount puts the largest blob at 1 GiB of ciphertext.",
|
|
415
|
+
"properties": {
|
|
416
|
+
"size": {
|
|
417
|
+
"$ref": "#/$defs/ExpectedSizeBytes",
|
|
418
|
+
"description": "Ciphertext bytes, padding included. What the host stores, and what every limit and usage figure is stated in."
|
|
419
|
+
},
|
|
420
|
+
"chunks": {
|
|
421
|
+
"$ref": "#/$defs/ChunkManifest"
|
|
422
|
+
},
|
|
423
|
+
"digest": {
|
|
424
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
425
|
+
"description": "Digest of the whole ciphertext, over its bytes. Checked after reassembly, so a correct set of chunks in the wrong order is still caught."
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"DigestMultibase": {
|
|
430
|
+
"title": "DigestMultibase",
|
|
431
|
+
"description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
|
|
432
|
+
"type": "string",
|
|
433
|
+
"minLength": 16,
|
|
434
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
435
|
+
"examples": [
|
|
436
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
437
|
+
]
|
|
438
|
+
},
|
|
439
|
+
"ChunkManifest": {
|
|
440
|
+
"title": "ChunkManifest",
|
|
441
|
+
"description": "The terms of a `chunkedTrustTask` transfer, committed before any chunk moves. On export the recipient states them in the descriptor; on import the producer pre-commits them in the request and the recipient echoes them. Either way the manifest arrives in a document whose proof is REQUIRED, so the per-chunk digests are authenticated by the party that computed them and each chunk can be verified — and a single bad chunk re-fetched or refused — on arrival rather than only after reassembly.\n\nConsistency rules JSON Schema cannot state: `chunkCount` MUST equal ceil(expectedSizeBytes / chunkSize) for the bundle the manifest describes, and `chunkDigests` MUST have exactly `chunkCount` items. A party receiving a manifest violating either MUST refuse it.",
|
|
442
|
+
"type": "object",
|
|
443
|
+
"additionalProperties": false,
|
|
444
|
+
"required": [
|
|
445
|
+
"chunkSize",
|
|
446
|
+
"chunkCount",
|
|
447
|
+
"chunkDigests"
|
|
448
|
+
],
|
|
449
|
+
"properties": {
|
|
450
|
+
"chunkSize": {
|
|
451
|
+
"$ref": "#/$defs/ChunkSize"
|
|
452
|
+
},
|
|
453
|
+
"chunkCount": {
|
|
454
|
+
"$ref": "#/$defs/ChunkCount"
|
|
455
|
+
},
|
|
456
|
+
"chunkDigests": {
|
|
457
|
+
"type": "array",
|
|
458
|
+
"minItems": 1,
|
|
459
|
+
"maxItems": 4096,
|
|
460
|
+
"description": "Digest of each chunk's raw bytes (not of its base64url encoding), in index order. Compared as decoded multihash bytes, never as encoded strings. sha2-256 is RECOMMENDED and MUST be implemented by every party; a party that does not implement the hash a digest names MUST treat the manifest as unverifiable rather than skip the check.",
|
|
461
|
+
"items": {
|
|
462
|
+
"$ref": "#/$defs/DigestMultibase"
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"ChunkCount": {
|
|
468
|
+
"title": "ChunkCount",
|
|
469
|
+
"description": "Number of chunks in the bundle, equal to ceil(expectedSizeBytes / chunkSize). Bounded at 4096 so that the manifest itself — one digest per chunk — fits in the single document that carries it under the same message-size reasoning as a chunk.",
|
|
470
|
+
"type": "integer",
|
|
471
|
+
"minimum": 1,
|
|
472
|
+
"maximum": 4096
|
|
473
|
+
},
|
|
474
|
+
"ChunkSize": {
|
|
475
|
+
"title": "ChunkSize",
|
|
476
|
+
"description": "Size in bytes of every chunk except the last, which carries the remainder and is between 1 and this value inclusive. The ceiling of 262144 (256 KiB) is normative and is derived in `vta/backup/initiate-export/1.1` under Chunked transfer: it is the largest power of two whose `get-chunk` or `put-chunk` document still fits a 1 MiB mediator message after base64url encoding of `data`, DIDComm authcrypt encoding, and two nested forward wrappers. The floor of 16384 keeps a 1 GiB bundle within `ChunkCount`'s ceiling at sizes a constrained transport can still choose.",
|
|
477
|
+
"type": "integer",
|
|
478
|
+
"minimum": 16384,
|
|
479
|
+
"maximum": 262144
|
|
480
|
+
},
|
|
481
|
+
"ExpectedSizeBytes": {
|
|
482
|
+
"title": "ExpectedSizeBytes",
|
|
483
|
+
"description": "Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.",
|
|
484
|
+
"type": "integer",
|
|
485
|
+
"minimum": 1
|
|
486
|
+
},
|
|
487
|
+
"TransferMode": {
|
|
488
|
+
"title": "TransferMode",
|
|
489
|
+
"type": "string",
|
|
490
|
+
"enum": [
|
|
491
|
+
"direct",
|
|
492
|
+
"proxied"
|
|
493
|
+
],
|
|
494
|
+
"description": "How a blob's bytes move. `proxied`: through the host, as chunk documents (rooms/blobs/upload/chunk, rooms/blobs/chunk). `direct`: straight between the member and the storage the room is assigned to, over time-limited URLs the host issues for one object and one method each; the host authorizes every object and verifies every upload, and never carries a byte. Which mode applies is the host's answer, from what the producer accepts, what the room's storage can do, and the room's tier."
|
|
495
|
+
},
|
|
496
|
+
"BlobRef": {
|
|
497
|
+
"title": "BlobRef",
|
|
498
|
+
"description": "The name of one blob: the digest of its BlobManifest, taken over the manifest's RFC 8785 (JCS) canonicalization. sha2-256 is RECOMMENDED and MUST be implemented. Content addressing over ciphertext, never plaintext, so a BlobRef says nothing about what the file contains, and two uploads of one file have different BlobRefs (a fresh `fileId` gives a different key, and so different ciphertext). Rooms cannot be correlated by the files they share. Compared as decoded multihash bytes, never as encoded strings. A BlobRef is defined over the manifest's JSON, as this schema states it and RFC 8785 canonicalizes it, never over any binding's generated type: two bindings that model the manifest as distinct types still compute the same BlobRef from the same JSON.",
|
|
499
|
+
"$ref": "#/$defs/DigestMultibase"
|
|
500
|
+
},
|
|
501
|
+
"AuthorityPresentation": {
|
|
502
|
+
"title": "AuthorityPresentation",
|
|
503
|
+
"type": "object",
|
|
504
|
+
"additionalProperties": false,
|
|
505
|
+
"required": [
|
|
506
|
+
"membership",
|
|
507
|
+
"authority"
|
|
508
|
+
],
|
|
509
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
510
|
+
"properties": {
|
|
511
|
+
"membership": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
514
|
+
},
|
|
515
|
+
"authority": {
|
|
516
|
+
"type": "array",
|
|
517
|
+
"minItems": 1,
|
|
518
|
+
"maxItems": 8,
|
|
519
|
+
"items": {
|
|
520
|
+
"type": "string"
|
|
521
|
+
},
|
|
522
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
523
|
+
},
|
|
524
|
+
"subjectBinding": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
534
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
535
|
+
* per-specification and cannot be derived from the document alone, and
|
|
536
|
+
* item 2 needs the schema this carries.
|
|
537
|
+
*/
|
|
538
|
+
export const SPEC = {
|
|
539
|
+
typeUri: TYPE_URI,
|
|
540
|
+
isBearer: false,
|
|
541
|
+
isProofRequired: true,
|
|
542
|
+
isRecipientRequired: true,
|
|
543
|
+
isIssuedAtRequired: true,
|
|
544
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
545
|
+
};
|
|
546
|
+
/**
|
|
547
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
548
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
549
|
+
* parties (§7.3 item 5).
|
|
550
|
+
*/
|
|
551
|
+
export const RESPONSE_SPEC = {
|
|
552
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
553
|
+
isBearer: false,
|
|
554
|
+
isProofRequired: false,
|
|
555
|
+
isRecipientRequired: true,
|
|
556
|
+
isIssuedAtRequired: true,
|
|
557
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
558
|
+
};
|
|
559
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/blobs/get/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,iDAA0D,CAAC;AAKnF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,0DAAmE,CAAC;AAKrG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,6BAA6B;IACtC,aAAa,EAAE,iSAAiS;IAChT,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,cAAc;QACd,SAAS;KACV;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,IAAI;YACjB,aAAa,EAAE,8GAA8G;SAC9H;QACD,cAAc,EAAE;YACd,MAAM,EAAE,+BAA+B;YACvC,aAAa,EAAE,mIAAmI;SACnJ;QACD,SAAS,EAAE;YACT,MAAM,EAAE,iBAAiB;YACzB,aA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