Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"line option or\n" | "line option or\n" | ||||
"specify the block in which the transaction is included manually (by " | "specify the block in which the transaction is included manually (by " | ||||
"blockhash).\n", | "blockhash).\n", | ||||
{ | { | ||||
{ | { | ||||
"txids", | "txids", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"A json array of txids to filter", | "The txids to filter", | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, | {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, | ||||
"A transaction hash"}, | "A transaction hash"}, | ||||
}, | }, | ||||
}, | }, | ||||
{"blockhash", RPCArg::Type::STR_HEX, | {"blockhash", RPCArg::Type::STR_HEX, | ||||
RPCArg::Optional::OMITTED_NAMED_ARG, | RPCArg::Optional::OMITTED_NAMED_ARG, | ||||
"If specified, looks for txid in the block with this hash"}, | "If specified, looks for txid in the block with this hash"}, | ||||
▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"Returns hex-encoded raw transaction.\n" | "Returns hex-encoded raw transaction.\n" | ||||
"Note that the transaction's inputs are not signed, and\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", | "it is not stored in the wallet or transmitted to the network.\n", | ||||
{ | { | ||||
{ | { | ||||
"inputs", | "inputs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"A json array of json objects", | "The inputs", | ||||
{ | { | ||||
{ | { | ||||
"", | "", | ||||
RPCArg::Type::OBJ, | RPCArg::Type::OBJ, | ||||
RPCArg::Optional::OMITTED, | RPCArg::Optional::OMITTED, | ||||
"", | "", | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR_HEX, | {"txid", RPCArg::Type::STR_HEX, | ||||
RPCArg::Optional::NO, "The transaction id"}, | RPCArg::Optional::NO, "The transaction id"}, | ||||
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, | {"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, | ||||
"The output number"}, | "The output number"}, | ||||
{"sequence", RPCArg::Type::NUM, /* default */ | {"sequence", RPCArg::Type::NUM, /* default */ | ||||
"depends on the value of the 'locktime' argument", | "depends on the value of the 'locktime' argument", | ||||
"The sequence number"}, | "The sequence number"}, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
{ | { | ||||
"outputs", | "outputs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"a json array with outputs (key-value pairs), where none of " | "The outputs (key-value pairs), where none of " | ||||
"the keys are duplicated.\n" | "the keys are duplicated.\n" | ||||
"That is, each address can only appear once and there can only " | "That is, each address can only appear once and there can only " | ||||
"be one 'data' object.\n" | "be one 'data' object.\n" | ||||
"For compatibility reasons, a dictionary, which holds the " | "For compatibility reasons, a dictionary, which holds the " | ||||
"key-value pairs directly, is also\n" | "key-value pairs directly, is also\n" | ||||
" accepted as second parameter.", | " accepted as second parameter.", | ||||
{ | { | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"The combined transaction may be another partially signed transaction " | "The combined transaction may be another partially signed transaction " | ||||
"or a \n" | "or a \n" | ||||
"fully signed transaction.", | "fully signed transaction.", | ||||
{ | { | ||||
{ | { | ||||
"txs", | "txs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"A json array of hex strings of partially signed " | "The hex strings of partially signed " | ||||
"transactions", | "transactions", | ||||
{ | { | ||||
{"hexstring", RPCArg::Type::STR_HEX, | {"hexstring", RPCArg::Type::STR_HEX, | ||||
RPCArg::Optional::OMITTED, "A transaction hash"}, | RPCArg::Optional::OMITTED, "A transaction hash"}, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
RPCResult{RPCResult::Type::STR, "", | RPCResult{RPCResult::Type::STR, "", | ||||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"this transaction depends on but may not yet be in the block chain.\n", | "this transaction depends on but may not yet be in the block chain.\n", | ||||
{ | { | ||||
{"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"The transaction hex string"}, | "The transaction hex string"}, | ||||
{ | { | ||||
"privkeys", | "privkeys", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"A json array of base58-encoded private keys for signing", | "The base58-encoded private keys for signing", | ||||
{ | { | ||||
{"privatekey", RPCArg::Type::STR, RPCArg::Optional::OMITTED, | {"privatekey", RPCArg::Type::STR, RPCArg::Optional::OMITTED, | ||||
"private key in base58-encoding"}, | "private key in base58-encoding"}, | ||||
}, | }, | ||||
}, | }, | ||||
{ | { | ||||
"prevtxs", | "prevtxs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::OMITTED_NAMED_ARG, | RPCArg::Optional::OMITTED_NAMED_ARG, | ||||
"A json array of previous dependent transaction outputs", | "The previous dependent transaction outputs", | ||||
{ | { | ||||
{ | { | ||||
"", | "", | ||||
RPCArg::Type::OBJ, | RPCArg::Type::OBJ, | ||||
RPCArg::Optional::OMITTED, | RPCArg::Optional::OMITTED, | ||||
"", | "", | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR_HEX, | {"txid", RPCArg::Type::STR_HEX, | ||||
▲ Show 20 Lines • Show All 661 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"Combine multiple partially signed Bitcoin transactions into one " | "Combine multiple partially signed Bitcoin transactions into one " | ||||
"transaction.\n" | "transaction.\n" | ||||
"Implements the Combiner role.\n", | "Implements the Combiner role.\n", | ||||
{ | { | ||||
{ | { | ||||
"txs", | "txs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"A json array of base64 strings of partially signed " | "The base64 strings of partially signed transactions", | ||||
"transactions", | |||||
{ | { | ||||
{"psbt", RPCArg::Type::STR, RPCArg::Optional::OMITTED, | {"psbt", RPCArg::Type::STR, RPCArg::Optional::OMITTED, | ||||
"A base64 string of a PSBT"}, | "A base64 string of a PSBT"}, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
RPCResult{RPCResult::Type::STR, "", | RPCResult{RPCResult::Type::STR, "", | ||||
"The base64-encoded partially signed transaction"}, | "The base64-encoded partially signed transaction"}, | ||||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"createpsbt", | "createpsbt", | ||||
"Creates a transaction in the Partially Signed Transaction format.\n" | "Creates a transaction in the Partially Signed Transaction format.\n" | ||||
"Implements the Creator role.\n", | "Implements the Creator role.\n", | ||||
{ | { | ||||
{ | { | ||||
"inputs", | "inputs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"A json array of json objects", | "The json objects", | ||||
{ | { | ||||
{ | { | ||||
"", | "", | ||||
RPCArg::Type::OBJ, | RPCArg::Type::OBJ, | ||||
RPCArg::Optional::OMITTED, | RPCArg::Optional::OMITTED, | ||||
"", | "", | ||||
{ | { | ||||
{"txid", RPCArg::Type::STR_HEX, | {"txid", RPCArg::Type::STR_HEX, | ||||
RPCArg::Optional::NO, "The transaction id"}, | RPCArg::Optional::NO, "The transaction id"}, | ||||
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, | {"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, | ||||
"The output number"}, | "The output number"}, | ||||
{"sequence", RPCArg::Type::NUM, /* default */ | {"sequence", RPCArg::Type::NUM, /* default */ | ||||
"depends on the value of the 'locktime' argument", | "depends on the value of the 'locktime' argument", | ||||
"The sequence number"}, | "The sequence number"}, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
}, | }, | ||||
{ | { | ||||
"outputs", | "outputs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"a json array with outputs (key-value pairs), where none of " | "The outputs (key-value pairs), where none of " | ||||
"the keys are duplicated.\n" | "the keys are duplicated.\n" | ||||
"That is, each address can only appear once and there can only " | "That is, each address can only appear once and there can only " | ||||
"be one 'data' object.\n" | "be one 'data' object.\n" | ||||
"For compatibility reasons, a dictionary, which holds the " | "For compatibility reasons, a dictionary, which holds the " | ||||
"key-value pairs directly, is also\n" | "key-value pairs directly, is also\n" | ||||
" accepted as second parameter.", | " accepted as second parameter.", | ||||
{ | { | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | UniValue joinpsbts(const Config &config, const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"joinpsbts", | "joinpsbts", | ||||
"Joins multiple distinct PSBTs with different inputs and outputs " | "Joins multiple distinct PSBTs with different inputs and outputs " | ||||
"into one PSBT with inputs and outputs from all of the PSBTs\n" | "into one PSBT with inputs and outputs from all of the PSBTs\n" | ||||
"No input in any of the PSBTs can be in more than one of the PSBTs.\n", | "No input in any of the PSBTs can be in more than one of the PSBTs.\n", | ||||
{{"txs", | {{"txs", | ||||
RPCArg::Type::ARR, | RPCArg::Type::ARR, | ||||
RPCArg::Optional::NO, | RPCArg::Optional::NO, | ||||
"A json array of base64 strings of partially signed transactions", | "The base64 strings of partially signed transactions", | ||||
{{"psbt", RPCArg::Type::STR, RPCArg::Optional::NO, | {{"psbt", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
"A base64 string of a PSBT"}}}}, | "A base64 string of a PSBT"}}}}, | ||||
RPCResult{RPCResult::Type::STR, "", | RPCResult{RPCResult::Type::STR, "", | ||||
"The base64-encoded partially signed transaction"}, | "The base64-encoded partially signed transaction"}, | ||||
RPCExamples{HelpExampleCli("joinpsbts", "\"psbt\"")}} | RPCExamples{HelpExampleCli("joinpsbts", "\"psbt\"")}} | ||||
.Check(request); | .Check(request); | ||||
RPCTypeCheck(request.params, {UniValue::VARR}, true); | RPCTypeCheck(request.params, {UniValue::VARR}, true); | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |