import { Earthstar } from "../../deps.js"; import { IReplicaServerExtension } from "./extension.js"; /** * - `knownSharesPath`: The path where the known shares (a JSON array of share addresses) is located. * - `onCreateReplica`: A callback used to create the replicas in the known shares list. Mostly useful for choosing how you'd like your shares to be persisted, e.g. probably by Sqlite. */ interface ExtensionKnownSharesOpts { knownSharesPath: string; onCreateReplica: (shareAddress: string) => Earthstar.IReplica; } /** An extension for populating a replica server with known shares. Use this to specify which shares you'd like your replica server to sync with others. * * You most likely want to pass this as the first extension to your replica server. */ export declare class ExtensionKnownShares implements IReplicaServerExtension { private peer; private knownSharesPath; private onCreateReplica; constructor(opts: ExtensionKnownSharesOpts); register(peer: Earthstar.Peer): Promise; handler(): Promise; } export {};