@openvtc/trust-tasks 0.19.6 → 0.19.8
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 +57 -0
- package/dist/_shared/components.d.ts +91 -4
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/keys/create/0.1/payload.d.ts +8 -8
- package/dist/keys/create/0.1/payload.d.ts.map +1 -1
- package/dist/keys/create/0.1/payload.js +8 -4
- package/dist/keys/create/0.1/payload.js.map +1 -1
- package/dist/keys/derive-and-sign/0.1/payload.d.ts +16 -16
- package/dist/keys/derive-and-sign/0.1/payload.d.ts.map +1 -1
- package/dist/keys/derive-and-sign/0.1/payload.js +16 -8
- package/dist/keys/derive-and-sign/0.1/payload.js.map +1 -1
- package/dist/keys/derive-and-sign-document/0.1/payload.d.ts +8 -8
- package/dist/keys/derive-and-sign-document/0.1/payload.d.ts.map +1 -1
- package/dist/keys/derive-and-sign-document/0.1/payload.js +8 -4
- package/dist/keys/derive-and-sign-document/0.1/payload.js.map +1 -1
- package/dist/keys/export-secret/0.1/payload.d.ts +8 -8
- package/dist/keys/export-secret/0.1/payload.d.ts.map +1 -1
- package/dist/keys/export-secret/0.1/payload.js +8 -4
- package/dist/keys/export-secret/0.1/payload.js.map +1 -1
- package/dist/keys/import/0.1/payload.d.ts +8 -8
- package/dist/keys/import/0.1/payload.d.ts.map +1 -1
- package/dist/keys/import/0.1/payload.js +8 -4
- package/dist/keys/import/0.1/payload.js.map +1 -1
- package/dist/keys/list/0.1/payload.d.ts +8 -8
- package/dist/keys/list/0.1/payload.d.ts.map +1 -1
- package/dist/keys/list/0.1/payload.js +8 -4
- package/dist/keys/list/0.1/payload.js.map +1 -1
- package/dist/keys/set-exportability/0.1/payload.d.ts +8 -8
- package/dist/keys/set-exportability/0.1/payload.d.ts.map +1 -1
- package/dist/keys/set-exportability/0.1/payload.js +8 -4
- package/dist/keys/set-exportability/0.1/payload.js.map +1 -1
- package/dist/keys/show/0.1/payload.d.ts +8 -8
- package/dist/keys/show/0.1/payload.d.ts.map +1 -1
- package/dist/keys/show/0.1/payload.js +8 -4
- package/dist/keys/show/0.1/payload.js.map +1 -1
- package/dist/keys/sign/0.1/payload.d.ts +8 -8
- package/dist/keys/sign/0.1/payload.d.ts.map +1 -1
- package/dist/keys/sign/0.1/payload.js +8 -4
- package/dist/keys/sign/0.1/payload.js.map +1 -1
- package/dist/vta/_shared/0.1/backup-transfer.d.ts +18 -0
- package/dist/vta/_shared/0.1/backup-transfer.d.ts.map +1 -0
- package/dist/vta/_shared/0.1/backup-transfer.js +6 -0
- package/dist/vta/_shared/0.1/backup-transfer.js.map +1 -0
- package/dist/vta/backup/finalize-import/1.1/payload.d.ts +477 -0
- package/dist/vta/backup/finalize-import/1.1/payload.d.ts.map +1 -0
- package/dist/vta/backup/finalize-import/1.1/payload.js +249 -0
- package/dist/vta/backup/finalize-import/1.1/payload.js.map +1 -0
- package/dist/vta/backup/get-chunk/1.0/payload.d.ts +461 -0
- package/dist/vta/backup/get-chunk/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/get-chunk/1.0/payload.js +250 -0
- package/dist/vta/backup/get-chunk/1.0/payload.js.map +1 -0
- package/dist/vta/backup/initiate-export/1.1/payload.d.ts +896 -0
- package/dist/vta/backup/initiate-export/1.1/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-export/1.1/payload.js +507 -0
- package/dist/vta/backup/initiate-export/1.1/payload.js.map +1 -0
- package/dist/vta/backup/initiate-import/1.1/payload.d.ts +888 -0
- package/dist/vta/backup/initiate-import/1.1/payload.d.ts.map +1 -0
- package/dist/vta/backup/initiate-import/1.1/payload.js +504 -0
- package/dist/vta/backup/initiate-import/1.1/payload.js.map +1 -0
- package/dist/vta/backup/put-chunk/1.0/payload.d.ts +495 -0
- package/dist/vta/backup/put-chunk/1.0/payload.d.ts.map +1 -0
- package/dist/vta/backup/put-chunk/1.0/payload.js +265 -0
- package/dist/vta/backup/put-chunk/1.0/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +91 -4
- package/src/index.ts +6 -0
- package/src/keys/create/0.1/payload.ts +8 -4
- package/src/keys/derive-and-sign/0.1/payload.ts +16 -8
- package/src/keys/derive-and-sign-document/0.1/payload.ts +8 -4
- package/src/keys/export-secret/0.1/payload.ts +8 -4
- package/src/keys/import/0.1/payload.ts +8 -4
- package/src/keys/list/0.1/payload.ts +8 -4
- package/src/keys/set-exportability/0.1/payload.ts +8 -4
- package/src/keys/show/0.1/payload.ts +8 -4
- package/src/keys/sign/0.1/payload.ts +8 -4
- package/src/vta/_shared/0.1/backup-transfer.ts +19 -0
- package/src/vta/backup/finalize-import/1.1/payload.ts +333 -0
- package/src/vta/backup/get-chunk/1.0/payload.ts +308 -0
- package/src/vta/backup/initiate-export/1.1/payload.ts +564 -0
- package/src/vta/backup/initiate-import/1.1/payload.ts +561 -0
- package/src/vta/backup/put-chunk/1.0/payload.ts +331 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/backup/put-chunk/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/backup/put-chunk/1.0";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/backup/put-chunk/1.0#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/vta/backup/put-chunk/1.0",
|
|
21
|
+
"title": "VTA Backup — Put Chunk — payload",
|
|
22
|
+
"description": "Writes one chunk of a `chunkedTrustTask` import bundle, by index, into a slot opened by initiate-import. Idempotent for identical bytes; bytes that do not match the pre-committed manifest are refused. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"bundleId",
|
|
27
|
+
"index",
|
|
28
|
+
"digestMultibase",
|
|
29
|
+
"data"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"bundleId": {
|
|
33
|
+
"$ref": "#/$defs/BundleId",
|
|
34
|
+
"description": "Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one."
|
|
35
|
+
},
|
|
36
|
+
"index": {
|
|
37
|
+
"$ref": "#/$defs/ChunkIndex",
|
|
38
|
+
"description": "Which chunk. Zero-based, below the manifest's chunkCount."
|
|
39
|
+
},
|
|
40
|
+
"digestMultibase": {
|
|
41
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
42
|
+
"description": "Digest of this chunk's raw bytes, restating the manifest entry for `index`. Restated so that a chunk sent to the wrong index is refused as a mismatch against the manifest at the index it names, rather than surviving until reassembly — the recipient checks this member against the manifest and `data` against both."
|
|
43
|
+
},
|
|
44
|
+
"data": {
|
|
45
|
+
"$ref": "#/$defs/ChunkData"
|
|
46
|
+
},
|
|
47
|
+
"ext": {
|
|
48
|
+
"$ref": "#/$defs/Ext",
|
|
49
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"$defs": {
|
|
53
|
+
"Response": {
|
|
54
|
+
"$anchor": "response",
|
|
55
|
+
"title": "VTA Backup Put Chunk — response payload",
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": [
|
|
59
|
+
"bundleId",
|
|
60
|
+
"index",
|
|
61
|
+
"stored",
|
|
62
|
+
"remainingCount",
|
|
63
|
+
"expiresAt"
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"bundleId": {
|
|
67
|
+
"$ref": "#/$defs/BundleId",
|
|
68
|
+
"description": "Echoed so the response stands alone as the acknowledgement of one write."
|
|
69
|
+
},
|
|
70
|
+
"index": {
|
|
71
|
+
"$ref": "#/$defs/ChunkIndex",
|
|
72
|
+
"description": "Echoed, so an acknowledgement arriving out of order is attributable to its write."
|
|
73
|
+
},
|
|
74
|
+
"stored": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"description": "Whether this request is what stored the chunk. False means the recipient already held identical bytes at this index — a success, not a failure, and the reason a write can be retried safely. Required rather than optional: an absent member on an idempotent repeat would be indistinguishable from a first write."
|
|
77
|
+
},
|
|
78
|
+
"remainingCount": {
|
|
79
|
+
"type": "integer",
|
|
80
|
+
"minimum": 0,
|
|
81
|
+
"maximum": 4095,
|
|
82
|
+
"description": "How many indices the slot still lacks after this write. Zero means the upload is complete and finalize-import can be sent."
|
|
83
|
+
},
|
|
84
|
+
"expiresAt": {
|
|
85
|
+
"$ref": "#/$defs/ExpiresAt",
|
|
86
|
+
"description": "The slot's current expiry, after any extension this write earned."
|
|
87
|
+
},
|
|
88
|
+
"ext": {
|
|
89
|
+
"$ref": "#/$defs/Ext",
|
|
90
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"Ext": {
|
|
95
|
+
"title": "Ext",
|
|
96
|
+
"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.",
|
|
97
|
+
"type": "object",
|
|
98
|
+
"minProperties": 1,
|
|
99
|
+
"additionalProperties": true,
|
|
100
|
+
"propertyNames": {
|
|
101
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"ExpiresAt": {
|
|
105
|
+
"title": "ExpiresAt",
|
|
106
|
+
"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.",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"format": "date-time"
|
|
109
|
+
},
|
|
110
|
+
"ChunkIndex": {
|
|
111
|
+
"title": "ChunkIndex",
|
|
112
|
+
"description": "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.",
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"minimum": 0,
|
|
115
|
+
"maximum": 4095
|
|
116
|
+
},
|
|
117
|
+
"BundleId": {
|
|
118
|
+
"title": "BundleId",
|
|
119
|
+
"description": "Handle for a bundle across its whole lifecycle. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.",
|
|
120
|
+
"type": "string",
|
|
121
|
+
"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}$"
|
|
122
|
+
},
|
|
123
|
+
"ChunkData": {
|
|
124
|
+
"title": "ChunkData",
|
|
125
|
+
"description": "The chunk's bytes, base64url-encoded without padding (RFC 4648 §5). Bounded at 349526 characters, the unpadded encoding of a 262144-byte chunk. These are bytes of the encrypted bundle, so a chunk read in isolation reveals nothing of the agent's state — but a complete set of chunks is the export, and is to be handled as such.",
|
|
126
|
+
"type": "string",
|
|
127
|
+
"minLength": 2,
|
|
128
|
+
"maxLength": 349526,
|
|
129
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
130
|
+
},
|
|
131
|
+
"DigestMultibase": {
|
|
132
|
+
"title": "DigestMultibase",
|
|
133
|
+
"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`.",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 16,
|
|
136
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
137
|
+
"examples": [
|
|
138
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
144
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
145
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
146
|
+
"$ref": "#/$defs/Response",
|
|
147
|
+
"$defs": {
|
|
148
|
+
"Response": {
|
|
149
|
+
"$anchor": "response",
|
|
150
|
+
"title": "VTA Backup Put Chunk — response payload",
|
|
151
|
+
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"required": [
|
|
154
|
+
"bundleId",
|
|
155
|
+
"index",
|
|
156
|
+
"stored",
|
|
157
|
+
"remainingCount",
|
|
158
|
+
"expiresAt"
|
|
159
|
+
],
|
|
160
|
+
"properties": {
|
|
161
|
+
"bundleId": {
|
|
162
|
+
"$ref": "#/$defs/BundleId",
|
|
163
|
+
"description": "Echoed so the response stands alone as the acknowledgement of one write."
|
|
164
|
+
},
|
|
165
|
+
"index": {
|
|
166
|
+
"$ref": "#/$defs/ChunkIndex",
|
|
167
|
+
"description": "Echoed, so an acknowledgement arriving out of order is attributable to its write."
|
|
168
|
+
},
|
|
169
|
+
"stored": {
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"description": "Whether this request is what stored the chunk. False means the recipient already held identical bytes at this index — a success, not a failure, and the reason a write can be retried safely. Required rather than optional: an absent member on an idempotent repeat would be indistinguishable from a first write."
|
|
172
|
+
},
|
|
173
|
+
"remainingCount": {
|
|
174
|
+
"type": "integer",
|
|
175
|
+
"minimum": 0,
|
|
176
|
+
"maximum": 4095,
|
|
177
|
+
"description": "How many indices the slot still lacks after this write. Zero means the upload is complete and finalize-import can be sent."
|
|
178
|
+
},
|
|
179
|
+
"expiresAt": {
|
|
180
|
+
"$ref": "#/$defs/ExpiresAt",
|
|
181
|
+
"description": "The slot's current expiry, after any extension this write earned."
|
|
182
|
+
},
|
|
183
|
+
"ext": {
|
|
184
|
+
"$ref": "#/$defs/Ext",
|
|
185
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"Ext": {
|
|
190
|
+
"title": "Ext",
|
|
191
|
+
"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.",
|
|
192
|
+
"type": "object",
|
|
193
|
+
"minProperties": 1,
|
|
194
|
+
"additionalProperties": true,
|
|
195
|
+
"propertyNames": {
|
|
196
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"ExpiresAt": {
|
|
200
|
+
"title": "ExpiresAt",
|
|
201
|
+
"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.",
|
|
202
|
+
"type": "string",
|
|
203
|
+
"format": "date-time"
|
|
204
|
+
},
|
|
205
|
+
"ChunkIndex": {
|
|
206
|
+
"title": "ChunkIndex",
|
|
207
|
+
"description": "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.",
|
|
208
|
+
"type": "integer",
|
|
209
|
+
"minimum": 0,
|
|
210
|
+
"maximum": 4095
|
|
211
|
+
},
|
|
212
|
+
"BundleId": {
|
|
213
|
+
"title": "BundleId",
|
|
214
|
+
"description": "Handle for a bundle across its whole lifecycle. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.",
|
|
215
|
+
"type": "string",
|
|
216
|
+
"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}$"
|
|
217
|
+
},
|
|
218
|
+
"ChunkData": {
|
|
219
|
+
"title": "ChunkData",
|
|
220
|
+
"description": "The chunk's bytes, base64url-encoded without padding (RFC 4648 §5). Bounded at 349526 characters, the unpadded encoding of a 262144-byte chunk. These are bytes of the encrypted bundle, so a chunk read in isolation reveals nothing of the agent's state — but a complete set of chunks is the export, and is to be handled as such.",
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 2,
|
|
223
|
+
"maxLength": 349526,
|
|
224
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
225
|
+
},
|
|
226
|
+
"DigestMultibase": {
|
|
227
|
+
"title": "DigestMultibase",
|
|
228
|
+
"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`.",
|
|
229
|
+
"type": "string",
|
|
230
|
+
"minLength": 16,
|
|
231
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
232
|
+
"examples": [
|
|
233
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
240
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
241
|
+
* per-specification and cannot be derived from the document alone, and
|
|
242
|
+
* item 2 needs the schema this carries.
|
|
243
|
+
*/
|
|
244
|
+
export const SPEC = {
|
|
245
|
+
typeUri: TYPE_URI,
|
|
246
|
+
isBearer: false,
|
|
247
|
+
isProofRequired: true,
|
|
248
|
+
isRecipientRequired: true,
|
|
249
|
+
isIssuedAtRequired: true,
|
|
250
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
254
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
255
|
+
* parties (§7.3 item 5).
|
|
256
|
+
*/
|
|
257
|
+
export const RESPONSE_SPEC = {
|
|
258
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
259
|
+
isBearer: false,
|
|
260
|
+
isProofRequired: false,
|
|
261
|
+
isRecipientRequired: true,
|
|
262
|
+
isIssuedAtRequired: true,
|
|
263
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
264
|
+
};
|
|
265
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/backup/put-chunk/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC;AAKxF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,+DAAwE,CAAC;AAK1G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,sDAAsD;IAC7D,O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AAE,UAAU;YACnB,aAAa,EAAE,mRAAmR;YAClS,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,+EAA+E;SAC3F;QACD,WAAW,EAAE;YACX,OAAO,EAAE,WAAW;YACpB,aAAa,EAAE,wUAAwU;YACvV,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,MAAM;YACnB,SAAS,EAAE,kBAAkB;SAC9B;QACD,iBAAiB,EAAE;YACjB,OAAO,EAAE,iBAAiB;YAC1B,aAAa,EAAE,gnDAAgnD;YAC/nD,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,EAAE;YACf,SAAS,EAAE,4CAA4C;YACvD,UAAU,EAAE;gBACV,iDAAiD;aAClD;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -42,6 +42,14 @@ export type AuditAction =
|
|
|
42
42
|
| "accountChangeQueueLimits"
|
|
43
43
|
| "adminAdd"
|
|
44
44
|
| "adminStrip";
|
|
45
|
+
/**
|
|
46
|
+
* The control-plane account of a bundle transfer: which algorithm, on what terms, until when. Exactly one of the two shapes — they are mutually exclusive, since StreamDescriptor requires `transportUrl` and `transportToken` and forbids `chunks`, and ChunkedDescriptor requires `chunks` and forbids both.
|
|
47
|
+
*/
|
|
48
|
+
export type BundleDescriptor = StreamDescriptor | ChunkedDescriptor;
|
|
49
|
+
/**
|
|
50
|
+
* Handle for a bundle across its whole lifecycle. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.
|
|
51
|
+
*/
|
|
52
|
+
export type BundleId = string;
|
|
45
53
|
/**
|
|
46
54
|
* A calendar date, `YYYY-MM-DD` (RFC 3339 full-date), with no time or zone. Compared as a UTC date.
|
|
47
55
|
*/
|
|
@@ -82,6 +90,22 @@ export type Capability_DeviceV0_2 =
|
|
|
82
90
|
| "memoryWrite"
|
|
83
91
|
| "roomPresent"
|
|
84
92
|
| "roomOpen";
|
|
93
|
+
/**
|
|
94
|
+
* 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.
|
|
95
|
+
*/
|
|
96
|
+
export type ChunkCount = number;
|
|
97
|
+
/**
|
|
98
|
+
* The chunk's bytes, base64url-encoded without padding (RFC 4648 §5). Bounded at 349526 characters, the unpadded encoding of a 262144-byte chunk. These are bytes of the encrypted bundle, so a chunk read in isolation reveals nothing of the agent's state — but a complete set of chunks is the export, and is to be handled as such.
|
|
99
|
+
*/
|
|
100
|
+
export type ChunkData = string;
|
|
101
|
+
/**
|
|
102
|
+
* Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.
|
|
103
|
+
*/
|
|
104
|
+
export type ChunkIndex = number;
|
|
105
|
+
/**
|
|
106
|
+
* 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.
|
|
107
|
+
*/
|
|
108
|
+
export type ChunkSize = number;
|
|
85
109
|
/**
|
|
86
110
|
* The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.
|
|
87
111
|
*
|
|
@@ -165,6 +189,14 @@ export type DigestMultibase = string;
|
|
|
165
189
|
* Whether the subject is permitted. The ABSENCE of any grant is treated as `deny` (default-deny).
|
|
166
190
|
*/
|
|
167
191
|
export type Effect_ConsentV0_1 = "allow" | "deny";
|
|
192
|
+
/**
|
|
193
|
+
* Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0 descriptor published rather than moved to DigestMultibase, because it is an unchanged member of an existing descriptor and re-encoding it would break every stream producer for no gain in what it checks. For a chunked transfer it is the check over the reassembled bundle, applied after every chunk has verified individually, so that a correct set of chunks assembled in the wrong order is still caught.
|
|
194
|
+
*/
|
|
195
|
+
export type ExpectedSha256 = string;
|
|
196
|
+
/**
|
|
197
|
+
* Total byte count of the bundle. A zero-length bundle is not a degenerate success — nothing was serialized — so the floor is 1.
|
|
198
|
+
*/
|
|
199
|
+
export type ExpectedSizeBytes = number;
|
|
168
200
|
/**
|
|
169
201
|
* Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.
|
|
170
202
|
*/
|
|
@@ -173,6 +205,10 @@ export type ExpectedVersion_PersonaV0_1 = number;
|
|
|
173
205
|
* Optimistic-concurrency precondition on a write. A positive value requires that the record's current `version` equals it exactly. Zero means "create only" — the write applies only if no LIVE record exists at the address, which is what makes lease acquisition safe: without it two instances can each read "absent", each write, and each believe it won. A tombstone is not a live record, so `expectedVersion: 0` succeeds over one; the created record takes the namespace's next counter value, which is necessarily greater than the tombstone's.
|
|
174
206
|
*/
|
|
175
207
|
export type ExpectedVersion_VtaV0_1 = number;
|
|
208
|
+
/**
|
|
209
|
+
* 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.
|
|
210
|
+
*/
|
|
211
|
+
export type ExpiresAt = string;
|
|
176
212
|
/**
|
|
177
213
|
* A colour **name**, resolved by each consumer against its own palette — never a hex value or any other literal. Two reasons, and both are about the consumer rather than the holder. A literal cannot be legible in a terminal, in a light theme and in a dark one at once, so a stored `#8B0000` is a colour that is wrong somewhere and the holder has no way to know where. And a consumer that reserves colours to mean something — an error, a warning, an irreversible act — must be able to keep a holder's decorative choice out of that channel; it cannot do that with an arbitrary value, and it can do it trivially with a closed set it maps itself. The eight members are chosen to be distinguishable from one another and deliberately carry no status connotation: none is named for success, warning or danger.
|
|
178
214
|
*/
|
|
@@ -210,9 +246,9 @@ export type KeyOrigin = "derived" | "imported" | "internal";
|
|
|
210
246
|
*/
|
|
211
247
|
export type KeyStatus = "active" | "revoked";
|
|
212
248
|
/**
|
|
213
|
-
* Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256).
|
|
249
|
+
* Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support.
|
|
214
250
|
*/
|
|
215
|
-
export type KeyType = "ed25519" | "x25519" | "p256";
|
|
251
|
+
export type KeyType = "ed25519" | "x25519" | "p256" | "mldsa44" | "mldsa65";
|
|
216
252
|
/**
|
|
217
253
|
* The interaction kind: a 1:1 direct message, a multi-party group, or a broadcast channel.
|
|
218
254
|
*/
|
|
@@ -459,9 +495,9 @@ export type Sensitivity = "normal" | "high";
|
|
|
459
495
|
*/
|
|
460
496
|
export type ServiceKind = "didcomm" | "rest" | "tsp" | "webauthn";
|
|
461
497
|
/**
|
|
462
|
-
* `EdDSA` pairs with an `ed25519` key; `ES256` pairs with a `p256` key. An `x25519` key performs key agreement and can sign nothing, so no algorithm here is valid for one. The
|
|
498
|
+
* `EdDSA` pairs with an `ed25519` key; `ES256` pairs with a `p256` key; `ML-DSA-44` and `ML-DSA-65` pair with `mldsa44` and `mldsa65` keys respectively. An `x25519` key performs key agreement and can sign nothing, so no algorithm here is valid for one. These are JOSE algorithm identifiers, externally owned, so they are carried verbatim and never re-cased (SPEC.md §4.10 rule 5); the ML-DSA names are those RFC 9964 registers in the JOSE Web Signature and Encryption Algorithms registry, which is why their hyphenated casing differs from the `keyType` values beside them — those are specification-defined. The set is expected to grow as algorithms are registered. The enumeration remains closed: an unrecognised algorithm is refused rather than silently substituted with a supported one.
|
|
463
499
|
*/
|
|
464
|
-
export type SignAlgorithm = "EdDSA" | "ES256";
|
|
500
|
+
export type SignAlgorithm = "EdDSA" | "ES256" | "ML-DSA-44" | "ML-DSA-65";
|
|
465
501
|
/**
|
|
466
502
|
* A single binding target for a vault entry. Tagged union over the discriminator `kind`. A VaultEntry's `targets` array MAY mix any number of these.
|
|
467
503
|
*/
|
|
@@ -1249,6 +1285,36 @@ export interface CapabilityManifest {
|
|
|
1249
1285
|
configSchema?: string;
|
|
1250
1286
|
ext?: Ext;
|
|
1251
1287
|
}
|
|
1288
|
+
/**
|
|
1289
|
+
* 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.
|
|
1290
|
+
*
|
|
1291
|
+
* Consistency 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.
|
|
1292
|
+
*/
|
|
1293
|
+
export interface ChunkManifest {
|
|
1294
|
+
chunkSize: ChunkSize;
|
|
1295
|
+
chunkCount: ChunkCount;
|
|
1296
|
+
/**
|
|
1297
|
+
* 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.
|
|
1298
|
+
*
|
|
1299
|
+
* @minItems 1
|
|
1300
|
+
* @maxItems 4096
|
|
1301
|
+
*/
|
|
1302
|
+
chunkDigests: [DigestMultibase, ...DigestMultibase[]];
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* A descriptor for the `chunkedTrustTask` algorithm. Carries no address and no bearer token: every chunk moves in a Trust Task document whose sender the transport authenticates, so possession of a token would add nothing and would be one more secret to leak.
|
|
1306
|
+
*/
|
|
1307
|
+
export interface ChunkedDescriptor {
|
|
1308
|
+
bundleId: BundleId;
|
|
1309
|
+
/**
|
|
1310
|
+
* Discriminates this shape from StreamDescriptor.
|
|
1311
|
+
*/
|
|
1312
|
+
algorithm: "chunkedTrustTask";
|
|
1313
|
+
chunks: ChunkManifest;
|
|
1314
|
+
expectedSha256: ExpectedSha256;
|
|
1315
|
+
expectedSizeBytes: ExpectedSizeBytes;
|
|
1316
|
+
expiresAt: ExpiresAt;
|
|
1317
|
+
}
|
|
1252
1318
|
/**
|
|
1253
1319
|
* A community profile as a portable export carries it — the mutable profile members plus the immutable identity they belong to.
|
|
1254
1320
|
*
|
|
@@ -3445,6 +3511,27 @@ export interface StepUpProof_VaultV0_2 {
|
|
|
3445
3511
|
*/
|
|
3446
3512
|
challengeId: string;
|
|
3447
3513
|
}
|
|
3514
|
+
/**
|
|
3515
|
+
* A descriptor for a transfer that happens outside Trust Task documents, at an address the recipient publishes — the `stream` algorithm, and any other algorithm a recipient offers that is shaped as an address plus a bearer credential. Identical in members to the `vta/backup/* /1.0` descriptor.
|
|
3516
|
+
*/
|
|
3517
|
+
export interface StreamDescriptor {
|
|
3518
|
+
bundleId: BundleId;
|
|
3519
|
+
/**
|
|
3520
|
+
* The mechanism in use. Never `chunkedTrustTask`, which has its own descriptor shape; a descriptor naming it with a transport address is malformed.
|
|
3521
|
+
*/
|
|
3522
|
+
algorithm: string;
|
|
3523
|
+
/**
|
|
3524
|
+
* Where to fetch (export) or write (import) the bytes. A recipient with no address at which it is reachable cannot produce this and refuses with transportUnavailable rather than returning an unusable one. An import address is write-only: staged bytes are never served back from it.
|
|
3525
|
+
*/
|
|
3526
|
+
transportUrl: string;
|
|
3527
|
+
/**
|
|
3528
|
+
* Bearer credential for transportUrl, presented in the X-Backup-Token header. Minted per bundle and never reused. A recipient should store only a hash of it, and should accept an export token once.
|
|
3529
|
+
*/
|
|
3530
|
+
transportToken: string;
|
|
3531
|
+
expectedSha256: ExpectedSha256;
|
|
3532
|
+
expectedSizeBytes: ExpectedSizeBytes;
|
|
3533
|
+
expiresAt: ExpiresAt;
|
|
3534
|
+
}
|
|
3448
3535
|
/**
|
|
3449
3536
|
* An access token (typically short-lived JWT) paired with an optional refresh token (typically long-lived opaque string). The shapes follow OAuth 2.0 (RFC 6749 §5.1) conventions but are not coupled to any particular OAuth profile.
|
|
3450
3537
|
*/
|
package/src/index.ts
CHANGED
|
@@ -335,6 +335,7 @@ export * as VettingSession_v0_1 from "./vetting/session/0.1/payload.js";
|
|
|
335
335
|
export * as VrcRelationshipsIssue_v0_1 from "./vrc/relationships/issue/0.1/payload.js";
|
|
336
336
|
export * as VrcRelationshipsPropose_v0_1 from "./vrc/relationships/propose/0.1/payload.js";
|
|
337
337
|
export * as AppStateRecordShared_v0_1 from "./vta/_shared/0.1/app-state-record.js";
|
|
338
|
+
export * as BackupTransferShared_v0_1 from "./vta/_shared/0.1/backup-transfer.js";
|
|
338
339
|
export * as ContextShared_v0_1 from "./vta/_shared/0.1/context.js";
|
|
339
340
|
export * as DidTemplateShared_v0_1 from "./vta/_shared/0.1/did-template.js";
|
|
340
341
|
export * as PasskeyVmShared_v0_1 from "./vta/_shared/0.1/passkey-vm.js";
|
|
@@ -349,8 +350,13 @@ export * as VtaAppStatePut_v1_0 from "./vta/app-state/put/1.0/payload.js";
|
|
|
349
350
|
export * as VtaBackupAbort_v1_0 from "./vta/backup/abort/1.0/payload.js";
|
|
350
351
|
export * as VtaBackupCompleteExport_v1_0 from "./vta/backup/complete-export/1.0/payload.js";
|
|
351
352
|
export * as VtaBackupFinalizeImport_v1_0 from "./vta/backup/finalize-import/1.0/payload.js";
|
|
353
|
+
export * as VtaBackupFinalizeImport_v1_1 from "./vta/backup/finalize-import/1.1/payload.js";
|
|
354
|
+
export * as VtaBackupGetChunk_v1_0 from "./vta/backup/get-chunk/1.0/payload.js";
|
|
352
355
|
export * as VtaBackupInitiateExport_v1_0 from "./vta/backup/initiate-export/1.0/payload.js";
|
|
356
|
+
export * as VtaBackupInitiateExport_v1_1 from "./vta/backup/initiate-export/1.1/payload.js";
|
|
353
357
|
export * as VtaBackupInitiateImport_v1_0 from "./vta/backup/initiate-import/1.0/payload.js";
|
|
358
|
+
export * as VtaBackupInitiateImport_v1_1 from "./vta/backup/initiate-import/1.1/payload.js";
|
|
359
|
+
export * as VtaBackupPutChunk_v1_0 from "./vta/backup/put-chunk/1.0/payload.js";
|
|
354
360
|
export * as VtaContextsCreate_v1_0 from "./vta/contexts/create/1.0/payload.js";
|
|
355
361
|
export * as VtaContextsDelete_v1_0 from "./vta/contexts/delete/1.0/payload.js";
|
|
356
362
|
export * as VtaContextsDidTemplatesCreate_v1_0 from "./vta/contexts/did-templates/create/1.0/payload.js";
|
|
@@ -247,9 +247,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
247
247
|
"enum": [
|
|
248
248
|
"ed25519",
|
|
249
249
|
"x25519",
|
|
250
|
-
"p256"
|
|
250
|
+
"p256",
|
|
251
|
+
"mldsa44",
|
|
252
|
+
"mldsa65"
|
|
251
253
|
],
|
|
252
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
254
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
} as const;
|
|
@@ -383,9 +385,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
383
385
|
"enum": [
|
|
384
386
|
"ed25519",
|
|
385
387
|
"x25519",
|
|
386
|
-
"p256"
|
|
388
|
+
"p256",
|
|
389
|
+
"mldsa44",
|
|
390
|
+
"mldsa65"
|
|
387
391
|
],
|
|
388
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
392
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
389
393
|
}
|
|
390
394
|
}
|
|
391
395
|
} as const;
|
|
@@ -151,9 +151,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
151
151
|
"type": "string",
|
|
152
152
|
"enum": [
|
|
153
153
|
"EdDSA",
|
|
154
|
-
"ES256"
|
|
154
|
+
"ES256",
|
|
155
|
+
"ML-DSA-44",
|
|
156
|
+
"ML-DSA-65"
|
|
155
157
|
],
|
|
156
|
-
"description": "`EdDSA` pairs with an `ed25519` key; `ES256` pairs with a `p256` key. An `x25519` key performs key agreement and can sign nothing, so no algorithm here is valid for one. The
|
|
158
|
+
"description": "`EdDSA` pairs with an `ed25519` key; `ES256` pairs with a `p256` key; `ML-DSA-44` and `ML-DSA-65` pair with `mldsa44` and `mldsa65` keys respectively. An `x25519` key performs key agreement and can sign nothing, so no algorithm here is valid for one. These are JOSE algorithm identifiers, externally owned, so they are carried verbatim and never re-cased (SPEC.md §4.10 rule 5); the ML-DSA names are those RFC 9964 registers in the JOSE Web Signature and Encryption Algorithms registry, which is why their hyphenated casing differs from the `keyType` values beside them — those are specification-defined. The set is expected to grow as algorithms are registered. The enumeration remains closed: an unrecognised algorithm is refused rather than silently substituted with a supported one."
|
|
157
159
|
},
|
|
158
160
|
"KeyType": {
|
|
159
161
|
"title": "KeyType",
|
|
@@ -161,9 +163,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
161
163
|
"enum": [
|
|
162
164
|
"ed25519",
|
|
163
165
|
"x25519",
|
|
164
|
-
"p256"
|
|
166
|
+
"p256",
|
|
167
|
+
"mldsa44",
|
|
168
|
+
"mldsa65"
|
|
165
169
|
],
|
|
166
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
170
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
167
171
|
}
|
|
168
172
|
}
|
|
169
173
|
} as const;
|
|
@@ -216,9 +220,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
216
220
|
"type": "string",
|
|
217
221
|
"enum": [
|
|
218
222
|
"EdDSA",
|
|
219
|
-
"ES256"
|
|
223
|
+
"ES256",
|
|
224
|
+
"ML-DSA-44",
|
|
225
|
+
"ML-DSA-65"
|
|
220
226
|
],
|
|
221
|
-
"description": "`EdDSA` pairs with an `ed25519` key; `ES256` pairs with a `p256` key. An `x25519` key performs key agreement and can sign nothing, so no algorithm here is valid for one. The
|
|
227
|
+
"description": "`EdDSA` pairs with an `ed25519` key; `ES256` pairs with a `p256` key; `ML-DSA-44` and `ML-DSA-65` pair with `mldsa44` and `mldsa65` keys respectively. An `x25519` key performs key agreement and can sign nothing, so no algorithm here is valid for one. These are JOSE algorithm identifiers, externally owned, so they are carried verbatim and never re-cased (SPEC.md §4.10 rule 5); the ML-DSA names are those RFC 9964 registers in the JOSE Web Signature and Encryption Algorithms registry, which is why their hyphenated casing differs from the `keyType` values beside them — those are specification-defined. The set is expected to grow as algorithms are registered. The enumeration remains closed: an unrecognised algorithm is refused rather than silently substituted with a supported one."
|
|
222
228
|
},
|
|
223
229
|
"KeyType": {
|
|
224
230
|
"title": "KeyType",
|
|
@@ -226,9 +232,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
226
232
|
"enum": [
|
|
227
233
|
"ed25519",
|
|
228
234
|
"x25519",
|
|
229
|
-
"p256"
|
|
235
|
+
"p256",
|
|
236
|
+
"mldsa44",
|
|
237
|
+
"mldsa65"
|
|
230
238
|
],
|
|
231
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
239
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
232
240
|
}
|
|
233
241
|
}
|
|
234
242
|
} as const;
|
|
@@ -147,9 +147,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
147
147
|
"enum": [
|
|
148
148
|
"ed25519",
|
|
149
149
|
"x25519",
|
|
150
|
-
"p256"
|
|
150
|
+
"p256",
|
|
151
|
+
"mldsa44",
|
|
152
|
+
"mldsa65"
|
|
151
153
|
],
|
|
152
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
154
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
157
|
} as const;
|
|
@@ -199,9 +201,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
199
201
|
"enum": [
|
|
200
202
|
"ed25519",
|
|
201
203
|
"x25519",
|
|
202
|
-
"p256"
|
|
204
|
+
"p256",
|
|
205
|
+
"mldsa44",
|
|
206
|
+
"mldsa65"
|
|
203
207
|
],
|
|
204
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
208
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
205
209
|
}
|
|
206
210
|
}
|
|
207
211
|
} as const;
|
|
@@ -119,9 +119,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
119
119
|
"enum": [
|
|
120
120
|
"ed25519",
|
|
121
121
|
"x25519",
|
|
122
|
-
"p256"
|
|
122
|
+
"p256",
|
|
123
|
+
"mldsa44",
|
|
124
|
+
"mldsa65"
|
|
123
125
|
],
|
|
124
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
126
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
125
127
|
},
|
|
126
128
|
"Ext": {
|
|
127
129
|
"title": "Ext",
|
|
@@ -180,9 +182,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
180
182
|
"enum": [
|
|
181
183
|
"ed25519",
|
|
182
184
|
"x25519",
|
|
183
|
-
"p256"
|
|
185
|
+
"p256",
|
|
186
|
+
"mldsa44",
|
|
187
|
+
"mldsa65"
|
|
184
188
|
],
|
|
185
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
189
|
+
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256), and `mldsa44` and `mldsa65` sign with the post-quantum ML-DSA scheme of US NIST FIPS 204. The set is expected to grow as algorithms are standardised, and growing it is a MINOR change under SPEC.md §5.2: `keyType` selects no schema branch, so adding a value relaxes a constraint rather than narrowing one, and the generated libraries mark this enumeration non-exhaustive so that a consumer absorbs a new value rather than failing to compile. Two ML-DSA parameter sets are carried because two specifications require different ones — W3C Quantum-Resistant Cryptosuites defines Data Integrity suites only for ML-DSA-44, while Trust Spanning Protocol Rev 3 §8.1 mandates ML-DSA-65 — so the parameter set is chosen by whatever consumes the key and the two are not redundant. A consumer that does not implement a value it receives MUST refuse the document rather than substitute one it does support."
|
|
186
190
|
},
|
|
187
191
|
"Ext": {
|
|
188
192
|
"title": "Ext",
|