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
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:
@@ -116,8 +116,7 @@ def _send_transaction_impl(from_wallet: str, to_address: str, amount: float, fee
|
|||||||
|
|
||||||
# Sign transaction payload
|
# Sign transaction payload
|
||||||
message = json.dumps(transaction_payload, sort_keys=True).encode()
|
message = json.dumps(transaction_payload, sort_keys=True).encode()
|
||||||
signed_message = private_key.sign(message)
|
signature = private_key.sign(message) # cryptography library returns just signature bytes
|
||||||
signature = signed_message.signature # Extract 64-byte signature only
|
|
||||||
|
|
||||||
# Submit to blockchain with nested structure
|
# Submit to blockchain with nested structure
|
||||||
transaction = {
|
transaction = {
|
||||||
|
|||||||
Reference in New Issue
Block a user