@openvtc/trust-tasks 0.12.6 → 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.
@@ -2,11 +2,37 @@
2
2
  * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
3
  * Source: specs/vtc/relationships/publish/0.1/payload.schema.json
4
4
  */
5
+ /**
6
+ * Digest over the RFC 8785 canonicalization of the VRC this authorizes. Binds the authorization to one credential, so it cannot be moved to another.
7
+ */
8
+ export type DigestMultibase = string;
5
9
  export interface VTCRelationshipsPublishPayload {
6
10
  /**
7
11
  * 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.
8
12
  */
9
13
  vrc: {};
14
+ /**
15
+ * Proof that the caller controls the key behind the VRC's `issuer`, when that is not the party issuing this document.
16
+ *
17
+ * 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.
18
+ *
19
+ * Omit it when the VRC's `issuer` is this document's issuer: the document's own proof already establishes control.
20
+ */
21
+ pop?: {
22
+ /**
23
+ * Guards against a signature the issuer made over some other object being replayed here as authorization to publish.
24
+ */
25
+ type: "VrcPublishAuthorization";
26
+ /**
27
+ * 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.
28
+ */
29
+ documentId: string;
30
+ vrcDigestMultibase: DigestMultibase;
31
+ /**
32
+ * 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.
33
+ */
34
+ proof: {};
35
+ };
10
36
  ext?: Ext;
11
37
  }
