Skip to content

Dev#217

Merged
abolfazlbeh merged 27 commits intomainfrom
dev
Dec 2, 2025
Merged

Dev#217
abolfazlbeh merged 27 commits intomainfrom
dev

Conversation

@abolfazlbeh
Copy link
Contributor

No description provided.

- Create crate structure with Cargo.toml and dependencies
- Define Error enum with all signing error types
- Add unit tests for error formatting
- Register crate in workspace
…chain

feat(signing): add khodpay-signing crate foundation
- Define ChainId with BscMainnet (56), BscTestnet (97), Custom(u64)
- Implement From/Into<u64> conversions
- Add value(), name(), is_testnet() methods
- Add 18 unit tests for full coverage
…with-bsc-support

feat(signing): add ChainId enum for EVM networks
- Add Address type with EIP-55 checksum encoding/validation
- Add from_public_key_bytes() for deriving address from pubkey
- Add Wei type with from_wei/gwei/ether conversions
- Add arithmetic ops and byte serialization for Wei
- Add 55 unit tests for full coverage
…ei-types

feat(signing): add Address and Wei types
- Add AccessListItem for EIP-2930 access lists
- Add Eip1559Transaction struct with all EIP-1559 fields
- Add fluent builder pattern with validation
- Validate max_fee >= max_priority_fee, gas_limit >= 21000
- Add TRANSFER_GAS and TOKEN_TRANSFER_GAS constants
- Add 25 unit tests
…ction-and-builder

feat(signing): add Eip1559Transaction and builder
- Implement encode_unsigned() for EIP-1559 transactions
- Add signing_hash() using keccak256
- Add U256 and access list RLP encoding helpers
- Add 19 unit tests for encoding correctness
…ng-for-unsigned-transaction

feat(signing): add RLP encoding and signing hash
- Add Signature struct with r, s, v components
- Add Bip44Signer for signing with BIP-44 derived keys
- Implement sign_hash() and sign_transaction() methods
- Add recover_signer() for address recovery from signature
- Add 26 unit tests including recovery verification
…uct-and-bip44signer

feat(signing): add Signature and Bip44Signer
- Add SignedTransaction struct combining tx and signature
- Implement encode() for signed tx RLP encoding
- Add to_raw_transaction() for eth_sendRawTransaction
- Add tx_hash() and tx_hash_hex() for transaction hash
- Add 19 unit tests
…saction-and-raw-output

feat(signing): add SignedTransaction with RLP encoding
- Add 14 integration tests for full mnemonic-to-signed-tx workflow
- Test chain ID replay protection across BSC mainnet/testnet
- Verify known address derivation test vector
- Test transaction type detection (transfer, contract call, creation)
- Verify RFC 6979 deterministic signing
- Skip Task 08 (BEP-20 encoding) - gas constants already done
…tests-and-validation-rules

feat(signing): add integration tests and validation
- Add Zeroize derive to Signature struct (r, s, v)
- Wrap intermediate private key bytes in Zeroizing<[u8; 32]>
- Add security documentation for Bip44Signer and Signature
- k256::SigningKey already implements Zeroize internally
- Add test_zeroize() to verify zeroing behavior
…ty-zeroize-sensitive-data

feat(signing): add zeroize for sensitive data
- Add comprehensive README.md with usage examples
- Document all types: ChainId, Address, Wei, Transaction, Signer
- Fix unused import warning in signer.rs
- Run cargo fmt and clippy with no warnings
- Complete Task 11: documentation and polish
- Add comprehensive README.md with usage examples
- Document all types: ChainId, Address, Wei, Transaction, Signer
- Fix unused import warning in signer.rs
- Run cargo fmt and clippy with no warnings
- Complete Task 11: documentation and polish
…n-examples-and-final-polish

feat(signing): add README and final polish
@abolfazlbeh abolfazlbeh self-assigned this Dec 2, 2025
- Add signing crate to workspace README with features and examples
- Update INTEGRATION_GUIDE with BSC transaction signing examples
- Add crate README with comprehensive documentation
- Fix clippy warnings (clone on Copy type, deprecated from_slice)
- Pin base64ct to 1.7.3 for Rust 1.81 compatibility
…n-examples-and-final-polish

docs: add khodpay-signing to README and integration guide
- Remove clone() on Copy types (ChainId, Signature)
- Remove needless borrows in integration tests (&account -> account)
- Replace deprecated from_slice with into() conversion
- Pin base64ct to 1.7.3 for Rust 1.81 compatibility
…n-examples-and-final-polish

fix: resolve all clippy warnings
…n-examples-and-final-polish

fix: use committed Cargo.lock instead of regenerating
@abolfazlbeh abolfazlbeh merged commit c2ad033 into main Dec 2, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant