UNPKG

@pokt-network/pocket-js

Version:

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

63 lines (62 loc) 1.9 kB
import { PocketAAT } from "@pokt-network/aat-js"; /** * * * @class Proof */ export declare class RelayProofResponse { /** * * Creates a Proof object using a JSON string * @param {string} json - JSON string. * @returns {RelayProofResponse} - Proof object. * @memberof Proof */ static fromJSON(json: string): RelayProofResponse; readonly entropy: BigInt; readonly sessionBlockHeight: BigInt; readonly servicerPubKey: string; readonly blockchain: string; readonly token: PocketAAT; readonly signature: string; readonly requestHash: string; /** * Proof. * @constructor * @param {BigInt} entropy - Index entropy value. * @param {BigInt} sessionBlockHeight - Session Block Height. * @param {string} servicerPubKey - Service PublicKey. * @param {string} blockchain - Blockchain hash. * @param {PocketAAT} token - Application Authentication Token object. * @param {string} signature - Proof's signature. * @param {string} requestHash - RequestHash string. */ constructor(entropy: BigInt, sessionBlockHeight: BigInt, servicerPubKey: string, blockchain: string, token: PocketAAT, signature: string, requestHash: string); /** * * Creates a JSON object with the Proof properties * @returns {JSON} - JSON Object. * @memberof Proof */ toJSON(): { entropy: number; session_block_height: number; servicer_pub_key: string; blockchain: string; aat: { version: string; app_pub_key: string; client_pub_key: string; signature: string; }; signature: string; request_hash: string; }; /** * * Check if the Proof object is valid * @returns {boolean} - True or false. * @memberof Proof */ isValid(): boolean; }