import type { IDeploymentService } from "../../../deploymentService/index.js"; import { type EVCBatchItem, type IExecutionService } from "../../../executionService/index.js"; import type { IProviderService } from "../../../providerService/index.js"; import type { BuildConnectorMigrationBatchArgs, GetMigrationAuthorizationArgs, GetMigrationPositionArgs, ListMigrationPositionsArgs, PositionMigrationConnector } from "../../positionMigrationServiceTypes.js"; import type { MetamorphoConnectorMigrationAuthorizationRequest, MetamorphoMigrationAuthorizationRequest, MetamorphoMigrationConnectorConfig, MetamorphoMigrationPosition, MetamorphoPositionRef, MetamorphoShareApprovalTransactionRequest, MetamorphoVaultVersion } from "./metamorphoConnectorTypes.js"; export declare const METAMORPHO_CONNECTOR_ID = "metamorpho"; export declare const METAMORPHO_PROTOCOL = "Morpho Vaults"; /** OZ ERC-20 `_allowances` mapping slot — MetaMorpho v1 and v1.1. */ export declare const METAMORPHO_V1_ALLOWANCE_SLOT_INDEX = 1n; /** VaultV2 allowance mapping slot. */ export declare const METAMORPHO_V2_ALLOWANCE_SLOT_INDEX = 13n; export declare const METAMORPHO_PERMIT_TYPES: { readonly Permit: readonly [{ readonly name: "owner"; readonly type: "address"; }, { readonly name: "spender"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256"; }, { readonly name: "nonce"; readonly type: "uint256"; }, { readonly name: "deadline"; readonly type: "uint256"; }]; }; export declare function getMetamorphoAllowanceSlotIndex(version: MetamorphoVaultVersion): bigint; export declare function getMetamorphoPositionId(positionRef: MetamorphoPositionRef): string; export declare class MetamorphoPositionMigrationConnector implements PositionMigrationConnector { private readonly deploymentService; private readonly providerService; readonly id = "metamorpho"; readonly protocol = "Morpho Vaults"; readonly name = "Morpho Vaults"; constructor(deploymentService: IDeploymentService, providerService: IProviderService, _executionService: IExecutionService, _config?: MetamorphoMigrationConnectorConfig); listPositions(args: ListMigrationPositionsArgs): Promise; getPosition(args: GetMigrationPositionArgs): Promise; getAuthorization(args: GetMigrationAuthorizationArgs & { authorizationKind: "transaction"; }): Promise; getAuthorization(args: GetMigrationAuthorizationArgs & { authorizationKind?: "typedData"; }): Promise; getAuthorization(args: GetMigrationAuthorizationArgs): Promise; /** * `vault.approve` — the signature-free form of the share permit. * * Synchronous: unlike the permit there is no nonce to read and no EIP-5267 * domain to resolve, so the grant needs no RPC round-trip. */ private buildShareApprovalRequest; buildMigrationBatch(args: BuildConnectorMigrationBatchArgs): Promise; private buildSharePermitRequest; /** * MetaMorpho v1/v1.1 are OZ ERC20Permit — the domain must be read via * EIP-5267 `eip712Domain()` because v1.1 vaults may carry an empty domain * name that differs from `name()` (the token name is settable post-deploy, * the EIP-712 domain is fixed at construction). Vaults V2 does not * implement `eip712Domain()` and uses a minimal * `EIP712Domain(uint256 chainId,address verifyingContract)` domain. */ private resolvePermitDomain; private encodeSharePermitItem; private getShareAllowance; private validateSimulatedShareApproval; } //# sourceMappingURL=metamorphoConnector.d.ts.map