UNPKG

@swaptoshi/governance-module

Version:

Klayr governance on-chain module

38 lines (37 loc) 2.2 kB
import { Modules, Types } from 'klayr-framework'; import { Constructor, ImmutableContext, ImmutableGovernanceContext, MutableGovernanceContext, TokenMethod } from '../../types'; import { GovernanceGovernableConfig } from '../../config'; import { GovernanceInternalMethod } from '../../internal_method'; export interface AddDependenciesParam<T extends ImmutableGovernanceContext | MutableGovernanceContext> { context: T; tokenMethod?: TokenMethod; internalMethod?: GovernanceInternalMethod; } export declare class BaseInstance<T, K extends Modules.BaseStore<T>> { constructor(storeKey: Constructor, stores: Modules.NamedRegistry, events: Modules.NamedRegistry, config: GovernanceGovernableConfig, genesisConfig: Types.GenesisConfig, moduleName: string, key?: Buffer); toJSON(): Types.JSONObject<T>; toObject(): T; addImmutableDependencies(param: AddDependenciesParam<ImmutableGovernanceContext>): void; addMutableDependencies(param: AddDependenciesParam<MutableGovernanceContext>): void; addDependencies(param: AddDependenciesParam<MutableGovernanceContext>): void; getConfig(context: ImmutableContext): Promise<import("../../types").GovernanceModuleConfig>; protected _checkMutableDependencies(): void; protected _checkImmutableDependencies(): void; protected _checkDependencies(): void; protected _setKey(key: Buffer): void; protected _saveStore(): Promise<void>; protected readonly instanceStore: K; protected readonly stores: Modules.NamedRegistry; protected readonly events: Modules.NamedRegistry; protected readonly genesisConfig: Types.GenesisConfig; protected readonly moduleName: string; protected readonly config: GovernanceGovernableConfig; protected readonly tokenMethod: TokenMethod | undefined; protected readonly internalMethod: GovernanceInternalMethod | undefined; protected context: MutableGovernanceContext | undefined; protected immutableContext: ImmutableGovernanceContext | undefined; protected mutableContext: MutableGovernanceContext | undefined; protected mutableDependencyReady: boolean; protected immutableDependencyReady: boolean; protected key: Buffer; }