aptos-labs / petra-wallet

Public issue tracker for Petra Wallet on Aptos
https://petra.app
91 stars 59 forks source link

Generation of addresses from private keys #5

Closed PROrector closed 1 year ago

PROrector commented 1 year ago

I see a very unpleasant problem. When importing the ETH private key into the Petra wallet, I get a completely different address in it. What do you need to do to get access to an address similar to the ETH blockchain using the available private key?

kent-white commented 1 year ago

@PROrector chains have separate derivations based on various circumstances. There is no guarantee that you can use the same address across chains that use different formats.

PROrector commented 1 year ago

I already understood this perfectly when iancoleman utility could not decompose the mnemonic how it works with all BIP39 phrases. I assume that the point is not in derivations based, but in native applications that generate wallet addresses in their own way, and not according to the rules.

kent-white commented 1 year ago

So yes, the bip44 path is different but the other problem you will run into is that Aptos uses Ed25519 which is not the same as ethereum's elliptic curve.

This would be the same problem you run into with going between solana and ethereum.

PROrector commented 1 year ago

what method of getting private key from apt address identical to evm address do you recommend?