/// import { BlockAssets, MethodContext, ImmutableMethodContext } from '../../state_machine'; import { Validator } from '../../state_machine/types'; import { JSONObject } from '../../types'; import { ModuleConfig as RewardModuleConfig } from '../reward/types'; export interface ModuleConfig extends RewardModuleConfig { factorMinimumRewardActiveValidators: number; } export type ModuleConfigJSON = JSONObject; export interface TokenMethod { mint(methodContext: MethodContext, address: Buffer, id: Buffer, amount: bigint): Promise; userSubstoreExists(methodContext: ImmutableMethodContext, address: Buffer, tokenID: Buffer): Promise; } export interface RandomMethod { isSeedRevealValid(methodContext: ImmutableMethodContext, generatorAddress: Buffer, assets: BlockAssets): Promise; } export interface ValidatorsMethod { getGeneratorsBetweenTimestamps(methodContext: ImmutableMethodContext, startTimestamp: number, endTimestamp: number): Promise>; getValidatorsParams(methodContext: ImmutableMethodContext): Promise<{ preCommitThreshold: bigint; certificateThreshold: bigint; validators: Validator[]; }>; } export interface PoSMethod { getRoundLength(methodContext: ImmutableMethodContext): number; updateSharedRewards(methodContext: MethodContext, generatorAddress: Buffer, tokenID: Buffer, reward: bigint): Promise; isEndOfRound(methodContext: ImmutableMethodContext, height: number): Promise; } export interface DefaultReward { reward: string; } export interface GetExpectedValidatorRewardsResponse { blockReward: string; dailyReward: string; monthlyReward: string; yearlyReward: string; }