summaryrefslogtreecommitdiff
path: root/taler-wallet.rst
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-11 14:02:31 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-11 14:03:00 +0530
commit6036cea5f598620ac4b6e9553d84bef2aa93ad7c (patch)
tree7ef9f691a717f1a757f91b5867a02004e8f99898 /taler-wallet.rst
parenta5a19f26f05c2bb1edf5e85001be56619d0740a1 (diff)
downloaddocs-6036cea5f598620ac4b6e9553d84bef2aa93ad7c.tar.gz
docs-6036cea5f598620ac4b6e9553d84bef2aa93ad7c.tar.bz2
docs-6036cea5f598620ac4b6e9553d84bef2aa93ad7c.zip
wallet-core API docs
Diffstat (limited to 'taler-wallet.rst')
-rw-r--r--taler-wallet.rst110
1 files changed, 86 insertions, 24 deletions
diff --git a/taler-wallet.rst b/taler-wallet.rst
index 8d348ef..35210cb 100644
--- a/taler-wallet.rst
+++ b/taler-wallet.rst
@@ -137,9 +137,9 @@ Transactions
Transactions are all operations or events that are affecting the balance.
-:name: ``"getTransactions"``
-:description: Get a list of past and pending transactions.
-:request:
+:Name: ``"getTransactions"``
+:Description: Get a list of past and pending transactions.
+:Request:
.. ts:def:: TransactionsRequest
interface TransactionsRequest {
@@ -149,7 +149,7 @@ Transactions are all operations or events that are affecting the balance.
// if present, results will be limited to transactions related to the given search string
search?: string;
}
-:response:
+:Response:
.. ts:def:: TransactionsResponse
interface TransactionsResponse {
@@ -382,15 +382,15 @@ Transactions are all operations or events that are affecting the balance.
Refunds
-------
-:name: ``"applyRefund"``
-:description: Process a refund from a ``taler://refund`` URI.
-:request:
+:Name: ``"applyRefund"``
+:Description: Process a refund from a ``taler://refund`` URI.
+:Request:
.. ts:def:: WalletApplyRefundRequest
interface WalletApplyRefundRequest {
talerRefundUri: string;
}
-:response:
+:Response:
.. ts:def:: WalletApplyRefundResponse
interface WalletApplyRefundResponse {
@@ -401,12 +401,12 @@ Refunds
Exchange Management: List Exchanges
-----------------------------------
-:name: ``"listExchanges"``
-:description:
+:Name: ``"listExchanges"``
+:Description:
List all exchanges.
-:cli:
+:CLI:
``taler-wallet-cli exchanges list``
-:response:
+:Response:
.. ts:def:: ExchangesListRespose
interface ExchangesListRespose {
@@ -424,38 +424,100 @@ Exchange Management: List Exchanges
Exchange Management: Add Exchange
---------------------------------
-:name: ``"addExchange"``
-:description:
+:Name: ``"addExchange"``
+:Description:
Add an exchange.
-:cli:
+:CLI:
``taler-wallet-cli exchanges add $URL``
-:request:
+:Request:
.. ts:def:: ExchangeAddRequest
interface ExchangeAddRequest {
exchangeBaseUrl: string;
}
-:response:
+:Response:
+ On success, the response is an empty object.
+
+Exchange Management: Get Terms of Service
+-----------------------------------------
+
+:Name: ``"getExchangeTos"``
+:Description:
+ Get the exchange's current ToS and which version of the ToS (if any)
+ the user has accepted.
+:CLI:
+ ``taler-wallet-cli exchanges tos $URL``
+:Request:
+ .. ts:def:: ExchangeGetTosRequest
+
+ interface ExchangeGetTosRequest {
+ exchangeBaseUrl: string;
+ }
+:Response:
+ .. ts:def:: ExchangeGetTosResult
+
+ export interface GetExchangeTosResult {
+ // Markdown version of the current ToS.
+ tos: string;
+
+ // Version tag of the current ToS.
+ currentEtag: string;
+
+ // Version tag of the last ToS that the user has accepted,
+ // if any.
+ acceptedEtag: string | undefined;
+ }
+
+Exchange Management: Set Accepted Terms of Service Version
+----------------------------------------------------------
+
+:Name: ``"setExchangeTosAccepted"``
+:Description:
+ Store that the user has accepted a version of the exchange's ToS.
+:CLI:
+ ``taler-wallet-cli exchanges accept-tos $URL $ETAG``
+:Request:
+ .. ts:def:: ExchangeSetTosAccepted
+
+ interface ExchangeGetTosRequest {
+ exchangeBaseUrl: string;
+ acceptedEtag: string;
+ }
+:Response:
On success, the response is an empty object.
Withdrawal: Get Manual Withdrawal Info
--------------------------------------
-:name: ``"getWithdrawalDetailsForAmount"``
-:description:
+:Name: ``"getWithdrawalDetailsForAmount"``
+:Description:
Get information about fees and exchange for a manual withdrawal of a given amount.
-:cli:
+:CLI:
``taler-wallet-cli advanced manual-withdrawal-details $URL $AMOUNT``
-:request:
+:Request:
.. ts:def:: GetManualWithdrawalDetailsRequest
interface ExchangeAddRequest {
exchangeBaseUrl: string;
amount: string;
}
-:response:
- An ``ExchangeWithdrawDetails`` object (to be documented, see `here
- <https://git.taler.net/wallet-core.git/tree/src/types/walletTypes.ts#n61>`__).
+:Response:
+ .. ts:def:: ManualWithdrawalDetails
+
+ export interface ManualWithdrawalDetails {
+ // Did the user accept the current version of the exchange's
+ // terms of service?
+ tosAccepted: boolean;
+
+ // Amount that the user will transfer to the exchange.
+ rawAmount: AmountString;
+
+ // Amount that will be added to the user's wallet balance.
+ effectiveAmount: AmountString;
+
+ // Ways to pay the exchange.
+ paytoUris: string[];
+ }
Integration Tests
=================