Module rpc

Source
Expand description

Manages JSON-RPC interactions for the explorer

Modules§

blocks
RPC block related requests
contracts
RPC handlers for contract-related perations
statistics
RPC handlers for blockchain statistics and metrics
transactions
RPC handlers for transaction data, lookups, and processing

Structs§

DarkfidRpcClient
A RPC client for interacting with a Darkfid JSON-RPC endpoint, enabling communication with Darkfid blockchain nodes. Supports connection management, request handling, and graceful shutdowns. Implemented for shared access across ownership boundaries using Arc, with connection state managed via an RwLock.

Functions§

log_request_failure 🔒
Auxiliary function that logs RPC request failures by generating a structured log message containing the provided req_method, params, and error details. Constructs a log target specific to the request method, formats the error message by stringifying the JSON parameters and error, and performs the log operation without returning a value.