aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-01-20 15:41:08 -0300
committerSebastian <sebasjm@gmail.com>2023-01-20 15:41:55 -0300
commit7ea8321ddd2d56f43dceaa18340f1d1c39a83e76 (patch)
tree9873eeb8fa836778d9c7fce1c6a778e7e8b6acaf /packages/taler-util
parent81dda3b6b1500ed11b6ae539ce52a6c7e9a58951 (diff)
introducing getBalanceDetail for getting all depositable/transferable amount for a currency
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/wallet-types.ts21
1 files changed, 16 insertions, 5 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index fc383acb0..50cb50f30 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -105,6 +105,16 @@ export class CreateReserveResponse {
reservePub: string;
}
+export interface GetBalanceDetailRequest {
+ currency: string;
+}
+
+export const codecForGetBalanceDetailRequest = (): Codec<GetBalanceDetailRequest> =>
+ buildCodecForObject<GetBalanceDetailRequest>()
+ .property("currency", codecForString())
+ .build("GetBalanceDetailRequest");
+
+
export interface Balance {
available: AmountString;
pendingIncoming: AmountString;
@@ -215,11 +225,11 @@ export interface CoinDumpJson {
withdrawal_reserve_pub: string | undefined;
coin_status: CoinStatus;
spend_allocation:
- | {
- id: string;
- amount: string;
- }
- | undefined;
+ | {
+ id: string;
+ amount: string;
+ }
+ | undefined;
/**
* Information about the age restriction
*/
@@ -1792,6 +1802,7 @@ export const codecForUserAttentionsRequest = (): Codec<UserAttentionsRequest> =>
)
.build("UserAttentionsRequest");
+
export interface UserAttentionsRequest {
priority?: AttentionPriority;
}