⛏️createStake

Description

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

Parameters

Name
Type
Description

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

Response

Property
Type
Description

receipt

object

The transaction receipt object for the stake creation transaction

Example Request and Response

Prerequisites

Before making requests with Volary SDK, you must have it installed.

You can install Volary SDK using either npm or yarn. Use the following commands to install Volary SDK:

Request

Here is an example of how to make a createStake request using the Volary SDK:

Response

Use Cases

  • 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.

Last updated