@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
|
@@ -260,9 +260,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
260
260
|
"enum": [
|
|
261
261
|
"ed25519",
|
|
262
262
|
"x25519",
|
|
263
|
-
"p256"
|
|
263
|
+
"p256",
|
|
264
|
+
"mldsa44",
|
|
265
|
+
"mldsa65"
|
|
264
266
|
],
|
|
265
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
267
|
+
"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."
|
|
266
268
|
}
|
|
267
269
|
}
|
|
268
270
|
} as const;
|
|
@@ -396,9 +398,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
396
398
|
"enum": [
|
|
397
399
|
"ed25519",
|
|
398
400
|
"x25519",
|
|
399
|
-
"p256"
|
|
401
|
+
"p256",
|
|
402
|
+
"mldsa44",
|
|
403
|
+
"mldsa65"
|
|
400
404
|
],
|
|
401
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
405
|
+
"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."
|
|
402
406
|
}
|
|
403
407
|
}
|
|
404
408
|
} as const;
|
|
@@ -251,9 +251,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
251
251
|
"enum": [
|
|
252
252
|
"ed25519",
|
|
253
253
|
"x25519",
|
|
254
|
-
"p256"
|
|
254
|
+
"p256",
|
|
255
|
+
"mldsa44",
|
|
256
|
+
"mldsa65"
|
|
255
257
|
],
|
|
256
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
258
|
+
"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."
|
|
257
259
|
}
|
|
258
260
|
}
|
|
259
261
|
} as const;
|
|
@@ -408,9 +410,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
408
410
|
"enum": [
|
|
409
411
|
"ed25519",
|
|
410
412
|
"x25519",
|
|
411
|
-
"p256"
|
|
413
|
+
"p256",
|
|
414
|
+
"mldsa44",
|
|
415
|
+
"mldsa65"
|
|
412
416
|
],
|
|
413
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
417
|
+
"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."
|
|
414
418
|
}
|
|
415
419
|
}
|
|
416
420
|
} as const;
|
|
@@ -191,9 +191,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
191
191
|
"enum": [
|
|
192
192
|
"ed25519",
|
|
193
193
|
"x25519",
|
|
194
|
-
"p256"
|
|
194
|
+
"p256",
|
|
195
|
+
"mldsa44",
|
|
196
|
+
"mldsa65"
|
|
195
197
|
],
|
|
196
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
198
|
+
"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."
|
|
197
199
|
},
|
|
198
200
|
"Ext": {
|
|
199
201
|
"title": "Ext",
|
|
@@ -324,9 +326,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
324
326
|
"enum": [
|
|
325
327
|
"ed25519",
|
|
326
328
|
"x25519",
|
|
327
|
-
"p256"
|
|
329
|
+
"p256",
|
|
330
|
+
"mldsa44",
|
|
331
|
+
"mldsa65"
|
|
328
332
|
],
|
|
329
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
333
|
+
"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."
|
|
330
334
|
},
|
|
331
335
|
"Ext": {
|
|
332
336
|
"title": "Ext",
|
|
@@ -203,9 +203,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
203
203
|
"enum": [
|
|
204
204
|
"ed25519",
|
|
205
205
|
"x25519",
|
|
206
|
-
"p256"
|
|
206
|
+
"p256",
|
|
207
|
+
"mldsa44",
|
|
208
|
+
"mldsa65"
|
|
207
209
|
],
|
|
208
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
210
|
+
"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."
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
} as const;
|
|
@@ -346,9 +348,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
346
348
|
"enum": [
|
|
347
349
|
"ed25519",
|
|
348
350
|
"x25519",
|
|
349
|
-
"p256"
|
|
351
|
+
"p256",
|
|
352
|
+
"mldsa44",
|
|
353
|
+
"mldsa65"
|
|
350
354
|
],
|
|
351
|
-
"description": "Cryptographic algorithm the key material belongs to. `ed25519` signs (EdDSA), `x25519` performs key agreement and never signs, `p256` signs (ES256)."
|
|
355
|
+
"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."
|
|
352
356
|
}
|
|
353
357
|
}
|
|
354
358
|
} as const;
|
|
@@ -138,9 +138,11 @@ export const PAYLOAD_SCHEMA = {
|
|
|
138
138
|
"type": "string",
|
|
139
139
|
"enum": [
|
|
140
140
|
"EdDSA",
|
|
141
|
-
"ES256"
|
|
141
|
+
"ES256",
|
|
142
|
+
"ML-DSA-44",
|
|
143
|
+
"ML-DSA-65"
|
|
142
144
|
],
|
|
143
|
-
"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
|
|
145
|
+
"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."
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
} as const;
|
|
@@ -193,9 +195,11 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
193
195
|
"type": "string",
|
|
194
196
|
"enum": [
|
|
195
197
|
"EdDSA",
|
|
196
|
-
"ES256"
|
|
198
|
+
"ES256",
|
|
199
|
+
"ML-DSA-44",
|
|
200
|
+
"ML-DSA-65"
|
|
197
201
|
],
|
|
198
|
-
"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
|
|
202
|
+
"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."
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
205
|
} as const;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/_shared/0.1/backup-transfer.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shapes that describe how an encrypted backup bundle moves between an operator and an agent. Defined once because `initiate-export` and `initiate-import` return the same descriptor, `initiate-import` and the descriptor carry the same chunk manifest, and `get-chunk` and `put-chunk` carry the same chunk — an inline copy per task would fork the moment one of them gained a member.
|
|
8
|
+
*
|
|
9
|
+
* Two transfer algorithms are defined. `stream` moves the whole bundle in one HTTPS request against a recipient-published address, authorized by a bearer token. `chunkedTrustTask` moves it as a sequence of Trust Task documents over whatever transport already carries the family's control-plane tasks, which is what makes a backup possible for an agent that speaks only DIDComm or TSP and has no HTTPS address to publish. The normative account of `chunkedTrustTask` — the chunk-size bound and why, ordering, resume and expiry — is in the `vta/backup/initiate-export/1.1` specification's Chunked transfer section; these definitions carry its shape.
|
|
10
|
+
*/
|
|
11
|
+
export interface BackupTransferSharedDefinitionsForTheVtaBackupSpecFamily {
|
|
12
|
+
[k: string]: unknown | undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The definitions this shared schema publishes, hoisted to one declaration each.
|
|
17
|
+
* See "../../../_shared/components.js".
|
|
18
|
+
*/
|
|
19
|
+
export type { BundleDescriptor, BundleId, ChunkCount, ChunkData, ChunkedDescriptor, ChunkIndex, ChunkManifest, ChunkSize, ExpectedSha256, ExpectedSizeBytes, ExpiresAt, StreamDescriptor } from "../../../_shared/components.js";
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/backup/finalize-import/1.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Supplies the password for an uploaded bundle and asks the recipient to decrypt it and adopt what is inside, or to rehearse that without committing. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTABackupFinalizeImportPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.
|
|
15
|
+
*/
|
|
16
|
+
bundleId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Key-derivation input that unlocks the bundle. Supplied here rather than at initiate-import so the key never travels alongside the slot holding the ciphertext. `writeOnly` is the machine-readable form of the rule in Data carried: this member goes in and never comes back, so a generated client must not surface it in a response type, and a recipient must never log, echo or persist it.
|
|
19
|
+
*/
|
|
20
|
+
password: string;
|
|
21
|
+
/**
|
|
22
|
+
* True commits and replaces the agent's state; false rehearses and mutates nothing. Absent means true — stated in prose rather than as a schema `default` on purpose, because a materialised default makes an omitted member indistinguishable from a deliberate one, and this is the member separating a rehearsal from an irreversible replacement. See Defaulting.
|
|
23
|
+
*/
|
|
24
|
+
confirm?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
27
|
+
*/
|
|
28
|
+
ext?: Ext;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Counts and a status, never contents. This document is the operator-held record of a replacement the agent's own trail no longer describes.
|
|
32
|
+
*/
|
|
33
|
+
export interface VTABackupFinalizeImportResponsePayload {
|
|
34
|
+
/**
|
|
35
|
+
* Echoed so the response stands alone as a record.
|
|
36
|
+
*/
|
|
37
|
+
bundleId: string;
|
|
38
|
+
/**
|
|
39
|
+
* Which the recipient did. Reported rather than left to be inferred from the request, so that a response is complete evidence on its own: `committed` says the agent was replaced, `preview` says it was not.
|
|
40
|
+
*/
|
|
41
|
+
status: "preview" | "committed";
|
|
42
|
+
/**
|
|
43
|
+
* Identifier of the agent the bundle was exported from. The one identifier a preview returns, because the common import error is a valid bundle from the wrong agent and this is what shows it. Absent where the bundle does not record one.
|
|
44
|
+
*/
|
|
45
|
+
sourceDid?: string;
|
|
46
|
+
/**
|
|
47
|
+
* How many keys the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it.
|
|
48
|
+
*/
|
|
49
|
+
keyCount: number;
|
|
50
|
+
/**
|
|
51
|
+
* How many access-control entries the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it.
|
|
52
|
+
*/
|
|
53
|
+
aclCount: number;
|
|
54
|
+
/**
|
|
55
|
+
* How many trust contexts the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it.
|
|
56
|
+
*/
|
|
57
|
+
contextCount: number;
|
|
58
|
+
/**
|
|
59
|
+
* How many audit entries the bundle holds. Zero for a bundle exported without its trail, which is a legitimate outcome and not a sign of a truncated bundle.
|
|
60
|
+
*/
|
|
61
|
+
auditCount: number;
|
|
62
|
+
/**
|
|
63
|
+
* How many secrets the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it.
|
|
64
|
+
*/
|
|
65
|
+
importedSecretCount?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Operator-facing text elaborating on the outcome. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put bundle contents or a secret in it.
|
|
68
|
+
*/
|
|
69
|
+
message?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
72
|
+
*/
|
|
73
|
+
ext?: Ext;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
77
|
+
export type { Ext };
|
|
78
|
+
|
|
79
|
+
/** Trust Task type URI. */
|
|
80
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vta/backup/finalize-import/1.1" as const;
|
|
81
|
+
|
|
82
|
+
/** Stable alias for this specification's request payload shape. */
|
|
83
|
+
export type Payload = VTABackupFinalizeImportPayload;
|
|
84
|
+
|
|
85
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
86
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/backup/finalize-import/1.1#response" as const;
|
|
87
|
+
|
|
88
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
89
|
+
export type Response = VTABackupFinalizeImportResponsePayload;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* This specification's payload schema, as a value.
|
|
93
|
+
*
|
|
94
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
95
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
96
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
97
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
98
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
99
|
+
*/
|
|
100
|
+
export const PAYLOAD_SCHEMA = {
|
|
101
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
102
|
+
"$id": "https://trusttasks.org/spec/vta/backup/finalize-import/1.1",
|
|
103
|
+
"title": "VTA Backup — Finalize Import — payload",
|
|
104
|
+
"description": "Supplies the password for an uploaded bundle and asks the recipient to decrypt it and adopt what is inside, or to rehearse that without committing. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": [
|
|
108
|
+
"bundleId",
|
|
109
|
+
"password"
|
|
110
|
+
],
|
|
111
|
+
"properties": {
|
|
112
|
+
"bundleId": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"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}$",
|
|
115
|
+
"description": "Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one."
|
|
116
|
+
},
|
|
117
|
+
"password": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"minLength": 15,
|
|
120
|
+
"maxLength": 1024,
|
|
121
|
+
"writeOnly": true,
|
|
122
|
+
"description": "Key-derivation input that unlocks the bundle. Supplied here rather than at initiate-import so the key never travels alongside the slot holding the ciphertext. `writeOnly` is the machine-readable form of the rule in Data carried: this member goes in and never comes back, so a generated client must not surface it in a response type, and a recipient must never log, echo or persist it.",
|
|
123
|
+
"$comment": "No example value anywhere in this directory: a specimen password is the one thing implementers copy. minLength mirrors the export floor so a bundle that could be created can be read back."
|
|
124
|
+
},
|
|
125
|
+
"confirm": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"description": "True commits and replaces the agent's state; false rehearses and mutates nothing. Absent means true — stated in prose rather than as a schema `default` on purpose, because a materialised default makes an omitted member indistinguishable from a deliberate one, and this is the member separating a rehearsal from an irreversible replacement. See Defaulting."
|
|
128
|
+
},
|
|
129
|
+
"ext": {
|
|
130
|
+
"$ref": "#/$defs/Ext",
|
|
131
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"$defs": {
|
|
135
|
+
"Response": {
|
|
136
|
+
"$anchor": "response",
|
|
137
|
+
"title": "VTA Backup Finalize Import — response payload",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"description": "Counts and a status, never contents. This document is the operator-held record of a replacement the agent's own trail no longer describes.",
|
|
141
|
+
"required": [
|
|
142
|
+
"bundleId",
|
|
143
|
+
"status",
|
|
144
|
+
"keyCount",
|
|
145
|
+
"aclCount",
|
|
146
|
+
"contextCount",
|
|
147
|
+
"auditCount"
|
|
148
|
+
],
|
|
149
|
+
"properties": {
|
|
150
|
+
"bundleId": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"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}$",
|
|
153
|
+
"description": "Echoed so the response stands alone as a record."
|
|
154
|
+
},
|
|
155
|
+
"status": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": [
|
|
158
|
+
"preview",
|
|
159
|
+
"committed"
|
|
160
|
+
],
|
|
161
|
+
"description": "Which the recipient did. Reported rather than left to be inferred from the request, so that a response is complete evidence on its own: `committed` says the agent was replaced, `preview` says it was not."
|
|
162
|
+
},
|
|
163
|
+
"sourceDid": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"minLength": 1,
|
|
166
|
+
"maxLength": 2048,
|
|
167
|
+
"description": "Identifier of the agent the bundle was exported from. The one identifier a preview returns, because the common import error is a valid bundle from the wrong agent and this is what shows it. Absent where the bundle does not record one."
|
|
168
|
+
},
|
|
169
|
+
"keyCount": {
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"minimum": 0,
|
|
172
|
+
"description": "How many keys the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
173
|
+
},
|
|
174
|
+
"aclCount": {
|
|
175
|
+
"type": "integer",
|
|
176
|
+
"minimum": 0,
|
|
177
|
+
"description": "How many access-control entries the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
178
|
+
},
|
|
179
|
+
"contextCount": {
|
|
180
|
+
"type": "integer",
|
|
181
|
+
"minimum": 0,
|
|
182
|
+
"description": "How many trust contexts the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
183
|
+
},
|
|
184
|
+
"auditCount": {
|
|
185
|
+
"type": "integer",
|
|
186
|
+
"minimum": 0,
|
|
187
|
+
"description": "How many audit entries the bundle holds. Zero for a bundle exported without its trail, which is a legitimate outcome and not a sign of a truncated bundle."
|
|
188
|
+
},
|
|
189
|
+
"importedSecretCount": {
|
|
190
|
+
"type": "integer",
|
|
191
|
+
"minimum": 0,
|
|
192
|
+
"description": "How many secrets the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
193
|
+
},
|
|
194
|
+
"message": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"maxLength": 1024,
|
|
197
|
+
"description": "Operator-facing text elaborating on the outcome. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put bundle contents or a secret in it."
|
|
198
|
+
},
|
|
199
|
+
"ext": {
|
|
200
|
+
"$ref": "#/$defs/Ext",
|
|
201
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"Ext": {
|
|
206
|
+
"title": "Ext",
|
|
207
|
+
"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.",
|
|
208
|
+
"type": "object",
|
|
209
|
+
"minProperties": 1,
|
|
210
|
+
"additionalProperties": true,
|
|
211
|
+
"propertyNames": {
|
|
212
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
} as const;
|
|
217
|
+
|
|
218
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
219
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
220
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
221
|
+
"$ref": "#/$defs/Response",
|
|
222
|
+
"$defs": {
|
|
223
|
+
"Response": {
|
|
224
|
+
"$anchor": "response",
|
|
225
|
+
"title": "VTA Backup Finalize Import — response payload",
|
|
226
|
+
"type": "object",
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"description": "Counts and a status, never contents. This document is the operator-held record of a replacement the agent's own trail no longer describes.",
|
|
229
|
+
"required": [
|
|
230
|
+
"bundleId",
|
|
231
|
+
"status",
|
|
232
|
+
"keyCount",
|
|
233
|
+
"aclCount",
|
|
234
|
+
"contextCount",
|
|
235
|
+
"auditCount"
|
|
236
|
+
],
|
|
237
|
+
"properties": {
|
|
238
|
+
"bundleId": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"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}$",
|
|
241
|
+
"description": "Echoed so the response stands alone as a record."
|
|
242
|
+
},
|
|
243
|
+
"status": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"enum": [
|
|
246
|
+
"preview",
|
|
247
|
+
"committed"
|
|
248
|
+
],
|
|
249
|
+
"description": "Which the recipient did. Reported rather than left to be inferred from the request, so that a response is complete evidence on its own: `committed` says the agent was replaced, `preview` says it was not."
|
|
250
|
+
},
|
|
251
|
+
"sourceDid": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"maxLength": 2048,
|
|
255
|
+
"description": "Identifier of the agent the bundle was exported from. The one identifier a preview returns, because the common import error is a valid bundle from the wrong agent and this is what shows it. Absent where the bundle does not record one."
|
|
256
|
+
},
|
|
257
|
+
"keyCount": {
|
|
258
|
+
"type": "integer",
|
|
259
|
+
"minimum": 0,
|
|
260
|
+
"description": "How many keys the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
261
|
+
},
|
|
262
|
+
"aclCount": {
|
|
263
|
+
"type": "integer",
|
|
264
|
+
"minimum": 0,
|
|
265
|
+
"description": "How many access-control entries the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
266
|
+
},
|
|
267
|
+
"contextCount": {
|
|
268
|
+
"type": "integer",
|
|
269
|
+
"minimum": 0,
|
|
270
|
+
"description": "How many trust contexts the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
271
|
+
},
|
|
272
|
+
"auditCount": {
|
|
273
|
+
"type": "integer",
|
|
274
|
+
"minimum": 0,
|
|
275
|
+
"description": "How many audit entries the bundle holds. Zero for a bundle exported without its trail, which is a legitimate outcome and not a sign of a truncated bundle."
|
|
276
|
+
},
|
|
277
|
+
"importedSecretCount": {
|
|
278
|
+
"type": "integer",
|
|
279
|
+
"minimum": 0,
|
|
280
|
+
"description": "How many secrets the bundle holds. A count, not an inventory — enough to recognise a bundle as plausibly the right one, and not enough to learn what is in it."
|
|
281
|
+
},
|
|
282
|
+
"message": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"maxLength": 1024,
|
|
285
|
+
"description": "Operator-facing text elaborating on the outcome. Advisory: a producer must not parse it or derive behaviour from it, and a recipient must not put bundle contents or a secret in it."
|
|
286
|
+
},
|
|
287
|
+
"ext": {
|
|
288
|
+
"$ref": "#/$defs/Ext",
|
|
289
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"Ext": {
|
|
294
|
+
"title": "Ext",
|
|
295
|
+
"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.",
|
|
296
|
+
"type": "object",
|
|
297
|
+
"minProperties": 1,
|
|
298
|
+
"additionalProperties": true,
|
|
299
|
+
"propertyNames": {
|
|
300
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
} as const;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
308
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
309
|
+
* per-specification and cannot be derived from the document alone, and
|
|
310
|
+
* item 2 needs the schema this carries.
|
|
311
|
+
*/
|
|
312
|
+
export const SPEC = {
|
|
313
|
+
typeUri: TYPE_URI,
|
|
314
|
+
isBearer: false,
|
|
315
|
+
isProofRequired: true,
|
|
316
|
+
isRecipientRequired: true,
|
|
317
|
+
isIssuedAtRequired: true,
|
|
318
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
319
|
+
} as const;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
323
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
324
|
+
* parties (§7.3 item 5).
|
|
325
|
+
*/
|
|
326
|
+
export const RESPONSE_SPEC = {
|
|
327
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
328
|
+
isBearer: false,
|
|
329
|
+
isProofRequired: true,
|
|
330
|
+
isRecipientRequired: true,
|
|
331
|
+
isIssuedAtRequired: true,
|
|
332
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
333
|
+
} as const;
|