import { Allocation, AllocationStatus, Epoch, GraphNode, Subgraph, SubgraphDeployment, NetworkEpoch, BlockPointer, HorizonTransitionValue, Provision, POIData } from '@graphprotocol/indexer-common'; import { GraphHorizonContracts, SubgraphServiceContracts } from '@graphprotocol/toolshed/deployments'; import { Address, Eventual, Logger, SubgraphDeploymentID } from '@graphprotocol/common-ts'; import { HDNodeWallet, Provider } from 'ethers'; import { IndexerOptions } from '../network-specification'; import { SubgraphClient } from '../subgraph-client'; export declare class NetworkMonitor { networkCAIPID: string; private contracts; private indexerOptions; private logger; private graphNode; private networkSubgraph; private ethereum; private epochSubgraph; constructor(networkCAIPID: string, contracts: GraphHorizonContracts & SubgraphServiceContracts, indexerOptions: IndexerOptions, logger: Logger, graphNode: GraphNode, networkSubgraph: SubgraphClient, ethereum: Provider, epochSubgraph: SubgraphClient); poiDisputeMonitoringEnabled(): boolean; currentEpochNumber(): Promise; maxAllocationDuration(): Promise; /** * Returns the amount of free stake for the indexer. * * The free stake is the amount of tokens that the indexer can use to stake in * new allocations. * * Horizon: It's calculated as the difference between the tokens * available in the provision and the tokens already locked allocations. * * Legacy: It's given by the indexer's stake capacity. * * @returns The amount of free stake for the indexer. */ freeStake(): Promise>; /** * Check if the network of the allocation is supported * * (todo-future: check if present in the epoch subgraph) * @param allocation: Allocation to check * @returns network `alias` if the network is supported, `null` otherwise */ allocationNetworkAlias(allocation: Allocation): Promise; allocation(allocationID: string): Promise; allocations(status: AllocationStatus): Promise; provision(indexer: string, dataService: string): Promise; epochs(epochNumbers: number[]): Promise; recentlyClosedAllocations(currentEpoch: number, range: number): Promise; closedAllocations(subgraphDeploymentId: SubgraphDeploymentID): Promise; subgraphs(ids: string[]): Promise; subgraphDeployment(ipfsHash: string): Promise; subgraphDeployments(): Promise; networkCurrentEpoch(): Promise; currentEpoch(networkID: string): Promise; fetchPOIBlockPointer(deploymentNetworkAlias: string, allocation: Allocation): Promise; resolvePOI(allocation: Allocation, poi: string | undefined, publicPOI: string | undefined, blockNumber: number | undefined, force: boolean): Promise; monitorNetworkPauses(logger: Logger, contracts: GraphHorizonContracts & SubgraphServiceContracts, networkSubgraph: SubgraphClient): Promise>; monitorIsOperator(logger: Logger, indexerAddress: Address, wallet: HDNodeWallet): Promise>; monitorIsHorizon(logger: Logger, interval?: number): Promise>; claimableAllocations(disputableEpoch: number): Promise; disputableAllocations(currentEpoch: number, deployments: SubgraphDeploymentID[], minimumAllocation: number): Promise; private isHorizon; private isOperator; private _resolvePOI; private _resolvePOIBlockNumber; private _resolvePublicPOI; private _resolveIndexingStatus; }