Module @carrot-protocol/http-client
Overview
Typescript libraries related to protocol operations
Common
- Houses various types, hardcoded shared values, basic math functions, program idl
- dont pull this in directly, its a dependency of the clients
HTTP Client
- used to interface with the carrot API
RPC Client
- used to read on chain data via validator rpc
- used to create and send txns to carrot protocol program
Integrations
- code that interacts with yield sources
Development
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
- Client
Interfaces
- CheckWalletResponse
- ClaimReferralCodeResponse
- GetReferralCodesResponse
- HistoricalVaultApyResponse
- HistoricalVaultNavResponse
- IssueRequest
- IssueResponse
- PerformanceData
- PortfolioValue
- RedeemRequest
- RedeemResponse
- ReferralCode
- SendRequest
- Stat
- UserAssetBalance
- UserPerformanceResponse
- UserResponse
- VaultApy
- VaultNav
Type Aliases
- VaultHistoricalInterval
Functions
- isValidVaultHistoricalInterval
- isWalletAllowed
- prepareUnsignedTx