New answers tagged

0

I am using a different bitcoin library. This prints address and hash160 from a private key: from bitcoinutils.setup import setup from bitcoinutils.keys import P2pkhAddress, PrivateKey, PublicKey def main(): # setup the network setup('testnet') # provide a private WIF key priv = PrivateKey.from_wif('...


1

The base58.b58decode and base58.b58encode functions only do the Base 58 decode/encode. However xpubs are encoded with Base 58 Check encoding. The difference is that Base 58 Check encoding computes a checksum of the payload and appends the first 4 bytes of that to the payload before the base 58 encoding. You need to be using base58.b58decode_check and base58....


0

I think you have your magic byte order backwards. It should be 0xf9beb4d9.


Top 50 recent answers are included