SteemNodeRPC¶
This class allows to call API methods exposed by the witness node via websockets.
Defintion¶
-
class
beemapi.steemnoderpc.
SteemNodeRPC
(*args, **kwargs)¶ - 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)
-
__getattr__
(name)¶ Map all methods to RPC calls and pass through the arguments.
-
rpcexec
(payload)¶ Execute a call by sending the payload. It makes use of the GrapheneRPC library. In here, we mostly deal with Steem 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