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