@openvtc/trust-tasks 0.23.5 → 0.23.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.
- package/CHANGELOG.md +62 -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 +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -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/show/0.1/payload.d.ts +1361 -0
- package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/hidden/show/0.1/payload.js +751 -0
- package/dist/vtc/vetting/hidden/show/0.1/payload.js.map +1 -0
- package/dist/vtc/vetting/hidden/withdraw/0.1/payload.d.ts +270 -0
- package/dist/vtc/vetting/hidden/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/vetting/hidden/withdraw/0.1/payload.js +159 -0
- package/dist/vtc/vetting/hidden/withdraw/0.1/payload.js.map +1 -0
- 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 +3 -0
- package/src/keys/sign-sshsig/0.1/payload.ts +261 -0
- package/src/vtc/vetting/hidden/show/0.1/payload.ts +905 -0
- package/src/vtc/vetting/hidden/withdraw/0.1/payload.ts +202 -0
|
@@ -0,0 +1,196 @@
|
|
|
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
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/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/keys/sign-sshsig/0.1",
|
|
21
|
+
"title": "Keys — Sign SSHSIG — payload",
|
|
22
|
+
"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.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"keyId",
|
|
27
|
+
"algorithm",
|
|
28
|
+
"namespace",
|
|
29
|
+
"hashAlgorithm",
|
|
30
|
+
"messageHash"
|
|
31
|
+
],
|
|
32
|
+
"properties": {
|
|
33
|
+
"keyId": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"description": "Identifier of the key to sign with. The key MUST be `active`."
|
|
37
|
+
},
|
|
38
|
+
"algorithm": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"EdDSA",
|
|
42
|
+
"ES256"
|
|
43
|
+
],
|
|
44
|
+
"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."
|
|
45
|
+
},
|
|
46
|
+
"namespace": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^[!-~]{1,128}$",
|
|
49
|
+
"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."
|
|
50
|
+
},
|
|
51
|
+
"hashAlgorithm": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": [
|
|
54
|
+
"sha256",
|
|
55
|
+
"sha512"
|
|
56
|
+
],
|
|
57
|
+
"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."
|
|
58
|
+
},
|
|
59
|
+
"messageHash": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
62
|
+
"minLength": 43,
|
|
63
|
+
"maxLength": 86,
|
|
64
|
+
"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."
|
|
65
|
+
},
|
|
66
|
+
"ext": {
|
|
67
|
+
"$ref": "#/$defs/Ext",
|
|
68
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"$defs": {
|
|
72
|
+
"Response": {
|
|
73
|
+
"$anchor": "response",
|
|
74
|
+
"title": "Keys — Sign SSHSIG — response payload",
|
|
75
|
+
"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.",
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"required": [
|
|
79
|
+
"keyId",
|
|
80
|
+
"algorithm",
|
|
81
|
+
"signature"
|
|
82
|
+
],
|
|
83
|
+
"properties": {
|
|
84
|
+
"keyId": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
|
|
87
|
+
},
|
|
88
|
+
"algorithm": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": [
|
|
91
|
+
"EdDSA",
|
|
92
|
+
"ES256"
|
|
93
|
+
],
|
|
94
|
+
"description": "The algorithm the signature was made with — the one the request named."
|
|
95
|
+
},
|
|
96
|
+
"signature": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
99
|
+
"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."
|
|
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
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
119
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
120
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
121
|
+
"$ref": "#/$defs/Response",
|
|
122
|
+
"$defs": {
|
|
123
|
+
"Response": {
|
|
124
|
+
"$anchor": "response",
|
|
125
|
+
"title": "Keys — Sign SSHSIG — response payload",
|
|
126
|
+
"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.",
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"required": [
|
|
130
|
+
"keyId",
|
|
131
|
+
"algorithm",
|
|
132
|
+
"signature"
|
|
133
|
+
],
|
|
134
|
+
"properties": {
|
|
135
|
+
"keyId": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
|
|
138
|
+
},
|
|
139
|
+
"algorithm": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"enum": [
|
|
142
|
+
"EdDSA",
|
|
143
|
+
"ES256"
|
|
144
|
+
],
|
|
145
|
+
"description": "The algorithm the signature was made with — the one the request named."
|
|
146
|
+
},
|
|
147
|
+
"signature": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
150
|
+
"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."
|
|
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
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
171
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
172
|
+
* per-specification and cannot be derived from the document alone, and
|
|
173
|
+
* item 2 needs the schema this carries.
|
|
174
|
+
*/
|
|
175
|
+
export const SPEC = {
|
|
176
|
+
typeUri: TYPE_URI,
|
|
177
|
+
isBearer: false,
|
|
178
|
+
isProofRequired: true,
|
|
179
|
+
isRecipientRequired: true,
|
|
180
|
+
isIssuedAtRequired: true,
|
|
181
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
185
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
186
|
+
* parties (§7.3 item 5).
|
|
187
|
+
*/
|
|
188
|
+
export const RESPONSE_SPEC = {
|
|
189
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
190
|
+
isBearer: false,
|
|
191
|
+
isProofRequired: false,
|
|
192
|
+
isRecipientRequired: true,
|
|
193
|
+
isIssuedAtRequired: true,
|
|
194
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/keys/sign-sshsig/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwDH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,kDAA2D,CAAC;AAKpF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,2DAAoE,CAAC;AAKtG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,8BAA8B;IACvC,aAAa,EAAE,8YAA8Y;IAC7Z,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,OAAO;QACP,WAAW;QACX,WAAW;QACX,eAAe;QACf,aAAa;KACd;IACD,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,+DAA+D;SAC/E;QACD,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,OAAO;gBACP,OAAO;aACR;YACD,aAAa,EAAE,sVAAsV;SACtW;QACD,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ;Y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