Closed proletesseract closed 7 years ago
I had the same issue and it does not seem to support altcoins (as the TODO comment suggests). Instead of 0x00, 'pubKeyHash' property of corresponding altcoin network object should have been passed as first argument to writeUInt8 method in getAddress function.
Closing in favour of https://github.com/bitcoinjs/bip38/issues/20, as that is where addressPrefix
would come back in
Does this work with altcoins or only bitcoin? There's a comment in the code with a TODO about being bitcoin only?
I seem to get different values when i encrypt and decrypt a private key i have generated for my altcoin using your other library.
The WIF private key and public keys generated are correct and working, just this BIP38 encrypt / decyrpt gives me different values..
Also, i had to write the code different from your examples. It was complaining that Bip38 was not a contstructor. So here's my code
and the output:
i thought the output of the wif.encode should match key.privateWif?