Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/avalanche.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{ | { | ||||
{"nodeid", RPCArg::Type::NUM, RPCArg::Optional::NO, | {"nodeid", RPCArg::Type::NUM, RPCArg::Optional::NO, | ||||
"Node to be added to avalanche."}, | "Node to be added to avalanche."}, | ||||
{"publickey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"publickey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"The public key of the node."}, | "The public key of the node."}, | ||||
{"proof", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"proof", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"Proof that the node is not a sybil."}, | "Proof that the node is not a sybil."}, | ||||
}, | }, | ||||
RPCResult{"\"success\" (boolean) Whether the addition succeeded or " | RPCResult{RPCResult::Type::BOOL, "success", | ||||
"not.\n"}, | "Whether the addition succeeded or not."}, | ||||
RPCExamples{ | RPCExamples{ | ||||
HelpExampleRpc("addavalanchenode", "5, \"<pubkey>\", \"<proof>\"")}, | HelpExampleRpc("addavalanchenode", "5, \"<pubkey>\", \"<proof>\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
RPCTypeCheck(request.params, | RPCTypeCheck(request.params, | ||||
{UniValue::VNUM, UniValue::VSTR, UniValue::VSTR}); | {UniValue::VNUM, UniValue::VSTR, UniValue::VSTR}); | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{"privatekey", RPCArg::Type::STR, | {"privatekey", RPCArg::Type::STR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"private key in base58-encoding"}, | "private key in base58-encoding"}, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
RPCResult{"\"proof\" (string) A string that is a serialized, " | RPCResult{RPCResult::Type::STR_HEX, "proof", | ||||
"hex-encoded proof data.\n"}, | "A string that is a serialized, hex-encoded proof data."}, | ||||
RPCExamples{HelpExampleRpc("buildavalancheproof", | RPCExamples{HelpExampleRpc("buildavalancheproof", | ||||
"0 1234567800 \"<master>\" []")}, | "0 1234567800 \"<master>\" []")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
RPCTypeCheck(request.params, {UniValue::VNUM, UniValue::VNUM, | RPCTypeCheck(request.params, {UniValue::VNUM, UniValue::VNUM, | ||||
UniValue::VSTR, UniValue::VARR}); | UniValue::VSTR, UniValue::VARR}); | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |