diff --git a/docs/source/backends.rst b/docs/source/backends.rst index 9a6337a..c918868 100644 --- a/docs/source/backends.rst +++ b/docs/source/backends.rst @@ -1,8 +1,9 @@ Backends ======== -Backends are the protocols and methods used to communicate with the Monero daemon and interact with -the wallet. As of the time of this writing, the only backends available in this library are: +The module comes with possibility of replacing the underlying backend. Backends are the protocols +and methods used to communicate with the Monero daemon or wallet. As of the time of this writing, +the module offers the following options: * ``jsonrpc`` for the HTTP based RPC server, * ``offline`` for running the wallet without Internet connection and even without the wallet file. @@ -18,6 +19,14 @@ The Python `requests`_ library is used in order to facilitate HTTP requests to t interface. It makes POST requests and passes proper headers, parameters, and payload data as per the official `Wallet RPC`_ documentation. +Also, ``jsonrpc`` backend is the default choice and both ``Wallet`` and ``Daemon`` classes +can be invoked in a simple form with no ``backend`` argument given. They will assume connection to +the default *mainnet* port on *localhost*, like below: + +.. code-block:: python + + In [1]: wallet = Wallet() # is equivalent to: wallet = Wallet(JSONRPCWallet(host='localhost', port=18081) + .. _`requests`: http://docs.python-requests.org/ .. _`Wallet RPC`: https://getmonero.org/resources/developer-guides/wallet-rpc.html diff --git a/docs/source/daemon.rst b/docs/source/daemon.rst index f762853..65eeffa 100644 --- a/docs/source/daemon.rst +++ b/docs/source/daemon.rst @@ -1,8 +1,9 @@ Interacting with daemon ======================= -The module offers an interface to interact with Monero daemon. For the time being, like with -wallet, the only available method to connnect to a daemon is by JSON RPC commands. The initializer +The module offers an interface to interact with Monero daemon. For the time being, the only +available method to connnect to a daemon is by JSON RPC commands but the module allows for +providing a :doc:`custom backend `. The initializer accepts keywords including, but not limited to, ``host``, ``port``, ``user``, and ``password``. .. code-block:: python diff --git a/docs/source/wallet.rst b/docs/source/wallet.rst index 1ca501a..3cc6c55 100644 --- a/docs/source/wallet.rst +++ b/docs/source/wallet.rst @@ -1,14 +1,14 @@ Using wallet and accounts ========================= -Since Monero 'Helium Hydra' (0.11.x) the wallet handles accounts and deterministically -generated addresses, known as *subaddresses*. +The Wallet class provides an abstraction layer to retrieve wallet information, manage accounts and +subaddresses, and of course send transfers. The wallet ---------- The following example shows how to create and retrieve wallet's accounts and -addresses: +addresses via the default JSON RPC backend: .. code-block:: python diff --git a/monero/daemon.py b/monero/daemon.py index 7f7e73e..1430ae9 100644 --- a/monero/daemon.py +++ b/monero/daemon.py @@ -8,7 +8,8 @@ class Daemon(object): Provides interface to a daemon instance. :param backend: a daemon backend - :param \\**kwargs: arguments to initialize a JSONRPCDaemon instance if no backend is given + :param \\**kwargs: arguments to initialize a :class:`JSONRPCDaemon ` + instance if no backend is given """ def __init__(self, backend=None, **kwargs): if backend and len(kwargs): diff --git a/monero/wallet.py b/monero/wallet.py index 1759094..5ea2222 100644 --- a/monero/wallet.py +++ b/monero/wallet.py @@ -26,7 +26,8 @@ class Wallet(object): The wallet exposes a number of methods that operate on the default account (of index 0). :param backend: a wallet backend - :param \\**kwargs: arguments to initialize a JSONRPCWallet instance if no backend is given + :param \\**kwargs: arguments to initialize a :class:`JSONRPCWallet ` + instance if no backend is given """ accounts = None