ton-blockchain / mytonctrl

A tool to run and maintain a TON node/validator
GNU General Public License v3.0
262 stars 146 forks source link

ed25519 public key regeneration #320

Open vchong opened 1 month ago

vchong commented 1 month ago

Is it possible to shed light into the process of going from a bip39 mnemonic and the m/44'/607'/0'/0/0/0 bip44 derivation path to the 32B ed25519 public key returned in https://github.com/ton-blockchain/ledger-app-ton/blob/5ca049061950dd5ac3d42fe6fff34531bd247832/src/crypto.c#L107-L113? We need to reproduce the public key generated by the ledger in a non-ledger environment, but the public key returned by @ton/crypto's mnemonicToWalletKey(mnemonic) isn't the same as the one returned by the ledger programmed with the same mnemonic, hence the wallet address (from @ton/ton's WalletContractV4.create(publicKey)) aren't the same! Thank you very much in advance!