def Hash160(pubkeyhex): Msg(mmb.hash160(pubkeyhex))
def Pubhex2addr(pubkeyhex, p2sh=False): Msg(mmb.hexaddr2addr(mmb.hash160(pubkeyhex), p2sh=p2sh))
def to_addr(self,pubhex): assert type(pubhex) == PubKey from mmgen.bitcoin import hexaddr2addr,hash160 return BTCAddr(hexaddr2addr(hash160(pubhex)))