+
+
+
+
+
+
+
+
+
+
11 #include "tl/expected.hpp"
+
+
+
+
15 std::string public_exponent;
+
+
17 crow::json::wvalue to_json()
const;
+
+
+
+
+
+
+
24 crow::json::wvalue to_json()
const;
+
+
+
+
+
30 std::string additional_info;
+
31 time_t cdd_expiry_date;
+
32 std::string cdd_location;
+
+
34 time_t cdd_signing_date;
+
35 size_t currency_divisor;
+
36 std::string currency_name;
+
37 std::vector<unsigned> denominations;
+
+
39 std::vector<WeightedUrl> info_service;
+
40 std::string issuer_cipher_suite;
+
+
42 issuer_public_master_key;
+
+
+
+
+
+
48 std::vector<WeightedUrl> mint_service;
+
49 std::string protocol_version;
+
50 std::vector<WeightedUrl> redeem_service;
+
51 std::vector<WeightedUrl> renew_service;
+
+
53 crow::json::wvalue to_json()
const;
+
+
+
+
+
58 std::string signature;
+
+
60 crow::json::wvalue to_json()
const;
+
+
+
+
64 unsigned int cdd_serial;
+
65 std::string coins_expiry_date;
+
66 unsigned int denomination;
+
+
68 std::string issuer_id;
+
+
+
71 std::string sign_coins_not_after;
+
72 std::string sign_coins_not_before;
+
+
74 crow::json::wvalue to_json()
const;
+
+
+
+
+
79 std::string signature;
+
+
81 crow::json::wvalue to_json()
const;
+
+
+
+
+
+
87 JSON_WRONG_REQUEST_TYPE,
+
88 JSON_WRONG_VALUE_TYPE,
+
+
+
+
+
+
94 unsigned int message_reference;
+
95 unsigned int status_code;
+
96 std::string status_description;
+
+
98 virtual crow::json::wvalue to_json()
const;
+
+
+
+
102 unsigned int message_reference;
+
104 static tl::expected<RequestCDDSerial, eError>
+
+
+
+
+
109 unsigned int cdd_serial;
+
+
111 crow::json::wvalue to_json()
const override;
+
+
+
+
115 unsigned int cdd_serial;
+
+
118 static tl::expected<RequestCDDC, eError>
from_string(
const std::string &str);
+
+
+
+
+
+
124 crow::json::wvalue to_json()
const override;
+
+
+
+
128 std::vector<unsigned int> denominations;
+
129 unsigned int message_reference;
+
+
+
133 static tl::expected<RequestMKCs, eError> from_string(
const std::string &str);
+
+
+
+
137 std::vector<MintKeyCert> keys;
+
+
139 crow::json::wvalue to_json()
const override;
+
+
+
+
143 std::string blinded_payload_hash;
+
144 std::string mint_key_id;
+
145 std::string reference;
+
146 crow::json::wvalue to_json()
const;
+
147 static tl::expected<Blind, eError> from_json(
const crow::json::rvalue &json);
+
+
+
+
151 std::string blind_signature;
+
152 std::string reference;
+
153 crow::json::wvalue to_json()
const;
+
+
+
+
157 unsigned int message_reference;
+
+
160 std::vector<Blind> blinds;
+
+
162 static tl::expected<RequestMint, eError> from_string(
const std::string &str);
+
+
+
+
166 std::vector<BlindSignature> blind_signatures;
+
+
168 crow::json::wvalue to_json()
const override;
+
+
+
+
+
173 std::string cdd_location;
+
174 unsigned int denomination;
+
175 std::string issuer_id;
+
176 std::string mint_key_id;
+
177 std::string protocol_version;
+
+
+
180 crow::json::wvalue to_json()
const;
+
181 static tl::expected<Payload, eError>
+
182 from_json(
const crow::json::rvalue &json);
+
+
+
+
186 std::string signature;
+
+
188 crow::json::wvalue to_json()
const;
+
189 static tl::expected<Coin, eError> from_json(
const crow::json::rvalue &json);
+
+
+
+
193 std::vector<Coin> coins;
+
+
+
196 crow::json::wvalue to_json()
const;
+
+
+
+
200 std::vector<Blind> blinds;
+
201 std::vector<Coin> coins;
+
202 unsigned int message_reference;
+
+
+
206 static tl::expected<RequestRenew, eError> from_string(
const std::string &str);
+
+
+
+
210 crow::json::wvalue to_json()
const override;
+
+
+
+
214 unsigned int message_reference;
+
+
+
218 static tl::expected<RequestResume, eError>
+
219 from_string(
const std::string &str);
+
+
+
+
223 std::vector<Coin> coins;
+
224 unsigned int message_reference;
+
+
227 static tl::expected<RequestRedeem, eError>
+
+
+
+
+
232 crow::json::wvalue to_json()
const override;
+
+
+
+
+
+
+
239 virtual tl::expected<CDDC *, bool> getCDDC(
unsigned int cdd_serial) = 0;
+
240 virtual tl::expected<CDDC *, bool> getCurrentCDDC() = 0;
+
+
242 virtual const std::vector<MintKeyCert>
+
243 getMKCs(
const std::vector<unsigned int> &denominations,
+
244 const std::vector<unsigned int> &mint_key_ids) = 0;
+
+
246 virtual std::vector<BlindSignature>
+
247 mint(
const std::string &transaction_reference,
+
248 const std::vector<Blind> &blinds) = 0;
+
249 virtual bool redeem(
const std::vector<Coin> &coins) = 0;
+
+
251 static std::unique_ptr<Model> getModel(
const std::string &backend_name);
+
+
+
+
+
+
Definition: model.hpp:235
+
Definition: model.hpp:150
+
Definition: model.hpp:142
+
+
+
Definition: model.hpp:192
+
Definition: model.hpp:172
+
Definition: model.hpp:171
+
+
+
+
Definition: model.hpp:114
+
static tl::expected< RequestCDDC, eError > from_string(const std::string &str)
Definition: model.cpp:137
+
unsigned int message_reference
The version of the CDD. (Int)
Definition: model.hpp:116
+
Definition: model.hpp:101
+
static tl::expected< RequestCDDSerial, eError > from_string(const std::string &str)
Definition: model.cpp:114
+
Definition: model.hpp:127
+
std::vector< unsigned int > mint_key_ids
Definition: model.hpp:131
+
Definition: model.hpp:156
+
std::string transaction_reference
Definition: model.hpp:159
+
Definition: model.hpp:222
+
static tl::expected< RequestRedeem, eError > from_string(const std::string &str)
Definition: model.cpp:401
+
Definition: model.hpp:199
+
std::string transaction_reference
Definition: model.hpp:204
+
Definition: model.hpp:213
+
std::string transaction_reference
Definition: model.hpp:216
+
Definition: model.hpp:121
+
Definition: model.hpp:108
+
Definition: model.hpp:209
+
Definition: model.hpp:136
+
Definition: model.hpp:165
+
Definition: model.hpp:231
+
+
+