Initial Daemon Expansion

Changes:
    1. Added a JSONRPCDaemon method for every Monero Daemon RPC Command that is not obsolete or binary.
    2. Added a restricted() method to JSONRPCDaemon which returns whether the node is in restricted mode.
    3. Added the ability to not pass any POST data to raw_request().
    4. Added RestrictedRPC exception to monero/backends/jsonrpc/exceptions.py
    5. Added a DaemonIsBusy exception to monero/exceptions.py

Motivation: I wanted to add comprehensive daemon RPC functionality to JSONRPCDaemon, which right now only
supports a handful of all the available commands. While it is possible to perform any RPC command with
raw_request() and raw_jsonrpc_request(), I wanted the user to able to know which commands are available,
what inputs the command takes, what output it gives, and leverage the command's power while knowing the
least amount of implementaton details as possible. The Monero Daemon RPC commands do not necessarily have
the most consistent and simple interface, and that is what this commit brings to the table. The new
methods also have the benefit of local input validation, which allows for fewer, more easily decipherable
bugs for the user.

Note: The vast majority of the lines in this commit are documentation. I tried to be as comprehensive as
possible.
pull/90/head
Jeffrey Ryan 3 years ago
parent f4de87c132
commit 19a9519aea

File diff suppressed because it is too large Load Diff

@ -10,3 +10,6 @@ class Unauthorized(RPCError):
class MethodNotFound(RPCError):
pass
class RestrictedRPC(RPCError):
pass

@ -7,6 +7,9 @@ class BackendException(MoneroException):
class NoDaemonConnection(BackendException):
pass
class DaemonIsBusy(BackendException):
pass
class AccountException(MoneroException):
pass

Loading…
Cancel
Save