summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-10-27 16:26:36 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-10-27 16:26:36 +0200
commita6845fe1f13b3281c40d04864ecd958360bc7baa (patch)
treeb9ee83a513a311e59931b970c8cc51d2462cf805
parent24694623c552ba8eb3b246e636a3a14eb6b52bc8 (diff)
downloaddocs-a6845fe1f13b3281c40d04864ecd958360bc7baa.tar.gz
docs-a6845fe1f13b3281c40d04864ecd958360bc7baa.tar.bz2
docs-a6845fe1f13b3281c40d04864ecd958360bc7baa.zip
FIXME
-rw-r--r--api-merchant.rst99
1 files changed, 50 insertions, 49 deletions
diff --git a/api-merchant.rst b/api-merchant.rst
index 1026c6b1..8cc2624f 100644
--- a/api-merchant.rst
+++ b/api-merchant.rst
@@ -242,33 +242,49 @@ The following API are made available by the merchant's `backend` to the merchant
:status 404 Not Found:
The wire transfer identifier is unknown to the exchange.
- :status 409 Conflict:
- The exchange previously claimed that a deposit was not included in a wire transfer, and now claims that it is. This means that the exchange is dishonest. The response contains the cryptographic proof that the exchange is misbehaving in the form of a `TransactionConflictProof`_.
+ :status 409 Conflict: The exchange provided conflicting information about the transfer.
+ The response body contains the `TrackTransferConflictDetails`_.
+
**Details:**
- .. _TransactionConflictProof:
- .. _tsref-type-TransactionConflictProof:
+ .. _tsref-type-TrackTransferConflictDetails:
+ .. _TrackTransferConflictDetails:
.. code-block:: tsref
- interface TransactionConflictProof {
- // A claim by the exchange about the transactions associated
- // with a given wire transfer; it does not list the
- // transaction that `transaction_tracking_claim` says is part
- // of the aggregate. This is
- // a `/track/transfer` response from the exchange.
- wtid_tracking_claim: TrackTransferResponse;
+ interface TrackTransferConflictDetails {
+ // Text describing the issue for humans.
+ hint: String;
- // The current claim by the exchange that the given
- // transaction is included in the above WTID.
- // (A response from `/track/transaction`).
- transaction_tracking_claim: TrackTransactionResponse;
+ // A /deposit response matching `coin_pub` showing that the
+ // exchange accepted `coin_pub` for `amount_with_fee`.
+ exchange_deposit_proof: DepositSuccess; // FIXME: define/link-to this object
- // Public key of the coin for which we got conflicting information.
- coin_pub: CoinPublicKey;
+ // Offset in the `exchange_transfer_proof` where the
+ // exchange's response fails to match the `exchange_deposit_proof`.
+ conflict_offset: number;
+
+ // The response from the exchange which tells us when the
+ // coin was returned to us, except that it does not match
+ // the expected value of the coin.
+ exchange_transfer_proof: TrackTransferResponse;
+
+ // Public key of the coin for which we have conflicting information.
+ coin_pub: EddsaPublicKey;
+
+ // Merchant transaction in which `coin_pub` was involved for which
+ // we have conflicting information.
+ transaction_id: number;
+
+ // Expected value of the coin.
+ amount_with_fee: Amount;
+
+ // Expected deposit fee of the coin.
+ deposit_fee: Amount;
}
+
.. http:get:: /track/transaction
Provide the wire transfer identifier associated with an (existing) deposit operation.
@@ -295,9 +311,7 @@ The following API are made available by the merchant's `backend` to the merchant
:status 404 Not Found: The transaction is unknown to the backend.
- :status 409 Conflict: The exchange provided conflicting information about the transfer.
- The response body contains the `TrackTransferConflictDetails`_.
-
+ :status 409 Conflict: The exchange previously claimed that a deposit was not included in a wire transfer, and now claims that it is. This means that the exchange is dishonest. The response contains the cryptographic proof that the exchange is misbehaving in the form of a `TransactionConflictProof`_.
**Details:**
@@ -331,42 +345,29 @@ The following API are made available by the merchant's `backend` to the merchant
deposit_fee: Amount;
}
- .. _tsref-type-TrackTransferConflictDetails:
- .. _TrackTransferConflictDetails:
+ .. _TransactionConflictProof:
+ .. _tsref-type-TransactionConflictProof:
.. code-block:: tsref
- interface TrackTransferConflictDetails {
- // Text describing the issue for humans.
- hint: String;
-
- // A /deposit response matching `coin_pub` showing that the
- // exchange accepted `coin_pub` for `amount_with_fee`.
- exchange_deposit_proof: DepositSuccess;
-
- // Offset in the `exchange_transfer_proof` where the
- // exchange's response fails to match the `exchange_deposit_proof`.
- conflict_offset: number;
-
- // The response from the exchange which tells us when the
- // coin was returned to us, except that it does not match
- // the expected value of the coin.
- exchange_transfer_proof: TrackTransferResponse;
-
- // Public key of the coin for which we have conflicting information.
- coin_pub: EddsaPublicKey;
-
- // Merchant transaction in which `coin_pub` was involved for which
- // we have conflicting information.
- transaction_id: number;
+ interface TransactionConflictProof {
+ // A claim by the exchange about the transactions associated
+ // with a given wire transfer; it does not list the
+ // transaction that `transaction_tracking_claim` says is part
+ // of the aggregate. This is
+ // a `/track/transfer` response from the exchange.
+ wtid_tracking_claim: TrackTransferResponse;
- // Expected value of the coin.
- amount_with_fee: Amount;
+ // The current claim by the exchange that the given
+ // transaction is included in the above WTID.
+ // (A response from `/track/transaction`).
+ transaction_tracking_claim: TrackTransactionResponse;
- // Expected deposit fee of the coin.
- deposit_fee: Amount;
+ // Public key of the coin for which we got conflicting information.
+ coin_pub: CoinPublicKey;
}
+
.. http:get:: /history
Returns transactions up to some point in the past