@pokt-network/pocket-js
Version:
Pocket-js core package with the main functionalities to interact with the Pocket Network.
67 lines (66 loc) • 2.05 kB
TypeScript
import { BlockID } from "./block-id";
/**
*
*
* @class CommitSignature
*/
export declare class CommitSignature {
/**
*
* Creates a CommitSignature object using a JSON string
* @param {String} json - JSON string.
* @returns {CommitSignature} - CommitSignature object.
* @memberof CommitSignature
*/
static fromJSON(json: string): CommitSignature;
readonly type: string;
readonly height: BigInt;
readonly round: number;
readonly blockID: BlockID;
readonly timestamp: string;
readonly validatorAddress: string;
readonly validatorIndex: number;
readonly signature: string;
/**
* CommitSignature.
* @constructor
* @param {string} type - CommitSignature type.
* @param {BigInt} height - Block height.
* @param {number} round - Equal or greater than 0, number of rounds required for the commit.
* @param {BlockID} blockID - BlockID object.
* @param {string} timestamp - Commit signature timestamp.
* @param {string} validatorAddress - Validator address.
* @param {number} validatorIndex - Validator index.
* @param {string} signature - Signature hash.
*/
constructor(type: string, height: BigInt, round: number, blockID: BlockID, timestamp: string, validatorAddress: string, validatorIndex: number, signature: string);
/**
*
* Creates a JSON object with the CommitSignature properties
* @returns {JSON} - JSON Object.
* @memberof CommitSignature
*/
toJSON(): {
block_id: {
hash: string;
parts: {
hash: string;
total: number;
};
};
height: number;
round: number;
signature: string;
timestamp: string;
type: string;
validator_address: string;
validator_index: number;
};
/**
*
* Check if the CommitSignature object is valid
* @returns {boolean} - True or false.
* @memberof CommitSignature
*/
isValid(): boolean;
}