/**
 * Smart Contract Type Interfaces
 *
 * These interfaces define the TypeScript types for smart contracts used in the SDK.
 * They are independent definitions - NOT imported from the contracts package.
 * Based on Solidity interfaces from contracts/src/interfaces/
 */
import type { BaseContract, ContractTransactionResponse } from "ethers";
/**
 * Position Manager Contract Interface
 * Based on contracts/src/interfaces/IPositionManager.sol
 */
export interface PositionManager extends BaseContract {
    createPosition(pkpId: string, validatorSignature: string, mainnetVaultAddress: string, regtestVaultAddress: string, selectedTermMonths: number | bigint, validatorVersion: number | bigint, pkpPublicKey: string): Promise<ContractTransactionResponse>;
    mintUCD(positionId: string, mintAmount: bigint, mintFee: bigint, newDebt: bigint, newCollateral: bigint, btcPrice: bigint, authorizedSpendsHash: string, ucdDebtHash: string, contractHash: string, quantumTimestamp: bigint, mintValidatorSignature: string): Promise<ContractTransactionResponse>;
    liquidatePosition(positionId: string, btcPrice: bigint, quantumTimestamp: bigint, liquidationValidatorSignature: string): Promise<ContractTransactionResponse>;
    getPosition(positionId: string): Promise<{
        positionId: string;
        pkpId: string;
        ucdDebt: bigint;
        borrower: string;
        createdAt: number;
        lastUpdated: number;
        selectedTerm: number;
        expiryAt: number;
        status: number;
    }>;
    extendPosition(positionId: string, selectedTerm: bigint, quantumTimestamp: bigint, btcPrice: bigint, availableBTCBalance: bigint, proRataRenewalFee: bigint, extensionValidatorSignature: string): Promise<ContractTransactionResponse>;
    commitLiquidation(positionId: string, quantumTimestamp: bigint, btcPrice: bigint, btcVaultBalance: bigint, liquidationValidatorSignature: string, overrides?: object): Promise<ContractTransactionResponse>;
    revealAndLiquidate(positionId: string, quantumTimestamp: bigint, btcPrice: bigint, btcVaultBalance: bigint, liquidationValidatorSignature: string, deadline: bigint, overrides?: object): Promise<ContractTransactionResponse>;
    makePayment(positionId: string, paymentAmount: bigint | string, quantumTimestamp: bigint | string, btcPrice: bigint | string, paymentValidatorSignature: string): Promise<ContractTransactionResponse>;
    pkpValidationRegistry(): Promise<string>;
    updateBalance(positionId: string, newBtcBalance: string | number | bigint, btcPrice: string | number | bigint, quantumTimestamp: string | number | bigint, signature: string): Promise<ContractTransactionResponse>;
}
/**
 * Loan Operations Manager Contract Interface
 * Based on contracts/src/interfaces/ILoanOperationsManager.sol
 */
