@openvtc/trust-tasks 0.20.6 → 0.20.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.
Files changed (152) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/dist/_shared/components.d.ts +55 -6
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/step-up/approve-request/0.3/payload.d.ts +613 -0
  5. package/dist/auth/step-up/approve-request/0.3/payload.d.ts.map +1 -0
  6. package/dist/auth/step-up/approve-request/0.3/payload.js +345 -0
  7. package/dist/auth/step-up/approve-request/0.3/payload.js.map +1 -0
  8. package/dist/auth/step-up/approve-response/0.4/payload.d.ts +887 -0
  9. package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -0
  10. package/dist/auth/step-up/approve-response/0.4/payload.js +504 -0
  11. package/dist/auth/step-up/approve-response/0.4/payload.js.map +1 -0
  12. package/dist/backup/abort/0.1/payload.d.ts +262 -0
  13. package/dist/backup/abort/0.1/payload.d.ts.map +1 -0
  14. package/dist/backup/abort/0.1/payload.js +146 -0
  15. package/dist/backup/abort/0.1/payload.js.map +1 -0
  16. package/dist/backup/complete-export/0.1/payload.d.ts +262 -0
  17. package/dist/backup/complete-export/0.1/payload.d.ts.map +1 -0
  18. package/dist/backup/complete-export/0.1/payload.js +146 -0
  19. package/dist/backup/complete-export/0.1/payload.js.map +1 -0
  20. package/dist/backup/finalize-import/0.1/payload.d.ts +395 -0
  21. package/dist/backup/finalize-import/0.1/payload.d.ts.map +1 -0
  22. package/dist/backup/finalize-import/0.1/payload.js +209 -0
  23. package/dist/backup/finalize-import/0.1/payload.js.map +1 -0
  24. package/dist/backup/get-chunk/0.1/payload.d.ts +461 -0
  25. package/dist/backup/get-chunk/0.1/payload.d.ts.map +1 -0
  26. package/dist/backup/get-chunk/0.1/payload.js +250 -0
  27. package/dist/backup/get-chunk/0.1/payload.js.map +1 -0
  28. package/dist/backup/initiate-export/0.1/payload.d.ts +896 -0
  29. package/dist/backup/initiate-export/0.1/payload.d.ts.map +1 -0
  30. package/dist/backup/initiate-export/0.1/payload.js +507 -0
  31. package/dist/backup/initiate-export/0.1/payload.js.map +1 -0
  32. package/dist/backup/initiate-import/0.1/payload.d.ts +888 -0
  33. package/dist/backup/initiate-import/0.1/payload.d.ts.map +1 -0
  34. package/dist/backup/initiate-import/0.1/payload.js +504 -0
  35. package/dist/backup/initiate-import/0.1/payload.js.map +1 -0
  36. package/dist/backup/put-chunk/0.1/payload.d.ts +495 -0
  37. package/dist/backup/put-chunk/0.1/payload.d.ts.map +1 -0
  38. package/dist/backup/put-chunk/0.1/payload.js +265 -0
  39. package/dist/backup/put-chunk/0.1/payload.js.map +1 -0
  40. package/dist/git-ns/_shared/0.1/git-ns.d.ts +1 -1
  41. package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -1
  42. package/dist/git-ns/_shared/0.2/git-ns.d.ts +1 -1
  43. package/dist/git-ns/_shared/0.2/git-ns.d.ts.map +1 -1
  44. package/dist/git-ns/_shared/0.3/git-ns.d.ts +16 -0
  45. package/dist/git-ns/_shared/0.3/git-ns.d.ts.map +1 -0
  46. package/dist/git-ns/_shared/0.3/git-ns.js +6 -0
  47. package/dist/git-ns/_shared/0.3/git-ns.js.map +1 -0
  48. package/dist/git-ns/bridge/job/0.1/payload.d.ts +1 -1
  49. package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -1
  50. package/dist/git-ns/bridge/job/0.2/payload.d.ts +1 -1
  51. package/dist/git-ns/bridge/job/0.2/payload.d.ts.map +1 -1
  52. package/dist/git-ns/bridge/job/0.3/payload.d.ts +1068 -0
  53. package/dist/git-ns/bridge/job/0.3/payload.d.ts.map +1 -0
  54. package/dist/git-ns/bridge/job/0.3/payload.js +573 -0
  55. package/dist/git-ns/bridge/job/0.3/payload.js.map +1 -0
  56. package/dist/git-ns/drift/resolve/0.1/payload.d.ts +1 -1
  57. package/dist/git-ns/drift/resolve/0.1/payload.d.ts.map +1 -1
  58. package/dist/git-ns/drift/resolve/0.2/payload.d.ts +1060 -0
  59. package/dist/git-ns/drift/resolve/0.2/payload.d.ts.map +1 -0
  60. package/dist/git-ns/drift/resolve/0.2/payload.js +630 -0
  61. package/dist/git-ns/drift/resolve/0.2/payload.js.map +1 -0
  62. package/dist/git-ns/namespace/reseat/0.1/payload.d.ts +1 -1
  63. package/dist/git-ns/namespace/reseat/0.1/payload.d.ts.map +1 -1
  64. package/dist/git-ns/namespace/reseat/0.2/payload.d.ts +515 -0
  65. package/dist/git-ns/namespace/reseat/0.2/payload.d.ts.map +1 -0
  66. package/dist/git-ns/namespace/reseat/0.2/payload.js +296 -0
  67. package/dist/git-ns/namespace/reseat/0.2/payload.js.map +1 -0
  68. package/dist/git-ns/repo/adopt/0.1/payload.d.ts +1 -1
  69. package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -1
  70. package/dist/git-ns/repo/adopt/0.2/payload.d.ts +962 -0
  71. package/dist/git-ns/repo/adopt/0.2/payload.d.ts.map +1 -0
  72. package/dist/git-ns/repo/adopt/0.2/payload.js +583 -0
  73. package/dist/git-ns/repo/adopt/0.2/payload.js.map +1 -0
  74. package/dist/git-ns/repo/archive/0.1/payload.d.ts +1 -1
  75. package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -1
  76. package/dist/git-ns/repo/archive/0.2/payload.d.ts +959 -0
  77. package/dist/git-ns/repo/archive/0.2/payload.d.ts.map +1 -0
  78. package/dist/git-ns/repo/archive/0.2/payload.js +584 -0
  79. package/dist/git-ns/repo/archive/0.2/payload.js.map +1 -0
  80. package/dist/git-ns/repo/create/0.1/payload.d.ts +1 -1
  81. package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -1
  82. package/dist/git-ns/repo/create/0.2/payload.d.ts +1074 -0
  83. package/dist/git-ns/repo/create/0.2/payload.d.ts.map +1 -0
  84. package/dist/git-ns/repo/create/0.2/payload.js +636 -0
  85. package/dist/git-ns/repo/create/0.2/payload.js.map +1 -0
  86. package/dist/git-ns/repo/transfer/0.1/payload.d.ts +1 -1
  87. package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -1
  88. package/dist/git-ns/repo/transfer/0.2/payload.d.ts +947 -0
  89. package/dist/git-ns/repo/transfer/0.2/payload.d.ts.map +1 -0
  90. package/dist/git-ns/repo/transfer/0.2/payload.js +577 -0
  91. package/dist/git-ns/repo/transfer/0.2/payload.js.map +1 -0
  92. package/dist/git-ns/right/grant/0.1/payload.d.ts +1 -1
  93. package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -1
  94. package/dist/git-ns/right/grant/0.2/payload.d.ts +506 -0
  95. package/dist/git-ns/right/grant/0.2/payload.d.ts.map +1 -0
  96. package/dist/git-ns/right/grant/0.2/payload.js +289 -0
  97. package/dist/git-ns/right/grant/0.2/payload.js.map +1 -0
  98. package/dist/git-ns/right/revoke/0.1/payload.d.ts +1 -1
  99. package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -1
  100. package/dist/git-ns/right/revoke/0.2/payload.d.ts +492 -0
  101. package/dist/git-ns/right/revoke/0.2/payload.d.ts.map +1 -0
  102. package/dist/git-ns/right/revoke/0.2/payload.js +284 -0
  103. package/dist/git-ns/right/revoke/0.2/payload.js.map +1 -0
  104. package/dist/git-ns/view/0.1/payload.d.ts +1 -1
  105. package/dist/git-ns/view/0.1/payload.d.ts.map +1 -1
  106. package/dist/git-ns/view/0.2/payload.d.ts +1 -1
  107. package/dist/git-ns/view/0.2/payload.d.ts.map +1 -1
  108. package/dist/git-ns/view/0.3/payload.d.ts +1524 -0
  109. package/dist/git-ns/view/0.3/payload.d.ts.map +1 -0
  110. package/dist/git-ns/view/0.3/payload.js +918 -0
  111. package/dist/git-ns/view/0.3/payload.js.map +1 -0
  112. package/dist/index.d.ts +20 -0
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.js +20 -0
  115. package/dist/index.js.map +1 -1
  116. package/package.json +1 -1
  117. package/src/_shared/components.ts +55 -6
  118. package/src/auth/step-up/approve-request/0.3/payload.ts +421 -0
  119. package/src/auth/step-up/approve-response/0.4/payload.ts +593 -0
  120. package/src/backup/abort/0.1/payload.ts +191 -0
  121. package/src/backup/complete-export/0.1/payload.ts +191 -0
  122. package/src/backup/finalize-import/0.1/payload.ts +279 -0
  123. package/src/backup/get-chunk/0.1/payload.ts +308 -0
  124. package/src/backup/initiate-export/0.1/payload.ts +564 -0
  125. package/src/backup/initiate-import/0.1/payload.ts +561 -0
  126. package/src/backup/put-chunk/0.1/payload.ts +331 -0
  127. package/src/git-ns/_shared/0.1/git-ns.ts +1 -1
  128. package/src/git-ns/_shared/0.2/git-ns.ts +1 -1
  129. package/src/git-ns/_shared/0.3/git-ns.ts +17 -0
  130. package/src/git-ns/bridge/job/0.1/payload.ts +1 -1
  131. package/src/git-ns/bridge/job/0.2/payload.ts +1 -1
  132. package/src/git-ns/bridge/job/0.3/payload.ts +691 -0
  133. package/src/git-ns/drift/resolve/0.1/payload.ts +1 -1
  134. package/src/git-ns/drift/resolve/0.2/payload.ts +699 -0
  135. package/src/git-ns/namespace/reseat/0.1/payload.ts +1 -1
  136. package/src/git-ns/namespace/reseat/0.2/payload.ts +342 -0
  137. package/src/git-ns/repo/adopt/0.1/payload.ts +1 -1
  138. package/src/git-ns/repo/adopt/0.2/payload.ts +628 -0
  139. package/src/git-ns/repo/archive/0.1/payload.ts +1 -1
  140. package/src/git-ns/repo/archive/0.2/payload.ts +626 -0
  141. package/src/git-ns/repo/create/0.1/payload.ts +1 -1
  142. package/src/git-ns/repo/create/0.2/payload.ts +689 -0
  143. package/src/git-ns/repo/transfer/0.1/payload.ts +1 -1
  144. package/src/git-ns/repo/transfer/0.2/payload.ts +619 -0
  145. package/src/git-ns/right/grant/0.1/payload.ts +1 -1
  146. package/src/git-ns/right/grant/0.2/payload.ts +340 -0
  147. package/src/git-ns/right/revoke/0.1/payload.ts +1 -1
  148. package/src/git-ns/right/revoke/0.2/payload.ts +331 -0
  149. package/src/git-ns/view/0.1/payload.ts +1 -1
  150. package/src/git-ns/view/0.2/payload.ts +1 -1
  151. package/src/git-ns/view/0.3/payload.ts +981 -0
  152. package/src/index.ts +20 -0
