@openvtc/trust-tasks 0.12.5 → 0.12.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/vtc/join-requests/list/0.1/payload.d.ts +123 -0
  2. package/dist/vtc/join-requests/list/0.1/payload.d.ts.map +1 -1
  3. package/dist/vtc/join-requests/list/0.1/payload.js +74 -0
  4. package/dist/vtc/join-requests/list/0.1/payload.js.map +1 -1
  5. package/dist/vtc/join-requests/show/0.1/payload.d.ts +123 -0
  6. package/dist/vtc/join-requests/show/0.1/payload.d.ts.map +1 -1
  7. package/dist/vtc/join-requests/show/0.1/payload.js +74 -0
  8. package/dist/vtc/join-requests/show/0.1/payload.js.map +1 -1
  9. package/dist/vtc/join-requests/status/0.1/payload.d.ts +68 -6
  10. package/dist/vtc/join-requests/status/0.1/payload.d.ts.map +1 -1
  11. package/dist/vtc/join-requests/status/0.1/payload.js +33 -4
  12. package/dist/vtc/join-requests/status/0.1/payload.js.map +1 -1
  13. package/dist/vtc/relationships/publish/0.1/payload.d.ts +106 -0
  14. package/dist/vtc/relationships/publish/0.1/payload.d.ts.map +1 -1
  15. package/dist/vtc/relationships/publish/0.1/payload.js +49 -0
  16. package/dist/vtc/relationships/publish/0.1/payload.js.map +1 -1
  17. package/dist/vtc/relationships/publish/0.2/payload.d.ts +76 -2
  18. package/dist/vtc/relationships/publish/0.2/payload.d.ts.map +1 -1
  19. package/dist/vtc/relationships/publish/0.2/payload.js +29 -0
  20. package/dist/vtc/relationships/publish/0.2/payload.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/vtc/join-requests/list/0.1/payload.ts +97 -0
  23. package/src/vtc/join-requests/show/0.1/payload.ts +97 -0
  24. package/src/vtc/join-requests/status/0.1/payload.ts +47 -6
  25. package/src/vtc/relationships/publish/0.1/payload.ts +76 -0
  26. package/src/vtc/relationships/publish/0.2/payload.ts +57 -2
@@ -3,11 +3,38 @@
3
3
  * Source: specs/vtc/relationships/publish/0.1/payload.schema.json
4
4
  */
5
5
 
6
+ /**
7
+ * Digest over the RFC 8785 canonicalization of the VRC this authorizes. Binds the authorization to one credential, so it cannot be moved to another.
8
+ */
9
+ export type DigestMultibase = string;
10
+
6
11
  export interface VTCRelationshipsPublishPayload {
7
12
  /**
8
13
  * A signed W3C Verifiable Relationship Credential (opaque here). Its issuer MUST equal the document proof signer; credentialSubject.id names the subject member; it carries its own DataIntegrityProof.
9
14
  */
10
15
  vrc: {};
16
+ /**
17
+ * Proof that the caller controls the key behind the VRC's `issuer`, when that is not the party issuing this document.
18
+ *
19
+ * A member publishes an edge under a relationship DID — an identifier scoped to one counterparty, which names nobody. The community still has to know a member published it, and the document's own `proof` says only that the member sent it, not that they control the credential's issuing key. Without this, any member handed a VRC could publish another party's edge.
20
+ *
21
+ * Omit it when the VRC's `issuer` is this document's issuer: the document's own proof already establishes control.
22
+ */
23
+ pop?: {
24
+ /**
25
+ * Guards against a signature the issuer made over some other object being replayed here as authorization to publish.
26
+ */
27
+ type: "VrcPublishAuthorization";
28
+ /**
29
+ * The `id` of the Trust Task document carrying this authorization. Binds the authorization to one document, so a captured one cannot be replayed in another — including by a different member. Every document carries a unique `id` (SPEC §4.3), which is why the binding needs no transport-specific notion of a session.
30
+ */
31
+ documentId: string;
32
+ vrcDigestMultibase: DigestMultibase;
33
+ /**
34
+ * Data-integrity proof over this object, by a verification method the VRC's `issuer` controls. This is the proof of possession; the members above only bound what it authorizes.
35
+ */
36
+ proof: {};
37
+ };
11
38
  ext?: Ext;
12
39
  }
