UNPKG

@pokt-network/pocket-js

Version:

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

37 lines (36 loc) 2.7 kB
/** * * * @class Configuration */ export declare class Configuration { readonly maxDispatchers: number; readonly maxSessions: number; consensusNodeCount: number; readonly requestTimeOut: number; readonly acceptDisputedResponses: boolean; readonly sessionBlockFrequency: number; readonly blockTime: number; readonly maxSessionRefreshRetries: number; readonly validateRelayResponses: boolean; readonly rejectSelfSignedCertificates: boolean; readonly useLegacyTxCodec: boolean; /** * Stores multiple properties used to interact with the Pocket Network. * @constructor * @param {number} maxDispatchers - (optional) Maximun amount of dispatchers urls to stored in rounting table, default 50. * @param {number} maxSessions - (optional) Maximun amount of sessions to stored for the session manager, default 0. * @param {number} consensusNodeCount - (optional) Maximun amount of nodes for local consensus, mandatory ODD number, default 0. * @param {number} requestTimeOut - (optional) Maximun timeout for every request in miliseconds, default 0. * @param {boolean} acceptDisputedResponses - (optional) Accept or reject responses based on having a full consensus, default false. * @param {number} sessionBlockFrequency - (optional) Amount of blocks that need to elapse for a new session to be tumbled, look at https://github.com/pokt-network/pocket-network-genesis for more information. * @param {number} blockTime - (optional) Amount of time (in milliseconds) for a new block to be produced in the Pocket Network. * @param {number} maxSessionRefreshRetries - (optional) Amount of times to perform a session refresh in case of getting error code 1124 (Invalid Session), default 1. * @param {boolean} validateRelayResponses - (optional) If True the relay responses are validated againt's the relay request information, False will not validate. * @param {boolean} rejectSelfSignedCertificates - (optional) If True the HTTP RPC provider will force certificates to come from CAs, False will allow self signed. * @param {boolean} useLegacyTxCodec - (optional) If True the legacy tx codec will be used (AminoJS), false will use the new ProtoBuf encoding, default is true. * @memberof Configuration */ constructor(maxDispatchers?: number, maxSessions?: number, consensusNodeCount?: number, requestTimeOut?: number, acceptDisputedResponses?: boolean, sessionBlockFrequency?: number, blockTime?: number, maxSessionRefreshRetries?: number, validateRelayResponses?: boolean, rejectSelfSignedCertificates?: boolean, useLegacyTxCodec?: boolean); setconsensusNodeCount(v: number): void; }