diff options
author | Florian Dold <florian@dold.me> | 2023-12-07 20:08:51 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-12-07 20:08:51 +0100 |
commit | 13f397521c0bb2b1587fa287de5be49c74f69d12 (patch) | |
tree | e279b8fca4003fe7c401f432ddcc37adbd4d7577 /packages/taler-util | |
parent | 1a7cd398fb752d059e05ce928236727d0754dad9 (diff) | |
download | wallet-core-13f397521c0bb2b1587fa287de5be49c74f69d12.tar.xz |
wallet-core: implement prepareWithdrawExchange request
Diffstat (limited to 'packages/taler-util')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 28 |
1 files changed, 28 insertions, 0 deletions
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<PrepareWithdrawExchangeRequest> => + buildCodecForObject<PrepareWithdrawExchangeRequest>() + .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; +} |