@@ -0,0 +1,613 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/auth/step-up/approve-request/0.3/payload.schema.json
4
+ */
5
+ import type { Ext, PublicKeyCredentialDescriptor, PublicKeyCredentialRequestOptions } from "../../../../_shared/components.js";
6
+ /**
7
+ * A relying party asks an approver (typically a wallet or a VTA) to ratify an AAL elevation for a subject's session, or — bound to one operation — to approve that one act without elevating any session.
8
+ */
9
+ export interface AuthStepUpApproveRequest {
10
+ /**
11
+ * The VID whose session is being elevated, or — for a step-up bound to one operation — the VID whose act that operation is. The approver MUST verify this is a VID it can speak for.
12
+ */
13
+ subject: string;
14
+ /**
15
+ * The session the relying party wants elevated. Opaque to the approver. Absent only when the step-up is bound to one operation that arrived without a session (a signed Trust Task document, for instance); see `boundTo`.
16
+ */
17
+ sessionId?: string;
18
+ /**
19
+ * Present when the step-up authorizes exactly one operation rather than raising a session's assurance level. An opaque relying-party identifier for that operation — for an operation that arrived as a signed document, a digest of its type and payload salted with `challenge`. Echoed by a `recorded` approve-response acknowledgement. Not a capability: the binding is the relying party's own state.
20
+ */
21
+ boundTo?: string;
22
+ /**
23
+ * base64url-encoded nonce the approver will include in the approve-response signature. ≥128 bits entropy.
24
+ */
25
+ challenge: string;
26
+ /**
27
+ * Human-readable explanation of WHY the relying party is asking (e.g. "confirm transfer of 1000 USD to bob.example"). Surfaced to the user by the approver for consent. SHOULD be specific enough that a user can refuse intelligently.
28
+ */
29
+ reason: string;
30
+ /**
31
+ * The acr the relying party expects on the elevated session. Approvers MAY refuse if they cannot deliver this level.
32
+ */
33
+ targetAcr?: string;
34
+ /**
35
+ * Which approve-response evidence kinds the relying party will accept (see auth/step-up/approve-response `evidence`). When omitted, the approver MAY use any kind it supports. An approver that cannot satisfy any listed kind SHOULD refuse with `methodUnsupported`.
36
+ *
37
+ * @minItems 1
38
+ */
39
+ acceptableEvidence?: ["didSigned" | "webauthn", ...("didSigned" | "webauthn")[]];
40
+ /**
41
+ * Optional WebAuthn `PublicKeyCredentialRequestOptions` the approver passes to the platform passkey API when producing `webauthn` evidence. When present, its `challenge` MUST equal `payload.challenge` so the resulting assertion binds the same nonce the relying party bound server-side. `rpId`/`allowCredentials` identify which credential the approver should assert with.
42
+ */
43
+ webauthn?: PublicKeyCredentialRequestOptions;
44
+ /**
45
+ * Seconds within which the relying party expects the approve-response. Approvers SHOULD treat as advisory — the relying party's own expiry policy is authoritative.
46
+ */
47
+ ttl?: number;
48
+ ext?: Ext;
49
+ }
50
+ /**
51
+ * Synchronous ack from the approver acknowledging it received the request and will (or will not) deliver an approve-response. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/step-up/approve-request/0.3#response.
52
+ */
53
+ export interface AuthStepUpApproveRequestResponsePayload {
54
+ /**
55
+ * `accepted` means the approver received the request and will return an approve-response (typically via DIDComm). `refused` means it will not — `reason` MUST be set.
56
+ */
57
+ status: "accepted" | "refused";
58
+ /**
59
+ * Required when status is `refused`.
60
+ */
61
+ reason?: string;
62
+ ext?: Ext;
63
+ }
64
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
65
+ export type { Ext, PublicKeyCredentialDescriptor, PublicKeyCredentialRequestOptions };
66
+ /** Trust Task type URI. */
67
+ export declare const TYPE_URI: "https://trusttasks.org/spec/auth/step-up/approve-request/0.3";
68
+ /** Stable alias for this specification's request payload shape. */
69
+ export type Payload = AuthStepUpApproveRequest;
70
+ /** Trust Task response type URI (request type URI + "#response"). */
71
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/auth/step-up/approve-request/0.3#response";
72
+ /** Stable alias for this specification's success-response payload shape. */
73
+ export type Response = AuthStepUpApproveRequestResponsePayload;
74
+ /**
75
+ * This specification's payload schema, as a value.
76
+ *
77
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
78
+ * rather than only as a `.json` file because TypeScript types are erased
79
+ * at runtime: without a schema a consumer has nothing to validate, and
80
+ * every REQUIRED payload member is optional in practice. Cross-file
81
+ * `$ref`s are already inlined, so it needs no resolver.
82
+ */
83
+ export declare const PAYLOAD_SCHEMA: {
84
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
85
+ readonly $id: "https://trusttasks.org/spec/auth/step-up/approve-request/0.3";
86
+ readonly title: "Auth — Step-up Approve Request";
87
+ readonly description: "A relying party asks an approver (typically a wallet or a VTA) to ratify an AAL elevation for a subject's session, or — bound to one operation — to approve that one act without elevating any session.";
88
+ readonly type: "object";
89
+ readonly additionalProperties: false;
90
+ readonly required: readonly ["subject", "challenge", "reason"];
91
+ readonly properties: {
92
+ readonly subject: {
93
+ readonly type: "string";
94
+ readonly minLength: 1;
95
+ readonly description: "The VID whose session is being elevated, or — for a step-up bound to one operation — the VID whose act that operation is. The approver MUST verify this is a VID it can speak for.";
96
+ };
97
+ readonly sessionId: {
98
+ readonly type: "string";
99
+ readonly minLength: 1;
100
+ readonly description: "The session the relying party wants elevated. Opaque to the approver. Absent only when the step-up is bound to one operation that arrived without a session (a signed Trust Task document, for instance); see `boundTo`.";
101
+ };
102
+ readonly boundTo: {
103
+ readonly type: "string";
104
+ readonly minLength: 1;
105
+ readonly maxLength: 256;
106
+ readonly description: "Present when the step-up authorizes exactly one operation rather than raising a session's assurance level. An opaque relying-party identifier for that operation — for an operation that arrived as a signed document, a digest of its type and payload salted with `challenge`. Echoed by a `recorded` approve-response acknowledgement. Not a capability: the binding is the relying party's own state.";
107
+ };
108
+ readonly challenge: {
109
+ readonly type: "string";
110
+ readonly minLength: 16;
111
+ readonly description: "base64url-encoded nonce the approver will include in the approve-response signature. ≥128 bits entropy.";
112
+ };
113
+ readonly reason: {
114
+ readonly type: "string";
115
+ readonly minLength: 1;
116
+ readonly maxLength: 500;
117
+ readonly description: "Human-readable explanation of WHY the relying party is asking (e.g. \"confirm transfer of 1000 USD to bob.example\"). Surfaced to the user by the approver for consent. SHOULD be specific enough that a user can refuse intelligently.";
118
+ };
119
+ readonly targetAcr: {
120
+ readonly type: "string";
121
+ readonly description: "The acr the relying party expects on the elevated session. Approvers MAY refuse if they cannot deliver this level.";
122
+ };
123
+ readonly acceptableEvidence: {
124
+ readonly type: "array";
125
+ readonly minItems: 1;
126
+ readonly uniqueItems: true;
127
+ readonly items: {
128
+ readonly type: "string";
129
+ readonly enum: readonly ["didSigned", "webauthn"];
130
+ };
131
+ readonly description: "Which approve-response evidence kinds the relying party will accept (see auth/step-up/approve-response `evidence`). When omitted, the approver MAY use any kind it supports. An approver that cannot satisfy any listed kind SHOULD refuse with `methodUnsupported`.";
132
+ };
133
+ readonly webauthn: {
134
+ readonly $ref: "#/$defs/CredentialRequestOptions";
135
+ readonly description: "Optional WebAuthn `PublicKeyCredentialRequestOptions` the approver passes to the platform passkey API when producing `webauthn` evidence. When present, its `challenge` MUST equal `payload.challenge` so the resulting assertion binds the same nonce the relying party bound server-side. `rpId`/`allowCredentials` identify which credential the approver should assert with.";
136
+ };
137
+ readonly ttl: {
138
+ readonly type: "integer";
139
+ readonly minimum: 1;
140
+ readonly description: "Seconds within which the relying party expects the approve-response. Approvers SHOULD treat as advisory — the relying party's own expiry policy is authoritative.";
141
+ };
142
+ readonly ext: {
143
+ readonly $ref: "#/$defs/Ext";
144
+ };
145
+ };
146
+ readonly $defs: {
147
+ readonly Response: {
148
+ readonly $anchor: "response";
149
+ readonly title: "Auth Step-up Approve Request — response payload";
150
+ readonly description: "Synchronous ack from the approver acknowledging it received the request and will (or will not) deliver an approve-response. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/step-up/approve-request/0.3#response.";
151
+ readonly type: "object";
152
+ readonly additionalProperties: false;
153
+ readonly required: readonly ["status"];
154
+ readonly properties: {
155
+ readonly status: {
156
+ readonly type: "string";
157
+ readonly enum: readonly ["accepted", "refused"];
158
+ readonly description: "`accepted` means the approver received the request and will return an approve-response (typically via DIDComm). `refused` means it will not — `reason` MUST be set.";
159
+ };
160
+ readonly reason: {
161
+ readonly type: "string";
162
+ readonly maxLength: 1024;
163
+ readonly description: "Required when status is `refused`.";
164
+ };
165
+ readonly ext: {
166
+ readonly $ref: "#/$defs/Ext";
167
+ };
168
+ };
169
+ };
170
+ readonly Ext: {
171
+ readonly title: "Ext";
172
+ readonly 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.";
173
+ readonly type: "object";
174
+ readonly minProperties: 1;
175
+ readonly additionalProperties: true;
176
+ readonly propertyNames: {
177
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
178
+ };
179
+ };
180
+ readonly CredentialRequestOptions: {
181
+ readonly $anchor: "credentialRequestOptions";
182
+ readonly title: "PublicKeyCredentialRequestOptions";
183
+ readonly description: "Server-issued options for `navigator.credentials.get({ publicKey: ... })`.";
184
+ readonly type: "object";
185
+ readonly additionalProperties: false;
186
+ readonly required: readonly ["challenge"];
187
+ readonly properties: {
188
+ readonly extensions: {
189
+ readonly type: "object";
190
+ readonly description: "Client extension inputs, per the WebAuthn Level 2 `AuthenticationExtensionsClientInputs` dictionary.\n\nThis component states that it mirrors the W3C dictionary, and that dictionary defines `extensions`. Omitting it while closing the object with `additionalProperties: false` made the two claims contradict each other: a server emitting standard WebAuthn options could not conform, and the widely-used server libraries emit this member by default.\n\nStructure is deliberately unconstrained. The set of extensions is open and registered outside this framework, so enumerating them here would date the schema against a registry it does not own — and a closed list would reproduce the original defect one revision later.";
191
+ };
192
+ readonly challenge: {
193
+ readonly type: "string";
194
+ readonly description: "base64url-encoded one-time nonce.";
195
+ };
196
+ readonly timeout: {
197
+ readonly type: "integer";
198
+ readonly minimum: 1;
199
+ };
200
+ readonly rpId: {
201
+ readonly type: "string";
202
+ readonly minLength: 1;
203
+ };
204
+ readonly allowCredentials: {
205
+ readonly type: "array";
206
+ readonly items: {
207
+ readonly $ref: "#/$defs/CredentialDescriptor";
208
+ };
209
+ };
210
+ readonly userVerification: {
211
+ readonly enum: readonly ["discouraged", "preferred", "required"];
212
+ };
213
+ };
214
+ };
215
+ readonly CredentialDescriptor: {
216
+ readonly $anchor: "credentialDescriptor";
217
+ readonly title: "PublicKeyCredentialDescriptor";
218
+ readonly type: "object";
219
+ readonly additionalProperties: false;
220
+ readonly required: readonly ["type", "id"];
221
+ readonly properties: {
222
+ readonly type: {
223
+ readonly const: "public-key";
224
+ };
225
+ readonly id: {
226
+ readonly type: "string";
227
+ readonly description: "base64url-encoded credential id.";
228
+ };
229
+ readonly transports: {
230
+ readonly type: "array";
231
+ readonly items: {
232
+ readonly enum: readonly ["usb", "nfc", "ble", "internal", "hybrid"];
233
+ };
234
+ };
235
+ };
236
+ };
237
+ };
238
+ };
239
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
240
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
241
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
242
+ readonly $ref: "#/$defs/Response";
243
+ readonly $defs: {
244
+ readonly Response: {
245
+ readonly $anchor: "response";
246
+ readonly title: "Auth Step-up Approve Request — response payload";
247
+ readonly description: "Synchronous ack from the approver acknowledging it received the request and will (or will not) deliver an approve-response. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/step-up/approve-request/0.3#response.";
248
+ readonly type: "object";
249
+ readonly additionalProperties: false;
250
+ readonly required: readonly ["status"];
251
+ readonly properties: {
252
+ readonly status: {
253
+ readonly type: "string";
254
+ readonly enum: readonly ["accepted", "refused"];
255
+ readonly description: "`accepted` means the approver received the request and will return an approve-response (typically via DIDComm). `refused` means it will not — `reason` MUST be set.";
256
+ };
257
+ readonly reason: {
258
+ readonly type: "string";
259
+ readonly maxLength: 1024;
260
+ readonly description: "Required when status is `refused`.";
261
+ };
262
+ readonly ext: {
263
+ readonly $ref: "#/$defs/Ext";
264
+ };
265
+ };
266
+ };
267
+ readonly Ext: {
268
+ readonly title: "Ext";
269
+ readonly 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.";
270
+ readonly type: "object";
271
+ readonly minProperties: 1;
272
+ readonly additionalProperties: true;
273
+ readonly propertyNames: {
274
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
275
+ };
276
+ };
277
+ readonly CredentialRequestOptions: {
278
+ readonly $anchor: "credentialRequestOptions";
279
+ readonly title: "PublicKeyCredentialRequestOptions";
280
+ readonly description: "Server-issued options for `navigator.credentials.get({ publicKey: ... })`.";
281
+ readonly type: "object";
282
+ readonly additionalProperties: false;
283
+ readonly required: readonly ["challenge"];
284
+ readonly properties: {
285
+ readonly extensions: {
286
+ readonly type: "object";
287
+ readonly description: "Client extension inputs, per the WebAuthn Level 2 `AuthenticationExtensionsClientInputs` dictionary.\n\nThis component states that it mirrors the W3C dictionary, and that dictionary defines `extensions`. Omitting it while closing the object with `additionalProperties: false` made the two claims contradict each other: a server emitting standard WebAuthn options could not conform, and the widely-used server libraries emit this member by default.\n\nStructure is deliberately unconstrained. The set of extensions is open and registered outside this framework, so enumerating them here would date the schema against a registry it does not own — and a closed list would reproduce the original defect one revision later.";
288
+ };
289
+ readonly challenge: {
290
+ readonly type: "string";
291
+ readonly description: "base64url-encoded one-time nonce.";
292
+ };
293
+ readonly timeout: {
294
+ readonly type: "integer";
295
+ readonly minimum: 1;
296
+ };
297
+ readonly rpId: {
298
+ readonly type: "string";
299
+ readonly minLength: 1;
300
+ };
301
+ readonly allowCredentials: {
302
+ readonly type: "array";
303
+ readonly items: {
304
+ readonly $ref: "#/$defs/CredentialDescriptor";
305
+ };
306
+ };
307
+ readonly userVerification: {
308
+ readonly enum: readonly ["discouraged", "preferred", "required"];
309
+ };
310
+ };
311
+ };
312
+ readonly CredentialDescriptor: {
313
+ readonly $anchor: "credentialDescriptor";
314
+ readonly title: "PublicKeyCredentialDescriptor";
315
+ readonly type: "object";
316
+ readonly additionalProperties: false;
317
+ readonly required: readonly ["type", "id"];
318
+ readonly properties: {
319
+ readonly type: {
320
+ readonly const: "public-key";
321
+ };
322
+ readonly id: {
323
+ readonly type: "string";
324
+ readonly description: "base64url-encoded credential id.";
325
+ };
326
+ readonly transports: {
327
+ readonly type: "array";
328
+ readonly items: {
329
+ readonly enum: readonly ["usb", "nfc", "ble", "internal", "hybrid"];
330
+ };
331
+ };
332
+ };
333
+ };
334
+ };
335
+ };
336
+ /**
337
+ * SPEC.md §7.2 policy for the request variant, from this specification's
338
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
339
+ * per-specification and cannot be derived from the document alone, and
340
+ * item 2 needs the schema this carries.
341
+ */
342
+ export declare const SPEC: {
343
+ readonly typeUri: "https://trusttasks.org/spec/auth/step-up/approve-request/0.3";
344
+ readonly isBearer: false;
345
+ readonly isProofRequired: true;
346
+ readonly isRecipientRequired: true;
347
+ readonly isIssuedAtRequired: false;
348
+ readonly payloadSchema: {
349
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
350
+ readonly $id: "https://trusttasks.org/spec/auth/step-up/approve-request/0.3";
351
+ readonly title: "Auth — Step-up Approve Request";
352
+ readonly description: "A relying party asks an approver (typically a wallet or a VTA) to ratify an AAL elevation for a subject's session, or — bound to one operation — to approve that one act without elevating any session.";
353
+ readonly type: "object";
354
+ readonly additionalProperties: false;
355
+ readonly required: readonly ["subject", "challenge", "reason"];
356
+ readonly properties: {
357
+ readonly subject: {
358
+ readonly type: "string";
359
+ readonly minLength: 1;
360
+ readonly description: "The VID whose session is being elevated, or — for a step-up bound to one operation — the VID whose act that operation is. The approver MUST verify this is a VID it can speak for.";
361
+ };
362
+ readonly sessionId: {
363
+ readonly type: "string";
364
+ readonly minLength: 1;
365
+ readonly description: "The session the relying party wants elevated. Opaque to the approver. Absent only when the step-up is bound to one operation that arrived without a session (a signed Trust Task document, for instance); see `boundTo`.";
366
+ };
367
+ readonly boundTo: {
368
+ readonly type: "string";
369
+ readonly minLength: 1;
370
+ readonly maxLength: 256;
371
+ readonly description: "Present when the step-up authorizes exactly one operation rather than raising a session's assurance level. An opaque relying-party identifier for that operation — for an operation that arrived as a signed document, a digest of its type and payload salted with `challenge`. Echoed by a `recorded` approve-response acknowledgement. Not a capability: the binding is the relying party's own state.";
372
+ };
373
+ readonly challenge: {
374
+ readonly type: "string";
375
+ readonly minLength: 16;
376
+ readonly description: "base64url-encoded nonce the approver will include in the approve-response signature. ≥128 bits entropy.";
377
+ };
378
+ readonly reason: {
379
+ readonly type: "string";
380
+ readonly minLength: 1;
381
+ readonly maxLength: 500;
382
+ readonly description: "Human-readable explanation of WHY the relying party is asking (e.g. \"confirm transfer of 1000 USD to bob.example\"). Surfaced to the user by the approver for consent. SHOULD be specific enough that a user can refuse intelligently.";
383
+ };
384
+ readonly targetAcr: {
385
+ readonly type: "string";
386
+ readonly description: "The acr the relying party expects on the elevated session. Approvers MAY refuse if they cannot deliver this level.";
387
+ };
388
+ readonly acceptableEvidence: {
389
+ readonly type: "array";
390
+ readonly minItems: 1;
391
+ readonly uniqueItems: true;
392
+ readonly items: {
393
+ readonly type: "string";
394
+ readonly enum: readonly ["didSigned", "webauthn"];
395
+ };
396
+ readonly description: "Which approve-response evidence kinds the relying party will accept (see auth/step-up/approve-response `evidence`). When omitted, the approver MAY use any kind it supports. An approver that cannot satisfy any listed kind SHOULD refuse with `methodUnsupported`.";
397
+ };
398
+ readonly webauthn: {
399
+ readonly $ref: "#/$defs/CredentialRequestOptions";
400
+ readonly description: "Optional WebAuthn `PublicKeyCredentialRequestOptions` the approver passes to the platform passkey API when producing `webauthn` evidence. When present, its `challenge` MUST equal `payload.challenge` so the resulting assertion binds the same nonce the relying party bound server-side. `rpId`/`allowCredentials` identify which credential the approver should assert with.";
401
+ };
402
+ readonly ttl: {
403
+ readonly type: "integer";
404
+ readonly minimum: 1;
405
+ readonly description: "Seconds within which the relying party expects the approve-response. Approvers SHOULD treat as advisory — the relying party's own expiry policy is authoritative.";
406
+ };
407
+ readonly ext: {
408
+ readonly $ref: "#/$defs/Ext";
409
+ };
410
+ };
411
+ readonly $defs: {
412
+ readonly Response: {
413
+ readonly $anchor: "response";
414
+ readonly title: "Auth Step-up Approve Request — response payload";
415
+ readonly description: "Synchronous ack from the approver acknowledging it received the request and will (or will not) deliver an approve-response. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/step-up/approve-request/0.3#response.";
416
+ readonly type: "object";
417
+ readonly additionalProperties: false;
418
+ readonly required: readonly ["status"];
419
+ readonly properties: {
420
+ readonly status: {
421
+ readonly type: "string";
422
+ readonly enum: readonly ["accepted", "refused"];
423
+ readonly description: "`accepted` means the approver received the request and will return an approve-response (typically via DIDComm). `refused` means it will not — `reason` MUST be set.";
424
+ };
425
+ readonly reason: {
426
+ readonly type: "string";
427
+ readonly maxLength: 1024;
428
+ readonly description: "Required when status is `refused`.";
429
+ };
430
+ readonly ext: {
431
+ readonly $ref: "#/$defs/Ext";
432
+ };
433
+ };
434
+ };
435
+ readonly Ext: {
436
+ readonly title: "Ext";
437
+ readonly 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.";
438
+ readonly type: "object";
439
+ readonly minProperties: 1;
440
+ readonly additionalProperties: true;
441
+ readonly propertyNames: {
442
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
443
+ };
444
+ };
445
+ readonly CredentialRequestOptions: {
446
+ readonly $anchor: "credentialRequestOptions";
447
+ readonly title: "PublicKeyCredentialRequestOptions";
448
+ readonly description: "Server-issued options for `navigator.credentials.get({ publicKey: ... })`.";
449
+ readonly type: "object";
450
+ readonly additionalProperties: false;
451
+ readonly required: readonly ["challenge"];
452
+ readonly properties: {
453
+ readonly extensions: {
454
+ readonly type: "object";
455
+ readonly description: "Client extension inputs, per the WebAuthn Level 2 `AuthenticationExtensionsClientInputs` dictionary.\n\nThis component states that it mirrors the W3C dictionary, and that dictionary defines `extensions`. Omitting it while closing the object with `additionalProperties: false` made the two claims contradict each other: a server emitting standard WebAuthn options could not conform, and the widely-used server libraries emit this member by default.\n\nStructure is deliberately unconstrained. The set of extensions is open and registered outside this framework, so enumerating them here would date the schema against a registry it does not own — and a closed list would reproduce the original defect one revision later.";
456
+ };
457
+ readonly challenge: {
458
+ readonly type: "string";
459
+ readonly description: "base64url-encoded one-time nonce.";
460
+ };
461
+ readonly timeout: {
462
+ readonly type: "integer";
463
+ readonly minimum: 1;
464
+ };
465
+ readonly rpId: {
466
+ readonly type: "string";
467
+ readonly minLength: 1;
468
+ };
469
+ readonly allowCredentials: {
470
+ readonly type: "array";
471
+ readonly items: {
472
+ readonly $ref: "#/$defs/CredentialDescriptor";
473
+ };
474
+ };
475
+ readonly userVerification: {
476
+ readonly enum: readonly ["discouraged", "preferred", "required"];
477
+ };
478
+ };
479
+ };
480
+ readonly CredentialDescriptor: {
481
+ readonly $anchor: "credentialDescriptor";
482
+ readonly title: "PublicKeyCredentialDescriptor";
483
+ readonly type: "object";
484
+ readonly additionalProperties: false;
485
+ readonly required: readonly ["type", "id"];
486
+ readonly properties: {
487
+ readonly type: {
488
+ readonly const: "public-key";
489
+ };
490
+ readonly id: {
491
+ readonly type: "string";
492
+ readonly description: "base64url-encoded credential id.";
493
+ };
494
+ readonly transports: {
495
+ readonly type: "array";
496
+ readonly items: {
497
+ readonly enum: readonly ["usb", "nfc", "ble", "internal", "hybrid"];
498
+ };
499
+ };
500
+ };
501
+ };
502
+ };
503
+ };
504
+ };
505
+ /**
506
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
507
+ * tracks the *issuer* party's requirement because a response swaps the
508
+ * parties (§7.3 item 5).
509
+ */
510
+ export declare const RESPONSE_SPEC: {
511
+ readonly typeUri: "https://trusttasks.org/spec/auth/step-up/approve-request/0.3#response";
512
+ readonly isBearer: false;
513
+ readonly isProofRequired: true;
514
+ readonly isRecipientRequired: true;
515
+ readonly isIssuedAtRequired: false;
516
+ readonly payloadSchema: {
517
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
518
+ readonly $ref: "#/$defs/Response";
519
+ readonly $defs: {
520
+ readonly Response: {
521
+ readonly $anchor: "response";
522
+ readonly title: "Auth Step-up Approve Request — response payload";
523
+ readonly description: "Synchronous ack from the approver acknowledging it received the request and will (or will not) deliver an approve-response. Carried in a Trust Task document whose type is https://trusttasks.org/spec/auth/step-up/approve-request/0.3#response.";
524
+ readonly type: "object";
525
+ readonly additionalProperties: false;
526
+ readonly required: readonly ["status"];
527
+ readonly properties: {
528
+ readonly status: {
529
+ readonly type: "string";
530
+ readonly enum: readonly ["accepted", "refused"];
531
+ readonly description: "`accepted` means the approver received the request and will return an approve-response (typically via DIDComm). `refused` means it will not — `reason` MUST be set.";
532
+ };
533
+ readonly reason: {
534
+ readonly type: "string";
535
+ readonly maxLength: 1024;
536
+ readonly description: "Required when status is `refused`.";
537
+ };
538
+ readonly ext: {
539
+ readonly $ref: "#/$defs/Ext";
540
+ };
541
+ };
542
+ };
543
+ readonly Ext: {
544
+ readonly title: "Ext";
545
+ readonly 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.";
546
+ readonly type: "object";
547
+ readonly minProperties: 1;
548
+ readonly additionalProperties: true;
549
+ readonly propertyNames: {
550
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
551
+ };
552
+ };
553
+ readonly CredentialRequestOptions: {
554
+ readonly $anchor: "credentialRequestOptions";
555
+ readonly title: "PublicKeyCredentialRequestOptions";
556
+ readonly description: "Server-issued options for `navigator.credentials.get({ publicKey: ... })`.";
557
+ readonly type: "object";
558
+ readonly additionalProperties: false;
559
+ readonly required: readonly ["challenge"];
560
+ readonly properties: {
561
+ readonly extensions: {
562
+ readonly type: "object";
563
+ readonly description: "Client extension inputs, per the WebAuthn Level 2 `AuthenticationExtensionsClientInputs` dictionary.\n\nThis component states that it mirrors the W3C dictionary, and that dictionary defines `extensions`. Omitting it while closing the object with `additionalProperties: false` made the two claims contradict each other: a server emitting standard WebAuthn options could not conform, and the widely-used server libraries emit this member by default.\n\nStructure is deliberately unconstrained. The set of extensions is open and registered outside this framework, so enumerating them here would date the schema against a registry it does not own — and a closed list would reproduce the original defect one revision later.";
564
+ };
565
+ readonly challenge: {
566
+ readonly type: "string";
567
+ readonly description: "base64url-encoded one-time nonce.";
568
+ };
569
+ readonly timeout: {
570
+ readonly type: "integer";
571
+ readonly minimum: 1;
572
+ };
573
+ readonly rpId: {
574
+ readonly type: "string";
575
+ readonly minLength: 1;
576
+ };
577
+ readonly allowCredentials: {
578
+ readonly type: "array";
579
+ readonly items: {
580
+ readonly $ref: "#/$defs/CredentialDescriptor";
581
+ };
582
+ };
583
+ readonly userVerification: {
584
+ readonly enum: readonly ["discouraged", "preferred", "required"];
585
+ };
586
+ };
587
+ };
588
+ readonly CredentialDescriptor: {
589
+ readonly $anchor: "credentialDescriptor";
590
+ readonly title: "PublicKeyCredentialDescriptor";
591
+ readonly type: "object";
592
+ readonly additionalProperties: false;
593
+ readonly required: readonly ["type", "id"];
594
+ readonly properties: {
595
+ readonly type: {
596
+ readonly const: "public-key";
597
+ };
598
+ readonly id: {
599
+ readonly type: "string";
600
+ readonly description: "base64url-encoded credential id.";
601
+ };
602
+ readonly transports: {
603
+ readonly type: "array";
604
+ readonly items: {
605
+ readonly enum: readonly ["usb", "nfc", "ble", "internal", "hybrid"];
606
+ };
607
+ };
608
+ };
609
+ };
610
+ };
611
+ };
612
+ };
613
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/auth/step-up/approve-request/0.3/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,6BAA6B,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAG/H;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,WAAW,GAAG,UAAU,EAAE,GAAG,CAAC,WAAW,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;IACjF;;OAEG;IACH,QAAQ,CAAC,EAAE,iCAAiC,CAAC;IAC7C;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACtD;;OAEG;IACH,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,6BAA6B,EAAE,iCAAiC,EAAE,CAAC;AAEtF,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,8DAAuE,CAAC;AAEhG,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAE/C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,uEAAgF,CAAC;AAElH,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,uCAAuC,CAAC;AAE/D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsLjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmH1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}