@metalabel/dfos-protocol 0.50.0 → 0.52.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.
@@ -43,7 +43,7 @@ declare const isCanonicalRoleSet: (value: string) => boolean;
43
43
  declare const roleSetCovers: (value: string, role: KeyRole) => boolean;
44
44
 
45
45
  /**
46
- * The first registered purpose in KEY-PROOF.md's purpose registry: the candidate
46
+ * The registered key-proof purpose in PROTOCOL.md, The envelope: the candidate
47
47
  * key presents for addition to a ceremony-named identity's `authKeys`/
48
48
  * `assertKeys` sets.
49
49
  *
@@ -57,7 +57,7 @@ declare const KEY_ADD_JWS_TYP = "did:dfos:key-add";
57
57
  declare const MAX_KEY_PROOF_SIZE = 4096;
58
58
  /**
59
59
  * RECOMMENDED acceptance window, in seconds, EITHER SIDE of the verifier's clock
60
- * — matching a ceremony's own lifetime (KEY-PROOF.md, Verification step 5).
60
+ * — matching a ceremony's own lifetime (INTEGRATIONS.md, Presentation verification).
61
61
  */
62
62
  declare const DEFAULT_KEY_PROOF_SKEW_SECONDS = 300;
63
63
  /**
@@ -146,8 +146,8 @@ interface SignKeyProofInput {
146
146
  * through `createJws`, whose `JwsHeader` requires a `kid` this envelope must not
147
147
  * carry.
148
148
  *
149
- * HOLDER OBLIGATIONS THIS FUNCTION CANNOT DISCHARGE (KEY-PROOF.md, Holder
150
- * Obligations). A holder MUST show its human — before calling this — the
149
+ * HOLDER OBLIGATIONS THIS FUNCTION CANNOT DISCHARGE (INTEGRATIONS.md, Holder
150
+ * obligations). A holder MUST show its human — before calling this — the
151
151
  * audience, the purpose, the adopting identity, and the roles. A proof is
152
152
  * consent, and consent that was never displayed was never given.
153
153
  *
@@ -210,10 +210,10 @@ interface VerifyKeyProofOptions {
210
210
  /** What a verified key proof hands back. */
