oc-issuer  0.0.2
Public Member Functions | List of all members
DefaultModel Class Reference
Inheritance diagram for DefaultModel:
Inheritance graph
[legend]
Collaboration diagram for DefaultModel:
Collaboration graph
[legend]

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from Model
static std::unique_ptr< ModelgetModel (const std::string &backend_name)
 

Detailed Description

this is for now our sample model

Member Function Documentation

◆ getCDDC()

tl::expected<CDDC *, bool> DefaultModel::getCDDC ( unsigned int  cdd_serial)
inlineoverridevirtual

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

Implements Model.

◆ getCurrentCDDC()

tl::expected<CDDC *, bool> DefaultModel::getCurrentCDDC ( )
inlineoverridevirtual

return the CurrencyDocumentDescription certifikate see spec

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

Implements Model.

◆ getMKCs()

const std::vector<MintKeyCert> DefaultModel::getMKCs ( const std::vector< unsigned int > &  denominations,
const std::vector< BigInt > &  mint_key_ids 
)
inlineoverridevirtual

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

Implements Model.

◆ mint()

std::vector<BlindSignature> DefaultModel::mint ( const std::string &  transaction_reference,
const std::vector< Blind > &  blinds 
)
inlineoverridevirtual

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

Implements Model.

◆ redeem()

bool DefaultModel::redeem ( const std::vector< Coin > &  coins)
inlineoverridevirtual

redeem valid coins into real money

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

Implements Model.


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