@7h3/protocol 0.5.6 → 0.6.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/bin/7h3.js +74 -1
- package/cborCodec.d.ts +13 -0
- package/index.js +395 -376
- package/package.json +1 -1
- package/protocol.d.ts +10 -0
package/package.json
CHANGED
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;
|