Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 445 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"(only available if avoid_reuse wallet flag is set) Avoid " | "(only available if avoid_reuse wallet flag is set) Avoid " | ||||
"spending from dirty addresses; addresses are considered\n" | "spending from dirty addresses; addresses are considered\n" | ||||
" dirty if they have previously " | " dirty if they have previously " | ||||
"been used in a transaction."}, | "been used in a transaction."}, | ||||
}, | }, | ||||
RPCResult{RPCResult::Type::STR_HEX, "txid", "The transaction id."}, | RPCResult{RPCResult::Type::STR_HEX, "txid", "The transaction id."}, | ||||
RPCExamples{ | RPCExamples{ | ||||
HelpExampleCli("sendtoaddress", | HelpExampleCli("sendtoaddress", | ||||
"\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1") + | "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 100000") + | ||||
HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvay" | HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvay" | ||||
"dd\" 0.1 \"donation\" \"seans " | "dd\" 100000 \"donation\" \"seans " | ||||
"outpost\"") + | "outpost\"") + | ||||
HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44" | HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44" | ||||
"Jvaydd\" 0.1 \"\" \"\" true") + | "Jvaydd\" 100000 \"\" \"\" true") + | ||||
HelpExampleRpc("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvay" | HelpExampleRpc("sendtoaddress", | ||||
"dd\", 0.1, \"donation\", \"seans " | "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvay" | ||||
"dd\", 100000, \"donation\", \"seans " | |||||
"outpost\"")}, | "outpost\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request); | std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request); | ||||
if (!wallet) { | if (!wallet) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
CWallet *const pwallet = wallet.get(); | CWallet *const pwallet = wallet.get(); | ||||
▲ Show 20 Lines • Show All 3,404 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{RPCResult::Type::STR_AMOUNT, "fee", | {RPCResult::Type::STR_AMOUNT, "fee", | ||||
"Fee in " + ticker + " the resulting transaction pays"}, | "Fee in " + ticker + " the resulting transaction pays"}, | ||||
{RPCResult::Type::NUM, "changepos", | {RPCResult::Type::NUM, "changepos", | ||||
"The position of the added change output, or -1"}, | "The position of the added change output, or -1"}, | ||||
}}, | }}, | ||||
RPCExamples{ | RPCExamples{ | ||||
"\nCreate a transaction with no inputs\n" + | "\nCreate a transaction with no inputs\n" + | ||||
HelpExampleCli("createrawtransaction", | HelpExampleCli("createrawtransaction", | ||||
"\"[]\" \"{\\\"myaddress\\\":0.01}\"") + | "\"[]\" \"{\\\"myaddress\\\":10000}\"") + | ||||
"\nAdd sufficient unsigned inputs to meet the output value\n" + | "\nAdd sufficient unsigned inputs to meet the output value\n" + | ||||
HelpExampleCli("fundrawtransaction", "\"rawtransactionhex\"") + | HelpExampleCli("fundrawtransaction", "\"rawtransactionhex\"") + | ||||
"\nSign the transaction\n" + | "\nSign the transaction\n" + | ||||
HelpExampleCli("signrawtransactionwithwallet", | HelpExampleCli("signrawtransactionwithwallet", | ||||
"\"fundedtransactionhex\"") + | "\"fundedtransactionhex\"") + | ||||
"\nSend the transaction\n" + | "\nSend the transaction\n" + | ||||
HelpExampleCli("sendrawtransaction", "\"signedtransactionhex\"")}, | HelpExampleCli("sendrawtransaction", "\"signedtransactionhex\"")}, | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,122 Lines • Show Last 20 Lines |