taler-docs

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

api-exchange.rst (23926B)


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