@swaptoshi/dex-module
Version:
Klayr decentralized exchange (dex) on-chain module
44 lines (43 loc) • 2.75 kB
TypeScript
import { Modules, StateMachine } from 'klayr-framework';
import { FeeConversionMethod } from '@swaptoshi/fee-conversion-module';
import { GovernanceMethod } from '@swaptoshi/governance-module';
import { DexInteroperableMethod } from './cc_method';
import { BurnCommand } from './commands/burn_command';
import { CollectCommand } from './commands/collect_command';
import { CollectTreasuryCommand } from './commands/collect_treasury_command';
import { CreatePoolCommand } from './commands/create_pool_command';
import { DecreaseLiquidityCommand } from './commands/decrease_liquidity_command';
import { ExactInputCommand } from './commands/exact_input_command';
import { ExactInputSingleCommand } from './commands/exact_input_single_command';
import { ExactOutputCommand } from './commands/exact_output_command';
import { ExactOutputSingleCommand } from './commands/exact_output_single_command';
import { IncreaseLiquidityCommand } from './commands/increase_liquidity_command';
import { MintCommand } from './commands/mint_command';
import { TreasurifyCommand } from './commands/treasurify_command';
import { DexGovernableConfig } from './config';
import { DexEndpoint } from './endpoint';
import { DexMethod } from './method';
import { DexModuleDependencies, FeeMethod, TokenMethod } from './types';
export declare class DexModule extends Modules.Interoperability.BaseInteroperableModule {
_config: DexGovernableConfig;
_feeMethod: FeeMethod | undefined;
_feeConversionMethod: FeeConversionMethod | undefined;
_tokenMethod: TokenMethod | undefined;
_governanceMethod: GovernanceMethod | undefined;
_dexInteroperableMethod: DexInteroperableMethod;
crossChainCommand: never[];
crossChainMethod: DexInteroperableMethod;
endpoint: DexEndpoint;
method: DexMethod;
commands: (BurnCommand | CollectCommand | CollectTreasuryCommand | CreatePoolCommand | DecreaseLiquidityCommand | ExactInputCommand | ExactInputSingleCommand | ExactOutputCommand | ExactOutputSingleCommand | IncreaseLiquidityCommand | MintCommand | TreasurifyCommand)[];
constructor();
get name(): string;
addDependencies(dependencies: DexModuleDependencies): void;
metadata(): Modules.ModuleMetadata;
init(_args: Modules.ModuleInitArgs): Promise<void>;
verifyTransaction(_context: StateMachine.TransactionVerifyContext): Promise<StateMachine.VerificationResult>;
beforeCommandExecute(_context: StateMachine.TransactionExecuteContext): Promise<void>;
afterCommandExecute(_context: StateMachine.TransactionExecuteContext): Promise<void>;
beforeTransactionsExecute(context: StateMachine.BlockExecuteContext): Promise<void>;
initGenesisState(context: StateMachine.GenesisBlockExecuteContext): Promise<void>;
}