Merge 0ad066c85a46208041f816d4edba36e8712763e9 into 5f4422d68dc3530c353af1f87499de1c864b60ad

This commit is contained in:
rkrux 2025-03-17 03:51:55 +01:00 committed by GitHub
commit a180783b0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -978,7 +978,7 @@ static std::vector<RPCArg> OutputsDoc()
}, },
{"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "", {"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "",
{ {
{"data", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A key-value pair. The key must be \"data\", the value is hex-encoded data"}, {"data", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A key-value pair. The key must be \"data\", the value is hex-encoded data that becomes a part of an OP_RETURN output"},
}, },
}, },
}; };
@ -1729,8 +1729,10 @@ RPCHelpMan walletcreatefundedpsbt()
} }
}, },
RPCExamples{ RPCExamples{
"\nCreate a transaction with no inputs\n" "\nCreate a PSBT with automatically picked inputs that sends 0.5 BTC to an address and has a fee rate of 2 sat/vB:\n"
+ HelpExampleCli("walletcreatefundedpsbt", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"data\\\":\\\"00010203\\\"}]\"") + HelpExampleCli("walletcreatefundedpsbt", "\"[]\" \"[{\\\"" + EXAMPLE_ADDRESS[0] + "\\\":0.5}]\" 0 \"{\\\"add_inputs\\\":true,\\\"fee_rate\\\":2}\"")
+ "\nCreate the same PSBT as the above one instead using named arguments:\n"
+ HelpExampleCli("-named walletcreatefundedpsbt", "outputs=\"[{\\\"" + EXAMPLE_ADDRESS[0] + "\\\":0.5}]\" add_inputs=true fee_rate=2")
}, },
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{ {