1.1) base58 address from text amnesia@amnesia:~$ amnesia@amnesia:~$ bx base16-encode "send 1% of how much you'd donate for publishing in blockchain diy manual for building smart rocket" | bx ripemd160 | bx address-encode 1JYmhqs4812R5Me7fHUNo8dfczZwjy8H2d amnesia@amnesia:~$
1.2) base58 address with text base58 alphabet = digits excluding "0" + lowercase letters excluding "l" + uppercase letters excluding "I", "O" string of 33 letters, starts with "1", last 6 or 7 will be changed, 25 or 26 remain for text amnesia@amnesia:~$ amnesia@amnesia:~$ bx base58-decode 1PrcntHmwydaForKiLLBadGuyxxxxxxxx 00045291c56c3df0faa7d508d17660766187ba423f148ff711 amnesia@amnesia:~$ remove 2 first and 8 last and amnesia@amnesia:~$ amnesia@amnesia:~$ bx address-encode 045291c56c3df0faa7d508d17660766187ba423f 1PrcntHmwydaForKiLLBadGuyxxys6ULy amnesia@amnesia:~$
2) BTC SegWit address (bech32)
2.1) segwit address from text amnesia@amnesia:~$ amnesia@amnesia:~$ bx base16-encode '0.001 hmwyda for publishing private information about bad guy' | bx ripemd160 f7ba9ada06c834560e439cfb3b5c054db132914d amnesia@amnesia:~$ amnesia@amnesia:~$ python3 >>> >>> from segwit_addr import encode >>> >>> print(encode('bc', 0, bytearray.fromhex('f7ba9ada06c834560e439cfb3b5c054db132914d'))) bc1q77af4ksxeq69vrjrnnankhq9fkcn9y2d7h0q3z >>>
2.2) segwit address with text bech32 alphabet = digits excluding "1" + lowercase letters excluding "b", "i", "o" string of 32 or 51 letters >>> >>> from segwit_addr import CHARSET, convertbits, encode >>> >>> array = [CHARSET.find(x) for x in 'permylhmwydasenddr0nemsgt06adguy'] >>> print(encode('bc', 0, convertbits(array, 5, 8))) bc1qpermylhmwydasenddr0nemsgt06adguyrff2yz >>> >>> array = [CHARSET.find(x) for x in '0nepercnthmwydaf0rd0xyngwh0w0rkshelpspr0tects6adguy'] >>> print(encode('bc', 0, convertbits(array, 5, 8))) bc1q0nepercnthmwydaf0rd0xyngwh0w0rkshelpspr0tects6adguyqc5xscz >>> >>> exit() amnesia@amnesia:~$
3) BCH new address format (also bech32)
3.1) BCH address from text - convert from 1.1 amnesia@amnesia:~$ amnesia@amnesia:~$ cd cashaddress-1.0.5/ amnesia@amnesia:~/cashaddress-1.0.5$ amnesia@amnesia:~/cashaddress-1.0.5$ python3 >>> >>> from cashaddress.convert import to_cash_address >>> >>> print(to_cash_address('1JYmhqs4812R5Me7fHUNo8dfczZwjy8H2d')) bitcoincash:qrq8ckdda6rthkx5xf9am2qczf7avyfgfgjj6he024 >>>
3.2) BCH address with text bech32 alphabet see 2.2 string of 34 letters, starts with "qq", ends with "q", 31 remain for text >>> >>> from cashaddress.crypto import b32decode, b32encode, calculate_checksum >>> >>> prefix = 'bitcoincash' >>> array = b32decode('qqpermylhmwydaf0r6urn6adguysh0useq') >>> checksum = calculate_checksum(prefix, array) >>> print(prefix + ':' + b32encode(array + checksum)) bitcoincash:qqpermylhmwydaf0r6urn6adguysh0useqlcxzn0q7 >>> >>> exit() amnesia@amnesia:~/cashaddress-1.0.5$