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:
@ -23,7 +23,7 @@ class Secp256k1PrivateKey(PrivateKey):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def new(cls, secret: bytes = None) -> "Secp256k1PrivateKey":
|
def new(cls, secret: bytes = None) -> "Secp256k1PrivateKey":
|
||||||
private_key_impl = coincurve.PrivateKey()
|
private_key_impl = coincurve.PrivateKey(secret)
|
||||||
return cls(private_key_impl)
|
return cls(private_key_impl)
|
||||||
|
|
||||||
def to_bytes(self) -> bytes:
|
def to_bytes(self) -> bytes:
|
||||||
|
|||||||
Reference in New Issue
Block a user