Skip to main content

Introduction

This SDK helps you integrate with Lido in three ways:

  1. Using React banner (simplest).
  2. Supporting a UI widget in your project (We provide js functions for staking, unstaking, statistics and transaction info).
  3. Use the staking widget with UI (coming soon).

Using banner

npm install @lidofinance/solido-sdk-banner
import LidoStakeBanner from '@lidofinance/solido-sdk-banner';

<LidoStakeBanner referrerId="your_solana_referral_address" direction="horizontal" />

See Banner Section

Using SDK

npm install @lidofinance/solido-sdk
import { SolidoSDK } from '@lidofinance/solido-sdk';

try {
const solidoSDK = new SolidoSDK('mainnet-beta', connection, 'your_solana_referral_address');

await solidoSDK.stake({
amount: 20, // The amount of SOL-s which need to stake
wallet: wallet, // Wallet instance
// Optional callback for getting information about transaction stage
setTxStage: setTxStageCallback,
});
} catch (e) {
// Handle Errors
}

See SDK Staking for details

Using staking widget

In progress, will be available soon.

Learn more