From 8ad9f6c4254e0ac589a2c55a95aa612f433c8265 Mon Sep 17 00:00:00 2001 From: aitbc Date: Tue, 26 May 2026 14:35:02 +0200 Subject: [PATCH] fix: use cryptography library signature directly (no .signature attribute) - cryptography library's Ed25519PrivateKey.sign() returns just signature bytes - Not a SignedMessage object like PyNaCl - Reverted .signature attribute access - Fixes AttributeError when signing transactions --- cli/aitbc_cli/commands/transactions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/aitbc_cli/commands/transactions.py b/cli/aitbc_cli/commands/transactions.py index e134e3d8..05851fe9 100644 --- a/cli/aitbc_cli/commands/transactions.py +++ b/cli/aitbc_cli/commands/transactions.py @@ -116,8 +116,7 @@ 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() - signed_message = private_key.sign(message) - signature = signed_message.signature # Extract 64-byte signature only + signature = private_key.sign(message) # cryptography library returns just signature bytes # Submit to blockchain with nested structure transaction = {