@openvtc/trust-tasks 0.25.2 → 0.26.0
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 +28 -0
- package/dist/_shared/components.d.ts +10 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/vtc/_shared/0.1/room-storage.d.ts +1 -1
- package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -1
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts +50 -10
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/create/0.1/payload.js +24 -2
- package/dist/vtc/storage/configs/create/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts +66 -10
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/get/0.1/payload.js +32 -2
- package/dist/vtc/storage/configs/get/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts +66 -10
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/list/0.1/payload.js +32 -2
- package/dist/vtc/storage/configs/list/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts +50 -10
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/configs/update/0.1/payload.js +24 -2
- package/dist/vtc/storage/configs/update/0.1/payload.js.map +1 -1
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +46 -2
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/storage/credentials/set/0.1/payload.js +22 -0
- package/dist/vtc/storage/credentials/set/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +10 -1
- package/src/vtc/_shared/0.1/room-storage.ts +1 -1
- package/src/vtc/storage/configs/create/0.1/payload.ts +26 -4
- package/src/vtc/storage/configs/get/0.1/payload.ts +34 -4
- package/src/vtc/storage/configs/list/0.1/payload.ts +34 -4
- package/src/vtc/storage/configs/update/0.1/payload.ts +26 -4
- package/src/vtc/storage/credentials/set/0.1/payload.ts +24 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/vtc/storage/credentials/set/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { CredentialState, DigestMultibase, Ext, ExternalAccountId, StorageConfigId } from "../../../../../_shared/components.js";
|
|
6
|
+
import type { CredentialState, DigestMultibase, Ext, ExternalAccountContextId, ExternalAccountId, StorageConfigId } from "../../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -36,7 +36,7 @@ export interface VTCStorageCredentialsSetResponsePayload {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
39
|
-
export type { CredentialState, DigestMultibase, Ext, ExternalAccountId, StorageConfigId };
|
|
39
|
+
export type { CredentialState, DigestMultibase, Ext, ExternalAccountContextId, ExternalAccountId, StorageConfigId };
|
|
40
40
|
|
|
41
41
|
/** Trust Task type URI. */
|
|
42
42
|
export const TYPE_URI = "https://trusttasks.org/spec/vtc/storage/credentials/set/0.1" as const;
|
|
@@ -152,6 +152,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
152
152
|
"none"
|
|
153
153
|
]
|
|
154
154
|
},
|
|
155
|
+
"context": {
|
|
156
|
+
"$ref": "#/$defs/ExternalAccountContextId",
|
|
157
|
+
"description": "Present with `vta-account`."
|
|
158
|
+
},
|
|
155
159
|
"account": {
|
|
156
160
|
"$ref": "#/$defs/ExternalAccountId",
|
|
157
161
|
"description": "Present with `vta-account`."
|
|
@@ -180,6 +184,13 @@ export const PAYLOAD_SCHEMA = {
|
|
|
180
184
|
"pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
|
|
181
185
|
"description": "The identifier of an external account held by the community's VTA (the external/accounts/* family), which issues the community short-lived, room-scoped credentials and holds the long-lived authority itself."
|
|
182
186
|
},
|
|
187
|
+
"ExternalAccountContextId": {
|
|
188
|
+
"title": "ExternalAccountContextId",
|
|
189
|
+
"type": "string",
|
|
190
|
+
"minLength": 1,
|
|
191
|
+
"maxLength": 256,
|
|
192
|
+
"description": "The context at the community's VTA that owns an external account. The VTA names an account by its context and its identifier, and decides who may use it by act scope in that context: the community must hold `external-auth-use` there, and be bound to the account, for the account to issue it anything. Naming a context grants nothing; the VTA's binding is the gate."
|
|
193
|
+
},
|
|
183
194
|
"DigestMultibase": {
|
|
184
195
|
"title": "DigestMultibase",
|
|
185
196
|
"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`.",
|
|
@@ -260,6 +271,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
260
271
|
"none"
|
|
261
272
|
]
|
|
262
273
|
},
|
|
274
|
+
"context": {
|
|
275
|
+
"$ref": "#/$defs/ExternalAccountContextId",
|
|
276
|
+
"description": "Present with `vta-account`."
|
|
277
|
+
},
|
|
263
278
|
"account": {
|
|
264
279
|
"$ref": "#/$defs/ExternalAccountId",
|
|
265
280
|
"description": "Present with `vta-account`."
|
|
@@ -288,6 +303,13 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
288
303
|
"pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
|
|
289
304
|
"description": "The identifier of an external account held by the community's VTA (the external/accounts/* family), which issues the community short-lived, room-scoped credentials and holds the long-lived authority itself."
|
|
290
305
|
},
|
|
306
|
+
"ExternalAccountContextId": {
|
|
307
|
+
"title": "ExternalAccountContextId",
|
|
308
|
+
"type": "string",
|
|
309
|
+
"minLength": 1,
|
|
310
|
+
"maxLength": 256,
|
|
311
|
+
"description": "The context at the community's VTA that owns an external account. The VTA names an account by its context and its identifier, and decides who may use it by act scope in that context: the community must hold `external-auth-use` there, and be bound to the account, for the account to issue it anything. Naming a context grants nothing; the VTA's binding is the gate."
|
|
312
|
+
},
|
|
291
313
|
"DigestMultibase": {
|
|
292
314
|
"title": "DigestMultibase",
|
|
293
315
|
"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`.",
|