Eversol Stake Pool SDK
Installation
$ npm install @eversol/eversol-ts-sdk
Initialize the library
Import the main client class ESol and initialize it with the desired cluster type:
import { ESol } from '@eversol/eversol-ts-sdk';
const eSol = new Socean('mainnet-beta');
const eSol = new Socean();
Deposit SOL Transaction
Stake SOL and get your eSOL:
...
const depositSolTransaction = await eSol.depositSolTransaction(userAddress, amountLamports)
Instant unstake eSOL Transaction
Skip the basic Solana cool-down period and undelegate stake instantly. If the feature is not available (meaning there is not enough liquidity/reserve in the pool to cover instant unstaking), please use the standard Unstake:
...
const instantUnstakeTransaction = await eSol.unDelegateSolTransaction(userAddress, amountLamports)
Classic delayed unstake eSOL Transaction
Skip the basic Solana cool-down period and undelegate stake instantly. If the feature is not available (meaning there is not enough liquidity/reserve in the pool to cover instant unstaking), please use the standard Unstake:
...
const instantUnstakeTransaction = await eSol.unDelegateSolTransaction(userAddress, amountLamports)
Learn more