ipfs-repo
Version:
IPFS Repo implementation
31 lines • 767 B
TypeScript
/**
*
* @param {import('interface-datastore').Datastore} store
*/
export function version(store: import('interface-datastore').Datastore): {
/**
* Check if a version file exists.
*
*/
exists(): Promise<boolean>;
/**
* Get the current version.
*
* @returns {Promise<number>}
*/
get(): Promise<number>;
/**
* Set the version of the repo, writing it to the underlying store.
*
* @param {number} version
* @returns {Promise<void>}
*/
set(version: number): Promise<void>;
/**
* Check the current version, and returns true if versions matches
*
* @param {number} expected
*/
check(expected: number): Promise<boolean>;
};
//# sourceMappingURL=version.d.ts.map