export interface ILoanOperationsManager extends BaseContract {
    mintUCD(positionId: string, mintAmount: bigint, mintFee: bigint, newDebt: bigint, newCollateral: bigint, btcPrice: bigint, authorizedSpendsHash: string, ucdDebtHash: string, quantumTimestamp: bigint): Promise<ContractTransactionResponse>;
    processPayment(positionId: string, paymentAmount: bigint, quantumTimestamp: bigint, btcPrice: bigint): Promise<ContractTransactionResponse>;
    updatePosition(positionId: string, newDebt: bigint, quantumTimestamp: bigint, btcPrice: bigint, updateValidatorSignature: string): Promise<ContractTransactionResponse>;
    transferFee(recipient: string, amount: bigint): Promise<ContractTransactionResponse>;
    mintExtensionFee(amount: bigint): Promise<ContractTransactionResponse>;
    feeBalance(): Promise<bigint>;
    setFeeRecipientRegistry(registry: string): Promise<ContractTransactionResponse>;
    feeRecipientRegistry(): Promise<string>;
    authorizeBTCSpend(positionId: string, txid: string, vout: number, satoshis: bigint, targetAddress: string, targetAmount: bigint, litSignature: string): Promise<ContractTransactionResponse>;
    liquidationThreshold(): Promise<bigint>;
    minimumLoanValueWei(): Promise<bigint>;
    ucdToken(): Promise<string>;
    getUcdController(): Promise<string>;
    getPKPActualCollateral(pkpId: string): Promise<bigint>;
    isPriceFeedStale(): Promise<boolean>;
    calculateCollateralRatio(positionId: string, btcPrice: bigint): Promise<bigint>;
    getTotalAuthorizedSats(positionId: string): Promise<bigint>;
    extendPosition(positionId: string, newTermMonths: bigint, extensionFee: bigint, quantumTimestamp: bigint, btcPrice: bigint, extendValidatorSignature: string): Promise<ContractTransactionResponse>;
    withdrawBTC(positionId: string, btcTxid: string, btcVout: number, satoshis: bigint, destinationAddress: string, quantumTimestamp: bigint, btcPrice: bigint, btcWithdrawalSignature: string): Promise<ContractTransactionResponse>;
}
/**
 * UCD Controller Contract Interface
 * Based on contracts/src/interfaces/IUCDController.sol
 */
export interface IUCDController extends BaseContract {
    mintFromLoanOps(to: string, amount: bigint, positionId: string, debtAfterMint: bigint): Promise<ContractTransactionResponse>;
    mintFromPsm(to: string, amount: bigint, stablecoin: string, amountIn: bigint): Promise<ContractTransactionResponse>;
    burnTokens(from: string, amount: bigint): Promise<ContractTransactionResponse>;
    setAdminModule(_adminModule: string): Promise<ContractTransactionResponse>;
    setAuthorizedMinter(minter: string, authorized: boolean): Promise<ContractTransactionResponse>;
    setAuthorizedBurner(burner: string, authorized: boolean): Promise<ContractTransactionResponse>;
    setMaxSupply(newMaxSupply: bigint): Promise<ContractTransactionResponse>;
    setDailyMintLimit(newLimit: bigint): Promise<ContractTransactionResponse>;
    setDailyBurnLimit(newLimit: bigint): Promise<ContractTransactionResponse>;
    setUCDToken(newToken: string): Promise<ContractTransactionResponse>;
    getCurrentSupply(): Promise<bigint>;
    getRemainingMintCapacity(): Promise<bigint>;
    getRemainingBurnCapacity(): Promise<bigint>;
    getRemainingPsmMintCapacity(): Promise<bigint>;
    isAuthorizedMinter(account: string): Promise<boolean>;
    isAuthorizedBurner(account: string): Promise<boolean>;
    authorizedMinters(account: string): Promise<boolean>;
    authorizedBurners(account: string): Promise<boolean>;
    burnedPerAddress(account: string): Promise<bigint>;
    totalMinted(): Promise<bigint>;
    totalBurned(): Promise<bigint>;
    maxSupply(): Promise<bigint>;
    dailyMintLimit(): Promise<bigint>;
    dailyBurnLimit(): Promise<bigint>;
    lastMintReset(): Promise<bigint>;
    lastBurnReset(): Promise<bigint>;
    dailyMinted(): Promise<bigint>;
    dailyBurned(): Promise<bigint>;
    dailyPsmMinted(): Promise<bigint>;
    psmDailyMintLimit(): Promise<bigint>;
    circuitBreaker(): Promise<string>;
    ucdToken(): Promise<string>;
    adminModule(): Promise<string>;
}
/**
 * Price Feed Consumer Contract Interface
 */
