> For the complete documentation index, see [llms.txt](https://docs.tokensfarm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokensfarm.com/for-developers/integrate-tokensfarm/tokensfarm-contract-interface.md).

# TokensFarm Contract Interface

```solidity
interface ITokensFarm {
    function deposit(uint256 _amount) external;
    function withdraw(uint256 _amount, uint256 stakeId) external;
    function getUserStakesAndPendingAmounts(address user) external view;
    function getTotalRewardsLockedUnlocked() external view returns (uint256, uint256);
    function deposited(address _user, uint256 stakeId) public view;
    function pending(address _user, uint256 stakeId) public view;
    function totalPending() external view;
    function getNumberOfUserStakes(address user) external view;
    function fund(uint256 _amount) external;
    function emergencyWithdraw(uint256 stakeId) external;
    function updatePool() public;
    function depositTimestamp(address _user, uint256 stakeId) public view;
    function withdrawTimestamp(address _user, uint256 stakeId) public view;
}
```
