mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
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:
@ -47,6 +47,6 @@ def create_new_key_pair(secret: bytes = None) -> KeyPair:
|
|||||||
|
|
||||||
A valid secret is created if ``None`` is passed.
|
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()
|
public_key = private_key.get_public_key()
|
||||||
return KeyPair(private_key, public_key)
|
return KeyPair(private_key, public_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user