/// import { IEncodable } from '../encoder/encoder'; import { Transaction, ITransaction } from '../transaction/transaction'; import { BlockHeader, IBlockHeader } from './header'; export interface IBlock extends IBlockHeader { hash: string; transactions: ITransaction[]; blocksig?: string; } export declare class Block implements IEncodable { header: BlockHeader; transactions: Transaction[]; blocksig?: string | undefined; constructor(header: BlockHeader, transactions: Transaction[], blocksig?: string | undefined); /** * Serializes the block as a buffer. * * @returns buffer */ toBuffer(): Buffer; /** * Serializes the block into hex encoded string. * * @returns hex encoded string */ toString(): string; /** * Get the block hash * * @param format hex or buffer format * @returns block hash as string or buffer depending on the chosen format */ getHash(format?: 'buffer' | 'hex'): string | Buffer; toJSON(network?: string): IBlock; static decode(data: Buffer | string): Block; }