Update libp2p/crypto/secp256k1.py

pass the secret on to `coincurve` lib

Co-Authored-By: NIC Lin <twedusuck@gmail.com>
This commit is contained in:
Alex Stokes 2019-08-14 08:47:42 -07:00
parent 53e583a068
commit 08e6f2a30c
No known key found for this signature in database
GPG Key ID: 51CE1721B245C086

View File

@ -47,6 +47,6 @@ def create_new_key_pair(secret: bytes = None) -> KeyPair:
A valid secret is created if ``None`` is passed.
"""
private_key = Secp256k1PrivateKey.new()
private_key = Secp256k1PrivateKey.new(secret)
public_key = private_key.get_public_key()
return KeyPair(private_key, public_key)