mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Add an "insecure session" that satisfies the ISecureConn interface
This commit is contained in:
13
libp2p/security/base_transport.py
Normal file
13
libp2p/security/base_transport.py
Normal file
@ -0,0 +1,13 @@
|
||||
from libp2p.peer.id import ID
|
||||
from libp2p.security.secure_transport_interface import ISecureTransport
|
||||
|
||||
|
||||
class BaseSecureTransport(ISecureTransport):
|
||||
"""
|
||||
``BaseSecureTransport`` is not fully instantiated from its abstract classes as it
|
||||
is only meant to be used in clases that derive from it.
|
||||
"""
|
||||
|
||||
def __init__(self, local_private_key: bytes) -> None:
|
||||
self.local_private_key = local_private_key
|
||||
self.local_peer = ID.from_privkey(local_private_key)
|
||||
Reference in New Issue
Block a user