import { Logger, Metrics, SubgraphDeploymentID } from '@graphprotocol/common-ts'; import { Allocation, IndexerManagementClient, IndexingRuleAttributes, Network, Subgraph, AllocationDecision, GraphNode, Operator, MultiNetworks, NetworkMapped, DeploymentManagementMode, HorizonTransitionValue } from '@graphprotocol/indexer-common'; import { AgentConfigs, NetworkAndOperator } from './types'; export declare const convertSubgraphBasedRulesToDeploymentBased: (rules: IndexingRuleAttributes[], subgraphs: Subgraph[], previousVersionBuffer: number) => IndexingRuleAttributes[]; export declare class Agent { logger: Logger; metrics: Metrics; graphNode: GraphNode; multiNetworks: MultiNetworks; indexerManagement: IndexerManagementClient; offchainSubgraphs: SubgraphDeploymentID[]; deploymentManagement: DeploymentManagementMode; pollingInterval: number; constructor(configs: AgentConfigs); start(): Promise; reconciliationLoop(): void; identifyPotentialDisputes(disputableAllocations: Allocation[], disputableEpoch: number, operator: Operator, network: Network): Promise; reconcileDeployments(activeDeployments: SubgraphDeploymentID[], targetDeployments: SubgraphDeploymentID[], eligibleAllocations: Allocation[]): Promise; identifyExpiringAllocations(logger: Logger, activeAllocations: Allocation[], deploymentAllocationDecision: AllocationDecision, epoch: number, maxAllocationDuration: HorizonTransitionValue, network: Network): Promise; reconcileDeploymentAllocationAction(deploymentAllocationDecision: AllocationDecision, activeAllocations: Allocation[], epoch: number, maxAllocationDuration: HorizonTransitionValue, network: Network, operator: Operator): Promise; reconcileActions(networkDeploymentAllocationDecisions: NetworkMapped, epoch: NetworkMapped, maxAllocationDuration: NetworkMapped): Promise; ensureSubgraphIndexing(deployment: string, networkIdentifier: string): Promise; ensureAllSubgraphsIndexing(network: Network): Promise; } export interface AllocationDecisionInterface { toAllocate: boolean; deployment: SubgraphDeploymentID; } export declare function consolidateAllocationDecisions(allocationDecisions: Record): Set; /** * Resolves the set of target deployments that should be synced by graph-node. * This combines: * 1. Deployments from allocation decisions (where toAllocate=true) * 2. Deployments with OFFCHAIN and ALWAYS decision basis from rules * 3. Deployments from --offchain-subgraphs startup args */ export declare function resolveTargetDeployments(networkDeploymentAllocationDecisions: Record, indexingRules: Record, offchainSubgraphs: SubgraphDeploymentID[]): Set;