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; export declare function canonicalizeAttestation(att: CognitiveAttestation): Uint8Array; /** Write-boundary twin of canonicalizeAttestation(). * * Shares one implementation body with canonicalizeAttestation() so the two can never drift apart * on the field list. Emits the same bytes for every value it accepts; the only * difference is that an integer-valued number outside the interoperable IEEE 754 * range is refused instead of serialized. Use at signing and new-write boundaries * ONLY: canonicalizeAttestation() stays unrestricted so an artifact signed before this rule keeps * verifying. */ export declare function canonicalizeAttestationForWrite(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