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.46 kB
/** * * * @class RequestHash */ import { RelayPayload } from "./relay-payload"; import { RelayMeta } from "./relay-meta"; export declare class RequestHash { /** * * Creates a RequestHash object using a JSON string * @param {string} json - JSON string. * @returns {RequestHash} - RequestHash object. * @memberof RequestHash */ static fromJSON(json: string): RequestHash; readonly payload: RelayPayload; readonly meta: RelayMeta; /** * Request Hash. * @constructor * @param {RelayPayload} payload - RelayPayload object. * @param {RelayMeta} meta - RelayMeta object. */ constructor(payload: RelayPayload, meta: RelayMeta); /** * * Creates a JSON object with the RequestHash properties * @returns {JSON} - JSON Object. * @memberof RelayMeta */ toJSON(): { payload: { data: string; method: string; /** * * Check if the RequestHash object is valid * @returns {boolean} - True or false. * @memberof RequestHash */ path: string; headers: Record<string, string> | null | undefined; }; meta: { block_height: number; }; }; /** * * Check if the RequestHash object is valid * @returns {boolean} - True or false. * @memberof RequestHash */ isValid(): boolean; }