コード例 #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)))
コード例 #2
0
def Pubhex2addr(pubkeyhex): Pubhash2addr(hash160(pubkeyhex))
def Wif2hex(wif):           Msg(PrivKey(wif=wif))
コード例 #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))
コード例 #4
0
ファイル: tool.py プロジェクト: 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))
コード例 #5
0
def Hash160(pubkeyhex):     Msg(hash160(pubkeyhex))
def Pubhex2addr(pubkeyhex): Pubhash2addr(hash160(pubkeyhex))
コード例 #6
0
def Pubhex2addr(pubkeyhex):
    Pubhash2addr(hash160(pubkeyhex))
コード例 #7
0
ファイル: tool.py プロジェクト: mmgen/mmgen
	def hash160(self,hexstr:'sstr'):
		"compute ripemd160(sha256(data)) (convert hex pubkey to hex addr)"
		return hash160(hexstr)
コード例 #8
0
def Hash160(pubkeyhex):
    Msg(hash160(pubkeyhex))
コード例 #9
0
ファイル: tool.py プロジェクト: cryptoprojectsforks/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))
コード例 #10
0
ファイル: tool.py プロジェクト: cryptoprojectsforks/mmgen
	def hash160(self,hexstr:'sstr'):
		"compute ripemd160(sha256(data)) (convert hex pubkey to hex addr)"
		return hash160(hexstr)
コード例 #11
0
ファイル: addr.py プロジェクト: 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)))
コード例 #12
0
ファイル: addr.py プロジェクト: 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))