import { CID } from "multiformats";
import { IPFS } from "ipfs-core-types";
import { PublicDirectory, PublicFile } from "wnfs";
import { FileContent } from "../../ipfs/index.js";
import { Path } from "../../path.js";
import { AddResult } from "../../ipfs/index.js";
import { UnixTree, Puttable, File, Links, PuttableUnixTree } from "../types.js";
import { BlockStore } from "./IpfsBlockStore.js";
import { BaseFile } from "../base/file.js";
import { Metadata } from "../metadata.js";
export declare class PublicRootWasm implements UnixTree, Puttable {
    root: Promise<PublicDirectory>;
    lastRoot: PublicDirectory;
    store: BlockStore;
    ipfs: IPFS;
    readOnly: boolean;
    constructor(root: PublicDirectory, store: BlockStore, ipfs: IPFS, readOnly: boolean);
    static empty(ipfs: IPFS): Promise<PublicRootWasm>;
    static fromCID(ipfs: IPFS, cid: CID): Promise<PublicRootWasm>;
    private atomically;
    private withError;
    ls(path: Path): Promise<Links>;
    mkdir(path: Path): Promise<this>;
    cat(path: Path): Promise<FileContent>;
    add(path: Path, content: FileContent): Promise<this>;
    rm(path: Path): Promise<this>;
    mv(from: Path, to: Path): Promise<this>;
    get(path: Path): Promise<PuttableUnixTree | File | null>;
    exists(path: Path): Promise<boolean>;
    historyStep(): Promise<PublicDirectory>;
    put(): Promise<CID>;
    putDetailed(): Promise<AddResult>;
}
export declare class PublicDirectoryWasm implements UnixTree, Puttable {
    readOnly: boolean;
    private directory;
    private publicRoot;
    private cachedDir;
    constructor(readOnly: boolean, directory: string[], publicRoot: PublicRootWasm, cachedDir: PublicDirectory);
    private checkMutability;
    private updateCache;
    get header(): {
        metadata: Metadata;
        previous?: CID;
    };
    ls(path: Path): Promise<Links>;
    mkdir(path: Path): Promise<this>;
    cat(path: Path): Promise<FileContent>;
    add(path: Path, content: FileContent): Promise<this>;
    rm(path: Path): Promise<this>;
    mv(from: Path, to: Path): Promise<this>;
    get(path: Path): Promise<PuttableUnixTree | File | null>;
    exists(path: Path): Promise<boolean>;
    put(): Promise<CID>;
    putDetailed(): Promise<AddResult>;
}
export declare class PublicFileWasm extends BaseFile {
    private directory;
    private filename;
    private publicRoot;
    private cachedFile;
    constructor(content: FileContent, directory: string[], filename: string, publicRoot: PublicRootWasm, cachedFile: PublicFile);
    private updateCache;
    get header(): {
        metadata: Metadata;
        previous?: CID;
    };
    updateContent(content: FileContent): Promise<this>;
    putDetailed(): Promise<AddResult>;
}
