@alphafi/stsui-sdk
v0.0.5
Published
## Installation
Downloads
325
Readme
stSUI SDK
Installation
npm i @stsui-sdk
API Reference
mint
Call mint function to stake SUI and get stSUI.
import { mint } from "@stsui-sdk";
import { Transaction } from "@mysten/sui/transactions";
const stakeSUI: Transaction = await mint(amount, { address: wallet_address });
redeem
Call this to unstake stSUI and get SUI in return.
import { redeem } from "@stsui-sdk";
import { Transaction } from "@mysten/sui/transactions";
const unstakeStSUI: Transaction = await redeem(amount, {
address: wallet_address,
});
fetchStSuiAPR
Call this to get apr for stSUI.
import { fetchStSuiAPR } from "@stsui-sdk";
const days: number = 365; //for a year
const stSuiAPR: string = await fetchStSuiAPR(days);
stSuiExchangeRate
Call this to get exchange rate of stSUI.
import { stSuiExchangeRate } from "@stsui-sdk";
const exchangeRateOfStSui: string = await stSuiExchangeRate();
stStuiCirculationSupply
Call this to get tvl of stSUI.
import { stStuiCirculationSupply } from "@stsui-sdk";
const tvl: string = await stStuiCirculationSupply();