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 Order - Kamino
Borrow Rate Curve - Kamino
Curve Point - Kamino
Elevation Group - Kamino
Fixed Term Borrow Rollover Config - Kamino
Last Update - Kamino
Obligation - Kamino Obligation account — exact match of the on-chain IDL (padding omitted).
- Kamino
Obligation Collateral - Kamino
Obligation Liquidity - Kamino
Obligation Order - Kamino
Price Heuristic - Kamino
Pyth Configuration - Kamino
Reserve - Kamino Reserve account — exact match of the on-chain IDL (padding omitted).
- Kamino
Reserve Collateral - Kamino
Reserve Config - Kamino
Reserve Fees - Kamino
Reserve Liquidity - Kamino
Scope Configuration - Kamino
Switchboard Configuration - Kamino
Token Info - Kamino
Withdraw Queue - Kamino
Withdraw Ticket - Kamino
Withdrawal Caps - 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§
- Protocol
Id - Spot
Balance Type - Whether a spot balance is a deposit or borrow.
Constants§
- KAMINO_
FRACTION_ SCALE - Kamino Fraction scale factor: U68F60 = 2^60.