From 13f397521c0bb2b1587fa287de5be49c74f69d12 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 7 Dec 2023 20:08:51 +0100 Subject: wallet-core: implement prepareWithdrawExchange request --- packages/taler-util/src/wallet-types.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'packages/taler-util/src') diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index bca8a92a8..d0bf5006d 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -2843,3 +2843,31 @@ export interface WithdrawalExchangeAccountDetails { */ conversionError?: TalerErrorDetail; } + +export interface PrepareWithdrawExchangeRequest { + /** + * A taler://withdraw-exchange URI. + */ + talerUri: string; +} + +export const codecForPrepareWithdrawExchangeRequest = + (): Codec => + buildCodecForObject() + .property("talerUri", codecForString()) + .build("PrepareWithdrawExchangeRequest"); + +export interface PrepareWithdrawExchangeResponse { + /** + * Base URL of the exchange that already existed + * or was ephemerally added as an exchange entry to + * the wallet. + */ + exchangeBaseUrl: string; + + /** + * Amount from the taler://withdraw-exchange URI. + * Only present if specified in the URI. + */ + amount?: AmountString; +} -- cgit v1.2.3