import { FarmState, UserState, RewardInfo } from '@kamino-finance/farms-sdk';
import { Address, Instruction, Rpc, SolanaRpcApi, TransactionSigner } from '@solana/kit';
import Decimal from 'decimal.js/decimal';
export declare const FARMS_GLOBAL_CONFIG_MAINNET: Address;
export declare const FARMS_GLOBAL_CONFIG_DEVNET: Address;
export declare const FARMS_ADMIN_MAINNET: Address;
export declare function getFarmStakeIxs(rpc: Rpc<SolanaRpcApi>, user: TransactionSigner, lamportsToStake: Decimal, farmAddress: Address, fetchedFarmState?: FarmState, farmsProgramId?: Address): Promise<Instruction[]>;
export declare function getFarmUserStatePDA(rpc: Rpc<SolanaRpcApi>, user: Address, farm: Address, farmsProgramId?: Address): Promise<Address>;
export declare function getFarmUnstakeIx(rpc: Rpc<SolanaRpcApi>, user: TransactionSigner, lamportsToUnstake: Decimal, farmAddress: Address, fetchedFarmState?: FarmState, farmsProgramId?: Address): Promise<Instruction>;
export declare function getFarmWithdrawUnstakedDepositIx(rpc: Rpc<SolanaRpcApi>, user: TransactionSigner, farm: Address, stakeTokenMint: Address, farmsProgramId?: Address): Promise<Instruction>;
export declare function getFarmUnstakeAndWithdrawIxs(connection: Rpc<SolanaRpcApi>, user: TransactionSigner, lamportsToUnstake: Decimal, farmAddress: Address, fetchedFarmState?: FarmState, farmsProgramId?: Address): Promise<UnstakeAndWithdrawFromFarmIxs>;
export declare function getSetupFarmIxsWithFarm(connection: Rpc<SolanaRpcApi>, farmAdmin: TransactionSigner, farmTokenMint: Address, farmsGlobalConfig?: Address, farmsProgramId?: Address): Promise<SetupFarmIxsWithFarm>;
/**
 * Returns the number of tokens the user has staked in the farm
 * @param connection - the connection to the cluster
 * @param user - the user's public key
 * @param farm - the farm's public key
 * @param farmTokenDecimals - the decimals of the farm token
 * @returns the number of tokens the user has staked in the farm
 */
export declare function getUserSharesInTokensStakedInFarm(rpc: Rpc<SolanaRpcApi>, user: Address, farm: Address, farmTokenDecimals: number, farmsProgramId?: Address): Promise<Decimal>;
export declare function setVaultIdForFarmIx(rpc: Rpc<SolanaRpcApi>, farmAdmin: TransactionSigner, farm: Address, vault: Address, farmsProgramId?: Address): Promise<Instruction>;
/**
 * Returns the number of shares the user has in the farm, in tokens. If less than 1 lamport is staked, returns 0.
 * @param userState - the user's state in the farm
 * @param tokenDecimals - the decimals of the farm token
 * @returns the number of shares the user has in the farm, in tokens
 */
export declare function getSharesInFarmUserPosition(userState: UserState, tokenDecimals: number): Decimal;
export type SetupFarmIxsWithFarm = {
    farm: TransactionSigner;
    setupFarmIxs: Instruction[];
};
export type UnstakeAndWithdrawFromFarmIxs = {
    unstakeIx: Instruction;
    withdrawIx: Instruction;
};
export declare function getRewardPerTimeUnitSecond(reward: RewardInfo, farmTotalStakeLamports: Decimal): Decimal;
/**
 * reads the pending rewards for a user in a vault farm
 * @param rpc - the rpc connection
 * @param userStateAddress - the address of the user state (computed differently depending on farm type)
 * @param farm - the address of the farm
 * @returns a map of the pending rewards per token
 */
export declare function getUserPendingRewardsInFarm(rpc: Rpc<SolanaRpcApi>, userStateAddress: Address, farm: Address, farmsProgramId?: Address): Promise<Map<Address, Decimal>>;
/**
 * This method creates an instruction to update the pending admin of a farm
 * @param rpc - the rpc connection
 * @param signer - the signer of the transaction
 * @param farm - the address of the farm to update
 * @param newPendingAdmin - the new pending admin to set for the farm
 * @returns an instruction to update the pending admin of the farm
 */
export declare function getUpdateFarmPendingAdminIx(rpc: Rpc<SolanaRpcApi>, signer: TransactionSigner, farm: Address, newPendingAdmin: Address, farmsProgramId?: Address): Promise<Instruction>;
//# sourceMappingURL=farm_utils.d.ts.map