summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-04-03 16:39:57 +0200
committerChristian Grothoff <christian@grothoff.org>2017-04-03 16:39:57 +0200
commitfad86d780a33e8712cc76e542b955b2316e2e2e7 (patch)
treea3b385dcf62420b2c606a88f6c594cc42d310111 /api
parent44a25232f10578be0b909c59572b77398d1db0bc (diff)
downloaddocs-fad86d780a33e8712cc76e542b955b2316e2e2e7.tar.gz
docs-fad86d780a33e8712cc76e542b955b2316e2e2e7.tar.bz2
docs-fad86d780a33e8712cc76e542b955b2316e2e2e7.zip
update spec to include updates for #3887
Diffstat (limited to 'api')
-rw-r--r--api/api-common.rst19
-rw-r--r--api/api-exchange.rst36
2 files changed, 45 insertions, 10 deletions
diff --git a/api/api-common.rst b/api/api-common.rst
index 3725e1c2..229d5bba 100644
--- a/api/api-common.rst
+++ b/api/api-common.rst
@@ -753,8 +753,23 @@ within the
* purpose.purpose = TALER_SIGNATURE_EXCHANGE_CONFIRM_PAYBACK
*/
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
- struct GNUNET_TIME_AbsoluteNBO payback_deadline;
+ struct GNUNET_TIME_AbsoluteNBO timestamp;
struct TALER_AmountNBO payback_amount;
struct TALER_CoinSpendPublicKeyP coin_pub;
- struct GNUNET_HashCode h_wire_subject;
+ struct TALER_ReservePublicKeyP reserve_pub;
+ };
+
+
+.. _TALER_ReserveCloseConfirmationPS:
+.. sourcecode:: c
+
+ struct TALER_ReserveCloseConfirmationPS {
+ /**
+ * purpose.purpose = TALER_SIGNATURE_EXCHANGE_RESERVE_CLOSED
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_TIME_AbsoluteNBO timestamp;
+ struct TALER_AmountNBO closing_amount;
+ struct TALER_ReservePublicKeyP reserve_pub;
+ struct GNUNET_HashCode h_wire;
};
diff --git a/api/api-exchange.rst b/api/api-exchange.rst
index f521d164..4c5dde87 100644
--- a/api/api-exchange.rst
+++ b/api/api-exchange.rst
@@ -399,7 +399,7 @@ exchange.
.. code-block:: tsref
interface TransactionHistoryItem {
- // Either "WITHDRAW" or "DEPOSIT"
+ // Either "WITHDRAW", "DEPOSIT", "PAYBACK", or "CLOSING"
type: string;
// The amount that was withdrawn or deposited.
@@ -411,12 +411,25 @@ exchange.
// Transfer details uniquely identifying the transfer, only present if type is "DEPOSIT".
transfer_details?: any;
- // `base32`_ encoding of `TALER_WithdrawRequestPS`_ with purpose TALER_SIGNATURE_WALLET_RESERVE_WITHDRAW. This field appears only if `type` is "WITHDRAW".
+ // `base32`_ encoding of a purpose, not present for "DEPOSIT" or "PAYBACK".
+ // If `type` is "WITHDRAW", this is a `TALER_WithdrawRequestPS`_ with purpose TALER_SIGNATURE_WALLET_RESERVE_WITHDRAW.
+ // If `type` is "CLOSING", this is a `struct TALER_ReserveCloseConfirmationPS` with purpose TALER_SIGNATURE_EXCHANGE_RESERVE_CLOSED.
details?: string;
// Signature of `TALER_WithdrawRequestPS`_ created with the `reserves's private key <reserve-priv>`_. Only present if type is "WITHDRAW".
signature?: EddsaSignature;
- }
+
+ // If `type` is "PAYBACK", this is a signature over a `struct TALER_PaybackConfirmationPS` with purpose TALER_SIGNATURE_EXCHANGE_CONFIRM_PAYBACK.
+ // If `type` is "CLOSING", this is a signature over a `struct TALER_ReserveCloseConfirmationPS` with purpose TALER_SIGNATURE_EXCHANGE_RESERVE_CLOSED.
+ // Not present for other values of `type`.
+ exchange_sig?: EddsaSignature;
+
+ // Public key used to create `exchange_sig`, only present if `exchange_sig` is present.
+ exchange_pub?: EddsaPublicKey;
+
+ // Timestamp when the exchange received the /payback. Only present if `type` is "PAYBACK".
+ timestamp?: Timestamp;
+ }
.. http:post:: /reserve/withdraw
@@ -635,7 +648,7 @@ denomination.
.. code-block:: tsref
interface CoinSpendHistoryItem {
- // Either "deposit" or "melt" or "refund"
+ // Either "DEPOSIT", "MELT", "REFUND" or "PAYBACK"
type: string;
// The total amount of the coin's value absorbed (or restored in the case of a refund) by this transaction.
@@ -647,14 +660,21 @@ denomination.
amount: Amount;
// `base32`_ binary encoding of the transaction data as a
- // `TALER_DepositRequestPS`_ or `TALER_RefreshMeltCoinAffirmationPS`_
- // or `TALER_RefundRequestPS`_
+ // `TALER_DepositRequestPS`_, `TALER_RefreshMeltCoinAffirmationPS`_,
+ // `TALER_RefundRequestPS`_ or `TALER_PaybackConfirmationPS`_.
details: string;
// `EdDSA Signature <eddsa-sig>`_ of what we got in `details`.
// Note that in the case of a 'refund', the signature is made with
- // the `public key of the merchant <merchant-pub>`_, and not `that of the coin <eddsa-coin-pub>`_
- signature: EddsaSignature;
+ // the `public key of the merchant <merchant-pub>`_, and not `that of the coin <eddsa-coin-pub>`_,
+ // Not present if `type` is "PAYBACK"
+ signature?: EddsaSignature;
+
+ // Signature by the exchange, only present if `type` is "PAYBACK".
+ exchange_sig?: EddsaSignature;
+
+ // public key used to sign `exchange_sig`, only present if `exchange_sig` present.
+ exchange_pub?: EddsaPublicKey;
}
----------