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))
def pubhash2bech32addr(cls, pubhash): d = list(bytes.fromhex(pubhash)) return bech32.bech32_encode(cls.bech32_hrp, [cls.witness_vernum] + bech32.convertbits(d, 8, 5))
def pubhash2bech32addr(cls,pubhash): d = list(bytes.fromhex(pubhash)) return bech32.bech32_encode(cls.bech32_hrp,[cls.witness_vernum]+bech32.convertbits(d,8,5))