Stake Ethereum
The stake
namespace contains method used for sending transactions on delegation. The unique method to the stake
namespace is:
stake(address, amount, source)
: Stakes funds into pool. The minimum amount required for staking is 0.1 ETH. Thesource
is a unique identifier provided by the Everstake that allows the Everstake to recognize and verify the origin of the staking transactions.activateStake()
: Activates the pending stake by interchanging it with a withdrawal requests.
Stake Code Example
ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';
// User Public Address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';
// The unique identifier provided by the Everstake
const source = '0';
// The amount that the user stake
const amount = 1; // must be >= 0.1
// Stake - return Raw Transaction
const txnRequest = await Ethereum.stake(address, amount, source);
console.log(txnRequest); // Raw Transaction