How to use the secp256k1.ec_pubkey_serialize function in secp256k1

To help you get started, we’ve selected a few secp256k1 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github diybitcoinhardware / f469-disco / libs / bitcoin / ec.py View on Github external
def sec(self):
        """Sec representation of the key"""
        flag = secp256k1.EC_COMPRESSED if self.compressed else secp256k1.EC_UNCOMPRESSED
        return secp256k1.ec_pubkey_serialize(self._point, flag)
github diybitcoinhardware / f469-disco / libs / bitcoin / ecc.py View on Github external
def public_key(self):
        raw = secp256k1.ec_pubkey_create(self.secret)
        sec = secp256k1.ec_pubkey_serialize(raw, secp256k1.EC_COMPRESSED)
        return PublicKey(sec)