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

Wallet generated keys is not accepted by the Utils library. #153

Open
emilakesson99 opened this issue Aug 17, 2021 · 0 comments
Open

Wallet generated keys is not accepted by the Utils library. #153

emilakesson99 opened this issue Aug 17, 2021 · 0 comments

Comments

@emilakesson99
Copy link

emilakesson99 commented Aug 17, 2021

When I run my wallet generated keys through Ethereumjs-utils library functions, isValidpublic and isValidPrivate it returns false on the public one.

For the private, I get this error:

"Expected private key to be an Uint8Array with length 32"

Are the libraries not compatible?

Code:
let publicKey: Buffer = wallet.getPrivateKey() let privateKey: Buffer = wallet.getPublicKey() if (!isValidPublic(publicKey)) { console.log('public key is not vaild') } if (!isValidPrivate(privateKey)) { console.log('private key is not vaild') }

@ethereumjs ethereumjs deleted a comment Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant