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.
KaminoBorrowRateCurve
Piecewise-linear borrow rate curve with up to 11 points.
KaminoCurvePoint
Single point on the borrow rate curve.
KaminoElevationGroup
Kamino elevation group for xStocks and isolated markets.
KaminoLastUpdate
Slot-based staleness tracker.
KaminoObligation
Kamino obligation account, equivalent to DriftUser.
KaminoObligationCollateral
Obligation deposit position, equivalent to SpotPosition (deposit side).
KaminoObligationLiquidity
Obligation borrow position, equivalent to SpotPosition (borrow side).
KaminoReserve
Subset of the Kamino Reserve account fields needed by consumer services.
KaminoReserveCollateral
Subset of Reserve.collateral fields.
KaminoReserveConfig
Subset of Reserve.config fields.
KaminoReserveFees
Reserve fee configuration.
KaminoReserveLiquidity
Subset of Reserve.liquidity fields.
KaminoWithdrawTicket
Kamino withdraw ticket for queued withdrawal flow.
KaminoWithdrawalCaps
Withdrawal/debt capacity limiter with time-based resets.
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§

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