@openvtc/trust-tasks 0.22.2 → 0.22.4
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 +39 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/webvh/dids/create/1.1/payload.d.ts +834 -0
- package/dist/vta/webvh/dids/create/1.1/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/create/1.1/payload.js +415 -0
- package/dist/vta/webvh/dids/create/1.1/payload.js.map +1 -0
- package/dist/vtc/members/step-up-passkey-notice/0.1/payload.d.ts +176 -0
- package/dist/vtc/members/step-up-passkey-notice/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/members/step-up-passkey-notice/0.1/payload.js +95 -0
- package/dist/vtc/members/step-up-passkey-notice/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/vta/webvh/dids/create/1.1/payload.ts +570 -0
- package/src/vtc/members/step-up-passkey-notice/0.1/payload.ts +137 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/members/step-up-passkey-notice/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The VTC tells a member that a step-up passkey was enrolled for them or revoked from them, naming who acted and when. Unsolicited: the member did not ask, and may be offline.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCMembersStepUpPasskeyNoticePayload {
|
|
13
|
+
/**
|
|
14
|
+
* `enrolled` — a step-up passkey (auth/passkey/enroll/invite or auth/passkey/enroll/finish, purpose stepUp) is now bound to the member. `revoked` — one was unbound (auth/passkey/revoke/finish).
|
|
15
|
+
*/
|
|
16
|
+
event: "enrolled" | "revoked";
|
|
17
|
+
/**
|
|
18
|
+
* The member's own DID — the notice's recipient. Carried in the payload as well as the envelope so that a forwarded notice, detached from its transport, still names its subject.
|
|
19
|
+
*/
|
|
20
|
+
did: string;
|
|
21
|
+
/**
|
|
22
|
+
* Durable identifier of the step-up credential, as auth/passkey/revoke/start and auth/passkey/admin-list carry it: opaque, non-secret metadata, never key material. Lets the member recognise or distinguish a credential without disclosing anything that would help an attacker.
|
|
23
|
+
*/
|
|
24
|
+
credentialId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Who acted: the member themselves (equal to `did`) when they enrolled or revoked it on their own session, or an administrator's DID when they invited the enrollment or revoked for the member. A `by` other than `did` is the signal this task exists to carry — act on someone else's behalf is exactly the account-takeover shape a silent change would hide.
|
|
27
|
+
*/
|
|
28
|
+
by: string;
|
|
29
|
+
/**
|
|
30
|
+
* When the event took effect at the VTC — not when the notice was sent, which differs whenever the member was offline.
|
|
31
|
+
*/
|
|
32
|
+
at: string;
|
|
33
|
+
/**
|
|
34
|
+
* The acting administrator's stated reason, verbatim, when one was given. Absent rather than empty when none was: a community that chose not to explain is itself information. Never populated for a member acting on their own credential — they already know why.
|
|
35
|
+
*/
|
|
36
|
+
reason?: string;
|
|
37
|
+
ext?: Ext;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
41
|
+
export type { Ext };
|
|
42
|
+
|
|
43
|
+
/** Trust Task type URI. */
|
|
44
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/members/step-up-passkey-notice/0.1" as const;
|
|
45
|
+
|
|
46
|
+
/** Stable alias for this specification's request payload shape. */
|
|
47
|
+
export type Payload = VTCMembersStepUpPasskeyNoticePayload;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* This specification's payload schema, as a value.
|
|
51
|
+
*
|
|
52
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
53
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
54
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
55
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
56
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
57
|
+
*/
|
|
58
|
+
export const PAYLOAD_SCHEMA = {
|
|
59
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
60
|
+
"$id": "https://trusttasks.org/spec/vtc/members/step-up-passkey-notice/0.1",
|
|
61
|
+
"title": "VTC Members — Step-up Passkey Notice — payload",
|
|
62
|
+
"description": "The VTC tells a member that a step-up passkey was enrolled for them or revoked from them, naming who acted and when. Unsolicited: the member did not ask, and may be offline.",
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": [
|
|
66
|
+
"event",
|
|
67
|
+
"did",
|
|
68
|
+
"credentialId",
|
|
69
|
+
"by",
|
|
70
|
+
"at"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"event": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"enum": [
|
|
76
|
+
"enrolled",
|
|
77
|
+
"revoked"
|
|
78
|
+
],
|
|
79
|
+
"description": "`enrolled` — a step-up passkey (auth/passkey/enroll/invite or auth/passkey/enroll/finish, purpose stepUp) is now bound to the member. `revoked` — one was unbound (auth/passkey/revoke/finish)."
|
|
80
|
+
},
|
|
81
|
+
"did": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"minLength": 1,
|
|
84
|
+
"description": "The member's own DID — the notice's recipient. Carried in the payload as well as the envelope so that a forwarded notice, detached from its transport, still names its subject."
|
|
85
|
+
},
|
|
86
|
+
"credentialId": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"description": "Durable identifier of the step-up credential, as auth/passkey/revoke/start and auth/passkey/admin-list carry it: opaque, non-secret metadata, never key material. Lets the member recognise or distinguish a credential without disclosing anything that would help an attacker."
|
|
90
|
+
},
|
|
91
|
+
"by": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"description": "Who acted: the member themselves (equal to `did`) when they enrolled or revoked it on their own session, or an administrator's DID when they invited the enrollment or revoked for the member. A `by` other than `did` is the signal this task exists to carry — act on someone else's behalf is exactly the account-takeover shape a silent change would hide."
|
|
95
|
+
},
|
|
96
|
+
"at": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"format": "date-time",
|
|
99
|
+
"description": "When the event took effect at the VTC — not when the notice was sent, which differs whenever the member was offline."
|
|
100
|
+
},
|
|
101
|
+
"reason": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"maxLength": 1024,
|
|
104
|
+
"description": "The acting administrator's stated reason, verbatim, when one was given. Absent rather than empty when none was: a community that chose not to explain is itself information. Never populated for a member acting on their own credential — they already know why."
|
|
105
|
+
},
|
|
106
|
+
"ext": {
|
|
107
|
+
"$ref": "#/$defs/Ext"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"$defs": {
|
|
111
|
+
"Ext": {
|
|
112
|
+
"title": "Ext",
|
|
113
|
+
"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.",
|
|
114
|
+
"type": "object",
|
|
115
|
+
"minProperties": 1,
|
|
116
|
+
"additionalProperties": true,
|
|
117
|
+
"propertyNames": {
|
|
118
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
} as const;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
126
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
127
|
+
* per-specification and cannot be derived from the document alone, and
|
|
128
|
+
* item 2 needs the schema this carries.
|
|
129
|
+
*/
|
|
130
|
+
export const SPEC = {
|
|
131
|
+
typeUri: TYPE_URI,
|
|
132
|
+
isBearer: false,
|
|
133
|
+
isProofRequired: true,
|
|
134
|
+
isRecipientRequired: true,
|
|
135
|
+
isIssuedAtRequired: true,
|
|
136
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
137
|
+
} as const;
|