diff options
Diffstat (limited to 'packages/taler-wallet-core/src/types/walletTypes.ts')
-rw-r--r-- | packages/taler-wallet-core/src/types/walletTypes.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/types/walletTypes.ts b/packages/taler-wallet-core/src/types/walletTypes.ts index ec57e7d2a..6f6340520 100644 --- a/packages/taler-wallet-core/src/types/walletTypes.ts +++ b/packages/taler-wallet-core/src/types/walletTypes.ts @@ -554,6 +554,18 @@ export interface ExchangeListItem { paytoUris: string[]; } +export const codecForExchangeListItem = (): Codec<ExchangeListItem> => + buildCodecForObject<ExchangeListItem>() + .property("currency", codecForString()) + .property("exchangeBaseUrl", codecForString()) + .property("paytoUris", codecForList(codecForString())) + .build("ExchangeListItem"); + +export const codecForExchangesListResponse = (): Codec<ExchangesListRespose> => + buildCodecForObject<ExchangesListRespose>() + .property("exchanges", codecForList(codecForExchangeListItem())) + .build("ExchangesListRespose"); + export interface AcceptManualWithdrawalResult { /** * Payto URIs that can be used to fund the withdrawal. |