!!! - for hex add check for even number of chars only e.g. 0x00 but NOT 0x0 or such - why? why not?
[str].pack('H*')
will NOT work properly?- (auto-)add missing 0 to even out ? or report errror?? e.g.
if hex.length % 2 != 0
hex = "0" + hex
end
- https://learnmeabitcoin.com/technical/base58
- https://en.bitcoin.it/wiki/Base58Check_encoding
- https://tools.ietf.org/id/draft-msporny-base58-01.html
-
https://github.com/dougal/base58 - encoding/decoding integers to/from Base58. Supports Flickr, Bitcoin, and Ripple alphabets - note: defaults to Flickr alphabet!!