@drift-labs/sdk-browser
Version:
SDK for Drift Protocol
9 lines (8 loc) • 668 B
TypeScript
/// <reference types="bn.js" />
import { BN } from '@coral-xyz/anchor';
import { SpotMarketAccount } from '../types';
export declare function nextRevenuePoolSettleApr(spotMarket: SpotMarketAccount, vaultBalance: BN, // vault token amount
amount?: BN): number;
export declare function stakeAmountToShares(amount: BN, totalIfShares: BN, insuranceFundVaultBalance: BN): BN;
export declare function unstakeSharesToAmount(nShares: BN, totalIfShares: BN, insuranceFundVaultBalance: BN): BN;
export declare function unstakeSharesToAmountWithOpenRequest(nShares: BN, withdrawRequestShares: BN, withdrawRequestAmount: BN, totalIfShares: BN, insuranceFundVaultBalance: BN): BN;