12
38
  /**
@@ -57,6 +83,30 @@ export declare const PAYLOAD_SCHEMA: {
57
83
  readonly type: "object";
58
84
  readonly 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.";
59
85
  };
86
+ readonly pop: {
87
+ readonly type: "object";
88
+ readonly 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.";
89
+ readonly properties: {
90
+ readonly type: {
91
+ readonly const: "VrcPublishAuthorization";
92
+ readonly description: "Guards against a signature the issuer made over some other object being replayed here as authorization to publish.";
93
+ };
94
+ readonly documentId: {
95
+ readonly type: "string";
96
+ readonly 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.";
97
+ };
98
+ readonly vrcDigestMultibase: {
99
+ readonly $ref: "#/$defs/DigestMultibase";
100
+ readonly 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.";
101
+ };
102
+ readonly proof: {
103
+ readonly type: "object";
104
+ readonly 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.";
105
+ };
106
+ };
107
+ readonly required: readonly ["type", "documentId", "vrcDigestMultibase", "proof"];
108
+ readonly additionalProperties: false;
109
+ };
60
110
  readonly ext: {
61
111
  readonly $ref: "#/$defs/Ext";
62
112
  };
@@ -102,6 +152,14 @@ export declare const PAYLOAD_SCHEMA: {
102
152
  readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
103
153
  };
104
154
  };
155
+ readonly DigestMultibase: {
156
+ readonly title: "DigestMultibase";
157
+ readonly 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`.";
158
+ readonly type: "string";
159
+ readonly minLength: 16;
160
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
161
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
162
+ };
105
163
  };
106
164
  };
107
165
  /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
@@ -149,6 +207,14 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
149
207
  readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
150
208
  };
151
209
  };
210
+ readonly DigestMultibase: {
211
+ readonly title: "DigestMultibase";
212
+ readonly 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`.";
213
+ readonly type: "string";
214
+ readonly minLength: 16;
215
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
216
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
217
+ };
152
218
  };
153
219
  };
154
220
  /**
@@ -174,6 +240,30 @@ export declare const SPEC: {
174
240
  readonly type: "object";
175
241
  readonly 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.";
176
242
  };
243
+ readonly pop: {
244
+ readonly type: "object";
245
+ readonly 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.";
246
+ readonly properties: {
247
+ readonly type: {
248
+ readonly const: "VrcPublishAuthorization";
249
+ readonly description: "Guards against a signature the issuer made over some other object being replayed here as authorization to publish.";
250
+ };
251
+ readonly documentId: {
252
+ readonly type: "string";
253
+ readonly 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.";
254
+ };
255
+ readonly vrcDigestMultibase: {
256
+ readonly $ref: "#/$defs/DigestMultibase";
257
+ readonly 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.";
258
+ };
259
+ readonly proof: {
260
+ readonly type: "object";
261
+ readonly 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.";
262
+ };
263
+ };
264
+ readonly required: readonly ["type", "documentId", "vrcDigestMultibase", "proof"];
265
+ readonly additionalProperties: false;
266
+ };
177
267
  readonly ext: {
178
268
  readonly $ref: "#/$defs/Ext";
179
269
  };
@@ -219,6 +309,14 @@ export declare const SPEC: {
219
309
  readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
220
310
  };
221
311
  };
312
+ readonly DigestMultibase: {
313
+ readonly title: "DigestMultibase";
314
+ readonly 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`.";
315
+ readonly type: "string";
316
+ readonly minLength: 16;
317
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
318
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
319
+ };
222
320
  };
223
321
  };
224
322
  };
@@ -276,6 +374,14 @@ export declare const RESPONSE_SPEC: {
276
374
  readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
277
375
  };
278
376
  };
377
+ readonly DigestMultibase: {
378
+ readonly title: "DigestMultibase";
379
+ readonly 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`.";
380
+ readonly type: "string";
381
+ readonly minLength: 16;
382
+ readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
383
+ readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
384
+ };
279
385
  };
280
386
  };
281
387
  };
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/relationships/publish/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,GAAG,EAAE,EAAE,CAAC;IACR,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,2DAAoE,CAAC;AAE7F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,8BAA8B,CAAC;AAErD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,oEAA6E,CAAC;AAE/G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,sCAAsC,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/relationships/publish/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,GAAG,EAAE,EAAE,CAAC;IACR;;;;;;OAMG;IACH,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,IAAI,EAAE,yBAAyB,CAAC;QAChC;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QACnB,kBAAkB,EAAE,eAAe,CAAC;QACpC;;WAEG;QACH,KAAK,EAAE,EAAE,CAAC;KACX,CAAC;IACF,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,2DAAoE,CAAC;AAE7F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,8BAA8B,CAAC;AAErD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,oEAA6E,CAAC;AAE/G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,sCAAsC,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}
@@ -29,6 +29,35 @@ export const PAYLOAD_SCHEMA = {
29
29
  "type": "object",
30
30
  "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."
31
31
  },
32
+ "pop": {
33
+ "type": "object",
34
+ "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.",
35
+ "properties": {
36
+ "type": {
37
+ "const": "VrcPublishAuthorization",
38
+ "description": "Guards against a signature the issuer made over some other object being replayed here as authorization to publish."
39
+ },
40
+ "documentId": {
41
+ "type": "string",
42
+ "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."
43
+ },
44
+ "vrcDigestMultibase": {
45
+ "$ref": "#/$defs/DigestMultibase",
46
+ "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."
47
+ },
48
+ "proof": {
49
+ "type": "object",
50
+ "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."
51
+ }
52
+ },
53
+ "required": [
54
+ "type",
55
+ "documentId",
56
+ "vrcDigestMultibase",
57
+ "proof"
58
+ ],
59
+ "additionalProperties": false
60
+ },
32
61
  "ext": {
33
62
  "$ref": "#/$defs/Ext"
34
63
  }
@@ -78,6 +107,16 @@ export const PAYLOAD_SCHEMA = {
78
107
  "propertyNames": {
79
108
  "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
80
109
  }
110
+ },
111
+ "DigestMultibase": {
112
+ "title": "DigestMultibase",
113
+ "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`.",
114
+ "type": "string",
115
+ "minLength": 16,
116
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
117
+ "examples": [
118
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
119
+ ]
81
120
  }
82
121
  }
83
122
  };
@@ -130,6 +169,16 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
130
169
  "propertyNames": {
131
170
  "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
132
171
  }
172
+ },
173
+ "DigestMultibase": {
174
+ "title": "DigestMultibase",
175
+ "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`.",
176
+ "type": "string",
177
+ "minLength": 16,
178
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
179
+ "examples": [
180
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
181
+ ]
133
182
  }
134
183
  }
135
184
  };
@@ -1 +1 @@
1
- {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/relationships/publish/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6BH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAAoE,CAAC;AAK7F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,oEAA6E,CAAC;AAK/G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,2DAA2D;IAClE,OAAO,EAAE,qCAAqC;IAC9C,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,KAAK;KACN;IACD,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,uMAAuM;SACvN;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;SACtB;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,8CAA8C;YACvD,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,IAAI;gBACJ,WAAW;gBACX,YAAY;gBACZ,WAAW;aACZ;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE;oBACJ,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;oBACd,aAAa,EAAE,kDAAkD;iBAClE;gBACD,WAAW,EAAE;oBACX,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;iBACf;gBACD,YAAY,EAAE;oBACZ,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;iBACf;gBACD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AAe,EAAE,CAAC;YAClB,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE;gBACf,SAAS,EAAE,mCAAmC;aAC/C;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,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/relationships/publish/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAAoE,CAAC;AAK7F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,oEAA6E,CAAC;AAK/G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,2DAA2D;IAClE,OAAO,EAAE,qCAAqC;IAC9C,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,KAAK;KACN;IACD,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,uMAAuM;SACvN;QACD,KAAK,EAAE;YACL,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,ulBAAulB;YACtmB,YAAY,EAAE;gBACZ,MAAM,EAAE;oBACN,OAAO,EAAE,yBAAyB;oBAClC,aAAa,EAAE,oHAAoH;iBACpI;gBACD,YA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B,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,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
@@ -3,14 +3,40 @@
3
3
  * Source: specs/vtc/relationships/publish/0.2/payload.schema.json
4
4
  */
