From 0aff11fc59ca7c73bab5c5b43c964305e4619d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sa=C5=82aban?= Date: Thu, 15 Feb 2018 21:41:51 +0100 Subject: [PATCH] Add API doc for Daemon --- monero/daemon.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/monero/daemon.py b/monero/daemon.py index 4a290b6..fe252e7 100644 --- a/monero/daemon.py +++ b/monero/daemon.py @@ -1,14 +1,37 @@ class Daemon(object): + """Monero daemon. + + Provides interface do a daemon instance. + + :param backend: a daemon backend + """ def __init__(self, backend): self._backend = backend def info(self): + """ + Returns basic information about the daemon. + + :rtype: dict + """ return self._backend.info() def height(self): + """ + Return daemon's chain height. + + :rtype: int + """ return self._backend.info()['height'] def send_transaction(self, tx, relay=True): + """ + Sends a transaction generated by a :class:`Wallet `. + + :param tx: :class:`Transaction ` + :param relay: whether to relay the transaction to peers. If `False`, the daemon will have + to mine the transaction itself in order to have it included in the blockchain. + """ return self._backend.send_transaction(tx.blob, relay=relay) def mempool(self):