@floegence/redevplugin-contracts 2.0.10 → 3.0.0
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/README.md +8 -7
- package/dist/index.d.ts +0 -273
- package/dist/index.js +0 -32
- package/dist/release-signing.d.ts +33 -58
- package/dist/release-signing.js +15 -75
- package/package.json +2 -2
- package/dist/contracts.gen.d.ts +0 -535
- package/dist/contracts.gen.js +0 -634
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# @floegence/redevplugin-contracts
|
|
2
2
|
|
|
3
|
-
This opt-in package
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
decoders, and browser-compatible Ed25519 verifier adapters.
|
|
3
|
+
This opt-in package provides typed, domain-separated canonical release-signing
|
|
4
|
+
DTOs, preimage builders, strict decoders, browser-compatible Ed25519 verifier
|
|
5
|
+
adapters, and verified presentation-evidence types.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Canonical machine contracts ship as exact artifacts named by the signed
|
|
8
|
+
`PlatformReleaseManifest`; this npm package does not embed a second registry or
|
|
9
|
+
package-set index. Host products choose their own trusted keys and policy. This
|
|
10
|
+
package owns only host-neutral canonicalization, verification request shapes,
|
|
11
|
+
and presentation evidence.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,275 +1,2 @@
|
|
|
1
|
-
import { generatedContractArtifacts, generatedRegistryContract } from "./contracts.gen.js";
|
|
2
1
|
export * from "./release-signing.js";
|
|
3
2
|
export * from "./presentation.js";
|
|
4
|
-
export type ContractID = (typeof generatedContractArtifacts)[number]["id"] | typeof generatedRegistryContract.id;
|
|
5
|
-
export type Contract = Readonly<{
|
|
6
|
-
id: ContractID;
|
|
7
|
-
path: string;
|
|
8
|
-
version: string;
|
|
9
|
-
sha256: string;
|
|
10
|
-
body: string;
|
|
11
|
-
}>;
|
|
12
|
-
export declare class UnknownContractError extends RangeError {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
constructor(id: string);
|
|
15
|
-
}
|
|
16
|
-
export declare const contractArtifacts: readonly Contract[];
|
|
17
|
-
export declare const registryContract: Contract;
|
|
18
|
-
export declare const contractRegistry: {
|
|
19
|
-
readonly schema_version: "redevplugin.contract_registry.v2";
|
|
20
|
-
readonly registry_version: "contract-registry-v2";
|
|
21
|
-
readonly artifacts: readonly [{
|
|
22
|
-
readonly id: "compatibility-manifest-schema";
|
|
23
|
-
readonly path: "spec/plugin/compatibility-manifest-v20.schema.json";
|
|
24
|
-
readonly version: "compatibility-manifest-v20";
|
|
25
|
-
readonly sha256: "8ace15ee3f0bb05e5cdd3449385dd498e37f5fb2e22a67302efb5efeaee1aa02";
|
|
26
|
-
}, {
|
|
27
|
-
readonly id: "contract-registry-schema";
|
|
28
|
-
readonly path: "spec/plugin/contract-registry-v2.schema.json";
|
|
29
|
-
readonly version: "contract-registry-v2";
|
|
30
|
-
readonly sha256: "92ffee62b7954eecdc1ce0cf364c1f719060a19aec5d997c1b1493362e941367";
|
|
31
|
-
}, {
|
|
32
|
-
readonly id: "error-codes-schema";
|
|
33
|
-
readonly path: "spec/plugin/error-codes-v8.schema.json";
|
|
34
|
-
readonly version: "error-codes-v8";
|
|
35
|
-
readonly sha256: "5ec127f0fdd6e749d8ee342e53796acd04d1c220fb03cca462bd5222c57b5944";
|
|
36
|
-
}, {
|
|
37
|
-
readonly id: "external-signer-request-schema";
|
|
38
|
-
readonly path: "spec/plugin/external-signer-request-v1.schema.json";
|
|
39
|
-
readonly version: "external-signer-request-v1";
|
|
40
|
-
readonly sha256: "56884e9bb0b00d07fe7e8c52acfc33a4a7bab54f8a02d504f35b00bab42a03fb";
|
|
41
|
-
}, {
|
|
42
|
-
readonly id: "external-signer-response-schema";
|
|
43
|
-
readonly path: "spec/plugin/external-signer-response-v1.schema.json";
|
|
44
|
-
readonly version: "external-signer-response-v1";
|
|
45
|
-
readonly sha256: "b3b6d2b3dfe4f9bb680387e4c3a8010faef91d2d12fe28e76e51d5d84703a047";
|
|
46
|
-
}, {
|
|
47
|
-
readonly id: "host-capability-contract-schema";
|
|
48
|
-
readonly path: "spec/plugin/host-capability-contract-v1.schema.json";
|
|
49
|
-
readonly version: "host-capability-contract-v1";
|
|
50
|
-
readonly sha256: "4816f59ac0819d02fb05ddd48f2ac12a2d2103a8e15d5257ca8b7d5188ab21a4";
|
|
51
|
-
}, {
|
|
52
|
-
readonly id: "host-capability-pin-schema";
|
|
53
|
-
readonly path: "spec/plugin/host-capability-pin-v1.schema.json";
|
|
54
|
-
readonly version: "host-capability-pin-v1";
|
|
55
|
-
readonly sha256: "23591639475c485134c842cae5e53a679dde1b30374a6430ce6e4827be4d18ed";
|
|
56
|
-
}, {
|
|
57
|
-
readonly id: "iframe-bridge-schema";
|
|
58
|
-
readonly path: "spec/plugin/bridge-v7.schema.json";
|
|
59
|
-
readonly version: "bridge-v7";
|
|
60
|
-
readonly sha256: "5a6e7307f1649eb70d13e83e5d16177458957bffb3262b9299b4cf6d443e284a";
|
|
61
|
-
}, {
|
|
62
|
-
readonly id: "manifest-schema";
|
|
63
|
-
readonly path: "spec/plugin/manifest-v9.schema.json";
|
|
64
|
-
readonly version: "manifest-v9";
|
|
65
|
-
readonly sha256: "d8b0fc348179a1a9af81f152897bad1891b1f8b7a7a4448c0a4e54e9883f1322";
|
|
66
|
-
}, {
|
|
67
|
-
readonly id: "network-grant-schema";
|
|
68
|
-
readonly path: "spec/plugin/network-grant-v2.schema.json";
|
|
69
|
-
readonly version: "network-grant-v2";
|
|
70
|
-
readonly sha256: "5fc1cfc3469a992e551fd392fab982abb6f95e456a1cb768ceca137f7c693abc";
|
|
71
|
-
}, {
|
|
72
|
-
readonly id: "opaque-surface-document-schema";
|
|
73
|
-
readonly path: "spec/plugin/opaque-surface-document-v3.schema.json";
|
|
74
|
-
readonly version: "opaque-surface-document-v3";
|
|
75
|
-
readonly sha256: "63419ff5b5a8890e14f97ca29aaae175b93daff61d4567c5bdff7f6e6a9e7450";
|
|
76
|
-
}, {
|
|
77
|
-
readonly id: "opaque-surface-transport-schema";
|
|
78
|
-
readonly path: "spec/plugin/opaque-surface-transport-v6.schema.json";
|
|
79
|
-
readonly version: "opaque-surface-transport-v6";
|
|
80
|
-
readonly sha256: "8f2af2669edc9413020c26765ee3f1986ef63a7d0803466861d8cdae3977ccff";
|
|
81
|
-
}, {
|
|
82
|
-
readonly id: "owner-scope-inventory-registry";
|
|
83
|
-
readonly path: "spec/plugin/owner-scope-inventories-v1.json";
|
|
84
|
-
readonly version: "owner-scope-inventory-registry-v1";
|
|
85
|
-
readonly sha256: "f655313a641368383b3d84b6ea4f6a2a2ef42a44a4dd23f71211361c9c2e0505";
|
|
86
|
-
}, {
|
|
87
|
-
readonly id: "owner-scope-inventory-schema";
|
|
88
|
-
readonly path: "spec/plugin/owner-scope-inventory-v1.schema.json";
|
|
89
|
-
readonly version: "owner-scope-inventory-v1";
|
|
90
|
-
readonly sha256: "21dc4980103f3a36f4252ce141d7350476ec00968e8a320695e450274e928be1";
|
|
91
|
-
}, {
|
|
92
|
-
readonly id: "owner-scope-migration-schema";
|
|
93
|
-
readonly path: "spec/plugin/owner-scope-migration-v1.schema.json";
|
|
94
|
-
readonly version: "owner-scope-migration-v1";
|
|
95
|
-
readonly sha256: "497fff8a09d48fe195c18d13ff05ca6c9f8406f6215588901cb6d89315b713eb";
|
|
96
|
-
}, {
|
|
97
|
-
readonly id: "owner-scope-root-recovery-schema";
|
|
98
|
-
readonly path: "spec/plugin/owner-scope-root-recovery-v1.schema.json";
|
|
99
|
-
readonly version: "owner-scope-root-recovery-v1";
|
|
100
|
-
readonly sha256: "81b961a9933d129c8f9119e3091226039ffbc0b4721116a4811f9785bebf9d64";
|
|
101
|
-
}, {
|
|
102
|
-
readonly id: "package-signature-schema";
|
|
103
|
-
readonly path: "spec/plugin/package-signature-v1.schema.json";
|
|
104
|
-
readonly version: "package-signature-v1";
|
|
105
|
-
readonly sha256: "13951c0f6831ba28647774368c76a817868aeb7984628e2cf3dc4ad1b54f8284";
|
|
106
|
-
}, {
|
|
107
|
-
readonly id: "performance-contract";
|
|
108
|
-
readonly path: "spec/plugin/performance-contract-v4.json";
|
|
109
|
-
readonly version: "performance-contract-v4";
|
|
110
|
-
readonly sha256: "08830053b38f0f8466c4e9e608fd7f21e24175063ec02307543fbd8adfb5692e";
|
|
111
|
-
}, {
|
|
112
|
-
readonly id: "performance-evidence-schema";
|
|
113
|
-
readonly path: "spec/plugin/performance-evidence-v4.schema.json";
|
|
114
|
-
readonly version: "performance-evidence-v4";
|
|
115
|
-
readonly sha256: "f51ba9d425f0e40bc4f2db7ed26454e7575b14ffb6937a06dc01b8e7a66b3f61";
|
|
116
|
-
}, {
|
|
117
|
-
readonly id: "platform-package-publication-schema";
|
|
118
|
-
readonly path: "spec/plugin/platform-package-publication-v2.schema.json";
|
|
119
|
-
readonly version: "platform-package-publication-v2";
|
|
120
|
-
readonly sha256: "1cc7a342b7dda8533324764c7f29fa7a3ca24a93f6015e7a18a17539febd538a";
|
|
121
|
-
}, {
|
|
122
|
-
readonly id: "platform-package-set-schema";
|
|
123
|
-
readonly path: "spec/plugin/platform-package-set-v3.schema.json";
|
|
124
|
-
readonly version: "platform-package-set-v3";
|
|
125
|
-
readonly sha256: "8acba305f9df90be10cca516b98a598efc9a4bffd0e3c2915d78385e18397b88";
|
|
126
|
-
}, {
|
|
127
|
-
readonly id: "plugin-platform-openapi";
|
|
128
|
-
readonly path: "spec/openapi/plugin-platform-v17.yaml";
|
|
129
|
-
readonly version: "plugin-platform-v17";
|
|
130
|
-
readonly sha256: "7c3f82c13737ad04882a1dd6ca4577f13f9a2249135c647c859e8c77059db131";
|
|
131
|
-
}, {
|
|
132
|
-
readonly id: "presentation-icon-evidence-schema";
|
|
133
|
-
readonly path: "spec/plugin/presentation-icon-evidence-v1.schema.json";
|
|
134
|
-
readonly version: "presentation-icon-evidence-v1";
|
|
135
|
-
readonly sha256: "0b302ff651bec9447637dd08b672d2371fcf383c5d9505e885955aa1b607ec15";
|
|
136
|
-
}, {
|
|
137
|
-
readonly id: "presentation-locale-fixture";
|
|
138
|
-
readonly path: "spec/plugin/presentation-locale-fixtures-v1.json";
|
|
139
|
-
readonly version: "presentation-locale-fixtures-v1";
|
|
140
|
-
readonly sha256: "cbb4c0188d020b5fbde9a0c2c33b3677d21cc64c0f0297b7f6f3f6c0efabc40e";
|
|
141
|
-
}, {
|
|
142
|
-
readonly id: "process-containment-schema";
|
|
143
|
-
readonly path: "spec/plugin/process-containment-v1.schema.json";
|
|
144
|
-
readonly version: "process-containment-v1";
|
|
145
|
-
readonly sha256: "930ea44b1f62361706e994649e84f62af0a6418b77a661ae9bf9c10f1398e3fc";
|
|
146
|
-
}, {
|
|
147
|
-
readonly id: "public-api-catalog";
|
|
148
|
-
readonly path: "spec/plugin/public-api-v1.json";
|
|
149
|
-
readonly version: "public-api-v1";
|
|
150
|
-
readonly sha256: "562a80933bb079abf082dc354e4ff206c8a00b6670be5d17ef5d191a9c52fc75";
|
|
151
|
-
}, {
|
|
152
|
-
readonly id: "publisher-release-ref-schema";
|
|
153
|
-
readonly path: "spec/plugin/publisher-release-ref-v1.schema.json";
|
|
154
|
-
readonly version: "publisher-release-ref-v1";
|
|
155
|
-
readonly sha256: "f68241937dc291b1f660c2c184bd60a7058a4471d2966bd7954ba574c84fe726";
|
|
156
|
-
}, {
|
|
157
|
-
readonly id: "quarantine-cleanup-schema";
|
|
158
|
-
readonly path: "spec/plugin/quarantine-cleanup-v1.schema.json";
|
|
159
|
-
readonly version: "quarantine-cleanup-v1";
|
|
160
|
-
readonly sha256: "0aced01a8d409953d5075a799ac273cae79e285ac82debe93ac4d8b706571ad1";
|
|
161
|
-
}, {
|
|
162
|
-
readonly id: "release-metadata-schema";
|
|
163
|
-
readonly path: "spec/plugin/release-metadata-v8.schema.json";
|
|
164
|
-
readonly version: "release-metadata-v8";
|
|
165
|
-
readonly sha256: "ad8888e6b5673786ea0fc82475be92835c3b177b685cca5bb3efd936d461b215";
|
|
166
|
-
}, {
|
|
167
|
-
readonly id: "release-publisher-config-schema";
|
|
168
|
-
readonly path: "spec/plugin/release-publisher-config-v1.schema.json";
|
|
169
|
-
readonly version: "release-publisher-config-v1";
|
|
170
|
-
readonly sha256: "47d782062652b85a77dc67a98c8859f2f1dc598d4496df13ca70c4ceb02df227";
|
|
171
|
-
}, {
|
|
172
|
-
readonly id: "release-revocation-pointer-schema";
|
|
173
|
-
readonly path: "spec/plugin/release-revocation-pointer-v2.schema.json";
|
|
174
|
-
readonly version: "release-revocation-pointer-v2";
|
|
175
|
-
readonly sha256: "51ced7ca790d7d3d3dcb2e65faf3a3a74713ccefe7b2a5b97355a0b3226bdf34";
|
|
176
|
-
}, {
|
|
177
|
-
readonly id: "release-revocation-schema";
|
|
178
|
-
readonly path: "spec/plugin/release-revocation-v3.schema.json";
|
|
179
|
-
readonly version: "release-revocation-v3";
|
|
180
|
-
readonly sha256: "930d2729719f5f44de108df23e9efbbae17f7a3072963c1c5471197b189aa8d9";
|
|
181
|
-
}, {
|
|
182
|
-
readonly id: "release-root-delegation-schema";
|
|
183
|
-
readonly path: "spec/plugin/release-root-delegation-v1.schema.json";
|
|
184
|
-
readonly version: "release-root-delegation-v1";
|
|
185
|
-
readonly sha256: "f46249f9d51610b7a8401adc4ed04c098adaad408f35661b092f8d67767e21f2";
|
|
186
|
-
}, {
|
|
187
|
-
readonly id: "release-source-policy-pointer-schema";
|
|
188
|
-
readonly path: "spec/plugin/release-source-policy-pointer-v2.schema.json";
|
|
189
|
-
readonly version: "release-source-policy-pointer-v2";
|
|
190
|
-
readonly sha256: "a4b2ba0909a633cfd0a365dff87ca1b6eaf6df53ac38b4d2b458d7ea85da6dd1";
|
|
191
|
-
}, {
|
|
192
|
-
readonly id: "release-source-policy-schema";
|
|
193
|
-
readonly path: "spec/plugin/release-source-policy-v3.schema.json";
|
|
194
|
-
readonly version: "release-source-policy-v3";
|
|
195
|
-
readonly sha256: "9b6964cbbaeab6400ab25ff3da6fca891b9833c7f644f56367b420382d096244";
|
|
196
|
-
}, {
|
|
197
|
-
readonly id: "resource-scope-schema";
|
|
198
|
-
readonly path: "spec/plugin/resource-scope-v1.schema.json";
|
|
199
|
-
readonly version: "resource-scope-v1";
|
|
200
|
-
readonly sha256: "e6021bd576c7220ad5536645a7ad8e57ee7aeb9901c31a89444fa6b695d8dc6f";
|
|
201
|
-
}, {
|
|
202
|
-
readonly id: "runtime-admission-schema";
|
|
203
|
-
readonly path: "spec/plugin/runtime-admission-v1.schema.json";
|
|
204
|
-
readonly version: "runtime-admission-v1";
|
|
205
|
-
readonly sha256: "bee7b149876447d663a4099dbd71e71fa97f8ff80ddf4e12cbfba951a47c4beb";
|
|
206
|
-
}, {
|
|
207
|
-
readonly id: "runtime-descriptor-schema";
|
|
208
|
-
readonly path: "spec/plugin/runtime-descriptor-v3.schema.json";
|
|
209
|
-
readonly version: "runtime-descriptor-v3";
|
|
210
|
-
readonly sha256: "c95c9126c0bbb4b5f697114d4e11d7107d1bebea56d700d3549d00812e7c3e97";
|
|
211
|
-
}, {
|
|
212
|
-
readonly id: "runtime-exec-journal-schema";
|
|
213
|
-
readonly path: "spec/plugin/runtime-exec-journal-v1.schema.json";
|
|
214
|
-
readonly version: "runtime-exec-journal-v1";
|
|
215
|
-
readonly sha256: "2bddbba383843b8ebc1554009909f0bb25e98616be763826a697cb0f408870d2";
|
|
216
|
-
}, {
|
|
217
|
-
readonly id: "rust-ipc-schema";
|
|
218
|
-
readonly path: "spec/plugin/ipc-v7.schema.json";
|
|
219
|
-
readonly version: "rust-ipc-v7";
|
|
220
|
-
readonly sha256: "1e1c5b6414030a0c7ffa6f4356f95e2f78f339b9b4dff45bb3691931316d9502";
|
|
221
|
-
}, {
|
|
222
|
-
readonly id: "session-scope-schema";
|
|
223
|
-
readonly path: "spec/plugin/session-scope-v1.schema.json";
|
|
224
|
-
readonly version: "session-scope-v1";
|
|
225
|
-
readonly sha256: "38044d65de36ce5219929ac4080547660734a7c6bb4d26d9b90e5838b1db331a";
|
|
226
|
-
}, {
|
|
227
|
-
readonly id: "target-classifier-fixture";
|
|
228
|
-
readonly path: "spec/plugin/target-classifier-v2.json";
|
|
229
|
-
readonly version: "target-classifier-v2";
|
|
230
|
-
readonly sha256: "ae7336cce77a2e820f96f1cc309b93f8442c932dcebec25e3890d31cd098e2d1";
|
|
231
|
-
}, {
|
|
232
|
-
readonly id: "token-ticket-schema";
|
|
233
|
-
readonly path: "spec/plugin/token-ticket-v4.schema.json";
|
|
234
|
-
readonly version: "token-ticket-v4";
|
|
235
|
-
readonly sha256: "1576e35e4e06ba67c2fdc038934c5d5184fd1224adbd75c9f8eaf6a144ade238";
|
|
236
|
-
}, {
|
|
237
|
-
readonly id: "wasm-worker-schema";
|
|
238
|
-
readonly path: "spec/plugin/wasm-worker-v2.schema.json";
|
|
239
|
-
readonly version: "redevplugin-wasm-worker-v2";
|
|
240
|
-
readonly sha256: "00bf123f3a9ed932de4b71c180e2a5c34af0f82050defb271fedec42cf217902";
|
|
241
|
-
}, {
|
|
242
|
-
readonly id: "worker-invocation-schema";
|
|
243
|
-
readonly path: "spec/plugin/worker-invocation-v3.schema.json";
|
|
244
|
-
readonly version: "worker-invocation-v3";
|
|
245
|
-
readonly sha256: "f75b5b6ea0f5936e15f84a76d9b496690d7e1b7da7a05948ad26a88cc1360847";
|
|
246
|
-
}];
|
|
247
|
-
};
|
|
248
|
-
export declare const packageSet: {
|
|
249
|
-
readonly schema_version: "redevplugin.platform_package_set.v3";
|
|
250
|
-
readonly platform_version: "2.0.10";
|
|
251
|
-
readonly go_module: {
|
|
252
|
-
readonly module: "github.com/floegence/redevplugin/v2";
|
|
253
|
-
readonly version: "v2.0.10";
|
|
254
|
-
};
|
|
255
|
-
readonly npm_packages: readonly [{
|
|
256
|
-
readonly name: "@floegence/redevplugin-contracts";
|
|
257
|
-
readonly version: "2.0.10";
|
|
258
|
-
}, {
|
|
259
|
-
readonly name: "@floegence/redevplugin-ui";
|
|
260
|
-
readonly version: "2.0.10";
|
|
261
|
-
}];
|
|
262
|
-
readonly rust_crates: readonly [{
|
|
263
|
-
readonly name: "redevplugin-runtime";
|
|
264
|
-
readonly version: "2.0.10";
|
|
265
|
-
readonly role: "runtime";
|
|
266
|
-
}, {
|
|
267
|
-
readonly name: "redevplugin-worker-sdk";
|
|
268
|
-
readonly version: "2.0.10";
|
|
269
|
-
readonly role: "worker_sdk";
|
|
270
|
-
}];
|
|
271
|
-
readonly contract_registry_version: "contract-registry-v2";
|
|
272
|
-
readonly contract_set_sha256: "f6cc158815ec2df3499681caf38b3b3bad8deea291ffffae6558fc1f5474d709";
|
|
273
|
-
};
|
|
274
|
-
export declare const contractSetSHA256: "f6cc158815ec2df3499681caf38b3b3bad8deea291ffffae6558fc1f5474d709";
|
|
275
|
-
export declare function getContract(id: ContractID): Contract;
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,2 @@
|
|
|
1
|
-
import { generatedContractArtifacts, generatedContractRegistry, generatedContractSetSHA256, generatedPackageSet, generatedRegistryContract, } from "./contracts.gen.js";
|
|
2
1
|
export * from "./release-signing.js";
|
|
3
2
|
export * from "./presentation.js";
|
|
4
|
-
export class UnknownContractError extends RangeError {
|
|
5
|
-
id;
|
|
6
|
-
constructor(id) {
|
|
7
|
-
super(`contract id ${JSON.stringify(id)} is unknown`);
|
|
8
|
-
this.name = "UnknownContractError";
|
|
9
|
-
this.id = id;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function deepFreeze(value) {
|
|
13
|
-
if (value !== null && typeof value === "object" && !Object.isFrozen(value)) {
|
|
14
|
-
for (const nested of Object.values(value))
|
|
15
|
-
deepFreeze(nested);
|
|
16
|
-
Object.freeze(value);
|
|
17
|
-
}
|
|
18
|
-
return value;
|
|
19
|
-
}
|
|
20
|
-
export const contractArtifacts = deepFreeze(generatedContractArtifacts);
|
|
21
|
-
export const registryContract = deepFreeze(generatedRegistryContract);
|
|
22
|
-
export const contractRegistry = deepFreeze(generatedContractRegistry);
|
|
23
|
-
export const packageSet = deepFreeze(generatedPackageSet);
|
|
24
|
-
export const contractSetSHA256 = generatedContractSetSHA256;
|
|
25
|
-
const contractsByID = new Map();
|
|
26
|
-
for (const contract of contractArtifacts)
|
|
27
|
-
contractsByID.set(contract.id, contract);
|
|
28
|
-
contractsByID.set(registryContract.id, registryContract);
|
|
29
|
-
export function getContract(id) {
|
|
30
|
-
const contract = contractsByID.get(id);
|
|
31
|
-
if (contract === undefined)
|
|
32
|
-
throw new UnknownContractError(id);
|
|
33
|
-
return contract;
|
|
34
|
-
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export declare const rootDelegationSchemaVersion: "redevplugin.release_root_delegation.v1";
|
|
2
2
|
export declare const packageSignatureSchemaVersion: "redevplugin.package_signature.v1";
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const releaseMetadataSchemaVersion: "redevplugin.release_metadata.v8";
|
|
3
|
+
export declare const releaseMetadataSchemaVersion: "redevplugin.release_metadata";
|
|
5
4
|
export declare const sourcePolicySchemaVersion: "redevplugin.release_source_policy.v3";
|
|
6
|
-
export declare const sourcePolicyPointerSchemaVersion: "redevplugin.release_source_policy_pointer.
|
|
7
|
-
export declare const revocationSchemaVersion: "redevplugin.release_revocation.
|
|
8
|
-
export declare const revocationPointerSchemaVersion: "redevplugin.release_revocation_pointer.
|
|
5
|
+
export declare const sourcePolicyPointerSchemaVersion: "redevplugin.release_source_policy_pointer.v2";
|
|
6
|
+
export declare const revocationSchemaVersion: "redevplugin.release_revocation.v3";
|
|
7
|
+
export declare const revocationPointerSchemaVersion: "redevplugin.release_revocation_pointer.v2";
|
|
9
8
|
export declare const signatureAlgorithmEd25519: "ed25519";
|
|
10
9
|
export declare const genesisPreviousDocumentSHA256: string;
|
|
11
10
|
export declare const signingUsages: {
|
|
@@ -92,35 +91,13 @@ export type PackageReleaseSignatureRef = Readonly<{
|
|
|
92
91
|
source_policy_epoch: string;
|
|
93
92
|
revocation_epoch: string;
|
|
94
93
|
}>;
|
|
95
|
-
export type ReleaseCompatibility = Readonly<{
|
|
96
|
-
min_redevplugin_version: string;
|
|
97
|
-
min_runtime_version: string;
|
|
98
|
-
ui_protocol_version: "plugin-ui-v7";
|
|
99
|
-
supported_targets?: readonly ("darwin/amd64" | "darwin/arm64" | "linux/amd64" | "linux/arm64")[];
|
|
100
|
-
}>;
|
|
101
|
-
export type HostCapabilityContractRef = Readonly<{
|
|
102
|
-
publisher_id: string;
|
|
103
|
-
contract_id: string;
|
|
104
|
-
contract_version: string;
|
|
105
|
-
artifact_sha256: string;
|
|
106
|
-
}>;
|
|
107
|
-
export type HostCapabilityRequirementRef = Readonly<{
|
|
108
|
-
capability_id: string;
|
|
109
|
-
capability_version: string;
|
|
110
|
-
contract: HostCapabilityContractRef;
|
|
111
|
-
}>;
|
|
112
|
-
export type ReleaseHostRequirement = Readonly<{
|
|
113
|
-
host_id: string;
|
|
114
|
-
min_host_version?: string;
|
|
115
|
-
required_capability_contracts?: readonly HostCapabilityRequirementRef[];
|
|
116
|
-
}>;
|
|
117
94
|
export type ReleaseEvidence = Readonly<{
|
|
118
95
|
notices_sha256?: string;
|
|
119
96
|
provenance_sha256?: string;
|
|
120
97
|
generated_at?: string;
|
|
121
98
|
}>;
|
|
122
|
-
export type
|
|
123
|
-
schema_version: typeof
|
|
99
|
+
export type ReleaseMetadata = Readonly<{
|
|
100
|
+
schema_version: typeof releaseMetadataSchemaVersion;
|
|
124
101
|
source_id: string;
|
|
125
102
|
release_metadata_ref: string;
|
|
126
103
|
publisher_id: string;
|
|
@@ -130,8 +107,6 @@ export type ReleaseMetadataV8 = Readonly<{
|
|
|
130
107
|
hashes: ReleasePackageHashSet;
|
|
131
108
|
release_metadata_signature: ReleaseMetadataSignatureRef;
|
|
132
109
|
package_signature: PackageReleaseSignatureRef;
|
|
133
|
-
compatibility: ReleaseCompatibility;
|
|
134
|
-
host_requirements?: readonly ReleaseHostRequirement[];
|
|
135
110
|
release_evidence?: ReleaseEvidence;
|
|
136
111
|
metadata?: Readonly<Record<string, string>>;
|
|
137
112
|
}>;
|
|
@@ -149,7 +124,7 @@ export type SourcePolicyActiveKeys = Readonly<{
|
|
|
149
124
|
revocation_document: readonly string[];
|
|
150
125
|
revocation_pointer: readonly string[];
|
|
151
126
|
}>;
|
|
152
|
-
export type
|
|
127
|
+
export type SourcePolicyV3 = Readonly<{
|
|
153
128
|
schema_version: typeof sourcePolicySchemaVersion;
|
|
154
129
|
source_id: string;
|
|
155
130
|
channel: string;
|
|
@@ -171,7 +146,7 @@ export type SourcePolicyV2 = Readonly<{
|
|
|
171
146
|
key_id: string;
|
|
172
147
|
signature: string;
|
|
173
148
|
}>;
|
|
174
|
-
export type SourcePolicyInput = Omit<
|
|
149
|
+
export type SourcePolicyInput = Omit<SourcePolicyV3, "schema_version" | "signature">;
|
|
175
150
|
export type ReleasePointerInput = Readonly<{
|
|
176
151
|
source_id: string;
|
|
177
152
|
channel: string;
|
|
@@ -182,7 +157,7 @@ export type ReleasePointerInput = Readonly<{
|
|
|
182
157
|
expires_at: string;
|
|
183
158
|
key_id: string;
|
|
184
159
|
}>;
|
|
185
|
-
export type
|
|
160
|
+
export type SourcePolicyPointerV2 = Readonly<ReleasePointerInput & {
|
|
186
161
|
schema_version: typeof sourcePolicyPointerSchemaVersion;
|
|
187
162
|
signature: string;
|
|
188
163
|
}>;
|
|
@@ -193,7 +168,7 @@ export type RevokedRelease = Readonly<{
|
|
|
193
168
|
release_metadata_sha256: string;
|
|
194
169
|
revoked_at: string;
|
|
195
170
|
}>;
|
|
196
|
-
export type
|
|
171
|
+
export type RevocationV3 = Readonly<{
|
|
197
172
|
schema_version: typeof revocationSchemaVersion;
|
|
198
173
|
source_id: string;
|
|
199
174
|
channel: string;
|
|
@@ -206,8 +181,8 @@ export type RevocationV2 = Readonly<{
|
|
|
206
181
|
key_id: string;
|
|
207
182
|
signature: string;
|
|
208
183
|
}>;
|
|
209
|
-
export type RevocationInput = Omit<
|
|
210
|
-
export type
|
|
184
|
+
export type RevocationInput = Omit<RevocationV3, "schema_version" | "signature">;
|
|
185
|
+
export type RevocationPointerV2 = Readonly<ReleasePointerInput & {
|
|
211
186
|
schema_version: typeof revocationPointerSchemaVersion;
|
|
212
187
|
signature: string;
|
|
213
188
|
}>;
|
|
@@ -232,31 +207,31 @@ export declare function buildPackageSignature(input: PackageSigningInput, signat
|
|
|
232
207
|
export declare function packageSigningPreimage(input: PackageSigningInput): Uint8Array;
|
|
233
208
|
export declare function canonicalPackageSignature(context: PackageVerificationContext, document: PackageSignatureV1): Uint8Array;
|
|
234
209
|
export declare function verifyPackageSignature(context: PackageVerificationContext, document: PackageSignatureV1, verifier: SignatureVerifier): Promise<void>;
|
|
235
|
-
export declare function buildReleaseMetadata(document:
|
|
236
|
-
export declare function releaseMetadataSigningPreimage(channel: string, document:
|
|
237
|
-
export declare function canonicalReleaseMetadata(document:
|
|
238
|
-
export declare function verifyReleaseMetadata(channel: string, document:
|
|
239
|
-
export declare function buildSourcePolicy(input: SourcePolicyInput, signature: Uint8Array):
|
|
210
|
+
export declare function buildReleaseMetadata(document: ReleaseMetadata): ReleaseMetadata;
|
|
211
|
+
export declare function releaseMetadataSigningPreimage(channel: string, document: ReleaseMetadata): Uint8Array;
|
|
212
|
+
export declare function canonicalReleaseMetadata(document: ReleaseMetadata): Uint8Array;
|
|
213
|
+
export declare function verifyReleaseMetadata(channel: string, document: ReleaseMetadata, signature: Uint8Array, verifier: SignatureVerifier): Promise<void>;
|
|
214
|
+
export declare function buildSourcePolicy(input: SourcePolicyInput, signature: Uint8Array): SourcePolicyV3;
|
|
240
215
|
export declare function sourcePolicySigningPreimage(input: SourcePolicyInput): Uint8Array;
|
|
241
|
-
export declare function canonicalSourcePolicy(document:
|
|
242
|
-
export declare function verifySourcePolicy(document:
|
|
243
|
-
export declare function buildSourcePolicyPointer(input: ReleasePointerInput, signature: Uint8Array):
|
|
216
|
+
export declare function canonicalSourcePolicy(document: SourcePolicyV3): Uint8Array;
|
|
217
|
+
export declare function verifySourcePolicy(document: SourcePolicyV3, verifier: SignatureVerifier): Promise<void>;
|
|
218
|
+
export declare function buildSourcePolicyPointer(input: ReleasePointerInput, signature: Uint8Array): SourcePolicyPointerV2;
|
|
244
219
|
export declare function sourcePolicyPointerSigningPreimage(input: ReleasePointerInput): Uint8Array;
|
|
245
|
-
export declare function canonicalSourcePolicyPointer(document:
|
|
246
|
-
export declare function verifySourcePolicyPointer(document:
|
|
247
|
-
export declare function buildRevocation(input: RevocationInput, signature: Uint8Array):
|
|
220
|
+
export declare function canonicalSourcePolicyPointer(document: SourcePolicyPointerV2): Uint8Array;
|
|
221
|
+
export declare function verifySourcePolicyPointer(document: SourcePolicyPointerV2, verifier: SignatureVerifier): Promise<void>;
|
|
222
|
+
export declare function buildRevocation(input: RevocationInput, signature: Uint8Array): RevocationV3;
|
|
248
223
|
export declare function revocationSigningPreimage(input: RevocationInput): Uint8Array;
|
|
249
|
-
export declare function canonicalRevocation(document:
|
|
250
|
-
export declare function verifyRevocation(document:
|
|
251
|
-
export declare function buildRevocationPointer(input: ReleasePointerInput, signature: Uint8Array):
|
|
224
|
+
export declare function canonicalRevocation(document: RevocationV3): Uint8Array;
|
|
225
|
+
export declare function verifyRevocation(document: RevocationV3, verifier: SignatureVerifier): Promise<void>;
|
|
226
|
+
export declare function buildRevocationPointer(input: ReleasePointerInput, signature: Uint8Array): RevocationPointerV2;
|
|
252
227
|
export declare function revocationPointerSigningPreimage(input: ReleasePointerInput): Uint8Array;
|
|
253
|
-
export declare function canonicalRevocationPointer(document:
|
|
254
|
-
export declare function verifyRevocationPointer(document:
|
|
228
|
+
export declare function canonicalRevocationPointer(document: RevocationPointerV2): Uint8Array;
|
|
229
|
+
export declare function verifyRevocationPointer(document: RevocationPointerV2, verifier: SignatureVerifier): Promise<void>;
|
|
255
230
|
export declare function decodeRootDelegation(raw: Uint8Array | string): RootDelegationV1;
|
|
256
231
|
export declare function decodePackageSignature(raw: Uint8Array | string, context: PackageVerificationContext): PackageSignatureV1;
|
|
257
|
-
export declare function decodeReleaseMetadata(raw: Uint8Array | string):
|
|
258
|
-
export declare function decodeSourcePolicy(raw: Uint8Array | string):
|
|
259
|
-
export declare function decodeSourcePolicyPointer(raw: Uint8Array | string):
|
|
260
|
-
export declare function decodeRevocation(raw: Uint8Array | string):
|
|
261
|
-
export declare function decodeRevocationPointer(raw: Uint8Array | string):
|
|
232
|
+
export declare function decodeReleaseMetadata(raw: Uint8Array | string): ReleaseMetadata;
|
|
233
|
+
export declare function decodeSourcePolicy(raw: Uint8Array | string): SourcePolicyV3;
|
|
234
|
+
export declare function decodeSourcePolicyPointer(raw: Uint8Array | string): SourcePolicyPointerV2;
|
|
235
|
+
export declare function decodeRevocation(raw: Uint8Array | string): RevocationV3;
|
|
236
|
+
export declare function decodeRevocationPointer(raw: Uint8Array | string): RevocationPointerV2;
|
|
262
237
|
export declare function createEd25519Verifier(publicKeys: Readonly<Record<string, Uint8Array>>, subtle?: SubtleCrypto): SignatureVerifier;
|