示例#1
0
 def __init__(self, user, password, host='localhost', port=8332,
              use_https=False):
     """
     Create a new litecoin server connection.
     """
     url = 'http{s}://{user}:{password}@{host}:{port}/'.format(
         s='s' if use_https else '',
         user=user, password=password, host=host, port=port)
     self.url = url
     try:
         self.proxy = AuthServiceProxy(url)
     except JSONRPCException as e:
         raise _wrap_exception(e.error)