From 2e9e7c5798d77234f5c3e254eda555bca0484cf6 Mon Sep 17 00:00:00 2001 From: aitbc Date: Tue, 26 May 2026 14:30:06 +0200 Subject: [PATCH] fix: extract 64-byte signature from SignedMessage using .signature attribute - private_key.sign() returns SignedMessage (signature + message) - Extract only the 64-byte signature using .signature attribute - Fixes signature length mismatch (was sending 216 hex chars instead of 128) - RPC expects only the 64-byte signature portion --- cli/aitbc_cli/commands/transactions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/aitbc_cli/commands/transactions.py b/cli/aitbc_cli/commands/transactions.py index f2fe4759..e134e3d8 100644 --- a/cli/aitbc_cli/commands/transactions.py +++ b/cli/aitbc_cli/commands/transactions.py @@ -116,7 +116,8 @@ def _send_transaction_impl(from_wallet: str, to_address: str, amount: float, fee # Sign transaction payload message = json.dumps(transaction_payload, sort_keys=True).encode() - signature = private_key.sign(message) + signed_message = private_key.sign(message) + signature = signed_message.signature # Extract 64-byte signature only # Submit to blockchain with nested structure transaction = {