import { c as ProvableCredentialStore } from './provableApi-BTVe8yl5.js'; import '@provablehq/veil-core'; import '@provablehq/sdk'; /** * Builds a credential store backed by a JSON file. * * Applies to bots, scripts, servers, and CI — anything holding a private key * directly and able to write to disk. The file is written with mode `0600` * because it holds an API key the Provable API issues exactly once and cannot * reissue. A missing file reads as "not registered yet", so the first run * registers a consumer and writes it, and later runs reuse it. * * @param path Path to the JSON file. Parent directories are created on write. * @returns A store reading and writing that file. * @throws From `load` when the file exists but cannot be read or parsed. Only an * absent file counts as "not registered": any other failure could otherwise * register a replacement consumer and abandon the unreissuable key in that * file. * @throws From `save` when the write fails — a swallowed failure would orphan a * consumer whose key is unrecoverable, so it propagates and fails the call * that triggered registration. * * @example * import { fileCredentialStore } from '@provablehq/veil-aleo-sdk/node' * * const { walletClient } = aleo.createAleoClient({ * privateKey, networkUrl, proverUrl, records: scanner, * credentialStore: fileCredentialStore('./.provable-credentials.json'), * }) */ declare function fileCredentialStore(path: string): ProvableCredentialStore; export { fileCredentialStore };