taler-docs

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

add-global-currency-exchange.rst (889B)


      1 .. ts:op:: addGlobalCurrencyExchange
      2 
      3   Register an exchange for a global currency.
      4 
      5   **Request:**
      6 
      7   The request must be an `AddGlobalCurrencyExchangeRequest`
      8   object.
      9 
     10   **Response:**
     11 
     12   On success, the result is an empty object (`EmptyObject`).
     13 
     14   **Side effects:**
     15 
     16   Registers the exchange for the global currency in the wallet's
     17   database.  When the balance overview changed, a ``balance-change``
     18   notification is emitted.
     19 
     20   **Details:**
     21 
     22   Adding an exchange that is already registered is a no-op.
     23   Currency information already known under the exchange's own
     24   scope is copied to the global scope.  The ``exchangeBaseUrl``
     25   must be a canonicalized base URL (see
     26   :ts:op:`canonicalizeBaseUrl`).
     27 
     28 .. ts:def:: AddGlobalCurrencyExchangeRequest
     29 
     30   interface AddGlobalCurrencyExchangeRequest {
     31     currency: string;
     32     exchangeBaseUrl: string;
     33     exchangeMasterPub: string;
     34   }