export interface IPriceFeedConsumer extends BaseContract {
    updatePrice(): Promise<ContractTransactionResponse>;
    getCurrentPrice(): Promise<bigint>;
    getPriceAge(): Promise<bigint>;
    isPriceStale(): Promise<boolean>;
    validatePriceFeed(): Promise<boolean>;
    getLatestBTCPrice(): Promise<bigint>;
    decimals(): Promise<number>;
}
/**
 * Term Manager Contract Interface
 * Based on contracts/src/interfaces/ITermManager.sol
 */
export interface ITermManager extends BaseContract {
    addTerm(termMonths: bigint, originationFee: bigint, extensionFee: bigint): Promise<ContractTransactionResponse>;
    removeTerm(termMonths: bigint): Promise<ContractTransactionResponse>;
    updateTermFees(termMonths: bigint, originationFee: bigint, extensionFee: bigint): Promise<ContractTransactionResponse>;
    getTermFees(termMonths: bigint): Promise<{
        originationFee: bigint;
        extensionFee: bigint;
    }>;
    isValidTerm(termMonths: bigint): Promise<boolean>;
    getValidTermsWithFees(): Promise<{
        terms: bigint[];
        originationFees: bigint[];
        extensionFees: bigint[];
    }>;
    getTermDataById(termId: bigint): Promise<{
        termMonths: bigint;
        originationFee: bigint;
        extensionFee: bigint;
        isActive: boolean;
    }>;
    getAllTerms(): Promise<bigint[]>;
    updateDependencies(newCore: string, newUcdController: string): Promise<ContractTransactionResponse>;
    supportsInterface(interfaceId: string): Promise<boolean>;
}
/**
 * Circuit Breaker Module Contract Interface
 * Based on contracts/src/interfaces/ICircuitBreakerModule.sol
 */
export interface CircuitBreakerModule extends BaseContract {
    circuitBreakerCheck(ucdAmount: bigint, btcAmount: bigint): Promise<ContractTransactionResponse>;
    proposeLimitUpdate(newMaxLoanValue: bigint, newMaxBtcPerPosition: bigint, newDailyLimit: bigint): Promise<ContractTransactionResponse>;
    signLimitUpdate(proposalHash: string): Promise<ContractTransactionResponse>;
    executeLimitUpdate(proposalHash: string, newMaxLoanValue: bigint, newMaxBtcPerPosition: bigint, newDailyLimit: bigint): Promise<ContractTransactionResponse>;
    activateCircuitBreaker(): Promise<ContractTransactionResponse>;
    deactivateCircuitBreaker(): Promise<ContractTransactionResponse>;
    signCircuitBreakerDeactivation(): Promise<ContractTransactionResponse>;
    maxSingleLoanValue(): Promise<bigint>;
    maxBtcPerPosition(): Promise<bigint>;
    dailyVolumeLimit(): Promise<bigint>;
    circuitBreakerActive(): Promise<boolean>;
    circuitBreakerActivatedAt(): Promise<bigint>;
    dailyUcdVolume(day: bigint): Promise<bigint>;
    dailyBtcVolume(day: bigint): Promise<bigint>;
    supportsInterface(interfaceId: string): Promise<boolean>;
}
/**
 * Liquidation Manager Contract Interface
 * Based on contracts/src/interfaces/ILiquidationManager.sol
 */
export interface ILiquidationManager extends BaseContract {
    liquidatePosition(positionId: string, btcPrice: bigint, quantumTimestamp: bigint): Promise<ContractTransactionResponse>;
    commitLiquidation(positionId: string, quantumTimestamp: bigint, btcPrice: bigint): Promise<ContractTransactionResponse>;
    revealAndLiquidate(positionId: string, quantumTimestamp: bigint, btcPrice: bigint, liquidationValidatorSignature: string, deadline: bigint): Promise<ContractTransactionResponse>;
    isLiquidatable(positionId: string, btcPrice: bigint, quantumTimestamp: bigint, liquidationValidatorSignature: string): Promise<boolean>;
    vrfSeeds(positionId: string): Promise<bigint>;
    supportsInterface(interfaceId: string): Promise<boolean>;
}
