pybitmessage.namecoin module

Namecoin queries

exception RPCError(data)[source]

Bases: exceptions.Exception

Error thrown when the RPC call returns an error.

error = None
class namecoinConnection(options=None)[source]

Bases: object

This class handles the Namecoin identity integration.

bufsize = 4096
queryid = 1
nmctype = None
host = None
port = None
user = None
password = None
con = None

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.


Test the connection settings. This routine tries to query a “getinfo” command, and builds either an error message or a success message with some info from it.

callRPC(method, params)

Helper routine that actually performs an JSON RPC call.


Query the server via HTTP.


Helper routine sending data to the RPC ” “server and returning the result.


Look up the namecoin data folder.


Check whether this works on other platforms as well!


Ensure all namecoin options are set, by setting those to default values that aren’t there.