⛏️claimRewards
Description
The claimRewards
function allows a user to claim their rewards from a reward pool for a specific stake.
Parameters
stakeId
number
The ID of the stake for which the user wants to claim rewards
amount
string
The amount of rewards the user wants to claim. The amount should be in ether format, such as '0.01'.
privateKey
string
The private key of the user's wallet.
Response
receipt
object
The receipt object that contains the transaction hash and other details of the transaction that claimed rewards.
Example Request and Response
Prerequisites
Before making requests with Nest SDK, you must have it installed.
You can install Nest SDK using either npm
or yarn
. Use the following commands to install Nest SDK:
Request
Here is an example of how to make a claimRewards
request using the Nest SDK:
Response
Use Cases
Crypto Staking Platforms: The claimRewards function can be used by crypto staking platforms to allow users to claim their rewards from the reward pool for their specific stake.
Decentralized Finance (DeFi) Applications: The function can be used by DeFi applications that offer staking as one of their services, allowing users to claim their rewards from the reward pool.
Crypto Wallets: The claimRewards function can be used by crypto wallets that support staking to enable their users to claim their rewards.
Last updated