JS Console
The R5 JS Console provides a powerful interactive JavaScript environment that connects directly to your local R5 node. Unlike the R5 Console—which accesses the node over HTTP via JSON‑RPC—the JS Console gives you full access to all RPC API namespaces by default, including sensitive ones such as admin, miner, and debug. This enables you to perform detailed node management and debugging directly from an interactive prompt.
How to Launch the JS Console
To start the R5 JS Console, run your R5 node with the R5 Relayer, and once you have your node running, use the following command:
This command automatically attaches you to the node’s JavaScript runtime without requiring an additional "attach" flag. Once started, you will see an interactive prompt where you can execute JavaScript commands and directly access every available RPC API namespace.
If you are using a custom IPC path, or are having issues with starting the JS Console, you can try bypassing the relayer with the following command:
What You Can Do in the JS Console
The JS Console gives you complete control over your node, allowing you to:
Access All Namespaces: You have immediate access to all RPC API namespaces (e.g.
admin
,miner
,debug
,eth
,web3
, andnet
). This is particularly useful for developers and node operators who need to perform in-depth administration, debugging, or performance analysis.Full Administrative Control: Execute administrative commands such as adding or removing peers, changing mining parameters, or retrieving detailed node information via the
admin
namespace.Advanced Debugging and Profiling: Use the
debug
namespace endpoints to trace transactions, dump block data, generate performance profiles, and inspect memory usage.Mining Management: Control the mining process directly using endpoints in the
miner
namespace, including starting or stopping mining and adjusting mining settings.Standard Blockchain Operations: Perform standard blockchain queries (e.g. account balances, block data, transaction receipts) using the
eth
namespace, fully compatible with EVM dapps.Utility Functions: Utilize
web3
functions for data conversion (e.g. ASCII, UTF‑8, hexadecimal, wei conversions) to ease application development.
Example Usage
At the interactive prompt, you can run commands like:
Security Considerations
While the JS Console provides powerful access to all namespaces, including sensitive ones, it is intended for use in a secure, local development environment. Be cautious when using administrative or debugging commands, as they can affect node performance and security.
Last updated