From 8c27f9573a42a1a778a947bc3ef7c83f9036ef3b Mon Sep 17 00:00:00 2001 From: teyrebaz33 Date: Sat, 4 Apr 2026 16:37:31 +0300 Subject: [PATCH] fix(cli): append v byte to EVM signMessage output The CLI was returning 64-byte signatures (r + s only) instead of the expected 65-byte format (r + s + v). The recovery ID was available in the recoveryId field but not appended to the signature hex. Fixes #171 --- ows/crates/ows-cli/src/commands/sign_message.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ows/crates/ows-cli/src/commands/sign_message.rs b/ows/crates/ows-cli/src/commands/sign_message.rs index 92d180ad..0d645fcb 100644 --- a/ows/crates/ows-cli/src/commands/sign_message.rs +++ b/ows/crates/ows-cli/src/commands/sign_message.rs @@ -63,7 +63,14 @@ pub fn run( }; print_result( - &hex::encode(&output.signature), + &{ + let mut sig = output.signature.clone(); + if let Some(rid) = output.recovery_id { + let v = if rid < 27 { rid + 27 } else { rid }; + sig.push(v); + } + hex::encode(&sig) + }, output.recovery_id, json_output, )