![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
Go to the source code of this file.
Typedefs | |
| typedef std::vector< unsigned char > | valtype |
Functions | |
| const char * | GetTxnOutputType (txnouttype t) |
| bool | Solver (const CScript &scriptPubKey, txnouttype &typeRet, std::vector< std::vector< unsigned char > > &vSolutionsRet) |
| Parse a scriptPubKey and identify script type for standard scripts. More... | |
| bool | ExtractDestination (const CScript &scriptPubKey, CTxDestination &addressRet, bool fColdStake) |
| Parse a standard scriptPubKey for the destination address. More... | |
| bool | ExtractDestinations (const CScript &scriptPubKey, txnouttype &typeRet, std::vector< CTxDestination > &addressRet, int &nRequiredRet) |
| Parse a standard scriptPubKey with one or more destination addresses. More... | |
| CScript | GetScriptForDestination (const CTxDestination &dest) |
| Generate a PIVX scriptPubKey for the given CTxDestination. More... | |
| CScript | GetScriptForRawPubKey (const CPubKey &pubKey) |
| Generate a P2PK script for the given pubkey. More... | |
| CScript | GetScriptForStakeDelegation (const CKeyID &stakingKey, const CKeyID &spendingKey) |
| Generate a P2CS script for the given staker and owner keys. More... | |
| CScript | GetScriptForStakeDelegationLOF (const CKeyID &stakingKey, const CKeyID &spendingKey) |
| CScript | GetScriptForMultisig (int nRequired, const std::vector< CPubKey > &keys) |
| Generate a multisig script. More... | |
| CScript | GetScriptForOpReturn (const uint256 &message) |
| Generate an OP_RETURN output script with the given data. More... | |
| bool | IsValidDestination (const CTxDestination &dest) |
| Check whether a CTxDestination is a CNoDestination. More... | |
Variables | |
| unsigned | nMaxDatacarrierBytes = MAX_OP_RETURN_RELAY |
| typedef std::vector<unsigned char> valtype |
Definition at line 12 of file standard.cpp.
| bool ExtractDestination | ( | const CScript & | scriptPubKey, |
| CTxDestination & | addressRet, | ||
| bool | fColdStake = false |
||
| ) |
Parse a standard scriptPubKey for the destination address.
Assigns result to the addressRet parameter and returns true if successful. For multisig scripts, instead use ExtractDestinations. Currently only works for P2PK, P2PKH, P2SH and P2CS scripts.
Definition at line 162 of file standard.cpp.
| bool ExtractDestinations | ( | const CScript & | scriptPubKey, |
| txnouttype & | typeRet, | ||
| std::vector< CTxDestination > & | addressRet, | ||
| int & | nRequiredRet | ||
| ) |
Parse a standard scriptPubKey with one or more destination addresses.
For multisig scripts, this populates the addressRet vector with the pubkey IDs and nRequiredRet with the n required to spend. For P2CS addressRet is populated with the staker and owner IDs and nRequiredRet is set to 2. For other destinations, addressRet is populated with a single value and nRequiredRet is set to 1. Returns true if successful.
Definition at line 195 of file standard.cpp.
| CScript GetScriptForDestination | ( | const CTxDestination & | dest | ) |
Generate a PIVX scriptPubKey for the given CTxDestination.
Returns a P2PKH script for a CKeyID destination, a P2SH script for a CScriptID, and an empty script for CNoDestination.
Definition at line 278 of file standard.cpp.
Generate a multisig script.
Definition at line 311 of file standard.cpp.
Generate an OP_RETURN output script with the given data.
Definition at line 322 of file standard.cpp.
Generate a P2PK script for the given pubkey.
Definition at line 286 of file standard.cpp.
Generate a P2CS script for the given staker and owner keys.
Definition at line 291 of file standard.cpp.
Definition at line 301 of file standard.cpp.
| const char* GetTxnOutputType | ( | txnouttype | t | ) |
| bool IsValidDestination | ( | const CTxDestination & | dest | ) |
Check whether a CTxDestination is a CNoDestination.
Definition at line 329 of file standard.cpp.
| bool Solver | ( | const CScript & | scriptPubKey, |
| txnouttype & | typeRet, | ||
| std::vector< std::vector< unsigned char > > & | vSolutionsRet | ||
| ) |
Parse a scriptPubKey and identify script type for standard scripts.
If successful, returns script type and parsed pubkeys or hashes, depending on the type. For example, for a P2SH script, vSolutionsRet will contain the script hash, for P2PKH it will contain the key hash, etc.
| [in] | scriptPubKey | Script to parse |
| [out] | typeRet | The script type |
| [out] | vSolutionsRet | Vector of parsed pubkeys and hashes |
Definition at line 90 of file standard.cpp.
| unsigned nMaxDatacarrierBytes = MAX_OP_RETURN_RELAY |
Definition at line 14 of file standard.cpp.