

import { FormattedBlock } from '../modules/blocks/utils';
import { Transaction } from './transaction';


export interface Block {
  id?: string;
  number: string; 
  hash: string;
  timestamp: string | number;
  parentHash: string;
  transactions: Transaction[] | string[];
  size?: string;
  txCount?: number;
  gasUsed?: string;
  gasLimit?: string;
  baseFeePerGas?: string; 
  baseFee?: string; 
  minimumGasPrice?: string; 
  gasPrice?: string; 
  status?: string;
  validator?: string;
  miner?: string;  
  latestBlockNumber?: number;
  rootHash?: string;
  l1BlockNumber?: string | number; 
  stateRoot?: string; 
  receiptsRoot?: string; 
  extraData?: string; 
  logsBloom?: string; 
  difficulty?: string; 
  totalDifficulty?: string; 
  nonce?: string; 
  mixHash?: string; 
  sha3Uncles?: string; 
  sendCount?: string; 
  sendRoot?: string; 
  batchId?: string | number; 
  batchStatus?: string; 
} 



export interface PaginatedBlocks {
  blocks: FormattedBlock[];
  totalCount: number;
  totalPages: number;
  page: number;
  perPage: number;
}


export interface BlockchainStats {
  totalBlocks: number;
  avgBlockTime: number; 
  blockTimeChange: number; 
  avgTxPerBlock: number;
  txPerBlockChange: number; 
  totalTransactions: number;
}

export interface EnhancedBlock extends FormattedBlock {
  transactions?: any[];
  transferTxCount?: number;
  contractTxCount?: number;
  validator?: string;
  miner?: string;
  parentHash?: string;
  rootHash?: string;
  stateRoot?: string;
  receiptsRoot?: string;
  extraData?: string;
  validatorBlocks?: number;
}
