7 #ifndef PIVX_SCRIPT_STANDARD_H
8 #define PIVX_SCRIPT_STANDARD_H
13 #include <boost/variant.hpp>
17 static const bool DEFAULT_ACCEPT_DATACARRIER =
true;
31 static const unsigned int MAX_OP_RETURN_RELAY = 83;
72 typedef boost::variant<CNoDestination, CKeyID, CScriptID, CExchangeKeyID>
CTxDestination;
90 bool Solver(
const CScript& scriptPubKey,
txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
A reference to a CKey: the Hash160 of its serialized public key.
friend bool operator<(const CNoDestination &a, const CNoDestination &b)
friend bool operator==(const CNoDestination &a, const CNoDestination &b)
An encapsulated public key.
Serialized script, used inside transaction inputs and outputs.
A reference to a CScript: the Hash160 of its serialization (see script.h)
CScriptID(const uint160 &in)
boost::variant< CNoDestination, CKeyID, CScriptID, CExchangeKeyID > CTxDestination
A txout script template with a specific destination.
CScript GetScriptForOpReturn(const uint256 &message)
Generate an OP_RETURN output script with the given data.
bool ExtractDestinations(const CScript &scriptPubKey, txnouttype &typeRet, std::vector< CTxDestination > &addressRet, int &nRequiredRet)
Parse a standard scriptPubKey with one or more destination addresses.
CScript GetScriptForStakeDelegation(const CKeyID &stakingKey, const CKeyID &spendingKey)
Generate a P2CS script for the given staker and owner keys.
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet, bool fColdStake=false)
Parse a standard scriptPubKey for the destination address.
CScript GetScriptForMultisig(int nRequired, const std::vector< CPubKey > &keys)
Generate a multisig script.
CScript GetScriptForStakeDelegationLOF(const CKeyID &stakingKey, const CKeyID &spendingKey)
bool Solver(const CScript &scriptPubKey, txnouttype &typeRet, std::vector< std::vector< unsigned char > > &vSolutionsRet)
Parse a scriptPubKey and identify script type for standard scripts.
CScript GetScriptForRawPubKey(const CPubKey &pubkey)
Generate a P2PK script for the given pubkey.
const char * GetTxnOutputType(txnouttype t)
unsigned nMaxDatacarrierBytes
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination is a CNoDestination.
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a PIVX scriptPubKey for the given CTxDestination.