ChannelState constructor
ChannelState({
- required String channelId,
- String? walletId,
- ChannelStatus status = ChannelStatus.pending,
- ChannelRole? role,
- String? clientPeerId,
- String? serverPeerId,
- String? clientPubKeyHex,
- String? serverPubKeyHex,
- String? clientAddressB58,
- String? serverAddressB58,
- int? derivationIndex,
- BigInt? fundingAmountSats,
- String? fundingTxId,
- String? fundingTxHex,
- int? fundingOutputIndex,
- List<
String> ? fundingAncestorTxids, - int? lockTimeUnix,
- String? refundTxHex,
- String? refundClientSigHex,
- String? refundServerSigHex,
- BigInt? clientBalanceSats,
- BigInt? serverBalanceSats,
- int latestSequenceNumber = 0,
- String? latestPaymentTxHex,
- String? latestPaymentTxId,
- String? context,
- DateTime? createdAt,
- DateTime? closedAt,
- int version = 0,
- 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());