Skip to main content

Crate pyra_types

Crate pyra_types 

Source
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.
DepositAddressSolAccount
Native SOL account data for a deposit address, serialised to Redis by the indexer.
DepositAddressSplAccount
SPL token account data for a deposit address, serialised to Redis by the indexer.
DriftUser
Drift user account containing spot positions.
HistoricalOracleData
Subset of the Drift HistoricalOracleData struct.
InsuranceFund
Subset of the Drift InsuranceFund struct.
KaminoBigFractionBytes
256-bit fixed-point number stored as four u64 limbs.
KaminoBorrowOrder
KaminoBorrowRateCurve
KaminoCurvePoint
KaminoElevationGroup
KaminoFixedTermBorrowRolloverConfig
KaminoLastUpdate
KaminoObligation
Kamino Obligation account — exact match of the on-chain IDL (padding omitted).
KaminoObligationCollateral
KaminoObligationLiquidity
KaminoObligationOrder
KaminoPriceHeuristic
KaminoPythConfiguration
KaminoReserve
Kamino Reserve account — exact match of the on-chain IDL (padding omitted).
KaminoReserveCollateral
KaminoReserveConfig
KaminoReserveFees
KaminoReserveLiquidity
KaminoScopeConfiguration
KaminoSwitchboardConfiguration
KaminoTokenInfo
KaminoWithdrawQueue
KaminoWithdrawTicket
KaminoWithdrawalCaps
SpendLimitsOrderAccount
Pending spend-limits order account stored in Redis.
SpotMarket
Subset of the Drift SpotMarket account fields needed by consumer services.
SpotPosition
A single spot position within a Drift user account.
TimeLock
Time lock used by withdraw and spend-limit order accounts.
Vault
Pyra vault account stored in Redis by the indexer.
WithdrawOrderAccount
Pending withdraw order account stored in Redis.

Enums§

ProtocolId
SpotBalanceType
Whether a spot balance is a deposit or borrow.

Constants§

KAMINO_FRACTION_SCALE
Kamino Fraction scale factor: U68F60 = 2^60.

Type Aliases§

DepositAddressSolCache
DepositAddressSplCache
DriftUserCache
SpendLimitsOrderCache
SpotMarketCache
VaultCache
WithdrawOrderCache