PeerPlaysNodeRPC

This class allows to call API methods exposed by the witness node via websockets.

Defintion

class peerplaysapi.node.PeerPlaysNodeRPC(urls, user='', password='', **kwargs)
get_account(name, **kwargs)

Get full account details from account name or id

Parameters:name (str) – Account name or account id
get_asset(name, **kwargs)

Get full asset from name of id

Parameters:name (str) – Symbol name or asset id (e.g. 1.3.0)
get_network()

Identify the connected network. This call returns a dictionary with keys chain_id, core_symbol and prefix

get_object(o, **kwargs)

Get object with id o

Parameters:o (str) – Full object id
rpcexec(payload)

Execute a call by sending the payload. It makes use of the GrapheneRPC library. In here, we mostly deal with PeerPlays 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