import type { Address, ChainId } from "@morpho-org/blue-sdk"; import type { ActionBundle } from "@morpho-org/bundler-sdk-viem"; import type { MigratableProtocol, MigrationTransactionRequirement, SupplyMigrationLimiter } from "../../types/index.js"; /** * Namespace containing argument definitions for Migratable Supply Position. */ export declare namespace MigratableSupplyPosition { /** * Arguments required for building a migration operation. */ interface Args { /** The amount to migrate. */ amount: bigint; /** The maximum vault share price expected (scaled by RAY). */ maxSharePrice: bigint; /** The address of the vault to migrate to. */ vault: Address; } } /** * Interface representing the structure of a migratable supply position. */ export interface IMigratableSupplyPosition { /** The chain ID where the position resides. */ chainId: ChainId; /** The protocol associated with the supply position. */ protocol: MigratableProtocol; /** The user's address. */ user: Address; /** The address of the loan token being supplied. */ loanToken: Address; /** The total supply balance of the position. */ supply: bigint; /** The annual percentage yield (APY) of the supply position. */ supplyApy: number; /** The maximum supply migration limit and its corresponding limiter. */ max: { value: bigint; limiter: SupplyMigrationLimiter; }; } /** * Abstract class representing a migratable supply position. */ export declare abstract class MigratableSupplyPosition implements IMigratableSupplyPosition { readonly protocol: MigratableProtocol; readonly user: `0x${string}`; readonly loanToken: `0x${string}`; readonly supply: bigint; readonly supplyApy: number; readonly max: { value: bigint; limiter: SupplyMigrationLimiter; }; readonly chainId: ChainId; /** * Creates an instance of MigratableSupplyPosition. * * @param config - Configuration object containing the position details. */ constructor(config: IMigratableSupplyPosition); protected abstract _getMigrationTx(args: MigratableSupplyPosition.Args, supportsSignature: boolean): ActionBundle; /** * Method to retrieve a migration operation for the supply position. * * @param args - The arguments required to execute the migration. * @param supportsSignature - Whether the migration supports signature-based execution. * * @returns A migration bundle containing the migration details. */ getMigrationTx(args: MigratableSupplyPosition.Args, supportsSignature: boolean): ActionBundle; private _validateMigration; }