6 #ifndef BITCOIN_SCRIPT_STANDARD_H 7 #define BITCOIN_SCRIPT_STANDARD_H 12 #include <boost/variant.hpp> 16 static const bool DEFAULT_ACCEPT_DATACARRIER =
true;
34 static const unsigned int MAX_OP_RETURN_RELAY = 83;
123 typedef boost::variant<CNoDestination, CKeyID, CScriptID, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown>
CTxDestination;
188 #endif // BITCOIN_SCRIPT_STANDARD_H
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination is a CNoDestination.
WitnessV0KeyHash(const uint160 &hash)
unspendable OP_RETURN script that carries data
CScript GetScriptForRawPubKey(const CPubKey &pubkey)
Generate a P2PK script for the given pubkey.
unsigned char program[40]
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Parse a standard scriptPubKey for the destination address.
friend bool operator==(const CNoDestination &a, const CNoDestination &b)
friend bool operator<(const CNoDestination &a, const CNoDestination &b)
CScript GetScriptForWitness(const CScript &redeemscript)
Generate a pay-to-witness script for the given redeem script.
Only for Witness versions not already defined above.
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.
An encapsulated public key.
CScript GetScriptForMultisig(int nRequired, const std::vector< CPubKey > &keys)
Generate a multisig script.
bool fAcceptDatacarrier
A data carrying output is an unspendable output containing data.
CScriptID(const uint160 &in)
WitnessV0ScriptHash(const uint256 &hash)
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
friend bool operator==(const WitnessUnknown &w1, const WitnessUnknown &w2)
Serialized script, used inside transaction inputs and outputs.
A reference to a CKey: the Hash360 of its serialized public key.
friend bool operator<(const WitnessUnknown &w1, const WitnessUnknown &w2)
A reference to a CScript: the Hash360 of its serialization (see script.h)
const char * GetTxnOutputType(txnouttype t)
Get the name of a txnouttype as a C string, or nullptr if unknown.
unsigned nMaxDatacarrierBytes
Maximum size of TX_NULL_DATA scripts that this node considers standard.
bool ExtractDestinations(const CScript &scriptPubKey, txnouttype &typeRet, std::vector< CTxDestination > &addressRet, int &nRequiredRet)
Parse a standard scriptPubKey with one or more destination addresses.
txnouttype Solver(const CScript &scriptPubKey, std::vector< std::vector< unsigned char >> &vSolutionsRet)
Parse a scriptPubKey and identify script type for standard scripts.