mesh icon indicating copy to clipboard operation
mesh copied to clipboard

Can't get AppWallet instance using private key

Open zameshaevds opened this issue 1 year ago • 0 comments

Warning: I generated a private key specifically for this post, don't worry

If you use a private key: "xprv12zhcvwkyatecqyfcs3lg8pjsx3zja0ds3783tlcajd8cja24raqqmy6stmp3tyxcucthw2nx78kl5d5x5t9p9g5vdthqe58ymd093z45a4l5m4e4rmvxyg8npens3zt2l6j03xyqzkyvxp0q0nyfm8r0yl0hfm2r7nln6sfaml28zkfdzlg28knkgvzr3w8f977ca5m3ulku560tw3y"
in your sandbox: https://meshjs.dev/apis/appwallet then you will get an error: "Invalid secret key"

I get a similar error when I try to use the library in our application in the browser. The private key is working, you can use it to sign transactions.

When I try to get an instance of AppWallet by mnemonics, I get an incorrect address, it is much shorter than the original one.

Maybe you have other ways to get a wallet instance that can be used to sign transactions later using the Transaction class of your library?

zameshaevds avatar Mar 13 '23 14:03 zameshaevds