taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

purge-exchange-legacy-keys.rst (1357B)


      1 .. ts:op:: purgeExchangeLegacyKeys
      2 
      3   Purge every non-current key set retained for an exchange URL.
      4 
      5   **Request:**
      6 
      7   The request arguments must be a `PurgeExchangeLegacyKeysRequest`
      8   object.
      9 
     10   **Response:**
     11 
     12   On success, the result is an empty object.
     13 
     14   **Side effects:**
     15 
     16   Deletes the retained non-current key sets of the exchange.
     17 
     18   **Expected errors:**
     19 
     20   The caller can handle the following errors inline:
     21   ``WALLET_EXCHANGE_ENTRY_NOT_FOUND``, ``WALLET_CORE_API_BAD_REQUEST``.
     22 
     23   **Details:**
     24 
     25   Removes the coins, denominations and other stored data issued
     26   under superseded master public keys of the exchange; withdrawals
     27   of purged coins are marked as legacy.  The ``currentMasterPub``
     28   must be the current master key observed by the client before
     29   confirming the purge: the operation fails atomically with
     30   ``WALLET_CORE_API_BAD_REQUEST`` if the exchange has changed keys
     31   since, so a key rotation between review and execution cannot turn
     32   the key the user just reviewed into another key that is silently
     33   purged.
     34 
     35 .. ts:def:: PurgeExchangeLegacyKeysRequest
     36 
     37   interface PurgeExchangeLegacyKeysRequest {
     38     exchangeBaseUrl: string;
     39 
     40     // Current master key observed by the client before confirming the
     41     // purge.  The operation fails atomically if the exchange has
     42     // changed keys since.
     43     currentMasterPub: string;
     44   }