@7h3/protocol 0.5.6 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7h3/protocol",
3
- "version": "0.5.6",
3
+ "version": "0.6.0",
4
4
  "description": "7h3 Protocol: deterministic, signed, replay-safe AI-to-AI message envelopes (wire 7h3/0.1).",
5
5
  "type": "module",
6
6
  "main": "./index.js",
package/protocol.d.ts CHANGED
@@ -57,6 +57,16 @@ export declare function verifyEnvelopeEd25519(envelope: ProtocolEnvelope, public
57
57
  export declare function verifyEnvelopeSignature(envelope: ProtocolEnvelope, material: SignatureVerificationMaterial): Promise<boolean>;
58
58
  export declare function verifyCanonicalPayloadSignature(payload: string, signature: ProtocolSignature | undefined, material: SignatureVerificationMaterial): Promise<boolean>;
59
59
  export declare const MAX_TTL_MS = 86400000;
60
+ /**
61
+ * How far into the future a timestamp may sit before it is rejected.
62
+ *
63
+ * Matches the transport binding's default so every entry point agrees. Without
64
+ * this ceiling, MAX_TTL_MS bounds nothing: a sender can post-date `timestampMs`
65
+ * by a year and still pass a 24h `ttlMs`, producing an envelope that validates
66
+ * for a year and stays replayable long after any replay store has forgotten its
67
+ * nonce.
68
+ */
69
+ export declare const MAX_CLOCK_SKEW_MS = 30000;
60
70
  export declare function validateEnvelope(envelope: ProtocolEnvelope, nowMs?: number): ProtocolDiagnostic[];
61
71
  export declare function createEnvelope(input: {
62
72
  sender: string;