13
40
  /**
@@ -65,6 +92,35 @@ export const PAYLOAD_SCHEMA = {
65
92
  "type": "object",
66
93
  "description": "A signed W3C Verifiable Relationship Credential (opaque here). Its issuer MUST equal the document proof signer; credentialSubject.id names the subject member; it carries its own DataIntegrityProof."
67
94
  },
95
+ "pop": {
96
+ "type": "object",
97
+ "description": "Proof that the caller controls the key behind the VRC's `issuer`, when that is not the party issuing this document.\n\nA member publishes an edge under a relationship DID — an identifier scoped to one counterparty, which names nobody. The community still has to know a member published it, and the document's own `proof` says only that the member sent it, not that they control the credential's issuing key. Without this, any member handed a VRC could publish another party's edge.\n\nOmit it when the VRC's `issuer` is this document's issuer: the document's own proof already establishes control.",
98
+ "properties": {
99
+ "type": {
100
+ "const": "VrcPublishAuthorization",
101
+ "description": "Guards against a signature the issuer made over some other object being replayed here as authorization to publish."
102
+ },
103
+ "documentId": {
104
+ "type": "string",
105
+ "description": "The `id` of the Trust Task document carrying this authorization. Binds the authorization to one document, so a captured one cannot be replayed in another — including by a different member. Every document carries a unique `id` (SPEC §4.3), which is why the binding needs no transport-specific notion of a session."
106
+ },
107
+ "vrcDigestMultibase": {
108
+ "$ref": "#/$defs/DigestMultibase",
109
+ "description": "Digest over the RFC 8785 canonicalization of the VRC this authorizes. Binds the authorization to one credential, so it cannot be moved to another."
110
+ },
111
+ "proof": {
112
+ "type": "object",
113
+ "description": "Data-integrity proof over this object, by a verification method the VRC's `issuer` controls. This is the proof of possession; the members above only bound what it authorizes."
114
+ }
115
+ },
116
+ "required": [
117
+ "type",
118
+ "documentId",
119
+ "vrcDigestMultibase",
120
+ "proof"
121
+ ],
122
+ "additionalProperties": false
123
+ },
68
124
  "ext": {
69
125
  "$ref": "#/$defs/Ext"
70
126
  }
@@ -114,6 +170,16 @@ export const PAYLOAD_SCHEMA = {
114
170
  "propertyNames": {
115
171
  "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
116
172
  }
173
+ },
174
+ "DigestMultibase": {
175
+ "title": "DigestMultibase",
176
+ "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`.",
177
+ "type": "string",
178
+ "minLength": 16,
179
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
180
+ "examples": [
181
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
182
+ ]
117
183
  }
118
184
  }
119
185
  } as const;
@@ -167,6 +233,16 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
167
233
  "propertyNames": {
168
234
  "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
169
235
  }
236
+ },
237
+ "DigestMultibase": {
238
+ "title": "DigestMultibase",
239
+ "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`.",
240
+ "type": "string",
241
+ "minLength": 16,
242
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
243
+ "examples": [
244
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
245
+ ]
170
246
  }
171
247
  }
172
248
  } as const;
@@ -4,15 +4,41 @@
4
4
  */
5
5
 
6
6
  /**
7
- * Digest over the RFC 8785 canonicalization of the stored VRC, for out-of-band integrity checks. The same value vtc/relationships/request reports on issuance and vtc/relationships/list reports per entry, so a member can tie the three together without re-hashing.
7
+ * Digest over the RFC 8785 canonicalization of the VRC this authorizes. Binds the authorization to one credential, so it cannot be moved to another.
8
8
  */
9
9
  export type DigestMultibase = string;
10
+ /**
11
+ * Digest over the RFC 8785 canonicalization of the stored VRC, for out-of-band integrity checks. The same value vtc/relationships/request reports on issuance and vtc/relationships/list reports per entry, so a member can tie the three together without re-hashing.
12
+ */
13
+ export type DigestMultibase1 = string;
10
14
 
