X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fscript.h;h=8dd7ce986d319608f85eb806700ddd797e4e605f;hp=00b05253c656ac97f270fb3cf96513d5b0919699;hb=9e58e0a8ca28b15a4bfa677f5b23891972db40fd;hpb=3124bcacd821fc2cd6153e10cbcd8f4fb9cd9f8e diff --git a/src/script.h b/src/script.h index 00b0525..8dd7ce9 100644 --- a/src/script.h +++ b/src/script.h @@ -12,10 +12,12 @@ #include "keystore.h" #include "bignum.h" +#include "base58.h" typedef std::vector valtype; class CTransaction; +class CBitcoinAddress; static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes @@ -378,7 +380,7 @@ public: CScript& operator<<(const CPubKey& key) { - std::vector vchKey = key.Raw(); + std::vector vchKey(key.begin(), key.end()); return (*this) << vchKey; } @@ -583,8 +585,8 @@ public: bool HasCanonicalPushes() const; void SetDestination(const CTxDestination& address); - void SetDestination(const CPubKey& R, CPubKey& pubKeyVariant); - void SetMultisig(int nRequired, const std::vector& keys); + void SetAddress(const CBitcoinAddress& dest); + void SetMultisig(int nRequired, const std::vector& keys); void PrintHex() const @@ -635,9 +637,11 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector >& vSolutions); bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType); isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey); -isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest); +//isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest); +isminetype IsMine(const CKeyStore& keystore, const CBitcoinAddress& dest); void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector &vKeys); bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet); +bool ExtractAddress(const CKeyStore &keystore, const CScript& scriptPubKey, CBitcoinAddress& addressRet); bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector& addressRet, int& nRequiredRet); bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL); bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);