This section contains SDK example for claiming rewards in Farm
Claim rewards from Farm NFT
import TonWeb from"tonweb";import { FARM } from"@ston-fi/sdk";constfarm=newFARM.v3.NftItem({ tonApiClient:newTonWeb.HttpProvider(), address:"EQA18JnBVNZZ8Wz-Kn6Mc5cy9pv798Pn8tfScjKw9NLPK3U2",// Farm v3 nft address});// Claim occurred farming rewards from the NFT to the owner's walletconsttxParams=farm.buildClaimRewardsTxParams({ queryId:12345,});// To execute the transaction, you need to send a transaction to the blockchain.// This code will be different based on the wallet you are using to send the tx from// logging is used for demonstration purposesconsole.log({ to:txParams.to, amount:txParams.gasAmount, payload:txParams.payload,});