Skip to main content
[AVAILABLE]. packages/envelope-verifier. Zero third-party runtime dependencies, only @parmana/shared and @parmana/crypto.

Purpose

Lets a receiving system verify a signed execution authorization without trusting Parmana’s runtime process or database, only Parmana’s public key and the envelope itself. This is what The gateway composes and adds exactly one more check to (businessTransactionHash).

Install

Not published to npm. This is an internal package of this repository, used from a clone of it: npm ci at the repository root links every workspace package. The packages published to npm are @parmana/sdk, @parmana/connector-sdk.

Key exports

VerificationResult shape

Each check is reported independently, a caller can distinguish “forged” from “expired” rather than getting one opaque false, verified live in Detect tampering.

What each time check enforces

ttlWithinPolicy requires all of the following:
  1. A positive lifetime. expiresAt is after authorizedAt. An envelope whose expiry precedes its issue time is refused, even when its signature verifies.
  2. A lifetime within the policy maximum. expiresAt - authorizedAt is at most maxTtlSeconds. The constructor option defaults to 300 seconds, so a compromised signer cannot mint long-lived envelopes.
  3. No future-dated issue time. authorizedAt is no more than 60 seconds after the verifier’s clock. The 60-second allowance is fixed and is the same as the policy-change step-up verifier’s. An envelope issued by a signer whose clock runs further ahead is refused until the clocks agree.
maxTtlSeconds is the only time setting you can change. The 60-second skew is a constant in the package. If your signer and verifier clocks drift by more than 60 seconds, correct the clocks rather than the verifier. Refused envelopes return valid: false. The check that failed is reported in checks: notExpired for an expired envelope, ttlWithinPolicy for any of the three conditions above.

Minimal example

Next

Detect tampering

A forged signature and a reused nonce, both caught, run live.

@parmana/execution-gateway

What composes this package and adds the content-hash check.