UNPKG

@pokt-network/pocket-js

Version:

Pocket-js core package with the main functionalities to interact with the Pocket Network.

72 lines (71 loc) 1.85 kB
import { BlockID } from "./block-id"; import { BlockHeader } from "./block-header"; /** * * * @class BlockMeta */ export declare class BlockMeta { /** * * Creates a BlockMeta object using a JSON string * @param {String} json - JSON string. * @returns {BlockMeta} - BlockMeta object. * @memberof BlockMeta */ static fromJSON(json: string): BlockMeta; readonly blockID: BlockID; readonly header: BlockHeader; /** * BlockMeta. * @constructor * @param {BlockID} blockID - BlockMeta block_id. * @param {BlockHeader} header - Block header. */ constructor(blockID: BlockID, header: BlockHeader); /** * * Creates a JSON object with the BlockMeta properties * @returns {JSON} - JSON Object. * @memberof BlockMeta */ toJSON(): { block_id: { hash: string; parts: { hash: string; total: number; }; }; header: { app_hash: string; chain_id: string; consensus_hash: string; data_hash: string; evidence_hash: string; height: number; last_block_id: { hash: string; parts: { hash: string; total: number; }; }; last_commit_hash: string; last_results_hash: string; next_validators_hash: string; num_txs: number; proposer_address: string; time: string; total_txs: number; validators_hash: string; }; }; /** * * Check if the BlockMeta object is valid * @returns {boolean} - True or false. * @memberof BlockMeta */ isValid(): boolean; }