import BN from 'bn.js'; import { Client } from '../client'; import { Contract } from '../contract'; import { Address } from '../address'; export declare enum DelegationState { BONDING = 0, BONDED = 1, UNBONDING = 2, REDELEGATING = 3 } export declare enum LockTimeTier { Tier0 = 0, Tier1 = 1, Tier2 = 2, Tier3 = 3 } export interface ICandidate { pubKey: Uint8Array; address: Address; fee: BN; newFee: BN; feeDelayCounter: BN; name: string; description: string; website: string; } export interface IValidator { address: Address; pubKey: Uint8Array; upblockCount: number; blockCount: number; slashPct: BN; distributionTotal: BN; delegationTotal: BN; whitelistAmount: BN; whitelistLockTime: BN; } export interface IDelegation { validator: Address; updateValidator?: Address; delegator: Address; height: BN; amount: BN; updateAmount: BN; lockTime: number; lockTimeTier: number; state: DelegationState; } 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 DPOS2 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>; checkDelegatorDelegations(delegator: Address): Promise; checkDistributionAsync(owner: Address): Promise; totalDelegationAsync(delegator: Address): Promise; checkDelegationAsync(validator: Address, delegator: Address): Promise; claimDistributionAsync(withdrawalAddress: 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, referrer?: string): Promise; unbondAsync(validator: Address, amount: BN | number | string): Promise; private getDelegation; }