/**
 * Content Hashing - SHA256 hashing for conflict detection
 *
 * Computes content hashes for elements to detect actual content changes
 * during merge operations. Excludes identity and attribution fields.
 *
 * NOTE: metadata._externalSync is stripped before hashing. These sync
 * bookkeeping fields (lastPushedAt, lastPushedHash, etc.) change after
 * every push and would otherwise create a feedback loop where each push
 * changes the hash, triggering another push on the next daemon cycle.
 */
import type { Element } from '@stoneforge/core';
import type { ContentHashResult } from './types.js';
/**
 * Compute content hash for an element
 *
 * Hash computation:
 * 1. Collect content fields (exclude identity/attribution)
 * 2. Sort object keys for determinism
 * 3. JSON stringify
 * 4. Prepend type for type-specific hashing
 * 5. SHA256 hash
 *
 * @param element - Element to hash
 * @returns Hash result with hex-encoded SHA256 hash
 */
export declare function computeContentHash(element: Element): Promise<ContentHashResult>;
/**
 * Compute content hash synchronously using Node.js crypto
 *
 * Works in both Bun and Node.js runtimes.
 *
 * @param element - Element to hash
 * @returns Hash result with hex-encoded SHA256 hash
 */
export declare function computeContentHashSync(element: Element): ContentHashResult;
/**
 * Check if two elements have the same content hash
 *
 * @param a - First element
 * @param b - Second element
 * @returns True if content hashes match
 */
export declare function hasSameContentHash(a: Element, b: Element): boolean;
/**
 * Compare pre-computed hash with element
 *
 * @param element - Element to check
 * @param expectedHash - Expected hash value
 * @returns True if hash matches
 */
export declare function matchesContentHash(element: Element, expectedHash: string): boolean;
//# sourceMappingURL=hash.d.ts.map