37 if (!keystore->
GetPubKey(key, vchPubKey)) {
53 if ((
int)pubkeys.size() < required) {
56 if (pubkeys.size() > 16) {
62 if (result.
size() > MAX_SCRIPT_ELEMENT_SIZE) {
82 obj.
pushKV(
"isscript",
false);
83 obj.
pushKV(
"iswitness",
false);
90 obj.
pushKV(
"isscript",
true);
91 obj.
pushKV(
"iswitness",
false);
98 obj.
pushKV(
"isscript",
false);
99 obj.
pushKV(
"iswitness",
true);
100 obj.
pushKV(
"witness_version", 0);
108 obj.
pushKV(
"isscript",
true);
109 obj.
pushKV(
"iswitness",
true);
110 obj.
pushKV(
"witness_version", 0);
118 obj.
pushKV(
"iswitness",
true);
119 obj.
pushKV(
"witness_version", (
int)
id.version);
120 obj.
pushKV(
"witness_program",
HexStr(
id.program,
id.program +
id.length));
CScript CreateMultisigRedeemscript(const int required, const std::vector< CPubKey > &pubkeys)
CPubKey AddrToPubKey(CKeyStore *const keystore, const std::string &addr_in)
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination is a CNoDestination.
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
CPubKey HexToPubKey(const std::string &hex_in)
UniValue DescribeAddress(const CTxDestination &dest)
CKeyID GetKeyForDestination(const CKeyStore &store, const CTxDestination &dest)
Return the CKeyID of the key involved in a script (if there is a unique one).
UniValue operator()(const WitnessUnknown &id) const
UniValue operator()(const WitnessV0ScriptHash &id) const
Invalid, missing or duplicate parameter.
UniValue operator()(const CNoDestination &dest) const
virtual bool GetPubKey(const CKeyID &address, CPubKey &pubkey) const
bool IsFullyValid() const
fully validate whether this is a valid public key (more expensive than IsValid()) ...
boost::variant< CNoDestination, CKeyID, CScriptID, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
CTxDestination subtype to encode any future Witness version.
UniValue operator()(const CScriptID &scriptID) const
An encapsulated public key.
bool IsHex(const std::string &str)
UniValue operator()(const WitnessV0KeyHash &id) const
bool pushKV(const std::string &key, const UniValue &val)
UniValue operator()(const CKeyID &keyID) const
CTxDestination DecodeDestination(const std::string &str)
Serialized script, used inside transaction inputs and outputs.
A virtual base class for key stores.
A reference to a CKey: the Hash360 of its serialized public key.
A reference to a CScript: the Hash360 of its serialization (see script.h)
CScript GetScriptForMultisig(int nRequired, const std::vector< CPubKey > &keys)
Generate a multisig script.
UniValue JSONRPCError(int code, const std::string &message)
std::vector< unsigned char > ParseHex(const char *psz)