import type { CognitiveAttestation, BuildAttestationInput, FeatureActivation, SignerRole } from './types.js';
/**
 * Sort feature_activations canonically. Per schema: sort by
 * (feature_id ascending, activation_statistic alphabetically).
 * Returns a new array; does not mutate input.
 */
export declare function sortFeatureActivations(acts: FeatureActivation[]): FeatureActivation[];
/**
 * Construct an unsigned cognitive attestation. The returned object has
 * `signatures: []` and canonically-sorted `feature_activations`. Callers
 * sign it via `signAttestation`.
 */
export declare function buildAttestation(input: BuildAttestationInput): CognitiveAttestation;
/**
 * JCS-canonicalize the attestation for signing. Signatures are elided
 * (`signatures: []`) so all signers over the same payload produce the
 * same input bytes regardless of signing order.
 *
 * Returns UTF-8 bytes. To obtain the canonical string, decode with TextDecoder.
 */
export declare function canonicalizeAttestation(att: CognitiveAttestation): Uint8Array;
/**
 * Sign an attestation with a 32-byte Ed25519 seed. Appends a new entry to
 * `signatures`. Returns a new object; never mutates input.
 *
 * The signature covers `canonicalizeAttestation(att)`, i.e. the envelope
 * with `signatures: []`. Additional signers produce byte-identical canonical
 * input, so the signing order does not affect any individual signature.
 */
export declare function signAttestation(att: CognitiveAttestation, privateKey: Uint8Array, signerDid: string, signerRole: SignerRole): CognitiveAttestation;
/**
 * Cross-primitive anchor. Returns lowercase hex sha256 of the full signed
 * envelope (including signatures) under JCS. Use this when an APS action
 * receipt needs to reference a cognitive attestation by content hash.
 *
 * Matches the hashing pattern of other v2 primitives (wallet-binding digest,
 * attribution-primitive canonical hash).
 */
export declare function cognitiveAttestationDigest(att: CognitiveAttestation): string;
export declare function validateAttestationShape(att: unknown): {
    ok: boolean;
    errors: string[];
};
//# sourceMappingURL=envelope.d.ts.map