add ed25519 private key deserializer

This commit is contained in:
Alex Stokes
2019-09-24 09:50:03 -07:00
parent bbd8279811
commit 487c923791
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
from libp2p.crypto.ed25519 import Ed25519PublicKey
from libp2p.crypto.ed25519 import Ed25519PrivateKey, Ed25519PublicKey
from libp2p.crypto.exceptions import MissingDeserializerError
from libp2p.crypto.keys import KeyType, PrivateKey, PublicKey
from libp2p.crypto.rsa import RSAPublicKey
@ -11,7 +11,8 @@ key_type_to_public_key_deserializer = {
}
key_type_to_private_key_deserializer = {
KeyType.Secp256k1.value: Secp256k1PrivateKey.from_bytes
KeyType.Secp256k1.value: Secp256k1PrivateKey.from_bytes,
KeyType.Ed25519.value: Ed25519PrivateKey.from_bytes,
}