JSON RPC

JSON RPC is available via HTTP and WS.

JSON RPC needs to be explicitly switched on in the Netherming config file.

goerli.cfg
goerli.cfg
"JsonRpc": {
"Enabled": true,
"Host": "127.0.0.1",
"Port": 8545
}

JSON RPC can be also enabled by passing --JsonRpc.Enabled true flag to the Nethermind.Runner or Nethermind.Launcher arguments.

Nethermind.Runner
Nethermind.Launcher
Nethermind.Runner
./Nethermind.Runner --JsonRpc.Enabled true
Nethermind.Launcher
./Nethermind.Launcher --JsonRpc.Enabled true

WebSockets, when enabled, will be accessible on the same address/port as HTTP by default, just using the ws:// protocol instead of http:// protocol. You can change the WebSocket port to something else like 8546 if desired.

goerli.cfg
Nethermind.Runner
Nethermind.Launcher
goerli.cfg
"Init": {
"WebSocketsEnabled": true
},
"JsonRpc": {
"WebSocketsPort": 8545
}
Nethermind.Runner
./Nethermind.Runner --Init.WebSocketsEnabled true --JsonRpc.WebSocketsPort 8545
Nethermind.Launcher
./Nethermind.Launcher --Init.WebSocketsEnabled true --JsonRpc.WebSocketsPort 8545

Some of the methods listed in this section are not implemented by Nethermind (they will be marked).