Conversation
- Replaced custom wallet generation with BIP-44-compliant HD wallet logic (m/44'/60'/0'/0/0) - Added HDWallet class for correct private/public key and address derivation - Verified compatibility with MetaMask and TrustWallet - Added test script to demonstrate valid mnemonic-based wallet generation
|
Still new to using GitHub properly - only ever used it to store code, so I apologise for all the requests. This update allows EVM compatible wallet generation that can be imported into services like metamask, when i was testing the codebase you created, upon importing the private key and Mnemonic into MetaMask it was showing a different address. This update follows all BIP standards and creates compatible address/keys/Mnemonics that can be tested with https://chaintool.tech/generateWallet/evmWallet and imported correctly. |
|
Yes, I’ve reached the stage of integration with wallets like MetaMask, and I’ve implemented compatibility along with full API integration. When a network is added, the wallet is automatically added to the database, and balance synchronization is performed. Please wait a bit — I’ll finish debugging everything and complete the synchronization with mempool nodes. Try RPC https://wallet.coursefactory.pro/wallet/wallet_api.php id - 20250808 VFLW |
Fixes incorrect EVM wallet derivation logic — now compatible with MetaMask/TrustWallet
Summary
The original
WalletManagerwas generating wallet data (mnemonic, private key, public key, address), but it wasn't EVM-compatible — meaning when importing the generated keys into services like MetaMask or TrustWallet, it would result in a different address or a failed import.Problem
What I Changed
HDWalletclass to handle BIP-44 derivation pathm/44'/60'/0'/0/0— the standard for Ethereum.KeyPair::fromMnemonic()logic to derive the correct private/public key pair and address.TestWallet.php) to demonstrate correct key generation and compatibility.Example Output (after fix)
Result
✅ Wallets generated from mnemonics are now: