@openvtc/trust-tasks 0.17.11 → 0.18.1
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 +108 -0
- package/dist/_shared/components.d.ts +34 -2
- package/dist/_shared/components.d.ts.map +1 -1
- 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/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/epoch/chain/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/chain/0.1/payload.js +2 -2
- package/dist/rooms/epoch/chain/0.1/payload.js.map +1 -1
- package/dist/rooms/epoch/mint/0.1/payload.d.ts +4 -4
- package/dist/rooms/epoch/mint/0.1/payload.js +2 -2
- package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
- package/dist/rooms/keys/present/0.2/payload.d.ts +378 -0
- package/dist/rooms/keys/present/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/keys/present/0.2/payload.js +212 -0
- package/dist/rooms/keys/present/0.2/payload.js.map +1 -0
- package/dist/rooms/owner/claim/0.1/payload.d.ts +4 -4
- package/dist/rooms/owner/claim/0.1/payload.js +2 -2
- package/dist/rooms/owner/claim/0.1/payload.js.map +1 -1
- package/dist/rooms/owner/issue-authority/0.2/payload.d.ts +315 -0
- package/dist/rooms/owner/issue-authority/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/owner/issue-authority/0.2/payload.js +174 -0
- package/dist/rooms/owner/issue-authority/0.2/payload.js.map +1 -0
- package/dist/rooms/owner/transfer/0.1/payload.d.ts +4 -4
- package/dist/rooms/owner/transfer/0.1/payload.js +2 -2
- package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -1
- package/dist/rooms/records/curate/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/curate/0.1/payload.js +2 -2
- package/dist/rooms/records/curate/0.1/payload.js.map +1 -1
- package/dist/rooms/records/get/0.1/payload.d.ts +241 -27
- package/dist/rooms/records/get/0.1/payload.d.ts.map +1 -1
- package/dist/rooms/records/get/0.1/payload.js +128 -12
- package/dist/rooms/records/get/0.1/payload.js.map +1 -1
- package/dist/rooms/records/list/0.1/payload.d.ts +8 -8
- package/dist/rooms/records/list/0.1/payload.js +4 -4
- package/dist/rooms/records/list/0.1/payload.js.map +1 -1
- package/dist/rooms/records/put/0.1/payload.d.ts +4 -4
- package/dist/rooms/records/put/0.1/payload.js +2 -2
- package/dist/rooms/records/put/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +34 -2
- package/src/index.ts +2 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/epoch/chain/0.1/payload.ts +2 -2
- package/src/rooms/epoch/mint/0.1/payload.ts +2 -2
- package/src/rooms/keys/present/0.2/payload.ts +261 -0
- package/src/rooms/owner/claim/0.1/payload.ts +2 -2
- package/src/rooms/owner/issue-authority/0.2/payload.ts +234 -0
- package/src/rooms/owner/transfer/0.1/payload.ts +2 -2
- package/src/rooms/records/curate/0.1/payload.ts +2 -2
- package/src/rooms/records/get/0.1/payload.ts +157 -15
- package/src/rooms/records/list/0.1/payload.ts +4 -4
- package/src/rooms/records/put/0.1/payload.ts +2 -2
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/present/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/present/0.2";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/present/0.2#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/rooms/keys/present/0.2",
|
|
21
|
+
"title": "Rooms Keys Present — payload",
|
|
22
|
+
"description": "An agent asks the party holding its principal's room credentials to produce a presentation for one room operation. The credentials never cross to the agent; only the presentation does, and it is bound to the operation it was asked for and to the agent that asked.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"roomId",
|
|
27
|
+
"action"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"roomId": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "The room to present for."
|
|
33
|
+
},
|
|
34
|
+
"action": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": [
|
|
37
|
+
"read",
|
|
38
|
+
"write",
|
|
39
|
+
"curate",
|
|
40
|
+
"admin"
|
|
41
|
+
],
|
|
42
|
+
"description": "The action the presentation must confer. Named here so the produced presentation can be scoped to it: a presentation minted for `read` should not be reusable for `write`, and a holder that mints one covering everything has handed the agent its own standing."
|
|
43
|
+
},
|
|
44
|
+
"ext": {
|
|
45
|
+
"$ref": "#/$defs/Ext",
|
|
46
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"$defs": {
|
|
50
|
+
"Response": {
|
|
51
|
+
"$anchor": "response",
|
|
52
|
+
"title": "Rooms Keys Present — response payload",
|
|
53
|
+
"description": "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.2#response.",
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": [
|
|
57
|
+
"presentation"
|
|
58
|
+
],
|
|
59
|
+
"properties": {
|
|
60
|
+
"presentation": {
|
|
61
|
+
"$ref": "#/$defs/AuthorityPresentation",
|
|
62
|
+
"description": "The presentation to send to the host. Its authority chain grants to the CALLER, who is the only party that can present it — see the task's Security & Privacy section."
|
|
63
|
+
},
|
|
64
|
+
"expiresAt": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"format": "date-time",
|
|
67
|
+
"description": "When the presentation stops being accepted, so a caller can avoid presenting a stale one."
|
|
68
|
+
},
|
|
69
|
+
"ext": {
|
|
70
|
+
"$ref": "#/$defs/Ext"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"Ext": {
|
|
75
|
+
"title": "Ext",
|
|
76
|
+
"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.",
|
|
77
|
+
"type": "object",
|
|
78
|
+
"minProperties": 1,
|
|
79
|
+
"additionalProperties": true,
|
|
80
|
+
"propertyNames": {
|
|
81
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"AuthorityPresentation": {
|
|
85
|
+
"title": "AuthorityPresentation",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"membership",
|
|
90
|
+
"authority"
|
|
91
|
+
],
|
|
92
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
93
|
+
"properties": {
|
|
94
|
+
"membership": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
97
|
+
},
|
|
98
|
+
"authority": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"minItems": 1,
|
|
101
|
+
"maxItems": 8,
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
106
|
+
},
|
|
107
|
+
"subjectBinding": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
116
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
117
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
118
|
+
"$ref": "#/$defs/Response",
|
|
119
|
+
"$defs": {
|
|
120
|
+
"Response": {
|
|
121
|
+
"$anchor": "response",
|
|
122
|
+
"title": "Rooms Keys Present — response payload",
|
|
123
|
+
"description": "Success response to rooms/keys/present. Type https://trusttasks.org/spec/rooms/keys/present/0.2#response.",
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": [
|
|
127
|
+
"presentation"
|
|
128
|
+
],
|
|
129
|
+
"properties": {
|
|
130
|
+
"presentation": {
|
|
131
|
+
"$ref": "#/$defs/AuthorityPresentation",
|
|
132
|
+
"description": "The presentation to send to the host. Its authority chain grants to the CALLER, who is the only party that can present it — see the task's Security & Privacy section."
|
|
133
|
+
},
|
|
134
|
+
"expiresAt": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"format": "date-time",
|
|
137
|
+
"description": "When the presentation stops being accepted, so a caller can avoid presenting a stale one."
|
|
138
|
+
},
|
|
139
|
+
"ext": {
|
|
140
|
+
"$ref": "#/$defs/Ext"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"Ext": {
|
|
145
|
+
"title": "Ext",
|
|
146
|
+
"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.",
|
|
147
|
+
"type": "object",
|
|
148
|
+
"minProperties": 1,
|
|
149
|
+
"additionalProperties": true,
|
|
150
|
+
"propertyNames": {
|
|
151
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"AuthorityPresentation": {
|
|
155
|
+
"title": "AuthorityPresentation",
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": [
|
|
159
|
+
"membership",
|
|
160
|
+
"authority"
|
|
161
|
+
],
|
|
162
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
163
|
+
"properties": {
|
|
164
|
+
"membership": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"description": "The presenter's membership credential for this room, or — on a `private` room — a zero-knowledge presentation of it. Serialized per the governing profile."
|
|
167
|
+
},
|
|
168
|
+
"authority": {
|
|
169
|
+
"type": "array",
|
|
170
|
+
"minItems": 1,
|
|
171
|
+
"maxItems": 8,
|
|
172
|
+
"items": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
"description": "The authority chain, LEAF FIRST: the first element is the credential being relied on and the last MUST be one issued by the room itself. Every link the presenter relies on is present, because the host will not fetch one. Capped at 8: verification is linear in chain length and runs on every operation, so an unbounded chain is a denial-of-service surface against the host. The known uses need 2 to 3 — a person attenuating to an agent, and that agent to a sub-agent."
|
|
176
|
+
},
|
|
177
|
+
"subjectBinding": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"description": "REQUIRED on a `private` room, where the subject identifier is withheld: a proof that the membership credential and the authority chain's leaf describe the SAME subject. Without it two parties pool credentials — one contributes membership, the other authority — and the combination verifies as a single party holding both. A host MUST refuse a private-room presentation that omits this."
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
187
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
188
|
+
* per-specification and cannot be derived from the document alone, and
|
|
189
|
+
* item 2 needs the schema this carries.
|
|
190
|
+
*/
|
|
191
|
+
export const SPEC = {
|
|
192
|
+
typeUri: TYPE_URI,
|
|
193
|
+
isBearer: false,
|
|
194
|
+
isProofRequired: true,
|
|
195
|
+
isRecipientRequired: true,
|
|
196
|
+
isIssuedAtRequired: true,
|
|
197
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
201
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
202
|
+
* parties (§7.3 item 5).
|
|
203
|
+
*/
|
|
204
|
+
export const RESPONSE_SPEC = {
|
|
205
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
206
|
+
isBearer: false,
|
|
207
|
+
isProofRequired: true,
|
|
208
|
+
isRecipientRequired: true,
|
|
209
|
+
isIssuedAtRequired: true,
|
|
210
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/present/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,oDAA6D,CAAC;AAKtF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,6DAAsE,CAAC;AAKxG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,oDAAoD;IAC3D,OAAO,EAAE,8BAA8B;IACvC,aAAa,EAAE,yQAAyQ;IACxR,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,QAAQ;KACT;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,0BAA0B;SAC1C;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,MAAM;gBACN,OAAO;gBACP,QAAQ;gBACR,OAAO;aACR;YACD,aAAa,EAAE,mQAAmQ;SACnR;QACD,KA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qBACjB;oBACD,aAAa,EAAE,odAAod;iBACpe;gBACD,gBAAgB,EAAE;oBAChB,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,mYAAmY;iBACnZ;aACF;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -125,7 +125,7 @@ export declare const PAYLOAD_SCHEMA: {
|
|
|
125
125
|
readonly type: "object";
|
|
126
126
|
readonly additionalProperties: false;
|
|
127
127
|
readonly required: readonly ["membership", "authority"];
|
|
128
|
-
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
|
|
128
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
129
129
|
readonly properties: {
|
|
130
130
|
readonly membership: {
|
|
131
131
|
readonly type: "string";
|
|
@@ -188,7 +188,7 @@ export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
|
188
188
|
readonly type: "object";
|
|
189
189
|
readonly additionalProperties: false;
|
|
190
190
|
readonly required: readonly ["membership", "authority"];
|
|
191
|
-
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
|
|
191
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
192
192
|
readonly properties: {
|
|
193
193
|
readonly membership: {
|
|
194
194
|
readonly type: "string";
|
|
@@ -290,7 +290,7 @@ export declare const SPEC: {
|
|
|
290
290
|
readonly type: "object";
|
|
291
291
|
readonly additionalProperties: false;
|
|
292
292
|
readonly required: readonly ["membership", "authority"];
|
|
293
|
-
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
|
|
293
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
294
294
|
readonly properties: {
|
|
295
295
|
readonly membership: {
|
|
296
296
|
readonly type: "string";
|
|
@@ -364,7 +364,7 @@ export declare const RESPONSE_SPEC: {
|
|
|
364
364
|
readonly type: "object";
|
|
365
365
|
readonly additionalProperties: false;
|
|
366
366
|
readonly required: readonly ["membership", "authority"];
|
|
367
|
-
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.";
|
|
367
|
+
readonly description: "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.";
|
|
368
368
|
readonly properties: {
|
|
369
369
|
readonly membership: {
|
|
370
370
|
readonly type: "string";
|
|
@@ -92,7 +92,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
92
92
|
"membership",
|
|
93
93
|
"authority"
|
|
94
94
|
],
|
|
95
|
-
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
95
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
96
96
|
"properties": {
|
|
97
97
|
"membership": {
|
|
98
98
|
"type": "string",
|
|
@@ -161,7 +161,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
161
161
|
"membership",
|
|
162
162
|
"authority"
|
|
163
163
|
],
|
|
164
|
-
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier.",
|
|
164
|
+
"description": "What a party presents to act on a room. Carries the whole authority chain: a host MUST NOT dereference an authority credential's `parent` to fetch a link it was not given. Resolving over the network would make verification depend on availability, turn every identifier into a request the host can be induced to make against an address the holder chooses, and signal credential use to whoever hosts the identifier. A host MUST bind the presenter to the chain's leaf. A chain that verifies is evidence that authority was conferred on somebody; it is not evidence that the party presenting it is that somebody. The leaf's subject MUST equal the party the host authenticated for this request — an identity the transport established or a document `proof` proved, never one named in a payload. A host that omits this check authorizes every captured presentation, and the omission is silent, because the chain still verifies.",
|
|
165
165
|
"properties": {
|
|
166
166
|
"membership": {
|
|
167
167
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/owner/claim/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,mDAA4D,CAAC;AAKrF,qEAAqE;AACrE,MAAM,CAAC,MA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;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/owner/issue-authority/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
6
|
+
export interface RoomsOwnerIssueAuthorityPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.
|
|
9
|
+
*/
|
|
10
|
+
roomId: string;
|
|
11
|
+
/**
|
|
12
|
+
* Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.
|
|
13
|
+
*/
|
|
14
|
+
signingKeyId: string;
|
|
15
|
+
/**
|
|
16
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
17
|
+
*/
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
/**
|
|
20
|
+
* The party this grants to. A chain ROOT: the room is the governing party, so this is the grant everything else descends from. A holder narrows their own grant with attenuation instead, which needs no issuer.
|
|
21
|
+
*/
|
|
22
|
+
subject: string;
|
|
23
|
+
/**
|
|
24
|
+
* What the subject may do. MUST NOT be empty — an empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer. `curate` is not implied by `write`: pinning, deprecating and retracting are judgements over shared knowledge, not writes.
|
|
25
|
+
*
|
|
26
|
+
* @minItems 1
|
|
27
|
+
*/
|
|
28
|
+
actions: ["read" | "write" | "curate" | "admin", ...("read" | "write" | "curate" | "admin")[]];
|
|
29
|
+
/**
|
|
30
|
+
* When the grant lapses. REQUIRED, and not merely recommended: nothing about the subject's current standing is consulted when an authority credential is verified, so a grant that never expires is authority nobody can withdraw by waiting. A verifier refuses a chain link carrying none, so a grant minted without one could not have been used. Changing what a party may do reissues this one small credential and leaves the membership edge alone, which is why the two are separate credentials.
|
|
31
|
+
*/
|
|
32
|
+
validUntil: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.2#response. The signed VAC, a chain root at the room's scope.
|
|
36
|
+
*/
|
|
37
|
+
export interface RoomsOwnerIssueAuthorityResponsePayload {
|
|
38
|
+
/**
|
|
39
|
+
* The signed Verifiable Authority Credential, serialised.
|
|
40
|
+
*/
|
|
41
|
+
credential: string;
|
|
42
|
+
/**
|
|
43
|
+
* Its `id`.
|
|
44
|
+
*/
|
|
45
|
+
credentialId: string;
|
|
46
|
+
ext?: Ext;
|
|
47
|
+
}
|
|
48
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
49
|
+
export type { Ext };
|
|
50
|
+
/** Trust Task type URI. */
|
|
51
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.2";
|
|
52
|
+
/** Stable alias for this specification's request payload shape. */
|
|
53
|
+
export type Payload = RoomsOwnerIssueAuthorityPayload;
|
|
54
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
55
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.2#response";
|
|
56
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
57
|
+
export type Response = RoomsOwnerIssueAuthorityResponsePayload;
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
68
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
69
|
+
readonly $id: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.2";
|
|
70
|
+
readonly title: "Rooms Owner Issue Authority — payload";
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly additionalProperties: false;
|
|
73
|
+
readonly required: readonly ["roomId", "signingKeyId", "subject", "actions", "validUntil"];
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly roomId: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly description: "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.";
|
|
78
|
+
};
|
|
79
|
+
readonly signingKeyId: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly maxLength: 256;
|
|
82
|
+
readonly description: "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.";
|
|
83
|
+
};
|
|
84
|
+
readonly ext: {
|
|
85
|
+
readonly $ref: "#/$defs/Ext";
|
|
86
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
87
|
+
};
|
|
88
|
+
readonly subject: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
readonly description: "The party this grants to. A chain ROOT: the room is the governing party, so this is the grant everything else descends from. A holder narrows their own grant with attenuation instead, which needs no issuer.";
|
|
91
|
+
};
|
|
92
|
+
readonly actions: {
|
|
93
|
+
readonly type: "array";
|
|
94
|
+
readonly minItems: 1;
|
|
95
|
+
readonly items: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly enum: readonly ["read", "write", "curate", "admin"];
|
|
98
|
+
};
|
|
99
|
+
readonly description: "What the subject may do. MUST NOT be empty — an empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer. `curate` is not implied by `write`: pinning, deprecating and retracting are judgements over shared knowledge, not writes.";
|
|
100
|
+
};
|
|
101
|
+
readonly validUntil: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly format: "date-time";
|
|
104
|
+
readonly description: "When the grant lapses. REQUIRED, and not merely recommended: nothing about the subject's current standing is consulted when an authority credential is verified, so a grant that never expires is authority nobody can withdraw by waiting. A verifier refuses a chain link carrying none, so a grant minted without one could not have been used. Changing what a party may do reissues this one small credential and leaves the membership edge alone, which is why the two are separate credentials.";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
readonly $defs: {
|
|
108
|
+
readonly Response: {
|
|
109
|
+
readonly $anchor: "response";
|
|
110
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
111
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.2#response. The signed VAC, a chain root at the room's scope.";
|
|
112
|
+
readonly type: "object";
|
|
113
|
+
readonly additionalProperties: false;
|
|
114
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
115
|
+
readonly properties: {
|
|
116
|
+
readonly credential: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
119
|
+
};
|
|
120
|
+
readonly credentialId: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly description: "Its `id`.";
|
|
123
|
+
};
|
|
124
|
+
readonly ext: {
|
|
125
|
+
readonly $ref: "#/$defs/Ext";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly Ext: {
|
|
130
|
+
readonly title: "Ext";
|
|
131
|
+
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.";
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly minProperties: 1;
|
|
134
|
+
readonly additionalProperties: true;
|
|
135
|
+
readonly propertyNames: {
|
|
136
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
142
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
143
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
144
|
+
readonly $ref: "#/$defs/Response";
|
|
145
|
+
readonly $defs: {
|
|
146
|
+
readonly Response: {
|
|
147
|
+
readonly $anchor: "response";
|
|
148
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
149
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.2#response. The signed VAC, a chain root at the room's scope.";
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: false;
|
|
152
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly credential: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
157
|
+
};
|
|
158
|
+
readonly credentialId: {
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
readonly description: "Its `id`.";
|
|
161
|
+
};
|
|
162
|
+
readonly ext: {
|
|
163
|
+
readonly $ref: "#/$defs/Ext";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly Ext: {
|
|
168
|
+
readonly title: "Ext";
|
|
169
|
+
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.";
|
|
170
|
+
readonly type: "object";
|
|
171
|
+
readonly minProperties: 1;
|
|
172
|
+
readonly additionalProperties: true;
|
|
173
|
+
readonly propertyNames: {
|
|
174
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
181
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
182
|
+
* per-specification and cannot be derived from the document alone, and
|
|
183
|
+
* item 2 needs the schema this carries.
|
|
184
|
+
*/
|
|
185
|
+
export declare const SPEC: {
|
|
186
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.2";
|
|
187
|
+
readonly isBearer: false;
|
|
188
|
+
readonly isProofRequired: true;
|
|
189
|
+
readonly isRecipientRequired: true;
|
|
190
|
+
readonly isIssuedAtRequired: true;
|
|
191
|
+
readonly payloadSchema: {
|
|
192
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
193
|
+
readonly $id: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.2";
|
|
194
|
+
readonly title: "Rooms Owner Issue Authority — payload";
|
|
195
|
+
readonly type: "object";
|
|
196
|
+
readonly additionalProperties: false;
|
|
197
|
+
readonly required: readonly ["roomId", "signingKeyId", "subject", "actions", "validUntil"];
|
|
198
|
+
readonly properties: {
|
|
199
|
+
readonly roomId: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly description: "The room whose identity issues this credential. The recipient MUST hold a signing key for it — it is signing AS the room, not as itself.";
|
|
202
|
+
};
|
|
203
|
+
readonly signingKeyId: {
|
|
204
|
+
readonly type: "string";
|
|
205
|
+
readonly maxLength: 256;
|
|
206
|
+
readonly description: "Which held key signs. Named explicitly rather than looked up from `roomId`, because nothing maps a DID to a key it was minted with and inventing that mapping would add a lifecycle to get wrong. A key that is not the room's produces a credential that fails to verify against the room's DID document — loud, and at the first use rather than later.";
|
|
207
|
+
};
|
|
208
|
+
readonly ext: {
|
|
209
|
+
readonly $ref: "#/$defs/Ext";
|
|
210
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
211
|
+
};
|
|
212
|
+
readonly subject: {
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
readonly description: "The party this grants to. A chain ROOT: the room is the governing party, so this is the grant everything else descends from. A holder narrows their own grant with attenuation instead, which needs no issuer.";
|
|
215
|
+
};
|
|
216
|
+
readonly actions: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly minItems: 1;
|
|
219
|
+
readonly items: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly enum: readonly ["read", "write", "curate", "admin"];
|
|
222
|
+
};
|
|
223
|
+
readonly description: "What the subject may do. MUST NOT be empty — an empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer. `curate` is not implied by `write`: pinning, deprecating and retracting are judgements over shared knowledge, not writes.";
|
|
224
|
+
};
|
|
225
|
+
readonly validUntil: {
|
|
226
|
+
readonly type: "string";
|
|
227
|
+
readonly format: "date-time";
|
|
228
|
+
readonly description: "When the grant lapses. REQUIRED, and not merely recommended: nothing about the subject's current standing is consulted when an authority credential is verified, so a grant that never expires is authority nobody can withdraw by waiting. A verifier refuses a chain link carrying none, so a grant minted without one could not have been used. Changing what a party may do reissues this one small credential and leaves the membership edge alone, which is why the two are separate credentials.";
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
readonly $defs: {
|
|
232
|
+
readonly Response: {
|
|
233
|
+
readonly $anchor: "response";
|
|
234
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
235
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.2#response. The signed VAC, a chain root at the room's scope.";
|
|
236
|
+
readonly type: "object";
|
|
237
|
+
readonly additionalProperties: false;
|
|
238
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
239
|
+
readonly properties: {
|
|
240
|
+
readonly credential: {
|
|
241
|
+
readonly type: "string";
|
|
242
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
243
|
+
};
|
|
244
|
+
readonly credentialId: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
readonly description: "Its `id`.";
|
|
247
|
+
};
|
|
248
|
+
readonly ext: {
|
|
249
|
+
readonly $ref: "#/$defs/Ext";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
readonly Ext: {
|
|
254
|
+
readonly title: "Ext";
|
|
255
|
+
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.";
|
|
256
|
+
readonly type: "object";
|
|
257
|
+
readonly minProperties: 1;
|
|
258
|
+
readonly additionalProperties: true;
|
|
259
|
+
readonly propertyNames: {
|
|
260
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
268
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
269
|
+
* parties (§7.3 item 5).
|
|
270
|
+
*/
|
|
271
|
+
export declare const RESPONSE_SPEC: {
|
|
272
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/owner/issue-authority/0.2#response";
|
|
273
|
+
readonly isBearer: false;
|
|
274
|
+
readonly isProofRequired: true;
|
|
275
|
+
readonly isRecipientRequired: true;
|
|
276
|
+
readonly isIssuedAtRequired: true;
|
|
277
|
+
readonly payloadSchema: {
|
|
278
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
279
|
+
readonly $ref: "#/$defs/Response";
|
|
280
|
+
readonly $defs: {
|
|
281
|
+
readonly Response: {
|
|
282
|
+
readonly $anchor: "response";
|
|
283
|
+
readonly title: "Rooms Owner Issue Authority — response payload";
|
|
284
|
+
readonly description: "Success response to rooms/owner/issue-authority. Type https://trusttasks.org/spec/rooms/owner/issue-authority/0.2#response. The signed VAC, a chain root at the room's scope.";
|
|
285
|
+
readonly type: "object";
|
|
286
|
+
readonly additionalProperties: false;
|
|
287
|
+
readonly required: readonly ["credential", "credentialId"];
|
|
288
|
+
readonly properties: {
|
|
289
|
+
readonly credential: {
|
|
290
|
+
readonly type: "string";
|
|
291
|
+
readonly description: "The signed Verifiable Authority Credential, serialised.";
|
|
292
|
+
};
|
|
293
|
+
readonly credentialId: {
|
|
294
|
+
readonly type: "string";
|
|
295
|
+
readonly description: "Its `id`.";
|
|
296
|
+
};
|
|
297
|
+
readonly ext: {
|
|
298
|
+
readonly $ref: "#/$defs/Ext";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly Ext: {
|
|
303
|
+
readonly title: "Ext";
|
|
304
|
+
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.";
|
|
305
|
+
readonly type: "object";
|
|
306
|
+
readonly minProperties: 1;
|
|
307
|
+
readonly additionalProperties: true;
|
|
308
|
+
readonly propertyNames: {
|
|
309
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@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