def test_for_secp256k1(self, silent=False): try: from mmgen.secp256k1 import priv2pub assert priv2pub(('deadbeef' * 8).decode('hex'), 1) return True except: return False
def test_for_secp256k1(self,silent=False): try: from mmgen.secp256k1 import priv2pub assert priv2pub(os.urandom(32),1) return True except: return False
def test_for_secp256k1(self,silent=False): try: from mmgen.secp256k1 import priv2pub m = 'Unable to execute priv2pub() from secp256k1 extension module' assert priv2pub(bytes.fromhex('deadbeef'*8),1),m return True except: return False
def test_for_secp256k1(self, silent=False): try: from mmgen.secp256k1 import priv2pub m = 'Unable to execute priv2pub() from secp256k1 extension module' assert priv2pub(bytes.fromhex('deadbeef' * 8), 1), m return True except: return False
def to_pubhex(self, privhex): assert type(privhex) == PrivKey from mmgen.secp256k1 import priv2pub return PubKey(hexlify( priv2pub(unhexlify(privhex), int(privhex.compressed))), compressed=privhex.compressed)
def to_pubhex(self,privhex): assert type(privhex) == PrivKey from mmgen.secp256k1 import priv2pub return PubKey(priv2pub(bytes.fromhex(privhex),int(privhex.compressed)).hex(),compressed=privhex.compressed)
def to_pubhex(self, privhex): assert type(privhex) == PrivKey from mmgen.secp256k1 import priv2pub return PubKey(priv2pub(bytes.fromhex(privhex), int(privhex.compressed)).hex(), compressed=privhex.compressed)
def to_pubhex(self,privhex): assert type(privhex) == PrivKey from mmgen.secp256k1 import priv2pub return PubKey(hexlify(priv2pub(unhexlify(privhex),int(privhex.compressed))),compressed=privhex.compressed)