ethereumjs-wallet
ethereumjs-wallet copied to clipboard
Wallet generated keys is not accepted by the Utils library.
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') }