PaymentChannelAggregate constructor

PaymentChannelAggregate({
  1. required String aggregateId,
  2. required EventStore eventStore,
  3. required CryptoService cryptoService,
})

Implementation

PaymentChannelAggregate({
  required String aggregateId, // This is the channelId
  required EventStore eventStore,
  required CryptoService cryptoService,
}) : _cryptoService = cryptoService,
      super(
        aggregateId: aggregateId,
        aggregateType: 'PaymentChannel',
        eventStore: eventStore,
      ) {
  _channelBuilder = const PaymentChannelBuilder();
  registerHandlers();
}