211
211
  interface VerifiedKeyProof {
212
212
  /**
213
- * The validated payload. THE CALLER MUST NOW RUN STEP 6 against `payload.nonce`:
214
- * check that it is a nonce this verifier minted, for this ceremony, not yet
215
- * consumed, and consume it ATOMICALLY (check-and-delete) so two racing
216
- * completions cannot both pass.
213
+ * The validated payload. THE CALLER MUST NOW RUN THE NONCE CHECK against
214
+ * `payload.nonce`: check that it is a nonce this verifier minted, for this
215
+ * ceremony, not yet consumed, and consume it ATOMICALLY (check-and-delete) so
216
+ * two racing completions cannot both pass.
217
217
  */
218
218
  payload: KeyProofPayload;
219
219
  /** The header `typ` — equal to `expectedTyp`, since anything else rejected. */
@@ -222,17 +222,18 @@ interface VerifiedKeyProof {
222
222
  now: number;
223
223
  }
224
224
  /**
225
- * Verify a key proof AT PRESENTATION TIME — KEY-PROOF.md's verification algorithm
226
- * steps 1–5 and 7: size cap, header gates, the closed payload schema over
227
- * CANONICAL bytes, the four expectation arms (audience, did, roleSet, prevCID),
228
- * freshness, and the signature against the payload's OWN `publicKeyMultibase`.
225
+ * Verify a key proof AT PRESENTATION TIME — INTEGRATIONS.md, Presentation
226
+ * verification except its nonce check: size cap, header gates, the closed
227
+ * payload schema over CANONICAL bytes, the four expectation arms (audience,
228
+ * did, roleSet, prevCID), freshness, and the signature against the payload's
229
+ * OWN `publicKeyMultibase`.
229
230
  *
230
231
  * EVERY EXPECTATION IS THE DEPLOYMENT'S OWN VALUE. There is no arm here that
231
232
  * compares the envelope to itself. `expectedDid`, `expectedRoleSet` and
232
233
  * `expectedPrevCID` are the position the completing authority is about to WRITE;
233
234
  * if the envelope names a different one, the holder consented to something else.
234
235
  *
235
- * STEP 6 (NONCE) IS THE CALLER'S, and this function cannot stand in for it. The
236
+ * THE NONCE CHECK IS THE CALLER'S, and this function cannot stand in for it. The
236
237
  * nonce MUST be one this verifier minted, for this ceremony, not yet consumed,
237
238
  * checked and consumed ATOMICALLY — a check-and-delete against the verifier's
238
239
  * own store, which is state this pure function does not hold. It is returned on
@@ -14,9 +14,9 @@ import {
14
14
  unsafeKeyProofSubject,
15
15
  verifyChainKeyProof,
16
16
  verifyKeyProof
17
- } from "../chunk-JVSC67DC.js";
18
- import "../chunk-IDVYITX7.js";
19
- import "../chunk-4LG2GEB2.js";
17
+ } from "../chunk-QRCOMLAP.js";
18
+ import "../chunk-F7RHI2CK.js";
19
+ import "../chunk-QTJZGXMH.js";
20
20
  export {
21
21
  DEFAULT_KEY_PROOF_SKEW_SECONDS,
22
22
  KEY_ADD_JWS_TYP,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metalabel/dfos-protocol",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "type": "module",
5
5
  "description": "DFOS Protocol — Ed25519 signed chain primitives, services, credentials, and verification",
6
6
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.dfos.com/credit-claim/v1",
4
4
  "title": "Credit Claim",
5
- "description": "The payload of a did:dfos:credit-claim JWS — a claimant's own signed assertion that it holds a named role on a content chain. Unlike post/v1, profile/v1, and index/v1, this is NOT a document committed to a chain by CID: it is an envelope payload carried inside document bytes, in the claim field of a credits entry (see $defs/creditEntry). Attribution, not authorization — a credit claim grants nothing. Unknown top-level fields are deliberately NOT rejected here (no additionalProperties: false, unlike the document schemas): this is a wire payload under the protocol's MUST-ignore-unknown rule, and the CID commits to the exact bytes, so a verifier that stripped unknown keys would fail its own CID check. Full semantics, the two-way bind, and the four verification states: https://protocol.dfos.com/credits",
5
+ "description": "The payload of a did:dfos:credit-claim JWS — a claimant's own signed assertion that it holds a named role on a content chain. Unlike post/v1, profile/v1, and index/v1, this is NOT a document committed to a chain by CID: it is an envelope payload carried inside document bytes, in the claim field of a credits entry (see $defs/creditEntry). Attribution, not authorization — a credit claim grants nothing. Unknown top-level fields are deliberately NOT rejected here (no additionalProperties: false, unlike the document schemas): this is a wire payload under the protocol's MUST-ignore-unknown rule, and the CID commits to the exact bytes, so a verifier that stripped unknown keys would fail its own CID check. Full semantics, the two-way bind, and the four verification states: https://protocol.dfos.com/content-model#credits",
6
6
  "type": "object",
7
7
  "required": ["version", "type", "contentId", "did", "role", "createdAt"],
8
8
  "properties": {
@@ -43,7 +43,7 @@
43
43
  "items": {
44
44
  "$ref": "#/$defs/credit"
45
45
  },
46
- "description": "Ordered authorship credits. Array order is display order; the first entry is the primary author. Omit entirely for unattributed content. A bare entry is the assertion tier of the authorship lattice — the operation signer asserts it; a credited DID upgrades its credit to proof by adding a credit claim in the entry's claim field (see https://protocol.dfos.com/credits)."
46
+ "description": "Ordered authorship credits. Array order is display order; the first entry is the primary author. Omit entirely for unattributed content. A bare entry is the assertion tier of the authorship lattice — the operation signer asserts it; a credited DID upgrades its credit to proof by adding a credit claim in the entry's claim field (see https://protocol.dfos.com/content-model#credits)."
47
47
  }
48
48
  },
49
49
  "additionalProperties": false,