refactor for sprint

This commit is contained in:
zixuanzh
2018-11-11 09:56:44 -05:00
parent fd0958aa4f
commit 2bde260f5f
20 changed files with 102 additions and 112 deletions

View File

@ -0,0 +1,17 @@
from .config import Config
from ..peer.peerstore import PeerStore
class Libp2p(object):
def __init__(self, idOpt, \
transportOpt = ["/ip4/0.0.0.0/tcp/0"], \
muxerOpt = ["mplex/6.7.0"], \
secOpt = ["secio"], \
peerstoreOpt = new PeerStore()):
if idOpt:
self.idOpt = idOpt
else:
# TODO generate RSA public key pair
# TODO initialize