fix: use cryptography library signature directly (no .signature attribute)
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

- cryptography library's Ed25519PrivateKey.sign() returns just signature bytes
- Not a SignedMessage object like PyNaCl
- Reverted .signature attribute access
- Fixes AttributeError when signing transactions
This commit is contained in:
aitbc
2026-05-26 14:35:02 +02:00
parent 2e9e7c5798
commit 8ad9f6c425

View File

@@ -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 = {