@openvtc/trust-tasks 0.23.6 → 0.23.8
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 +65 -0
- package/dist/_shared/components.d.ts +2 -2
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +4 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +4 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +4 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +4 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/keys/sign-sshsig/0.1/payload.d.ts +346 -0
- package/dist/keys/sign-sshsig/0.1/payload.d.ts.map +1 -0
- package/dist/keys/sign-sshsig/0.1/payload.js +196 -0
- package/dist/keys/sign-sshsig/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts +69 -8
- package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/vetting/hidden/publish/0.1/payload.js +31 -0
- package/dist/vtc/vetting/hidden/publish/0.1/payload.js.map +1 -1
- package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts +62 -8
- package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/vetting/hidden/show/0.1/payload.js +28 -0
- package/dist/vtc/vetting/hidden/show/0.1/payload.js.map +1 -1
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts +3 -3
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js +1 -1
- package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +4 -2
- package/src/device/list/0.1/payload.ts +4 -2
- package/src/device/list/0.2/payload.ts +4 -2
- package/src/device/register/0.1/payload.ts +4 -2
- package/src/device/register/0.2/payload.ts +4 -2
- package/src/index.ts +1 -0
- package/src/keys/sign-sshsig/0.1/payload.ts +261 -0
- package/src/vtc/vetting/hidden/publish/0.1/payload.ts +39 -0
- package/src/vtc/vetting/hidden/show/0.1/payload.ts +35 -0
- package/src/vtc/vetting/vetters/pcs-tokens/0.1/payload.ts +2 -2
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/keys/sign-sshsig/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A request for an SSHSIG signature (the OpenSSH `PROTOCOL.sshsig` format git uses for SSH commit signing) over a message digest, made with a key the custodian holds. The producer supplies the digest and the namespace; the custodian builds the signed-data structure itself. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface KeysSignSSHSIGPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Identifier of the key to sign with. The key MUST be `active`.
|
|
15
|
+
*/
|
|
16
|
+
keyId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Signature algorithm, as a JOSE identifier: `EdDSA` with an `ed25519` key (SSH key type `ssh-ed25519`), `ES256` with a `p256` key (`ecdsa-sha2-nistp256`). These are the custodian-held key types SSHSIG defines a signature for. MUST be compatible with the named key's `keyType`. Closed: an unrecognised algorithm is refused, never substituted.
|
|
19
|
+
*/
|
|
20
|
+
algorithm: "EdDSA" | "ES256";
|
|
21
|
+
/**
|
|
22
|
+
* The SSHSIG namespace the signature is bound to — `git` for a git commit or tag, `file` for `ssh-keygen -Y sign` over a file. Printable ASCII without spaces. A signature made under one namespace does not verify under another, so the custodian MAY restrict which namespaces a producer may name.
|
|
23
|
+
*/
|
|
24
|
+
namespace: string;
|
|
25
|
+
/**
|
|
26
|
+
* The digest algorithm the producer applied to the message, in the SSHSIG spelling (externally owned, carried verbatim). It is written into the signed data, so the verifier recomputes the digest with the same algorithm.
|
|
27
|
+
*/
|
|
28
|
+
hashAlgorithm: "sha256" | "sha512";
|
|
29
|
+
/**
|
|
30
|
+
* The digest of the message, `H(message)` in `PROTOCOL.sshsig`, base64url-encoded without padding: 32 bytes (43 characters) for `sha256`, 64 bytes (86 characters) for `sha512`. The custodian never sees the message itself.
|
|
31
|
+
*/
|
|
32
|
+
messageHash: string;
|
|
33
|
+
/**
|
|
34
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
35
|
+
*/
|
|
36
|
+
ext?: Ext;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.
|
|
40
|
+
*/
|
|
41
|
+
export interface KeysSignSSHSIGResponsePayload {
|
|
42
|
+
/**
|
|
43
|
+
* The key that produced the signature. Echoed so a response separated from its request is still attributable.
|
|
44
|
+
*/
|
|
45
|
+
keyId: string;
|
|
46
|
+
/**
|
|
47
|
+
* The algorithm the signature was made with — the one the request named.
|
|
48
|
+
*/
|
|
49
|
+
algorithm: "EdDSA" | "ES256";
|
|
50
|
+
/**
|
|
51
|
+
* The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob.
|
|
52
|
+
*/
|
|
53
|
+
signature: string;
|
|
54
|
+
ext?: Ext;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
58
|
+
export type { Ext };
|
|
59
|
+
|
|
60
|
+
/** Trust Task type URI. */
|
|
61
|
+
export const TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/0.1" as const;
|
|
62
|
+
|
|
63
|
+
/** Stable alias for this specification's request payload shape. */
|
|
64
|
+
export type Payload = KeysSignSSHSIGPayload;
|
|
65
|
+
|
|
66
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
67
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/0.1#response" as const;
|
|
68
|
+
|
|
69
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
70
|
+
export type Response = KeysSignSSHSIGResponsePayload;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* This specification's payload schema, as a value.
|
|
74
|
+
*
|
|
75
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
76
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
77
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
78
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
79
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
80
|
+
*/
|
|
81
|
+
export const PAYLOAD_SCHEMA = {
|
|
82
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
83
|
+
"$id": "https://trusttasks.org/spec/keys/sign-sshsig/0.1",
|
|
84
|
+
"title": "Keys — Sign SSHSIG — payload",
|
|
85
|
+
"description": "A request for an SSHSIG signature (the OpenSSH `PROTOCOL.sshsig` format git uses for SSH commit signing) over a message digest, made with a key the custodian holds. The producer supplies the digest and the namespace; the custodian builds the signed-data structure itself. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"keyId",
|
|
90
|
+
"algorithm",
|
|
91
|
+
"namespace",
|
|
92
|
+
"hashAlgorithm",
|
|
93
|
+
"messageHash"
|
|
94
|
+
],
|
|
95
|
+
"properties": {
|
|
96
|
+
"keyId": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"description": "Identifier of the key to sign with. The key MUST be `active`."
|
|
100
|
+
},
|
|
101
|
+
"algorithm": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"enum": [
|
|
104
|
+
"EdDSA",
|
|
105
|
+
"ES256"
|
|
106
|
+
],
|
|
107
|
+
"description": "Signature algorithm, as a JOSE identifier: `EdDSA` with an `ed25519` key (SSH key type `ssh-ed25519`), `ES256` with a `p256` key (`ecdsa-sha2-nistp256`). These are the custodian-held key types SSHSIG defines a signature for. MUST be compatible with the named key's `keyType`. Closed: an unrecognised algorithm is refused, never substituted."
|
|
108
|
+
},
|
|
109
|
+
"namespace": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"pattern": "^[!-~]{1,128}$",
|
|
112
|
+
"description": "The SSHSIG namespace the signature is bound to — `git` for a git commit or tag, `file` for `ssh-keygen -Y sign` over a file. Printable ASCII without spaces. A signature made under one namespace does not verify under another, so the custodian MAY restrict which namespaces a producer may name."
|
|
113
|
+
},
|
|
114
|
+
"hashAlgorithm": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": [
|
|
117
|
+
"sha256",
|
|
118
|
+
"sha512"
|
|
119
|
+
],
|
|
120
|
+
"description": "The digest algorithm the producer applied to the message, in the SSHSIG spelling (externally owned, carried verbatim). It is written into the signed data, so the verifier recomputes the digest with the same algorithm."
|
|
121
|
+
},
|
|
122
|
+
"messageHash": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
125
|
+
"minLength": 43,
|
|
126
|
+
"maxLength": 86,
|
|
127
|
+
"description": "The digest of the message, `H(message)` in `PROTOCOL.sshsig`, base64url-encoded without padding: 32 bytes (43 characters) for `sha256`, 64 bytes (86 characters) for `sha512`. The custodian never sees the message itself."
|
|
128
|
+
},
|
|
129
|
+
"ext": {
|
|
130
|
+
"$ref": "#/$defs/Ext",
|
|
131
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"$defs": {
|
|
135
|
+
"Response": {
|
|
136
|
+
"$anchor": "response",
|
|
137
|
+
"title": "Keys — Sign SSHSIG — response payload",
|
|
138
|
+
"description": "The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": [
|
|
142
|
+
"keyId",
|
|
143
|
+
"algorithm",
|
|
144
|
+
"signature"
|
|
145
|
+
],
|
|
146
|
+
"properties": {
|
|
147
|
+
"keyId": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
|
|
150
|
+
},
|
|
151
|
+
"algorithm": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"enum": [
|
|
154
|
+
"EdDSA",
|
|
155
|
+
"ES256"
|
|
156
|
+
],
|
|
157
|
+
"description": "The algorithm the signature was made with — the one the request named."
|
|
158
|
+
},
|
|
159
|
+
"signature": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
162
|
+
"description": "The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob."
|
|
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
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
183
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
184
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
185
|
+
"$ref": "#/$defs/Response",
|
|
186
|
+
"$defs": {
|
|
187
|
+
"Response": {
|
|
188
|
+
"$anchor": "response",
|
|
189
|
+
"title": "Keys — Sign SSHSIG — response payload",
|
|
190
|
+
"description": "The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.",
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": [
|
|
194
|
+
"keyId",
|
|
195
|
+
"algorithm",
|
|
196
|
+
"signature"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"keyId": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
|
|
202
|
+
},
|
|
203
|
+
"algorithm": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"enum": [
|
|
206
|
+
"EdDSA",
|
|
207
|
+
"ES256"
|
|
208
|
+
],
|
|
209
|
+
"description": "The algorithm the signature was made with — the one the request named."
|
|
210
|
+
},
|
|
211
|
+
"signature": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
214
|
+
"description": "The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob."
|
|
215
|
+
},
|
|
216
|
+
"ext": {
|
|
217
|
+
"$ref": "#/$defs/Ext"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"Ext": {
|
|
222
|
+
"title": "Ext",
|
|
223
|
+
"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.",
|
|
224
|
+
"type": "object",
|
|
225
|
+
"minProperties": 1,
|
|
226
|
+
"additionalProperties": true,
|
|
227
|
+
"propertyNames": {
|
|
228
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
} as const;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
236
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
237
|
+
* per-specification and cannot be derived from the document alone, and
|
|
238
|
+
* item 2 needs the schema this carries.
|
|
239
|
+
*/
|
|
240
|
+
export const SPEC = {
|
|
241
|
+
typeUri: TYPE_URI,
|
|
242
|
+
isBearer: false,
|
|
243
|
+
isProofRequired: true,
|
|
244
|
+
isRecipientRequired: true,
|
|
245
|
+
isIssuedAtRequired: true,
|
|
246
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
247
|
+
} as const;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
251
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
252
|
+
* parties (§7.3 item 5).
|
|
253
|
+
*/
|
|
254
|
+
export const RESPONSE_SPEC = {
|
|
255
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
256
|
+
isBearer: false,
|
|
257
|
+
isProofRequired: false,
|
|
258
|
+
isRecipientRequired: true,
|
|
259
|
+
isIssuedAtRequired: true,
|
|
260
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
261
|
+
} as const;
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`; a request that omits it gets `P3D`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`).
|
|
11
|
+
*/
|
|
12
|
+
export type TickLength = string;
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* Turn on (or rotate the parameters of) hidden-vetter admission for one criterion. Every member but criterionId has a default. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
16
|
*/
|
|
@@ -30,6 +35,7 @@ export interface VTCVettingHiddenPublishPayload {
|
|
|
30
35
|
* How many attestation tokens a vetter draws per tick. Defaults to three.
|
|
31
36
|
*/
|
|
32
37
|
dripPerTick?: number;
|
|
38
|
+
tickLength?: TickLength;
|
|
33
39
|
/**
|
|
34
40
|
* Events this community is running, replacing whatever was there. Absent or empty removes every event.
|
|
35
41
|
*/
|
|
@@ -113,6 +119,7 @@ export interface StoredConfig {
|
|
|
113
119
|
livePeriods: string[];
|
|
114
120
|
liveTokenLabels: string[];
|
|
115
121
|
dripPerTick: number;
|
|
122
|
+
tickLength: TickLength;
|
|
116
123
|
events: StoredEvent[];
|
|
117
124
|
}
|
|
118
125
|
export interface StoredEvent {
|
|
@@ -146,6 +153,7 @@ export interface PublishedConfig {
|
|
|
146
153
|
vetterLabels: string[];
|
|
147
154
|
tokenLabels: string[];
|
|
148
155
|
dripPerTick: number;
|
|
156
|
+
tickLength: TickLength;
|
|
149
157
|
events: PublishedEvent[];
|
|
150
158
|
}
|
|
151
159
|
/**
|
|
@@ -222,6 +230,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
222
230
|
"minimum": 1,
|
|
223
231
|
"description": "How many attestation tokens a vetter draws per tick. Defaults to three."
|
|
224
232
|
},
|
|
233
|
+
"tickLength": {
|
|
234
|
+
"$ref": "#/$defs/TickLength"
|
|
235
|
+
},
|
|
225
236
|
"events": {
|
|
226
237
|
"type": "array",
|
|
227
238
|
"items": {
|
|
@@ -234,6 +245,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
234
245
|
}
|
|
235
246
|
},
|
|
236
247
|
"$defs": {
|
|
248
|
+
"TickLength": {
|
|
249
|
+
"title": "TickLength",
|
|
250
|
+
"type": "string",
|
|
251
|
+
"pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
|
|
252
|
+
"description": "The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`; a request that omits it gets `P3D`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`)."
|
|
253
|
+
},
|
|
237
254
|
"RequestEvent": {
|
|
238
255
|
"title": "RequestEvent",
|
|
239
256
|
"type": "object",
|
|
@@ -403,6 +420,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
403
420
|
"livePeriods",
|
|
404
421
|
"liveTokenLabels",
|
|
405
422
|
"dripPerTick",
|
|
423
|
+
"tickLength",
|
|
406
424
|
"events"
|
|
407
425
|
],
|
|
408
426
|
"properties": {
|
|
@@ -440,6 +458,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
440
458
|
"type": "integer",
|
|
441
459
|
"minimum": 1
|
|
442
460
|
},
|
|
461
|
+
"tickLength": {
|
|
462
|
+
"$ref": "#/$defs/TickLength"
|
|
463
|
+
},
|
|
443
464
|
"events": {
|
|
444
465
|
"type": "array",
|
|
445
466
|
"items": {
|
|
@@ -460,6 +481,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
460
481
|
"vetterLabels",
|
|
461
482
|
"tokenLabels",
|
|
462
483
|
"dripPerTick",
|
|
484
|
+
"tickLength",
|
|
463
485
|
"events"
|
|
464
486
|
],
|
|
465
487
|
"properties": {
|
|
@@ -496,6 +518,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
496
518
|
"type": "integer",
|
|
497
519
|
"minimum": 1
|
|
498
520
|
},
|
|
521
|
+
"tickLength": {
|
|
522
|
+
"$ref": "#/$defs/TickLength"
|
|
523
|
+
},
|
|
499
524
|
"events": {
|
|
500
525
|
"type": "array",
|
|
501
526
|
"items": {
|
|
@@ -557,6 +582,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
557
582
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
558
583
|
"$ref": "#/$defs/Response",
|
|
559
584
|
"$defs": {
|
|
585
|
+
"TickLength": {
|
|
586
|
+
"title": "TickLength",
|
|
587
|
+
"type": "string",
|
|
588
|
+
"pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
|
|
589
|
+
"description": "The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`; a request that omits it gets `P3D`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`)."
|
|
590
|
+
},
|
|
560
591
|
"RequestEvent": {
|
|
561
592
|
"title": "RequestEvent",
|
|
562
593
|
"type": "object",
|
|
@@ -726,6 +757,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
726
757
|
"livePeriods",
|
|
727
758
|
"liveTokenLabels",
|
|
728
759
|
"dripPerTick",
|
|
760
|
+
"tickLength",
|
|
729
761
|
"events"
|
|
730
762
|
],
|
|
731
763
|
"properties": {
|
|
@@ -763,6 +795,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
763
795
|
"type": "integer",
|
|
764
796
|
"minimum": 1
|
|
765
797
|
},
|
|
798
|
+
"tickLength": {
|
|
799
|
+
"$ref": "#/$defs/TickLength"
|
|
800
|
+
},
|
|
766
801
|
"events": {
|
|
767
802
|
"type": "array",
|
|
768
803
|
"items": {
|
|
@@ -783,6 +818,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
783
818
|
"vetterLabels",
|
|
784
819
|
"tokenLabels",
|
|
785
820
|
"dripPerTick",
|
|
821
|
+
"tickLength",
|
|
786
822
|
"events"
|
|
787
823
|
],
|
|
788
824
|
"properties": {
|
|
@@ -819,6 +855,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
819
855
|
"type": "integer",
|
|
820
856
|
"minimum": 1
|
|
821
857
|
},
|
|
858
|
+
"tickLength": {
|
|
859
|
+
"$ref": "#/$defs/TickLength"
|
|
860
|
+
},
|
|
822
861
|
"events": {
|
|
823
862
|
"type": "array",
|
|
824
863
|
"items": {
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`).
|
|
11
|
+
*/
|
|
12
|
+
export type TickLength = string;
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* Read one criterion's stored hidden-vetting configuration, what it publishes, and the aggregate counts an administrator needs to run it. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
16
|
*/
|
|
@@ -65,6 +70,7 @@ export interface StoredConfig {
|
|
|
65
70
|
livePeriods: string[];
|
|
66
71
|
liveTokenLabels: string[];
|
|
67
72
|
dripPerTick: number;
|
|
73
|
+
tickLength: TickLength;
|
|
68
74
|
events: StoredEvent[];
|
|
69
75
|
}
|
|
70
76
|
export interface StoredEvent {
|
|
@@ -108,6 +114,7 @@ export interface PublishedConfig {
|
|
|
108
114
|
vetterLabels: string[];
|
|
109
115
|
tokenLabels: string[];
|
|
110
116
|
dripPerTick: number;
|
|
117
|
+
tickLength: TickLength;
|
|
111
118
|
events: PublishedEvent[];
|
|
112
119
|
}
|
|
113
120
|
/**
|
|
@@ -306,6 +313,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
306
313
|
"livePeriods",
|
|
307
314
|
"liveTokenLabels",
|
|
308
315
|
"dripPerTick",
|
|
316
|
+
"tickLength",
|
|
309
317
|
"events"
|
|
310
318
|
],
|
|
311
319
|
"properties": {
|
|
@@ -343,6 +351,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
343
351
|
"type": "integer",
|
|
344
352
|
"minimum": 1
|
|
345
353
|
},
|
|
354
|
+
"tickLength": {
|
|
355
|
+
"$ref": "#/$defs/TickLength"
|
|
356
|
+
},
|
|
346
357
|
"events": {
|
|
347
358
|
"type": "array",
|
|
348
359
|
"items": {
|
|
@@ -363,6 +374,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
363
374
|
"vetterLabels",
|
|
364
375
|
"tokenLabels",
|
|
365
376
|
"dripPerTick",
|
|
377
|
+
"tickLength",
|
|
366
378
|
"events"
|
|
367
379
|
],
|
|
368
380
|
"properties": {
|
|
@@ -399,6 +411,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
399
411
|
"type": "integer",
|
|
400
412
|
"minimum": 1
|
|
401
413
|
},
|
|
414
|
+
"tickLength": {
|
|
415
|
+
"$ref": "#/$defs/TickLength"
|
|
416
|
+
},
|
|
402
417
|
"events": {
|
|
403
418
|
"type": "array",
|
|
404
419
|
"items": {
|
|
@@ -516,6 +531,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
516
531
|
}
|
|
517
532
|
}
|
|
518
533
|
},
|
|
534
|
+
"TickLength": {
|
|
535
|
+
"title": "TickLength",
|
|
536
|
+
"type": "string",
|
|
537
|
+
"pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
|
|
538
|
+
"description": "The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`)."
|
|
539
|
+
},
|
|
519
540
|
"Ext": {
|
|
520
541
|
"title": "Ext",
|
|
521
542
|
"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.",
|
|
@@ -652,6 +673,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
652
673
|
"livePeriods",
|
|
653
674
|
"liveTokenLabels",
|
|
654
675
|
"dripPerTick",
|
|
676
|
+
"tickLength",
|
|
655
677
|
"events"
|
|
656
678
|
],
|
|
657
679
|
"properties": {
|
|
@@ -689,6 +711,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
689
711
|
"type": "integer",
|
|
690
712
|
"minimum": 1
|
|
691
713
|
},
|
|
714
|
+
"tickLength": {
|
|
715
|
+
"$ref": "#/$defs/TickLength"
|
|
716
|
+
},
|
|
692
717
|
"events": {
|
|
693
718
|
"type": "array",
|
|
694
719
|
"items": {
|
|
@@ -709,6 +734,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
709
734
|
"vetterLabels",
|
|
710
735
|
"tokenLabels",
|
|
711
736
|
"dripPerTick",
|
|
737
|
+
"tickLength",
|
|
712
738
|
"events"
|
|
713
739
|
],
|
|
714
740
|
"properties": {
|
|
@@ -745,6 +771,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
745
771
|
"type": "integer",
|
|
746
772
|
"minimum": 1
|
|
747
773
|
},
|
|
774
|
+
"tickLength": {
|
|
775
|
+
"$ref": "#/$defs/TickLength"
|
|
776
|
+
},
|
|
748
777
|
"events": {
|
|
749
778
|
"type": "array",
|
|
750
779
|
"items": {
|
|
@@ -862,6 +891,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
862
891
|
}
|
|
863
892
|
}
|
|
864
893
|
},
|
|
894
|
+
"TickLength": {
|
|
895
|
+
"title": "TickLength",
|
|
896
|
+
"type": "string",
|
|
897
|
+
"pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
|
|
898
|
+
"description": "The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`)."
|
|
899
|
+
},
|
|
865
900
|
"Ext": {
|
|
866
901
|
"title": "Ext",
|
|
867
902
|
"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.",
|
|
@@ -15,7 +15,7 @@ export interface VTCVettingPCSTokensPayload {
|
|
|
15
15
|
*/
|
|
16
16
|
label: string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Which tick of this label is being drawn: tick `t` is the window starting `t` tick lengths after the label's start instant (see the specification's Definitions). The community refuses a tick that has not begun (`tickNotYet`) and one already served (`alreadyServed`), so the total drawn under a label is bounded by the drip rate times the ticks elapsed.
|
|
19
19
|
*/
|
|
20
20
|
tick: number;
|
|
21
21
|
/**
|
|
@@ -116,7 +116,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
116
116
|
"tick": {
|
|
117
117
|
"type": "integer",
|
|
118
118
|
"minimum": 0,
|
|
119
|
-
"description": "
|
|
119
|
+
"description": "Which tick of this label is being drawn: tick `t` is the window starting `t` tick lengths after the label's start instant (see the specification's Definitions). The community refuses a tick that has not begun (`tickNotYet`) and one already served (`alreadyServed`), so the total drawn under a label is bounded by the drip rate times the ticks elapsed."
|
|
120
120
|
},
|
|
121
121
|
"requests": {
|
|
122
122
|
"type": "array",
|