Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 526 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{"locktime", RPCArg::Type::NUM, /* default */ "0", | {"locktime", RPCArg::Type::NUM, /* default */ "0", | ||||
"Raw locktime. Non-0 value also locktime-activates inputs"}, | "Raw locktime. Non-0 value also locktime-activates inputs"}, | ||||
}, | }, | ||||
RPCResult{RPCResult::Type::STR_HEX, "transaction", | RPCResult{RPCResult::Type::STR_HEX, "transaction", | ||||
"hex string of the transaction"}, | "hex string of the transaction"}, | ||||
RPCExamples{ | RPCExamples{ | ||||
HelpExampleCli("createrawtransaction", | HelpExampleCli("createrawtransaction", | ||||
"\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | ||||
"\" \"[{\\\"address\\\":0.01}]\"") + | "\" \"[{\\\"address\\\":10000.00}]\"") + | ||||
HelpExampleCli("createrawtransaction", | HelpExampleCli("createrawtransaction", | ||||
"\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | ||||
"\" \"[{\\\"data\\\":\\\"00010203\\\"}]\"") + | "\" \"[{\\\"data\\\":\\\"00010203\\\"}]\"") + | ||||
HelpExampleRpc("createrawtransaction", | HelpExampleRpc("createrawtransaction", | ||||
"\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | ||||
"\", \"[{\\\"address\\\":0.01}]\"") + | "\", \"[{\\\"address\\\":10000.00}]\"") + | ||||
HelpExampleRpc("createrawtransaction", | HelpExampleRpc("createrawtransaction", | ||||
"\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]" | ||||
"\", \"[{\\\"data\\\":\\\"00010203\\\"}]\"")}, | "\", \"[{\\\"data\\\":\\\"00010203\\\"}]\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
RPCTypeCheck(request.params, | RPCTypeCheck(request.params, | ||||
{UniValue::VARR, | {UniValue::VARR, | ||||
▲ Show 20 Lines • Show All 428 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"/kB\nSet to 0 to accept any fee rate.\n"}, | "/kB\nSet to 0 to accept any fee rate.\n"}, | ||||
}, | }, | ||||
RPCResult{RPCResult::Type::STR_HEX, "", "The transaction hash in hex"}, | RPCResult{RPCResult::Type::STR_HEX, "", "The transaction hash in hex"}, | ||||
RPCExamples{ | RPCExamples{ | ||||
"\nCreate a transaction\n" + | "\nCreate a transaction\n" + | ||||
HelpExampleCli( | HelpExampleCli( | ||||
"createrawtransaction", | "createrawtransaction", | ||||
"\"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" " | "\"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" " | ||||
"\"{\\\"myaddress\\\":0.01}\"") + | "\"{\\\"myaddress\\\":10000}\"") + | ||||
"Sign the transaction, and get back the hex\n" + | "Sign the transaction, and get back the hex\n" + | ||||
HelpExampleCli("signrawtransactionwithwallet", "\"myhex\"") + | HelpExampleCli("signrawtransactionwithwallet", "\"myhex\"") + | ||||
"\nSend the transaction (signed hex)\n" + | "\nSend the transaction (signed hex)\n" + | ||||
HelpExampleCli("sendrawtransaction", "\"signedhex\"") + | HelpExampleCli("sendrawtransaction", "\"signedhex\"") + | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("sendrawtransaction", "\"signedhex\"")}, | HelpExampleRpc("sendrawtransaction", "\"signedhex\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"false)"}, | "false)"}, | ||||
}}, | }}, | ||||
}}, | }}, | ||||
RPCExamples{ | RPCExamples{ | ||||
"\nCreate a transaction\n" + | "\nCreate a transaction\n" + | ||||
HelpExampleCli( | HelpExampleCli( | ||||
"createrawtransaction", | "createrawtransaction", | ||||
"\"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" " | "\"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" " | ||||
"\"{\\\"myaddress\\\":0.01}\"") + | "\"{\\\"myaddress\\\":10000}\"") + | ||||
"Sign the transaction, and get back the hex\n" + | "Sign the transaction, and get back the hex\n" + | ||||
HelpExampleCli("signrawtransactionwithwallet", "\"myhex\"") + | HelpExampleCli("signrawtransactionwithwallet", "\"myhex\"") + | ||||
"\nTest acceptance of the transaction (signed hex)\n" + | "\nTest acceptance of the transaction (signed hex)\n" + | ||||
HelpExampleCli("testmempoolaccept", R"('["signedhex"]')") + | HelpExampleCli("testmempoolaccept", R"('["signedhex"]')") + | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("testmempoolaccept", "[\"signedhex\"]")}, | HelpExampleRpc("testmempoolaccept", "[\"signedhex\"]")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
▲ Show 20 Lines • Show All 1,074 Lines • Show Last 20 Lines |