secp256k1
secp256k1 copied to clipboard
Please add in the next version
why didn't you add it?
def upub2cpub(upub_bytes): x1 = upub_bytes[1:33] prefix = str(2 + int(upub_bytes[33:].hex(), 16)%2).zfill(2) return bytes.fromhex(prefix)+x1
Please add in the next version. This is what I needed.
you can directly use: point_to_cpub(pubkey_bytes)
to get cpub hex from upub bytes. Or if you want the result cpub in bytes itself that can be done directly using bytes.fromhex(point_to_cpub(pubkey_bytes))
Still ok. i will add more wrappers for these kind of conversions for easy access.