import { IToken } from '../../common/interfaces/IToken'; import { PoolType } from '../types'; import { ILendingPoolId } from './ILendingPoolId'; import { IPool } from './IPool'; import { z } from 'zod'; /** * @name ILendingPool * @description Represents a lending pool for a single pair collateral/debt * * A lending pool is a pool where users can deposit collateral and borrow debt against that collateral. * Typically the user will pay interest on the debt, and the collateral will be locked until the debt is repaid. * * This interface is an abstraction of a lending pool and the specialization for each protocol happens at the IPool * level through the PoolId */ export interface ILendingPool extends IPool, ILendingPoolData { /** Type of the pool, in this case Lending */ readonly type: PoolType.Lending; /** Pool ID of the lending pool */ readonly id: ILendingPoolId; /** Collateral token used to collateralized the pool */ readonly collateralToken: IToken; /** Debt token, which can be borrowed from the pool */ readonly debtToken: IToken; } /** * @description Zod schema for ILendingPool */ export declare const LendingPoolDataSchema: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodObject<{ protocol: z.ZodObject<{ name: z.ZodNativeEnum; chainInfo: z.ZodObject<{ chainId: z.ZodNumber; name: z.ZodString; }, "strip", z.ZodTypeAny, { chainId: number; name: string; }, { chainId: number; name: string; }>; }, "strip", z.ZodTypeAny, { name: import("..").ProtocolName; chainInfo: { chainId: number; name: string; }; }, { name: import("..").ProtocolName; chainInfo: { chainId: number; name: string; }; }>; }, "strip", z.ZodTypeAny, { protocol: { name: import("..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }, { protocol: { name: import("..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }>; collateralToken: z.ZodObject<{ chainInfo: z.ZodObject<{ chainId: z.ZodNumber; name: z.ZodString; }, "strip", z.ZodTypeAny, { chainId: number; name: string; }, { chainId: number; name: string; }>; address: z.ZodObject<{ value: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>; type: z.ZodNativeEnum; }, "strip", z.ZodTypeAny, { type: import("../..").AddressType; value: `0x${string}`; }, { type: import("../..").AddressType; value: `0x${string}`; }>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; }, "strip", z.ZodTypeAny, { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }, { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }>; debtToken: z.ZodObject<{ chainInfo: z.ZodObject<{ chainId: z.ZodNumber; name: z.ZodString; }, "strip", z.ZodTypeAny, { chainId: number; name: string; }, { chainId: number; name: string; }>; address: z.ZodObject<{ value: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>; type: z.ZodNativeEnum; }, "strip", z.ZodTypeAny, { type: import("../..").AddressType; value: `0x${string}`; }, { type: import("../..").AddressType; value: `0x${string}`; }>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; }, "strip", z.ZodTypeAny, { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }, { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }>; }, "strip", z.ZodTypeAny, { type: PoolType.Lending; id: { protocol: { name: import("..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }; collateralToken: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }; debtToken: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }; }, { type: PoolType.Lending; id: { protocol: { name: import("..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }; collateralToken: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }; debtToken: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("../..").AddressType; value: `0x${string}`; }; decimals: number; }; }>; /** * Type for the data part of the ILendingPool interface */ export type ILendingPoolData = Readonly>; /** * @description Type guard for ILendingPool * @param maybePool Object to be checked * @returns true if the object is an ILendingPool * * It also asserts the type so that TypeScript knows that the object is an ILendingPool */ export declare function isLendingPool(maybePool: unknown): maybePool is ILendingPool; //# sourceMappingURL=ILendingPool.d.ts.map