aboutsummaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_contract.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_contract.h')
-rw-r--r--src/backend/taler-merchant-httpd_contract.h39
1 files changed, 25 insertions, 14 deletions
diff --git a/src/backend/taler-merchant-httpd_contract.h b/src/backend/taler-merchant-httpd_contract.h
index 06cc8bfe..defe6479 100644
--- a/src/backend/taler-merchant-httpd_contract.h
+++ b/src/backend/taler-merchant-httpd_contract.h
@@ -19,6 +19,7 @@
* @author Christian Blättler
*/
#include "taler-merchant-httpd.h"
+#include <gnunet/gnunet_time_lib.h>
#include <jansson.h>
@@ -112,16 +113,21 @@ struct TALER_MerchantContractInput
struct
{
/**
- * Label of the token authority in the 'token_authorities'
- * array on the top-level.
+ * Slug of the token family to be used.
*/
- const char *token_authority_label;
+ const char *token_family_slug;
+
+ /**
+ * Start time of the validity period of the token. Base on this timestamp
+ * the wallet can find the correct key for this token in token_authorities.
+ */
+ struct GNUNET_TIME_Timestamp valid_after;
/**
* Number of tokens of this type required. Defaults to one if the
* field is not provided.
*/
- unsigned int number;
+ unsigned int count;
} token;
} details;
};
@@ -198,16 +204,21 @@ struct TALER_MerchantContractOutput
struct
{
/**
- * Label of the token authority in the 'token_authorities'
- * array on the top-level.
+ * Slug of the token family to be issued.
*/
- const char *token_authority_label;
+ const char *token_family_slug;
+
+ /**
+ * Start time of the validity period of the token. Base on this timestamp
+ * the wallet can find the correct key for this token in token_authorities.
+ */
+ struct GNUNET_TIME_Timestamp valid_after;
/**
* Number of tokens of this type required. Defaults to one if the
* field is not provided.
*/
- unsigned int number;
+ unsigned int count;
} token;
} details;
};
@@ -277,17 +288,17 @@ struct TALER_MerchantContractTokenAuthority
* Human-readable description of the semantics of the tokens issued by
* this authority.
*/
- char *summary;
+ char *description;
/**
- * Map from IETF BCP 47 language tags to localized summaries.
+ * Map from IETF BCP 47 language tags to localized description.
*/
- json_t *summary_i18n;
+ json_t *description_i18n;
/**
* Public key used to validate tokens signed by this authority.
*/
- struct TALER_TokenFamilyPublicKey key;
+ struct TALER_TokenFamilyPublicKey *pub;
/**
* When will tokens signed by this key expire?
@@ -318,12 +329,12 @@ struct TALER_MerchantContractTokenAuthority
/**
* When does the subscription period start?
*/
- struct GNUNET_TIME_Absolute start_date;
+ struct GNUNET_TIME_Timestamp start_date;
/**
* When does the subscription period end?
*/
- struct GNUNET_TIME_Absolute end_date;
+ struct GNUNET_TIME_Timestamp end_date;
/**
* Array of domain names where this subscription can be safely used