@openvtc/trust-tasks 0.21.14 → 0.21.16

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 (32) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/index.d.ts +5 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +5 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/vta/attestation/mnemonic-status/0.1/payload.d.ts +281 -0
  7. package/dist/vta/attestation/mnemonic-status/0.1/payload.d.ts.map +1 -0
  8. package/dist/vta/attestation/mnemonic-status/0.1/payload.js +157 -0
  9. package/dist/vta/attestation/mnemonic-status/0.1/payload.js.map +1 -0
  10. package/dist/vta/metrics/show/0.1/payload.d.ts +674 -0
  11. package/dist/vta/metrics/show/0.1/payload.d.ts.map +1 -0
  12. package/dist/vta/metrics/show/0.1/payload.js +387 -0
  13. package/dist/vta/metrics/show/0.1/payload.js.map +1 -0
  14. package/dist/vtc/relationships/revoke/0.2/payload.d.ts +287 -0
  15. package/dist/vtc/relationships/revoke/0.2/payload.d.ts.map +1 -0
  16. package/dist/vtc/relationships/revoke/0.2/payload.js +159 -0
  17. package/dist/vtc/relationships/revoke/0.2/payload.js.map +1 -0
  18. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts +1385 -0
  19. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts.map +1 -0
  20. package/dist/vtc/vetting/hidden/publish/0.1/payload.js +735 -0
  21. package/dist/vtc/vetting/hidden/publish/0.1/payload.js.map +1 -0
  22. package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts +254 -0
  23. package/dist/vtc/vetting/vetters/resend/0.2/payload.d.ts.map +1 -0
  24. package/dist/vtc/vetting/vetters/resend/0.2/payload.js +142 -0
  25. package/dist/vtc/vetting/vetters/resend/0.2/payload.js.map +1 -0
  26. package/package.json +1 -1
  27. package/src/index.ts +5 -0
  28. package/src/vta/attestation/mnemonic-status/0.1/payload.ts +203 -0
  29. package/src/vta/metrics/show/0.1/payload.ts +418 -0
  30. package/src/vtc/relationships/revoke/0.2/payload.ts +209 -0
  31. package/src/vtc/vetting/hidden/publish/0.1/payload.ts +905 -0
  32. package/src/vtc/vetting/vetters/resend/0.2/payload.ts +183 -0
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/relationships/revoke/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ export interface VTCRelationshipsRevokePayload {
10
+ /**
11
+ * The relationship to revoke.
12
+ */
13
+ id: string;
14
+ /**
15
+ * Proof that the caller controls the key behind the relationship's issuerDid, when the document's own proof signer is neither that issuer nor an administrator — i.e. for an edge published under a pairwise relationship DID. A member publishes an edge under a relationship DID, an identifier scoped to one counterparty, which names nobody; this document's own proof says only that a member sent the request, not that they control the edge's issuing key. Omit `pop` when the document's proof signer equals the relationship's issuerDid, or is an administrator: the document's own proof, or the administrator's standing, already establishes authority.
16
+ */
17
+ pop?: {
18
+ /**
19
+ * Distinct from vtc/relationships/publish's VrcPublishAuthorization, so a signature made to authorize a publish cannot be replayed here to authorize a revoke.
20
+ */
21
+ type: "VrcRevokeAuthorization";
22
+ /**
23
+ * 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.
24
+ */
25
+ documentId: string;
26
+ /**
27
+ * The relationship id this authorization applies to. MUST equal the top-level `id`, so an authorization signed for one edge cannot be presented against another.
28
+ */
29
+ relationship: string;
30
+ /**
31
+ * Data-integrity proof over this object, by a verification method the relationship's issuerDid controls. This is the proof of possession; the members above only bound what it authorizes.
32
+ */
33
+ proof: {};
34
+ };
35
+ ext?: Ext;
36
+ }
37
+ export interface VTCRelationshipsRevokeResponsePayload {
38
+ id: string;
39
+ ext?: Ext;
40
+ }
41
+
42
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
43
+ export type { Ext };
44
+
45
+ /** Trust Task type URI. */
46
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/revoke/0.2" as const;
47
+
48
+ /** Stable alias for this specification's request payload shape. */
49
+ export type Payload = VTCRelationshipsRevokePayload;
50
+
51
+ /** Trust Task response type URI (request type URI + "#response"). */
52
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/revoke/0.2#response" as const;
53
+
54
+ /** Stable alias for this specification's success-response payload shape. */
55
+ export type Response = VTCRelationshipsRevokeResponsePayload;
56
+
57
+ /**
58
+ * This specification's payload schema, as a value.
59
+ *
60
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
61
+ * rather than only as a `.json` file because TypeScript types are erased
62
+ * at runtime: without a schema a consumer has nothing to validate, and
63
+ * every REQUIRED payload member is optional in practice. Cross-file
64
+ * `$ref`s are already inlined, so it needs no resolver.
65
+ */
66
+ export const PAYLOAD_SCHEMA = {
67
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
68
+ "$id": "https://trusttasks.org/spec/vtc/relationships/revoke/0.2",
69
+ "title": "VTC Relationships Revoke — payload",
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "id"
74
+ ],
75
+ "properties": {
76
+ "id": {
77
+ "type": "string",
78
+ "minLength": 1,
79
+ "description": "The relationship to revoke."
80
+ },
81
+ "pop": {
82
+ "type": "object",
83
+ "description": "Proof that the caller controls the key behind the relationship's issuerDid, when the document's own proof signer is neither that issuer nor an administrator — i.e. for an edge published under a pairwise relationship DID. A member publishes an edge under a relationship DID, an identifier scoped to one counterparty, which names nobody; this document's own proof says only that a member sent the request, not that they control the edge's issuing key. Omit `pop` when the document's proof signer equals the relationship's issuerDid, or is an administrator: the document's own proof, or the administrator's standing, already establishes authority.",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "type",
87
+ "documentId",
88
+ "relationship",
89
+ "proof"
90
+ ],
91
+ "properties": {
92
+ "type": {
93
+ "const": "VrcRevokeAuthorization",
94
+ "description": "Distinct from vtc/relationships/publish's VrcPublishAuthorization, so a signature made to authorize a publish cannot be replayed here to authorize a revoke."
95
+ },
96
+ "documentId": {
97
+ "type": "string",
98
+ "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."
99
+ },
100
+ "relationship": {
101
+ "type": "string",
102
+ "description": "The relationship id this authorization applies to. MUST equal the top-level `id`, so an authorization signed for one edge cannot be presented against another."
103
+ },
104
+ "proof": {
105
+ "type": "object",
106
+ "description": "Data-integrity proof over this object, by a verification method the relationship's issuerDid controls. This is the proof of possession; the members above only bound what it authorizes."
107
+ }
108
+ }
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext"
112
+ }
113
+ },
114
+ "$defs": {
115
+ "Response": {
116
+ "$anchor": "response",
117
+ "title": "VTC Relationships Revoke — response payload",
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": [
121
+ "id"
122
+ ],
123
+ "properties": {
124
+ "id": {
125
+ "type": "string",
126
+ "minLength": 1
127
+ },
128
+ "ext": {
129
+ "$ref": "#/$defs/Ext"
130
+ }
131
+ }
132
+ },
133
+ "Ext": {
134
+ "title": "Ext",
135
+ "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.",
136
+ "type": "object",
137
+ "minProperties": 1,
138
+ "additionalProperties": true,
139
+ "propertyNames": {
140
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
141
+ }
142
+ }
143
+ }
144
+ } as const;
145
+
146
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
147
+ export const RESPONSE_PAYLOAD_SCHEMA = {
148
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
149
+ "$ref": "#/$defs/Response",
150
+ "$defs": {
151
+ "Response": {
152
+ "$anchor": "response",
153
+ "title": "VTC Relationships Revoke — response payload",
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": [
157
+ "id"
158
+ ],
159
+ "properties": {
160
+ "id": {
161
+ "type": "string",
162
+ "minLength": 1
163
+ },
164
+ "ext": {
165
+ "$ref": "#/$defs/Ext"
166
+ }
167
+ }
168
+ },
169
+ "Ext": {
170
+ "title": "Ext",
171
+ "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.",
172
+ "type": "object",
173
+ "minProperties": 1,
174
+ "additionalProperties": true,
175
+ "propertyNames": {
176
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
177
+ }
178
+ }
179
+ }
180
+ } as const;
181
+
182
+ /**
183
+ * SPEC.md §7.2 policy for the request variant, from this specification's
184
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
185
+ * per-specification and cannot be derived from the document alone, and
186
+ * item 2 needs the schema this carries.
187
+ */
188
+ export const SPEC = {
189
+ typeUri: TYPE_URI,
190
+ isBearer: false,
191
+ isProofRequired: true,
192
+ isRecipientRequired: true,
193
+ isIssuedAtRequired: true,
194
+ payloadSchema: PAYLOAD_SCHEMA,
195
+ } as const;
196
+
197
+ /**
198
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
199
+ * tracks the *issuer* party's requirement because a response swaps the
200
+ * parties (§7.3 item 5).
201
+ */
202
+ export const RESPONSE_SPEC = {
203
+ typeUri: RESPONSE_TYPE_URI,
204
+ isBearer: false,
205
+ isProofRequired: true,
206
+ isRecipientRequired: true,
207
+ isIssuedAtRequired: true,
208
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
209
+ } as const;