diff options
author | Sebastian <sebasjm@gmail.com> | 2021-12-23 15:17:36 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-12-23 15:17:36 -0300 |
commit | 2e71117f59e0ae6106930e705ae6a54a9839281b (patch) | |
tree | a39856486a2801f56c65de245c871ce596f8ab16 /packages/taler-util | |
parent | b8200de6f6c5ab9be3ff9f556c8acda013e574c3 (diff) |
deposit from wallet webex: wip
Diffstat (limited to 'packages/taler-util')
-rw-r--r-- | packages/taler-util/src/walletTypes.ts | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts index ced30e4db..4158dde9e 100644 --- a/packages/taler-util/src/walletTypes.ts +++ b/packages/taler-util/src/walletTypes.ts @@ -54,6 +54,7 @@ import { } from "./talerTypes.js"; import { OrderShortInfo, codecForOrderShortInfo } from "./transactionsTypes.js"; import { BackupRecovery } from "./backupTypes.js"; +import { PaytoUri } from "./payto.js"; /** * Response for the create reserve request to the wallet. @@ -525,6 +526,10 @@ export interface ExchangesListRespose { exchanges: ExchangeListItem[]; } +export interface KnownBankAccounts { + accounts: PaytoUri[]; +} + export interface ExchangeTos { acceptedVersion?: string; currentVersion?: string; @@ -737,12 +742,19 @@ export const codecForApplyRefundRequest = (): Codec<ApplyRefundRequest> => export interface GetWithdrawalDetailsForUriRequest { talerWithdrawUri: string; } - export const codecForGetWithdrawalDetailsForUri = (): Codec<GetWithdrawalDetailsForUriRequest> => buildCodecForObject<GetWithdrawalDetailsForUriRequest>() .property("talerWithdrawUri", codecForString()) .build("GetWithdrawalDetailsForUriRequest"); +export interface ListKnownBankAccountsRequest { + currency?: string; +} +export const codecForListKnownBankAccounts = (): Codec<ListKnownBankAccountsRequest> => + buildCodecForObject<ListKnownBankAccountsRequest>() + .property("currency", codecOptional(codecForString())) + .build("ListKnownBankAccountsRequest"); + export interface GetExchangeWithdrawalInfo { exchangeBaseUrl: string; amount: AmountJson; @@ -965,11 +977,23 @@ export const codecForAbortPayWithRefundRequest = (): Codec<AbortPayWithRefundReq .property("proposalId", codecForString()) .build("AbortPayWithRefundRequest"); +export interface GetFeeForDepositRequest { + depositPaytoUri: string; + amount: AmountString; +} + export interface CreateDepositGroupRequest { depositPaytoUri: string; - amount: string; + amount: AmountString; } + +export const codecForGetFeeForDeposit = (): Codec<GetFeeForDepositRequest> => + buildCodecForObject<GetFeeForDepositRequest>() + .property("amount", codecForAmountString()) + .property("depositPaytoUri", codecForString()) + .build("GetFeeForDepositRequest"); + export const codecForCreateDepositGroupRequest = (): Codec<CreateDepositGroupRequest> => buildCodecForObject<CreateDepositGroupRequest>() .property("amount", codecForAmountString()) |