@pokt-network/pocket-js
Version:
Pocket-js core package with the main functionalities to interact with the Pocket Network.
68 lines (67 loc) • 1.84 kB
TypeScript
import { RelayProof } from "../relay-proof";
import { RelayPayload } from "./relay-payload";
import { RelayMeta } from "./relay-meta";
/**
*
*
* @class RelayRequest
*/
export declare class RelayRequest {
/**
*
* Creates a RelayRequest object using a JSON string
* @param {String} json - JSON string.
* @returns {RelayRequest} - RelayRequest object.
* @memberof RelayRequest
*/
static fromJSON(json: string): RelayRequest;
readonly payload: RelayPayload;
readonly meta: RelayMeta;
readonly proof: RelayProof;
/**
* Relay Request.
* @constructor
* @param {RelayPayload} payload - Relay payload.
* @param {RelayMeta} meta - Relay meta.
* @param {RelayProof} proof - Proof object.
*/
constructor(payload: RelayPayload, meta: RelayMeta, proof: RelayProof);
/**
*
* Creates a JSON object with the RelayRequest properties
* @returns {JSON} - JSON Object.
* @memberof RelayRequest
*/
toJSON(): {
payload: {
data: string;
method: string;
path: string;
headers: Record<string, string> | null | undefined;
};
meta: {
block_height: number;
};
proof: {
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 RelayRequest object is valid
* @returns {boolean} - True or false.
* @memberof RelayRequest
*/
isValid(): boolean;
}