@openvtc/trust-tasks 0.20.1 → 0.20.3
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 +110 -0
- package/dist/_shared/components.d.ts +175 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/git-ns/_shared/0.1/git-ns.d.ts +16 -0
- package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -0
- package/dist/git-ns/_shared/0.1/git-ns.js +6 -0
- package/dist/git-ns/_shared/0.1/git-ns.js.map +1 -0
- package/dist/git-ns/account/link/0.1/payload.d.ts +355 -0
- package/dist/git-ns/account/link/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/account/link/0.1/payload.js +192 -0
- package/dist/git-ns/account/link/0.1/payload.js.map +1 -0
- package/dist/git-ns/account/link-status/0.1/payload.d.ts +403 -0
- package/dist/git-ns/account/link-status/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/account/link-status/0.1/payload.js +234 -0
- package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/event/0.1/payload.d.ts +1348 -0
- package/dist/git-ns/bridge/event/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/event/0.1/payload.js +785 -0
- package/dist/git-ns/bridge/event/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/0.1/payload.d.ts +1044 -0
- package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/0.1/payload.js +564 -0
- package/dist/git-ns/bridge/job/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/result/0.1/payload.d.ts +462 -0
- package/dist/git-ns/bridge/result/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/result/0.1/payload.js +248 -0
- package/dist/git-ns/bridge/result/0.1/payload.js.map +1 -0
- package/dist/git-ns/namespace/bind/0.1/payload.d.ts +547 -0
- package/dist/git-ns/namespace/bind/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/bind/0.1/payload.js +322 -0
- package/dist/git-ns/namespace/bind/0.1/payload.js.map +1 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.d.ts +300 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.js +168 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/adopt/0.1/payload.d.ts +962 -0
- package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/adopt/0.1/payload.js +583 -0
- package/dist/git-ns/repo/adopt/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/archive/0.1/payload.d.ts +959 -0
- package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/archive/0.1/payload.js +584 -0
- package/dist/git-ns/repo/archive/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/create/0.1/payload.d.ts +1074 -0
- package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/create/0.1/payload.js +636 -0
- package/dist/git-ns/repo/create/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/transfer/0.1/payload.d.ts +947 -0
- package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/transfer/0.1/payload.js +577 -0
- package/dist/git-ns/repo/transfer/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/grant/0.1/payload.d.ts +506 -0
- package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/grant/0.1/payload.js +289 -0
- package/dist/git-ns/right/grant/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/revoke/0.1/payload.d.ts +492 -0
- package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/revoke/0.1/payload.js +284 -0
- package/dist/git-ns/right/revoke/0.1/payload.js.map +1 -0
- package/dist/git-ns/view/0.1/payload.d.ts +1407 -0
- package/dist/git-ns/view/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/view/0.1/payload.js +860 -0
- package/dist/git-ns/view/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/vetting/attestation/0.1/payload.d.ts +690 -0
- package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -0
- package/dist/vetting/attestation/0.1/payload.js +374 -0
- package/dist/vetting/attestation/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts +261 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.js +145 -0
- package/dist/vtc/vetting/pcs-challenge/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts +546 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js +290 -0
- package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts +336 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js +178 -0
- package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts +402 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js +205 -0
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +181 -0
- package/src/git-ns/_shared/0.1/git-ns.ts +17 -0
- package/src/git-ns/account/link/0.1/payload.ts +242 -0
- package/src/git-ns/account/link-status/0.1/payload.ts +276 -0
- package/src/git-ns/bridge/event/0.1/payload.ts +902 -0
- package/src/git-ns/bridge/job/0.1/payload.ts +676 -0
- package/src/git-ns/bridge/result/0.1/payload.ts +321 -0
- package/src/git-ns/namespace/bind/0.1/payload.ts +374 -0
- package/src/git-ns/namespace/unbind/0.1/payload.ts +211 -0
- package/src/git-ns/repo/adopt/0.1/payload.ts +628 -0
- package/src/git-ns/repo/archive/0.1/payload.ts +626 -0
- package/src/git-ns/repo/create/0.1/payload.ts +689 -0
- package/src/git-ns/repo/transfer/0.1/payload.ts +619 -0
- package/src/git-ns/right/grant/0.1/payload.ts +340 -0
- package/src/git-ns/right/revoke/0.1/payload.ts +331 -0
- package/src/git-ns/view/0.1/payload.ts +906 -0
- package/src/index.ts +20 -0
- package/src/vetting/attestation/0.1/payload.ts +493 -0
- package/src/vtc/vetting/pcs-challenge/0.1/payload.ts +187 -0
- package/src/vtc/vetting/vetters/event-mode/0.1/payload.ts +375 -0
- package/src/vtc/vetting/vetters/pcs-root/0.1/payload.ts +241 -0
- package/src/vtc/vetting/vetters/pcs-tokens/0.1/payload.ts +286 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/vetting/vetters/pcs-root/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A vetter asks the community to blind-sign its class credential for a vetting period. What the community signs is a commitment it cannot open, so the credential it issues is one it cannot later recognise — which is what lets the vetter attest without being named.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCVettingPCSRootCredentialPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The class label asked for, `vetter/<YYYY-MM>`. A community issues under its current label only; a stale client is refused rather than silently served under another.
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* The vetter's PCS identifier, multibase base58btc. Recorded once and required again at every later label: a member holding two identifiers could be counted twice in one proof.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* The blinded root request, as the suite serialises it. Opaque to the community beyond verifying it; its members are fixed by the suite named in the criterion's parameters, not by this schema.
|
|
23
|
+
*/
|
|
24
|
+
request: {
|
|
25
|
+
/**
|
|
26
|
+
* The issuance encoding the suite carries.
|
|
27
|
+
*/
|
|
28
|
+
encoding?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The request's tag under the root context.
|
|
31
|
+
*/
|
|
32
|
+
t0?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The proof that the commitment is well formed and the requester holds its secret.
|
|
35
|
+
*/
|
|
36
|
+
proof: string;
|
|
37
|
+
};
|
|
38
|
+
ext?: Ext;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The blind pre-credential. The vetter unblinds it into a credential the community has never seen.
|
|
42
|
+
*/
|
|
43
|
+
export interface VTCVettingPCSRootCredentialResponsePayload {
|
|
44
|
+
/**
|
|
45
|
+
* The label signed under — the one asked for.
|
|
46
|
+
*/
|
|
47
|
+
label: string;
|
|
48
|
+
/**
|
|
49
|
+
* The pre-credential, multibase base58btc. Useless to anyone but the holder of the request's blinding state.
|
|
50
|
+
*/
|
|
51
|
+
preCredential: string;
|
|
52
|
+
ext?: Ext;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
56
|
+
export type { Ext };
|
|
57
|
+
|
|
58
|
+
/** Trust Task type URI. */
|
|
59
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-root/0.1" as const;
|
|
60
|
+
|
|
61
|
+
/** Stable alias for this specification's request payload shape. */
|
|
62
|
+
export type Payload = VTCVettingPCSRootCredentialPayload;
|
|
63
|
+
|
|
64
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
65
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-root/0.1#response" as const;
|
|
66
|
+
|
|
67
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
68
|
+
export type Response = VTCVettingPCSRootCredentialResponsePayload;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* This specification's payload schema, as a value.
|
|
72
|
+
*
|
|
73
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
74
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
75
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
76
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
77
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
78
|
+
*/
|
|
79
|
+
export const PAYLOAD_SCHEMA = {
|
|
80
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
81
|
+
"$id": "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-root/0.1",
|
|
82
|
+
"title": "VTC — Vetting PCS Root Credential — payload",
|
|
83
|
+
"description": "A vetter asks the community to blind-sign its class credential for a vetting period. What the community signs is a commitment it cannot open, so the credential it issues is one it cannot later recognise — which is what lets the vetter attest without being named.",
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": [
|
|
87
|
+
"label",
|
|
88
|
+
"id",
|
|
89
|
+
"request"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"label": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "^vetter/[0-9]{4}-[0-9]{2}$",
|
|
95
|
+
"description": "The class label asked for, `vetter/<YYYY-MM>`. A community issues under its current label only; a stale client is refused rather than silently served under another."
|
|
96
|
+
},
|
|
97
|
+
"id": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
100
|
+
"description": "The vetter's PCS identifier, multibase base58btc. Recorded once and required again at every later label: a member holding two identifiers could be counted twice in one proof."
|
|
101
|
+
},
|
|
102
|
+
"request": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"description": "The blinded root request, as the suite serialises it. Opaque to the community beyond verifying it; its members are fixed by the suite named in the criterion's parameters, not by this schema.",
|
|
105
|
+
"properties": {
|
|
106
|
+
"encoding": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
109
|
+
"description": "The issuance encoding the suite carries."
|
|
110
|
+
},
|
|
111
|
+
"t0": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
114
|
+
"description": "The request's tag under the root context."
|
|
115
|
+
},
|
|
116
|
+
"proof": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
119
|
+
"description": "The proof that the commitment is well formed and the requester holds its secret."
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"required": [
|
|
123
|
+
"proof"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"ext": {
|
|
127
|
+
"$ref": "#/$defs/Ext"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"$defs": {
|
|
131
|
+
"Response": {
|
|
132
|
+
"$anchor": "response",
|
|
133
|
+
"title": "VTC Vetting PCS Root Credential — response payload",
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": [
|
|
137
|
+
"label",
|
|
138
|
+
"preCredential"
|
|
139
|
+
],
|
|
140
|
+
"description": "The blind pre-credential. The vetter unblinds it into a credential the community has never seen.",
|
|
141
|
+
"properties": {
|
|
142
|
+
"label": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"pattern": "^vetter/[0-9]{4}-[0-9]{2}$",
|
|
145
|
+
"description": "The label signed under — the one asked for."
|
|
146
|
+
},
|
|
147
|
+
"preCredential": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
150
|
+
"description": "The pre-credential, multibase base58btc. Useless to anyone but the holder of the request's blinding state."
|
|
151
|
+
},
|
|
152
|
+
"ext": {
|
|
153
|
+
"$ref": "#/$defs/Ext"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"Ext": {
|
|
158
|
+
"title": "Ext",
|
|
159
|
+
"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.",
|
|
160
|
+
"type": "object",
|
|
161
|
+
"minProperties": 1,
|
|
162
|
+
"additionalProperties": true,
|
|
163
|
+
"propertyNames": {
|
|
164
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
} as const;
|
|
169
|
+
|
|
170
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
171
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
172
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
173
|
+
"$ref": "#/$defs/Response",
|
|
174
|
+
"$defs": {
|
|
175
|
+
"Response": {
|
|
176
|
+
"$anchor": "response",
|
|
177
|
+
"title": "VTC Vetting PCS Root Credential — response payload",
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"required": [
|
|
181
|
+
"label",
|
|
182
|
+
"preCredential"
|
|
183
|
+
],
|
|
184
|
+
"description": "The blind pre-credential. The vetter unblinds it into a credential the community has never seen.",
|
|
185
|
+
"properties": {
|
|
186
|
+
"label": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"pattern": "^vetter/[0-9]{4}-[0-9]{2}$",
|
|
189
|
+
"description": "The label signed under — the one asked for."
|
|
190
|
+
},
|
|
191
|
+
"preCredential": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
194
|
+
"description": "The pre-credential, multibase base58btc. Useless to anyone but the holder of the request's blinding state."
|
|
195
|
+
},
|
|
196
|
+
"ext": {
|
|
197
|
+
"$ref": "#/$defs/Ext"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"Ext": {
|
|
202
|
+
"title": "Ext",
|
|
203
|
+
"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.",
|
|
204
|
+
"type": "object",
|
|
205
|
+
"minProperties": 1,
|
|
206
|
+
"additionalProperties": true,
|
|
207
|
+
"propertyNames": {
|
|
208
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
} as const;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
216
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
217
|
+
* per-specification and cannot be derived from the document alone, and
|
|
218
|
+
* item 2 needs the schema this carries.
|
|
219
|
+
*/
|
|
220
|
+
export const SPEC = {
|
|
221
|
+
typeUri: TYPE_URI,
|
|
222
|
+
isBearer: false,
|
|
223
|
+
isProofRequired: true,
|
|
224
|
+
isRecipientRequired: true,
|
|
225
|
+
isIssuedAtRequired: true,
|
|
226
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
227
|
+
} as const;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
231
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
232
|
+
* parties (§7.3 item 5).
|
|
233
|
+
*/
|
|
234
|
+
export const RESPONSE_SPEC = {
|
|
235
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
236
|
+
isBearer: false,
|
|
237
|
+
isProofRequired: true,
|
|
238
|
+
isRecipientRequired: true,
|
|
239
|
+
isIssuedAtRequired: true,
|
|
240
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
241
|
+
} as const;
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/vetting/vetters/pcs-tokens/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A vetter draws its tick of attestation tokens. The draw is unconditional and on a schedule — a vetter asks whether or not it has vetted anyone — because a fetch that tracked activity would report activity.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCVettingPCSTokensPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The token label to draw under: the community's current monthly label, or an event label it has approved for this vetter.
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* The vetter's own schedule counter for this label. It makes `once per tick` a rule the community can enforce without learning whether the vetter has been busy.
|
|
19
|
+
*/
|
|
20
|
+
tick: number;
|
|
21
|
+
/**
|
|
22
|
+
* One blinded serial per token asked for. More than the community's published `dripPerTick` is refused outright — the cap is the community's, not the asker's restraint.
|
|
23
|
+
*
|
|
24
|
+
* @minItems 1
|
|
25
|
+
* @maxItems 64
|
|
26
|
+
*/
|
|
27
|
+
requests: [
|
|
28
|
+
{
|
|
29
|
+
/**
|
|
30
|
+
* A commitment to a serial only the vetter knows.
|
|
31
|
+
*/
|
|
32
|
+
commitment: string;
|
|
33
|
+
/**
|
|
34
|
+
* Proof that the commitment opens to a serial the vetter holds, bound to this label, member and tick.
|
|
35
|
+
*/
|
|
36
|
+
openingProof: string;
|
|
37
|
+
},
|
|
38
|
+
...{
|
|
39
|
+
/**
|
|
40
|
+
* A commitment to a serial only the vetter knows.
|
|
41
|
+
*/
|
|
42
|
+
commitment: string;
|
|
43
|
+
/**
|
|
44
|
+
* Proof that the commitment opens to a serial the vetter holds, bound to this label, member and tick.
|
|
45
|
+
*/
|
|
46
|
+
openingProof: string;
|
|
47
|
+
}[]
|
|
48
|
+
];
|
|
49
|
+
ext?: Ext;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One blind signature per request, in the order asked.
|
|
53
|
+
*/
|
|
54
|
+
export interface VTCVettingPCSTokensResponsePayload {
|
|
55
|
+
/**
|
|
56
|
+
* The label served.
|
|
57
|
+
*/
|
|
58
|
+
label: string;
|
|
59
|
+
/**
|
|
60
|
+
* The tick served.
|
|
61
|
+
*/
|
|
62
|
+
tick: number;
|
|
63
|
+
/**
|
|
64
|
+
* The blind signatures, positionally matching `requests`.
|
|
65
|
+
*
|
|
66
|
+
* @minItems 1
|
|
67
|
+
* @maxItems 64
|
|
68
|
+
*/
|
|
69
|
+
preCredentials: [string, ...string[]];
|
|
70
|
+
ext?: Ext;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
74
|
+
export type { Ext };
|
|
75
|
+
|
|
76
|
+
/** Trust Task type URI. */
|
|
77
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-tokens/0.1" as const;
|
|
78
|
+
|
|
79
|
+
/** Stable alias for this specification's request payload shape. */
|
|
80
|
+
export type Payload = VTCVettingPCSTokensPayload;
|
|
81
|
+
|
|
82
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
83
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-tokens/0.1#response" as const;
|
|
84
|
+
|
|
85
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
86
|
+
export type Response = VTCVettingPCSTokensResponsePayload;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* This specification's payload schema, as a value.
|
|
90
|
+
*
|
|
91
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
92
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
93
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
94
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
95
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
96
|
+
*/
|
|
97
|
+
export const PAYLOAD_SCHEMA = {
|
|
98
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
99
|
+
"$id": "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-tokens/0.1",
|
|
100
|
+
"title": "VTC — Vetting PCS Tokens — payload",
|
|
101
|
+
"description": "A vetter draws its tick of attestation tokens. The draw is unconditional and on a schedule — a vetter asks whether or not it has vetted anyone — because a fetch that tracked activity would report activity.",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": [
|
|
105
|
+
"label",
|
|
106
|
+
"tick",
|
|
107
|
+
"requests"
|
|
108
|
+
],
|
|
109
|
+
"properties": {
|
|
110
|
+
"label": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1,
|
|
113
|
+
"maxLength": 128,
|
|
114
|
+
"description": "The token label to draw under: the community's current monthly label, or an event label it has approved for this vetter."
|
|
115
|
+
},
|
|
116
|
+
"tick": {
|
|
117
|
+
"type": "integer",
|
|
118
|
+
"minimum": 0,
|
|
119
|
+
"description": "The vetter's own schedule counter for this label. It makes `once per tick` a rule the community can enforce without learning whether the vetter has been busy."
|
|
120
|
+
},
|
|
121
|
+
"requests": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"minItems": 1,
|
|
124
|
+
"maxItems": 64,
|
|
125
|
+
"description": "One blinded serial per token asked for. More than the community's published `dripPerTick` is refused outright — the cap is the community's, not the asker's restraint.",
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"required": [
|
|
130
|
+
"commitment",
|
|
131
|
+
"openingProof"
|
|
132
|
+
],
|
|
133
|
+
"properties": {
|
|
134
|
+
"commitment": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
137
|
+
"description": "A commitment to a serial only the vetter knows."
|
|
138
|
+
},
|
|
139
|
+
"openingProof": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
|
|
142
|
+
"description": "Proof that the commitment opens to a serial the vetter holds, bound to this label, member and tick."
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"ext": {
|
|
148
|
+
"$ref": "#/$defs/Ext"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"$defs": {
|
|
152
|
+
"Response": {
|
|
153
|
+
"$anchor": "response",
|
|
154
|
+
"title": "VTC Vetting PCS Tokens — response payload",
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"required": [
|
|
158
|
+
"label",
|
|
159
|
+
"tick",
|
|
160
|
+
"preCredentials"
|
|
161
|
+
],
|
|
162
|
+
"description": "One blind signature per request, in the order asked.",
|
|
163
|
+
"properties": {
|
|
164
|
+
"label": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"minLength": 1,
|
|
167
|
+
"maxLength": 128,
|
|
168
|
+
"description": "The label served."
|
|
169
|
+
},
|
|
170
|
+
"tick": {
|
|
171
|
+
"type": "integer",
|
|
172
|
+
"minimum": 0,
|
|
173
|
+
"description": "The tick served."
|
|
174
|
+
},
|
|
175
|
+
"preCredentials": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"minItems": 1,
|
|
178
|
+
"maxItems": 64,
|
|
179
|
+
"description": "The blind signatures, positionally matching `requests`.",
|
|
180
|
+
"items": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"ext": {
|
|
186
|
+
"$ref": "#/$defs/Ext"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"Ext": {
|
|
191
|
+
"title": "Ext",
|
|
192
|
+
"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.",
|
|
193
|
+
"type": "object",
|
|
194
|
+
"minProperties": 1,
|
|
195
|
+
"additionalProperties": true,
|
|
196
|
+
"propertyNames": {
|
|
197
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
} as const;
|
|
202
|
+
|
|
203
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
204
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
205
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
206
|
+
"$ref": "#/$defs/Response",
|
|
207
|
+
"$defs": {
|
|
208
|
+
"Response": {
|
|
209
|
+
"$anchor": "response",
|
|
210
|
+
"title": "VTC Vetting PCS Tokens — response payload",
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": [
|
|
214
|
+
"label",
|
|
215
|
+
"tick",
|
|
216
|
+
"preCredentials"
|
|
217
|
+
],
|
|
218
|
+
"description": "One blind signature per request, in the order asked.",
|
|
219
|
+
"properties": {
|
|
220
|
+
"label": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 1,
|
|
223
|
+
"maxLength": 128,
|
|
224
|
+
"description": "The label served."
|
|
225
|
+
},
|
|
226
|
+
"tick": {
|
|
227
|
+
"type": "integer",
|
|
228
|
+
"minimum": 0,
|
|
229
|
+
"description": "The tick served."
|
|
230
|
+
},
|
|
231
|
+
"preCredentials": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"minItems": 1,
|
|
234
|
+
"maxItems": 64,
|
|
235
|
+
"description": "The blind signatures, positionally matching `requests`.",
|
|
236
|
+
"items": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"ext": {
|
|
242
|
+
"$ref": "#/$defs/Ext"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"Ext": {
|
|
247
|
+
"title": "Ext",
|
|
248
|
+
"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.",
|
|
249
|
+
"type": "object",
|
|
250
|
+
"minProperties": 1,
|
|
251
|
+
"additionalProperties": true,
|
|
252
|
+
"propertyNames": {
|
|
253
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
} as const;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
261
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
262
|
+
* per-specification and cannot be derived from the document alone, and
|
|
263
|
+
* item 2 needs the schema this carries.
|
|
264
|
+
*/
|
|
265
|
+
export const SPEC = {
|
|
266
|
+
typeUri: TYPE_URI,
|
|
267
|
+
isBearer: false,
|
|
268
|
+
isProofRequired: true,
|
|
269
|
+
isRecipientRequired: true,
|
|
270
|
+
isIssuedAtRequired: true,
|
|
271
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
272
|
+
} as const;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
276
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
277
|
+
* parties (§7.3 item 5).
|
|
278
|
+
*/
|
|
279
|
+
export const RESPONSE_SPEC = {
|
|
280
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
281
|
+
isBearer: false,
|
|
282
|
+
isProofRequired: true,
|
|
283
|
+
isRecipientRequired: true,
|
|
284
|
+
isIssuedAtRequired: true,
|
|
285
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
286
|
+
} as const;
|