feat: 完善安装部署与数字溯源码

This commit is contained in:
Nixevol
2026-07-06 23:26:21 +08:00
parent 7480e4d256
commit 7c6b0bff4c
59 changed files with 2174 additions and 166 deletions
@@ -8,6 +8,7 @@ function makeService(): BlockchainService {
} as unknown as ConfigService;
const settings = {
getAll: async () => ({ blockchainDriver: 'mock' }),
getAllRaw: async () => ({ blockchainDriver: 'mock' }),
} as unknown as SettingsService;
return new BlockchainService(config, settings);
}
@@ -38,7 +38,7 @@ export class BlockchainService {
}
private async buildProvider(): Promise<AttestationProvider> {
const settings = await this.settings.getAll();
const settings = await this.settings.getAllRaw();
const driver = (settings.blockchainDriver || this.config.get<string>('blockchain.driver') || 'mock') as 'mock' | 'tianhe';
if (driver !== 'tianhe') return new MockProvider();