ethereumjs-wallet icon indicating copy to clipboard operation
ethereumjs-wallet copied to clipboard

Wallet generated keys is not accepted by the Utils library.

Open emilakesson99 opened this issue 2 years ago • 0 comments

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') }

emilakesson99 avatar Aug 17 '21 22:08 emilakesson99