/**
 * @file Checksum file fetching + parsing for download verification.
 *   `parseChecksums` understands the three common file shapes:
 *
 *   - BSD style: `SHA256 (filename) = hash`
 *   - GNU style: `hash filename` (two spaces)
 *   - Simple: `hash filename` (single space) Comment lines (`#…`) and blank lines
 *     are skipped. Hashes are lowercased. `fetchChecksums` is the URL helper —
 *     it fetches a checksums file via `httpRequest` and runs the body through
 *     `parseChecksums`. The pair lets `httpDownload({ sha256:
 *     checksums['file.zip'] })` keep the verification logic close to the
 *     manifest source.
 */
import type { Checksums, FetchChecksumsOptions } from './download-types';
/**
 * Fetch and parse a checksums file from a URL.
 *
 * This is useful for verifying downloads from GitHub releases which typically
 * publish a checksums.txt file alongside release assets.
 *
 * @example
 *   ;```ts
 *   // Fetch checksums from GitHub release
 *   const checksums = await fetchChecksums(
 *     'https://github.com/org/repo/releases/download/v1.0.0/checksums.txt',
 *   )
 *
 *   // Use with httpDownload
 *   await httpDownload(
 *     'https://github.com/org/repo/releases/download/v1.0.0/tool_linux.tar.gz',
 *     '/tmp/tool.tar.gz',
 *     { sha256: checksums['tool_linux.tar.gz'] },
 *   )
 *   ```
 *
 * @param url - URL to the checksums file.
 * @param options - Request options.
 *
 * @returns Map of filenames to lowercase SHA256 hashes
 *
 * @throws {Error} When the checksums file cannot be fetched
 */
export declare function fetchChecksums(url: string, options?: FetchChecksumsOptions | undefined): Promise<Checksums>;
/**
 * Parse a checksums file text into a filename-to-hash map.
 *
 * Supports standard checksums file formats: - BSD style: "SHA256 (filename) =
 * hash" - GNU style: "hash filename" (two spaces) - Simple style: "hash
 * filename" (single space)
 *
 * Lines starting with '#' are treated as comments and ignored. Empty lines are
 * ignored.
 *
 * @example
 *   ```ts
 *   const text = `
 *   # SHA256 checksums
 *   e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  file.zip
 *   abc123def456...  other.tar.gz
 *   `
 *   const checksums = parseChecksums(text)
 *   console.log(checksums['file.zip']) // 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
 *   ```
 *
 * @param text - Raw text content of a checksums file.
 *
 * @returns Map of filenames to lowercase SHA256 hashes
 */
export declare function parseChecksums(text: string): Checksums;
