import { CID } from "multiformats/cid";
import { AddResult } from "../../ipfs/index.js";
import { Puttable, SimpleLink, SimpleLinks, UnixTree } from "../types.js";
import { DistinctivePath } from "../../path.js";
import { Permissions } from "../../ucan/permissions.js";
import * as versions from "../versions.js";
import BareTree from "../bare/tree.js";
import MMPT from "../protocol/private/mmpt.js";
import PrivateTree from "../v1/PrivateTree.js";
import PrivateFile from "../v1/PrivateFile.js";
declare type PrivateNode = PrivateTree | PrivateFile;
export default class RootTree implements Puttable {
    links: SimpleLinks;
    mmpt: MMPT;
    privateLog: Array<SimpleLink>;
    sharedCounter: number;
    sharedLinks: SimpleLinks;
    publicTree: UnixTree & Puttable;
    prettyTree: BareTree;
    privateNodes: Record<string, PrivateNode>;
    constructor({ links, mmpt, privateLog, sharedCounter, sharedLinks, publicTree, prettyTree, privateNodes }: {
        links: SimpleLinks;
        mmpt: MMPT;
        privateLog: Array<SimpleLink>;
        sharedCounter: number;
        sharedLinks: SimpleLinks;
        publicTree: UnixTree & Puttable;
        prettyTree: BareTree;
        privateNodes: Record<string, PrivateNode>;
    });
    static empty({ rootKey, wnfsWasm }: {
        rootKey: string;
        wnfsWasm?: boolean;
    }): Promise<RootTree>;
    static fromCID({ cid, permissions }: {
        cid: CID;
        permissions?: Permissions;
    }): Promise<RootTree>;
    put(): Promise<CID>;
    putDetailed(): Promise<AddResult>;
    updateLink(name: string, result: AddResult): this;
    updatePuttable(name: string, puttable: Puttable): Promise<this>;
    static storeRootKey(rootKey: string): Promise<void>;
    static retrieveRootKey(): Promise<string>;
    findPrivateNode(path: DistinctivePath): [DistinctivePath, PrivateNode | null];
    static LOG_CHUNK_SIZE: number;
    addPrivateLogEntry(cid: CID): Promise<void>;
    addShares(links: SimpleLink[]): Promise<this>;
    static getSharedLinks(cid: CID): Promise<SimpleLinks>;
    setSharedCounter(counter: number): Promise<number>;
    bumpSharedCounter(): Promise<number>;
    setVersion(v: versions.SemVer): Promise<this>;
    getVersion(): Promise<versions.SemVer | null>;
}
export {};
