import { API, NameType } from '@wharfkit/antelope';
import { Signer } from '../eosio/transaction';
export interface StakingAllocationData {
    id: number;
    initial_stake: string;
    tokens_staked: string;
    stake_time: {
        _count: number;
    };
    unstake_time: {
        _count: number;
    };
    unstake_requested: number;
}
export interface StakingAllocation {
    id: number;
    staker: string;
    initialStake: string;
    staked: string;
    yieldSoFar: string;
    stakedTime: Date;
    unstakeableTime: Date;
    unstakeTime: Date;
    releaseTime: Date;
    unstakeRequested: boolean;
    monthlyYield: string;
}
export interface StakingSettingsData {
    current_yield_pool: string;
    yearly_stake_pool: string;
    total_staked: string;
    total_releasing: string;
}
export interface StakingSettings {
    currentYieldPool: string;
    yearlyStakePool: string;
    totalStaked: string;
    totalReleasing: string;
    apy: number;
}
export interface StakingAccountData {
    staker: string;
    total_yield: string;
    last_payout: string;
    payments: number;
    version: number;
}
export interface StakingAccount {
    staker: string;
    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 {
    static singletonInstance: StakingContract;
    contractName: string;
    static getLockedDays: () => number;
    static getReleaseDays: () => number;
    static getMinimumTransfer: () => 1 | 1000;
    static getMaxAllocations: () => 5 | 20;
    static getStakingCycleHours: () => number;
    static MAX_APY: number;
    static STAKING_APY_TARGET: number;
    static STAKING_ESTIMATED_STAKED_PERCENT: number;
    static yearlyStakePool: number;
    static get Instance(): StakingContract;
    constructor(contractName?: string);
    stakeTokens(staker: NameType, quantity: string, 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: string, 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>;
}
//# sourceMappingURL=StakingContract.d.ts.map