예제 #1
0
 def pubhash2bech32addr(cls, pubhash):
     d = map(ord, pubhash.decode('hex'))
     return bech32.bech32_encode(cls.bech32_hrp, [cls.witness_vernum] +
                                 bech32.convertbits(d, 8, 5))
예제 #2
0
 def pubhash2bech32addr(cls, pubhash):
     d = list(bytes.fromhex(pubhash))
     return bech32.bech32_encode(cls.bech32_hrp, [cls.witness_vernum] +
                                 bech32.convertbits(d, 8, 5))
예제 #3
0
파일: protocol.py 프로젝트: mmgen/mmgen
	def pubhash2bech32addr(cls,pubhash):
		d = list(bytes.fromhex(pubhash))
		return bech32.bech32_encode(cls.bech32_hrp,[cls.witness_vernum]+bech32.convertbits(d,8,5))