commit f091c096dd948c2e84a9298e8b47d69354186465
parent b0ee98cb4ddfaffd17b7691d774ca723aa8af359
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 14 Jun 2026 14:33:40 +0200
spec new endpoint for #11468
Diffstat:
2 files changed, 81 insertions(+), 2 deletions(-)
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
@@ -30,7 +30,7 @@ defines all specific terms used in this section.
Version History
---------------
-The currently implemented protocol version is **v35**.
+The currently implemented protocol version is **v36**.
* Wallet-core is currently targeting **vXX**.
* The merchant is currently targeting **v34**.
@@ -48,12 +48,13 @@ The currently implemented protocol version is **v35**.
prepared_transfer_url per wire account in ``/keys``
* ``v35``: adds ``default_p2p_push_expiration`` to ``/keys``
* ``v36``: adds ``kyc_swap_tos_acceptance`` to ``/keys``
+* ``v37``: adds ``/aml/$OFFICER_PUB/wallet-credit`` endpoint
**Upcoming versions:**
+* ``vIMPORT``: external KYC/KYB data import
* ``vRECOUP``: improved recoup protocol
* ``vATTEST``: KYC attestation support
-* ``vIMPORT``: external KYC/KYB data import
**Ideas for future version:**
@@ -567,6 +568,8 @@ and freeze or unfreeze accounts suspected of money laundering.
.. include:: exchange/get-aml-OFFICER_PUB-transfers-credit.rst
+.. include:: exchange/get-aml-OFFICER_PUB-wallet-credit.rst
+
---------------
Reserve control
---------------
diff --git a/core/exchange/get-aml-OFFICER_PUB-wallet-credit.rst b/core/exchange/get-aml-OFFICER_PUB-wallet-credit.rst
@@ -0,0 +1,76 @@
+.. http:get:: /aml/$OFFICER_PUB/wallet-credit
+
+ Obtain a wallet's P2P incoming history data. Shows effective
+ merges into a wallet (credit). Note that requests for
+ payments that were not paid by the other party are not shown.
+
+ The endpoint was introduced in protocol **v37**.
+
+ **Request:**
+
+ *Taler-AML-Officer-Signature*:
+ The client must provide Base-32 encoded EdDSA signature with
+ ``$OFFICER_PRIV``, affirming the desire to obtain AML data. Note that
+ this is merely a simple authentication mechanism, the details of the
+ request are not protected by the signature.
+
+ :query threshold:
+ *Optional*. minimum amount ("CURRENCY:VAL.FRAC") to return. All amounts
+ below the given threshold will be filtered.
+ :query limit:
+ *Optional*. takes value of the form ``N (-N)``, so that at
+ most ``N`` values strictly older (younger) than ``start`` are returned.
+ Defaults to ``-20`` to return the last 20 entries (before ``start``).
+ :query offset:
+ *Optional*. Row number threshold, see ``delta`` for its
+ interpretation. Defaults to ``INT64_MAX``, namely the biggest row id
+ possible in the database.
+ :query h_payto:
+ *Optional*. Account selector using the *normalized* payto URI
+ of the wallet. Information for all wallets is returned if this
+ filter is absent, otherwise only transactions for this wallet.
+ @since protocol **v29**.
+
+ **Response:**
+
+ :http:statuscode:`200 OK`:
+ The responds will be a `WalletCreditListResponse` message.
+ :http:statuscode:`204 No content`:
+ There are no matching transactions.
+ :http:statuscode:`403 Forbidden`:
+ The signature is invalid.
+ :http:statuscode:`404 Not found`:
+ The designated AML account is not known.
+ :http:statuscode:`409 Conflict`:
+ The designated AML account is not enabled.
+ :http:statuscode:`500 Internal Server Error`:
+ The server experienced an internal error.
+ This response comes with a standard `ErrorDetail` response with
+ a code of ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
+
+ .. ts:def:: WalletCreditListResponse
+
+ interface WalletCreditListResponse {
+
+ // List of matching transactions.
+ transfers: WalletCreditListEntry[];
+
+ }
+
+ .. ts:def:: WalletCreditListEntry
+
+ interface ExchangeTransferListEntry {
+
+ // Row ID of the record. Used to filter by offset.
+ rowid: Integer;
+
+ // payto://-URI of the wallet.
+ payto_uri: string;
+
+ // The amount involved.
+ amount: Amount;
+
+ // Time when the merge was made (effective)
+ execution_time: Timestamp;
+
+ }