Anoncoin  0.9.4
P2P Digital Currency
Public Member Functions | Public 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 Params *p, Stream &strm)
 
 PublicCoin (const Params *p)
 
 PublicCoin (const Params *p, const Bignum &coin, const CoinDenomination d)
 Generates a public coin. More...
 
Bignum getValue () const
 
CoinDenomination getDenomination () const
 
bool operator== (const PublicCoin &rhs) const
 
bool operator!= (const PublicCoin &rhs) const
 
bool validate () const
 Checks that a coin prime and in the appropriate range given the parameters. More...
 

Public Attributes

IMPLEMENT_SERIALIZE(READWRITE(value);READWRITE(denomination);) private Bignum 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 81 of file Coin.h.

Constructor & Destructor Documentation

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

Definition at line 84 of file Coin.h.

libzerocoin::PublicCoin::PublicCoin ( const Params p)

Definition at line 19 of file Coin.cpp.

libzerocoin::PublicCoin::PublicCoin ( const Params p,
const Bignum &  coin,
const CoinDenomination  d 
)

Generates a public coin.

Parameters
pcryptographic paramters
cointhe value of the commitment.
denominationThe denomination of the coin. Defaults to ZQ_LOVELACE

Definition at line 26 of file Coin.cpp.

Member Function Documentation

CoinDenomination libzerocoin::PublicCoin::getDenomination ( ) const

Definition at line 45 of file Coin.cpp.

Here is the caller graph for this function:

Bignum libzerocoin::PublicCoin::getValue ( ) const

Definition at line 41 of file Coin.cpp.

Here is the caller graph for this function:

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

Definition at line 37 of file Coin.cpp.

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

Definition at line 33 of file Coin.cpp.

bool libzerocoin::PublicCoin::validate ( ) const

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

Returns
true if valid

Definition at line 49 of file Coin.cpp.

Here is the caller graph for this function:

Member Data Documentation

CoinDenomination libzerocoin::PublicCoin::denomination

Definition at line 115 of file Coin.h.

IMPLEMENT_SERIALIZE ( READWRITE(value); READWRITE(denomination); ) private Bignum libzerocoin::PublicCoin::value

Definition at line 108 of file Coin.h.


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