UNPKG

@swaptoshi/governance-module

Version:

Klayr governance on-chain module

33 lines (32 loc) 1.97 kB
import { Modules, StateMachine } from 'klayr-framework'; import { BoostVoteCommand } from './commands/boost_vote_command'; import { CreateProposalCommand } from './commands/create_proposal_command'; import { DelegateVoteCommand } from './commands/delegate_vote_command'; import { RevokeDelegatedVoteCommand } from './commands/revoke_delegated_vote_command'; import { SetProposalAttributesCommand } from './commands/set_proposal_attributes_command'; import { VoteCommand } from './commands/vote_command'; import { GovernanceGovernableConfig } from './config'; import { GovernanceEndpoint } from './endpoint'; import { GovernanceMethod } from './method'; import { FeeMethod, GovernanceModuleDependencies } from './types'; export declare class GovernanceModule extends Modules.BaseModule { _config: GovernanceGovernableConfig; _feeMethod: FeeMethod | undefined; endpoint: GovernanceEndpoint; method: GovernanceMethod; commands: (BoostVoteCommand | CreateProposalCommand | DelegateVoteCommand | RevokeDelegatedVoteCommand | SetProposalAttributesCommand | VoteCommand)[]; private readonly _governableConfig; private readonly _internalMethod; constructor(); get name(): string; metadata(): Modules.ModuleMetadata; init(args: Modules.ModuleInitArgs): Promise<void>; addDependencies(dependencies: GovernanceModuleDependencies): void; verifyTransaction(_context: StateMachine.TransactionVerifyContext): Promise<StateMachine.VerificationResult>; beforeCommandExecute(_context: StateMachine.TransactionExecuteContext): Promise<void>; afterCommandExecute(context: StateMachine.TransactionExecuteContext): Promise<void>; afterTransactionsExecute(context: StateMachine.BlockAfterExecuteContext): Promise<void>; beforeTransactionsExecute(context: StateMachine.BlockExecuteContext): Promise<void>; initGenesisState(context: StateMachine.GenesisBlockExecuteContext): Promise<void>; private _initGovernableConfig; }