⛏️createStake
Last updated
Last updated
The createStake
function creates a new stake in a staking contract on the blockchain.
It takes in several parameters including the amount of cryptocurrency to be staked, the duration of the stake, whether the stake is a liquidity provider (LP) stake and the user's private key
Name | Type | Description |
---|---|---|
Property | Type | Description |
---|---|---|
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:
Here is an example of how to make a createStake
request using the Nest SDK:
Crypto Staking Platforms: The function can be used by crypto staking platforms to allow users to create new stakes in staking contracts on the blockchain.
Decentralized Finance (DeFi) Applications: The function can be used by DeFi applications to enable users to stake their cryptocurrency and earn rewards on the blockchain.
Cryptocurrency Wallets: The function can be used by cryptocurrency wallets to allow users to stake their cryptocurrency directly from their wallets.
amount
string
The amount of tokens to be staked.
duration
string
The duration of the stake in seconds
isLp
string
Whether the stake is an LP stake
privateKey
string
The private key of the user's wallet
receipt
object
The transaction receipt object for the stake creation transaction