From 7ea8321ddd2d56f43dceaa18340f1d1c39a83e76 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 20 Jan 2023 15:41:08 -0300 Subject: introducing getBalanceDetail for getting all depositable/transferable amount for a currency --- packages/taler-util/src/wallet-types.ts | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'packages/taler-util') 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 => + buildCodecForObject() + .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 => ) .build("UserAttentionsRequest"); + export interface UserAttentionsRequest { priority?: AttentionPriority; } -- cgit v1.2.3