commit b19e504c032db698b73c20b3fb9871d51789da40
parent a4f2424c65d2fa67b2c69549d9b9a7b3c60152ce
Author: Christian Blättler <blatc2@bfh.ch>
Date: Fri, 15 Mar 2024 10:10:13 +0100
DD46: contract choices should only represent different inputs and outputs
Diffstat:
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/design-documents/046-mumimo-contracts.rst b/design-documents/046-mumimo-contracts.rst
@@ -143,6 +143,33 @@ The contract terms v1 will have the following structure:
// More info about the merchant (same as in v0).
merchant: Merchant;
+ // Human-readable description of the contract.
+ summary: string;
+
+ // Map from IETF BCP 47 language tags to localized summaries.
+ summary_i18n?: { [lang_tag: string]: string };
+
+ // URL that will show that the order was successful after
+ // it has been paid for. Optional. When POSTing to the
+ // merchant, the placeholder "${ORDER_ID}" will be
+ // replaced with the actual order ID (useful if the
+ // order ID is generated server-side and needs to be
+ // in the URL).
+ // Note that this placeholder can only be used once.
+ // Either fulfillment_url or fulfillment_message must be specified.
+ fulfillment_url?: string;
+
+ // Message shown to the customer after paying for the order.
+ // Either fulfillment_url or fulfillment_message must be specified.
+ fulfillment_message?: string;
+
+ // Map from IETF BCP 47 language tags to localized fulfillment
+ // messages.
+ fulfillment_message_i18n?: { [lang_tag: string]: string };
+
+ // List of products that are part of the purchase (see `Product`).
+ products: Product[];
+
// After this deadline has passed, no refunds will be accepted.
refund_deadline: Timestamp;
@@ -232,33 +259,6 @@ The contract terms v1 will have the following structure:
interface ContractChoice {
- // Human-readable description of the choice.
- summary: string;
-
- // Map from IETF BCP 47 language tags to localized summaries.
- summary_i18n?: { [lang_tag: string]: string };
-
- // URL that will show that the order was successful after
- // it has been paid for. Optional. When POSTing to the
- // merchant, the placeholder "${ORDER_ID}" will be
- // replaced with the actual order ID (useful if the
- // order ID is generated server-side and needs to be
- // in the URL).
- // Note that this placeholder can only be used once.
- // Either fulfillment_url or fulfillment_message must be specified.
- fulfillment_url?: string;
-
- // Message shown to the customer after paying for the order.
- // Either fulfillment_url or fulfillment_message must be specified.
- fulfillment_message?: string;
-
- // Map from IETF BCP 47 language tags to localized fulfillment
- // messages.
- fulfillment_message_i18n?: { [lang_tag: string]: string };
-
- // List of products that are part of the purchase (see `Product`).
- products: Product[];
-
// List of inputs the wallet must provision (all of them) to
// satisfy the conditions for the contract.
inputs: ContractInput[];