PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
libzerocoin::PublicCoin Class Reference

A Public coin is the part of a coin that is published to the network and what is handled by other clients. More...

#include <Coin.h>

Collaboration diagram for libzerocoin::PublicCoin:
[legend]

Public Member Functions

template<typename Stream >
 PublicCoin (const ZerocoinParams *p, Stream &strm)
 
 PublicCoin (const ZerocoinParams *p)
 
 PublicCoin (const ZerocoinParams *p, const CBigNum &coin, const CoinDenomination d)
 Generates a public coin. More...
 
const CBigNumgetValue () const
 
CoinDenomination getDenomination () const
 
bool operator== (const PublicCoin &rhs) const
 
bool operator!= (const PublicCoin &rhs) const
 
bool validate () const
 Checks that coin is prime and in the appropriate range given the parameters. More...
 
 SERIALIZE_METHODS (PublicCoin, obj)
 

Private Attributes

const ZerocoinParamsparams
 
CBigNum value
 
CoinDenomination denomination
 

Detailed Description

A Public coin is the part of a coin that is published to the network and what is handled by other clients.

It contains only the value of commitment to a serial number and the denomination of the coin.

Definition at line 48 of file Coin.h.

Constructor & Destructor Documentation

◆ PublicCoin() [1/3]

template<typename Stream >
libzerocoin::PublicCoin::PublicCoin ( const ZerocoinParams p,
Stream &  strm 
)
inline

Definition at line 52 of file Coin.h.

◆ PublicCoin() [2/3]

libzerocoin::PublicCoin::PublicCoin ( const ZerocoinParams p)
explicit

Definition at line 23 of file Coin.cpp.

◆ PublicCoin() [3/3]

libzerocoin::PublicCoin::PublicCoin ( const ZerocoinParams p,
const CBigNum coin,
const CoinDenomination  d 
)

Generates a public coin.

Parameters
pcryptographic parameters
cointhe value of the commitment.
denominationThe denomination of the coin.

Definition at line 32 of file Coin.cpp.

Member Function Documentation

◆ getDenomination()

CoinDenomination libzerocoin::PublicCoin::getDenomination ( ) const
inline

Definition at line 68 of file Coin.h.

◆ getValue()

const CBigNum& libzerocoin::PublicCoin::getValue ( ) const
inline

Definition at line 66 of file Coin.h.

◆ operator!=()

bool libzerocoin::PublicCoin::operator!= ( const PublicCoin rhs) const
inline

Definition at line 73 of file Coin.h.

◆ operator==()

bool libzerocoin::PublicCoin::operator== ( const PublicCoin rhs) const
inline

Definition at line 69 of file Coin.h.

◆ SERIALIZE_METHODS()

libzerocoin::PublicCoin::SERIALIZE_METHODS ( PublicCoin  ,
obj   
)
inline

Definition at line 79 of file Coin.h.

◆ validate()

bool libzerocoin::PublicCoin::validate ( ) const

Checks that coin is prime and in the appropriate range given the parameters.

Returns
true if valid

Definition at line 42 of file Coin.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ denomination

CoinDenomination libzerocoin::PublicCoin::denomination
private

Definition at line 84 of file Coin.h.

◆ params

const ZerocoinParams* libzerocoin::PublicCoin::params
private

Definition at line 82 of file Coin.h.

◆ value

CBigNum libzerocoin::PublicCoin::value
private

Definition at line 83 of file Coin.h.


The documentation for this class was generated from the following files: