@openvtc/trust-tasks 0.20.1 → 0.20.2
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 +59 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -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/index.ts +5 -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,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/vetting/pcs-challenge/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/pcs-challenge/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/pcs-challenge/0.1#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/vtc/vetting/pcs-challenge/0.1",
|
|
21
|
+
"title": "VTC — Vetting PCS Challenge — payload",
|
|
22
|
+
"description": "An applicant asks the community for the single-use challenge its hidden-vetting proof must be bound to. The community issues one per applicant and spends it when the proof is counted, so a proof cannot be submitted twice.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"criterionId": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 128,
|
|
30
|
+
"description": "OPTIONAL. The `id` of the admission criterion the coming submission answers. A community running one hidden-vetting criterion needs no hint; one running several may use it to refuse early rather than at submit."
|
|
31
|
+
},
|
|
32
|
+
"ext": {
|
|
33
|
+
"$ref": "#/$defs/Ext"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"$defs": {
|
|
37
|
+
"Response": {
|
|
38
|
+
"$anchor": "response",
|
|
39
|
+
"title": "VTC Vetting PCS Challenge — response payload",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": [
|
|
43
|
+
"challenge",
|
|
44
|
+
"expiresAt"
|
|
45
|
+
],
|
|
46
|
+
"description": "The challenge, and when it stops being accepted.",
|
|
47
|
+
"properties": {
|
|
48
|
+
"challenge": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^[0-9a-f]{32}$",
|
|
51
|
+
"description": "Lowercase hex, 16 bytes. Compared for equality and never parsed; the applicant binds it into the proof's context."
|
|
52
|
+
},
|
|
53
|
+
"expiresAt": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"format": "date-time",
|
|
56
|
+
"description": "After this instant the challenge is refused. A submission that misses it asks for another."
|
|
57
|
+
},
|
|
58
|
+
"ext": {
|
|
59
|
+
"$ref": "#/$defs/Ext"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"Ext": {
|
|
64
|
+
"title": "Ext",
|
|
65
|
+
"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.",
|
|
66
|
+
"type": "object",
|
|
67
|
+
"minProperties": 1,
|
|
68
|
+
"additionalProperties": true,
|
|
69
|
+
"propertyNames": {
|
|
70
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
76
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
77
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
78
|
+
"$ref": "#/$defs/Response",
|
|
79
|
+
"$defs": {
|
|
80
|
+
"Response": {
|
|
81
|
+
"$anchor": "response",
|
|
82
|
+
"title": "VTC Vetting PCS Challenge — response payload",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": [
|
|
86
|
+
"challenge",
|
|
87
|
+
"expiresAt"
|
|
88
|
+
],
|
|
89
|
+
"description": "The challenge, and when it stops being accepted.",
|
|
90
|
+
"properties": {
|
|
91
|
+
"challenge": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"pattern": "^[0-9a-f]{32}$",
|
|
94
|
+
"description": "Lowercase hex, 16 bytes. Compared for equality and never parsed; the applicant binds it into the proof's context."
|
|
95
|
+
},
|
|
96
|
+
"expiresAt": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"format": "date-time",
|
|
99
|
+
"description": "After this instant the challenge is refused. A submission that misses it asks for another."
|
|
100
|
+
},
|
|
101
|
+
"ext": {
|
|
102
|
+
"$ref": "#/$defs/Ext"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"Ext": {
|
|
107
|
+
"title": "Ext",
|
|
108
|
+
"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.",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"minProperties": 1,
|
|
111
|
+
"additionalProperties": true,
|
|
112
|
+
"propertyNames": {
|
|
113
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
120
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
121
|
+
* per-specification and cannot be derived from the document alone, and
|
|
122
|
+
* item 2 needs the schema this carries.
|
|
123
|
+
*/
|
|
124
|
+
export const SPEC = {
|
|
125
|
+
typeUri: TYPE_URI,
|
|
126
|
+
isBearer: false,
|
|
127
|
+
isProofRequired: true,
|
|
128
|
+
isRecipientRequired: true,
|
|
129
|
+
isIssuedAtRequired: true,
|
|
130
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
134
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
135
|
+
* parties (§7.3 item 5).
|
|
136
|
+
*/
|
|
137
|
+
export const RESPONSE_SPEC = {
|
|
138
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
139
|
+
isBearer: false,
|
|
140
|
+
isProofRequired: true,
|
|
141
|
+
isRecipientRequired: true,
|
|
142
|
+
isIssuedAtRequired: true,
|
|
143
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/vetting/pcs-challenge/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiCH,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,uCAAuC;IAChD,aAAa,EAAE,+NAA+N;IAC9O,MAAM,EAAE,QAAQ;IACh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