@lidofinance/solido-sdk
v0.12.0
Published
Lido on Solana frontend sdk
Downloads
10,370
Readme
Lido on Solana - Frontend SDK
About us
Lido on Solana is a Lido-DAO governed liquid staking protocol for the Solana blockchain. Anyone who stakes their SOL tokens with Lido will be issued an on-chain representation of SOL staking position with Lido validators, called stSOL. We will work to integrate stSOL widely into the Solana DeFi ecosystem to enable stSOL users to make use of their staked assets in a variety of applications.
Lido on Solana gives you:
- Liquidity — No delegation/activation delays and the ability to sell your staked tokens
- One-click staking — No complicated steps
- Decentralized security — Assets spread across the industry’s leading validators chosen by the Lido DAO
About sdk
Here we provide js functions for staking, unstaking, statistics and transaction info.
Contents:
Installation
$ npm install @lidofinance/solido-sdk
$ yarn add @lidofinance/solido-sdk
How to use
Staking:
import { SolidoSDK } from '@lidofinance/solido-sdk';
// solana/web3.js Connection
const solidoSDK = new SolidoSDK('mainnet-beta', connection, 'your_solana_referral_address');
try {
const { transactionHash, stSolAccountAddress } = await solidoSDK.stake({
amount: 20, // The amount of SOL-s which need to stake
wallet: wallet, // Wallet instance
setTxStage: setTxStageCallback, // Optional callback for getting information about transaction stage (see TX_STAGE)
});
} catch (e) {
// Handle Errors
}
Read more for full examples & details