@dstanesc/o-o-o-o-o-o-o
Version:
O-O-O-O-O-O-O is a collection of content addressed persistent data structures
22 lines • 697 B
TypeScript
interface BlockStore {
put: (block: {
cid: any;
bytes: Uint8Array;
}) => Promise<void>;
get: (cid: any) => Promise<Uint8Array>;
}
interface MemoryBlockStore extends BlockStore {
content: () => Set<string>;
diff: (otherStore: BlockStore) => {
missingLocal: Set<string>;
missingOther: Set<string>;
intersection: Set<string>;
};
push: (otherStore: BlockStore) => Promise<void>;
countReads: () => number;
resetReads: () => void;
size: () => number;
}
declare const memoryBlockStoreFactory: () => MemoryBlockStore;
export { BlockStore, MemoryBlockStore, memoryBlockStoreFactory };
//# sourceMappingURL=block-store.d.ts.map