Expand description
Shared account types for Pyra services.
Provides type definitions for Drift protocol accounts, Kamino protocol accounts, Pyra vault accounts, and Redis cache wrappers. These types are the superset of fields needed by api-v2, settlement-service, and notification-service for Redis deserialization.
Structs§
- Cache
- Generic cache wrapper for Redis-stored account data.
- Deposit
Address SolAccount - Native SOL account data for a deposit address, serialised to Redis by the indexer.
- Deposit
Address SplAccount - SPL token account data for a deposit address, serialised to Redis by the indexer.
- Drift
User - Drift user account containing spot positions.
- Historical
Oracle Data - Subset of the Drift HistoricalOracleData struct.
- Insurance
Fund - Subset of the Drift InsuranceFund struct.
- Kamino
BigFraction Bytes - 256-bit fixed-point number stored as four u64 limbs.
- Kamino
Borrow Rate Curve - Piecewise-linear borrow rate curve with up to 11 points.
- Kamino
Curve Point - Single point on the borrow rate curve.
- Kamino
Elevation Group - Kamino elevation group for xStocks and isolated markets.
- Kamino
Last Update - Slot-based staleness tracker.
- Kamino
Obligation - Kamino obligation account, equivalent to
DriftUser. - Kamino
Obligation Collateral - Obligation deposit position, equivalent to
SpotPosition(deposit side). - Kamino
Obligation Liquidity - Obligation borrow position, equivalent to
SpotPosition(borrow side). - Kamino
Reserve - Subset of the Kamino Reserve account fields needed by consumer services.
- Kamino
Reserve Collateral - Subset of Reserve.collateral fields.
- Kamino
Reserve Config - Subset of Reserve.config fields.
- Kamino
Reserve Fees - Reserve fee configuration.
- Kamino
Reserve Liquidity - Subset of Reserve.liquidity fields.
- Kamino
Withdraw Ticket - Kamino withdraw ticket for queued withdrawal flow.
- Kamino
Withdrawal Caps - Withdrawal/debt capacity limiter with time-based resets.
- Spend
Limits Order Account - Pending spend-limits order account stored in Redis.
- Spot
Market - Subset of the Drift SpotMarket account fields needed by consumer services.
- Spot
Position - A single spot position within a Drift user account.
- Time
Lock - Time lock used by withdraw and spend-limit order accounts.
- Vault
- Pyra vault account stored in Redis by the indexer.
- Withdraw
Order Account - Pending withdraw order account stored in Redis.
Enums§
- Spot
Balance Type - Whether a spot balance is a deposit or borrow.
Constants§
- KAMINO_
FRACTION_ SCALE - Kamino Fraction scale factor: U68F60 = 2^60.