Ejemplo n.º 1
0
 def to_addr(self, pubhex):
     assert pubhex.compressed, 'Uncompressed public keys incompatible with Segwit'
     from mmgen.protocol import hash160
     return CoinAddr(g.proto.pubhash2bech32addr(hash160(pubhex)))
Ejemplo n.º 2
0
def Pubhex2addr(pubkeyhex): Pubhash2addr(hash160(pubkeyhex))
def Wif2hex(wif):           Msg(PrivKey(wif=wif))
Ejemplo n.º 3
0
 def to_addr(self, pubhex):
     from mmgen.protocol import hash160
     assert type(pubhex) == PubKey
     return CoinAddr(g.proto.pubhash2addr(hash160(pubhex), p2sh=False))
Ejemplo n.º 4
0
Archivo: tool.py Proyecto: mmgen/mmgen
	def pubhex2addr(self,pubkeyhex:'sstr'):
		"convert a hex pubkey to an address"
		if opt.type == 'segwit':
			return g.proto.pubhex2segwitaddr(pubkeyhex)
		else:
			return self.pubhash2addr(hash160(pubkeyhex))
Ejemplo n.º 5
0
def Hash160(pubkeyhex):     Msg(hash160(pubkeyhex))
def Pubhex2addr(pubkeyhex): Pubhash2addr(hash160(pubkeyhex))
Ejemplo n.º 6
0
def Pubhex2addr(pubkeyhex):
    Pubhash2addr(hash160(pubkeyhex))
Ejemplo n.º 7
0
Archivo: tool.py Proyecto: mmgen/mmgen
	def hash160(self,hexstr:'sstr'):
		"compute ripemd160(sha256(data)) (convert hex pubkey to hex addr)"
		return hash160(hexstr)
Ejemplo n.º 8
0
def Hash160(pubkeyhex):
    Msg(hash160(pubkeyhex))
Ejemplo n.º 9
0
	def pubhex2addr(self,pubkeyhex:'sstr'):
		"convert a hex pubkey to an address"
		if opt.type == 'segwit':
			return g.proto.pubhex2segwitaddr(pubkeyhex)
		else:
			return self.pubhash2addr(hash160(pubkeyhex))
Ejemplo n.º 10
0
	def hash160(self,hexstr:'sstr'):
		"compute ripemd160(sha256(data)) (convert hex pubkey to hex addr)"
		return hash160(hexstr)
Ejemplo n.º 11
0
Archivo: addr.py Proyecto: mmgen/mmgen
	def to_addr(self,pubhex):
		assert pubhex.compressed,'Uncompressed public keys incompatible with Segwit'
		from mmgen.protocol import hash160
		return CoinAddr(g.proto.pubhash2bech32addr(hash160(pubhex)))
Ejemplo n.º 12
0
Archivo: addr.py Proyecto: mmgen/mmgen
	def to_addr(self,pubhex):
		from mmgen.protocol import hash160
		assert type(pubhex) == PubKey
		return CoinAddr(g.proto.pubhash2addr(hash160(pubhex),p2sh=False))