Skip to main content
[AVAILABLE]. packages/shared. The foundation package: every other Parmana package imports from here, this package imports from none of them.

Purpose

Canonical TypeScript types for every artifact in the trust chain (Authority through ExecutionTrustRecord), the loadConfig() environment-variable reader, and a shared error class hierarchy so every package throws recognizable, instanceof-checkable errors rather than plain Error.

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 and @parmana/sign.

Key exports

Domain types, all [AVAILABLE]

Config

Reads process.env fresh on every call, no caching, no memoization. Config covers storage provider, key directory, primarySignatureProvider / secondarySignatureProvider, hash provider, and policy directory. See Deploy patterns for the full environment variable checklist.

Errors, all [AVAILABLE]

ParmanaError is the common base class. Notable subclasses: BusinessTransactionNotFoundError, PolicyNotFoundError, AuthorityRequiredError, AuthorizationRequiredError, IntentRequiredError, DecisionNotApprovedError, ForbiddenError, UnauthorizedError, ConflictError, ValidationError, VerificationFailedError, TrustChainValidationError, ReceiptGenerationError, OverrideNotAllowedError. packages/api/src/middleware/error-handler.ts checks several of these by instanceof, see API error reference for exactly which ones actually reach a distinct HTTP status today.

Minimal example

Next

Execution trust records

The domain type this package’s ExecutionTrustRecord implements.

@parmana/crypto

Where these types get hashed and signed.