UNPKG

@reclaimprotocol/zk-symmetric-crypto

Version:
25 lines (24 loc) 816 B
import type { FileFetch, Logger } from './types.ts'; export type MakeRemoteFileFetchOpts = { baseUrl?: string; maxRetries?: number; logger?: Logger; }; export type MakeLocalFileFetchOpts = { basePath?: string; }; /** * Fetches ZK resources from a remote server. * Assumes the structure of the resources is: * BASE_URL/{engine}/{filename} * * By default, it uses the resources from a specific commit * of the `zk-symmetric-crypto` repository. */ export declare function makeRemoteFileFetch({ baseUrl, maxRetries, logger }?: MakeRemoteFileFetchOpts): FileFetch; /** * Fetches ZK resources from the local file system. * Assumes the structure of the resources is: * BASE_PATH/{engine}/{filename} */ export declare function makeLocalFileFetch({ basePath }?: MakeLocalFileFetchOpts): FileFetch;