5
5
  /**
6
- * 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.
6
+ * Digest over the RFC 8785 canonicalization of the VRC this authorizes. Binds the authorization to one credential, so it cannot be moved to another.
7
7
  */
8
8
  export type DigestMultibase = string;
9
+ /**
10
+ * 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.
11
+ */
12
+ export type DigestMultibase1 = string;
9
13
  export interface VTCRelationshipsPublishPayload {
10
14
  /**
11
15
  * 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.
12
16
  */
13
17
  vrc: {};
18
+ /**
19
+ * Proof that the caller controls the key behind the VRC's `issuer`, when that is not the party issuing this document.
20
+ *
21
+ * 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.
22
+ *
23
+ * Omit it when the VRC's `issuer` is this document's issuer: the document's own proof already establishes control.
24
+ */
25
+ pop?: {
26
+ /**
27
+ * Guards against a signature the issuer made over some other object being replayed here as authorization to publish.
28
+ */
29
+ type: "VrcPublishAuthorization";
30
+ /**
31
+ * 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.
32
+ */
33
+ documentId: string;
34
+ vrcDigestMultibase: DigestMultibase;
35
+ /**
36
+ * 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.
37
+ */
38
+ proof: {};
39
+ };
14
40
  ext?: Ext;
15
41
  }
16
42
  /**
@@ -26,7 +52,7 @@ export interface VTCRelationshipsPublishResponsePayload {
26
52
  id: string;
27
53
  issuerDid: string;
28
54
  subjectDid: string;
29
- vrcDigestMultibase: DigestMultibase;
55
+ vrcDigestMultibase: DigestMultibase1;
30
56
  ext?: Ext;
31
57
  }
32
58
  /** Trust Task type URI. */
@@ -58,6 +84,30 @@ export declare const PAYLOAD_SCHEMA: {
58
84
  readonly type: "object";
59
85
  readonly 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.";
60
86
  };
87
+ readonly pop: {
88
+ readonly type: "object";
89
+ readonly 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.";
90
+ readonly properties: {
91
+ readonly type: {
92
+ readonly const: "VrcPublishAuthorization";
93
+ readonly description: "Guards against a signature the issuer made over some other object being replayed here as authorization to publish.";
94
+ };
95
+ readonly documentId: {
96
+ readonly type: "string";
97
+ readonly 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.";
98
+ };
99
+ readonly vrcDigestMultibase: {
100
+ readonly $ref: "#/$defs/DigestMultibase";
101
+ readonly 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.";
102
+ };
103
+ readonly proof: {
104
+ readonly type: "object";
105
+ readonly 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.";
106
+ };
107
+ };
108
+ readonly required: readonly ["type", "documentId", "vrcDigestMultibase", "proof"];
109
+ readonly additionalProperties: false;
110
+ };
61
111
  readonly ext: {
62
112
  readonly $ref: "#/$defs/Ext";
63
113
  };
