SplitUTXOsToBenfordCommand constructor
SplitUTXOsToBenfordCommand({})
Implementation
SplitUTXOsToBenfordCommand({
required String walletId,
required this.targetUtxoCount,
this.feeRate,
this.maxUtxosToSplit,
String? commandId,
DateTime? timestamp,
Map<String, dynamic>? metadata,
}) : super(
walletId: walletId,
commandId: commandId,
timestamp: timestamp,
metadata: metadata,
) {
// Validation
if (targetUtxoCount < 2) {
throw ArgumentError('Target UTXO count must be at least 2');
}
if (targetUtxoCount > 100) {
throw ArgumentError('Target UTXO count cannot exceed 100 (transaction size limits)');
}
if (feeRate != null && feeRate! <= BigInt.zero) {
throw ArgumentError('Fee rate must be positive');
}
if (maxUtxosToSplit != null && maxUtxosToSplit! < 1) {
throw ArgumentError('maxUtxosToSplit must be at least 1');
}
}