Overview

Typescript libraries related to protocol operations

  • Houses various types, hardcoded shared values, basic math functions, program idl
  • dont pull this in directly, its a dependency of the clients
  • used to interface with the carrot API
  • used to read on chain data via validator rpc
  • used to create and send txns to carrot protocol program
  • code that interacts with yield sources
cd lib/

# build all packages
make

# fmt
make fmt

# update docs
make build_docs

# look at your changes locally
make serve_docs;

Namespaces

Common

Classes

EventsClient
Instructions
RpcClient

Interfaces

RpcClientConfig

Variables

KFARMS_GLOBAL_CONFIG

Functions

base58EncodeTx
confirmTx
driftInsuranceFundStakeAmountToShares
getDriftInsuranceFundStake
getDriftInsuranceFundVault
getDriftRemainingAccounts
getDriftSigner
getDriftUserPda
getDriftUserStatsPda
getKFarmsObligationPda
getKFarmsRewardsTreasuryVaultPda
getKFarmsRewardsVaultPda
getKFarmsVaultsAuthorityPda
getKlendLendingMarketAuthorityPda
getKlendObligationReserves
getKlendUserMetadataPda
getKlendUserObligationPda
getMarginfiEmissionsAuthPda
getMarginfiEmissionsVaultPda
getSolendObligationAddress
getSolendObligationReserves
getSolendSupplyAPY
getTokenVaultAddressSync
getVaultDepositorAddressSync
prepareKlendRefreshIxns
refreshObligationFarmsForReserveKlend
refreshObligationKlend
refreshReservesKlend
sendBundle