Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I use Kepler to create MNEMONIC, and then use keyring lib to generate address. But the address is not same as one generated by Kepler wallet. #16670

Closed
TraderWithPython opened this issue Jun 23, 2023 · 1 comment

Comments

@TraderWithPython
Copy link

I use

kr, _ := keyring.New(r.keyringServiceName, string(r.keyringBackend), r.homePath, inBuf, cdc)
// passphrase = "", secrect is MNEMONIC
kr.ImportPrivKey(name, secret, passphrase)
record, err := Keyring.Key(name)
addr, _ := toBech32(prefix, record.GetPubKey().Address())

I dont know why the addr calculated by above snippet is different from the address presented in Kepler wallect.

@atheeshp
Copy link
Contributor

Hey @TraderWithPython , I think you might have to use NewAccount (ref) method instead of ImportPrivKey if you are dealing with mnemonics, example usage here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants