diff options
author | Florian Dold <florian@dold.me> | 2024-07-01 14:32:44 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-07-01 14:32:52 +0200 |
commit | 316c43a169bd52c8dcdfb9a3894e66b9c650ca85 (patch) | |
tree | 603bdad9a105498119daea41d913e81c1059c6bd /packages/taler-wallet-core | |
parent | ae2c24271d7bab08cda6b6e3116bb50b22862d81 (diff) | |
download | wallet-core-316c43a169bd52c8dcdfb9a3894e66b9c650ca85.tar.xz |
-handlers WIP
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 5b3b4da29..e4ab03b6f 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -1446,6 +1446,42 @@ const handlers: { [T in WalletApiOperation]: HandlerWithValidator<T> } = { codec: codecForTransactionByIdRequest(), handler: getTransactionById, }, + [WalletApiOperation.GetWithdrawalTransactionByUri]: { + codec: codecForGetWithdrawalDetailsForUri(), + handler: getWithdrawalTransactionByUri, + }, + [WalletApiOperation.AddExchange]: { + codec: codecForAddExchangeRequest(), + handler: handleAddExchange, + }, + [WalletApiOperation.TestingPing]: { + codec: codecForEmptyObject(), + handler: async () => ({}), + }, + [WalletApiOperation.UpdateExchangeEntry]: { + codec: codecForUpdateExchangeEntryRequest(), + handler: handleUpdateExchangeEntry, + }, + [WalletApiOperation.TestingGetDenomStats]: { + codec: codecForTestingGetDenomStatsRequest(), + handler: handleTestingGetDenomStats, + }, + [WalletApiOperation.ListExchanges]: { + codec: codecForEmptyObject(), + handler: listExchanges, + }, + [WalletApiOperation.GetExchangeEntryByUrl]: { + codec: codecForGetExchangeEntryByUrlRequest(), + handler: lookupExchangeByUri, + }, + [WalletApiOperation.ListExchangesForScopedCurrency]: { + codec: codecForListExchangesForScopedCurrencyRequest(), + handler: handleListExchangesForScopedCurrency, + }, + [WalletApiOperation.GetExchangeDetailedInfo]: { + codec: codecForAddExchangeRequest(), + handler: (wex, req) => getExchangeDetailedInfo(wex, req.exchangeBaseUrl), + }, }; /** |