import { IPool } from '../../protocols/interfaces/IPool'; import { PositionType } from '../enums/PositionType'; import { IPositionId } from './IPositionId'; import { ITokenAmount } from './ITokenAmount'; import { z } from 'zod'; /** * @name IPosition * @description Represents a Summer position in a pool/protocol */ export interface IPosition extends IPositionData { /** Type of the position in the Summer.fi system */ readonly type: PositionType; /** Unique identifier for the position inside the Summer.fi system */ readonly id: IPositionId; /** Amount of debt borrowed from the pool */ readonly debtAmount: ITokenAmount; /** Amount of collateral deposited in the pool */ readonly collateralAmount: ITokenAmount; /** Pool where the position is */ readonly pool: IPool; } /** * @description Zod schema for IPosition */ export declare const PositionDataSchema: z.ZodObject<{ type: z.ZodNativeEnum; id: z.ZodObject<{ id: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; }, { id: string; }>; debtAmount: z.ZodObject<{ token: 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; }>; amount: z.ZodString; }, "strip", z.ZodTypeAny, { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }, { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }>; collateralAmount: z.ZodObject<{ token: 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; }>; amount: z.ZodString; }, "strip", z.ZodTypeAny, { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }, { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }>; pool: z.ZodObject<{ type: z.ZodNativeEnum; 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; }; }; }>; }, "strip", z.ZodTypeAny, { type: import("../..").PoolType; id: { protocol: { name: import("../..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }; }, { type: import("../..").PoolType; id: { protocol: { name: import("../..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }; }>; }, "strip", z.ZodTypeAny, { type: PositionType; id: { id: string; }; debtAmount: { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }; collateralAmount: { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }; pool: { type: import("../..").PoolType; id: { protocol: { name: import("../..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }; }; }, { type: PositionType; id: { id: string; }; debtAmount: { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }; collateralAmount: { amount: string; token: { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }; }; pool: { type: import("../..").PoolType; id: { protocol: { name: import("../..").ProtocolName; chainInfo: { chainId: number; name: string; }; }; }; }; }>; /** * Type for the data part of the IPosition interface */ export type IPositionData = Readonly>; /** * @description Type guard for IPosition * @param maybePosition * @returns true if the object is an IPosition */ export declare function isPosition(maybePosition: unknown): maybePosition is IPosition; //# sourceMappingURL=IPosition.d.ts.map