UNPKG

@nori-zk/o1js-zk-utils

Version:

o1js-zk-utils supporting Nori Bridge

17 lines 740 B
import { CacheType } from './types.js'; import { fileSystemCacheFactory, readOnlyFileSystemCacheFactory } from './fileSystem.js'; import { networkCacheFactory } from './network.js'; export async function cacheFactory(cacheConfig) { if (cacheConfig.type === CacheType.FileSystem) { return fileSystemCacheFactory(cacheConfig); } else if (cacheConfig.type === CacheType.ReadOnlyFileSystem) { return readOnlyFileSystemCacheFactory(cacheConfig); } else if (cacheConfig.type === CacheType.Network) { return networkCacheFactory(cacheConfig); } throw new Error(`Unrecognized cache config type: ${JSON.stringify(cacheConfig)}`); } export * from './types.js'; //# sourceMappingURL=index.node.js.map