let single_concatenated_input_data: Option<Vec<u8>> = if transformed_cli_inputs.iter().all(|i| i.input_type == InputType::PublicData) && !transformed_cli_inputs.is_empty() {
if let Some(bytes) = &input_t_val.data { // Assuming InputT { input_type: InputType, data: Option<Vec<u8>> }
let final_input_refs: Vec<InputRef> = if let Some(ref data_bytes) = single_concatenated_input_data {
// This handles the case where concatenation was attempted but resulted in empty (e.g. all inputs had None data)
// For now, if concatenation yields empty but there WERE inputs, maybe it should be an empty Vec<InputRef>
// or an error. If it must be one input ref, an empty one might be InputRef::new(InputType::PublicData, &[])
} else { // single_concatenated_input_data was Some(empty_vec) and transformed_cli_inputs was empty
// No concatenation, or concatenation resulted in None (e.g. no public data inputs, or mixed inputs)
.map(|input_t_val| InputRef::new(input_t_val.input_type, input_t_val.data.as_deref().unwrap_or_default()))
// The verify_input_hash logic was here, it might need adjustment if it relied on the structure of transformed_inputs
// because DefaultInputResolver::resolve_public_inputs expects something compatible with ProgramInputType.
// The current transformed_cli_inputs IS Vec<InputT> (from bonsol_sdk which is ProgramInputType<Vec<u8>, Option<String>>)
// If it expects Vec<ProgramInputType<Vec<u8>, Option<String>>>, then transformed_cli_inputs is fine.
// We need to ensure it's cloned correctly if resolve_public_inputs takes ownership or modifies.
let mut hash_obj = Sha256::new(); // Renamed from 'hash' to avoid conflict if input_hash is in scope