commit c104cb17bbe8d7e11c8335206a09f733a207afef
parent e803315dfcb4bd17038d5ddbae0af61066ad93f4
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 24 Dec 2024 10:15:37 +0100
fix spec for donau
Diffstat:
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
@@ -2711,9 +2711,9 @@ Creating orders
// Tax receipt output.
type: "tax-receipt";
- // Base URL of the donation authority that will
- // issue the tax receipt.
- donau_url: string;
+ // Total amount that will be on the tax receipt.
+ // Optional, if missing the full amount will be on the receipt.
+ amount?: Amount;
}
@@ -4613,13 +4613,13 @@ The contract terms must have the following structure:
// Number of tokens of this type required.
// Defaults to one if the field is not provided.
- number?: Integer;
+ count?: Integer;
};
.. ts:def:: ContractOutput
// For now, only tokens are supported as outputs.
- type ContractOutput = ContractOutputToken;
+ type ContractOutput = ContractOutputToken | ContractOutputTaxReceipt;
.. ts:def:: ContractOutputToken
@@ -4630,14 +4630,31 @@ The contract terms must have the following structure:
// 'token_families' map on the top-level.
token_family_slug: string;
+ // Number of tokens to be issued.
+ // Defaults to one if the field is not provided.
+ count?: Integer;
+
// Index of the public key for this output token
- // in the
- `ContractTokenFamily` ``keys`` array.
+ // in the `ContractTokenFamily` ``keys`` array.
key_index: integer;
- // Number of tokens to be issued.
- // Defaults to one if the field is not provided.
- number?: Integer;
+ }
+
+.. ts:def:: ContractOutputTaxReceipt
+
+ interface ContractOutputTaxReceipt {
+
+ // Tax receipt output.
+ type: "tax-receipt";
+
+ // Array of base URLs of donation authorities that can be
+ // used to issue the tax receipts. The client must select one.
+ donau_urls: string[];
+
+ // Total amount that will be on the tax receipt.
+ // Optional, if missing the full amount will be on the receipt.
+ amount?: Amount;
+
}
.. ts:def:: ContractTokenFamily