summaryrefslogtreecommitdiff
path: root/taler-wallet.rst
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-05-14 16:28:44 -0300
committerTorsten Grote <t@grobox.de>2020-05-14 16:28:44 -0300
commit7b26800e473211ca8e8682b60f3f38e2a70e6e60 (patch)
treebcf2fe40f2e1ce5c2495076989bc9fec22e1a640 /taler-wallet.rst
parentfda16ec44a8f422b2556082e4882f8e941881cee (diff)
downloaddocs-7b26800e473211ca8e8682b60f3f38e2a70e6e60.tar.gz
docs-7b26800e473211ca8e8682b60f3f38e2a70e6e60.tar.bz2
docs-7b26800e473211ca8e8682b60f3f38e2a70e6e60.zip
Add proposal for wallet balances API
Diffstat (limited to 'taler-wallet.rst')
-rw-r--r--taler-wallet.rst41
1 files changed, 40 insertions, 1 deletions
diff --git a/taler-wallet.rst b/taler-wallet.rst
index e7351fd..1c27d82 100644
--- a/taler-wallet.rst
+++ b/taler-wallet.rst
@@ -81,12 +81,51 @@ APIs and Data Formats
These APIs are still a work in progress and *not* final.
+Balances
+--------
+
+Balances are the amounts of digital cash held by the wallet.
+
+:name: ``"getBalances"``
+:description: Get a list of balances per currency.
+:response:
+ .. ts:def:: BalancesResponse
+
+ interface BalancesResponse {
+ // a list of balances sorted by currency.
+ // (currencies with shorter names first, then lexically ascending).
+ balances: Balance[];
+ }
+
+ .. ts:def:: Balance
+
+ interface Balance {
+ currency?: string;
+
+ // the total Amount that is currently available to be spent
+ available: Amount;
+
+ // the total incoming amount that will be added to the available balance
+ // when all pending transactions succeed
+ pendingIncoming: Amount;
+
+ // the total outgoing amount that will be subtracted from the available balance
+ // when all pending transactions succeed
+ pendingOutgoing: Amount;
+
+ // true if the balance has pending transactions
+ hasPendingTransactions: boolean;
+
+ // true if the balance requires user-interaction, e.g. accepting a tip
+ requiresUserInput: boolean;
+ }
+
Transactions
------------
Transactions are all operations or events that are affecting the balance.
-:name: ``"transactions"``
+:name: ``"getTransactions"``
:description: Get a list of past and pending transactions.
:request:
.. ts:def:: TransactionsRequest