64 std::vector<valtype> &pubkeys) {
81 pubkeys.emplace_back(std::move(data));
87 if (pubkeys.size() != keys || keys < required) {
90 return (it + 1 ==
script.end());
94 std::vector<std::vector<uint8_t>> &vSolutionsRet) {
95 vSolutionsRet.clear();
101 std::vector<uint8_t> hashBytes(scriptPubKey.
begin() + 2,
102 scriptPubKey.
begin() + 22);
103 vSolutionsRet.push_back(hashBytes);
112 if (scriptPubKey.
size() >= 1 && scriptPubKey[0] ==
OP_RETURN &&
117 std::vector<uint8_t> data;
119 vSolutionsRet.push_back(std::move(data));
124 vSolutionsRet.push_back(std::move(data));
128 unsigned int required;
129 std::vector<std::vector<uint8_t>> keys;
132 vSolutionsRet.push_back({
static_cast<uint8_t
>(required)});
133 vSolutionsRet.insert(vSolutionsRet.end(), keys.begin(), keys.end());
135 vSolutionsRet.push_back({
static_cast<uint8_t
>(keys.size())});
139 vSolutionsRet.clear();
152 for (
const CPubKey &key : keys) {
std::vector< uint8_t > valtype
An encapsulated public key.
static constexpr unsigned int COMPRESSED_SIZE
const uint8_t * end() const
static constexpr unsigned int SIZE
secp256k1:
static bool ValidSize(const std::vector< uint8_t > &vch)
const uint8_t * begin() const
Serialized script, used inside transaction inputs and outputs.
bool IsPushOnly(const_iterator pc) const
Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical).
bool IsPayToScriptHash() const
static int DecodeOP_N(opcodetype opcode)
Encode/decode small integers:
static opcodetype EncodeOP_N(int n)
bool CheckMinimalPush(const std::vector< uint8_t > &data, opcodetype opcode)
Check whether the given stack element data would be minimally pushed using the given opcode.
opcodetype
Script opcodes.
std::vector< uint8_t > ToByteVector(const T &in)
std::vector< uint8_t > valtype
static bool MatchPayToPubkeyHash(const CScript &script, valtype &pubkeyhash)
static constexpr bool IsSmallInteger(opcodetype opcode)
Test for "small positive integer" script opcodes - OP_1 through OP_16.
CScript GetScriptForMultisig(int nRequired, const std::vector< CPubKey > &keys)
Generate a multisig script.
TxoutType Solver(const CScript &scriptPubKey, std::vector< std::vector< uint8_t > > &vSolutionsRet)
Parse a scriptPubKey and identify script type for standard scripts.
std::string GetTxnOutputType(TxoutType t)
Get the name of a TxoutType as a string.
CScript GetScriptForRawPubKey(const CPubKey &pubKey)
Generate a P2PK script for the given pubkey.
static bool MatchPayToPubkey(const CScript &script, valtype &pubkey)
static bool MatchMultisig(const CScript &script, unsigned int &required, std::vector< valtype > &pubkeys)