If you use want to create an Address object from a PubKeyHash or Ripemd160, the fromHex will complain, that it needs 21 bytes (the first byte is the network prefix), even if you pass the network as a second parameter. Hence you always need to append the prefix manually.
This should be done automatically under the hood.
If you use want to create an Address object from a
PubKeyHashorRipemd160, thefromHexwill complain, that it needs 21 bytes (the first byte is the network prefix), even if you pass the network as a second parameter. Hence you always need to append the prefix manually.This should be done automatically under the hood.