import type { ProtocolContracts } from '../types/index.js'; import type { KnownDeployment } from './deployments.js'; export type IndexerDeployment = ProtocolContracts & { chainId?: string; centrifugeId?: string; }; export type IndexerDeploymentResponse = { blockchains: { items: { id: string; centrifugeId: string; name: string; icon?: string; }[]; }; deployments: { items: IndexerDeployment[]; }; }; export declare class DeploymentMismatchError extends Error { centrifugeId: number; field: string; expected: string; actual: string; name: string; constructor(centrifugeId: number, field: string, expected: string, actual: string); } export declare class UnknownDeploymentError extends Error { centrifugeId: number; name: string; constructor(centrifugeId: number); } export type VerifyOptions = { /** * If true, allow indexer-reported deployments for centrifugeIds not present in the * bundled allowlist. They will be returned unverified. Default: false (strict). * * Strict mode is the secure default — an attacker adding a fake centrifugeId to a * compromised indexer cannot slip past it. Permissive mode is useful only when the * SDK predates a legitimate new chain deployment. */ allowUnknownDeployments?: boolean; }; /** * Verifies an indexer deployment response against the bundled KNOWN_DEPLOYMENTS allowlist. * * For each indexer-returned deployment, looks up the expected record by centrifugeId * and asserts every contract address field matches (case-insensitive). Throws on the * first mismatch. Returns the response unchanged on success. * * If the bundled allowlist is empty (e.g. on first commit before `pnpm gen:deployments` * has been run), verification is skipped with a warning. This avoids breaking dev/test * before the allowlist is populated, but should never happen in a published release — * the gen-deployments step is a release prerequisite. */ export declare function verifyDeployments(data: IndexerDeploymentResponse, allowlist: Record, options?: VerifyOptions): IndexerDeploymentResponse; //# sourceMappingURL=verifyDeployments.d.ts.map