UNPKG

@pokt-network/pocket-js

Version:

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

61 lines (60 loc) 2.09 kB
import { StakingStatus } from "./staking-status"; /** * * * @class Application */ export declare class Application { /** * * Creates a Application object using a JSON string * @param {String} json - JSON string. * @returns {Application} - Application object. * @memberof Application */ static fromJSON(json: string): Application; readonly address: string; readonly publicKey: string; readonly jailed: boolean; readonly status: StakingStatus; readonly chains: string[]; readonly stakedTokens: BigInt; readonly maxRelays: BigInt; readonly unstakingCompletionTime: string | undefined; /** * Creates a Application. * @constructor * @param {string} address - The hex address of the application * @param {string} publicKey - The hex consensus public key of the application. * @param {boolean} jailed - Has the application been jailed from staked status? * @param {StakingStatus} status - Application staking status * @param {string[]} chains - An array of blockchains * @param {BigInt} stakedTokens - How many staked tokens * @param {BigInt} maxRelays - Max amount of relays. * @param {string} unstakingCompletionTime - If unstaking, min time for the application to complete unstaking */ constructor(address: string, publicKey: string, jailed: boolean, status: StakingStatus, chains: string[] | undefined, stakedTokens: BigInt, maxRelays: BigInt, unstakingCompletionTime?: string); /** * * Creates a JSON object with the Application properties * @returns {JSON} - JSON Object. * @memberof Application */ toJSON(): { address: string; chains: string[]; public_key: string; jailed: boolean; max_relays: number; status: StakingStatus; staked_tokens: number; unstaking_time: string | undefined; }; /** * * Verify if all properties are valid * @returns {boolean} - True or false. * @memberof Application */ isValid(): boolean; }