validateRawTx method
Validate a raw transaction Returns null for valid transactions, or an error message for invalid ones
Implementation
Future<ValidateRawTxResponse?> validateRawTx(List<int> txBytes) async {
if (txBytes.isEmpty) {
throw ValidationException('Transaction bytes cannot be empty');
}
try {
await _proxy.post('/validate-tx', txBytes);
return null; // Valid transaction
} on ChronikException catch (e) {
return ValidateRawTxResponse(error: e.message);
}
}