import { Transaction } from '../transaction'; import { BytesBuilder } from '../utils/bytesBuilder'; import { BytesReader } from '../utils/bytesReader'; import { AuxPow } from './auxpow'; import { BlockHeader } from './header'; import { getNextWorkRequired, getNextWorkRequiredModern } from './pow'; import type { IAuxPow, IAuxPowJSON, IMerkleBranch, IStandardBlockAuxPow, IStandardBlockAuxPowJSON, IStandardBlockHeader, IStandardBlockHeaderAuxPow, IStandardBlockHeaderAuxPowJSON } from './types'; declare class Block implements IStandardBlockAuxPow { version: number; prevHash: string; merkleRoot: string; timestamp: number; bits: number; nonce: number; auxData?: AuxPow; transactions: Transaction[]; getBlockHeader(): BlockHeader; getBlockHash(): string; byteLength(): number; writeToBytesBuilder(builder: BytesBuilder): BytesBuilder; toBuffer(): Uint8Array; toHex(): string; toBlockJSON(): IStandardBlockAuxPowJSON; getTarget(): bigint; isNull(): boolean; getBaseVersion(): number; getChainId(): number; isAuxPow(): boolean; isLegacy(): boolean; static fromBlockJSON({ version, prevHash, merkleRoot, timestamp, bits, nonce, auxData, transactions, }: IStandardBlockAuxPowJSON): Block; static fromBase({ version, prevHash, merkleRoot, timestamp, bits, nonce, auxData, transactions, }: IStandardBlockAuxPow): Block; static fromBytesReader(reader: BytesReader): Block; static fromBuffer(buffer: Uint8Array): Block; static fromHex(hex: string): Block; } export { Block, BlockHeader, AuxPow, getNextWorkRequiredModern, getNextWorkRequired, }; export type { IAuxPow, IAuxPowJSON, IStandardBlockHeader, IMerkleBranch, IStandardBlockHeaderAuxPow, IStandardBlockHeaderAuxPowJSON, IStandardBlockAuxPow, IStandardBlockAuxPowJSON, };