summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-04-01 15:17:36 +0200
committerChristian Grothoff <christian@grothoff.org>2024-04-01 15:17:36 +0200
commitb1c4949cda876f698ccfc9cc190f4a50453cb194 (patch)
tree2a46ed0522dcd4edb214eb8135f1b9e107ea2d9f
parent709e431603d6226836d937620cda2909ebfeaa36 (diff)
downloaddocs-b1c4949cda876f698ccfc9cc190f4a50453cb194.tar.gz
docs-b1c4949cda876f698ccfc9cc190f4a50453cb194.tar.bz2
docs-b1c4949cda876f698ccfc9cc190f4a50453cb194.zip
resolve build warnings
-rw-r--r--core/api-c2ec.rst25
-rw-r--r--core/api-common.rst28
-rw-r--r--core/api-merchant.rst200
3 files changed, 124 insertions, 129 deletions
diff --git a/core/api-c2ec.rst b/core/api-c2ec.rst
index 88a6144a..c93bbedb 100644
--- a/core/api-c2ec.rst
+++ b/core/api-c2ec.rst
@@ -21,10 +21,10 @@ The C2EC RESTful API
===========================
.. note::
-
+
**This API is experimental and not yet implemented**
-This chapter describe the APIs that third party providers need to integrate to allow
+This chapter describe the APIs that third party providers need to integrate to allow
withdrawals through indirect payment channels like credit cards or ATM.
.. contents:: Table of Contents
@@ -33,8 +33,8 @@ withdrawals through indirect payment channels like credit cards or ATM.
Authentication
--------------
-Terminals which authenticate against the C2EC API must provide their respective
-access token. Therefore they provide a ``Authorization: Bearer $ACCESS_TOKEN`` header,
+Terminals which authenticate against the C2EC API must provide their respective
+access token. Therefore they provide a ``Authorization: Bearer $ACCESS_TOKEN`` header,
where `$ACCESS_TOKEN`` is a secret authentication token configured by the exchange and
must begin with the RFC 8959 prefix.
@@ -71,12 +71,12 @@ Withdrawing using C2EC
-----------------------------
Withdrawals with a C2EC are based on withdrawal operations which register a withdrawal identifier
-(nonce) at the C2EC component. The provider must first create a unique identifier for the withdrawal
+(nonce) at the C2EC component. The provider must first create a unique identifier for the withdrawal
operation (the ``WOPID``) to interact with the withdrawal operation and eventually withdraw using the wallet.
.. http:post:: /withdrawal-operation
- Register a `WOPID` belonging to a reserve public key.
+ Register a `WOPID` belonging to a reserve public key.
**Request:**
@@ -171,7 +171,7 @@ operation (the ``WOPID``) to interact with the withdrawal operation and eventual
provider_transaction_id: string;
// Specifies the amount which was payed to the provider (without fees).
- // This amount shall be put into the reserve linked to by the withdrawal id.
+ // This amount shall be put into the reserve linked to by the withdrawal id.
amount: Amount;
// Fees associated with the payment.
@@ -191,14 +191,14 @@ operation (the ``WOPID``) to interact with the withdrawal operation and eventual
The ``C2ECPaymentNotification`` could not be processed due to server side issues.
---------------
+------------------
Taler Wire Gateway
---------------
+------------------
C2EC implements the wire gateway API in order to check for incoming transactions and
let the exchange get proofs of payments. This will allow the C2EC componente to add reserves
-and therefore allow the withdrawal of the money. C2EC does not entirely implement all endpoints,
-because the it is not needed for the case of C2EC. The endpoints not implemented are not described
+and therefore allow the withdrawal of the money. C2EC does not entirely implement all endpoints,
+because the it is not needed for the case of C2EC. The endpoints not implemented are not described
further. They will be available but respond with 400 http error code.
.. http:get:: /config
@@ -299,7 +299,7 @@ further. They will be available but respond with 400 http error code.
// Opaque ID of the transaction that the bank has made.
row_id: SafeUint64;
- }
+ }
.. http:get:: /history/incoming
@@ -339,4 +339,3 @@ further. They will be available but respond with 400 http error code.
reserve_pub: EddsaPublicKey;
}
-
diff --git a/core/api-common.rst b/core/api-common.rst
index 85942a02..521b2fc0 100644
--- a/core/api-common.rst
+++ b/core/api-common.rst
@@ -1895,23 +1895,21 @@ within the
uint32_t is_active GNUNET_PACKED;
};
-. _TALER_AmlDecisionPS:
+.. _TALER_AmlDecisionPS:
.. sourcecode:: c
- struct TALER_AmlDecisionPS
- {
- /**
- * purpose.purpose =TALER_SIGNATURE_AML_DECISION.
- */
- struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- struct GNUNET_HashCode h_justification GNUNET_PACKED;
- struct GNUNET_TIME_TimestampNBO decision_time;
- struct TALER_AmountNBO new_threshold;
- struct TALER_PaytoHashP h_payto GNUNET_PACKED;
- struct GNUNET_HashCode h_kyc_requirements;
- uint32_t new_state GNUNET_PACKED;
-
- };
+ struct TALER_AmlDecisionPS {
+ /**
+ * purpose.purpose =TALER_SIGNATURE_AML_DECISION.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_HashCode h_justification GNUNET_PACKED;
+ struct GNUNET_TIME_TimestampNBO decision_time;
+ struct TALER_AmountNBO new_threshold;
+ struct TALER_PaytoHashP h_payto GNUNET_PACKED;
+ struct GNUNET_HashCode h_kyc_requirements;
+ uint32_t new_state GNUNET_PACKED;
+ };
.. _TALER_PartnerConfigurationPS:
.. sourcecode:: c
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index 537dc67c..3454313e 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -354,7 +354,7 @@ Making the payment
// @since protocol **vSUBSCRIBE**
choice_index?: Integer;
- // Input tokens required by choice indicated by `choice_index`.
+ // Input tokens required by choice indicated by ``choice_index``.
// @since protocol **vSUBSCRIBE**
tokens: TokenPaySig[];
@@ -1809,7 +1809,7 @@ Inspecting inventory
product_id: string;
// ``product_serial_id`` of the product in the database.
- product_serial: integer;
+ product_serial: Integer;
}
@@ -2171,81 +2171,81 @@ of buying an article, the merchant could present the customer with the choice
to use a valid subscription token or pay using a gift voucher. Available since
protocol **vSUBSCRIBE**.
-.. ts:def:: OrderChoice
+ .. ts:def:: OrderChoice
- interface OrderChoice {
- // Inputs that must be provided by the customer, if this choice is selected.
- inputs: OrderInput[];
+ interface OrderChoice {
+ // Inputs that must be provided by the customer, if this choice is selected.
+ inputs: OrderInput[];
- // Outputs provided by the merchant, if this choice is selected.
- outputs: ContractOutput[];
- }
+ // Outputs provided by the merchant, if this choice is selected.
+ outputs: ContractOutput[];
+ }
-.. ts:def:: OrderInput
+ .. ts:def:: OrderInput
- // For now, only token inputs are supported.
- type OrderInput = OrderInputToken;
+ // For now, only token inputs are supported.
+ type OrderInput = OrderInputToken;
-.. ts:def:: OrderInputToken
+ .. ts:def:: OrderInputToken
- interface OrderInputToken {
+ interface OrderInputToken {
- // Token input.
- type: "token";
+ // Token input.
+ type: "token";
- // Token family slug as configured in the merchant backend. Slug is unique
- // across all configured tokens of a merchant.
- token_family_slug: string;
+ // Token family slug as configured in the merchant backend. Slug is unique
+ // across all configured tokens of a merchant.
+ token_family_slug: string;
- // Start of the validity period of the token. Based on this, the merchant
- // will select the relevant signing key.
- valid_after: Timestamp;
+ // Start of the validity period of the token. Based on this, the merchant
+ // will select the relevant signing key.
+ valid_after: Timestamp;
- // How many units of the input are required.
- // Defaults to 1 if not specified. Output with count == 0 are ignored by
- // the merchant backend.
- count?: Integer;
+ // How many units of the input are required.
+ // Defaults to 1 if not specified. Output with count == 0 are ignored by
+ // the merchant backend.
+ count?: Integer;
- }
+ }
-.. ts:def:: OrderOutput
+ .. ts:def:: OrderOutput
- type OrderOutput = OrderOutputToken | OrderOutputTaxReceipt;
+ type OrderOutput = OrderOutputToken | OrderOutputTaxReceipt;
-.. ts:def:: OrderOutputToken
+ .. ts:def:: OrderOutputToken
- interface OrderOutputToken {
+ interface OrderOutputToken {
- // Token output.
- type: "token";
+ // Token output.
+ type: "token";
- // Token family slug as configured in the merchant backend. Slug is unique
- // across all configured tokens of a merchant.
- token_family_slug: string;
+ // Token family slug as configured in the merchant backend. Slug is unique
+ // across all configured tokens of a merchant.
+ token_family_slug: string;
- // Start of the validity period of the token. Based on this, the merchant
- // will select the relevant signing key.
- valid_after: Timestamp;
+ // Start of the validity period of the token. Based on this, the merchant
+ // will select the relevant signing key.
+ valid_after: Timestamp;
- // How many units of the output are issued by the merchant.
- // Defaults to 1 if not specified. Output with count == 0 are ignored by
- // the merchant backend.
- count?: Integer;
+ // How many units of the output are issued by the merchant.
+ // Defaults to 1 if not specified. Output with count == 0 are ignored by
+ // the merchant backend.
+ count?: Integer;
- }
+ }
-.. ts:def:: OrderOutputTaxReceipt
+ .. ts:def:: OrderOutputTaxReceipt
- interface OrderOutputTaxReceipt {
+ interface OrderOutputTaxReceipt {
- // Tax receipt output.
- type: "tax-receipt";
+ // Tax receipt output.
+ type: "tax-receipt";
- // Base URL of the donation authority that will
- // issue the tax receipt.
- donau_url: string;
+ // Base URL of the donation authority that will
+ // issue the tax receipt.
+ donau_url: string;
- }
+ }
The following `MinimalInventoryProduct` can be provided if the parts of the
order are inventory-based, that is if the `PostOrderRequest` uses
@@ -2259,51 +2259,49 @@ protocol **vSUBSCRIBE**.
the ``amount`` of the ``order``, so the frontend must already have calculated
the total price --- including the ``inventory_products``.
- .. ts:def:: MinimalInventoryProduct
+.. ts:def:: MinimalInventoryProduct
- // Note that if the frontend does give details beyond these,
- // it will override those details (including price or taxes)
- // that the backend would otherwise fill in via the inventory.
-
- interface MinimalInventoryProduct {
- // Which product is requested (here mandatory!).
- product_id: string;
-
- // How many units of the product are requested.
- quantity: Integer;
- }
+ // Note that if the frontend does give details beyond these,
+ // it will override those details (including price or taxes)
+ // that the backend would otherwise fill in via the inventory.
+ interface MinimalInventoryProduct {
+ // Which product is requested (here mandatory!).
+ product_id: string;
+ // How many units of the product are requested.
+ quantity: Integer;
+ }
- .. ts:def:: PostOrderResponse
+.. ts:def:: PostOrderResponse
- interface PostOrderResponse {
- // Order ID of the response that was just created.
- order_id: string;
+ interface PostOrderResponse {
+ // Order ID of the response that was just created.
+ order_id: string;
- // Token that authorizes the wallet to claim the order.
- // Provided only if "create_token" was set to 'true'
- // in the request.
- token?: ClaimToken;
- }
+ // Token that authorizes the wallet to claim the order.
+ // Provided only if "create_token" was set to 'true'
+ // in the request.
+ token?: ClaimToken;
+ }
- .. ts:def:: OutOfStockResponse
+.. ts:def:: OutOfStockResponse
- interface OutOfStockResponse {
+ interface OutOfStockResponse {
- // Product ID of an out-of-stock item.
- product_id: string;
+ // Product ID of an out-of-stock item.
+ product_id: string;
- // Requested quantity.
- requested_quantity: Integer;
+ // Requested quantity.
+ requested_quantity: Integer;
- // Available quantity (must be below ``requested_quantity``).
- available_quantity: Integer;
+ // Available quantity (must be below ``requested_quantity``).
+ available_quantity: Integer;
- // When do we expect the product to be again in stock?
- // Optional, not given if unknown.
- restock_expected?: Timestamp;
- }
+ // When do we expect the product to be again in stock?
+ // Optional, not given if unknown.
+ restock_expected?: Timestamp;
+ }
Inspecting orders
@@ -3145,17 +3143,17 @@ Adding templates
template_contract: TemplateContractDetails;
// Key-value pairs matching a subset of the
- // fields from `template_contract` that are
+ // fields from ``template_contract`` that are
// user-editable defaults for this template.
// Since protocol **v13**.
editable_defaults?: Object;
// Required currency for payments. Useful if no
- // amount is specified in the `template_contract`
+ // amount is specified in the ``template_contract``
// but the user should be required to pay in a
// particular currency anyway. Merchant backends
- // may reject requests if the `template_contract`
- // or `editable_defaults` do
+ // may reject requests if the ``template_contract``
+ // or ``editable_defaults`` do
// specify an amount in a different currency.
// This parameter is optional.
// Since protocol **v13**.
@@ -3230,17 +3228,17 @@ Editing templates
template_contract: TemplateContractDetails;
// Key-value pairs matching a subset of the
- // fields from `template_contract` that are
+ // fields from ``template_contract`` that are
// user-editable defaults for this template.
// Since protocol **v13**.
editable_defaults?: Object;
// Required currency for payments. Useful if no
- // amount is specified in the `template_contract`
+ // amount is specified in the ``template_contract``
// but the user should be required to pay in a
// particular currency anyway. Merchant backends
- // may reject requests if the `template_contract`
- // or `editable_defaults` do
+ // may reject requests if the ``template_contract``
+ // or ``editable_defaults`` do
// specify an amount in a different currency.
// This parameter is optional.
// Since protocol **v13**.
@@ -3315,17 +3313,17 @@ Inspecting template
template_contract: TemplateContractDetails;
// Key-value pairs matching a subset of the
- // fields from `template_contract` that are
+ // fields from ``template_contract`` that are
// user-editable defaults for this template.
// Since protocol **v13**.
editable_defaults?: Object;
// Required currency for payments. Useful if no
- // amount is specified in the `template_contract`
+ // amount is specified in the ``template_contract``
// but the user should be required to pay in a
// particular currency anyway. Merchant backends
- // may reject requests if the `template_contract`
- // or `editable_defaults` do
+ // may reject requests if the ``template_contract``
+ // or ``editable_defaults`` do
// specify an amount in a different currency.
// This parameter is optional.
// Since protocol **v13**.
@@ -3376,17 +3374,17 @@ Using template
template_contract: TemplateContractDetails;
// Key-value pairs matching a subset of the
- // fields from `template_contract` that are
+ // fields from ``template_contract`` that are
// user-editable defaults for this template.
// Since protocol **v13**.
editable_defaults?: Object;
// Required currency for payments. Useful if no
- // amount is specified in the `template_contract`
+ // amount is specified in the ``template_contract``
// but the user should be required to pay in a
// particular currency anyway. Merchant backends
- // may reject requests if the `template_contract`
- // or `editable_defaults` do
+ // may reject requests if the ``template_contract``
+ // or ``editable_defaults`` do
// specify an amount in a different currency.
// This parameter is optional.
// Since protocol **v13**.