Eversol SDK
A software development kit (SDK) is a collection of software development tools in one installable package. It facilitates the creation of applications with a compiler, debugger and sometimes a software framework.
Our team has developed an SDK using Typescript for your best experience. TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.
Eversol’s features, such as Stake / Unstake / Instant Unstake can be integrated by partners and projects using our SDK. For example, a Wallet team that wants to integrate liquid-stacking can do it quickly and easily using our set of software tools.
$ npm install @everstake/eversol-ts-sdk
Import the main client class eSOL and initialize it with the desired cluster type:
import { ESol } from '@everstake/eversol-ts-sdk';
// initializes for mainnet-beta
const eSol = new ESol('mainnet-beta');
// initializes for testnet
const eSol = new ESol('testnet');
1. Deposit SOL Transaction
Stake SOL and get your eSOL:
...
const depositSolTransaction = await eSol.depositSolTransaction(userAddress, amountLamports, referrerAccount)
// referrerAccount - should exist in referrer list (contact our team to add your address)
// than sign and send the `transaction`
2. 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)
// than sign and send the `transaction`
3. Classic delayed unstake eSOL Transaction
Your stake will be deactivated with the beginning of a new epoch. Once the stake is inactive, feel free to withdraw the tokens within your wallet, in compliance with regular Solana staking terms.
...
const delayedUnstakeTransaction = await eSol.withdrawSolTransaction(userAddress, amountLamports)
// than sign and send the `transaction`
Last modified 1yr ago