import { Repositories } from '../db/repositories' ; import blockService , { BlockService } from './block-service' ; import cardanoService , { CardanoService , DepositParameters } from './cardano-services' ; import constructionService , { ConstructionService } from './construction-service' ; import networkService , { NetworkService , TopologyConfig } from './network-service' ; export interface Services { blockService : BlockService ; constructionService : ConstructionService ; networkService : NetworkService ; cardanoService : CardanoService ; } param repositories export const configure = ( repositories , networkId , networkMagic , topologyFile , DEFAULT_RELATIVE_TTL , depositParameters ) : Services => { const cardanoServiceInstance = cardanoService ( depositParameters ) ; const blockServiceInstance = blockService ( repositories . blockchainRepository , cardanoServiceInstance ) ; return { blockService : blockServiceInstance , constructionService : constructionService ( blockServiceInstance , DEFAULT_RELATIVE_TTL ) , networkService : networkService ( networkId , networkMagic , blockServiceInstance , topologyFile ) , cardanoService : cardanoServiceInstance } ; } ;