RPC

RPC

class RPC(**kwargs)

Implements the rpc api endpoints.

call_by_name(command: str, **kwargs) → pystratis.api.rpc.responsemodels.rpccommandresponsemodel.RPCCommandResponseModel

Calls the specified RPC command.

Parameters:
  • command (str) – The complete RPC command.
  • **kwargs – Extra keyword arguments.
Returns:

The command output.

Return type:

The RPCCommandResponse

Raises:

APIError – Error thrown by node API. See message for details.

list_methods(**kwargs) → List[pystratis.api.rpc.responsemodels.rpccommandlistmodel.RPCCommandListModel]

List available RPC call methods on this node.

Parameters:**kwargs – Extra keyword arguments.
Returns:A list of valid RPC commands.
Return type:List[RPCCommandListModel]
Raises:APIError – Error thrown by node API. See message for details.

RPCCommandListModel

class RPCCommandListModel

A pydantic model for a RPC command.

RPCCommandResponseModel

class RPCCommandResponseModel

A pydantic model for a RPC response.