From d53ce3b457717e4524e55660a2eeef25dc26eddf Mon Sep 17 00:00:00 2001 From: Joshua Fernandes Date: Tue, 2 Jun 2020 14:53:34 +1000 Subject: [PATCH] adding in rpc-ws-api params --- README.md | 1 + defaults/main.yml | 1 + templates/config.toml.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 97d1f1d..67b4edd 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults | `besu_rpc_http_api` | ["ADMIN","DEBUG","NET","ETH","MINER","WEB3"] | Comma-separated APIs to enable on the HTTP JSON-RPC channel. When you use this option, the `besu_rpc_http_enabled` option must also be enabled | | `besu_rpc_http_cors_origins` | ["all"] | Comma separated origin domain URLs for CORS validation | | `besu_rpc_ws_enabled` | true | Enabled the WebSockets service | +| `besu_rpc_ws_api` | ["NET", "ETH", "WEB3"] | Comma-separated APIs to enable on the HTTP JSON-RPC channel. When you use this option, the `besu_rpc_ws_enabled` option must also be enabled | | `besu_rpc_ws_host` | 0.0.0.0 | Specifies the host on which WebSockets listens | | `besu_rpc_ws_port` | 8546 | Specifies Websockets JSON-RPC listening port (TCP). Port must be exposed appropriately | | `besu_graphql_http_enabled` | true | Enabled the HTTP JSON-RPC service | diff --git a/defaults/main.yml b/defaults/main.yml index 148113d..5311b05 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -48,6 +48,7 @@ besu_rpc_http_host: 0.0.0.0 besu_rpc_http_port: 8545 besu_rpc_http_api: ["ADMIN", "DEBUG", "NET", "ETH", "MINER", "WEB3"] besu_rpc_http_cors_origins: ["all"] +besu_rpc_ws_api: ["NET", "ETH", "WEB3"] besu_rpc_ws_enabled: "true" besu_rpc_ws_host: 0.0.0.0 besu_rpc_ws_port: 8546 diff --git a/templates/config.toml.j2 b/templates/config.toml.j2 index ab05ac7..695daf6 100644 --- a/templates/config.toml.j2 +++ b/templates/config.toml.j2 @@ -43,6 +43,7 @@ rpc-http-cors-origins=[{{besu_rpc_http_cors_origins|map('to_json')|join(',')}}] {% if besu_rpc_ws_enabled|bool == True %} # ws rpc-ws-enabled=true +rpc-ws-api=[{{besu_rpc_ws_api|map('to_json')|join(',')}}] rpc-ws-host="{{besu_rpc_ws_host}}" rpc-ws-port={{besu_rpc_ws_port}} {% endif %}