/**
 * Extend Position Authorization Utilities
 *
 * Generates authorization signatures for extend position requests
 * that can be verified by the extend-position-validator LIT Action.
 */
import { type Wallet } from "ethers";
/**
 * Extend Owner Authorization Interface (matches lit-actions)
 */
export interface ExtendOwnerAuthorization {
    positionId: string;
    timestamp: number;
    chainId: number;
    newTerm: number;
    action: string;
    signature: string;
    callerAddress: string;
}
/**
 * Build the extend authorization message hash without signing.
 *
 * Use this when signing with a smart contract wallet (e.g. Safe) that
 * needs to wrap the hash in its own domain before signing.
 *
 * @param positionId - Position identifier
 * @param newTerm - Extension term in months (number)
 * @param chainId - Chain ID for cross-chain replay protection
 * @returns { hash, timestamp } — pass these to Safe for signing
 */
export declare function buildExtendAuthorizationHash(positionId: string, newTerm: number, chainId: number): {
    hash: string;
    timestamp: number;
};
/**
 * Generate extend position authorization signature
 *
 * Creates a signature that matches the format expected by
 * AuthorizationModule.verifyExtendAuthorization in lit-actions.
 *
 * Message structure:
 * solidityKeccak256(
 *   ["bytes32", "uint256", "uint256", "uint256", "bytes32"],
 *   [positionId, timestamp, chainId, newTerm, actionHash]
 * )
 *
 * Where:
 * - actionHash = keccak256("extend-position")
 * - Signer address is recovered from signature by LIT Action
 * - LIT Action validates recovered address === position owner
 *
 * @param positionId - Position identifier
 * @param newTerm - Extension term in months (number)
 * @param chainId - Chain ID for cross-chain replay protection
 * @param signerOrPrecomputed - Either an ethers Wallet (EOA) or { timestamp, signature } for smart contract wallets
 * @returns Authorization object with signature
 */
export declare function generateExtendAuthorization(positionId: string, newTerm: number, chainId: number, signerOrPrecomputed: Wallet | {
    timestamp: number;
    signature: string;
}): Promise<ExtendOwnerAuthorization>;
