rwadurian/backend/services/blockchain-service/src/application/application.module.ts

55 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Module } from '@nestjs/common';
import { InfrastructureModule } from '@/infrastructure/infrastructure.module';
import { DomainModule } from '@/domain/domain.module';
import {
AddressDerivationService,
DepositDetectionService,
BalanceQueryService,
MnemonicVerificationService,
OutboxPublisherService,
DepositRepairService,
MpcTransferInitializerService,
} from './services';
import { MpcKeygenCompletedHandler, WithdrawalRequestedHandler } from './event-handlers';
import { SystemWithdrawalRequestedHandler } from './event-handlers/system-withdrawal-requested.handler';
import { DepositAckConsumerService } from '@/infrastructure/kafka/deposit-ack-consumer.service';
import { HotWalletBalanceScheduler } from './schedulers';
@Module({
imports: [InfrastructureModule, DomainModule],
providers: [
// 应用服务
AddressDerivationService,
DepositDetectionService,
BalanceQueryService,
MnemonicVerificationService,
OutboxPublisherService,
DepositRepairService,
MpcTransferInitializerService,
// 事件消费者(依赖 OutboxPublisherService需要在这里注册
DepositAckConsumerService,
// 事件处理器
MpcKeygenCompletedHandler,
WithdrawalRequestedHandler,
SystemWithdrawalRequestedHandler,
// 定时任务
HotWalletBalanceScheduler,
],
exports: [
AddressDerivationService,
DepositDetectionService,
BalanceQueryService,
MnemonicVerificationService,
OutboxPublisherService,
DepositRepairService,
DepositAckConsumerService,
MpcKeygenCompletedHandler,
WithdrawalRequestedHandler,
SystemWithdrawalRequestedHandler,
],
})
export class ApplicationModule {}