diff --git a/annotated.html b/annotated.html index 82ab6b3..aa3491c 100644 --- a/annotated.html +++ b/annotated.html @@ -68,33 +68,34 @@ $(function() {
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 CBlind
 CBlindSignature
 CCDD
 CCDDC
 CCoin
 CPayload
 CCoinStack
 CDefaultModel
 CMintKey
 CMintKeyCert
 CModel
 CPublicKey
 CRequestCDDC
 CRequestCDDSerial
 CRequestMint
 CRequestMKCs
 CRequestRedeem
 CRequestRenew
 CRequestResume
 CResponse
 CResponseCDDC
 CResponseCDDSerial
 CResponseDelay
 CResponseMint
 CResponseMKCs
 CResponseRedeem
 CWeightedUrl
 CBigInt
 CBlind
 CBlindSignature
 CCDD
 CCDDC
 CCoin
 CPayload
 CCoinStack
 CDefaultModel
 CMintKey
 CMintKeyCert
 CModel
 CPublicKey
 CRequestCDDC
 CRequestCDDSerial
 CRequestMint
 CRequestMKCs
 CRequestRedeem
 CRequestRenew
 CRequestResume
 CResponse
 CResponseCDDC
 CResponseCDDSerial
 CResponseDelay
 CResponseMint
 CResponseMKCs
 CResponseRedeem
 CWeightedUrl
diff --git a/big__int_8hpp_source.html b/big__int_8hpp_source.html new file mode 100644 index 0000000..f6aebe4 --- /dev/null +++ b/big__int_8hpp_source.html @@ -0,0 +1,107 @@ + + + + + + + +oc-mint: src/big_int.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
oc-mint +  0.0.1 +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
big_int.hpp
+
+
+
1 #ifndef BIG_INT_HPP
+
2 #define BIG_INT_HPP
+
3 
+
4 #include <string>
+
5 #include <array>
+
6 
+
7 #include "tl/expected.hpp"
+
8 
+
9 struct BigInt {
+
10 
+
11  BigInt() : data() {}
+
12  virtual ~BigInt() {}
+
13 
+
14  enum class eError : uint8_t { PARSE_ERROR };
+
15  static tl::expected<BigInt, eError> from_string(const std::string &str);
+
16 
+
17  static BigInt from_int(uint64_t value);
+
18  std::string to_string() const;
+
19 
+
20  friend bool operator == (const BigInt& rhs, const BigInt& lhs);
+
21 private:
+
22  std::array<uint8_t,256> data;
+
23 };
+
24 
+
25 bool operator==(const BigInt &rhs, const BigInt &lhs);
+
26 
+
27 #endif // #ifndef #ifndef BIG_INT_HPP
+
Definition: big_int.hpp:9
+
+ + + + diff --git a/classDefaultModel-members.html b/classDefaultModel-members.html index cc3ecff..6215ddb 100644 --- a/classDefaultModel-members.html +++ b/classDefaultModel-members.html @@ -72,7 +72,7 @@ $(function() { DefaultModel() (defined in DefaultModel)DefaultModelinline getCDDC(unsigned int cdd_serial) override (defined in DefaultModel)DefaultModelinlinevirtual getCurrentCDDC() override (defined in DefaultModel)DefaultModelinlinevirtual - getMKCs(const std::vector< unsigned int > &denominations, const std::vector< unsigned int > &mint_key_ids) override (defined in DefaultModel)DefaultModelinlinevirtual + getMKCs(const std::vector< unsigned int > &denominations, const std::vector< BigInt > &mint_key_ids) override (defined in DefaultModel)DefaultModelinlinevirtual getModel(const std::string &backend_name) (defined in Model)Modelstatic mint(const std::string &transaction_reference, const std::vector< Blind > &blinds) override (defined in DefaultModel)DefaultModelinlinevirtual redeem(const std::vector< Coin > &coins) override (defined in DefaultModel)DefaultModelinlinevirtual diff --git a/classDefaultModel.html b/classDefaultModel.html index 7baee76..f78d710 100644 --- a/classDefaultModel.html +++ b/classDefaultModel.html @@ -99,9 +99,9 @@ tl::expected< CDDC *, bool >  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< unsigned int > &mint_key_ids) 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   diff --git a/classModel-members.html b/classModel-members.html index 6f53804..1f72b28 100644 --- a/classModel-members.html +++ b/classModel-members.html @@ -71,9 +71,9 @@ $(function() { - + - +
getCDDC(unsigned int cdd_serial)=0 (defined in Model)Modelpure virtual
getCurrentCDDC()=0 (defined in Model)Modelpure virtual
getMKCs(const std::vector< unsigned int > &denominations, const std::vector< unsigned int > &mint_key_ids)=0 (defined in Model)Modelpure virtual
getMKCs(const std::vector< unsigned int > &denominations, const std::vector< BigInt > &mint_key_ids)=0 (defined in Model)Modelpure virtual
getModel(const std::string &backend_name) (defined in Model)Modelstatic
mint(const std::string &transaction_reference, const std::vector< Blind > &blinds)=0 (defined in Model)Modelpure virtual
mint(std::string const &transaction_reference, const std::vector< Blind > &blinds)=0 (defined in Model)Modelpure virtual
redeem(const std::vector< Coin > &coins)=0 (defined in Model)Modelpure virtual
~Model() (defined in Model)Modelinlinevirtual
diff --git a/classModel.html b/classModel.html index 3532a51..9696c78 100644 --- a/classModel.html +++ b/classModel.html @@ -88,12 +88,12 @@ virtual tl::expected< CDDC *, bool & virtual tl::expected< CDDC *, bool > getCurrentCDDC ()=0   - -virtual const std::vector< MintKeyCertgetMKCs (const std::vector< unsigned int > &denominations, const std::vector< unsigned int > &mint_key_ids)=0 -  - -virtual std::vector< BlindSignaturemint (const std::string &transaction_reference, const std::vector< Blind > &blinds)=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   diff --git a/classes.html b/classes.html index fde7309..c0f17f2 100644 --- a/classes.html +++ b/classes.html @@ -70,7 +70,7 @@ $(function() {
B
-
Blind
BlindSignature
+
BigInt
Blind
BlindSignature
C
CDD
CDDC
Coin
CoinStack
diff --git a/files.html b/files.html index e8a90cc..8281e48 100644 --- a/files.html +++ b/files.html @@ -69,7 +69,8 @@ $(function() {
Here is a list of all documented files with brief descriptions:
[detail level 12]
- + +
  src
 model.hpp
 big_int.hpp
 model.hpp
diff --git a/functions.html b/functions.html index 59637a2..fabc974 100644 --- a/functions.html +++ b/functions.html @@ -72,12 +72,12 @@ $(function() { : RequestCDDC
  • mint_key_ids -: RequestMKCs +: RequestMKCs
  • transaction_reference -: RequestMint +: RequestMint , RequestRenew -, RequestResume +, RequestResume
  • diff --git a/functions_vars.html b/functions_vars.html index 512a2f2..84942e0 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -67,12 +67,12 @@ $(function() { : RequestCDDC
  • mint_key_ids -: RequestMKCs +: RequestMKCs
  • transaction_reference -: RequestMint +: RequestMint , RequestRenew -, RequestResume +, RequestResume
  • diff --git a/hierarchy.html b/hierarchy.html index c2cb3fe..fdd0bc6 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -70,33 +70,34 @@ $(function() {

    Go to the graphical class hierarchy

    This inheritance list is sorted roughly, but not completely, alphabetically:
    [detail level 12]
    - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     CBlind
     CBlindSignature
     CCDD
     CCDDC
     CCoin
     CCoinStack
     CMintKey
     CMintKeyCert
     CModel
     CDefaultModel
     CCoin::Payload
     CPublicKey
     CRequestCDDC
     CRequestCDDSerial
     CRequestMint
     CRequestMKCs
     CRequestRedeem
     CRequestRenew
     CRequestResume
     CResponse
     CResponseCDDC
     CResponseCDDSerial
     CResponseDelay
     CResponseMKCs
     CResponseMint
     CResponseRedeem
     CWeightedUrl
     CBigInt
     CBlind
     CBlindSignature
     CCDD
     CCDDC
     CCoin
     CCoinStack
     CMintKey
     CMintKeyCert
     CModel
     CDefaultModel
     CCoin::Payload
     CPublicKey
     CRequestCDDC
     CRequestCDDSerial
     CRequestMint
     CRequestMKCs
     CRequestRedeem
     CRequestRenew
     CRequestResume
     CResponse
     CResponseCDDC
     CResponseCDDSerial
     CResponseDelay
     CResponseMKCs
     CResponseMint
     CResponseRedeem
     CWeightedUrl
    diff --git a/inherit_graph_0.map b/inherit_graph_0.map index 2c853e3..e3918ac 100644 --- a/inherit_graph_0.map +++ b/inherit_graph_0.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_0.md5 b/inherit_graph_0.md5 index 28e361a..fd8e4ba 100644 --- a/inherit_graph_0.md5 +++ b/inherit_graph_0.md5 @@ -1 +1 @@ -08cf86e31fd1681d7ed96fd0fc93a216 \ No newline at end of file +23c5b04bb5e9a7bb0bf67f1e500cb985 \ No newline at end of file diff --git a/inherit_graph_0.png b/inherit_graph_0.png index 6173d8b..4161f56 100644 Binary files a/inherit_graph_0.png and b/inherit_graph_0.png differ diff --git a/inherit_graph_1.map b/inherit_graph_1.map index 26fe4ee..2c853e3 100644 --- a/inherit_graph_1.map +++ b/inherit_graph_1.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_1.md5 b/inherit_graph_1.md5 index 3a4ec3d..28e361a 100644 --- a/inherit_graph_1.md5 +++ b/inherit_graph_1.md5 @@ -1 +1 @@ -5f54dbfb87c04d1d86a00567efa58454 \ No newline at end of file +08cf86e31fd1681d7ed96fd0fc93a216 \ No newline at end of file diff --git a/inherit_graph_1.png b/inherit_graph_1.png index 8abb396..6173d8b 100644 Binary files a/inherit_graph_1.png and b/inherit_graph_1.png differ diff --git a/inherit_graph_10.map b/inherit_graph_10.map index 3ad8a13..1e7832c 100644 --- a/inherit_graph_10.map +++ b/inherit_graph_10.map @@ -1,3 +1,4 @@ - + + diff --git a/inherit_graph_10.md5 b/inherit_graph_10.md5 index d2f3207..49a2669 100644 --- a/inherit_graph_10.md5 +++ b/inherit_graph_10.md5 @@ -1 +1 @@ -fd9e8702e04cbad4da7c624c5b37d5c8 \ No newline at end of file +852e02c69c7c49dfca7a12fc3b330ccb \ No newline at end of file diff --git a/inherit_graph_10.png b/inherit_graph_10.png index 456ceef..ce24a63 100644 Binary files a/inherit_graph_10.png and b/inherit_graph_10.png differ diff --git a/inherit_graph_11.map b/inherit_graph_11.map index 8a3f715..3ad8a13 100644 --- a/inherit_graph_11.map +++ b/inherit_graph_11.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_11.md5 b/inherit_graph_11.md5 index 358858a..d2f3207 100644 --- a/inherit_graph_11.md5 +++ b/inherit_graph_11.md5 @@ -1 +1 @@ -a1e4bd3b4348168b6512d1e865b8c6f4 \ No newline at end of file +fd9e8702e04cbad4da7c624c5b37d5c8 \ No newline at end of file diff --git a/inherit_graph_11.png b/inherit_graph_11.png index f9d2ab3..456ceef 100644 Binary files a/inherit_graph_11.png and b/inherit_graph_11.png differ diff --git a/inherit_graph_12.map b/inherit_graph_12.map index 86383fc..8a3f715 100644 --- a/inherit_graph_12.map +++ b/inherit_graph_12.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_12.md5 b/inherit_graph_12.md5 index 65713ff..358858a 100644 --- a/inherit_graph_12.md5 +++ b/inherit_graph_12.md5 @@ -1 +1 @@ -a07159cdc3551ec3b004be5c7d60d522 \ No newline at end of file +a1e4bd3b4348168b6512d1e865b8c6f4 \ No newline at end of file diff --git a/inherit_graph_12.png b/inherit_graph_12.png index 3bfe7f8..f9d2ab3 100644 Binary files a/inherit_graph_12.png and b/inherit_graph_12.png differ diff --git a/inherit_graph_13.map b/inherit_graph_13.map index 2b22310..86383fc 100644 --- a/inherit_graph_13.map +++ b/inherit_graph_13.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_13.md5 b/inherit_graph_13.md5 index 95dd9cb..65713ff 100644 --- a/inherit_graph_13.md5 +++ b/inherit_graph_13.md5 @@ -1 +1 @@ -1df40b4b6eab24a99ebf19f3541704fc \ No newline at end of file +a07159cdc3551ec3b004be5c7d60d522 \ No newline at end of file diff --git a/inherit_graph_13.png b/inherit_graph_13.png index b0980b8..3bfe7f8 100644 Binary files a/inherit_graph_13.png and b/inherit_graph_13.png differ diff --git a/inherit_graph_14.map b/inherit_graph_14.map index f5508b7..2b22310 100644 --- a/inherit_graph_14.map +++ b/inherit_graph_14.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_14.md5 b/inherit_graph_14.md5 index 82b2baf..95dd9cb 100644 --- a/inherit_graph_14.md5 +++ b/inherit_graph_14.md5 @@ -1 +1 @@ -acee1414e6406da4f3bd1c7e4d13da6f \ No newline at end of file +1df40b4b6eab24a99ebf19f3541704fc \ No newline at end of file diff --git a/inherit_graph_14.png b/inherit_graph_14.png index dcbf7c6..b0980b8 100644 Binary files a/inherit_graph_14.png and b/inherit_graph_14.png differ diff --git a/inherit_graph_15.map b/inherit_graph_15.map index 920367a..f5508b7 100644 --- a/inherit_graph_15.map +++ b/inherit_graph_15.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_15.md5 b/inherit_graph_15.md5 index 7b55822..82b2baf 100644 --- a/inherit_graph_15.md5 +++ b/inherit_graph_15.md5 @@ -1 +1 @@ -749533ca4634c97e5a00b5c5f820583d \ No newline at end of file +acee1414e6406da4f3bd1c7e4d13da6f \ No newline at end of file diff --git a/inherit_graph_15.png b/inherit_graph_15.png index 2359f4c..dcbf7c6 100644 Binary files a/inherit_graph_15.png and b/inherit_graph_15.png differ diff --git a/inherit_graph_16.map b/inherit_graph_16.map index 2bad5c1..920367a 100644 --- a/inherit_graph_16.map +++ b/inherit_graph_16.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_16.md5 b/inherit_graph_16.md5 index 27084fa..7b55822 100644 --- a/inherit_graph_16.md5 +++ b/inherit_graph_16.md5 @@ -1 +1 @@ -3ed465c69fb501b7c3155efe60865c7b \ No newline at end of file +749533ca4634c97e5a00b5c5f820583d \ No newline at end of file diff --git a/inherit_graph_16.png b/inherit_graph_16.png index 74465f2..2359f4c 100644 Binary files a/inherit_graph_16.png and b/inherit_graph_16.png differ diff --git a/inherit_graph_17.map b/inherit_graph_17.map index b722d4e..2bad5c1 100644 --- a/inherit_graph_17.map +++ b/inherit_graph_17.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_17.md5 b/inherit_graph_17.md5 index 6fd603f..27084fa 100644 --- a/inherit_graph_17.md5 +++ b/inherit_graph_17.md5 @@ -1 +1 @@ -787137a9b1881efa85874df81192a2dc \ No newline at end of file +3ed465c69fb501b7c3155efe60865c7b \ No newline at end of file diff --git a/inherit_graph_17.png b/inherit_graph_17.png index 7152e85..74465f2 100644 Binary files a/inherit_graph_17.png and b/inherit_graph_17.png differ diff --git a/inherit_graph_18.map b/inherit_graph_18.map index b1a23b1..b722d4e 100644 --- a/inherit_graph_18.map +++ b/inherit_graph_18.map @@ -1,9 +1,3 @@ - - - - - - - + diff --git a/inherit_graph_18.md5 b/inherit_graph_18.md5 index b2a9153..6fd603f 100644 --- a/inherit_graph_18.md5 +++ b/inherit_graph_18.md5 @@ -1 +1 @@ -bc7ac9be50a72ca79f0d891fef91c929 \ No newline at end of file +787137a9b1881efa85874df81192a2dc \ No newline at end of file diff --git a/inherit_graph_18.png b/inherit_graph_18.png index 037929a..7152e85 100644 Binary files a/inherit_graph_18.png and b/inherit_graph_18.png differ diff --git a/inherit_graph_19.map b/inherit_graph_19.map index 3b55e6a..b1a23b1 100644 --- a/inherit_graph_19.map +++ b/inherit_graph_19.map @@ -1,3 +1,9 @@ - + + + + + + + diff --git a/inherit_graph_19.md5 b/inherit_graph_19.md5 index ed4cb7b..b2a9153 100644 --- a/inherit_graph_19.md5 +++ b/inherit_graph_19.md5 @@ -1 +1 @@ -c2416909fdc638a520dfad63ed335b9f \ No newline at end of file +bc7ac9be50a72ca79f0d891fef91c929 \ No newline at end of file diff --git a/inherit_graph_19.png b/inherit_graph_19.png index ef9167b..037929a 100644 Binary files a/inherit_graph_19.png and b/inherit_graph_19.png differ diff --git a/inherit_graph_2.map b/inherit_graph_2.map index d852a7f..26fe4ee 100644 --- a/inherit_graph_2.map +++ b/inherit_graph_2.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_2.md5 b/inherit_graph_2.md5 index c3482bd..3a4ec3d 100644 --- a/inherit_graph_2.md5 +++ b/inherit_graph_2.md5 @@ -1 +1 @@ -6d8097bd2a3097465b49200829cf52f0 \ No newline at end of file +5f54dbfb87c04d1d86a00567efa58454 \ No newline at end of file diff --git a/inherit_graph_2.png b/inherit_graph_2.png index 7b444f6..8abb396 100644 Binary files a/inherit_graph_2.png and b/inherit_graph_2.png differ diff --git a/inherit_graph_20.map b/inherit_graph_20.map new file mode 100644 index 0000000..3b55e6a --- /dev/null +++ b/inherit_graph_20.map @@ -0,0 +1,3 @@ + + + diff --git a/inherit_graph_20.md5 b/inherit_graph_20.md5 new file mode 100644 index 0000000..ed4cb7b --- /dev/null +++ b/inherit_graph_20.md5 @@ -0,0 +1 @@ +c2416909fdc638a520dfad63ed335b9f \ No newline at end of file diff --git a/inherit_graph_20.png b/inherit_graph_20.png new file mode 100644 index 0000000..ef9167b Binary files /dev/null and b/inherit_graph_20.png differ diff --git a/inherit_graph_3.map b/inherit_graph_3.map index bc0eda2..d852a7f 100644 --- a/inherit_graph_3.map +++ b/inherit_graph_3.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_3.md5 b/inherit_graph_3.md5 index bf05613..c3482bd 100644 --- a/inherit_graph_3.md5 +++ b/inherit_graph_3.md5 @@ -1 +1 @@ -333c40bd2ce50399838c0a20c46a8d32 \ No newline at end of file +6d8097bd2a3097465b49200829cf52f0 \ No newline at end of file diff --git a/inherit_graph_3.png b/inherit_graph_3.png index 4d51076..7b444f6 100644 Binary files a/inherit_graph_3.png and b/inherit_graph_3.png differ diff --git a/inherit_graph_4.map b/inherit_graph_4.map index 8d1a7ef..bc0eda2 100644 --- a/inherit_graph_4.map +++ b/inherit_graph_4.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_4.md5 b/inherit_graph_4.md5 index 41fb33f..bf05613 100644 --- a/inherit_graph_4.md5 +++ b/inherit_graph_4.md5 @@ -1 +1 @@ -8549cb37020bda69f74c68c89d569639 \ No newline at end of file +333c40bd2ce50399838c0a20c46a8d32 \ No newline at end of file diff --git a/inherit_graph_4.png b/inherit_graph_4.png index 6d97bc1..4d51076 100644 Binary files a/inherit_graph_4.png and b/inherit_graph_4.png differ diff --git a/inherit_graph_5.map b/inherit_graph_5.map index d0c71fd..8d1a7ef 100644 --- a/inherit_graph_5.map +++ b/inherit_graph_5.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_5.md5 b/inherit_graph_5.md5 index a799e7c..41fb33f 100644 --- a/inherit_graph_5.md5 +++ b/inherit_graph_5.md5 @@ -1 +1 @@ -bc6e99dcf7dbbd75d21e48fbc2746f77 \ No newline at end of file +8549cb37020bda69f74c68c89d569639 \ No newline at end of file diff --git a/inherit_graph_5.png b/inherit_graph_5.png index 96eb920..6d97bc1 100644 Binary files a/inherit_graph_5.png and b/inherit_graph_5.png differ diff --git a/inherit_graph_6.map b/inherit_graph_6.map index 6e27238..d0c71fd 100644 --- a/inherit_graph_6.map +++ b/inherit_graph_6.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_6.md5 b/inherit_graph_6.md5 index 5dda409..a799e7c 100644 --- a/inherit_graph_6.md5 +++ b/inherit_graph_6.md5 @@ -1 +1 @@ -329c2fc4f2793bcf1cede6b077e85f76 \ No newline at end of file +bc6e99dcf7dbbd75d21e48fbc2746f77 \ No newline at end of file diff --git a/inherit_graph_6.png b/inherit_graph_6.png index b4e275e..96eb920 100644 Binary files a/inherit_graph_6.png and b/inherit_graph_6.png differ diff --git a/inherit_graph_7.map b/inherit_graph_7.map index 06661cf..6e27238 100644 --- a/inherit_graph_7.map +++ b/inherit_graph_7.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_7.md5 b/inherit_graph_7.md5 index 99edd2f..5dda409 100644 --- a/inherit_graph_7.md5 +++ b/inherit_graph_7.md5 @@ -1 +1 @@ -4691c5a900a44d371261adfe89413fb2 \ No newline at end of file +329c2fc4f2793bcf1cede6b077e85f76 \ No newline at end of file diff --git a/inherit_graph_7.png b/inherit_graph_7.png index d99c689..b4e275e 100644 Binary files a/inherit_graph_7.png and b/inherit_graph_7.png differ diff --git a/inherit_graph_8.map b/inherit_graph_8.map index 40f8d8a..06661cf 100644 --- a/inherit_graph_8.map +++ b/inherit_graph_8.map @@ -1,3 +1,3 @@ - + diff --git a/inherit_graph_8.md5 b/inherit_graph_8.md5 index 3e173e9..99edd2f 100644 --- a/inherit_graph_8.md5 +++ b/inherit_graph_8.md5 @@ -1 +1 @@ -b0a7acf4da3cbd2644b9f927c0ddb030 \ No newline at end of file +4691c5a900a44d371261adfe89413fb2 \ No newline at end of file diff --git a/inherit_graph_8.png b/inherit_graph_8.png index 9d6ca88..d99c689 100644 Binary files a/inherit_graph_8.png and b/inherit_graph_8.png differ diff --git a/inherit_graph_9.map b/inherit_graph_9.map index 1e7832c..40f8d8a 100644 --- a/inherit_graph_9.map +++ b/inherit_graph_9.map @@ -1,4 +1,3 @@ - - + diff --git a/inherit_graph_9.md5 b/inherit_graph_9.md5 index 49a2669..3e173e9 100644 --- a/inherit_graph_9.md5 +++ b/inherit_graph_9.md5 @@ -1 +1 @@ -852e02c69c7c49dfca7a12fc3b330ccb \ No newline at end of file +b0a7acf4da3cbd2644b9f927c0ddb030 \ No newline at end of file diff --git a/inherit_graph_9.png b/inherit_graph_9.png index ce24a63..9d6ca88 100644 Binary files a/inherit_graph_9.png and b/inherit_graph_9.png differ diff --git a/inherits.html b/inherits.html index bbaf17f..c00ee48 100644 --- a/inherits.html +++ b/inherits.html @@ -69,98 +69,103 @@ $(function() {

    Go to the textual class hierarchy

    - + - - - - - - - - - - - - - - - - - - - - +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    @@ -171,7 +176,7 @@ $(function() {
    +
    diff --git a/model_8hpp_source.html b/model_8hpp_source.html index bdead42..5ca3a2d 100644 --- a/model_8hpp_source.html +++ b/model_8hpp_source.html @@ -81,277 +81,279 @@ $(function() {
    9 #include "crow/json.h"
    10 
    11 #include "tl/expected.hpp"
    -
    12 
    -
    13 struct PublicKey {
    -
    14  std::string modulus; //: "daaa63ddda38c189b8c49020c8276adbe0a695685a...",
    -
    15  std::string public_exponent; //: 65537,
    -
    16 
    -
    17  crow::json::wvalue to_json() const;
    -
    18 };
    -
    19 
    -
    20 struct WeightedUrl {
    -
    21  uint32_t weight;
    -
    22  std::string url;
    -
    23 
    -
    24  crow::json::wvalue to_json() const;
    -
    25 };
    -
    26 
    -
    28 struct CDD {
    -
    29 
    -
    30  std::string additional_info;
    -
    31  time_t cdd_expiry_date; //: 2023-07-22T15:45:53.164685
    -
    32  std::string cdd_location; //: https://opencent.org,
    -
    33  size_t cdd_serial; //: 1,
    -
    34  time_t cdd_signing_date; //: 2022-07-22T15:45:53.164685,
    -
    35  size_t currency_divisor; //: 100,
    -
    36  std::string currency_name; //: OpenCent,
    -
    37  std::vector<unsigned> denominations; //: [1, 2, 5],
    -
    38  std::string id; //: 23ed956e629ba35f0002eaf833ea436aea7db5c2,
    -
    39  std::vector<WeightedUrl> info_service;
    -
    40  /* eCipherSuite*/ std::string issuer_cipher_suite; //: RSA-SHA256-PSS-CHAUM82,
    -
    41  PublicKey
    -
    42  issuer_public_master_key; //: {
    -
    43  // modulus:
    -
    44  // daaa63ddda38c189b8c49020c8276adbe0a695685a...,
    -
    45  // public_exponent: 65537,
    -
    46  // type: rsa public key
    -
    47  //},
    -
    48  std::vector<WeightedUrl> mint_service;
    -
    49  std::string protocol_version; //: https://opencoin.org/1.0,
    -
    50  std::vector<WeightedUrl> redeem_service;
    -
    51  std::vector<WeightedUrl> renew_service;
    -
    52 
    -
    53  crow::json::wvalue to_json() const;
    -
    54 };
    -
    55 
    -
    56 struct CDDC {
    -
    57  CDD cdd;
    -
    58  std::string signature;
    -
    59 
    -
    60  crow::json::wvalue to_json() const;
    -
    61 };
    -
    62 
    -
    63 struct MintKey {
    -
    64  unsigned int cdd_serial;
    -
    65  std::string coins_expiry_date; //": "2023-10-30T15:45:53.164685",
    -
    66  unsigned int denomination; //": 1,
    -
    67  std::string id; // "1ceb977bb531c65f133ab8b0d60862b17369d96",
    -
    68  std::string issuer_id; //": "23ed956e629ba35f0002eaf833ea436aea7db5c2",
    -
    69  PublicKey public_mint_key;
    -
    70 
    -
    71  std::string sign_coins_not_after;
    -
    72  std::string sign_coins_not_before;
    -
    73  // "type": "mint key"
    -
    74  crow::json::wvalue to_json() const;
    -
    75 };
    -
    76 
    -
    77 struct MintKeyCert {
    -
    78  MintKey mint_key;
    -
    79  std::string signature;
    -
    80 
    -
    81  crow::json::wvalue to_json() const;
    -
    82 };
    -
    83 
    -
    84 enum class eError {
    -
    85  JSON_PARSE_ERROR,
    -
    86  JSON_MISSING_KEY,
    -
    87  JSON_WRONG_REQUEST_TYPE,
    -
    88  JSON_WRONG_VALUE_TYPE,
    -
    89  JSON_ERROR,
    -
    90  NOT_IMPLEMENTED
    -
    91 };
    -
    92 
    -
    93 struct Response {
    -
    94  unsigned int message_reference;
    -
    95  unsigned int status_code;
    -
    96  std::string status_description;
    -
    97 
    -
    98  virtual crow::json::wvalue to_json() const;
    -
    99 };
    -
    100 
    - -
    102  unsigned int message_reference;
    -
    104  static tl::expected<RequestCDDSerial, eError>
    -
    105  from_string(const std::string &str);
    -
    106 };
    -
    107 
    - -
    109  unsigned int cdd_serial;
    -
    110 
    -
    111  crow::json::wvalue to_json() const override;
    -
    112 };
    -
    113 
    -
    114 struct RequestCDDC {
    -
    115  unsigned int cdd_serial;
    -
    116  unsigned int message_reference;
    -
    118  static tl::expected<RequestCDDC, eError> from_string(const std::string &str);
    -
    119 };
    -
    120 
    - -
    122  CDDC cddc;
    -
    123 
    -
    124  crow::json::wvalue to_json() const override;
    -
    125 };
    -
    126 
    -
    127 struct RequestMKCs {
    -
    128  std::vector<unsigned int> denominations;
    -
    129  unsigned int message_reference;
    -
    131  std::vector<unsigned int> mint_key_ids;
    -
    132  // "type": "request mint key certificates"
    -
    133  static tl::expected<RequestMKCs, eError> from_string(const std::string &str);
    -
    134 };
    -
    135 
    - -
    137  std::vector<MintKeyCert> keys;
    -
    138 
    -
    139  crow::json::wvalue to_json() const override;
    -
    140 };
    -
    141 
    -
    142 struct Blind {
    -
    143  std::string blinded_payload_hash; // bigint
    -
    144  std::string mint_key_id; // bigint
    -
    145  std::string reference;
    -
    146  crow::json::wvalue to_json() const;
    -
    147  static tl::expected<Blind, eError> from_json(const crow::json::rvalue &json);
    -
    148 };
    -
    149 
    - -
    151  std::string blind_signature;
    -
    152  std::string reference;
    -
    153  crow::json::wvalue to_json() const;
    -
    154 };
    -
    155 
    -
    156 struct RequestMint {
    -
    157  unsigned int message_reference;
    - -
    160  std::vector<Blind> blinds;
    -
    161  // "type": "request mint"
    -
    162  static tl::expected<RequestMint, eError> from_string(const std::string &str);
    -
    163 };
    -
    164 
    - -
    166  std::vector<BlindSignature> blind_signatures;
    -
    167 
    -
    168  crow::json::wvalue to_json() const override;
    -
    169 };
    -
    170 
    -
    171 struct Coin {
    -
    172  struct Payload {
    -
    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;
    -
    178  std::string serial;
    -
    179 
    -
    180  crow::json::wvalue to_json() const;
    -
    181  static tl::expected<Payload, eError>
    -
    182  from_json(const crow::json::rvalue &json);
    -
    183  };
    -
    184 
    -
    185  Payload payload;
    -
    186  std::string signature;
    -
    187 
    -
    188  crow::json::wvalue to_json() const;
    -
    189  static tl::expected<Coin, eError> from_json(const crow::json::rvalue &json);
    -
    190 };
    -
    191 
    -
    192 struct CoinStack {
    -
    193  std::vector<Coin> coins;
    -
    194  std::string subject;
    -
    195  // "type": "coinstack"
    -
    196  crow::json::wvalue to_json() const;
    -
    197 };
    -
    198 
    -
    199 struct RequestRenew {
    -
    200  std::vector<Blind> blinds;
    -
    201  std::vector<Coin> coins;
    -
    202  unsigned int message_reference;
    - -
    205  // "type": "request renew"
    -
    206  static tl::expected<RequestRenew, eError> from_string(const std::string &str);
    -
    207 };
    -
    208 
    - -
    210  crow::json::wvalue to_json() const override;
    -
    211 };
    -
    212 
    - -
    214  unsigned int message_reference;
    - -
    217  // "type": "request resume"
    -
    218  static tl::expected<RequestResume, eError>
    -
    219  from_string(const std::string &str);
    -
    220 };
    -
    221 
    - -
    223  std::vector<Coin> coins;
    -
    224  unsigned int message_reference;
    -
    226  // "type": "request redeem"
    -
    227  static tl::expected<RequestRedeem, eError>
    -
    228  from_string(const std::string &str);
    -
    229 };
    -
    230 
    - -
    232  crow::json::wvalue to_json() const override;
    -
    233 };
    -
    234 
    -
    235 class Model {
    -
    236 public:
    -
    237  virtual ~Model(){};
    -
    238 
    -
    239  virtual tl::expected<CDDC *, bool> getCDDC(unsigned int cdd_serial) = 0;
    -
    240  virtual tl::expected<CDDC *, bool> getCurrentCDDC() = 0;
    -
    241 
    -
    242  virtual const std::vector<MintKeyCert>
    -
    243  getMKCs(const std::vector<unsigned int> &denominations,
    -
    244  const std::vector<unsigned int> &mint_key_ids) = 0;
    -
    245 
    -
    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;
    -
    250 
    -
    251  static std::unique_ptr<Model> getModel(const std::string &backend_name);
    -
    252 
    -
    253 private:
    -
    254 };
    -
    255 
    -
    256 #endif // #ifndef MODEL_HPP
    -
    Definition: model.hpp:235
    -
    Definition: model.hpp:150
    -
    Definition: model.hpp:142
    -
    Definition: model.hpp:56
    -
    Definition: model.hpp:28
    -
    Definition: model.hpp:192
    -
    Definition: model.hpp:172
    -
    Definition: model.hpp:171
    -
    Definition: model.hpp:77
    -
    Definition: model.hpp:63
    -
    Definition: model.hpp:13
    -
    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
    -
    Definition: model.hpp:93
    -
    Definition: model.hpp:20
    +
    12 #include "big_int.hpp"
    +
    13 
    +
    14 struct PublicKey {
    +
    15  BigInt modulus; //: "daaa63ddda38c189b8c49020c8276adbe0a695685a...",
    +
    16  BigInt public_exponent;//: 65537,
    +
    17 
    +
    18  crow::json::wvalue to_json() const;
    +
    19 };
    +
    20 
    +
    21 struct WeightedUrl {
    +
    22  uint32_t weight;
    +
    23  std::string url;
    +
    24 
    +
    25  crow::json::wvalue to_json() const;
    +
    26 };
    +
    27 
    +
    29 struct CDD {
    +
    30 
    +
    31  std::string additional_info;
    +
    32  time_t cdd_expiry_date;//: 2023-07-22T15:45:53.164685
    +
    33  std::string cdd_location;//: https://opencent.org,
    +
    34  size_t cdd_serial;//: 1,
    +
    35  time_t cdd_signing_date;//: 2022-07-22T15:45:53.164685,
    +
    36  size_t currency_divisor;//: 100,
    +
    37  std::string currency_name;//: OpenCent,
    +
    38  std::vector<unsigned> denominations;//: [1, 2, 5],
    +
    39  BigInt id;//: 23ed956e629ba35f0002eaf833ea436aea7db5c2,
    +
    40 
    +
    41 std::vector<WeightedUrl> info_service;
    +
    42  /* eCipherSuite*/ std::string issuer_cipher_suite; //: RSA-SHA256-PSS-CHAUM82,
    +
    43  PublicKey
    +
    44  issuer_public_master_key; //: {
    +
    45  // modulus:
    +
    46  // daaa63ddda38c189b8c49020c8276adbe0a695685a...,
    +
    47  // public_exponent: 65537,
    +
    48  // type: rsa public key
    +
    49  //},
    +
    50  std::vector<WeightedUrl> mint_service;
    +
    51  std::string protocol_version; //: https://opencoin.org/1.0,
    +
    52  std::vector<WeightedUrl> redeem_service;
    +
    53  std::vector<WeightedUrl> renew_service;
    +
    54 
    +
    55  crow::json::wvalue to_json() const;
    +
    56 };
    +
    57 
    +
    58 struct CDDC {
    +
    59  CDD cdd;
    +
    60  std::string signature;
    +
    61 
    +
    62  crow::json::wvalue to_json() const;
    +
    63 };
    +
    64 
    +
    65 struct MintKey {
    +
    66  unsigned int cdd_serial;
    +
    67  std::string coins_expiry_date; //": "2023-10-30T15:45:53.164685",
    +
    68  unsigned int denomination; //": 1,
    +
    69  BigInt id; // "1ceb977bb531c65f133ab8b0d60862b17369d96",
    +
    70  BigInt issuer_id; //": "23ed956e629ba35f0002eaf833ea436aea7db5c2",
    +
    71  PublicKey public_mint_key;
    +
    72 
    +
    73  std::string sign_coins_not_after;
    +
    74  std::string sign_coins_not_before;
    +
    75  // "type": "mint key"
    +
    76  crow::json::wvalue to_json() const;
    +
    77 };
    +
    78 
    +
    79 struct MintKeyCert {
    +
    80  MintKey mint_key;
    +
    81  std::string signature;
    +
    82 
    +
    83  crow::json::wvalue to_json() const;
    +
    84 };
    +
    85 
    +
    86 enum class eError {
    +
    87  JSON_PARSE_ERROR,
    +
    88  JSON_MISSING_KEY,
    +
    89  JSON_WRONG_REQUEST_TYPE,
    +
    90  JSON_WRONG_VALUE_TYPE,
    +
    91  JSON_ERROR,
    +
    92  NOT_IMPLEMENTED
    +
    93 };
    +
    94 
    +
    95 struct Response {
    +
    96  unsigned int message_reference;
    +
    97  unsigned int status_code;
    +
    98  std::string status_description;
    +
    99 
    +
    100  virtual crow::json::wvalue to_json() const;
    +
    101 };
    +
    102 
    + +
    104  unsigned int message_reference;
    +
    106  static tl::expected<RequestCDDSerial, eError>
    +
    107  from_string(const std::string &str);
    +
    108 };
    +
    109 
    + +
    111  unsigned int cdd_serial;
    +
    112 
    +
    113  crow::json::wvalue to_json() const override;
    +
    114 };
    +
    115 
    +
    116 struct RequestCDDC {
    +
    117  unsigned int cdd_serial;
    +
    118  unsigned int message_reference;
    +
    120  static tl::expected<RequestCDDC, eError> from_string(const std::string &str);
    +
    121 };
    +
    122 
    + +
    124  CDDC cddc;
    +
    125 
    +
    126  crow::json::wvalue to_json() const override;
    +
    127 };
    +
    128 
    +
    129 struct RequestMKCs {
    +
    130  std::vector<unsigned int> denominations;
    +
    131  unsigned int message_reference;
    +
    133  std::vector<BigInt> mint_key_ids;
    +
    134  // "type": "request mint key certificates"
    +
    135  static tl::expected<RequestMKCs, eError> from_string(const std::string &str);
    +
    136 };
    +
    137 
    + +
    139  std::vector<MintKeyCert> keys;
    +
    140 
    +
    141  crow::json::wvalue to_json() const override;
    +
    142 };
    +
    143 
    +
    144 struct Blind {
    +
    145  BigInt blinded_payload_hash; //bigint
    +
    146  BigInt mint_key_id; //bigint
    +
    147  std::string reference;
    +
    148  crow::json::wvalue to_json() const;
    +
    149  static tl::expected<Blind, eError> from_json(const crow::json::rvalue &json);
    +
    150 };
    +
    151 
    + +
    153  BigInt blind_signature;
    +
    154  std::string reference;
    +
    155  crow::json::wvalue to_json() const;
    +
    156 };
    +
    157 
    +
    158 struct RequestMint {
    +
    159  unsigned int message_reference;
    + +
    162  std::vector<Blind> blinds;
    +
    163  // "type": "request mint"
    +
    164  static tl::expected<RequestMint, eError> from_string(const std::string &str);
    +
    165 };
    +
    166 
    + +
    168  std::vector<BlindSignature> blind_signatures;
    +
    169 
    +
    170  crow::json::wvalue to_json() const override;
    +
    171 };
    +
    172 
    +
    173 struct Coin {
    +
    174  struct Payload {
    +
    175  std::string cdd_location;
    +
    176  unsigned int denomination;
    +
    177  BigInt issuer_id;
    +
    178  BigInt mint_key_id;
    +
    179  std::string protocol_version;
    +
    180  BigInt serial;
    +
    181 
    +
    182  crow::json::wvalue to_json() const;
    +
    183  static tl::expected<Payload,eError> from_json(const crow::json::rvalue& json);
    +
    184  };
    +
    185 
    +
    186  Payload payload;
    +
    187  std::string signature;
    +
    188 
    +
    189  crow::json::wvalue to_json() const;
    +
    190  static tl::expected<Coin, eError> from_json(const crow::json::rvalue &json);
    +
    191 };
    +
    192 
    +
    193 struct CoinStack {
    +
    194  std::vector<Coin> coins;
    +
    195  std::string subject;
    +
    196  // "type": "coinstack"
    +
    197  crow::json::wvalue to_json() const;
    +
    198 };
    +
    199 
    +
    200 struct RequestRenew {
    +
    201  std::vector<Blind> blinds;
    +
    202  std::vector<Coin> coins;
    +
    203  unsigned int message_reference;
    + +
    206  // "type": "request renew"
    +
    207  static tl::expected<RequestRenew, eError> from_string(const std::string &str);
    +
    208 };
    +
    209 
    + +
    211  crow::json::wvalue to_json() const override;
    +
    212 };
    +
    213 
    + +
    215  unsigned int message_reference;
    + +
    218  // "type": "request resume"
    +
    219  static tl::expected<RequestResume, eError>
    +
    220  from_string(const std::string &str);
    +
    221 };
    +
    222 
    + +
    224  std::vector<Coin> coins;
    +
    225  unsigned int message_reference;
    +
    227  // "type": "request redeem"
    +
    228  static tl::expected<RequestRedeem, eError>
    +
    229  from_string(const std::string &str);
    +
    230 };
    +
    231 
    + +
    233  crow::json::wvalue to_json() const override;
    +
    234 };
    +
    235 
    +
    236 class Model {
    +
    237 public:
    +
    238  virtual ~Model(){};
    +
    239 
    +
    240  virtual tl::expected<CDDC *, bool> getCDDC(unsigned int cdd_serial) = 0;
    +
    241  virtual tl::expected<CDDC *, bool> getCurrentCDDC() = 0;
    +
    242 
    +
    243  virtual const std::vector<MintKeyCert>
    +
    244  getMKCs(const std::vector<unsigned int> &denominations,
    +
    245  const std::vector<BigInt> &mint_key_ids) = 0;
    +
    246 
    +
    247  virtual std::vector<BlindSignature>
    +
    248  mint(std::string const& transaction_reference,
    +
    249  const std::vector<Blind> &blinds) = 0;
    +
    250  virtual bool redeem(const std::vector<Coin> &coins) = 0;
    +
    251 
    +
    252  static std::unique_ptr<Model> getModel(const std::string &backend_name);
    +
    253 
    +
    254 private:
    +
    255 };
    +
    256 
    +
    257 #endif // #ifndef MODEL_HPP
    +
    Definition: model.hpp:236
    +
    Definition: big_int.hpp:9
    +
    Definition: model.hpp:152
    +
    Definition: model.hpp:144
    +
    Definition: model.hpp:58
    +
    Definition: model.hpp:29
    +
    Definition: model.hpp:193
    +
    Definition: model.hpp:174
    +
    Definition: model.hpp:173
    +
    Definition: model.hpp:79
    +
    Definition: model.hpp:65
    +
    Definition: model.hpp:14
    +
    Definition: model.hpp:116
    +
    static tl::expected< RequestCDDC, eError > from_string(const std::string &str)
    Definition: model.cpp:139
    +
    unsigned int message_reference
    The version of the CDD. (Int)
    Definition: model.hpp:118
    +
    Definition: model.hpp:103
    +
    static tl::expected< RequestCDDSerial, eError > from_string(const std::string &str)
    Definition: model.cpp:116
    +
    Definition: model.hpp:129
    +
    std::vector< BigInt > mint_key_ids
    Definition: model.hpp:133
    +
    Definition: model.hpp:158
    +
    BigInt transaction_reference
    Definition: model.hpp:161
    +
    Definition: model.hpp:223
    +
    static tl::expected< RequestRedeem, eError > from_string(const std::string &str)
    Definition: model.cpp:439
    +
    Definition: model.hpp:200
    +
    std::string transaction_reference
    Definition: model.hpp:205
    +
    Definition: model.hpp:214
    +
    BigInt transaction_reference
    Definition: model.hpp:217
    +
    Definition: model.hpp:123
    +
    Definition: model.hpp:110
    +
    Definition: model.hpp:210
    +
    Definition: model.hpp:138
    +
    Definition: model.hpp:167
    +
    Definition: model.hpp:232
    +
    Definition: model.hpp:95
    +
    Definition: model.hpp:21
    denominations (defined in RequestMKCs)RequestMKCs
    from_string(const std::string &str) (defined in RequestMKCs)RequestMKCsstatic
    message_reference (defined in RequestMKCs)RequestMKCs
    mint_key_idsRequestMKCs
    mint_key_idsRequestMKCs