import { PublicSignKey } from "@peerbit/crypto"; import { Documents, type DocumentsLike } from "@peerbit/document"; export type RelationResolver = { resolve: (key: PublicSignKey, db: DocumentsLike) => Promise; next: (relation: IdentityRelation) => PublicSignKey; }; export declare const getFromByTo: RelationResolver; export declare const getToByFrom: RelationResolver; export declare const getFromByToLocalOnly: RelationResolver; export declare const getToByFromLocalOnly: RelationResolver; export declare function getPathGenerator(from: PublicSignKey, db: DocumentsLike, resolver: RelationResolver): AsyncGenerator; /** * Get path, to target. * @param start * @param target * @param db * @returns */ export declare const hasPathToTarget: (start: PublicSignKey, target: (key: PublicSignKey) => boolean, db: DocumentsLike, resolver: RelationResolver) => Promise; export declare abstract class AbstractRelation { id: Uint8Array; } export declare class IdentityRelation extends AbstractRelation { _from: PublicSignKey; _to: PublicSignKey; constructor(properties?: { to: PublicSignKey; from: PublicSignKey; }); get from(): PublicSignKey; get to(): PublicSignKey; initializeId(): void; static id(to: PublicSignKey, from: PublicSignKey): Uint8Array; } export declare const hasPath: (start: PublicSignKey, end: PublicSignKey, db: DocumentsLike, resolver: RelationResolver) => Promise; export declare const getRelation: (from: PublicSignKey, to: PublicSignKey, db: DocumentsLike) => Promise; export declare class FromTo { id: Uint8Array; from: string; to: string; constructor(props: IdentityRelation, _context?: any); } export declare const createIdentityGraphStore: (id?: Uint8Array) => Documents; //# sourceMappingURL=identity-graph.d.ts.map