@proto-kit/commonDocs


Documentation / @proto-kit/common / DependencyFactory

Interface: DependencyFactory<Type>

This is an abstract class for creating DependencyFactories, a pattern to bundle multiple smaller services into one and register them into the injection context.

This can for example be a StorageDependencyFactory that creates dependencies like StateService, MerkleWitnessService, etc. So in general, services that are not ConfigurableModules, but still are their own logical unit.

DependencyFactories are designed to only be used statically for sets of deps that are necessary for the sequencer to work.

Type Parameters

Type

Properties

dependencies()

dependencies: () => DependencyRecord<Type>

Returns

DependencyRecord<Type>

Defined in

packages/common/src/dependencyFactory/DependencyFactory.ts:47