11
15
  export interface VTCRelationshipsPublishPayload {
12
16
  /**
13
17
  * A signed W3C Verifiable Relationship Credential (opaque here). Its issuer MUST equal the document proof signer; credentialSubject.id names the subject member; it carries its own DataIntegrityProof.
14
18
  */
15
19
  vrc: {};
20
+ /**
21
+ * Proof that the caller controls the key behind the VRC's `issuer`, when that is not the party issuing this document.
22
+ *
23
+ * A member publishes an edge under a relationship DID — an identifier scoped to one counterparty, which names nobody. The community still has to know a member published it, and the document's own `proof` says only that the member sent it, not that they control the credential's issuing key. Without this, any member handed a VRC could publish another party's edge.
24
+ *
25
+ * Omit it when the VRC's `issuer` is this document's issuer: the document's own proof already establishes control.
26
+ */
27
+ pop?: {
28
+ /**
29
+ * Guards against a signature the issuer made over some other object being replayed here as authorization to publish.
30
+ */
31
+ type: "VrcPublishAuthorization";
32
+ /**
33
+ * The `id` of the Trust Task document carrying this authorization. Binds the authorization to one document, so a captured one cannot be replayed in another — including by a different member. Every document carries a unique `id` (SPEC §4.3), which is why the binding needs no transport-specific notion of a session.
34
+ */
35
+ documentId: string;
36
+ vrcDigestMultibase: DigestMultibase;
37
+ /**
38
+ * Data-integrity proof over this object, by a verification method the VRC's `issuer` controls. This is the proof of possession; the members above only bound what it authorizes.
39
+ */
40
+ proof: {};
41
+ };
16
42
  ext?: Ext;
17
43
  }
18
44
  /**
@@ -28,7 +54,7 @@ export interface VTCRelationshipsPublishResponsePayload {
28
54
  id: string;
29
55
  issuerDid: string;
30
56
  subjectDid: string;
31
- vrcDigestMultibase: DigestMultibase;
57
+ vrcDigestMultibase: DigestMultibase1;
32
58
  ext?: Ext;
33
59
  }
34
60
 
@@ -67,6 +93,35 @@ export const PAYLOAD_SCHEMA = {
67
93
  "type": "object",
68
94
  "description": "A signed W3C Verifiable Relationship Credential (opaque here). Its issuer MUST equal the document proof signer; credentialSubject.id names the subject member; it carries its own DataIntegrityProof."
69
95
  },
96
+ "pop": {
97
+ "type": "object",
98
+ "description": "Proof that the caller controls the key behind the VRC's `issuer`, when that is not the party issuing this document.\n\nA member publishes an edge under a relationship DID — an identifier scoped to one counterparty, which names nobody. The community still has to know a member published it, and the document's own `proof` says only that the member sent it, not that they control the credential's issuing key. Without this, any member handed a VRC could publish another party's edge.\n\nOmit it when the VRC's `issuer` is this document's issuer: the document's own proof already establishes control.",
99
+ "properties": {
100
+ "type": {
101
+ "const": "VrcPublishAuthorization",
102
+ "description": "Guards against a signature the issuer made over some other object being replayed here as authorization to publish."
103
+ },
104
+ "documentId": {
105
+ "type": "string",
106
+ "description": "The `id` of the Trust Task document carrying this authorization. Binds the authorization to one document, so a captured one cannot be replayed in another — including by a different member. Every document carries a unique `id` (SPEC §4.3), which is why the binding needs no transport-specific notion of a session."
107
+ },
108
+ "vrcDigestMultibase": {
109
+ "$ref": "#/$defs/DigestMultibase",
110
+ "description": "Digest over the RFC 8785 canonicalization of the VRC this authorizes. Binds the authorization to one credential, so it cannot be moved to another."
111
+ },
112
+ "proof": {
113
+ "type": "object",
114
+ "description": "Data-integrity proof over this object, by a verification method the VRC's `issuer` controls. This is the proof of possession; the members above only bound what it authorizes."
115
+ }
116
+ },
117
+ "required": [
118
+ "type",
119
+ "documentId",
120
+ "vrcDigestMultibase",
121
+ "proof"
122
+ ],
123
+ "additionalProperties": false
124
+ },
70
125
  "ext": {
71
126
  "$ref": "#/$defs/Ext"
72
127
  }