import type { CID } from "multiformats/cid"; import { Maybe } from "../../common/index.js"; import { FileHeader } from "../protocol/public/types.js"; export declare type Node = { fromCID: (cid: CID) => Promise; header: Pick; }; export default class PublicHistory { readonly node: Node; constructor(node: Node); /** * Go back one or more versions. * * @param delta Optional negative number to specify how far to go back */ back(delta?: number): Promise>; /** * Get a version before a given timestamp. * * @param timestamp Unix timestamp in seconds */ prior(timestamp: number): Promise>; /** * List earlier versions along with the timestamp they were created. */ list(amount?: number): Promise>; /** * @internal */ static _getPreviousVersion(node: Node): Promise>; /** * @internal */ static _prior(node: Node, timestamp: number): Promise>; }