SteemNodeRPC¶
Warning
This is a low level class that can be used in combination with
SteemClient
. Do not use this class unless you know what
you are doing!
This class allows to call API methods exposed by the witness node via websockets.
Defintion¶
-
class
steemapi.steemnoderpc.
SteemNodeRPC
(url, user='', password='', **kwargs)¶ This class allows to call API methods synchronously, without callbacks. It logs in and registers to the APIs:
- database
- history
Parameters: - url (str) – Websocket URL
- user (str) – Username for Authentication
- password (str) – Password for Authentication
- apis (Array) – List of APIs to register to (default: [“database”, “network_broadcast”])
Available APIs
- database
- network_node
- network_broadcast
- history
Usage:
ws = SteemNodeRPC("ws://10.0.0.16:8090") print(ws.get_account_count())
-
__getattr__
(name)¶ Map all methods to RPC calls and pass through the arguments
-
rpcexec
(payload)¶ Execute a call by sending the payload
Parameters: payload (json) – Payload data
Raises: - ValueError – if the server does not respond in proper JSON format
- RPCError – if the server returns an error