JSON-RPC Namespaces
JSON-RPC calls to Ethereum Web3 and Autonity APIs
Autonity may be interacted with by sending RPC requests to JSON-RPC APIs in the Ethereum Web3 and Autonity namespaces.
Recommended usage is to make JSON-RPC calls to Autonity Contract Interfaces using eth_call
from the Web3 eth namespace wherever possible.
Autonity provides an aut
namespace for Autonity Protocol JSON-RPC calls that cannot be replicated through eth_call
.
The APIs are accessed over transport protocols per upstream go-ethereum, i.e. HTTP, WebSockets, or IPC.
Public access to JSON-RPC APIs by the JSON-RPC Server is enabled when setting the Autonity Go Client (AGC) runtime configuration.
The HTTP and WebSocket Servers, and the related JSON-RPC namespaces, can be made accessible using run command flags:
- HTTP: use
--http
to enable the HTTP-RPC Server and then--http.api
to list the namespace(s) made available in a comma-separated list. - WebSocket: use
--ws
to enable the HTTP-RPC Server and then--ws.api
to list the namespace(s) made available in a comma-separated list.
For example: --http --http.api aut,eth,net,txpool,web3
The IPC Server is enabled and can access all JSON-RPC namespaces by default. The IPC socket/pipe file geth.ipc
is created in the default datadir
by default. Use --ipcpath
to set your own custom location for the socket file. To disable the IPC-RPC server set the --ipcdisable
flag.
For all flags see API AND CONSOLE OPTIONS
in the Autonity Go Client (AGC) Command-line Reference. For detail on the JSON-RPC Server architecture see upstream Ethereum docs Interacting with Geth, JSON-RPC Server.
Autonity aut
Autonity provides an aut
namespace for Autonity Protocol specific JSON-RPC calls:
Web3
Autonity supports the following go-ethereum Web3 APIs.
Deprecated namespaces should not be used.
Click on the links to go to the relevant Geth documentation:
admin
namespacedebug
namespaceeth
namespacenet
namespacepersonal
namespace (deprecated)txpool
namespace
Autonity does not support the go-ethereum Web3 APIs:
clique
namespaceles
namespaceminer
namespace (deprecated)objects
namespace