UNPKG

@pokt-network/pocket-js

Version:

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

45 lines (44 loc) 1.21 kB
/** * * * @class SessionHeader */ export declare class SessionHeader { /** * * Creates a SessionHeader object using a JSON string * @param {string} json - JSON string. * @returns {SessionHeader} - SessionHeader object. * @memberof SessionHeader */ static fromJSON(json: string): SessionHeader; readonly applicationPubKey: string; readonly chain: string; readonly sessionBlockHeight: BigInt; /** * Request for Session. * @constructor * @param {string} applicationPubKey - Application Key associated with a client. * @param {string} chain - Chain. * @param {BigInt} sessionBlockHeight - Height of session. */ constructor(applicationPubKey: string, chain: string, sessionBlockHeight: BigInt); /** * * Creates a JSON object with the SessionHeader properties * @returns {JSON} - JSON Object. * @memberof SessionHeader */ toJSON(): { app_public_key: string; chain: string; session_height: number; }; /** * * Check if the SessionHeader is valid * @returns {boolean} - True or false. * @memberof Session */ isValid(): boolean; }