UNPKG

@nori-zk/o1js-zk-utils

Version:

o1js-zk-utils supporting Nori Bridge

16 lines 689 B
import { CacheType } from './types.js'; import { networkCacheFactory } from './network.js'; export async function cacheFactory(cacheConfig) { if (cacheConfig.type === CacheType.FileSystem) { throw new Error('FileSystem cache is only available in Node.js'); } else if (cacheConfig.type === CacheType.ReadOnlyFileSystem) { throw new Error('ReadOnlyFileSystem cache is only available in Node.js'); } 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.js.map