Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show All 26 Lines | |||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <rpc/util.h> | #include <rpc/util.h> | ||||
#include <script/script.h> | #include <script/script.h> | ||||
#include <script/sign.h> | #include <script/sign.h> | ||||
#include <script/signingprovider.h> | #include <script/signingprovider.h> | ||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <txmempool.h> | #include <txmempool.h> | ||||
#include <uint256.h> | #include <uint256.h> | ||||
#include <util/bip32.h> | |||||
#include <util/error.h> | #include <util/error.h> | ||||
#include <util/moneystr.h> | #include <util/moneystr.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/string.h> | #include <util/string.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <cstdint> | #include <cstdint> | ||||
▲ Show 20 Lines • Show All 1,100 Lines • ▼ Show 20 Lines | if (!test_accept_res) { | ||||
result_0.pushKV("reject-reason", state.GetRejectReason()); | result_0.pushKV("reject-reason", state.GetRejectReason()); | ||||
} | } | ||||
} | } | ||||
result.push_back(std::move(result_0)); | result.push_back(std::move(result_0)); | ||||
return result; | return result; | ||||
} | } | ||||
static std::string WriteHDKeypath(std::vector<uint32_t> &keypath) { | |||||
std::string keypath_str = "m"; | |||||
for (uint32_t num : keypath) { | |||||
keypath_str += "/"; | |||||
bool hardened = false; | |||||
if (num & 0x80000000) { | |||||
hardened = true; | |||||
num &= ~0x80000000; | |||||
} | |||||
keypath_str += ToString(num); | |||||
if (hardened) { | |||||
keypath_str += "'"; | |||||
} | |||||
} | |||||
return keypath_str; | |||||
} | |||||
static UniValue decodepsbt(const Config &config, | static UniValue decodepsbt(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"decodepsbt", | "decodepsbt", | ||||
"Return a JSON object representing the serialized, base64-encoded " | "Return a JSON object representing the serialized, base64-encoded " | ||||
"partially signed Bitcoin transaction.\n", | "partially signed Bitcoin transaction.\n", | ||||
{ | { | ||||
{"psbt", RPCArg::Type::STR, RPCArg::Optional::NO, | {"psbt", RPCArg::Type::STR, RPCArg::Optional::NO, | ||||
▲ Show 20 Lines • Show All 1,007 Lines • Show Last 20 Lines |