import { MixNodeBond } from "../types"; import { INetClient } from "../net-client"; import { IQueryClient } from "../query-client"; export { MixnodesCache }; /** * There are serious limits in smart contract systems, but we need to keep track of * potentially thousands of nodes. MixnodeCache instances repeatedly make requests for * paged data about what mixnodes exist, and keep them locally in memory so that they're * available for querying. * */ export default class MixnodesCache { mixNodes: MixNodeBond[]; client: INetClient | IQueryClient; perPage: number; constructor(client: INetClient | IQueryClient, perPage: number); refreshMixNodes(contractAddress: string): Promise; refreshValidatorAPIMixNodes(urls: string[]): Promise; }