rpc: update RPC help of createpsbt

Update the example wherein the PSBT sends bitcoin to an address instead
of creating an OP_RETURN output. Also, update the RPC description to
reflect the fact that the created transaction is unsigned.
This commit is contained in:
rkrux 2025-03-26 18:49:30 +05:30
parent 931117a46f
commit 32dcec269b
No known key found for this signature in database
GPG Key ID: 8614B8BD2E144C6D

View File

@ -1550,13 +1550,15 @@ static RPCHelpMan createpsbt()
{
return RPCHelpMan{"createpsbt",
"\nCreates a transaction in the Partially Signed Transaction format.\n"
"Implements the Creator role.\n",
"Implements the Creator role.\n"
"Note that the transaction's inputs are not signed, and\n"
"it is not stored in the wallet or transmitted to the network.\n",
CreateTxDoc(),
RPCResult{
RPCResult::Type::STR, "", "The resulting raw transaction (base64-encoded string)"
},
RPCExamples{
HelpExampleCli("createpsbt", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"data\\\":\\\"00010203\\\"}]\"")
HelpExampleCli("createpsbt", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"[{\\\"address\\\":0.01}]\"")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{