import type { Address } from "viem"; import type { AssetWithView } from "../utils/assets-math.js"; import type { CreditSessionFilteredPayload, CreditSessionPayload, CreditSessionsAggregatedStatsPayload, SecondaryStatus, UserCreditSessionsAggregatedStatsPayload } from "./credit-sessions-payload.js"; export interface CreditSessionAsset extends AssetWithView { ind: number; isForbidden: boolean; isEnabled: boolean; quota: bigint; quotaIndexLU: bigint; isQuoted: boolean; } export interface CreditSessionReward extends AssetWithView { pool: Address; } export type CreditSessionStatus = "active" | "closed" | "repaid" | "liquidated" | "liquidateExpired" | "liquidatePaused"; export declare const CREDIT_SESSION_STATUS_BY_ID: Record; export declare const CREDIT_SESSION_ID_BY_STATUS: Record; export declare class CreditSession { readonly id: string; readonly status: CreditSessionStatus; readonly borrower: Address; readonly creditManager: Address; readonly account: Address; readonly underlyingToken: Address; readonly version: number; readonly since: number; readonly closedAt: number; readonly initialAmount: bigint; readonly borrowedAmount: bigint; readonly totalValue: bigint; readonly healthFactor: number; readonly profitInUSD: number; readonly profitInUnderlying: number; readonly collateralInUSD: number; readonly collateralInUnderlying: number; readonly roi: number; readonly apy: number; readonly currentBlock: number; readonly currentTimestamp: number; readonly baseBorrowAPY7DAverage: number; readonly baseBorrowAPY_RAY: bigint; readonly baseToken: Address; readonly pool: Address; readonly entryPrice: number; readonly closePrice: number; readonly quoteToken: Address; readonly tradingToken: Address; readonly sinceTimestamp: number; readonly closedAtTimestamp: number; readonly borrowAPY_RAY: bigint; readonly borrowAPY7DAverage: number; readonly totalValueUSD: number; readonly debt: bigint; readonly debtUSD: number; readonly leverage: number; readonly tfIndex: number; readonly spotDebt: bigint; readonly spotTotalValue: bigint; readonly spotUserFunds: bigint; readonly cvxUnclaimedRewards: Array; readonly balances: Array; readonly forbiddenTokens: Record; readonly disabledTokens: Record; readonly teritaryStatus: SecondaryStatus; constructor(payload: CreditSessionPayload); } export declare class CreditSessionFiltered { readonly id: string; readonly borrower: Address; readonly account: Address; readonly creditManager: Address; readonly underlyingToken: Address; readonly status: CreditSessionStatus; readonly since: number; readonly closedAt: number; readonly sinceTimestamp: number; readonly closedAtTimestamp: number; readonly healthFactor: number; readonly leverage: number; readonly debt: bigint; readonly debtUSD: number; readonly totalValue: bigint; readonly totalValueUSD: number; readonly profitInUSD: number; readonly profitInUnderlying: number; readonly tfIndex: number; readonly balances: Array; readonly teritaryStatus: SecondaryStatus; constructor(payload: CreditSessionFilteredPayload); } export type CreditSessionSortFields = "type" | "tvl" | "hf" | "debt" | "pnl" | "leverage" | "tfIndex"; export type CreditSessionSortType = "asc" | "desc"; export interface UserCreditSessions extends Omit { totalValueChange: number; accounts: Array; } type AggregatedOmit = "healthFactor10kBasis" | "leverage10kBasis" | "activeAccounts10kBasis" | "openedAccounts10kBasis" | "healthFactor" | "healthFactorOld"; export type CreditSessionsAggregatedStats = Omit & { healthFactorChange: number; leverageChange: number; activeAccountsChange: number; openedAccountsChange: number; healthFactor: bigint; healthFactorOld: bigint; }; export declare class UserCreditSessionsBuilder { private constructor(); static buildUserCreditSessions(payload: UserCreditSessionsAggregatedStatsPayload): UserCreditSessions; static buildCreditSessionsAggregatedStats(payload: CreditSessionsAggregatedStatsPayload): CreditSessionsAggregatedStats; } export {};