| 1121 | RPCHelpMan psbtbumpfee() { return bumpfee_helper("psbtbumpfee"); } |
| 1122 | |
| 1123 | RPCHelpMan send() |
| 1124 | { |
| 1125 | return RPCHelpMan{"send", |
| 1126 | "\nEXPERIMENTAL warning: this call may be changed in future releases.\n" |
| 1127 | "\nSend a transaction.\n", |
| 1128 | { |
| 1129 | {"outputs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The outputs (key-value pairs), where none of the keys are duplicated.\n" |
| 1130 | "That is, each address can only appear once and there can only be one 'data' object.\n" |
| 1131 | "For convenience, a dictionary, which holds the key-value pairs directly, is also accepted.", |
| 1132 | { |
| 1133 | {"", RPCArg::Type::OBJ_USER_KEYS, RPCArg::Optional::OMITTED, "", |
| 1134 | { |
| 1135 | {"address", RPCArg::Type::AMOUNT, RPCArg::Optional::NO, "A key-value pair. The key (string) is the address, the value (float or string) is the amount in " + CURRENCY_UNIT + ""}, |
| 1136 | }, |
| 1137 | }, |
| 1138 | {"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "", |
| 1139 | { |
| 1140 | {"data", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A key-value pair. The key must be \"data\", the value is hex-encoded data"}, |
| 1141 | }, |
| 1142 | }, |
| 1143 | }, |
| 1144 | }, |
| 1145 | {"conf_target", RPCArg::Type::NUM, RPCArg::DefaultHint{"wallet -txconfirmtarget"}, "Confirmation target in blocks"}, |
| 1146 | {"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"unset"}, std::string() + "The fee estimate mode, must be one of (case insensitive):\n" |
| 1147 | " \"" + FeeModes("\"\n\"") + "\""}, |
| 1148 | {"fee_rate", RPCArg::Type::AMOUNT, RPCArg::DefaultHint{"not set, fall back to wallet fee estimation"}, "Specify a fee rate in " + CURRENCY_ATOM + "/vB."}, |
| 1149 | {"options", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED_NAMED_ARG, "", |
| 1150 | Cat<std::vector<RPCArg>>( |
| 1151 | { |
| 1152 | {"add_inputs", RPCArg::Type::BOOL, RPCArg::Default{false}, "If inputs are specified, automatically include more if they are not enough."}, |
| 1153 | {"include_unsafe", RPCArg::Type::BOOL, RPCArg::Default{false}, "Include inputs that are not safe to spend (unconfirmed transactions from outside keys and unconfirmed replacement transactions).\n" |
| 1154 | "Warning: the resulting transaction may become invalid if one of the unsafe inputs disappears.\n" |
| 1155 | "If that happens, you will need to fund the transaction with different inputs and republish it."}, |
| 1156 | {"add_to_wallet", RPCArg::Type::BOOL, RPCArg::Default{true}, "When false, returns a serialized transaction which will not be added to the wallet or broadcast"}, |
| 1157 | {"change_address", RPCArg::Type::STR_HEX, RPCArg::DefaultHint{"pool address"}, "The address to receive the change"}, |
| 1158 | {"change_position", RPCArg::Type::NUM, RPCArg::DefaultHint{"random"}, "The index of the change output"}, |
| 1159 | {"change_type", RPCArg::Type::STR, RPCArg::DefaultHint{"set by -changetype"}, "The output type to use. Only valid if change_address is not specified. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\"."}, |
| 1160 | {"fee_rate", RPCArg::Type::AMOUNT, RPCArg::DefaultHint{"not set, fall back to wallet fee estimation"}, "Specify a fee rate in " + CURRENCY_ATOM + "/vB."}, |
| 1161 | {"include_watching", RPCArg::Type::BOOL, RPCArg::DefaultHint{"true for watch-only wallets, otherwise false"}, "Also select inputs which are watch only.\n" |
| 1162 | "Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported,\n" |
| 1163 | "e.g. with 'importpubkey' or 'importmulti' with the 'pubkeys' or 'desc' field."}, |
| 1164 | {"inputs", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Specify inputs instead of adding them automatically. A JSON array of JSON objects", |
| 1165 | { |
| 1166 | {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"}, |
| 1167 | {"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output number"}, |
| 1168 | {"sequence", RPCArg::Type::NUM, RPCArg::Optional::NO, "The sequence number"}, |
| 1169 | {"weight", RPCArg::Type::NUM, RPCArg::DefaultHint{"Calculated from wallet and solving data"}, "The maximum weight for this input, " |
| 1170 | "including the weight of the outpoint and sequence number. " |
| 1171 | "Note that signature sizes are not guaranteed to be consistent, " |
| 1172 | "so the maximum DER signatures size of 73 bytes should be used when considering ECDSA signatures." |
| 1173 | "Remember to convert serialized sizes to weight units when necessary."}, |
| 1174 | }, |
| 1175 | }, |
| 1176 | {"locktime", RPCArg::Type::NUM, RPCArg::Default{0}, "Raw locktime. Non-0 value also locktime-activates inputs"}, |
| 1177 | {"lock_unspents", RPCArg::Type::BOOL, RPCArg::Default{false}, "Lock selected unspent outputs"}, |
| 1178 | {"psbt", RPCArg::Type::BOOL, RPCArg::DefaultHint{"automatic"}, "Always return a PSBT, implies add_to_wallet=false."}, |
| 1179 | {"subtract_fee_from_outputs", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Outputs to subtract the fee from, specified as integer indices.\n" |
| 1180 | "The fee will be equally deducted from the amount of each specified output.\n" |
no test coverage detected