diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_crypto_lib.h | 52 | ||||
-rw-r--r-- | src/include/taler_json_lib.h | 20 |
2 files changed, 52 insertions, 20 deletions
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 9b0cb604b..ee06f631c 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -6032,4 +6032,56 @@ TALER_age_restriction_from_secret ( struct TALER_AgeCommitmentProof *comm_proof); +/** + * Group of Denominations. These are the common fields of an array of + * denominations. + * + * The corresponding JSON-blob will also contain an array of particular + * denominations with only the timestamps, cipher-specific public key and the + * master signature. + */ +struct TALER_DenominationGroup +{ + + /** + * XOR of all SHA-512 hashes of the public keys in this + * group. + */ + struct GNUNET_HashCode hash; + + /** + * Value of coins in this denomination group. + */ + struct TALER_Amount value; + + /** + * Fee structure for all coins in the group. + */ + struct TALER_DenomFeeSet fees; + + /** + * Cipher used for the denomination. + */ + enum TALER_DenominationCipher cipher; + + /** + * Age mask for the denomiation. + */ + struct TALER_AgeMask age_mask; + +}; + + +/** + * Compute a unique key for the meta data of a denomination group. + * + * @param dg denomination group to evaluate + * @param[out] key key to set + */ +void +TALER_denomination_group_get_key ( + const struct TALER_DenominationGroup *dg, + struct GNUNET_HashCode *key); + + #endif diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index d0749808d..e2d54e825 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -380,26 +380,6 @@ TALER_JSON_spec_amount_any_nbo (const char *name, TALER_JSON_pack_amount ("account_fee", &(gfs)->account), \ TALER_JSON_pack_amount ("purse_fee", &(gfs)->purse) -/** - * Group of Denominations. These are the common fields of an array of - * denominations. - * - * The corresponding JSON-blob will also contain an array of particular - * denominations with only the timestamps, cipher-specific public key and the - * master signature. - * - **/ -struct TALER_DenominationGroup -{ - enum TALER_DenominationCipher cipher; - struct TALER_Amount value; - struct TALER_DenomFeeSet fees; - struct TALER_AgeMask age_mask; - - // hash is/should be the XOR of all SHA-512 hashes of the public keys in this - // group - struct GNUNET_HashCode hash; -}; /** * Generate a parser for a group of denominations. |