bhiveapi.hivenoderpc module¶
-
class
bhiveapi.hivenoderpc.
HiveNodeRPC
(*args, **kwargs)¶ Bases:
bhiveapi.graphenerpc.GrapheneRPC
This class allows to call API methods exposed by the witness node via websockets / rpc-json.
- Parameters
urls (str) – Either a single Websocket/Http URL, or a list of URLs
user (str) – Username for Authentication
password (str) – Password for Authentication
num_retries (int) – Try x times to num_retries to a node on disconnect, -1 for indefinitely
num_retries_call (int) – Repeat num_retries_call times a rpc call on node error (default is 5)
timeout (int) – Timeout setting for https nodes (default is 60)
use_condenser (bool) – Use the old condenser_api rpc protocol on nodes with version 0.19.4 or higher. The settings has no effect on nodes with version of 0.19.3 or lower.
-
get_account
(name, **kwargs)¶ Get full account details from account name
- Parameters
name (str) – Account name
-
rpcexec
(payload)¶ Execute a call by sending the payload. It makes use of the GrapheneRPC library. In here, we mostly deal with Hive specific error handling
- Parameters
payload (json) – Payload data
- Raises
ValueError – if the server does not respond in proper JSON format
RPCError – if the server returns an error
-
set_next_node_on_empty_reply
(next_node_on_empty_reply=True)¶ Switch to next node on empty reply for the next rpc call