import BN from 'bn.js'; import { Client } from '../client'; import { Contract } from '../contract'; import { Address } from '../address'; import { LocktimeTier, DelegationState, CandidateState, DowntimeRecord } from '../proto/dposv3_pb'; export interface IState { maxYearlyRewards: BN; totalWeightedAmountStaked: BN; minCandidateFee: number; } export interface ICandidate { address: Address; pubKey: Uint8Array; delegationTotal: BN; slashPercentage: BN; whitelistAmount: BN; whitelistLocktimeTier: LocktimeTier; maxReferralPercentage?: number; fee: BN; newFee: BN; candidateState: CandidateState; name: string; description: string; website: string; } export interface IValidator { address: Address; recentlyMissedBlocks: number; slashPercentage: BN; delegationTotal: BN; whitelistAmount: BN; whitelistLocktimeTier: LocktimeTier; jailed: boolean; } export interface IDelegation { validator: Address; updateValidator?: Address; delegator: Address; index: number; amount: BN; updateAmount: BN; lockTime: number; lockTimeTier: LocktimeTier; state: DelegationState; referrer: string; } export interface ITotalDelegation { amount: BN; weightedAmount: BN; } export interface ICandidateDelegations { delegationTotal: BN; delegationsArray: Array; } export interface IDelegatorDelegations { amount: BN; weightedAmount: BN; delegationsArray: Array; } export declare class DPOS3 extends Contract { static createAsync(client: Client, callerAddr: Address): Promise; constructor(params: { contractAddr: Address; callerAddr: Address; client: Client; }); getTimeUntilElectionAsync(): Promise; getCandidatesAsync(): Promise>; getValidatorsAsync(): Promise>; getDelegations(candidate: Address): Promise; getAllDelegations(): Promise>; checkAllDelegationsAsync(delegator: Address): Promise; checkDelegationAsync(validator: Address, delegator: Address): Promise; registerCandidateAsync(pubKey: string, fee: BN, name: string, description: string, website: string, tier: LocktimeTier): Promise; unregisterCandidateAsync(): Promise; delegateAsync(validator: Address, amount: BN, tier: LocktimeTier, referrer?: string): Promise; redelegateAsync(oldValidator: Address, validator: Address, amount: BN, index: number, referrer?: string): Promise; consolidateDelegations(validator: Address): Promise; unbondAsync(validator: Address, amount: BN | number | string, index: number): Promise; claimDelegatorRewardsAsync(): Promise; checkDelegatorRewardsAsync(delegator: Address): Promise; getStateAsync(): Promise; private getDelegation; updateCandidateInfoAsync(name: string, description: string, website: string, maxReferralPercentage: number): Promise; changeFeeAsync(fee: number): Promise; getDowntimeRecordAsync(validator: Address): Promise; unjailAsync(validator?: Address): Promise; }