14 #ifndef PIVX_LIBZEROCOIN_COIN_H
15 #define PIVX_LIBZEROCOIN_COIN_H
26 static int constexpr PUBKEY_VERSION = 2;
27 static int constexpr CURRENT_VERSION = 2;
28 static int constexpr V2_BITSHIFT = 4;
51 template <
typename Stream>
An encapsulated public key.
InvalidSerialException(const std::string &message)
A Public coin is the part of a coin that is published to the network and what is handled by other cli...
CoinDenomination getDenomination() const
bool operator==(const PublicCoin &rhs) const
bool operator!=(const PublicCoin &rhs) const
const ZerocoinParams * params
bool validate() const
Checks that coin is prime and in the appropriate range given the parameters.
SERIALIZE_METHODS(PublicCoin, obj)
const CBigNum & getValue() const
PublicCoin(const ZerocoinParams *p, Stream &strm)
CoinDenomination denomination
Parameter classes for Zerocoin.
bool IsValidSerial(const ZerocoinParams *params, const CBigNum &bnSerial)
bool IsValidCommitmentToCoinRange(const ZerocoinParams *params, const CBigNum &bnCommitment)
CBigNum GetAdjustedSerial(const CBigNum &bnSerial)
int ExtractVersionFromSerial(const CBigNum &bnSerial)
CBigNum ExtractSerialFromPubKey(const CPubKey pubkey)