PaymentChannelAggregate constructor

PaymentChannelAggregate({
  1. required String aggregateId,
  2. required EventStore eventStore,
  3. required CryptoService cryptoService,
  4. NetworkType networkType = dartsv.NetworkType.TEST,
})

Implementation

PaymentChannelAggregate({
  required String aggregateId, // This is the channelId
  required EventStore eventStore,
  required CryptoService cryptoService,
  dartsv.NetworkType networkType = dartsv.NetworkType.TEST,
}) : _networkType = networkType,
      super(
        aggregateId: aggregateId,
        aggregateType: 'PaymentChannel',
        eventStore: eventStore,
      ) {
  _channelBuilder = PaymentChannelBuilder(cryptoService: cryptoService);
  registerHandlers();
}