import { API, Name, NameType, AssetType, Action, Asset, TimePoint, UInt32, Int32, UInt64 } from '@wharfkit/antelope';
import { Signer } from '../eosio/transaction';
import { Contract } from './Contract';
import { ActionOptions } from '@wharfkit/contract';
export interface StakingAllocationRaw {
    id: UInt64;
    initial_stake: Asset;
    tokens_staked: Asset;
    stake_time: TimePoint;
    unstake_time: TimePoint;
    unstake_requested: boolean;
}
export interface StakingAllocation {
    id: number;
    staker: Name;
    initialStake: string;
    staked: string;
    yieldSoFar: string;
    stakedTime: Date;
    unstakeableTime: Date;
    unstakeTime: Date;
    releaseTime: Date;
    unstakeRequested: boolean;
    monthlyYield: string;
}
export interface StakingSettingsRaw {
    current_yield_pool: Asset;
    yearly_stake_pool: Asset;
    total_staked: Asset;
    total_releasing: Asset;
}
export interface StakingSettings {
    currentYieldPool: string;
    yearlyStakePool: string;
    totalStaked: string;
    totalReleasing: string;
    apy: number;
}
export interface StakingAccountRaw {
    staker: Name;
    total_yield: Asset;
    last_payout: TimePoint;
    payments: UInt32;
    version: Int32;
}
export interface StakingAccount {
    staker: Name;
    totalYield: string;
    lastPayout: Date;
    payments: number;
    version: number;
}
export interface StakingAccountState extends StakingAccount {
    allocations: StakingAllocation[];
    totalStaked: number;
    totalUnlockable: number;
    totalUnlocking: number;
    estimatedMonthlyYield: number;
    settings: StakingSettings;
}
export declare class StakingContract extends Contract {
    static isTestEnv: () => boolean;
    static getLockedDays: () => number;
    static getReleaseDays: () => number;
    static getMinimumTransfer: () => number;
    static getMaxAllocations: () => number;
    static getStakingCycleHours: () => number;
    static MAX_APY: number;
    static STAKING_APY_TARGET: number;
    static STAKING_ESTIMATED_STAKED_PERCENT: number;
    static yearlyStakePool: number;
    static fromAbi(abi: any, account?: NameType): StakingContract;
    static atAccount(account?: NameType): Promise<StakingContract>;
    actions: {
        stakeTokens: (data: {
            accountName: NameType;
            quantity: AssetType;
        }, authorization?: ActionOptions) => Action;
        requestUnstake: (data: {
            accountName: NameType;
            allocationId: number;
        }, authorization?: ActionOptions) => Action;
        releaseToken: (data: {
            accountName: NameType;
            allocationId: number;
        }, authorization?: ActionOptions) => Action;
        cron: (authorization?: ActionOptions) => Action;
        resetAll: (authorization?: ActionOptions) => Action;
        addYield: (data: {
            sender: NameType;
            quantity: AssetType;
        }, authorization?: ActionOptions) => Action;
        setSettings: (data: {
            yearlyStakePool: string;
        }, authorization?: ActionOptions) => Action;
    };
    stakeTokens(staker: NameType, quantity: AssetType, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    requestUnstake(staker: NameType, allocationId: number, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    releaseToken(staker: NameType, allocationId: number, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    cron(signer: Signer): Promise<API.v1.PushTransactionResponse>;
    resetAll(signer: Signer): Promise<API.v1.PushTransactionResponse>;
    addYield(sender: NameType, quantity: AssetType, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    setSettings(yearlyStakePool: string, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    private getAllocationsData;
    /**
     * Get staking allocation details with improved types and calculated monthly yield.
     * @param staker - account name.
     * @param settings - current staking settings (including APY).
     */
    getAllocations(staker: NameType, settings: StakingSettings): Promise<StakingAllocation[]>;
    private getSettingsData;
    /**
     * Get staking settings with improved types and calculated APY.
     *
     * Calculated APY = min(yearlyStakePool / totalStaked, 2.0).
     * (If totalStaked is zero, APY is zero.)
     */
    getSettings(): Promise<StakingSettings>;
    private getAccountData;
    getAccount(account: NameType): Promise<StakingAccount>;
    /**
     * Returns full staking data for an account including:
     * - Typed staking account info.
     * - An array of typed allocations.
     * - Aggregated metrics:
     *    • estimatedMonthlyYield: Sum of monthly yields from active allocations.
     *    • lastPayout: Last time the account received a payout.
     *    • version: Account version.
     *    • totalYield: Total yield from all allocations.
     *    • totalStaked: Sum of active (non-unstaking) allocation amounts.
     *    • totalMonthlyYield: Sum of monthly yields from active allocations.
     *    • totalUnlockable: Sum of allocations that have completed the release period.
     *    • totalUnlocking: Sum of allocations still within the release period.
     */
    getAccountState(account: NameType): Promise<StakingAccountState>;
    calculateMonthlyYield(amount: number, settings: StakingSettings): Promise<number>;
}
export declare const getStakingContract: () => StakingContract;
//# sourceMappingURL=StakingContract.d.ts.map