UNPKG

@atproto/repo

Version:

atproto repo and MST implementation

31 lines 923 B
import { CID } from 'multiformats/cid'; import { RepoRecord } from '@atproto/lexicon'; import { MST } from './mst'; import { ReadableBlockstore } from './storage'; import { Commit, RepoContents } from './types'; type Params = { storage: ReadableBlockstore; data: MST; commit: Commit; cid: CID; }; export declare class ReadableRepo { storage: ReadableBlockstore; data: MST; commit: Commit; cid: CID; constructor(params: Params); static load(storage: ReadableBlockstore, commitCid: CID): Promise<ReadableRepo>; get did(): string; get version(): number; walkRecords(from?: string): AsyncIterable<{ collection: string; rkey: string; cid: CID; record: RepoRecord; }>; getRecord(collection: string, rkey: string): Promise<unknown | null>; getContents(): Promise<RepoContents>; } export {}; //# sourceMappingURL=readable-repo.d.ts.map