bitcore-lib
bitcore-lib copied to clipboard
Read address version as unsigned integer
This change prevents large address versions (larger than 0x7fffffff) to be read as negative numbers and failing to lookup the correct network from the Networks map.
Large address versions could eventually be found in custom network definitions. We had do create a custom network and address version resulted in a large numbers in order for the HD private/public keys to have the initial chars as desired. As the library read those large number as negative, it was unable to find the network in the networkMaps
for certain operations.