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. String? fundingBeefHex,
  18. int? fundingInputSats,
  19. int fundingBroadcastAttempts = 0,
  20. bool fundingBroadcastInFlight = false,
  21. String? fundingBroadcastError,
  22. bool fundingRecordedInWallet = false,
  23. bool fundingSent = false,
  24. bool fundingFailed = false,
  25. int? lockTimeUnix,
  26. String? refundTxHex,
  27. String? refundClientSigHex,
  28. String? refundServerSigHex,
  29. String? signedRefundTxHex,
  30. BigInt? clientBalanceSats,
  31. BigInt? serverBalanceSats,
  32. int latestSequenceNumber = 0,
  33. String? latestPaymentTxHex,
  34. String? latestPaymentTxId,
  35. String? latestClientSignatureHex,
  36. bool returnLegRecordedInWallet = false,
  37. String? context,
  38. String? counterpartyMarker,
  39. DateTime? createdAt,
  40. String? refundClaimedTxId,
  41. DateTime? closedAt,
  42. int version = 0,
  43. 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.fundingBeefHex,
  this.fundingInputSats,
  this.fundingBroadcastAttempts = 0,
  this.fundingBroadcastInFlight = false,
  this.fundingBroadcastError,
  this.fundingRecordedInWallet = false,
  this.fundingSent = false,
  this.fundingFailed = false,
  this.lockTimeUnix,
  this.refundTxHex,
  this.refundClientSigHex,
  this.refundServerSigHex,
  this.signedRefundTxHex,
  BigInt? clientBalanceSats,
  BigInt? serverBalanceSats,
  this.latestSequenceNumber = 0,
  this.latestPaymentTxHex,
  this.latestPaymentTxId,
  this.latestClientSignatureHex,
  this.returnLegRecordedInWallet = false,
  this.context,
  this.counterpartyMarker,
  this.createdAt,
  this.refundClaimedTxId,
  this.closedAt,
  this.version = 0,
  DateTime? lastModified,
})  : fundingAmountSats = fundingAmountSats ?? BigInt.zero,
      clientBalanceSats = clientBalanceSats ?? BigInt.zero,
      serverBalanceSats = serverBalanceSats ?? BigInt.zero,
      fundingAncestorTxids = frozenList(fundingAncestorTxids ?? const <String>[]),
      lastModified = lastModified ?? DateTime.now(),
      super(version: version, lastModified: lastModified ?? DateTime.now());