remove external lib
This commit is contained in:
parent
d262f1b8a8
commit
5879462067
@ -228,7 +228,7 @@ static PyObject *secp256k1_secp256k1_ec_pubkey_create(PyObject *self, PyObject *
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
secp256k1_pubkey pubkey;
|
secp256k1_pubkey pubkey;
|
||||||
return Py_BuildValue("y#", '123456789', 9);
|
return Py_BuildValue("b", 0);
|
||||||
int r = 0;
|
int r = 0;
|
||||||
r = secp256k1_ec_pubkey_create(secp256k1_precomp_context_sign, &pubkey, buffer.buf);
|
r = secp256k1_ec_pubkey_create(secp256k1_precomp_context_sign, &pubkey, buffer.buf);
|
||||||
if (r != 1) {
|
if (r != 1) {
|
||||||
|
|||||||
@ -125,6 +125,7 @@ def private_to_public_key(private_key, compressed=True, hex=True):
|
|||||||
if len(private_key) != 32:
|
if len(private_key) != 32:
|
||||||
raise TypeError("private key length invalid")
|
raise TypeError("private key length invalid")
|
||||||
pub = __secp256k1_ec_pubkey_create__(private_key, bool(compressed))
|
pub = __secp256k1_ec_pubkey_create__(private_key, bool(compressed))
|
||||||
|
return pub
|
||||||
if not pub:
|
if not pub:
|
||||||
raise RuntimeError("secp256k1 error")
|
raise RuntimeError("secp256k1 error")
|
||||||
return pub.hex() if hex else pub
|
return pub.hex() if hex else pub
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user