/**
 * Literal tag for envelope discrimination at the wire level.
 */
export type MemoryProvenanceSignalType = 'memory_provenance';
/**
 * The source sub-object inside a memory_provenance envelope. Identifies
 * who issued the original source content, when it was issued, the hash
 * of the source bytes (pre-transformation), and a reference to the
 * transformation spec that was applied before storing in memory.
 *
 * Invariants:
 *   - issuer_id is Ed25519 public key as 64 lowercase hex chars.
 *   - issued_at is an ISO 8601 timestamp string.
 *   - source_ref is sha256 hex (64 lowercase chars) of the original
 *     source content bytes.
 *   - reduction_map_ref is a non-empty string identifier or URL
 *     pointing at the transformation spec. v0.1 does not constrain its
 *     syntax; v0.2 will likely tighten this.
 */
export interface MemoryProvenanceSource {
    readonly issuer_id: string;
    readonly issued_at: string;
    readonly source_ref: string;
    readonly reduction_map_ref: string;
}
/**
 * Signed memory_provenance envelope.
 *
 * Invariants:
 *   - signal_type is the literal 'memory_provenance'.
 *   - memory_ref is sha256 hex (64 lowercase chars) of the memory entry
 *     AFTER any transformation declared by source.reduction_map_ref.
 *   - source carries the four MemoryProvenanceSource fields. All four
 *     are required.
 *   - ingester_id is the Ed25519 public key (64 lowercase hex chars) of
 *     the agent that committed this entry to memory. It MUST match the
 *     key used to produce the signature.
 *   - ingested_at is the ISO 8601 timestamp at which the agent
 *     committed the memory entry.
 *   - signature is the Ed25519 signature over the JCS-canonical form of
 *     the envelope with the signature field set to the empty string.
 *     128 lowercase hex chars when present.
 */
export interface MemoryProvenanceEnvelope {
    readonly signal_type: MemoryProvenanceSignalType;
    readonly memory_ref: string;
    readonly source: MemoryProvenanceSource;
    readonly ingester_id: string;
    readonly ingested_at: string;
    readonly signature: string;
}
/**
 * Unsigned envelope shape. Same fields as MemoryProvenanceEnvelope
 * minus the signature; signMemoryProvenance accepts this and returns a
 * fully populated envelope.
 */
export type UnsignedMemoryProvenanceEnvelope = Omit<MemoryProvenanceEnvelope, 'signature'>;
/**
 * Result of verifying an envelope.
 *
 * Reason codes:
 *   - SHAPE_INVALID: signal_type missing or wrong, memory_ref missing
 *     or not 64 lowercase hex chars, top-level object missing.
 *   - INGESTER_ID_INVALID_FORMAT: ingester_id missing or not 64
 *     lowercase hex chars.
 *   - TIMESTAMP_FORMAT_INVALID: ingested_at or source.issued_at not a
 *     parseable ISO 8601 string.
 *   - MISSING_SOURCE_FIELDS: source not an object, or source.issuer_id,
 *     source.reduction_map_ref missing or malformed in non-timestamp
 *     non-hash ways.
 *   - SOURCE_HASH_INVALID_FORMAT: source.source_ref missing or not 64
 *     lowercase hex chars.
 *   - SIGNATURE_INVALID: signature field missing, malformed, or Ed25519
 *     verification fails against ingester_id.
 */
export interface MemoryProvenanceVerifyResult {
    readonly valid: boolean;
    readonly reason?: MemoryProvenanceVerifyReason;
}
export type MemoryProvenanceVerifyReason = 'SHAPE_INVALID' | 'INGESTER_ID_INVALID_FORMAT' | 'SIGNATURE_INVALID' | 'MISSING_SOURCE_FIELDS' | 'TIMESTAMP_FORMAT_INVALID' | 'SOURCE_HASH_INVALID_FORMAT';
/**
 * Returns true when value is a syntactically well-formed ISO 8601
 * timestamp string. Checks the lexical form and that Date.parse yields
 * a finite value, which together reject malformed dates such as
 * impossible months or days.
 */
export declare function isIso8601(value: unknown): value is string;
/**
 * Validates the source sub-object shape. Does NOT check that source_ref
 * matches any actual content; the consumer carries that.
 */
export declare function isMemoryProvenanceSource(value: unknown): value is MemoryProvenanceSource;
/**
 * Runtime type guard. Returns true when value is structurally a signed
 * memory_provenance envelope. Does NOT verify the signature; use
 * verifyMemoryProvenance for that.
 *
 * Invariants checked:
 *   - signal_type literal matches.
 *   - memory_ref is 64 lowercase hex chars.
 *   - source has all four required fields with valid shapes.
 *   - ingester_id is 64 lowercase hex chars.
 *   - ingested_at is a valid ISO 8601 timestamp string.
 *   - signature is 128 lowercase hex chars.
 */
export declare function isMemoryProvenance(value: unknown): value is MemoryProvenanceEnvelope;
//# sourceMappingURL=types.d.ts.map