This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-02/src/class_namecoin.py

21 lines
731 B
Python
Raw Normal View History

from jsonrpc import ServiceProxy, JSONRPCException
# This class handles the Namecoin identity integration.
class namecoinConnection(object):
def __init__(self):
user = "daniel"
password = "password"
host = "localhost"
port = "8336"
self.s = ServiceProxy ("http://" + user + ":" + password
+ "@" + host + ":" + port)
# Query for the bitmessage address corresponding to the given identity
# string. If it doesn't contain a slash, id/ is prepended. We return
# the result as (Error, Address) pair, where the Error is an error
# message to display or None in case of success.
def query(self,string):
return None, "BM-Foobar2"