UNPKG

@pokt-network/pocket-js

Version:

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

56 lines (55 loc) 1.5 kB
import { Node } from "../"; import { SessionHeader } from "../input"; /** * * * @class DispatchResponse */ export declare class DispatchResponse { /** * * Creates a DispatchResponse object using a JSON string * @param {String} json - JSON string. * @returns {DispatchResponse} - DispatchResponse object. * @memberof DispatchResponse */ static fromJSON(json: string): DispatchResponse; readonly blockHeight: BigInt; readonly header: SessionHeader; readonly key: string; readonly nodes: Node[]; /** * Dispatch Response. * @constructor * @param {BigInt} blockHeight - blockheight the dispatch response was received * @param {SessionHeader} header - * @param {string} key - * @param {Node[]} nodes - */ constructor(blockHeight: BigInt, header: SessionHeader, key: string, nodes: Node[]); /** * * Creates a JSON object with the DispatchResponse properties * @returns {JSON} - JSON Object. * @memberof DispatchResponse */ toJSON(): { block_height: number; session: { header: { app_public_key: string; chain: string; session_height: number; }; key: string; nodes: any; }; }; /** * * Check if the DispatchResponse object is valid * @returns {boolean} - True or false. * @memberof DispatchResponse */ isValid(): boolean; }