Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 1,081 Lines • ▼ Show 20 Lines | #endif | ||||
if (request.fHelp || request.params.size() < 1 || | if (request.fHelp || request.params.size() < 1 || | ||||
request.params.size() > 4) { | request.params.size() > 4) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"signrawtransaction \"hexstring\" ( " | "signrawtransaction \"hexstring\" ( " | ||||
"[{\"txid\":\"id\",\"vout\":n,\"scriptPubKey\":\"hex\"," | "[{\"txid\":\"id\",\"vout\":n,\"scriptPubKey\":\"hex\"," | ||||
"\"redeemScript\":\"hex\"},...] [\"privatekey1\",...] sighashtype " | "\"redeemScript\":\"hex\"},...] [\"privatekey1\",...] sighashtype " | ||||
")\n" | ")\n" | ||||
"\nSign inputs for raw transaction (serialized, hex-encoded).\n" | "\nDEPRECATED.Sign inputs for raw transaction (serialized, " | ||||
"hex-encoded).\n" | |||||
"The second optional argument (may be null) is an array of " | "The second optional argument (may be null) is an array of " | ||||
"previous transaction outputs that\n" | "previous transaction outputs that\n" | ||||
"this transaction depends on but may not yet be in the block " | "this transaction depends on but may not yet be in the block " | ||||
"chain.\n" | "chain.\n" | ||||
"The third optional argument (may be null) is an array of " | "The third optional argument (may be null) is an array of " | ||||
"base58-encoded private\n" | "base58-encoded private\n" | ||||
"keys that, if given, will be the only keys used to sign the " | "keys that, if given, will be the only keys used to sign the " | ||||
"transaction.\n" | "transaction.\n" | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | #endif | ||||
" ]\n" | " ]\n" | ||||
"}\n" | "}\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("signrawtransaction", "\"myhex\"") + | HelpExampleCli("signrawtransaction", "\"myhex\"") + | ||||
HelpExampleRpc("signrawtransaction", "\"myhex\"")); | HelpExampleRpc("signrawtransaction", "\"myhex\"")); | ||||
} | } | ||||
if (!IsDeprecatedRPCEnabled(gArgs, "signrawtransaction")) { | |||||
throw JSONRPCError( | |||||
RPC_METHOD_DEPRECATED, | |||||
"signrawtransaction is deprecated and will be fully removed in " | |||||
"v0.20. " | |||||
"To use signrawtransaction in v0.19, restart bitcoind with " | |||||
"-deprecatedrpc=signrawtransaction.\n" | |||||
"Projects should transition to using signrawtransactionwithkey and " | |||||
"signrawtransactionwithwallet before upgrading to v0.20"); | |||||
} | |||||
RPCTypeCheck( | RPCTypeCheck( | ||||
request.params, | request.params, | ||||
{UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true); | {UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true); | ||||
// Make a JSONRPCRequest to pass on to the right signrawtransaction* command | // Make a JSONRPCRequest to pass on to the right signrawtransaction* command | ||||
JSONRPCRequest new_request; | JSONRPCRequest new_request; | ||||
new_request.id = request.id; | new_request.id = request.id; | ||||
new_request.params.setArray(); | new_request.params.setArray(); | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |