@lidofinance/solido-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.12.0 • Public • Published

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

Learn more

Readme

Keywords

Package Sidebar

Install

npm i @lidofinance/solido-sdk

Weekly Downloads

1,662

Version

0.12.0

License

ISC

Unpacked Size

409 kB

Total Files

122

Last publish

Collaborators

  • lidofinance-ui
  • lidofinance-group