declare enum LPTokenProvider { TINYMAN = 0, PACT = 1 } interface BaseLPToken { provider: LPTokenProvider; lpAssetId: number; asset0Id: number; asset1Id: number; } interface TinymanLPToken extends BaseLPToken { provider: LPTokenProvider.TINYMAN; lpPoolAddress: string; } interface PactLPToken extends BaseLPToken { provider: LPTokenProvider.PACT; lpPoolAppId: number; } type LPToken = TinymanLPToken | PactLPToken; interface BaseLendingPool extends BaseLPToken { pool0AppId: number; pool1AppId: number; feeScale: bigint; } interface PactLendingPool extends BaseLendingPool { provider: LPTokenProvider.PACT; lpPoolAppId: number; } interface TinymanLendingPool extends BaseLendingPool { provider: LPTokenProvider.TINYMAN; lpPoolAppAddress: string; } type LendingPool = PactLendingPool | TinymanLendingPool; interface BaseLendingPoolInfo { currentRound?: number; fAsset0Supply: bigint; fAsset1Supply: bigint; liquidityTokenCirculatingSupply: bigint; fee: bigint; swapFeeInterestRate: bigint; swapFeeInterestYield: bigint; asset0DepositInterestRate: bigint; asset0DepositInterestYield: bigint; asset1DepositInterestRate: bigint; asset1DepositInterestYield: bigint; tvlUsd: number; } interface PactLendingPoolInfo extends BaseLendingPoolInfo { } interface TinymanLendingPoolInfo extends BaseLendingPoolInfo { farmInterestYield: bigint; } interface PoolManagerInfo { currentRound?: number; pools: Partial>; } interface BasePool { appId: number; assetId: number; fAssetId: number; frAssetId: number; assetDecimals: number; poolManagerIndex: number; loans: Partial>; } interface LPTokenPool extends BasePool { lpToken: LPToken; } type Pool = BasePool | LPTokenPool; interface PoolInfo { currentRound?: number; variableBorrow: { vr0: bigint; vr1: bigint; vr2: bigint; totalVariableBorrowAmount: bigint; variableBorrowInterestRate: bigint; variableBorrowInterestYield: bigint; variableBorrowInterestIndex: bigint; }; stableBorrow: { sr0: bigint; sr1: bigint; sr2: bigint; sr3: bigint; optimalStableToTotalDebtRatio: bigint; rebalanceUpUtilisationRatio: bigint; rebalanceUpDepositInterestRate: bigint; rebalanceDownDelta: bigint; totalStableBorrowAmount: bigint; stableBorrowInterestRate: bigint; stableBorrowInterestYield: bigint; overallStableBorrowInterestAmount: bigint; }; interest: { retentionRate: bigint; flashLoanFee: bigint; optimalUtilisationRatio: bigint; totalDeposits: bigint; depositInterestRate: bigint; depositInterestYield: bigint; depositInterestIndex: bigint; latestUpdate: bigint; }; caps: { borrowCap: bigint; stableBorrowPercentageCap: bigint; }; config: { depreciated: boolean; rewardsPaused: boolean; stableBorrowSupported: boolean; flashLoanSupported: boolean; }; } type UserDepositInfo = { currentRound?: number; escrowAddress: string; holdings: { fAssetId: number; fAssetBalance: bigint; }[]; }; type UserDepositFullInfo = { currentRound?: number; escrowAddress: string; holdings: { fAssetId: number; fAssetBalance: bigint; poolAppId: number; assetId: number; assetPrice: bigint; assetBalance: bigint; balanceValue: bigint; interestRate: bigint; interestYield: bigint; }[]; }; interface DepositStakingInfo { currentRound?: number; stakingPrograms: { poolAppId: number; totalStaked: bigint; minTotalStaked: bigint; stakeIndex: number; rewards: { rewardAssetId: number; endTimestamp: bigint; rewardRate: bigint; rewardPerToken: bigint; }[]; }[]; } interface DepositStakingProgramInfo { poolAppId: number; stakeIndex: number; fAssetId: number; fAssetTotalStakedAmount: bigint; assetId: number; assetPrice: bigint; assetTotalStakedAmount: bigint; totalStakedAmountValue: bigint; depositInterestRate: bigint; depositInterestYield: bigint; rewards: { rewardAssetId: number; endTimestamp: bigint; rewardRate: bigint; rewardPerToken: bigint; rewardAssetPrice: bigint; rewardInterestRate: bigint; }[]; } interface UserDepositStakingLocalState { currentRound?: number; userAddress: string; escrowAddress: string; optedIntoAssets: Set; stakedAmounts: bigint[]; rewardPerTokens: bigint[]; unclaimedRewards: bigint[]; } interface UserDepositStakingProgramInfo { poolAppId: number; fAssetId: number; fAssetStakedAmount: bigint; assetId: number; assetPrice: bigint; assetStakedAmount: bigint; stakedAmountValue: bigint; depositInterestRate: bigint; depositInterestYield: bigint; rewards: { rewardAssetId: number; endTimestamp: bigint; rewardAssetPrice: bigint; rewardInterestRate: bigint; unclaimedReward: bigint; unclaimedRewardValue: bigint; }[]; } interface UserDepositStakingInfo { currentRound?: number; userAddress: string; escrowAddress: string; optedIntoAssets: Set; stakingPrograms: UserDepositStakingProgramInfo[]; } interface PoolLoanInfo { poolAppId: number; assetId: number; collateralCap: bigint; collateralUsed: bigint; collateralFactor: bigint; borrowFactor: bigint; liquidationMax: bigint; liquidationBonus: bigint; liquidationFee: bigint; } declare enum LoanType { "GENERAL" = "GENERAL", "STABLECOIN_EFFICIENCY" = "STABLECOIN_EFFICIENCY", "ALGO_EFFICIENCY" = "ALGO_EFFICIENCY", "ULTRASWAP_UP" = "ULTRASWAP_UP", "ULTRASWAP_DOWN" = "ULTRASWAP_DOWN" } interface LoanInfo { currentRound?: number; canSwapCollateral: boolean; pools: Partial>; } interface LoanLocalState { currentRound?: number; userAddress: string; escrowAddress: string; collaterals: { poolAppId: number; fAssetBalance: bigint; }[]; borrows: { poolAppId: number; borrowedAmount: bigint; borrowBalance: bigint; latestBorrowInterestIndex: bigint; stableBorrowInterestRate: bigint; latestStableChange: bigint; }[]; } interface UserLoanInfoCollateral { poolAppId: number; assetId: number; assetPrice: bigint; collateralFactor: bigint; depositInterestIndex: bigint; fAssetBalance: bigint; assetBalance: bigint; balanceValue: bigint; effectiveBalanceValue: bigint; interestRate: bigint; interestYield: bigint; } interface UserLoanInfoBorrow { poolAppId: number; assetId: number; assetPrice: bigint; isStable: boolean; borrowFactor: bigint; borrowedAmount: bigint; borrowedAmountValue: bigint; borrowBalance: bigint; borrowBalanceValue: bigint; effectiveBorrowBalanceValue: bigint; accruedInterest: bigint; accruedInterestValue: bigint; interestRate: bigint; interestYield: bigint; } interface UserLoanInfo { currentRound?: number; userAddress: string; escrowAddress: string; collaterals: UserLoanInfoCollateral[]; borrows: UserLoanInfoBorrow[]; netRate: bigint; netYield: bigint; totalCollateralBalanceValue: bigint; totalBorrowedAmountValue: bigint; totalBorrowBalanceValue: bigint; totalEffectiveCollateralBalanceValue: bigint; totalEffectiveBorrowBalanceValue: bigint; loanToValueRatio: bigint; borrowUtilisationRatio: bigint; liquidationMargin: bigint; } interface Oracle { oracle0AppId: number; oracle1AppId?: number; lpTokenOracle?: { appId: number; tinymanValidatorAppId: number; }; oracleAdapterAppId: number; decimals: number; } interface OraclePrice { price: bigint; timestamp: bigint; } interface OraclePrices { currentRound?: number; prices: Partial>; } interface OpUp { callerAppId: number; baseAppId: number; } type ReserveAddress = string; export { LPTokenProvider, TinymanLPToken, PactLPToken, LPToken, PactLendingPool, TinymanLendingPool, LendingPool, BaseLendingPoolInfo, PactLendingPoolInfo, TinymanLendingPoolInfo, PoolManagerInfo, BasePool, LPTokenPool, Pool, PoolInfo, UserDepositInfo, UserDepositFullInfo, DepositStakingInfo, DepositStakingProgramInfo, UserDepositStakingLocalState, UserDepositStakingProgramInfo, UserDepositStakingInfo, PoolLoanInfo, LoanType, LoanLocalState, LoanInfo, UserLoanInfoCollateral, UserLoanInfoBorrow, UserLoanInfo, Oracle, OraclePrice, OraclePrices, OpUp, ReserveAddress, }; //# sourceMappingURL=types.d.ts.map