@kyve/core-beta
Version:
🚀 The base KYVE node implementation.
101 lines (100 loc) • 4.67 kB
TypeScript
import { PoolResponse } from "@kyve/proto-beta/lcd/kyve/query/v1beta1/pools";
import KyveSDK, { KyveClient, KyveLCDClientType } from "@kyve/sdk-beta";
import { Logger } from "tslog";
import { canPropose, canVote, claimUploaderRole, compressionFactory, continueRound, createBundleProposal, getBalances, runCache, runNode, saveBundleDecompress, saveBundleDownload, saveGetTransformDataItem, saveLoadValidationBundle, setupCacheProvider, setupLogger, setupMetrics, setupSDK, setupValidator, skipUploaderRole, storageProviderFactory, submitBundleProposal, syncPoolConfig, syncPoolState, validateBundleProposal, validateIsNodeValidator, validateIsPoolActive, validateRuntime, validateVersion, voteBundleProposal, waitForAuthorization, waitForCacheContinuation, waitForNextBundleProposal, waitForUploadInterval } from "./methods";
import { ICacheProvider, IMetrics, IRuntime } from "./types";
/**
* Main class of KYVE protocol nodes representing a node.
*
* @class Node
* @constructor
*/
export declare class Node {
protected runtime: IRuntime;
protected cacheProvider: ICacheProvider;
sdk: KyveSDK;
client: KyveClient;
lcd: KyveLCDClientType;
coreVersion: string;
pool: PoolResponse;
poolConfig: any;
name: string;
logger: Logger;
m: IMetrics;
protected poolId: number;
protected staker: string;
protected valaccount: string;
protected storagePriv: string;
protected network: string;
protected rpc: string;
protected rest: string;
protected cache: string;
protected debug: boolean;
protected metrics: boolean;
protected metricsPort: number;
protected home: string;
protected setupLogger: typeof setupLogger;
protected setupCacheProvider: typeof setupCacheProvider;
protected setupMetrics: typeof setupMetrics;
protected setupSDK: typeof setupSDK;
protected setupValidator: typeof setupValidator;
protected validateRuntime: typeof validateRuntime;
protected validateVersion: typeof validateVersion;
protected validateIsNodeValidator: typeof validateIsNodeValidator;
protected validateIsPoolActive: typeof validateIsPoolActive;
protected waitForAuthorization: typeof waitForAuthorization;
protected waitForUploadInterval: typeof waitForUploadInterval;
protected waitForNextBundleProposal: typeof waitForNextBundleProposal;
protected waitForCacheContinuation: typeof waitForCacheContinuation;
protected continueRound: typeof continueRound;
protected saveGetTransformDataItem: typeof saveGetTransformDataItem;
protected storageProviderFactory: typeof storageProviderFactory;
protected compressionFactory: typeof compressionFactory;
protected claimUploaderRole: typeof claimUploaderRole;
protected skipUploaderRole: typeof skipUploaderRole;
protected voteBundleProposal: typeof voteBundleProposal;
protected submitBundleProposal: typeof submitBundleProposal;
protected syncPoolState: typeof syncPoolState;
protected syncPoolConfig: typeof syncPoolConfig;
protected getBalances: typeof getBalances;
protected canVote: typeof canVote;
protected canPropose: typeof canPropose;
protected saveBundleDownload: typeof saveBundleDownload;
protected saveBundleDecompress: typeof saveBundleDecompress;
protected saveLoadValidationBundle: typeof saveLoadValidationBundle;
protected validateBundleProposal: typeof validateBundleProposal;
protected createBundleProposal: typeof createBundleProposal;
protected runNode: typeof runNode;
protected runCache: typeof runCache;
/**
* Constructor for the core class. It is required to provide the
* runtime class here in order to run the
*
* @method constructor
* @param {IRuntime} runtime which implements the interface IRuntime
*/
constructor(runtime: IRuntime);
/**
* Bootstrap method for protocol node. It initializes all commands including
* the main program which can be called with "start"
*
* @method bootstrap
* @return {void}
*/
bootstrap(): void;
/**
* Main method of @kyve/core. By running this method the node will start and run.
* For this method to run the Runtime, Storage Provider and the Cache have to be added first.
*
* This method will run indefinetely and only exits on specific exit conditions like running
* an incorrect runtime or version.
*
* @method start
* @param {OptionValues} options contains all node options defined in bootstrap
* @return {Promise<void>}
*/
private start;
}
export * from "./commander";
export * from "./types";
export * from "./utils";