Warning
THIS PROJECT IS NOT SUPPORTED ANYMORE!
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
This sdk helps you integrate with us, using two ways:
- Simplest way is using React banner.
- Support UI widget in your project. We provide js functions for staking, unstaking, statistics and transaction info.
- Use staking widget with UI (coming soon)
$ npm install @lidofinance/solido-sdk
$ yarn add @lidofinance/solido-sdk
$ npm install @lidofinance/solido-sdk-banner
$ yarn add @lidofinance/solido-sdk-banner
import LidoStakeBanner from '@lidofinance/solido-sdk-banner';
<LidoStakeBanner referrerId="your_solana_referral_address" direction="horizontal" />
Note: also available vertical mode. Read more
$ npm install @lidofinance/solido-sdk
$ yarn add @lidofinance/solido-sdk
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
In progress, will be available soon.