oc-issuer  0.0.2
Public Member Functions | Static Public Member Functions | List of all members
Model Class Referenceabstract
Inheritance diagram for Model:
Inheritance graph
[legend]

Public Member Functions

virtual tl::expected< CDDC *, bool > getCDDC (unsigned int cdd_serial)=0
 
virtual tl::expected< CDDC *, bool > getCurrentCDDC ()=0
 
virtual const std::vector< MintKeyCertgetMKCs (const std::vector< unsigned int > &denominations, const std::vector< BigInt > &mint_key_ids)=0
 
virtual std::vector< BlindSignaturemint (std::string const &transaction_reference, const std::vector< Blind > &blinds)=0
 
virtual bool redeem (const std::vector< Coin > &coins)=0
 

Static Public Member Functions

static std::unique_ptr< ModelgetModel (const std::string &backend_name)
 

Member Function Documentation

◆ getCDDC()

virtual tl::expected<CDDC *, bool> Model::getCDDC ( unsigned int  cdd_serial)
pure virtual

return the CurrencyDocumentDescription certifikate for a specific serial version number of it. see spec

Returns
returns a pointer to the CDDC if successful, false otherwise

Implemented in DefaultModel.

◆ getCurrentCDDC()

virtual tl::expected<CDDC *, bool> Model::getCurrentCDDC ( )
pure virtual

return the CurrencyDocumentDescription certifikate see spec

Returns
returns a pointer to the CDDC if successful, false otherwise

Implemented in DefaultModel.

◆ getMKCs()

virtual const std::vector<MintKeyCert> Model::getMKCs ( const std::vector< unsigned int > &  denominations,
const std::vector< BigInt > &  mint_key_ids 
)
pure virtual

return the MintKey certificates for a given list of denominations and mint key ids

Parameters
denominations
mint_key_ids
Returns
mint key certificates for given denominations and mint_key_ids

Implemented in DefaultModel.

◆ getModel()

std::unique_ptr< Model > Model::getModel ( const std::string &  backend_name)
static

factory function returning a concrete backend for Opencoin API handling. based on backend_name a concrete backend will be returned or in case of error null.

Parameters
backend_name
Returns
pointer to backend instance or null on invalid backend name

◆ mint()

virtual std::vector<BlindSignature> Model::mint ( std::string const &  transaction_reference,
const std::vector< Blind > &  blinds 
)
pure virtual

returns the vector of blind signatures for a given vector of blinds

Parameters
transaction_referencereference to a transaction (send from client)
blindsthe vector of blinds to sign
Returns

Implemented in DefaultModel.

◆ redeem()

virtual bool Model::redeem ( const std::vector< Coin > &  coins)
pure virtual

redeem valid coins into real money

Parameters
coinsthe coins to redeem
Returns
true if successful, false on error

Implemented in DefaultModel.


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