@coffre/core 0.1.0 → 0.1.2
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/dist/vault.d.ts +15 -3
- package/package.json +2 -2
- package/src/vault.ts +13 -3
package/dist/vault.d.ts
CHANGED
|
@@ -146,11 +146,13 @@ export interface Vault {
|
|
|
146
146
|
checkpoint: Checkpoint;
|
|
147
147
|
}>>;
|
|
148
148
|
/**
|
|
149
|
-
* What
|
|
150
|
-
*
|
|
149
|
+
* What the vault's configuration says, which the app shows: the keys its
|
|
150
|
+
* checkpoints verify under, by the key id each checkpoint names (the one
|
|
151
|
+
* it signs with now, and those of the KEKs it replaced), and the root
|
|
152
|
+
* admins, as principals.
|
|
151
153
|
*/
|
|
152
154
|
about(): Promise<{
|
|
153
|
-
|
|
155
|
+
checkpointKeys: Record<string, CheckpointKey>;
|
|
154
156
|
rootAdmins: string[];
|
|
155
157
|
}>;
|
|
156
158
|
/**
|
|
@@ -341,6 +343,16 @@ export type Checkpoint = {
|
|
|
341
343
|
/** Ed25519 over `checkpointMessage(...)`, base64. */
|
|
342
344
|
signature: string;
|
|
343
345
|
};
|
|
346
|
+
/**
|
|
347
|
+
* A public key the vault's checkpoints verify under, base64. One it
|
|
348
|
+
* replaced vouches only for checkpoints whose prefix ends before `until`,
|
|
349
|
+
* its first entry under the key that replaced it; the one it signs with now
|
|
350
|
+
* has none.
|
|
351
|
+
*/
|
|
352
|
+
export type CheckpointKey = {
|
|
353
|
+
publicKey: string;
|
|
354
|
+
until: number | null;
|
|
355
|
+
};
|
|
344
356
|
/** An entry of the vault's log, and so the chain up to it. */
|
|
345
357
|
export type LogHead = {
|
|
346
358
|
seq: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coffre/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "What coffre's packages share: roles, envelopes, identity, the audit chain and the vault's contract.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/node": "26.1.1",
|
|
69
69
|
"tsdown": "0.23.0",
|
|
70
70
|
"typescript": "5.9.3",
|
|
71
|
-
"@coffre/conformance": "0.1.
|
|
71
|
+
"@coffre/conformance": "0.1.2"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "tsdown",
|
package/src/vault.ts
CHANGED
|
@@ -64,10 +64,12 @@ export interface Vault {
|
|
|
64
64
|
*/
|
|
65
65
|
checkpoint(): Promise<Outcome<{ checkpoint: Checkpoint }>>;
|
|
66
66
|
/**
|
|
67
|
-
* What
|
|
68
|
-
*
|
|
67
|
+
* What the vault's configuration says, which the app shows: the keys its
|
|
68
|
+
* checkpoints verify under, by the key id each checkpoint names (the one
|
|
69
|
+
* it signs with now, and those of the KEKs it replaced), and the root
|
|
70
|
+
* admins, as principals.
|
|
69
71
|
*/
|
|
70
|
-
about(): Promise<{
|
|
72
|
+
about(): Promise<{ checkpointKeys: Record<string, CheckpointKey>; rootAdmins: string[] }>;
|
|
71
73
|
/**
|
|
72
74
|
* Check the whole log: rehash it from the first entry, the vault's
|
|
73
75
|
* entries by their MACs, every checkpoint against the prefix it signed,
|
|
@@ -252,6 +254,14 @@ export type Checkpoint = {
|
|
|
252
254
|
signature: string;
|
|
253
255
|
};
|
|
254
256
|
|
|
257
|
+
/**
|
|
258
|
+
* A public key the vault's checkpoints verify under, base64. One it
|
|
259
|
+
* replaced vouches only for checkpoints whose prefix ends before `until`,
|
|
260
|
+
* its first entry under the key that replaced it; the one it signs with now
|
|
261
|
+
* has none.
|
|
262
|
+
*/
|
|
263
|
+
export type CheckpointKey = { publicKey: string; until: number | null };
|
|
264
|
+
|
|
255
265
|
/** An entry of the vault's log, and so the chain up to it. */
|
|
256
266
|
export type LogHead = { seq: number; hash: string };
|
|
257
267
|
|