MCPcopy Create free account
hub / github.com/ElementsProject/elements / registerRpcs

Method registerRpcs

src/wallet/interfaces.cpp:537–547  ·  view source on GitHub ↗

ChainClient methods

Source from the content-addressed store, hash-verified

535
536 //! ChainClient methods
537 void registerRpcs() override
538 {
539 for (const CRPCCommand& command : GetWalletRPCCommands()) {
540 m_rpc_commands.emplace_back(command.category, command.name, [this, &command](const JSONRPCRequest& request, UniValue& result, bool last_handler) {
541 JSONRPCRequest wallet_request = request;
542 wallet_request.context = &m_context;
543 return command.actor(wallet_request, result, last_handler);
544 }, command.argNames, command.unique_id);
545 m_rpc_handlers.emplace_back(m_context.chain->handleRpc(m_rpc_commands.back()));
546 }
547 }
548 bool verify() override { return VerifyWallets(m_context); }
549 bool load() override { return LoadWallets(m_context); }
550 void start(CScheduler& scheduler) override { return StartWallets(m_context, scheduler); }

Callers 2

AppInitMainFunction · 0.80
WalletTestingSetupMethod · 0.80

Calls 3

GetWalletRPCCommandsFunction · 0.85
emplace_backMethod · 0.80
handleRpcMethod · 0.80

Tested by 1

WalletTestingSetupMethod · 0.64