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, - String? fundingBeefHex,
- int? fundingInputSats,
- int fundingBroadcastAttempts = 0,
- bool fundingBroadcastInFlight = false,
- String? fundingBroadcastError,
- bool fundingRecordedInWallet = false,
- bool fundingSent = false,
- bool fundingFailed = false,
- int? lockTimeUnix,
- String? refundTxHex,
- String? refundClientSigHex,
- String? refundServerSigHex,
- String? signedRefundTxHex,
- BigInt? clientBalanceSats,
- BigInt? serverBalanceSats,
- int latestSequenceNumber = 0,
- String? latestPaymentTxHex,
- String? latestPaymentTxId,
- String? latestClientSignatureHex,
- bool returnLegRecordedInWallet = false,
- String? context,
- String? counterpartyMarker,
- DateTime? createdAt,
- String? refundClaimedTxId,
- 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.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());