import type { HardhatRuntimeEnvironment } from 'hardhat/types/hre';
import type { NetworkConnection } from 'hardhat/types/network';
import type { HardhatUpgrades, DefenderHardhatUpgrades } from '../types.js';
/**
 * Factory function to create the upgrades API for a given HRE.
 *
 * @example
 * ```typescript
 * import { upgrades } from '@openzeppelin/hardhat-upgrades';
 *
 * task('deploy', async (args, hre) => {
 *   const connection = await hre.network.create();
 *   const api = await upgrades(hre, connection);
 *   await api.deployProxy(MyContract, []);
 * });
 * ```
 *
 * @param hre - Hardhat Runtime Environment
 * @param connection - Network connection from `await hre.network.create()`. Share one connection across operations; do not create a new one per call.
 * @returns API object with all upgrade functions
 */
export declare function upgrades(hre: HardhatRuntimeEnvironment, connection: NetworkConnection): Promise<HardhatUpgrades>;
/**
 * Factory function to create the Defender-enabled upgrades API.
 *
 * @example
 * ```typescript
 * import { defender } from '@openzeppelin/hardhat-upgrades';
 *
 * task('deploy', async (args, hre) => {
 *   const connection = await hre.network.create();
 *   const api = await defender(hre, connection);
 *   await api.deployContract(...);
 * });
 * ```
 *
 * @param hre - Hardhat Runtime Environment
 * @param connection - Network connection from `await hre.network.create()`. Share one connection across operations; do not create a new one per call.
 * @returns API object with all upgrade and Defender functions
 */
export declare function defender(hre: HardhatRuntimeEnvironment, connection: NetworkConnection): Promise<DefenderHardhatUpgrades>;
//# sourceMappingURL=factory.d.ts.map