Skip to content

Issues with configure bitcointx to work with libsecp256k1 #83

@katsucodes247

Description

@katsucodes247

Hi, I'm unable to get bitcointx to use libsecp256k1.

I've installed bitcointx via pip: pip install python-bitcointx

I have libsecp256k1 installed:

$ ldconfig -p | grep libsecp     
libsecp256k1.so.0 (libc6,x86-64) => /lib64/libsecp256k1.so.
libsecp256k1.so (libc6,x86-64) => /lib64/libsecp256k1.so
$ ls /usr/lib64/libsecp256k1.so.0
/usr/lib64/libsecp256k1.so.0

This is how I load it and I get the RuntimeError when trying to get xonly_pub.

import bitcointx as btc
btc.set_custom_secp256k1_path("/usr/lib64/libsecp256k1.so.0")
pvt_key = PrivateKey(12345, network="regtest")
from bitcointx.wallet import CCoinKey

CCoinKey.from_secret_bytes(bytes([6]*32)).xonly_pub
bitcointx/core/key.py", line 2021, in __new__
    raise RuntimeError(
RuntimeError: x-only pubkey handling functions from libsecp256k1 is not available. configure it libsecp256k1 with --enable-module-extrakeys

Any help/pointers on how to solve this issue would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions