Command definitions
All RPC request/response structs are defined in:COMMAND_RPC_ prefix. Wallet-side commands use WALLET_RPC_COMMAND_ prefix.
Adding a new daemon endpoint
1
Define command structs
Add
COMMAND_RPC_YOUR_ENDPOINT with request and response inner structs to CoreRpcServerCommandsDefinitions.h. Use KV_SERIALIZE / KV_MEMBER macros for JSON serialization.2
Declare handler in RpcServer.h
3
Register route in RpcServer.cpp
Add to the The
s_handlers map in RpcServer.cpp:false means the endpoint does not require a running blockchain (set true if it does).4
Implement the handler
Follow existing handlers like
on_get_fee_pool_info as a model. Access core state via m_core.Key access patterns
Wallet RPC
Wallet-side RPC handlers live in:src/Wallet/WalletRpcServer.h— declarationssrc/Wallet/WalletRpcServer.cpp— implementations
m_wallet (a WalletGreen reference).