18typedef std::vector<unsigned char>
valtype;
51 std::vector<valtype> vSolutions;
74 std::copy(vSolutions[0].begin(), vSolutions[0].end(), hash.
begin());
80 std::copy(vSolutions[0].begin(), vSolutions[0].end(), hash.
begin());
86 std::copy(vSolutions[0].begin(), vSolutions[0].end(), tap.
begin());
152class ValidDestinationVisitor
155 bool operator()(
const CNoDestination& dest)
const {
return false; }
157 bool operator()(
const PKHash& dest)
const {
return true; }
158 bool operator()(
const ScriptHash& dest)
const {
return true; }
162 bool operator()(
const WitnessUnknown& dest)
const {
return true; }
168 return std::visit(CScriptVisitor(), dest);
172 return std::visit(ValidDestinationVisitor(), dest);
CScriptID ToScriptID(const ScriptHash &script_hash)
std::vector< unsigned char > valtype
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Parse a scriptPubKey for the destination.
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination corresponds to one with an address.
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
CKeyID ToKeyID(const PKHash &key_hash)
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
A reference to a CKey: the Hash160 of its serialized public key.
const CScript & GetScript() const LIFETIMEBOUND
An encapsulated public key.
A hasher class for SHA-256.
void Finalize(unsigned char hash[OUTPUT_SIZE])
CSHA256 & Write(const unsigned char *data, size_t len)
Serialized script, used inside transaction inputs and outputs.
static opcodetype EncodeOP_N(int n)
A reference to a CScript: the Hash160 of its serialization.
const unsigned char * begin() const
uint160 Hash160(const T1 &in1)
Compute the 160-bit hash an object.
std::vector< unsigned char > ToByteVector(const T &in)
TxoutType Solver(const CScript &scriptPubKey, std::vector< std::vector< unsigned char > > &vSolutionsRet)
Parse a scriptPubKey and identify script type for standard scripts.
@ WITNESS_UNKNOWN
Only for Witness versions not already defined above.
@ ANCHOR
anyone can spend script
@ NULL_DATA
unspendable OP_RETURN script that carries data
const CPubKey & GetPubKey() const LIFETIMEBOUND
CTxDestination subtype to encode any future Witness version.