ChannelState constructor

ChannelState({
  1. required String channelId,
  2. String? walletId,
  3. ChannelStatus status = ChannelStatus.pending,
  4. ChannelRole? role,
  5. String? clientPeerId,
  6. String? serverPeerId,
  7. String? clientPubKeyHex,
  8. String? serverPubKeyHex,
  9. String? clientAddressB58,
  10. String? serverAddressB58,
  11. int? derivationIndex,
  12. BigInt? fundingAmountSats,
  13. String? fundingTxId,
  14. String? fundingTxHex,
  15. int? fundingOutputIndex,
  16. List<String>? fundingAncestorTxids,
  17. int? lockTimeUnix,
  18. String? refundTxHex,
  19. String? refundClientSigHex,
  20. String? refundServerSigHex,
  21. BigInt? clientBalanceSats,
  22. BigInt? serverBalanceSats,
  23. int latestSequenceNumber = 0,
  24. String? latestPaymentTxHex,
  25. String? latestPaymentTxId,
  26. String? context,
  27. DateTime? createdAt,
  28. DateTime? closedAt,
  29. int version = 0,
  30. DateTime? lastModified,
})

Implementation

ChannelState({
  required this.channelId,
  this.walletId,
  this.status = ChannelStatus.pending,
  this.role,
  this.clientPeerId,
  this.serverPeerId,
  this.clientPubKeyHex,
  this.serverPubKeyHex,
  this.clientAddressB58,
  this.serverAddressB58,
  this.derivationIndex,
  BigInt? fundingAmountSats,
  this.fundingTxId,
  this.fundingTxHex,
  this.fundingOutputIndex,
  List<String>? fundingAncestorTxids,
  this.lockTimeUnix,
  this.refundTxHex,
  this.refundClientSigHex,
  this.refundServerSigHex,
  BigInt? clientBalanceSats,
  BigInt? serverBalanceSats,
  this.latestSequenceNumber = 0,
  this.latestPaymentTxHex,
  this.latestPaymentTxId,
  this.context,
  this.createdAt,
  this.closedAt,
  this.version = 0,
  DateTime? lastModified,
})  : fundingAmountSats = fundingAmountSats ?? BigInt.zero,
      clientBalanceSats = clientBalanceSats ?? BigInt.zero,
      serverBalanceSats = serverBalanceSats ?? BigInt.zero,
      fundingAncestorTxids = fundingAncestorTxids ?? [],
      lastModified = lastModified ?? DateTime.now(),
      super(version: version, lastModified: lastModified ?? DateTime.now());