@pokt-network/pocket-js
Version:
Pocket-js core package with the main functionalities to interact with the Pocket Network.
56 lines (55 loc) • 1.76 kB
TypeScript
import { ConsensusNode } from "../consensus-node";
import { MajorityResponse } from "../input/majority-response";
import { MinorityResponse } from "../input/minority-response";
/**
*
*
* @class ConsensusRelayResponse
*/
export declare class ConsensusRelayResponse {
/**
*
* Creates a ConsensusRelayResponse object using a JSON string
* @param {String} json - JSON string.
* @returns {ConsensusRelayResponse} - ConsensusRelayResponse object.
* @memberof ConsensusRelayResponse
*/
static fromJSON(json: string): ConsensusRelayResponse;
readonly signature: string;
readonly payload: string;
readonly consensusNodes: ConsensusNode[];
consensusResult: boolean;
majorityResponse?: MajorityResponse;
minorityResponse?: MinorityResponse;
/**
* Consensus Relay Response.
* @constructor
* @param {string} signature - Signature.
* @param {string} payload - payload string.
* @param {ConsensusNode[]} consensusNodes - List of the nodes participating in the consensus.
*/
constructor(signature: string, payload: string, consensusNodes: ConsensusNode[]);
/**
*
* Creates a JSON object with the ConsensusRelayResponse properties
* @returns {JSON} - JSON Object.
* @memberof ConsensusRelayResponse
*/
toJSON(): {
payload: string;
signature: string;
};
/**
*
* Check if the ConsensusRelayResponse object is valid
* @returns {boolean} - True or false.
* @memberof ConsensusRelayResponse
*/
isValid(): boolean;
/**
*
* Returns whether the local consensus result is positive or negative
* @memberof ConsensusRelayResponse
*/
private setLocalConsensusResults;
}