UNPKG

@pokt-network/pocket-js

Version:

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

46 lines (45 loc) 965 B
export interface IKVPair { "key": string; "value": string; } /** * * * @class Event */ export declare class Event { /** * * Creates a Event object using a JSON string * @param {String} json - JSON string. * @returns {Event} - Event object. * @memberof Event */ static fromJSON(json: string): Event; readonly type: string; readonly attributes: IKVPair[]; /** * Creates a Event. * @constructor * @param {string} type - * @param {IKVPair} attributes - */ constructor(type: string, attributes: IKVPair[]); /** * * Creates a JSON object with the Event properties * @returns {JSON} - JSON Object. * @memberof Event */ toJSON(): { type: string; attributes: IKVPair[]; }; /** * * Verify if all properties are valid * @returns {boolean} - True or false. * @memberof Event */ isValid(): boolean; }