import { digest } from './oci';
import path from 'node:path';
import type { ImageReference, OciImageConfig, OciManifest } from './types';
/**
 * Parse an image reference such as `oven/bun:1.3.10`, `alpine`,
 * `ghcr.io/owner/img@sha256:…`, or `registry.pantry.dev/team/img:tag`.
 */
export declare function parseImageRef(ref: string): ImageReference;
/**
 * Pull an image's manifest, config, and layer blobs into `blobDir`. Tries the
 * pantry registry first for implicit refs, then Docker Hub.
 */
export declare function pullImage(refStr: string, blobDir: string, opts?: { platform?: string, quiet?: boolean }): Promise<PulledImage>;
/**
 * Push an image (config + layers + manifest) to a registry using the OCI
 * distribution monolithic-upload flow. Defaults to the pantry registry.
 */
export declare function pushImage(opts: {
  repository: string
  tag: string
  registry?: string
  configBytes: Buffer
  configDigest: string
  layers: Array<{ digest: string, path: string, size: number }>
  manifestBytes: Buffer
  manifestMediaType: string
  quiet?: boolean
}): Promise<{ ref: string, digest: string }>;
/**
 * Verify a gzipped layer blob on disk matches its digest. Used after pulls.
 */
export declare function verifyBlob(filePath: string, expectedDigest: string): boolean;
/** Extract a gzipped layer tarball into a rootfs dir (system tar). */
export declare function extractLayer(layerGzPath: string, rootfsDir: string): void;
/** Public pantry container registry (override with PANTRY_REGISTRY_URL). */
export declare const PANTRY_REGISTRY: string;
export declare interface PulledImage {
  manifest: OciManifest
  manifestDigest: string
  config: OciImageConfig
  layers: Array<{ digest: string, diffId: string, path: string, size: number }>
  source: string
}
