Пример #1
0
def strtob58(s):
	enc = bitcoin.b58encode(s)
	dec = bitcoin.b58decode(enc)
	print_convert_results(s,enc,dec,"str")
Пример #2
0
def b58randenc():
	r = get_random(32)
	enc = bitcoin.b58encode(r)
	dec = bitcoin.b58decode(enc)
	print_convert_results(r,enc,dec,"str")
Пример #3
0
def make_tx_data(metadata_fmt, tx_hex, inputs_data, b2m_map, comment):
	from mmgen.bitcoin import b58encode
	s = (b58encode(comment.encode("utf8")),) if comment else ()
	lines = (metadata_fmt, tx_hex, repr(inputs_data), repr(b2m_map)) + s
	return "\n".join(lines)+"\n"