secp256k1 icon indicating copy to clipboard operation
secp256k1 copied to clipboard

Please add in the next version

Open Grayesso opened this issue 2 years ago • 1 comments

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.

Grayesso avatar Jun 07 '22 17:06 Grayesso

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.

iceland2k14 avatar Jul 03 '22 06:07 iceland2k14