taler-docs

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

api-exchange.rst (24718B)


      1 ..
      2   This file is part of GNU TALER.
      3   Copyright (C) 2014-2026 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero General Public License as published by the Free Software
      7   Foundation; either version 3.0, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 
     16   @author Christian Grothoff
     17   @author Özgür Kesim
     18 
     19 ====================
     20 Exchange RESTful API
     21 ====================
     22 
     23 The API specified here follows the :ref:`general conventions <http-common>`
     24 for all details not specified in the individual requests.
     25 The `glossary <https://docs.taler.net/taler-developer-manual.html#developer-glossary>`_
     26 defines all specific terms used in this section.
     27 
     28 
     29 ---------------
     30 Version History
     31 ---------------
     32 
     33 The currently implemented protocol version is **v45**.
     34 
     35 * Wallet-core is currently targeting **vXX**.
     36 * The merchant is currently targeting **v34**.
     37 * The AML SPA is currently targeting **v41**.
     38 * The KYC SPA is currently targeting **v30**.
     39 
     40 **Version history:**
     41 
     42 * ``v29``: AML reporting on KYC auth transfers
     43 * ``v30``: various minor feature additions
     44 * ``v31``: improvements for AML reporting
     45 * ``v32``: support for extra_wire_subject_metadata
     46 * ``v33``: addition of accumulated_total_without_fee in :http:post:`/batch-deposit </batch-deposit>`
     47 * ``v34``: new offline signature; support for open_banking_gateway and
     48            prepared_transfer_url per wire account in :http:get:`/keys </keys>`
     49 * ``v35``: adds ``default_p2p_push_expiration`` to :http:get:`/keys </keys>`
     50 * ``v36``: adds ``kyc_swap_tos_acceptance`` to :http:get:`/keys </keys>`
     51 * ``v37``: adds :http:get:`/aml/$OFFICER_PUB/wallet-credit </aml/$OFFICER_PUB/wallet-credit>` endpoint
     52 * ``v38``: adds ``build_version`` to :http:get:`/config </config>`
     53 * ``v39``: adds ``exchange_payto_uri`` to
     54            :http:get:`/transfers/$WTID </transfers/$WTID>`
     55 * ``v40``: adds :http:get:`/aml/$OFFICER_PUB </aml/$OFFICER_PUB>` to report
     56            the authenticated AML officer's name and access level
     57 * ``v41``: adds :http:post:`/aml/$OFFICER_PUB/render-form </aml/$OFFICER_PUB/render-form>`
     58            to preview filled AML/KYC forms as PDF
     59 * ``v42``: batch recoup protocol: adds :http:post:`/recoup-withdraw </recoup-withdraw>`
     60            and :http:post:`/recoup-refresh </recoup-refresh>`, removes
     61            ``/coins/$COIN_PUB/recoup`` and ``/coins/$COIN_PUB/recoup-refresh``;
     62            adds ``planchets_h``, ``rc`` and ``coin_index`` to the recoup entries
     63            of coin and reserve histories;
     64            coin conflict proofs: specifies `CoinDenominationConflictError`
     65            and `CoinAgeCommitmentConflictError` for the 409 responses with
     66            error codes ``TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_DENOMINATION_KEY``
     67            and ``TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH``, which
     68            now carry the stored denomination signature (and age commitment
     69            hash) of the coin so that clients can verify the conflict;
     70            adds the required ``reserve_pub`` field to the
     71            :http:post:`/reveal-withdraw </reveal-withdraw>` request body,
     72            so that a withdraw operation is identified by the pair
     73            (reserve, commitment) everywhere;
     74            bounds ``purse_expiration`` by the new ``max_p2p_expiration``
     75            of :http:get:`/keys </keys>` and by the legal expiration of the
     76            denominations of the coins in the purse, with the new error
     77            codes ``TALER_EC_EXCHANGE_PURSE_CREATE_EXPIRATION_TOO_LATE``,
     78            ``TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_TOO_LATE`` and
     79            ``TALER_EC_EXCHANGE_PURSE_DENOMINATION_LEGAL_EXPIRES_TOO_SOON``
     80 * ``v45``: the refresh commitment :ref:`TALER_RefreshCommitmentP <TALER_RefreshCommitmentP>` now includes
     81            the transfer public keys of the :http:post:`/melt </melt>`
     82            request; clients must include them with exchanges of v45 or
     83            later.  The exchange still accepts the commitment without
     84            them from older clients.
     85 
     86 **Upcoming versions:**
     87 
     88 * ``vIMPORT``: external KYC/KYB data import
     89 * ``vATTEST``: KYC attestation support
     90 
     91 **Ideas for future version:**
     92 
     93 * ``vXXX``: marker for features not yet targeted for release
     94 
     95 .. include:: tos.rst
     96 
     97 .. _keys:
     98 
     99 ---------------------------
    100 Exchange status information
    101 ---------------------------
    102 
    103 This API is used by wallets and merchants to obtain global information about
    104 the exchange, such as online signing keys, available denominations and the fee
    105 structure.  This is typically the first call any exchange client makes, as it
    106 returns information required to process all of the other interactions with the
    107 exchange.  The returned information is secured by (1) signature(s) from the exchange,
    108 especially the long-term offline signing key of the exchange, which clients should
    109 cache; (2) signature(s) from auditors, and the auditor keys should be
    110 hard-coded into the wallet as they are the trust anchors for Taler; (3)
    111 possibly by using HTTPS.
    112 
    113 
    114 .. include:: exchange/get-seed.rst
    115 
    116 .. include:: exchange/get-config.rst
    117 
    118 .. include:: exchange/get-keys.rst
    119 
    120 
    121 ----------------------------------------------
    122 Management operations authorized by master key
    123 ----------------------------------------------
    124 
    125 .. include:: exchange/get-management-keys.rst
    126 
    127 .. include:: exchange/post-management-keys.rst
    128 
    129 .. include:: exchange/post-management-denominations-H_DENOM_PUB-revoke.rst
    130 
    131 .. include:: exchange/post-management-signkeys-EXCHANGE_PUB-revoke.rst
    132 
    133 .. include:: exchange/post-management-auditors.rst
    134 
    135 .. include:: exchange/post-management-auditors-AUDITOR_PUB-disable.rst
    136 
    137 .. include:: exchange/post-management-wire-fee.rst
    138 
    139 .. include:: exchange/post-management-global-fees.rst
    140 
    141 .. include:: exchange/post-management-wire.rst
    142 
    143 .. include:: exchange/post-management-wire-disable.rst
    144 
    145 .. include:: exchange/post-management-drain.rst
    146 
    147 .. include:: exchange/post-management-aml-officers.rst
    148 
    149 .. include:: exchange/post-management-partners.rst
    150 
    151 ---------------
    152 Auditor actions
    153 ---------------
    154 
    155 .. _auditor_action:
    156 
    157 This part of the API is for the use by auditors interacting with the exchange.
    158 
    159 .. include:: exchange/post-auditors-AUDITOR_PUB-H_DENOM_PUB.rst
    160 
    161 
    162 ----------------
    163 Blinding Prepare
    164 ----------------
    165 
    166 Certain denomination cipher types, such as Clause-Schnorr, require input values
    167 from the exchange-side as preparation for the blinding of the coins.  See the
    168 Bachelor thesis of Gian Demarmels and Lucien Heuzeveldt,
    169 `Adding Schnorr’s Blind Signature in Taler <https://www.taler.net/papers/cs-thesis.pdf>`_,
    170 for details.
    171 
    172 .. include:: exchange/post-blinding-prepare.rst
    173 
    174 
    175 .. _exchange-withdrawal:
    176 
    177 ----------
    178 Withdrawal
    179 ----------
    180 
    181 This API is used by the wallet to obtain digital coins.
    182 
    183 When transferring money to the exchange such as via SEPA transfers, the exchange creates
    184 a *reserve*, which keeps the money from the customer.  The customer must
    185 specify an EdDSA reserve public key as part of the transfer, and can then
    186 withdraw digital coins using the corresponding private key.  All incoming and
    187 outgoing transactions are recorded under the corresponding public key by the
    188 exchange.
    189 
    190 .. note::
    191 
    192    Eventually the exchange will need to advertise a policy for how long it will
    193    keep transaction histories for inactive or even fully drained reserves.  We
    194    will therefore need some additional handler similar to :http:get:`/keys </keys>` to
    195    advertise those terms of service.
    196 
    197 
    198 .. include:: exchange/get-reserves-RESERVE_PUB.rst
    199 
    200 .. _withdraw:
    201 .. include:: exchange/post-withdraw.rst
    202 
    203 
    204 .. ts:def:: WithdrawRequest
    205 
    206   interface WithdrawRequest {
    207     // Cipher that is used for the rerserve's signatures.
    208     // For now, only ed25519 signatures are applicable,
    209     // but this might change in future versions.
    210     cipher: "ED25519";
    211 
    212     // The reserve's public key, for the the cipher ED25519,
    213     // to verify the signature ``reserve_sig``.
    214     reserve_pub: EddsaPublicKey;
    215 
    216     // Array of ``n`` hash codes of denomination public keys to order.
    217     // The sum of all denomination's values and fees MUST be
    218     // at most the balance of the reserve. The balance of
    219     // the reserve will be immediatley reduced by that amount.
    220     // If ``max_age`` is set, these denominations MUST support
    221     // age restriction as defined in the output to /keys.
    222     denoms_h: HashCode[];
    223 
    224     // If set, the maximum age to commit to. This implies:
    225     // 1.) it MUST be the same value as the maximum age
    226     //     of the reserve.
    227     // 2.) ``coin_evs`` MUST be an array of ``n*kappa``
    228     // 3.) the denominations in ``denoms_h`` MUST support
    229     //      age restriction.
    230     max_age?: Integer;
    231 
    232     // Master seed for the Clause-Schnorr R-value creation.
    233     // MUST match the /blinding-prepare request.
    234     // MUST NOT have been used in any prior withdraw request.
    235     // MUST be present if one of the fresh coin's
    236     // denomination is of type Clause-Schnorr.
    237     blinding_seed?: BlindingMasterSeed;
    238 
    239     // Array of blinded coin envelopes of type `CoinEnvelope`.
    240     // If ``max_age`` is not set, MUST be n entries.
    241     // If ``max_age`` is set, MUST be ``n*kappa`` entries,
    242     // arranged in [0..n)..[0..n), with the first n entries
    243     // belonging to kappa=0 etc.
    244     // In case of age restriction, the exchange will
    245     // respond with an index ``gamma``, which is the index
    246     // that shall remain undisclosed during the subsequent
    247     // reveal phase.
    248     // This hash value along with the reserve's public key
    249     // will also be used for recoup operations, if needed.
    250     coin_evs:  CoinEnvelope[];
    251 
    252     // Signature of `TALER_WithdrawRequestPS` created with
    253     // the `reserves's private key <reserve-priv>`.
    254     reserve_sig: EddsaSignature;
    255   }
    256 
    257 .. ts:def:: WithdrawResponse
    258 
    259   interface WithdrawResponse {
    260     // Array of blinded signatures over each ``coin_evs``,
    261     // in the same order as was given in the request.
    262     // The blinded signatures affirm the coin's validity
    263     // after unblinding.
    264     ev_sigs: BlindedDenominationSignature[];
    265 
    266   }
    267 
    268 
    269 .. ts:def:: AgeWithdrawResponse
    270 
    271   interface AgeWithdrawResponse {
    272     // index of the commitments that the client doesn't
    273     // have to disclose in the subsequent call to
    274     // ``/reveal-withdraw``.
    275     noreveal_index: Integer;
    276 
    277     // Signature of `TALER_WithdrawConfirmationPS` whereby
    278     // the exchange confirms the ``noreveal_index``.
    279     exchange_sig: EddsaSignature;
    280 
    281     // `Public EdDSA key <sign-key-pub>` of the exchange that was used to
    282     // generate the signature.  Should match one of the exchange's signing
    283     // keys from ``/keys``.  Again given explicitly as the client might
    284     // otherwise be confused by clock skew as to which signing key was used.
    285     exchange_pub: EddsaPublicKey;
    286 
    287   }
    288 
    289 .. ts:def:: DenominationGoneMessage
    290 
    291   interface DenominationGoneMessage {
    292 
    293     // Taler error code.  Note that beyond
    294     // expiration this message format is also
    295     // used if the key is not yet valid, or
    296     // has been revoked. May be one of
    297     // - ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE``
    298     // - ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_EXPIRED``
    299     // - ``TALER_EC_EXCHANGE_GENERIC_DENOMINATION_REVOKED``
    300     code: Integer;
    301 
    302     // Signature by the exchange over a
    303     // `TALER_DenominationExpiredAffirmationPS`.
    304     // Must have purpose ``TALER_SIGNATURE_EXCHANGE_AFFIRM_DENOM_EXPIRED``.
    305     exchange_sig: EddsaSignature;
    306 
    307     // Public key of the exchange used to create
    308     // the 'exchange_sig.
    309     exchange_pub: EddsaPublicKey;
    310 
    311     // Hash of the denomination public key that is unknown.
    312     h_denom_pub: HashCode;
    313 
    314     // When was the signature created.
    315     timestamp: Timestamp;
    316 
    317     // What kind of operation was requested that now
    318     // failed?
    319     oper: string;
    320 
    321   }
    322 
    323 .. ts:def:: CoinDenominationConflictError
    324 
    325   // Response to an operation on a coin whose public key the exchange
    326   // already knows under a *different* denomination.  Since protocol
    327   // **vCONFLICT** the response is a proof: it carries the denomination
    328   // signature the exchange holds for the coin, which clients verify
    329   // against ``prev_denom_pub`` (see ``TALER_EXCHANGE_check_coin_denomination_conflict_``).
    330   interface CoinDenominationConflictError {
    331 
    332     // Must be ``TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_DENOMINATION_KEY``.
    333     code: Integer;
    334 
    335     // A string explaining the conflict.
    336     hint: string;
    337 
    338     // Public key of the coin that was already used with another
    339     // denomination.
    340     coin_pub: EddsaPublicKey;
    341 
    342     // Denomination public key under which the exchange knows the coin.
    343     // Its hash differs from the denomination hash used in the request.
    344     prev_denom_pub: DenominationKey;
    345 
    346     // Signature by ``prev_denom_pub`` over ``coin_pub`` (and
    347     // ``prev_h_age_commitment`` if present), i.e. the denomination
    348     // signature of the coin as issued by the exchange.
    349     prev_denom_sig: DenominationSignature;
    350 
    351     // Age commitment hash stored for the coin.  Present exactly
    352     // if ``prev_denom_pub`` is an age-restricted denomination.
    353     // @since **vCONFLICT**
    354     prev_h_age_commitment?: AgeCommitmentHash;
    355 
    356   }
    357 
    358 .. ts:def:: CoinAgeCommitmentConflictError
    359 
    360   // Response to an operation on a coin whose public key the exchange
    361   // already knows under the same denomination, but with a different
    362   // age commitment hash.  Since protocol **vCONFLICT** the response is
    363   // a proof: it carries the denomination signature the exchange holds
    364   // for the coin, which covers ``coin_pub`` and
    365   // ``expected_age_commitment_hash``.
    366   interface CoinAgeCommitmentConflictError {
    367 
    368     // Must be ``TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH``.
    369     code: Integer;
    370 
    371     // A string explaining the conflict.
    372     hint: string;
    373 
    374     // Public key of the coin.
    375     coin_pub: EddsaPublicKey;
    376 
    377     // Hash of the denomination public key of the coin
    378     // (as stored by the exchange, which equals the one
    379     // used in the request).
    380     h_denom_pub: HashCode;
    381 
    382     // Age commitment hash stored for the coin, ``null`` if
    383     // the exchange knows the coin without one.
    384     expected_age_commitment_hash: AgeCommitmentHash | null;
    385 
    386     // Human-readable description of the mismatch.
    387     conflict_detail: string;
    388 
    389     // Signature by the denomination over ``coin_pub`` and
    390     // ``expected_age_commitment_hash``, i.e. the denomination
    391     // signature of the coin as issued by the exchange.
    392     // @since **vCONFLICT**
    393     prev_denom_sig: DenominationSignature;
    394 
    395   }
    396 
    397 
    398 .. ts:def:: WithdrawError
    399 
    400   interface SingleWithdrawError {
    401     // Text describing the error.
    402     hint: string;
    403 
    404     // Detailed error code.
    405     code: Integer;
    406 
    407     // Amount left in the reserve.
    408     balance: Amount;
    409 
    410   }
    411 
    412 
    413 
    414 ------------------
    415 
    416 
    417 .. _reveal-withdraw:
    418 
    419 **Reveal-Withdraw**
    420 
    421 This endpoint is called by the client after a call to `withdraw`_,
    422 *if* the original request had ``max_age`` set and
    423 the response was of type `AgeWithdrawResponse`.
    424 Now the client has to disclose for each coin all but one of the κ secrets
    425 that went into creating the blinded coin's planchets,
    426 including the commitment to age restriction,
    427 and prove that the age restriction was set correctly.
    428 
    429 .. include:: exchange/post-reveal-withdraw.rst
    430 
    431 
    432 ----------
    433 Refreshing
    434 ----------
    435 
    436 Refreshing exchanges one old coin against ``n`` new coins, where the sum of
    437 denominations of the new coins must be smaller than the old coin's
    438 denomination plus melting (refresh) and withdrawal fees charged by the exchange.
    439 The refreshing API can be used by wallets to melt partially spent coins, making
    440 transactions with the freshly exchanged coins unlinkable to previous transactions
    441 by anyone except the wallet itself.
    442 
    443 Refreshing is a two-step process, consisting of
    444 
    445 1. the **melting** of the old coin, together with ``kappa`` batches
    446    of blinded planchets candidates,
    447 2. the **reveal** of ``kappa-1`` secrets to prove the proper construction
    448    of the (revealed) batches of blinded planchets candidates.
    449 
    450 
    451 ^^^^
    452 Melt
    453 ^^^^
    454 
    455 .. _melt:
    456 .. include:: exchange/post-melt.rst
    457 
    458 ^^^^^^^^^^^
    459 Reveal-Melt
    460 ^^^^^^^^^^^
    461 
    462 This endpoint is called by the client after a call to `melt`_.
    463 Now the client has to disclose --for each coin--
    464 all but one of the κ secrets that went into creating the blinded coin's planchets,
    465 the transfer public keys (linking the ownership of the old and new coin),
    466 and the commitment to age restriction,
    467 as proof that the age restriction was set correctly (if applicable).
    468 
    469 .. include:: exchange/post-reveal-melt.rst
    470 
    471 
    472 .. _deposit-par:
    473 
    474 -------
    475 Deposit
    476 -------
    477 
    478 Deposit operations are requested f.e. by a merchant during a transaction or a
    479 bidder during an auction.
    480 
    481 For the deposit operation during purchase, the merchant has to obtain the
    482 deposit permission for a coin from their customer who owns the coin.  When
    483 depositing a coin, the merchant is credited an amount specified in the deposit
    484 permission, possibly a fraction of the total coin's value, minus the deposit
    485 fee as specified by the coin's denomination.
    486 
    487 For auctions, a bidder performs a deposit operation and provides all relevant
    488 information for the auction policy (such as timeout and public key as bidder)
    489 and can use the ``exchange_sig`` field from the `DepositSuccessResponse`
    490 message as a proof to the seller for the escrow of sufficient fund.
    491 
    492 
    493 .. _deposit:
    494 
    495 .. include:: exchange/post-batch-deposit.rst
    496 
    497 
    498 ------
    499 Recoup
    500 ------
    501 
    502 The purpose of this API is to allow coins to be cashed back in,
    503 in certain exceptional situations.
    504 This API is only used if the exchange is either about to go out of
    505 business or has had its private signing keys compromised (so in
    506 either case, the protocol is only used in **abnormal**
    507 situations).  In the above cases, the exchange signals to the
    508 wallets that the emergency cash back protocol has been activated
    509 by putting the affected denomination keys into the cash-back
    510 part of the :http:get:`/keys </keys>` response.  If and only if this has happened,
    511 coins that were signed with those denomination keys can be cashed
    512 in using this API.
    513 
    514 Since protocol **vRECOUP**, coins are recouped in batches: all coins in one
    515 request must originate from the same withdraw or refresh operation, which
    516 the client identifies by its commitment (``planchets_h`` of the withdraw
    517 request, or ``rc`` of the melt request).  For the coins to be recouped, the
    518 client discloses the secret material from which the exchange recomputes
    519 their blinded envelopes; for the other coins of the same operation it
    520 provides the hashes of the blinded envelopes.  This allows the exchange to
    521 recompute the commitment and thereby verify that the coins were part of the
    522 operation, without having to keep individual envelopes in its database.
    523 Coins from a withdraw operation are paid back to the reserve
    524 (:http:post:`/recoup-withdraw </recoup-withdraw>`), coins from a refresh
    525 operation to the old coin that was melted
    526 (:http:post:`/recoup-refresh </recoup-refresh>`).
    527 
    528 
    529 .. include:: exchange/post-recoup-withdraw.rst
    530 
    531 .. include:: exchange/post-recoup-refresh.rst
    532 
    533 
    534 .. _exchange_refund:
    535 
    536 -------
    537 Refunds
    538 -------
    539 
    540 .. include:: exchange/post-coins-COIN_PUB-refund.rst
    541 
    542 .. _reserve-history:
    543 
    544 ---------------
    545 Reserve History
    546 ---------------
    547 
    548 .. include:: exchange/get-reserves-RESERVE_PUB-history.rst
    549 
    550 
    551 .. _coin-history:
    552 
    553 ------------
    554 Coin History
    555 ------------
    556 
    557 .. include:: exchange/get-coins-COIN_PUB-history.rst
    558 
    559 -----------------------
    560 Tracking wire transfers
    561 -----------------------
    562 
    563 This API is used by merchants that need to find out which wire
    564 transfers (from the exchange to the merchant) correspond to which deposit
    565 operations.  Typically, a merchant will receive a wire transfer with a
    566 **wire transfer identifier** and want to know the set of deposit
    567 operations that correspond to this wire transfer.  This is the
    568 preferred query that merchants should make for each wire transfer they
    569 receive.  If a merchant needs to investigate a specific deposit
    570 operation (i.e. because it seems that it was not paid), then the
    571 merchant can also request the wire transfer identifier for a deposit
    572 operation.
    573 
    574 Sufficient information is returned to verify that the coin signatures
    575 are correct. This also allows governments to use this API when doing
    576 a tax audit on merchants.
    577 
    578 Naturally, the returned information may be sensitive for the merchant.
    579 We do not require the merchant to sign the request, as the same requests
    580 may also be performed by the government auditing a merchant.
    581 However, wire transfer identifiers should have sufficient entropy to
    582 ensure that obtaining a successful reply by brute-force is not practical.
    583 Nevertheless, the merchant should protect the wire transfer identifiers
    584 from his bank statements against unauthorized access, lest his income
    585 situation is revealed to an adversary. (This is not a major issue, as
    586 an adversary that has access to the line-items of bank statements can
    587 typically also view the balance.)
    588 
    589 
    590 .. include:: exchange/get-transfers-WTID.rst
    591 
    592 .. include:: exchange/get-deposits-H_WIRE-MERCHANT_PUB-H_CONTRACT_TERMS-COIN_PUB.rst
    593 
    594 
    595 .. _exchange_w2w:
    596 
    597 --------------------------
    598 Wallet-to-wallet transfers
    599 --------------------------
    600 
    601 .. include:: exchange/get-purses-PURSE_PUB-merge.rst
    602 
    603 .. include:: exchange/post-purses-PURSE_PUB-create.rst
    604 
    605 .. include:: exchange/delete-purses-PURSE_PUB.rst
    606 
    607 .. include:: exchange/post-purses-PURSE_PUB-merge.rst
    608 
    609 .. include:: exchange/post-reserves-RESERVE_PUB-purse.rst
    610 
    611 .. include:: exchange/get-contracts-CONTRACT_PUB.rst
    612 
    613 .. include:: exchange/post-purses-PURSE_PUB-deposit.rst
    614 
    615 
    616 .. _exchange_wads:
    617 
    618 ----
    619 Wads
    620 ----
    621 
    622   .. note::
    623 
    624      This is a draft API that is not yet implemented.
    625 
    626 
    627 These endpoints are used to manage exchange-to-exchange payments in support of
    628 wallet-to-wallet payments.  Only another exchange should access this endpoint.
    629 
    630 
    631 .. include:: exchange/get-wads-WAD_ID.rst
    632 
    633 
    634 ------------------
    635 KYC status updates
    636 ------------------
    637 
    638 This section describes endpoints used to set up, complete and
    639 inquire about KYC operations performed by an exchange for
    640 regulatory compliance.
    641 
    642 .. include:: exchange/post-kyc-wallet.rst
    643 
    644 .. include:: exchange/get-kyc-check-H_NORMALIZED_PAYTO.rst
    645 
    646 .. include:: exchange/get-kyc-spa-ACCESS_TOKEN.rst
    647 
    648 .. include:: exchange/get-kyc-info-ACCESS_TOKEN.rst
    649 
    650 .. include:: exchange/post-kyc-upload-ID.rst
    651 
    652 .. include:: exchange/post-kyc-start-ID.rst
    653 
    654 .. include:: exchange/post-kyc-import-EXTERN_PUB.rst
    655 
    656 .. include:: exchange/post-kyc-bulk-EXTERN_PUB.rst
    657 
    658 .. include:: exchange/get-kyc-proof-PROVIDER_NAME.rst
    659 
    660 .. include:: exchange/get-kyc-webhook-PROVIDER_NAME-star.rst
    661 
    662 
    663 --------------
    664 AML operations
    665 --------------
    666 
    667 This API is only for designated AML officers. It is used
    668 to allow exchange staff to monitor suspicious transactions
    669 and freeze or unfreeze accounts suspected of money laundering.
    670 
    671 .. include:: exchange/get-aml-OFFICER_PUB.rst
    672 
    673 .. include:: exchange/get-aml-OFFICER_PUB-measures.rst
    674 
    675 .. include:: exchange/get-aml-OFFICER_PUB-kyc-statistics-NAMES.rst
    676 
    677 .. include:: exchange/get-aml-OFFICER_PUB-decisions.rst
    678 
    679 .. include:: exchange/get-aml-OFFICER_PUB-legitimizations.rst
    680 
    681 .. include:: exchange/get-aml-OFFICER_PUB-accounts.rst
    682 
    683 .. include:: exchange/get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.rst
    684 
    685 .. include:: exchange/post-aml-OFFICER_PUB-render-form.rst
    686 
    687 .. include:: exchange/post-aml-OFFICER_PUB-decision.rst
    688 
    689 .. include:: exchange/get-aml-OFFICER_PUB-transfers-credit.rst
    690 
    691 .. include:: exchange/get-aml-OFFICER_PUB-wallet-credit.rst
    692 
    693 ---------------
    694 Reserve control
    695 ---------------
    696 
    697 This section describes the reserve control API which can be used to (1)
    698 prevent a reserve from expiring, to (2) pay an annual fee to allow a number of
    699 purses to be created for the respective reserve without paying a purse fee
    700 each time, to (3) obtain KYC information associated with a reserve to prove
    701 the identity of the person sending an invoice to the payer, and to (4) close a
    702 reserve before it would naturally expire and possibly (5) wire the funds to a
    703 designated account.
    704 
    705   .. note::
    706 
    707      This section is about a proposed API. It is not implemented. See also DD 31.
    708 
    709 .. include:: exchange/post-reserves-RESERVE_PUB-open.rst
    710 
    711 .. include:: exchange/get-reserves-RESERVE_PUB-attest.rst
    712 
    713 .. include:: exchange/post-reserves-RESERVE_PUB-attest.rst
    714 
    715 .. include:: exchange/post-reserves-RESERVE_PUB-close.rst
    716 
    717 .. _delete-reserve:
    718 
    719 .. include:: exchange/delete-reserves-RESERVE_PUB.rst