@@ -189,6 +239,30 @@ export declare const SPEC: {
189
239
  readonly type: "object";
190
240
  readonly 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.";
191
241
  };
242
+ readonly pop: {
243
+ readonly type: "object";
244
+ readonly 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.";
245
+ readonly properties: {
246
+ readonly type: {
247
+ readonly const: "VrcPublishAuthorization";
248
+ readonly description: "Guards against a signature the issuer made over some other object being replayed here as authorization to publish.";
249
+ };
250
+ readonly documentId: {
251
+ readonly type: "string";
252
+ readonly 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.";
253
+ };
254
+ readonly vrcDigestMultibase: {
255
+ readonly $ref: "#/$defs/DigestMultibase";
256
+ readonly 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.";
257
+ };
258
+ readonly proof: {
259
+ readonly type: "object";
260
+ readonly 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.";
261
+ };
262
+ };
263
+ readonly required: readonly ["type", "documentId", "vrcDigestMultibase", "proof"];
264
+ readonly additionalProperties: false;
265
+ };
192
266
  readonly ext: {
193
267
  readonly $ref: "#/$defs/Ext";
194
268
  };
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/relationships/publish/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,GAAG,EAAE,EAAE,CAAC;IACR,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,eAAe,CAAC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,2DAAoE,CAAC;AAE7F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,8BAA8B,CAAC;AAErD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,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MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,2DAAoE,CAAC;AAE7F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,8BAA8B,CAAC;AAErD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,oEAA6E,CAAC;AAE/G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,sCAAsC,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2D1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}
@@ -29,6 +29,35 @@ export const PAYLOAD_SCHEMA = {
29
29
  "type": "object",
30
30
  "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."
31
31
  },
32
+ "pop": {
33
+ "type": "object",
34
+ "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.",
35
+ "properties": {
36
+ "type": {
37
+ "const": "VrcPublishAuthorization",
38
+ "description": "Guards against a signature the issuer made over some other object being replayed here as authorization to publish."
39
+ },
40
+ "documentId": {
41
+ "type": "string",
42
+ "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."
43
+ },
44
+ "vrcDigestMultibase": {
45
+ "$ref": "#/$defs/DigestMultibase",
46
+ "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."
47
+ },
48
+ "proof": {
49
+ "type": "object",
50
+ "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."
51
+ }
52
+ },
53
+ "required": [
54
+ "type",
55
+ "documentId",
56
+ "vrcDigestMultibase",
57
+ "proof"
58
+ ],
59
+ "additionalProperties": false
60
+ },
32
61
  "ext": {
33
62
  "$ref": "#/$defs/Ext"
34
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/relationships/publish/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAAoE,CAAC;AAK7F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,oEAA6E,CAAC;AAK/G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,2DAA2D;IAClE,OAAO,EAAE,qCAAqC;IAC9C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B,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/relationships/publish/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAAoE,CAAC;AAK7F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,oEAA6E,CAAC;AAK/G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,2DAA2D;IAClE,OAAO,EAAE,qCAAqC;IAC9C,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,KAAK;KACN;IACD,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,uMAAuM;SACvN;QACD,KAAK,EAAE;YACL,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,ulBAAulB;YACtmB,YAAY,EAAE;gBACZ,MAAM,EAAE;oBACN,OAAO,EAAE,yBAAyB;oBAClC,aAAa,EAAE,oHAAoH;iBACpI;gBACD,YAAY,EAAE;oBACZ,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,0TAA0T;iBAC1U;gBACD,oBAAoB,EAAE;oBACpB,MAAM,EAAE,yBAAyB;oBACjC,aAAa,EAAE,oJAAoJ;iBACpK;gBACD,OAAO,EAA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ClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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
  }