Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/avalanche.cpp
Show All 14 Lines | |||||
#include <univalue.h> | #include <univalue.h> | ||||
static UniValue getavalanchekey(const Config &config, | static UniValue getavalanchekey(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getavalanchekey", | "getavalanchekey", | ||||
"Returns the key used to sign avalanche messages.\n", | "Returns the key used to sign avalanche messages.\n", | ||||
{}, | {}, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::STR_HEX, "", ""}, | ||||
RPCExamples{HelpExampleRpc("getavalanchekey", "")}, | RPCExamples{HelpExampleRpc("getavalanchekey", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
if (!g_avalanche) { | if (!g_avalanche) { | ||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Avalanche is not initialized"); | throw JSONRPCError(RPC_INTERNAL_ERROR, "Avalanche is not initialized"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |