taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

wallet-core.md (149369B)


      1 # Wallet-Core API Documentation
      2 This file is auto-generated from the [taler-typescript-core](https://git.taler.net/taler-typescript-core.git/tree/packages/taler-wallet-core/src/wallet-api-types.ts) repository.
      3 ## Overview
      4 ###  Initialization
      5 * [InitWalletOp](#initwalletop)
      6 * [ShutdownOp](#shutdownop)
      7 * [HintApplicationResumedOp](#hintapplicationresumedop)
      8 * [SetWalletRunConfigOp](#setwalletrunconfigop)
      9 * [GetVersionOp](#getversionop)
     10 * [HintNetworkAvailabilityOp](#hintnetworkavailabilityop)
     11 ###  Donau
     12 * [SetDonauOp](#setdonauop)
     13 * [GetDonauOp](#getdonauop)
     14 * [GetDonauStatementsOp](#getdonaustatementsop)
     15 ###  Contacts
     16 * [AddContactOp](#addcontactop)
     17 * [DeleteContactOp](#deletecontactop)
     18 * [GetContactsOp](#getcontactsop)
     19 ###  Mailbox
     20 * [RefreshMailboxOp](#refreshmailboxop)
     21 * [InitializeMailboxOp](#initializemailboxop)
     22 * [GetMailboxOp](#getmailboxop)
     23 * [GetMailboxMessagesOp](#getmailboxmessagesop)
     24 * [DeleteMailboxMessageOp](#deletemailboxmessageop)
     25 * [AddMailboxMessageOp](#addmailboxmessageop)
     26 * [SendTalerUriMailboxMessageOp](#sendtalerurimailboxmessageop)
     27 ###  Basic Wallet Information
     28 * [GetBalancesOp](#getbalancesop)
     29 * [GetBalancesDetailOp](#getbalancesdetailop)
     30 * [ConvertDepositAmountOp](#convertdepositamountop)
     31 * [GetMaxDepositAmountOp](#getmaxdepositamountop)
     32 * [GetMaxPeerPushDebitAmountOp](#getmaxpeerpushdebitamountop)
     33 ###  Managing Transactions
     34 * [GetTransactionsOp](#gettransactionsop)
     35 * [GetTransactionsV2Op](#gettransactionsv2op)
     36 * [ListAssociatedRefreshesOp](#listassociatedrefreshesop)
     37 * [TestingGetSampleTransactionsOp](#testinggetsampletransactionsop)
     38 * [GetTransactionByIdOp](#gettransactionbyidop)
     39 * [RetryPendingNowOp](#retrypendingnowop)
     40 * [DeleteTransactionOp](#deletetransactionop)
     41 * [RetryTransactionOp](#retrytransactionop)
     42 * [AbortTransactionOp](#aborttransactionop)
     43 * [FailTransactionOp](#failtransactionop)
     44 * [SuspendTransactionOp](#suspendtransactionop)
     45 * [ResumeTransactionOp](#resumetransactionop)
     46 ###  Withdrawals
     47 * [GetWithdrawalDetailsForAmountOp](#getwithdrawaldetailsforamountop)
     48 * [GetWithdrawalDetailsForUriOp](#getwithdrawaldetailsforuriop)
     49 * [PrepareBankIntegratedWithdrawalOp](#preparebankintegratedwithdrawalop)
     50 * [ConfirmWithdrawalOp](#confirmwithdrawalop)
     51 * [AcceptBankIntegratedWithdrawalOp](#acceptbankintegratedwithdrawalop)
     52 * [AcceptManualWithdrawalOp](#acceptmanualwithdrawalop)
     53 ###  Merchant Payments
     54 * [PreparePayForUriOp](#preparepayforuriop)
     55 * [GetChoicesForPaymentOp](#getchoicesforpaymentop)
     56 * [SharePaymentOp](#sharepaymentop)
     57 * [CheckPayForTemplateOp](#checkpayfortemplateop)
     58 * [PreparePayForTemplateOp](#preparepayfortemplateop)
     59 * [ConfirmPayOp](#confirmpayop)
     60 * [StartRefundQueryForUriOp](#startrefundqueryforuriop)
     61 * [StartRefundQueryOp](#startrefundqueryop)
     62 ###  Token family management
     63 * [ListDiscountsOp](#listdiscountsop)
     64 * [DeleteDiscountOp](#deletediscountop)
     65 * [ListSubscriptionsOp](#listsubscriptionsop)
     66 * [DeleteSubscriptionOp](#deletesubscriptionop)
     67 ###  Global Currency management
     68 * [ListGlobalCurrencyAuditorsOp](#listglobalcurrencyauditorsop)
     69 * [ListGlobalCurrencyExchangesOp](#listglobalcurrencyexchangesop)
     70 * [AddGlobalCurrencyExchangeOp](#addglobalcurrencyexchangeop)
     71 * [AddGlobalCurrencyAuditorOp](#addglobalcurrencyauditorop)
     72 * [RemoveGlobalCurrencyExchangeOp](#removeglobalcurrencyexchangeop)
     73 * [RemoveGlobalCurrencyAuditorOp](#removeglobalcurrencyauditorop)
     74 ###  Exchange Management
     75 * [CompleteExchangeBaseUrlOp](#completeexchangebaseurlop)
     76 * [ListExchangesOp](#listexchangesop)
     77 * [StartExchangeWalletKycOp](#startexchangewalletkycop)
     78 * [TestingWaitExchangeWalletKycOp](#testingwaitexchangewalletkycop)
     79 * [TestingPlanMigrateExchangeBaseUrlOp](#testingplanmigrateexchangebaseurlop)
     80 * [PrepareWithdrawExchangeOp](#preparewithdrawexchangeop)
     81 * [AddExchangeOp](#addexchangeop)
     82 * [UpdateExchangeEntryOp](#updateexchangeentryop)
     83 * [ListBankAccountsOp](#listbankaccountsop)
     84 * [GetBankAccountByIdOp](#getbankaccountbyidop)
     85 * [AddBankAccountsOp](#addbankaccountsop)
     86 * [ForgetBankAccountsOp](#forgetbankaccountsop)
     87 * [SetExchangeTosAcceptedOp](#setexchangetosacceptedop)
     88 * [SetExchangeTosForgottenOp](#setexchangetosforgottenop)
     89 * [GetExchangeTosOp](#getexchangetosop)
     90 * [GetDepositWireTypesOp](#getdepositwiretypesop)
     91 * [GetDepositWireTypesForCurrencyOp](#getdepositwiretypesforcurrencyop)
     92 * [GetExchangeDetailedInfoOp](#getexchangedetailedinfoop)
     93 * [GetExchangeEntryByUrlOp](#getexchangeentrybyurlop)
     94 * [GetExchangeResourcesOp](#getexchangeresourcesop)
     95 * [DeleteExchangeOp](#deleteexchangeop)
     96 * [GetCurrencySpecificationOp](#getcurrencyspecificationop)
     97 ###  Deposits
     98 * [GenerateDepositGroupTxIdOp](#generatedepositgrouptxidop)
     99 * [CreateDepositGroupOp](#createdepositgroupop)
    100 * [CheckDepositOp](#checkdepositop)
    101 ###  Backups
    102 * [ExportBackupRecoveryOp](#exportbackuprecoveryop)
    103 * [ImportBackupRecoveryOp](#importbackuprecoveryop)
    104 * [RunBackupCycleOp](#runbackupcycleop)
    105 * [ExportBackupOp](#exportbackupop)
    106 * [ExportDbToFileOp](#exportdbtofileop)
    107 * [ImportDbFromFileOp](#importdbfromfileop)
    108 * [AddBackupProviderOp](#addbackupproviderop)
    109 * [RemoveBackupProviderOp](#removebackupproviderop)
    110 * [GetBackupInfoOp](#getbackupinfoop)
    111 * [SetWalletDeviceIdOp](#setwalletdeviceidop)
    112 * [ListStoredBackupsOp](#liststoredbackupsop)
    113 * [CreateStoredBackupsOp](#createstoredbackupsop)
    114 * [RecoverStoredBackupsOp](#recoverstoredbackupsop)
    115 * [DeleteStoredBackupOp](#deletestoredbackupop)
    116 ###  Peer Payments
    117 * [CheckPeerPushDebitOp](#checkpeerpushdebitop)
    118 * [CheckPeerPushDebitV2Op](#checkpeerpushdebitv2op)
    119 * [InitiatePeerPushDebitOp](#initiatepeerpushdebitop)
    120 * [PreparePeerPushCreditOp](#preparepeerpushcreditop)
    121 * [ConfirmPeerPushCreditOp](#confirmpeerpushcreditop)
    122 * [CheckPeerPullCreditOp](#checkpeerpullcreditop)
    123 * [InitiatePeerPullCreditOp](#initiatepeerpullcreditop)
    124 * [PreparePeerPullDebitOp](#preparepeerpulldebitop)
    125 * [ConfirmPeerPullDebitOp](#confirmpeerpulldebitop)
    126 ###  Data Validation and Conversion
    127 * [ValidateIbanOp](#validateibanop)
    128 * [CanonicalizeBaseUrlOp](#canonicalizebaseurlop)
    129 * [GetQrCodesForPaytoOp](#getqrcodesforpaytoop)
    130 * [ConvertIbanAccountFieldToPaytoOp](#convertibanaccountfieldtopaytoop)
    131 * [ConvertIbanPaytoToAccountFieldOp](#convertibanpaytotoaccountfieldop)
    132 * [GetBankingChoicesForPaytoOp](#getbankingchoicesforpaytoop)
    133 ###  Database Management
    134 * [ExportDbOp](#exportdbop)
    135 * [ImportDbOp](#importdbop)
    136 * [ClearDbOp](#cleardbop)
    137 * [RecycleOp](#recycleop)
    138 ###  Testing and Debugging
    139 * [ApplyDevExperimentOp](#applydevexperimentop)
    140 * [RunIntegrationTestOp](#runintegrationtestop)
    141 * [RunIntegrationTestV2Op](#runintegrationtestv2op)
    142 * [TestCryptoOp](#testcryptoop)
    143 * [WithdrawTestBalanceOp](#withdrawtestbalanceop)
    144 * [WithdrawTestkudosOp](#withdrawtestkudosop)
    145 * [TestPayOp](#testpayop)
    146 * [GetActiveTasksOp](#getactivetasksop)
    147 * [GetPerformanceStatsOp](#getperformancestatsop)
    148 * [DumpCoinsOp](#dumpcoinsop)
    149 * [TestingSetTimetravelOp](#testingsettimetravelop)
    150 * [TestingWaitTransactionsFinalOp](#testingwaittransactionsfinalop)
    151 * [TestingWaitTasksDoneOp](#testingwaittasksdoneop)
    152 * [TestingWaitRefreshesFinalOp](#testingwaitrefreshesfinalop)
    153 * [TestingWaitTransactionStateOp](#testingwaittransactionstateop)
    154 * [TestingWaitExchangeStateOp](#testingwaitexchangestateop)
    155 * [TestingPingOp](#testingpingop)
    156 * [TestingGetReserveHistoryOp](#testinggetreservehistoryop)
    157 * [TestingResetAllRetriesOp](#testingresetallretriesop)
    158 * [TestingGetDenomStatsOp](#testinggetdenomstatsop)
    159 * [TestingRunFixupOp](#testingrunfixupop)
    160 * [TestingGetDiagnosticsOp](#testinggetdiagnosticsop)
    161 * [SetCoinSuspendedOp](#setcoinsuspendedop)
    162 * [ForceRefreshOp](#forcerefreshop)
    163 ## Operation Reference
    164 ### InitWalletOp
    165 ```typescript
    166 /**
    167  * Initialize wallet-core.
    168  *
    169  * Must be the first request made to wallet-core.
    170  */
    171 export type InitWalletOp = {
    172   op: WalletApiOperation.InitWallet;
    173   request: InitRequest;
    174   response: InitResponse;
    175 };
    176 // InitWallet = "initWallet"
    177 
    178 ```
    179 
    180 ### ShutdownOp
    181 ```typescript
    182 export type ShutdownOp = {
    183   op: WalletApiOperation.Shutdown;
    184   request: EmptyObject;
    185   response: EmptyObject;
    186 };
    187 // Shutdown = "shutdown"
    188 
    189 ```
    190 
    191 ### HintApplicationResumedOp
    192 ```typescript
    193 /**
    194  * Give wallet-core a kick and restart all pending tasks.
    195  * Useful when the host application gets suspended and resumed,
    196  * and active network requests might have stalled.
    197  */
    198 export type HintApplicationResumedOp = {
    199   op: WalletApiOperation.HintApplicationResumed;
    200   request: EmptyObject;
    201   response: EmptyObject;
    202 };
    203 // HintApplicationResumed = "hintApplicationResumed"
    204 
    205 ```
    206 
    207 ### SetWalletRunConfigOp
    208 ```typescript
    209 /**
    210  * Change the configuration of wallet-core.
    211  *
    212  * Currently an alias for the initWallet request.
    213  */
    214 export type SetWalletRunConfigOp = {
    215   op: WalletApiOperation.SetWalletRunConfig;
    216   request: InitRequest;
    217   response: InitResponse;
    218 };
    219 // SetWalletRunConfig = "setWalletRunConfig"
    220 
    221 ```
    222 
    223 ### GetVersionOp
    224 ```typescript
    225 export type GetVersionOp = {
    226   op: WalletApiOperation.GetVersion;
    227   request: EmptyObject;
    228   response: WalletCoreVersion;
    229 };
    230 // GetVersion = "getVersion"
    231 
    232 ```
    233 
    234 ### HintNetworkAvailabilityOp
    235 ```typescript
    236 export type HintNetworkAvailabilityOp = {
    237   op: WalletApiOperation.HintNetworkAvailability;
    238   request: HintNetworkAvailabilityRequest;
    239   response: EmptyObject;
    240 };
    241 // HintNetworkAvailability = "hintNetworkAvailability"
    242 
    243 ```
    244 ```typescript
    245 export interface HintNetworkAvailabilityRequest {
    246   isNetworkAvailable: boolean;
    247 }
    248 
    249 ```
    250 
    251 ### SetDonauOp
    252 ```typescript
    253 /**
    254  * Set the donation authority for this wallet.
    255  */
    256 export type SetDonauOp = {
    257   op: WalletApiOperation.SetDonau;
    258   request: SetDonauRequest;
    259   response: EmptyObject;
    260 };
    261 // SetDonau = "setDonau"
    262 
    263 ```
    264 ```typescript
    265 export interface SetDonauRequest {
    266   donauBaseUrl: string;
    267   taxPayerId: string;
    268 }
    269 
    270 ```
    271 
    272 ### GetDonauOp
    273 ```typescript
    274 /**
    275  * Get the currently configured donation authority for this
    276  * wallet.
    277  */
    278 export type GetDonauOp = {
    279   op: WalletApiOperation.GetDonau;
    280   request: EmptyObject;
    281   response: GetDonauResponse;
    282 };
    283 // GetDonau = "getDonau"
    284 
    285 ```
    286 ```typescript
    287 export interface GetDonauResponse {
    288   currentDonauInfo:
    289     | {
    290         donauBaseUrl: string;
    291         taxPayerId: string;
    292       }
    293     | undefined;
    294 }
    295 
    296 ```
    297 
    298 ### GetDonauStatementsOp
    299 ```typescript
    300 /**
    301  * Get a list of donation statements
    302  * for this wallet.
    303  * Both donation statements for the currently configured
    304  * donation authority as well as past configurations (if they exist)
    305  * are returned.
    306  */
    307 export type GetDonauStatementsOp = {
    308   op: WalletApiOperation.GetDonauStatements;
    309   request: GetDonauStatementsRequest;
    310   response: GetDonauStatementsResponse;
    311 };
    312 // GetDonauStatements = "getDonauStatements"
    313 
    314 ```
    315 ```typescript
    316 export interface GetDonauStatementsRequest {
    317   donauBaseUrl?: string;
    318 }
    319 
    320 ```
    321 ```typescript
    322 export interface GetDonauStatementsResponse {
    323   statements: DonauStatementItem[];
    324 }
    325 
    326 ```
    327 ```typescript
    328 export interface DonauStatementItem {
    329   total: AmountString;
    330   year: number;
    331   legalDomain: string;
    332   uri: string;
    333   donationStatementSig: EddsaSignatureString;
    334   donauPub: EddsaPublicKeyString;
    335 }
    336 
    337 ```
    338 
    339 ### AddContactOp
    340 ```typescript
    341 /**
    342  * add contact.
    343  */
    344 export type AddContactOp = {
    345   op: WalletApiOperation.AddContact;
    346   request: AddContactRequest;
    347   response: EmptyObject;
    348 };
    349 // AddContact = "addContact"
    350 
    351 ```
    352 ```typescript
    353 export interface AddContactRequest {
    354   contact: ContactEntry;
    355 }
    356 
    357 ```
    358 
    359 ### DeleteContactOp
    360 ```typescript
    361 /**
    362  * delete contact.
    363  */
    364 export type DeleteContactOp = {
    365   op: WalletApiOperation.DeleteContact;
    366   request: DeleteContactRequest;
    367   response: EmptyObject;
    368 };
    369 // DeleteContact = "deleteContact"
    370 
    371 ```
    372 ```typescript
    373 export interface DeleteContactRequest {
    374   contact: ContactEntry;
    375 }
    376 
    377 ```
    378 
    379 ### GetContactsOp
    380 ```typescript
    381 /**
    382  * Get contacts.
    383  */
    384 export type GetContactsOp = {
    385   op: WalletApiOperation.GetContacts;
    386   request: EmptyObject;
    387   response: ContactListResponse;
    388 };
    389 // GetContacts = "getContacts"
    390 
    391 ```
    392 ```typescript
    393 export interface ContactListResponse {
    394   contacts: ContactEntry[];
    395 }
    396 
    397 ```
    398 
    399 ### RefreshMailboxOp
    400 ```typescript
    401 /**
    402  * Refresh mailbox Op.
    403  */
    404 export type RefreshMailboxOp = {
    405   op: WalletApiOperation.RefreshMailbox;
    406   request: MailboxConfiguration;
    407   response: MailboxMessageRecord[];
    408 };
    409 // RefreshMailbox = "refreshMailbox"
    410 
    411 ```
    412 
    413 ### InitializeMailboxOp
    414 ```typescript
    415 /**
    416  * Initialize messages mailbox Op.
    417  */
    418 export type InitializeMailboxOp = {
    419   op: WalletApiOperation.InitializeMailbox;
    420   request: string;
    421   response: MailboxConfiguration;
    422 };
    423 // InitializeMailbox = "initializeMailbox"
    424 
    425 ```
    426 
    427 ### GetMailboxOp
    428 ```typescript
    429 /**
    430  * Get messages mailbox Op.
    431  */
    432 export type GetMailboxOp = {
    433   op: WalletApiOperation.GetMailbox;
    434   request: string;
    435   response: MailboxConfiguration | undefined;
    436 };
    437 // GetMailbox = "getMailbox"
    438 
    439 ```
    440 
    441 ### GetMailboxMessagesOp
    442 ```typescript
    443 /**
    444  * Get Messages Op.
    445  */
    446 export type GetMailboxMessagesOp = {
    447   op: WalletApiOperation.GetMailboxMessages;
    448   request: EmptyObject;
    449   response: MailboxMessagesResponse;
    450 };
    451 // GetMailboxMessages = "getMailboxMessage"
    452 
    453 ```
    454 ```typescript
    455 export interface MailboxMessagesResponse {
    456   messages: MailboxMessageRecord[];
    457 }
    458 
    459 ```
    460 
    461 ### DeleteMailboxMessageOp
    462 ```typescript
    463 /**
    464  * delete message.
    465  */
    466 export type DeleteMailboxMessageOp = {
    467   op: WalletApiOperation.DeleteMailboxMessage;
    468   request: DeleteMailboxMessageRequest;
    469   response: EmptyObject;
    470 };
    471 // DeleteMailboxMessage = "deleteMailboxMessage"
    472 
    473 ```
    474 ```typescript
    475 export interface DeleteMailboxMessageRequest {
    476   message: MailboxMessageRecord;
    477 }
    478 
    479 ```
    480 
    481 ### AddMailboxMessageOp
    482 ```typescript
    483 /**
    484  * add message.
    485  */
    486 export type AddMailboxMessageOp = {
    487   op: WalletApiOperation.AddMailboxMessage;
    488   request: AddMailboxMessageRequest;
    489   response: EmptyObject;
    490 };
    491 // AddMailboxMessage = "addMailboxMessage"
    492 
    493 ```
    494 ```typescript
    495 export interface AddMailboxMessageRequest {
    496   message: MailboxMessageRecord;
    497 }
    498 
    499 ```
    500 
    501 ### SendTalerUriMailboxMessageOp
    502 ```typescript
    503 /**
    504  * send message.
    505  */
    506 export type SendTalerUriMailboxMessageOp = {
    507   op: WalletApiOperation.SendTalerUriMailboxMessage;
    508   request: SendTalerUriMailboxMessageRequest;
    509   response: EmptyObject;
    510 };
    511 // SendTalerUriMailboxMessage = "sendTalerUriMailboxMessage"
    512 
    513 ```
    514 ```typescript
    515 export interface SendTalerUriMailboxMessageRequest {
    516   contact: ContactEntry;
    517   talerUri: string;
    518 }
    519 
    520 ```
    521 
    522 ### GetBalancesOp
    523 ```typescript
    524 /**
    525  * Get current wallet balance.
    526  */
    527 export type GetBalancesOp = {
    528   op: WalletApiOperation.GetBalances;
    529   request: EmptyObject;
    530   response: BalancesResponse;
    531 };
    532 // GetBalances = "getBalances"
    533 
    534 ```
    535 ```typescript
    536 /**
    537  * Response to a getBalances request.
    538  */
    539 export interface BalancesResponse {
    540   /** Electronic cash balances, per currency scope. */
    541   balances: WalletBalance[];
    542   donauSummary?: DonauSummaryItem[];
    543 }
    544 
    545 ```
    546 ```typescript
    547 export interface WalletBalance {
    548   scopeInfo: ScopeInfo;
    549   available: AmountString;
    550   pendingIncoming: AmountString;
    551   pendingOutgoing: AmountString;
    552   flags: BalanceFlag[];
    553   /**
    554    * Available URLs for pages that list
    555    * where money in this scope can be spent.
    556    */
    557   shoppingUrls?: string[];
    558   /**
    559    * Are p2p payments disabled for this scope?
    560    */
    561   disablePeerPayments?: boolean;
    562   /**
    563    * Are wallet deposits enabled for this scope?
    564    */
    565   disableDirectDeposits?: boolean;
    566 }
    567 
    568 ```
    569 ```typescript
    570 export declare enum BalanceFlag {
    571   IncomingKyc = "incoming-kyc",
    572   IncomingAml = "incoming-aml",
    573   IncomingConfirmation = "incoming-confirmation",
    574   OutgoingKyc = "outgoing-kyc",
    575 }
    576 
    577 ```
    578 ```typescript
    579 export interface DonauSummaryItem {
    580   /** Base URL of the donau service. */
    581   donauBaseUrl: string;
    582   /** Legal domain of the donau service (if available). */
    583   legalDomain?: string;
    584   /** Year of the donation(s). */
    585   year: number;
    586   /**
    587    * Sum of donation receipts we received from merchants in the
    588    * applicable year.
    589    */
    590   amountReceiptsAvailable: AmountString;
    591   /**
    592    * Sum of donation receipts that were already submitted
    593    * to the donau in the applicable year.
    594    */
    595   amountReceiptsSubmitted: AmountString;
    596   /**
    597    * Amount of the latest available statement. Missing if no statement
    598    * was requested yet.
    599    */
    600   amountStatement?: AmountString;
    601 }
    602 
    603 ```
    604 
    605 ### GetBalancesDetailOp
    606 ```typescript
    607 export type GetBalancesDetailOp = {
    608   op: WalletApiOperation.GetBalanceDetail;
    609   request: GetBalanceDetailRequest;
    610   response: PaymentBalanceDetails;
    611 };
    612 // GetBalanceDetail = "getBalanceDetail"
    613 
    614 ```
    615 ```typescript
    616 export interface GetBalanceDetailRequest {
    617   currency: string;
    618 }
    619 
    620 ```
    621 ```typescript
    622 export interface PaymentBalanceDetails {
    623   /**
    624    * Balance of type "available" (see balance.ts for definition).
    625    */
    626   balanceAvailable: AmountJson;
    627   /**
    628    * Balance of type "material" (see balance.ts for definition).
    629    */
    630   balanceMaterial: AmountJson;
    631   /**
    632    * Balance of type "age-acceptable" (see balance.ts for definition).
    633    */
    634   balanceAgeAcceptable: AmountJson;
    635   /**
    636    * Balance of type "receiver-acceptable" (see balance.ts for definition).
    637    *
    638    * @deprecated (2025-12-05) use balanceReceiver[...]Acceptable instead.
    639    */
    640   balanceReceiverAcceptable: AmountJson;
    641   /**
    642    * Balance of type "receiver-exchange-url-acceptable" (see balance.ts for definition).
    643    */
    644   balanceReceiverExchangeUrlAcceptable: AmountJson;
    645   /**
    646    * Balance of type "receiver-exchange-pub-acceptable" (see balance.ts for definition).
    647    */
    648   balanceReceiverExchangePubAcceptable: AmountJson;
    649   /**
    650    * Balance of type "receiver-auditor-url-acceptable" (see balance.ts for definition).
    651    */
    652   balanceReceiverAuditorUrlAcceptable: AmountJson;
    653   /**
    654    * Balance of type "receiver-depositable" (see balance.ts for definition).
    655    */
    656   balanceReceiverDepositable: AmountJson;
    657   /**
    658    * Balance that's depositable with the exchange.
    659    * This balance is reduced by the exchange's debit restrictions
    660    * and wire fee configuration.
    661    */
    662   balanceExchangeDepositable: AmountJson;
    663   /**
    664    * Estimated maximum amount that the wallet could pay for, under the assumption
    665    * that the merchant pays absolutely no fees.
    666    */
    667   maxMerchantEffectiveDepositAmount: AmountJson;
    668 }
    669 
    670 ```
    671 ```typescript
    672 /**
    673  * Non-negative financial amount.  Fractional values are expressed as multiples
    674  * of 1e-8.
    675  */
    676 export interface AmountJson {
    677   /**
    678    * Value, must be an integer.
    679    */
    680   readonly value: number;
    681   /**
    682    * Fraction, must be an integer.  Represent 1/1e8 of a unit.
    683    */
    684   readonly fraction: number;
    685   /**
    686    * Currency of the amount.
    687    */
    688   readonly currency: string;
    689 }
    690 
    691 ```
    692 
    693 ### ConvertDepositAmountOp
    694 ```typescript
    695 export type ConvertDepositAmountOp = {
    696   op: WalletApiOperation.ConvertDepositAmount;
    697   request: ConvertAmountRequest;
    698   response: AmountResponse;
    699 };
    700 // ConvertDepositAmount = "convertDepositAmount"
    701 
    702 ```
    703 ```typescript
    704 export interface ConvertAmountRequest {
    705   amount: AmountString;
    706   type: TransactionAmountMode;
    707   depositPaytoUri: PaytoString;
    708 }
    709 
    710 ```
    711 ```typescript
    712 /**
    713  * How the amount should be interpreted in a transaction
    714  * Effective = how the balance is change
    715  * Raw = effective amount without fee
    716  *
    717  * Depending on the transaction, raw can be higher than effective
    718  */
    719 export declare enum TransactionAmountMode {
    720   Effective = "effective",
    721   Raw = "raw",
    722 }
    723 
    724 ```
    725 ```typescript
    726 export interface AmountResponse {
    727   effectiveAmount: AmountString;
    728   rawAmount: AmountString;
    729 }
    730 
    731 ```
    732 
    733 ### GetMaxDepositAmountOp
    734 ```typescript
    735 export type GetMaxDepositAmountOp = {
    736   op: WalletApiOperation.GetMaxDepositAmount;
    737   request: GetMaxDepositAmountRequest;
    738   response: GetMaxDepositAmountResponse;
    739 };
    740 // GetMaxDepositAmount = "getMaxDepositAmount"
    741 
    742 ```
    743 ```typescript
    744 export interface GetMaxDepositAmountRequest {
    745   /**
    746    * Currency to deposit.
    747    */
    748   currency: string;
    749   /**
    750    * Target bank account to deposit into.
    751    */
    752   depositPaytoUri?: string;
    753   /**
    754    * Restrict the deposit to a certain scope.
    755    */
    756   restrictScope?: ScopeInfo;
    757 }
    758 
    759 ```
    760 ```typescript
    761 export interface GetMaxDepositAmountResponse {
    762   effectiveAmount: AmountString;
    763   rawAmount: AmountString;
    764   /**
    765    * Account restrictions that affect the max deposit amount.
    766    */
    767   depositRestrictions?: {
    768     [exchangeBaseUrl: string]: {
    769       [paytoUri: string]: AccountRestriction[];
    770     };
    771   };
    772 }
    773 
    774 ```
    775 
    776 ### GetMaxPeerPushDebitAmountOp
    777 ```typescript
    778 export type GetMaxPeerPushDebitAmountOp = {
    779   op: WalletApiOperation.GetMaxPeerPushDebitAmount;
    780   request: GetMaxPeerPushDebitAmountRequest;
    781   response: GetMaxPeerPushDebitAmountResponse;
    782 };
    783 // GetMaxPeerPushDebitAmount = "getMaxPeerPushDebitAmount"
    784 
    785 ```
    786 ```typescript
    787 export interface GetMaxPeerPushDebitAmountRequest {
    788   currency: string;
    789   /**
    790    * Preferred exchange to use for the p2p payment.
    791    */
    792   exchangeBaseUrl?: string;
    793   restrictScope?: ScopeInfo;
    794 }
    795 
    796 ```
    797 ```typescript
    798 export interface GetMaxPeerPushDebitAmountResponse {
    799   effectiveAmount: AmountString;
    800   rawAmount: AmountString;
    801   exchangeBaseUrl?: string;
    802 }
    803 
    804 ```
    805 
    806 ### GetTransactionsOp
    807 ```typescript
    808 /**
    809  * Get transactions.
    810  */
    811 export type GetTransactionsOp = {
    812   op: WalletApiOperation.GetTransactions;
    813   request: TransactionsRequest;
    814   response: TransactionsResponse;
    815 };
    816 // GetTransactions = "getTransactions"
    817 
    818 ```
    819 ```typescript
    820 export interface TransactionsRequest {
    821   /**
    822    * return only transactions in the given currency
    823    *
    824    * it will be removed in next release
    825    *
    826    * @deprecated use scopeInfo
    827    */
    828   currency?: string;
    829   /**
    830    * return only transactions in the given scopeInfo
    831    */
    832   scopeInfo?: ScopeInfo;
    833   /**
    834    * if present, results will be limited to transactions related to the given search string
    835    */
    836   search?: string;
    837   /**
    838    * Sort order of the transaction items.
    839    * By default, items are sorted ascending by their
    840    * main timestamp.
    841    *
    842    * ascending: ascending by timestamp, but pending transactions first
    843    * descending: ascending by timestamp, but pending transactions first
    844    * stable-ascending: ascending by timestamp, with pending transactions amidst other transactions
    845    *    (stable in the sense of: pending transactions don't jump around)
    846    */
    847   sort?: "ascending" | "descending" | "stable-ascending";
    848   /**
    849    * If true, include all refreshes in the transactions list.
    850    */
    851   includeRefreshes?: boolean;
    852   filterByState?: TransactionStateFilter;
    853 }
    854 
    855 ```
    856 
    857 ### GetTransactionsV2Op
    858 ```typescript
    859 export type GetTransactionsV2Op = {
    860   op: WalletApiOperation.GetTransactionsV2;
    861   request: GetTransactionsV2Request;
    862   response: TransactionsResponse;
    863 };
    864 // GetTransactionsV2 = "getTransactionsV2"
    865 
    866 ```
    867 ```typescript
    868 export interface GetTransactionsV2Request {
    869   /**
    870    * Return only transactions in the given currency.
    871    */
    872   currency?: string;
    873   /**
    874    * Return only transactions in the given scopeInfo
    875    */
    876   scopeInfo?: ScopeInfo;
    877   /**
    878    * If true, include all refreshes in the transactions list.
    879    */
    880   includeRefreshes?: boolean;
    881   /**
    882    * If true, include transactions that would usually be filtered out.
    883    * Implies includeRefreshes.
    884    */
    885   includeAll?: boolean;
    886   /**
    887    * Only return transactions before/after this offset.
    888    */
    889   offsetTransactionId?: TransactionIdStr;
    890   /**
    891    * Only return transactions before/after the transaction with this
    892    * timestamp.
    893    *
    894    * Used as a fallback if the offsetTransactionId was deleted.
    895    */
    896   offsetTimestamp?: TalerPreciseTimestamp;
    897   /**
    898    * Number of transactions to return.
    899    *
    900    * When the limit is positive, results are returned
    901    * in ascending order of their timestamp.  If no offset is specified,
    902    * the result list begins with the first transaction.
    903    * If an offset is specified, transactions after the offset are returned.
    904    *
    905    * When the limit is negative, results are returned
    906    * in descending order of their timestamp.  If no offset is specified,
    907    * the result list begins with with the last transaction.
    908    * If an offset is specified, transactions before the offset are returned.
    909    */
    910   limit?: number;
    911   /**
    912    * Filter transactions by their state / state category.
    913    *
    914    * If not specified, all transactions are returned.
    915    *
    916    * final: Transactions in any final state
    917    * nonfinal: Transactions in any state but the final states
    918    * nonfinal-dialog: nonfinal transactions that require confirmation / some
    919    *   choice by the user
    920    * nonfinal-approved: nonfinal transactions that need no further user approval
    921    * done: Transactions in the "done" major state
    922    */
    923   filterByState?:
    924     | "final"
    925     | "nonfinal"
    926     | "done"
    927     | "nonfinal-approved"
    928     | "nonfinal-dialog";
    929 }
    930 
    931 ```
    932 
    933 ### ListAssociatedRefreshesOp
    934 ```typescript
    935 /**
    936  * List refresh transactions associated with another transaction.
    937  */
    938 export type ListAssociatedRefreshesOp = {
    939   op: WalletApiOperation.ListAssociatedRefreshes;
    940   request: ListAssociatedRefreshesRequest;
    941   response: ListAssociatedRefreshesResponse;
    942 };
    943 // ListAssociatedRefreshes = "listAssociatedRefreshes"
    944 
    945 ```
    946 ```typescript
    947 export interface ListAssociatedRefreshesRequest {
    948   transactionId: string;
    949 }
    950 
    951 ```
    952 ```typescript
    953 export interface ListAssociatedRefreshesResponse {
    954   transactionIds: string[];
    955 }
    956 
    957 ```
    958 
    959 ### TestingGetSampleTransactionsOp
    960 ```typescript
    961 /**
    962  * Get sample transactions.
    963  */
    964 export type TestingGetSampleTransactionsOp = {
    965   op: WalletApiOperation.TestingGetSampleTransactions;
    966   request: EmptyObject;
    967   response: TransactionsResponse;
    968 };
    969 // TestingGetSampleTransactions = "testingGetSampleTransactions"
    970 
    971 ```
    972 
    973 ### GetTransactionByIdOp
    974 ```typescript
    975 export type GetTransactionByIdOp = {
    976   op: WalletApiOperation.GetTransactionById;
    977   request: TransactionByIdRequest;
    978   response: Transaction;
    979 };
    980 // GetTransactionById = "getTransactionById"
    981 
    982 ```
    983 ```typescript
    984 export interface TransactionByIdRequest {
    985   transactionId: string;
    986   /**
    987    * If set to true, report the full contract terms in the response
    988    * if the transaction has them.
    989    */
    990   includeContractTerms?: boolean;
    991 }
    992 
    993 ```
    994 
    995 ### RetryPendingNowOp
    996 ```typescript
    997 export type RetryPendingNowOp = {
    998   op: WalletApiOperation.RetryPendingNow;
    999   request: EmptyObject;
   1000   response: EmptyObject;
   1001 };
   1002 // RetryPendingNow = "retryPendingNow"
   1003 
   1004 ```
   1005 
   1006 ### DeleteTransactionOp
   1007 ```typescript
   1008 /**
   1009  * Delete a transaction locally in the wallet.
   1010  */
   1011 export type DeleteTransactionOp = {
   1012   op: WalletApiOperation.DeleteTransaction;
   1013   request: DeleteTransactionRequest;
   1014   response: EmptyObject;
   1015 };
   1016 // DeleteTransaction = "deleteTransaction"
   1017 
   1018 ```
   1019 ```typescript
   1020 export interface DeleteTransactionRequest {
   1021   transactionId: TransactionIdStr;
   1022 }
   1023 
   1024 ```
   1025 
   1026 ### RetryTransactionOp
   1027 ```typescript
   1028 /**
   1029  * Immediately retry a transaction.
   1030  */
   1031 export type RetryTransactionOp = {
   1032   op: WalletApiOperation.RetryTransaction;
   1033   request: RetryTransactionRequest;
   1034   response: EmptyObject;
   1035 };
   1036 // RetryTransaction = "retryTransaction"
   1037 
   1038 ```
   1039 ```typescript
   1040 export interface RetryTransactionRequest {
   1041   transactionId: TransactionIdStr;
   1042 }
   1043 
   1044 ```
   1045 
   1046 ### AbortTransactionOp
   1047 ```typescript
   1048 /**
   1049  * Abort a transaction
   1050  *
   1051  * For payment transactions, it puts the payment into an "aborting" state.
   1052  */
   1053 export type AbortTransactionOp = {
   1054   op: WalletApiOperation.AbortTransaction;
   1055   request: AbortTransactionRequest;
   1056   response: EmptyObject;
   1057 };
   1058 // AbortTransaction = "abortTransaction"
   1059 
   1060 ```
   1061 
   1062 ### FailTransactionOp
   1063 ```typescript
   1064 /**
   1065  * Cancel aborting a transaction
   1066  *
   1067  * For payment transactions, it puts the payment into an "aborting" state.
   1068  */
   1069 export type FailTransactionOp = {
   1070   op: WalletApiOperation.FailTransaction;
   1071   request: FailTransactionRequest;
   1072   response: EmptyObject;
   1073 };
   1074 // FailTransaction = "failTransaction"
   1075 
   1076 ```
   1077 ```typescript
   1078 export interface FailTransactionRequest {
   1079   transactionId: TransactionIdStr;
   1080 }
   1081 
   1082 ```
   1083 
   1084 ### SuspendTransactionOp
   1085 ```typescript
   1086 /**
   1087  * Suspend a transaction
   1088  */
   1089 export type SuspendTransactionOp = {
   1090   op: WalletApiOperation.SuspendTransaction;
   1091   request: AbortTransactionRequest;
   1092   response: EmptyObject;
   1093 };
   1094 // SuspendTransaction = "suspendTransaction"
   1095 
   1096 ```
   1097 
   1098 ### ResumeTransactionOp
   1099 ```typescript
   1100 /**
   1101  * Resume a transaction
   1102  */
   1103 export type ResumeTransactionOp = {
   1104   op: WalletApiOperation.ResumeTransaction;
   1105   request: AbortTransactionRequest;
   1106   response: EmptyObject;
   1107 };
   1108 // ResumeTransaction = "resumeTransaction"
   1109 
   1110 ```
   1111 
   1112 ### GetWithdrawalDetailsForAmountOp
   1113 ```typescript
   1114 /**
   1115  * Get details for withdrawing a particular amount (manual withdrawal).
   1116  */
   1117 export type GetWithdrawalDetailsForAmountOp = {
   1118   op: WalletApiOperation.GetWithdrawalDetailsForAmount;
   1119   request: GetWithdrawalDetailsForAmountRequest;
   1120   response: WithdrawalDetailsForAmount;
   1121 };
   1122 // GetWithdrawalDetailsForAmount = "getWithdrawalDetailsForAmount"
   1123 
   1124 ```
   1125 ```typescript
   1126 export interface GetWithdrawalDetailsForAmountRequest {
   1127   exchangeBaseUrl?: string;
   1128   /**
   1129    * Specify currency scope for the withdrawal.
   1130    *
   1131    * May only be used when exchangeBaseUrl is not specified.
   1132    */
   1133   restrictScope?: ScopeInfo;
   1134   amount: AmountString;
   1135   restrictAge?: number;
   1136   /**
   1137    * ID provided by the client to cancel the request.
   1138    *
   1139    * If the same request is made again with the same clientCancellationId,
   1140    * all previous requests are cancelled.
   1141    *
   1142    * The cancelled request will receive an error response with
   1143    * an error code that indicates the cancellation.
   1144    *
   1145    * The cancellation is best-effort, responses might still arrive.
   1146    */
   1147   clientCancellationId?: string;
   1148 }
   1149 
   1150 ```
   1151 ```typescript
   1152 export interface WithdrawalDetailsForAmount {
   1153   /**
   1154    * Exchange base URL for the withdrawal.
   1155    */
   1156   exchangeBaseUrl: string;
   1157   /**
   1158    * Amount that the user will transfer to the exchange.
   1159    */
   1160   amountRaw: AmountString;
   1161   /**
   1162    * Amount that will be added to the user's wallet balance.
   1163    */
   1164   amountEffective: AmountString;
   1165   /**
   1166    * Number of coins that would be used for withdrawal.
   1167    *
   1168    * The UIs should warn if this number is too high (roughly at >100).
   1169    */
   1170   numCoins: number;
   1171   /**
   1172    * Ways to pay the exchange, including accounts that require currency conversion.
   1173    */
   1174   withdrawalAccountsList: WithdrawalExchangeAccountDetails[];
   1175   /**
   1176    * If the exchange supports age-restricted coins it will return
   1177    * the array of ages.
   1178    */
   1179   ageRestrictionOptions?: number[];
   1180   /**
   1181    * Scope info of the currency withdrawn.
   1182    */
   1183   scopeInfo: ScopeInfo;
   1184   /**
   1185    * KYC soft limit.
   1186    *
   1187    * Withdrawals over that amount will require KYC.
   1188    */
   1189   kycSoftLimit?: AmountString;
   1190   /**
   1191    * KYC soft limits.
   1192    *
   1193    * Withdrawals over that amount will be denied.
   1194    */
   1195   kycHardLimit?: AmountString;
   1196   /**
   1197    * Ways to pay the exchange.
   1198    *
   1199    * @deprecated in favor of withdrawalAccountsList
   1200    */
   1201   paytoUris: string[];
   1202   /**
   1203    * Did the user accept the current version of the exchange's
   1204    * terms of service?
   1205    *
   1206    * @deprecated the client should query the exchange entry instead
   1207    */
   1208   tosAccepted: boolean;
   1209 }
   1210 
   1211 ```
   1212 
   1213 ### GetWithdrawalDetailsForUriOp
   1214 ```typescript
   1215 /**
   1216  * Get details for withdrawing via a particular taler:// URI.
   1217  *
   1218  * @deprecated Use {@link PrepareBankIntegratedWithdrawalOp} instead
   1219  */
   1220 export type GetWithdrawalDetailsForUriOp = {
   1221   op: WalletApiOperation.GetWithdrawalDetailsForUri;
   1222   request: GetWithdrawalDetailsForUriRequest;
   1223   response: WithdrawUriInfoResponse;
   1224 };
   1225 // GetWithdrawalDetailsForUri = "getWithdrawalDetailsForUri"
   1226 
   1227 ```
   1228 ```typescript
   1229 export interface GetWithdrawalDetailsForUriRequest {
   1230   talerWithdrawUri: string;
   1231   /**
   1232    * @deprecated not used
   1233    */
   1234   restrictAge?: number;
   1235 }
   1236 
   1237 ```
   1238 
   1239 ### PrepareBankIntegratedWithdrawalOp
   1240 ```typescript
   1241 /**
   1242  * Prepare a bank-integrated withdrawal operation.
   1243  */
   1244 export type PrepareBankIntegratedWithdrawalOp = {
   1245   op: WalletApiOperation.PrepareBankIntegratedWithdrawal;
   1246   request: PrepareBankIntegratedWithdrawalRequest;
   1247   response: PrepareBankIntegratedWithdrawalResponse;
   1248 };
   1249 // PrepareBankIntegratedWithdrawal = "prepareBankIntegratedWithdrawal"
   1250 
   1251 ```
   1252 ```typescript
   1253 export interface PrepareBankIntegratedWithdrawalRequest {
   1254   talerWithdrawUri: string;
   1255 }
   1256 
   1257 ```
   1258 ```typescript
   1259 export interface PrepareBankIntegratedWithdrawalResponse {
   1260   transactionId: TransactionIdStr;
   1261   info: WithdrawUriInfoResponse;
   1262 }
   1263 
   1264 ```
   1265 
   1266 ### ConfirmWithdrawalOp
   1267 ```typescript
   1268 /**
   1269  * Confirm a withdrawal transaction.
   1270  */
   1271 export type ConfirmWithdrawalOp = {
   1272   op: WalletApiOperation.ConfirmWithdrawal;
   1273   request: ConfirmWithdrawalRequest;
   1274   response: AcceptWithdrawalResponse;
   1275 };
   1276 // ConfirmWithdrawal = "confirmWithdrawal"
   1277 
   1278 ```
   1279 ```typescript
   1280 export interface ConfirmWithdrawalRequest {
   1281   transactionId: string;
   1282   exchangeBaseUrl: string;
   1283   amount: AmountString | undefined;
   1284   forcedDenomSel?: ForcedDenomSel;
   1285   restrictAge?: number;
   1286 }
   1287 
   1288 ```
   1289 
   1290 ### AcceptBankIntegratedWithdrawalOp
   1291 ```typescript
   1292 /**
   1293  * Accept a bank-integrated withdrawal.
   1294  *
   1295  * @deprecated in favor of prepare/confirm withdrawal.
   1296  */
   1297 export type AcceptBankIntegratedWithdrawalOp = {
   1298   op: WalletApiOperation.AcceptBankIntegratedWithdrawal;
   1299   request: AcceptBankIntegratedWithdrawalRequest;
   1300   response: AcceptWithdrawalResponse;
   1301 };
   1302 // AcceptBankIntegratedWithdrawal = "acceptBankIntegratedWithdrawal"
   1303 
   1304 ```
   1305 ```typescript
   1306 export interface AcceptBankIntegratedWithdrawalRequest {
   1307   talerWithdrawUri: string;
   1308   exchangeBaseUrl: string;
   1309   forcedDenomSel?: ForcedDenomSel;
   1310   /**
   1311    * Amount to withdraw.
   1312    * If the bank's withdrawal operation uses a fixed amount,
   1313    * this field must either be left undefined or its value must match
   1314    * the amount from the withdrawal operation.
   1315    */
   1316   amount?: AmountString;
   1317   restrictAge?: number;
   1318 }
   1319 
   1320 ```
   1321 
   1322 ### AcceptManualWithdrawalOp
   1323 ```typescript
   1324 /**
   1325  * Create a manual withdrawal.
   1326  */
   1327 export type AcceptManualWithdrawalOp = {
   1328   op: WalletApiOperation.AcceptManualWithdrawal;
   1329   request: AcceptManualWithdrawalRequest;
   1330   response: AcceptManualWithdrawalResult;
   1331 };
   1332 // AcceptManualWithdrawal = "acceptManualWithdrawal"
   1333 
   1334 ```
   1335 ```typescript
   1336 export interface AcceptManualWithdrawalRequest {
   1337   exchangeBaseUrl: string;
   1338   amount: AmountString;
   1339   restrictAge?: number;
   1340   /**
   1341    * Instead of generating a fresh, random reserve key pair,
   1342    * use the provided reserve private key.
   1343    *
   1344    * Use with caution.  Usage of this field may be restricted
   1345    * to developer mode.
   1346    */
   1347   forceReservePriv?: EddsaPrivateKeyString;
   1348 }
   1349 
   1350 ```
   1351 ```typescript
   1352 export interface AcceptManualWithdrawalResult {
   1353   /**
   1354    * Payto URIs that can be used to fund the withdrawal.
   1355    *
   1356    * @deprecated in favor of withdrawalAccountsList
   1357    */
   1358   exchangePaytoUris: string[];
   1359   /**
   1360    * Public key of the newly created reserve.
   1361    */
   1362   reservePub: string;
   1363   withdrawalAccountsList: WithdrawalExchangeAccountDetails[];
   1364   transactionId: TransactionIdStr;
   1365 }
   1366 
   1367 ```
   1368 
   1369 ### PreparePayForUriOp
   1370 ```typescript
   1371 /**
   1372  * Prepare to make a payment based on a taler://pay/ URI.
   1373  */
   1374 export type PreparePayForUriOp = {
   1375   op: WalletApiOperation.PreparePayForUri;
   1376   request: PreparePayRequest;
   1377   response: PreparePayResult;
   1378 };
   1379 // PreparePayForUri = "preparePayForUri"
   1380 
   1381 ```
   1382 ```typescript
   1383 export interface PreparePayRequest {
   1384   talerPayUri: string;
   1385 }
   1386 
   1387 ```
   1388 
   1389 ### GetChoicesForPaymentOp
   1390 ```typescript
   1391 /**
   1392  * Get a list of contract v1 choices for a given payment tx
   1393  * in dialog(confirm) state, as well as additional information
   1394  * on whether they can be used to pay the order or not, depending
   1395  * on the funds available on the wallet, or whether a specific
   1396  * choice should be paid automatically without user confirmation,
   1397  * based on user configuration or the type of payment requested.
   1398  *
   1399  * This request will fail if contract choices are not yet
   1400  * available, in which case the `choicesAvailable' field of the tx
   1401  * will be undefined or set to false.
   1402  */
   1403 export type GetChoicesForPaymentOp = {
   1404   op: WalletApiOperation.GetChoicesForPayment;
   1405   request: GetChoicesForPaymentRequest;
   1406   response: GetChoicesForPaymentResult;
   1407 };
   1408 // GetChoicesForPayment = "getChoicesForPayment"
   1409 
   1410 ```
   1411 ```typescript
   1412 export interface GetChoicesForPaymentRequest {
   1413   transactionId: string;
   1414   forcedCoinSel?: ForcedCoinSel;
   1415 }
   1416 
   1417 ```
   1418 ```typescript
   1419 export type GetChoicesForPaymentResult = {
   1420   /**
   1421    * Details for all choices in the contract.
   1422    *
   1423    * The index in this array corresponds to the choice
   1424    * index in the original contract v1. For contract v0
   1425    * orders, it will only contain a single choice with no
   1426    * inputs/outputs.
   1427    */
   1428   choices: ChoiceSelectionDetail[];
   1429   /**
   1430    * Index of the choice in @e choices array to present
   1431    * to the user as default.
   1432    *
   1433    * Won´t be set if no default selection is configured
   1434    * or no choice is payable, otherwise, it will always
   1435    * be 0 for v0 orders.
   1436    */
   1437   defaultChoiceIndex?: number;
   1438   /**
   1439    * Whether the choice referenced by @e automaticExecutableIndex
   1440    * should be confirmed automatically without
   1441    * user interaction.
   1442    *
   1443    * If true, the wallet should call `confirmPay'
   1444    * immediately afterwards, if false, the user
   1445    * should be first prompted to select and
   1446    * confirm a choice. Undefined when no choices
   1447    * are payable.
   1448    */
   1449   automaticExecution?: boolean;
   1450   /**
   1451    * Index of the choice that would be set to automatically
   1452    * execute if the choice was payable. When @e automaticExecution
   1453    * is set to true, the payment should be confirmed with this
   1454    * choice index without user interaction.
   1455    */
   1456   automaticExecutableIndex?: number;
   1457   /**
   1458    * Data extracted from the contract terms that
   1459    * is relevant for payment processing in the wallet.
   1460    */
   1461   contractTerms: MerchantContractTerms;
   1462 };
   1463 
   1464 ```
   1465 ```typescript
   1466 export type ChoiceSelectionDetail =
   1467   | ChoiceSelectionDetailPaymentPossible
   1468   | ChoiceSelectionDetailInsufficientBalance;
   1469 
   1470 ```
   1471 ```typescript
   1472 export interface ChoiceSelectionDetailPaymentPossible {
   1473   status: ChoiceSelectionDetailType.PaymentPossible;
   1474   amountRaw: AmountString;
   1475   amountEffective: AmountString;
   1476   tokenDetails?: PaymentTokenAvailabilityDetails;
   1477 }
   1478 
   1479 ```
   1480 ```typescript
   1481 export interface PaymentTokenAvailabilityDetails {
   1482   /**
   1483    * Number of tokens requested by the merchant.
   1484    */
   1485   tokensRequested: number;
   1486   /**
   1487    * Number of tokens available to use.
   1488    */
   1489   tokensAvailable: number;
   1490   /**
   1491    * Number of tokens for which the merchant is unexpected.
   1492    *
   1493    * Can be used to pay (i.e. with forced selection),
   1494    * but a warning should be displayed to the user.
   1495    */
   1496   tokensUnexpected: number;
   1497   /**
   1498    * Number of tokens for which the merchant is untrusted.
   1499    *
   1500    * Cannot be used to pay, so an error should be displayed.
   1501    */
   1502   tokensUntrusted: number;
   1503   perTokenFamily: {
   1504     [slug: string]: {
   1505       causeHint?: TokenAvailabilityHint;
   1506       requested: number;
   1507       available: number;
   1508       unexpected: number;
   1509       untrusted: number;
   1510     };
   1511   };
   1512 }
   1513 
   1514 ```
   1515 ```typescript
   1516 export declare enum TokenAvailabilityHint {
   1517   WalletTokensAvailableInsufficient = "wallet-tokens-available-insufficient",
   1518   MerchantUnexpected = "merchant-unexpected",
   1519   MerchantUntrusted = "merchant-untrusted",
   1520 }
   1521 
   1522 ```
   1523 ```typescript
   1524 export interface ChoiceSelectionDetailInsufficientBalance {
   1525   status: ChoiceSelectionDetailType.InsufficientBalance;
   1526   amountRaw: AmountString;
   1527   balanceDetails?: PaymentInsufficientBalanceDetails;
   1528   tokenDetails?: PaymentTokenAvailabilityDetails;
   1529 }
   1530 
   1531 ```
   1532 
   1533 ### SharePaymentOp
   1534 ```typescript
   1535 export type SharePaymentOp = {
   1536   op: WalletApiOperation.SharePayment;
   1537   request: SharePaymentRequest;
   1538   response: SharePaymentResult;
   1539 };
   1540 // SharePayment = "sharePayment"
   1541 
   1542 ```
   1543 ```typescript
   1544 export interface SharePaymentRequest {
   1545   merchantBaseUrl: string;
   1546   orderId: string;
   1547 }
   1548 
   1549 ```
   1550 ```typescript
   1551 export interface SharePaymentResult {
   1552   privatePayUri: string;
   1553 }
   1554 
   1555 ```
   1556 
   1557 ### CheckPayForTemplateOp
   1558 ```typescript
   1559 export type CheckPayForTemplateOp = {
   1560   op: WalletApiOperation.CheckPayForTemplate;
   1561   request: CheckPayTemplateRequest;
   1562   response: CheckPayTemplateReponse;
   1563 };
   1564 // CheckPayForTemplate = "checkPayForTemplate"
   1565 
   1566 ```
   1567 ```typescript
   1568 export interface CheckPayTemplateRequest {
   1569   talerPayTemplateUri: string;
   1570 }
   1571 
   1572 ```
   1573 ```typescript
   1574 export type CheckPayTemplateReponse = {
   1575   templateDetails: WalletTemplateDetails;
   1576   supportedCurrencies: string[];
   1577 };
   1578 
   1579 ```
   1580 ```typescript
   1581 export interface WalletTemplateDetails {
   1582   template_contract: TemplateContractDetails;
   1583   editable_defaults?: TemplateContractDetailsDefaults;
   1584 }
   1585 
   1586 ```
   1587 ```typescript
   1588 export interface TemplateContractDetails {
   1589   summary?: string;
   1590   currency?: string;
   1591   amount?: AmountString;
   1592   minimum_age: Integer;
   1593   pay_duration: RelativeTime;
   1594 }
   1595 
   1596 ```
   1597 ```typescript
   1598 export interface TemplateContractDetailsDefaults {
   1599   summary?: string;
   1600   currency?: string;
   1601   /**
   1602    * Amount *or* a plain currency string.
   1603    */
   1604   amount?: string;
   1605 }
   1606 
   1607 ```
   1608 
   1609 ### PreparePayForTemplateOp
   1610 ```typescript
   1611 /**
   1612  * Prepare to make a payment based on a taler://pay-template/ URI.
   1613  */
   1614 export type PreparePayForTemplateOp = {
   1615   op: WalletApiOperation.PreparePayForTemplate;
   1616   request: PreparePayTemplateRequest;
   1617   response: PreparePayResult;
   1618 };
   1619 // PreparePayForTemplate = "preparePayForTemplate"
   1620 
   1621 ```
   1622 ```typescript
   1623 export interface PreparePayTemplateRequest {
   1624   talerPayTemplateUri: string;
   1625   templateParams?: TemplateParams;
   1626 }
   1627 
   1628 ```
   1629 ```typescript
   1630 export type TemplateParams = {
   1631   amount?: string;
   1632   summary?: string;
   1633 };
   1634 
   1635 ```
   1636 
   1637 ### ConfirmPayOp
   1638 ```typescript
   1639 /**
   1640  * Confirm a payment that was previously prepared with
   1641  * {@link PreparePayForUriOp}
   1642  */
   1643 export type ConfirmPayOp = {
   1644   op: WalletApiOperation.ConfirmPay;
   1645   request: ConfirmPayRequest;
   1646   response: ConfirmPayResult;
   1647 };
   1648 // ConfirmPay = "confirmPay"
   1649 
   1650 ```
   1651 ```typescript
   1652 export interface ConfirmPayRequest {
   1653   transactionId: TransactionIdStr;
   1654   useDonau?: boolean;
   1655   sessionId?: string;
   1656   forcedCoinSel?: ForcedCoinSel;
   1657   /**
   1658    * Whether token selection should be forced
   1659    * e.g. use tokens with non-matching `expected_domains'
   1660    *
   1661    * Only applies to v1 orders.
   1662    */
   1663   forcedTokenSel?: boolean;
   1664   /**
   1665    * Only applies to v1 orders.
   1666    */
   1667   choiceIndex?: number;
   1668 }
   1669 
   1670 ```
   1671 ```typescript
   1672 export type ConfirmPayResult = ConfirmPayResultDone | ConfirmPayResultPending;
   1673 
   1674 ```
   1675 ```typescript
   1676 /**
   1677  * Result for confirmPay
   1678  */
   1679 export interface ConfirmPayResultDone {
   1680   type: ConfirmPayResultType.Done;
   1681   contractTerms: MerchantContractTermsV0;
   1682   transactionId: TransactionIdStr;
   1683 }
   1684 
   1685 ```
   1686 ```typescript
   1687 export interface ConfirmPayResultPending {
   1688   type: ConfirmPayResultType.Pending;
   1689   transactionId: TransactionIdStr;
   1690   lastError: TalerErrorDetail | undefined;
   1691 }
   1692 
   1693 ```
   1694 
   1695 ### StartRefundQueryForUriOp
   1696 ```typescript
   1697 /**
   1698  * Check for a refund based on a taler://refund URI.
   1699  */
   1700 export type StartRefundQueryForUriOp = {
   1701   op: WalletApiOperation.StartRefundQueryForUri;
   1702   request: PrepareRefundRequest;
   1703   response: StartRefundQueryForUriResponse;
   1704 };
   1705 // StartRefundQueryForUri = "startRefundQueryForUri"
   1706 
   1707 ```
   1708 ```typescript
   1709 export interface PrepareRefundRequest {
   1710   talerRefundUri: string;
   1711 }
   1712 
   1713 ```
   1714 ```typescript
   1715 export interface StartRefundQueryForUriResponse {
   1716   /**
   1717    * Transaction id of the *payment* where the refund query was started.
   1718    */
   1719   transactionId: TransactionIdStr;
   1720 }
   1721 
   1722 ```
   1723 
   1724 ### StartRefundQueryOp
   1725 ```typescript
   1726 export type StartRefundQueryOp = {
   1727   op: WalletApiOperation.StartRefundQuery;
   1728   request: StartRefundQueryRequest;
   1729   response: EmptyObject;
   1730 };
   1731 // StartRefundQuery = "startRefundQuery"
   1732 
   1733 ```
   1734 ```typescript
   1735 export interface StartRefundQueryRequest {
   1736   transactionId: TransactionIdStr;
   1737 }
   1738 
   1739 ```
   1740 
   1741 ### ListDiscountsOp
   1742 ```typescript
   1743 /**
   1744  * List discount tokens stored in the wallet. Listed tokens
   1745  * will be grouped based on token family details.
   1746  */
   1747 export type ListDiscountsOp = {
   1748   op: WalletApiOperation.ListDiscounts;
   1749   request: ListDiscountsRequest;
   1750   response: ListDiscountsResponse;
   1751 };
   1752 // ListDiscounts = "listDiscounts"
   1753 
   1754 ```
   1755 ```typescript
   1756 export interface ListDiscountsResponse {
   1757   discounts: DiscountListDetail[];
   1758 }
   1759 
   1760 ```
   1761 
   1762 ### DeleteDiscountOp
   1763 ```typescript
   1764 export type DeleteDiscountOp = {
   1765   op: WalletApiOperation.DeleteDiscount;
   1766   request: DeleteDiscountRequest;
   1767   response: EmptyObject;
   1768 };
   1769 // DeleteDiscount = "deleteDiscount"
   1770 
   1771 ```
   1772 ```typescript
   1773 export interface DeleteDiscountRequest {
   1774   /**
   1775    * Hash of token family info.
   1776    */
   1777   tokenFamilyHash: string;
   1778 }
   1779 
   1780 ```
   1781 
   1782 ### ListSubscriptionsOp
   1783 ```typescript
   1784 /**
   1785  * List subscription tokens stored in the wallet. Listed tokens
   1786  * will be grouped based on token family details.
   1787  */
   1788 export type ListSubscriptionsOp = {
   1789   op: WalletApiOperation.ListSubscriptions;
   1790   request: ListSubscriptionsRequest;
   1791   response: ListSubscriptionsResponse;
   1792 };
   1793 // ListSubscriptions = "listSubscriptions"
   1794 
   1795 ```
   1796 ```typescript
   1797 export interface ListSubscriptionsResponse {
   1798   subscriptions: SubscriptionListDetail[];
   1799 }
   1800 
   1801 ```
   1802 ```typescript
   1803 export type SubscriptionListDetail = Omit<
   1804   DiscountListDetail,
   1805   "tokensAvailable"
   1806 >;
   1807 
   1808 ```
   1809 
   1810 ### DeleteSubscriptionOp
   1811 ```typescript
   1812 export type DeleteSubscriptionOp = {
   1813   op: WalletApiOperation.DeleteSubscription;
   1814   request: DeleteSubscriptionRequest;
   1815   response: EmptyObject;
   1816 };
   1817 // DeleteSubscription = "deleteSubscription"
   1818 
   1819 ```
   1820 ```typescript
   1821 export interface DeleteSubscriptionRequest {
   1822   /**
   1823    * Hash of token family info.
   1824    */
   1825   tokenFamilyHash: string;
   1826 }
   1827 
   1828 ```
   1829 
   1830 ### ListGlobalCurrencyAuditorsOp
   1831 ```typescript
   1832 export type ListGlobalCurrencyAuditorsOp = {
   1833   op: WalletApiOperation.ListGlobalCurrencyAuditors;
   1834   request: EmptyObject;
   1835   response: ListGlobalCurrencyAuditorsResponse;
   1836 };
   1837 // ListGlobalCurrencyAuditors = "listGlobalCurrencyAuditors"
   1838 
   1839 ```
   1840 ```typescript
   1841 export interface ListGlobalCurrencyAuditorsResponse {
   1842   auditors: {
   1843     currency: string;
   1844     auditorBaseUrl: string;
   1845     auditorPub: string;
   1846   }[];
   1847 }
   1848 
   1849 ```
   1850 
   1851 ### ListGlobalCurrencyExchangesOp
   1852 ```typescript
   1853 export type ListGlobalCurrencyExchangesOp = {
   1854   op: WalletApiOperation.ListGlobalCurrencyExchanges;
   1855   request: EmptyObject;
   1856   response: ListGlobalCurrencyExchangesResponse;
   1857 };
   1858 // ListGlobalCurrencyExchanges = "listGlobalCurrencyExchanges"
   1859 
   1860 ```
   1861 ```typescript
   1862 export interface ListGlobalCurrencyExchangesResponse {
   1863   exchanges: {
   1864     currency: string;
   1865     exchangeBaseUrl: string;
   1866     exchangeMasterPub: string;
   1867   }[];
   1868 }
   1869 
   1870 ```
   1871 
   1872 ### AddGlobalCurrencyExchangeOp
   1873 ```typescript
   1874 export type AddGlobalCurrencyExchangeOp = {
   1875   op: WalletApiOperation.AddGlobalCurrencyExchange;
   1876   request: AddGlobalCurrencyExchangeRequest;
   1877   response: EmptyObject;
   1878 };
   1879 // AddGlobalCurrencyExchange = "addGlobalCurrencyExchange"
   1880 
   1881 ```
   1882 ```typescript
   1883 export interface AddGlobalCurrencyExchangeRequest {
   1884   currency: string;
   1885   exchangeBaseUrl: string;
   1886   exchangeMasterPub: string;
   1887 }
   1888 
   1889 ```
   1890 
   1891 ### AddGlobalCurrencyAuditorOp
   1892 ```typescript
   1893 export type AddGlobalCurrencyAuditorOp = {
   1894   op: WalletApiOperation.AddGlobalCurrencyAuditor;
   1895   request: AddGlobalCurrencyAuditorRequest;
   1896   response: EmptyObject;
   1897 };
   1898 // AddGlobalCurrencyAuditor = "addGlobalCurrencyAuditor"
   1899 
   1900 ```
   1901 ```typescript
   1902 export interface AddGlobalCurrencyAuditorRequest {
   1903   currency: string;
   1904   auditorBaseUrl: string;
   1905   auditorPub: string;
   1906 }
   1907 
   1908 ```
   1909 
   1910 ### RemoveGlobalCurrencyExchangeOp
   1911 ```typescript
   1912 export type RemoveGlobalCurrencyExchangeOp = {
   1913   op: WalletApiOperation.RemoveGlobalCurrencyExchange;
   1914   request: RemoveGlobalCurrencyExchangeRequest;
   1915   response: EmptyObject;
   1916 };
   1917 // RemoveGlobalCurrencyExchange = "removeGlobalCurrencyExchange"
   1918 
   1919 ```
   1920 ```typescript
   1921 export interface RemoveGlobalCurrencyExchangeRequest {
   1922   currency: string;
   1923   exchangeBaseUrl: string;
   1924   exchangeMasterPub: string;
   1925 }
   1926 
   1927 ```
   1928 
   1929 ### RemoveGlobalCurrencyAuditorOp
   1930 ```typescript
   1931 export type RemoveGlobalCurrencyAuditorOp = {
   1932   op: WalletApiOperation.RemoveGlobalCurrencyAuditor;
   1933   request: RemoveGlobalCurrencyAuditorRequest;
   1934   response: EmptyObject;
   1935 };
   1936 // RemoveGlobalCurrencyAuditor = "removeGlobalCurrencyAuditor"
   1937 
   1938 ```
   1939 ```typescript
   1940 export interface RemoveGlobalCurrencyAuditorRequest {
   1941   currency: string;
   1942   auditorBaseUrl: string;
   1943   auditorPub: string;
   1944 }
   1945 
   1946 ```
   1947 
   1948 ### CompleteExchangeBaseUrlOp
   1949 ```typescript
   1950 /**
   1951  * Force a refresh on coins where it would not
   1952  * be necessary.
   1953  */
   1954 export type CompleteExchangeBaseUrlOp = {
   1955   op: WalletApiOperation.CompleteExchangeBaseUrl;
   1956   request: CompleteBaseUrlRequest;
   1957   response: CompleteBaseUrlResult;
   1958 };
   1959 // CompleteExchangeBaseUrl = "completeExchangeBaseUrl"
   1960 
   1961 ```
   1962 ```typescript
   1963 export interface CompleteBaseUrlRequest {
   1964   url: string;
   1965 }
   1966 
   1967 ```
   1968 ```typescript
   1969 export type CompleteBaseUrlResult =
   1970   | {
   1971       /**
   1972        * ok: completion is a proper exchange
   1973        */
   1974       status: "ok";
   1975       /** Completed exchange base URL, if completion was possible */
   1976       completion: string;
   1977     }
   1978   | {
   1979       /**
   1980        * bad-syntax: url is so badly malformed, it can't be completed
   1981        * bad-network: syntax okay, but exchange can't be reached
   1982        * bad-exchange: syntax and network okay, but not talking to an exchange
   1983        */
   1984       status: "bad-syntax" | "bad-network" | "bad-exchange";
   1985       /** Error details in case status is not "ok" */
   1986       error: TalerErrorDetail;
   1987     };
   1988 
   1989 ```
   1990 
   1991 ### ListExchangesOp
   1992 ```typescript
   1993 /**
   1994  * List exchanges known to the wallet.
   1995  */
   1996 export type ListExchangesOp = {
   1997   op: WalletApiOperation.ListExchanges;
   1998   request: ListExchangesRequest;
   1999   response: ExchangesListResponse;
   2000 };
   2001 // ListExchanges = "listExchanges"
   2002 
   2003 ```
   2004 ```typescript
   2005 export interface ListExchangesRequest {
   2006   /**
   2007    * Filter results to only include exchanges in the given scope.
   2008    */
   2009   filterByScope?: ScopeInfo;
   2010   filterByExchangeEntryStatus?: ExchangeEntryStatus;
   2011 }
   2012 
   2013 ```
   2014 ```typescript
   2015 export interface ExchangesListResponse {
   2016   exchanges: ExchangeListItem[];
   2017 }
   2018 
   2019 ```
   2020 
   2021 ### StartExchangeWalletKycOp
   2022 ```typescript
   2023 export type StartExchangeWalletKycOp = {
   2024   op: WalletApiOperation.StartExchangeWalletKyc;
   2025   request: StartExchangeWalletKycRequest;
   2026   response: EmptyObject;
   2027 };
   2028 // StartExchangeWalletKyc = "startExchangeWalletKyc"
   2029 
   2030 ```
   2031 ```typescript
   2032 export interface StartExchangeWalletKycRequest {
   2033   exchangeBaseUrl: string;
   2034   amount: AmountString;
   2035 }
   2036 
   2037 ```
   2038 
   2039 ### TestingWaitExchangeWalletKycOp
   2040 ```typescript
   2041 export type TestingWaitExchangeWalletKycOp = {
   2042   op: WalletApiOperation.TestingWaitExchangeWalletKyc;
   2043   request: TestingWaitWalletKycRequest;
   2044   response: EmptyObject;
   2045 };
   2046 // TestingWaitExchangeWalletKyc = "testingWaitWalletKyc"
   2047 
   2048 ```
   2049 ```typescript
   2050 export interface TestingWaitWalletKycRequest {
   2051   exchangeBaseUrl: string;
   2052   amount: AmountString;
   2053   /**
   2054    * Do we wait for the KYC to be passed (true),
   2055    * or do we already return if legitimization is
   2056    * required (false).
   2057    */
   2058   passed: boolean;
   2059 }
   2060 
   2061 ```
   2062 
   2063 ### TestingPlanMigrateExchangeBaseUrlOp
   2064 ```typescript
   2065 /**
   2066  * Enable migration from an old exchange base URL to a new
   2067  * exchange base URL.
   2068  *
   2069  * The actual migration is only applied once the exchange
   2070  * returns the new base URL.
   2071  */
   2072 export type TestingPlanMigrateExchangeBaseUrlOp = {
   2073   op: WalletApiOperation.TestingPlanMigrateExchangeBaseUrl;
   2074   request: TestingPlanMigrateExchangeBaseUrlRequest;
   2075   response: EmptyObject;
   2076 };
   2077 // TestingPlanMigrateExchangeBaseUrl = "testingPlanMigrateExchangeBaseUrl"
   2078 
   2079 ```
   2080 ```typescript
   2081 export interface TestingPlanMigrateExchangeBaseUrlRequest {
   2082   oldExchangeBaseUrl: string;
   2083   newExchangeBaseUrl: string;
   2084 }
   2085 
   2086 ```
   2087 
   2088 ### PrepareWithdrawExchangeOp
   2089 ```typescript
   2090 /**
   2091  * Prepare for withdrawing via a taler://withdraw-exchange URI.
   2092  */
   2093 export type PrepareWithdrawExchangeOp = {
   2094   op: WalletApiOperation.PrepareWithdrawExchange;
   2095   request: PrepareWithdrawExchangeRequest;
   2096   response: PrepareWithdrawExchangeResponse;
   2097 };
   2098 // PrepareWithdrawExchange = "prepareWithdrawExchange"
   2099 
   2100 ```
   2101 ```typescript
   2102 export interface PrepareWithdrawExchangeRequest {
   2103   /**
   2104    * A taler://withdraw-exchange URI.
   2105    */
   2106   talerUri: string;
   2107 }
   2108 
   2109 ```
   2110 ```typescript
   2111 export interface PrepareWithdrawExchangeResponse {
   2112   /**
   2113    * Base URL of the exchange that already existed
   2114    * or was ephemerally added as an exchange entry to
   2115    * the wallet.
   2116    */
   2117   exchangeBaseUrl: string;
   2118   /**
   2119    * Amount from the taler://withdraw-exchange URI.
   2120    * Only present if specified in the URI.
   2121    */
   2122   amount?: AmountString;
   2123 }
   2124 
   2125 ```
   2126 
   2127 ### AddExchangeOp
   2128 ```typescript
   2129 /**
   2130  * Add / force-update an exchange.
   2131  */
   2132 export type AddExchangeOp = {
   2133   op: WalletApiOperation.AddExchange;
   2134   request: AddExchangeRequest;
   2135   response: AddExchangeResponse;
   2136 };
   2137 // AddExchange = "addExchange"
   2138 
   2139 ```
   2140 ```typescript
   2141 export interface AddExchangeRequest {
   2142   /**
   2143    * Either an http(s) exchange base URL or
   2144    * a taler://add-exchange/ URI.
   2145    */
   2146   uri?: string;
   2147   /**
   2148    * Only ephemerally add the exchange.
   2149    */
   2150   ephemeral?: boolean;
   2151   /**
   2152    * Allow passing incomplete URLs.  The wallet will try to complete
   2153    * the URL and throw an error if completion is not possible.
   2154    */
   2155   allowCompletion?: boolean;
   2156   /**
   2157    * @deprecated use a separate API call to start a forced exchange update instead
   2158    */
   2159   forceUpdate?: boolean;
   2160   /**
   2161    * @deprecated Use {@link uri} instead
   2162    */
   2163   exchangeBaseUrl?: string;
   2164 }
   2165 
   2166 ```
   2167 ```typescript
   2168 export interface AddExchangeResponse {
   2169   /**
   2170    * Base URL of the exchange that was added to the wallet.
   2171    */
   2172   exchangeBaseUrl: string;
   2173 }
   2174 
   2175 ```
   2176 
   2177 ### UpdateExchangeEntryOp
   2178 ```typescript
   2179 /**
   2180  * Update an exchange entry.
   2181  */
   2182 export type UpdateExchangeEntryOp = {
   2183   op: WalletApiOperation.UpdateExchangeEntry;
   2184   request: UpdateExchangeEntryRequest;
   2185   response: EmptyObject;
   2186 };
   2187 // UpdateExchangeEntry = "updateExchangeEntry"
   2188 
   2189 ```
   2190 ```typescript
   2191 export interface UpdateExchangeEntryRequest {
   2192   exchangeBaseUrl: string;
   2193   force?: boolean;
   2194 }
   2195 
   2196 ```
   2197 
   2198 ### ListBankAccountsOp
   2199 ```typescript
   2200 export type ListBankAccountsOp = {
   2201   op: WalletApiOperation.ListBankAccounts;
   2202   request: ListBankAccountsRequest;
   2203   response: ListBankAccountsResponse;
   2204 };
   2205 // ListBankAccounts = "listBankAccounts"
   2206 
   2207 ```
   2208 ```typescript
   2209 export interface ListBankAccountsRequest {
   2210   currency?: string;
   2211 }
   2212 
   2213 ```
   2214 ```typescript
   2215 export interface ListBankAccountsResponse {
   2216   accounts: WalletBankAccountInfo[];
   2217 }
   2218 
   2219 ```
   2220 
   2221 ### GetBankAccountByIdOp
   2222 ```typescript
   2223 export type GetBankAccountByIdOp = {
   2224   op: WalletApiOperation.GetBankAccountById;
   2225   request: GetBankAccountByIdRequest;
   2226   response: GetBankAccountByIdResponse;
   2227 };
   2228 // GetBankAccountById = "getBankAccountById"
   2229 
   2230 ```
   2231 ```typescript
   2232 export interface GetBankAccountByIdRequest {
   2233   bankAccountId: string;
   2234 }
   2235 
   2236 ```
   2237 
   2238 ### AddBankAccountsOp
   2239 ```typescript
   2240 export type AddBankAccountsOp = {
   2241   op: WalletApiOperation.AddBankAccount;
   2242   request: AddBankAccountRequest;
   2243   response: AddBankAccountResponse;
   2244 };
   2245 // AddBankAccount = "addBankAccount"
   2246 
   2247 ```
   2248 ```typescript
   2249 export interface AddBankAccountRequest {
   2250   /**
   2251    * Payto URI of the bank account that should be added.
   2252    */
   2253   paytoUri: string;
   2254   /**
   2255    * Human-readable label for the account.
   2256    */
   2257   label: string;
   2258   /**
   2259    * Currencies supported by the bank (if known).
   2260    */
   2261   currencies?: string[] | undefined;
   2262   /**
   2263    * Bank account that this new account should replace.
   2264    */
   2265   replaceBankAccountId?: string;
   2266 }
   2267 
   2268 ```
   2269 ```typescript
   2270 export interface AddBankAccountResponse {
   2271   /**
   2272    * Identifier of the added bank account.
   2273    */
   2274   bankAccountId: string;
   2275 }
   2276 
   2277 ```
   2278 
   2279 ### ForgetBankAccountsOp
   2280 ```typescript
   2281 export type ForgetBankAccountsOp = {
   2282   op: WalletApiOperation.ForgetBankAccount;
   2283   request: ForgetBankAccountRequest;
   2284   response: EmptyObject;
   2285 };
   2286 // ForgetBankAccount = "forgetBankAccount"
   2287 
   2288 ```
   2289 ```typescript
   2290 export interface ForgetBankAccountRequest {
   2291   bankAccountId: string;
   2292 }
   2293 
   2294 ```
   2295 
   2296 ### SetExchangeTosAcceptedOp
   2297 ```typescript
   2298 /**
   2299  * Accept a particular version of the exchange terms of service.
   2300  */
   2301 export type SetExchangeTosAcceptedOp = {
   2302   op: WalletApiOperation.SetExchangeTosAccepted;
   2303   request: AcceptExchangeTosRequest;
   2304   response: EmptyObject;
   2305 };
   2306 // SetExchangeTosAccepted = "setExchangeTosAccepted"
   2307 
   2308 ```
   2309 
   2310 ### SetExchangeTosForgottenOp
   2311 ```typescript
   2312 /**
   2313  * Accept a particular version of the exchange terms of service.
   2314  */
   2315 export type SetExchangeTosForgottenOp = {
   2316   op: WalletApiOperation.SetExchangeTosForgotten;
   2317   request: AcceptExchangeTosRequest;
   2318   response: EmptyObject;
   2319 };
   2320 // SetExchangeTosForgotten = "setExchangeTosForgotten"
   2321 
   2322 ```
   2323 
   2324 ### GetExchangeTosOp
   2325 ```typescript
   2326 /**
   2327  * Get the current terms of a service of an exchange.
   2328  */
   2329 export type GetExchangeTosOp = {
   2330   op: WalletApiOperation.GetExchangeTos;
   2331   request: GetExchangeTosRequest;
   2332   response: GetExchangeTosResult;
   2333 };
   2334 // GetExchangeTos = "getExchangeTos"
   2335 
   2336 ```
   2337 ```typescript
   2338 export interface GetExchangeTosRequest {
   2339   exchangeBaseUrl: string;
   2340   acceptedFormat?: string[];
   2341   acceptLanguage?: string;
   2342 }
   2343 
   2344 ```
   2345 ```typescript
   2346 export interface GetExchangeTosResult {
   2347   /**
   2348    * Markdown version of the current ToS.
   2349    */
   2350   content: string;
   2351   /**
   2352    * Version tag of the current ToS.
   2353    */
   2354   currentEtag: string;
   2355   /**
   2356    * Version tag of the last ToS that the user has accepted,
   2357    * if any.
   2358    */
   2359   acceptedEtag: string | undefined;
   2360   /**
   2361    * Accepted content type
   2362    */
   2363   contentType: string;
   2364   /**
   2365    * Language of the returned content.
   2366    *
   2367    * If missing, language is unknown.
   2368    */
   2369   contentLanguage: string | undefined;
   2370   /**
   2371    * Available languages as advertised by the exchange.
   2372    */
   2373   tosAvailableLanguages: string[];
   2374   tosStatus: ExchangeTosStatus;
   2375 }
   2376 
   2377 ```
   2378 
   2379 ### GetDepositWireTypesOp
   2380 ```typescript
   2381 export type GetDepositWireTypesOp = {
   2382   op: WalletApiOperation.GetDepositWireTypes;
   2383   request: GetDepositWireTypesRequest;
   2384   response: GetDepositWireTypesResponse;
   2385 };
   2386 // GetDepositWireTypes = "getDepositWireTypes"
   2387 
   2388 ```
   2389 ```typescript
   2390 export interface GetDepositWireTypesRequest {
   2391   currency?: string;
   2392   /**
   2393    * Optional scope info to further restrict the result.
   2394    * Currency must match the currency field.
   2395    */
   2396   scopeInfo?: ScopeInfo;
   2397 }
   2398 
   2399 ```
   2400 ```typescript
   2401 export interface GetDepositWireTypesResponse {
   2402   /**
   2403    * Details for each wire type.
   2404    */
   2405   wireTypeDetails: WireTypeDetails[];
   2406 }
   2407 
   2408 ```
   2409 
   2410 ### GetDepositWireTypesForCurrencyOp
   2411 ```typescript
   2412 /**
   2413  * Get wire types that can be used for a deposit operation
   2414  * with the provided currency.
   2415  *
   2416  * @deprecated Use getDepositWireTypes instead
   2417  */
   2418 export type GetDepositWireTypesForCurrencyOp = {
   2419   op: WalletApiOperation.GetDepositWireTypesForCurrency;
   2420   request: GetDepositWireTypesForCurrencyRequest;
   2421   response: GetDepositWireTypesForCurrencyResponse;
   2422 };
   2423 // GetDepositWireTypesForCurrency = "getDepositWireTypesForCurrency"
   2424 
   2425 ```
   2426 ```typescript
   2427 export interface GetDepositWireTypesForCurrencyRequest {
   2428   currency: string;
   2429   /**
   2430    * Optional scope info to further restrict the result.
   2431    * Currency must match the currency field.
   2432    */
   2433   scopeInfo?: ScopeInfo;
   2434 }
   2435 
   2436 ```
   2437 ```typescript
   2438 /**
   2439  * Response with wire types that are supported for a deposit.
   2440  *
   2441  * In the future, we might surface more information here, such as debit restrictions
   2442  * by the exchange, which then can be shown by UIs to the user before they
   2443  * enter their payment information.
   2444  */
   2445 export interface GetDepositWireTypesForCurrencyResponse {
   2446   /**
   2447    * @deprecated, use wireTypeDetails instead.
   2448    */
   2449   wireTypes: string[];
   2450   /**
   2451    * Details for each wire type.
   2452    */
   2453   wireTypeDetails: WireTypeDetails[];
   2454 }
   2455 
   2456 ```
   2457 
   2458 ### GetExchangeDetailedInfoOp
   2459 ```typescript
   2460 /**
   2461  * Get the current terms of a service of an exchange.
   2462  */
   2463 export type GetExchangeDetailedInfoOp = {
   2464   op: WalletApiOperation.GetExchangeDetailedInfo;
   2465   request: GetExchangeDetailedInfoRequest;
   2466   response: ExchangeDetailedResponse;
   2467 };
   2468 // GetExchangeDetailedInfo = "getExchangeDetailedInfo"
   2469 
   2470 ```
   2471 ```typescript
   2472 export interface GetExchangeDetailedInfoRequest {
   2473   exchangeBaseUrl: string;
   2474 }
   2475 
   2476 ```
   2477 ```typescript
   2478 export interface ExchangeDetailedResponse {
   2479   exchange: ExchangeFullDetails;
   2480 }
   2481 
   2482 ```
   2483 ```typescript
   2484 export interface ExchangeFullDetails {
   2485   exchangeBaseUrl: string;
   2486   currency: string;
   2487   paytoUris: string[];
   2488   auditors: ExchangeAuditor[];
   2489   wireInfo: WireInfo;
   2490   denomFees: DenomOperationMap<FeeDescription[]>;
   2491   transferFees: Record<string, FeeDescription[]>;
   2492   globalFees: FeeDescription[];
   2493 }
   2494 
   2495 ```
   2496 ```typescript
   2497 /**
   2498  * Auditor information as given by the exchange in /keys.
   2499  */
   2500 export interface ExchangeAuditor {
   2501   /**
   2502    * Auditor's public key.
   2503    */
   2504   auditor_pub: string;
   2505   /**
   2506    * Base URL of the auditor.
   2507    */
   2508   auditor_url: string;
   2509   /**
   2510    * List of signatures for denominations by the auditor.
   2511    */
   2512   denomination_keys: AuditorDenomSig[];
   2513 }
   2514 
   2515 ```
   2516 ```typescript
   2517 /**
   2518  * Signature by the auditor that a particular denomination key is audited.
   2519  */
   2520 export interface AuditorDenomSig {
   2521   /**
   2522    * Denomination public key's hash.
   2523    */
   2524   denom_pub_h: string;
   2525   /**
   2526    * The signature.
   2527    */
   2528   auditor_sig: string;
   2529 }
   2530 
   2531 ```
   2532 ```typescript
   2533 export interface WireInfo {
   2534   feesForType: WireFeeMap;
   2535   accounts: ExchangeWireAccount[];
   2536 }
   2537 
   2538 ```
   2539 ```typescript
   2540 export type WireFeeMap = {
   2541   [wireMethod: string]: WireFee[];
   2542 };
   2543 
   2544 ```
   2545 ```typescript
   2546 /**
   2547  * Wire fee for one wire method
   2548  */
   2549 export interface WireFee {
   2550   /**
   2551    * Fee for wire transfers.
   2552    */
   2553   wireFee: AmountString;
   2554   /**
   2555    * Fees to close and refund a reserve.
   2556    */
   2557   closingFee: AmountString;
   2558   /**
   2559    * Start date of the fee.
   2560    */
   2561   startStamp: TalerProtocolTimestamp;
   2562   /**
   2563    * End date of the fee.
   2564    */
   2565   endStamp: TalerProtocolTimestamp;
   2566   /**
   2567    * Signature made by the exchange master key.
   2568    */
   2569   sig: string;
   2570 }
   2571 
   2572 ```
   2573 ```typescript
   2574 export interface ExchangeWireAccount {
   2575   payto_uri: string;
   2576   conversion_url?: string;
   2577   credit_restrictions: AccountRestriction[];
   2578   debit_restrictions: AccountRestriction[];
   2579   master_sig: EddsaSignatureString;
   2580   bank_label?: string;
   2581   priority?: number;
   2582 }
   2583 
   2584 ```
   2585 ```typescript
   2586 export type DenomOperationMap<T> = {
   2587   [op in DenomOperation]: T;
   2588 };
   2589 
   2590 ```
   2591 ```typescript
   2592 export type DenomOperation = "deposit" | "withdraw" | "refresh" | "refund";
   2593 
   2594 ```
   2595 ```typescript
   2596 export interface FeeDescription {
   2597   group: string;
   2598   from: AbsoluteTime;
   2599   until: AbsoluteTime;
   2600   fee?: AmountString;
   2601 }
   2602 
   2603 ```
   2604 
   2605 ### GetExchangeEntryByUrlOp
   2606 ```typescript
   2607 /**
   2608  * Get the current terms of a service of an exchange.
   2609  */
   2610 export type GetExchangeEntryByUrlOp = {
   2611   op: WalletApiOperation.GetExchangeEntryByUrl;
   2612   request: GetExchangeEntryByUrlRequest;
   2613   response: GetExchangeEntryByUrlResponse;
   2614 };
   2615 // GetExchangeEntryByUrl = "getExchangeEntryByUrl"
   2616 
   2617 ```
   2618 ```typescript
   2619 export interface GetExchangeEntryByUrlRequest {
   2620   exchangeBaseUrl: string;
   2621 }
   2622 
   2623 ```
   2624 
   2625 ### GetExchangeResourcesOp
   2626 ```typescript
   2627 /**
   2628  * Get resources associated with an exchange.
   2629  */
   2630 export type GetExchangeResourcesOp = {
   2631   op: WalletApiOperation.GetExchangeResources;
   2632   request: GetExchangeResourcesRequest;
   2633   response: GetExchangeResourcesResponse;
   2634 };
   2635 // GetExchangeResources = "getExchangeResources"
   2636 
   2637 ```
   2638 ```typescript
   2639 export interface GetExchangeResourcesRequest {
   2640   exchangeBaseUrl: string;
   2641 }
   2642 
   2643 ```
   2644 ```typescript
   2645 export interface GetExchangeResourcesResponse {
   2646   hasResources: boolean;
   2647 }
   2648 
   2649 ```
   2650 
   2651 ### DeleteExchangeOp
   2652 ```typescript
   2653 /**
   2654  * Get resources associated with an exchange.
   2655  */
   2656 export type DeleteExchangeOp = {
   2657   op: WalletApiOperation.GetExchangeResources;
   2658   request: DeleteExchangeRequest;
   2659   response: EmptyObject;
   2660 };
   2661 // GetExchangeResources = "getExchangeResources"
   2662 
   2663 ```
   2664 ```typescript
   2665 export interface DeleteExchangeRequest {
   2666   exchangeBaseUrl: string;
   2667   /**
   2668    * Delete the exchange even if it's in use.
   2669    */
   2670   purge?: boolean;
   2671 }
   2672 
   2673 ```
   2674 
   2675 ### GetCurrencySpecificationOp
   2676 ```typescript
   2677 export type GetCurrencySpecificationOp = {
   2678   op: WalletApiOperation.GetCurrencySpecification;
   2679   request: GetCurrencySpecificationRequest;
   2680   response: GetCurrencySpecificationResponse;
   2681 };
   2682 // GetCurrencySpecification = "getCurrencySpecification"
   2683 
   2684 ```
   2685 ```typescript
   2686 export interface GetCurrencySpecificationRequest {
   2687   scope: ScopeInfo;
   2688 }
   2689 
   2690 ```
   2691 ```typescript
   2692 export interface GetCurrencySpecificationResponse {
   2693   currencySpecification: CurrencySpecification;
   2694 }
   2695 
   2696 ```
   2697 
   2698 ### GenerateDepositGroupTxIdOp
   2699 ```typescript
   2700 /**
   2701  * Generate a fresh transaction ID for a deposit group.
   2702  *
   2703  * The resulting transaction ID can be specified when creating
   2704  * a deposit group, so that the client can already start waiting for notifications
   2705  * on that specific deposit group before the GreateDepositGroup request returns.
   2706  */
   2707 export type GenerateDepositGroupTxIdOp = {
   2708   op: WalletApiOperation.GenerateDepositGroupTxId;
   2709   request: EmptyObject;
   2710   response: TxIdResponse;
   2711 };
   2712 // GenerateDepositGroupTxId = "generateDepositGroupTxId"
   2713 
   2714 ```
   2715 ```typescript
   2716 export interface TxIdResponse {
   2717   transactionId: TransactionIdStr;
   2718 }
   2719 
   2720 ```
   2721 
   2722 ### CreateDepositGroupOp
   2723 ```typescript
   2724 /**
   2725  * Create a new deposit group.
   2726  *
   2727  * Deposit groups are used to deposit multiple coins to a bank
   2728  * account, usually the wallet user's own bank account.
   2729  */
   2730 export type CreateDepositGroupOp = {
   2731   op: WalletApiOperation.CreateDepositGroup;
   2732   request: CreateDepositGroupRequest;
   2733   response: CreateDepositGroupResponse;
   2734 };
   2735 // CreateDepositGroup = "createDepositGroup"
   2736 
   2737 ```
   2738 ```typescript
   2739 export interface CreateDepositGroupRequest {
   2740   depositPaytoUri: string;
   2741   /**
   2742    * Amount to deposit (effective amount).
   2743    */
   2744   amount: AmountString;
   2745   /**
   2746    * Restrict the deposit to a certain scope.
   2747    */
   2748   restrictScope?: ScopeInfo;
   2749   /**
   2750    * Use a fixed merchant private key.
   2751    */
   2752   testingFixedPriv?: string;
   2753   /**
   2754    * Pre-allocated transaction ID.
   2755    * Allows clients to easily handle notifications
   2756    * that occur while the operation has been created but
   2757    * before the creation request has returned.
   2758    */
   2759   transactionId?: TransactionIdStr;
   2760 }
   2761 
   2762 ```
   2763 ```typescript
   2764 /**
   2765  * Response to a createDepositGroup request.
   2766  */
   2767 export interface CreateDepositGroupResponse {
   2768   /**
   2769    * Transaction ID of the newly created deposit transaction.
   2770    */
   2771   transactionId: TransactionIdStr;
   2772   /**
   2773    * Current state of the new deposit transaction.
   2774    * Returned as a performance optimization, so that the UI
   2775    * doesn't have to do a separate getTransactionById.
   2776    */
   2777   txState: TransactionState;
   2778   /**
   2779    * @deprecated 2025-06-03, use transactionId instead.
   2780    */
   2781   depositGroupId: string;
   2782 }
   2783 
   2784 ```
   2785 
   2786 ### CheckDepositOp
   2787 ```typescript
   2788 export type CheckDepositOp = {
   2789   op: WalletApiOperation.CheckDeposit;
   2790   request: CheckDepositRequest;
   2791   response: CheckDepositResponse;
   2792 };
   2793 // CheckDeposit = "checkDeposit"
   2794 
   2795 ```
   2796 ```typescript
   2797 export interface CheckDepositRequest {
   2798   /**
   2799    * Payto URI to identify the (bank) account that the exchange will wire
   2800    * the money to.
   2801    */
   2802   depositPaytoUri: string;
   2803   /**
   2804    * Amount that should be deposited.
   2805    *
   2806    * Raw amount, fees will be added on top.
   2807    */
   2808   amount: AmountString;
   2809   /**
   2810    * Restrict the deposit to a certain scope.
   2811    */
   2812   restrictScope?: ScopeInfo;
   2813   /**
   2814    * ID provided by the client to cancel the request.
   2815    *
   2816    * If the same request is made again with the same clientCancellationId,
   2817    * all previous requests are cancelled.
   2818    *
   2819    * The cancelled request will receive an error response with
   2820    * an error code that indicates the cancellation.
   2821    *
   2822    * The cancellation is best-effort, responses might still arrive.
   2823    */
   2824   clientCancellationId?: string;
   2825 }
   2826 
   2827 ```
   2828 ```typescript
   2829 export interface CheckDepositResponse {
   2830   totalDepositCost: AmountString;
   2831   effectiveDepositAmount: AmountString;
   2832   fees: DepositGroupFees;
   2833   kycSoftLimit?: AmountString;
   2834   kycHardLimit?: AmountString;
   2835   /**
   2836    * Base URL of exchanges that would likely require soft KYC.
   2837    */
   2838   kycExchanges?: string[];
   2839 }
   2840 
   2841 ```
   2842 ```typescript
   2843 export interface DepositGroupFees {
   2844   coin: AmountString;
   2845   wire: AmountString;
   2846   refresh: AmountString;
   2847 }
   2848 
   2849 ```
   2850 
   2851 ### ExportBackupRecoveryOp
   2852 ```typescript
   2853 /**
   2854  * Export the recovery information for the wallet.
   2855  */
   2856 export type ExportBackupRecoveryOp = {
   2857   op: WalletApiOperation.ExportBackupRecovery;
   2858   request: EmptyObject;
   2859   response: BackupRecovery;
   2860 };
   2861 // ExportBackupRecovery = "exportBackupRecovery"
   2862 
   2863 ```
   2864 
   2865 ### ImportBackupRecoveryOp
   2866 ```typescript
   2867 /**
   2868  * Import recovery information into the wallet.
   2869  */
   2870 export type ImportBackupRecoveryOp = {
   2871   op: WalletApiOperation.ImportBackupRecovery;
   2872   request: RecoveryLoadRequest;
   2873   response: EmptyObject;
   2874 };
   2875 // ImportBackupRecovery = "importBackupRecovery"
   2876 
   2877 ```
   2878 ```typescript
   2879 /**
   2880  * Load recovery information into the wallet.
   2881  */
   2882 export interface RecoveryLoadRequest {
   2883   recovery: BackupRecovery;
   2884   strategy?: RecoveryMergeStrategy;
   2885 }
   2886 
   2887 ```
   2888 ```typescript
   2889 /**
   2890  * Strategy for loading recovery information.
   2891  */
   2892 export declare enum RecoveryMergeStrategy {
   2893   /**
   2894    * Keep the local wallet root key, import and take over providers.
   2895    */
   2896   Ours = "ours",
   2897   /**
   2898    * Migrate to the wallet root key from the recovery information.
   2899    */
   2900   Theirs = "theirs",
   2901 }
   2902 
   2903 ```
   2904 
   2905 ### RunBackupCycleOp
   2906 ```typescript
   2907 /**
   2908  * Manually make and upload a backup.
   2909  */
   2910 export type RunBackupCycleOp = {
   2911   op: WalletApiOperation.RunBackupCycle;
   2912   request: RunBackupCycleRequest;
   2913   response: EmptyObject;
   2914 };
   2915 // RunBackupCycle = "runBackupCycle"
   2916 
   2917 ```
   2918 ```typescript
   2919 export interface RunBackupCycleRequest {
   2920   /**
   2921    * List of providers to backup or empty for all known providers.
   2922    */
   2923   providers?: Array<string>;
   2924 }
   2925 
   2926 ```
   2927 
   2928 ### ExportBackupOp
   2929 ```typescript
   2930 export type ExportBackupOp = {
   2931   op: WalletApiOperation.ExportBackup;
   2932   request: EmptyObject;
   2933   response: EmptyObject;
   2934 };
   2935 // ExportBackup = "exportBackup"
   2936 
   2937 ```
   2938 
   2939 ### ExportDbToFileOp
   2940 ```typescript
   2941 /**
   2942  * Export the database to a file.
   2943  *
   2944  * The target directory must already exist.
   2945  */
   2946 export type ExportDbToFileOp = {
   2947   op: WalletApiOperation.ExportDbToFile;
   2948   request: ExportDbToFileRequest;
   2949   response: ExportDbToFileResponse;
   2950 };
   2951 // ExportDbToFile = "exportDbToFile"
   2952 
   2953 ```
   2954 ```typescript
   2955 export interface ExportDbToFileRequest {
   2956   /**
   2957    * Directory that the DB should be exported into.
   2958    */
   2959   directory: string;
   2960   /**
   2961    * Stem of the exported DB filename.
   2962    *
   2963    * The final name will be ${directory}/${stem}.${extension},
   2964    * where the extension depends on the used DB backend.
   2965    */
   2966   stem: string;
   2967   /**
   2968    * Force the format of the export.
   2969    *
   2970    * Currently only "json" is supported as a forced
   2971    * export format.
   2972    */
   2973   forceFormat?: string;
   2974 }
   2975 
   2976 ```
   2977 ```typescript
   2978 export interface ExportDbToFileResponse {
   2979   /**
   2980    * Full path to the backup.
   2981    */
   2982   path: string;
   2983 }
   2984 
   2985 ```
   2986 
   2987 ### ImportDbFromFileOp
   2988 ```typescript
   2989 /**
   2990  * Export the database from a file.
   2991  *
   2992  * CAUTION: Overrides existing data.
   2993  */
   2994 export type ImportDbFromFileOp = {
   2995   op: WalletApiOperation.ImportDbFromFile;
   2996   request: ImportDbFromFileRequest;
   2997   response: EmptyObject;
   2998 };
   2999 // ImportDbFromFile = "importDbFromFile"
   3000 
   3001 ```
   3002 ```typescript
   3003 export interface ImportDbFromFileRequest {
   3004   /**
   3005    * Full path to the backup.
   3006    */
   3007   path: string;
   3008 }
   3009 
   3010 ```
   3011 
   3012 ### AddBackupProviderOp
   3013 ```typescript
   3014 /**
   3015  * Add a new backup provider.
   3016  */
   3017 export type AddBackupProviderOp = {
   3018   op: WalletApiOperation.AddBackupProvider;
   3019   request: AddBackupProviderRequest;
   3020   response: AddBackupProviderResponse;
   3021 };
   3022 // AddBackupProvider = "addBackupProvider"
   3023 
   3024 ```
   3025 ```typescript
   3026 export interface AddBackupProviderRequest {
   3027   backupProviderBaseUrl: string;
   3028   name: string;
   3029   /**
   3030    * Activate the provider.  Should only be done after
   3031    * the user has reviewed the provider.
   3032    */
   3033   activate?: boolean;
   3034 }
   3035 
   3036 ```
   3037 ```typescript
   3038 export type AddBackupProviderResponse =
   3039   | AddBackupProviderOk
   3040   | AddBackupProviderPaymentRequired;
   3041 
   3042 ```
   3043 ```typescript
   3044 interface AddBackupProviderOk {
   3045   status: "ok";
   3046 }
   3047 
   3048 ```
   3049 ```typescript
   3050 interface AddBackupProviderPaymentRequired {
   3051   status: "payment-required";
   3052   talerUri?: string;
   3053 }
   3054 
   3055 ```
   3056 
   3057 ### RemoveBackupProviderOp
   3058 ```typescript
   3059 export type RemoveBackupProviderOp = {
   3060   op: WalletApiOperation.RemoveBackupProvider;
   3061   request: RemoveBackupProviderRequest;
   3062   response: EmptyObject;
   3063 };
   3064 // RemoveBackupProvider = "removeBackupProvider"
   3065 
   3066 ```
   3067 ```typescript
   3068 export interface RemoveBackupProviderRequest {
   3069   provider: string;
   3070 }
   3071 
   3072 ```
   3073 
   3074 ### GetBackupInfoOp
   3075 ```typescript
   3076 /**
   3077  * Get some useful stats about the backup state.
   3078  */
   3079 export type GetBackupInfoOp = {
   3080   op: WalletApiOperation.GetBackupInfo;
   3081   request: EmptyObject;
   3082   response: BackupInfo;
   3083 };
   3084 // GetBackupInfo = "getBackupInfo"
   3085 
   3086 ```
   3087 ```typescript
   3088 export interface BackupInfo {
   3089   walletRootPub: string;
   3090   deviceId: string;
   3091   providers: ProviderInfo[];
   3092 }
   3093 
   3094 ```
   3095 ```typescript
   3096 /**
   3097  * Information about one provider.
   3098  *
   3099  * We don't store the account key here,
   3100  * as that's derived from the wallet root key.
   3101  */
   3102 export interface ProviderInfo {
   3103   active: boolean;
   3104   syncProviderBaseUrl: string;
   3105   name: string;
   3106   terms?: BackupProviderTerms;
   3107   /**
   3108    * Last communication issue with the provider.
   3109    */
   3110   lastError?: TalerErrorDetail;
   3111   lastSuccessfulBackupTimestamp?: TalerPreciseTimestamp;
   3112   lastAttemptedBackupTimestamp?: TalerPreciseTimestamp;
   3113   paymentProposalIds: string[];
   3114   backupProblem?: BackupProblem;
   3115   paymentStatus: ProviderPaymentStatus;
   3116 }
   3117 
   3118 ```
   3119 ```typescript
   3120 export interface BackupProviderTerms {
   3121   supportedProtocolVersion: string;
   3122   annualFee: AmountString;
   3123   storageLimitInMegabytes: number;
   3124 }
   3125 
   3126 ```
   3127 ```typescript
   3128 export type BackupProblem =
   3129   | BackupUnreadableProblem
   3130   | BackupConflictingDeviceProblem;
   3131 
   3132 ```
   3133 ```typescript
   3134 export interface BackupUnreadableProblem {
   3135   type: "backup-unreadable";
   3136 }
   3137 
   3138 ```
   3139 ```typescript
   3140 export interface BackupConflictingDeviceProblem {
   3141   type: "backup-conflicting-device";
   3142   otherDeviceId: string;
   3143   myDeviceId: string;
   3144   backupTimestamp: AbsoluteTime;
   3145 }
   3146 
   3147 ```
   3148 ```typescript
   3149 export type ProviderPaymentStatus =
   3150   | ProviderPaymentTermsChanged
   3151   | ProviderPaymentPaid
   3152   | ProviderPaymentInsufficientBalance
   3153   | ProviderPaymentUnpaid
   3154   | ProviderPaymentPending;
   3155 
   3156 ```
   3157 ```typescript
   3158 export interface ProviderPaymentTermsChanged {
   3159   type: ProviderPaymentType.TermsChanged;
   3160   paidUntil: AbsoluteTime;
   3161   oldTerms: BackupProviderTerms;
   3162   newTerms: BackupProviderTerms;
   3163 }
   3164 
   3165 ```
   3166 ```typescript
   3167 export interface ProviderPaymentPaid {
   3168   type: ProviderPaymentType.Paid;
   3169   paidUntil: AbsoluteTime;
   3170 }
   3171 
   3172 ```
   3173 ```typescript
   3174 export interface ProviderPaymentInsufficientBalance {
   3175   type: ProviderPaymentType.InsufficientBalance;
   3176   amount: AmountString;
   3177 }
   3178 
   3179 ```
   3180 ```typescript
   3181 export interface ProviderPaymentUnpaid {
   3182   type: ProviderPaymentType.Unpaid;
   3183 }
   3184 
   3185 ```
   3186 ```typescript
   3187 export interface ProviderPaymentPending {
   3188   type: ProviderPaymentType.Pending;
   3189   talerUri?: string;
   3190 }
   3191 
   3192 ```
   3193 
   3194 ### SetWalletDeviceIdOp
   3195 ```typescript
   3196 /**
   3197  * Set the internal device ID of the wallet, used to
   3198  * identify whether a different/new wallet is accessing
   3199  * the backup of another wallet.
   3200  */
   3201 export type SetWalletDeviceIdOp = {
   3202   op: WalletApiOperation.SetWalletDeviceId;
   3203   request: SetWalletDeviceIdRequest;
   3204   response: EmptyObject;
   3205 };
   3206 // SetWalletDeviceId = "setWalletDeviceId"
   3207 
   3208 ```
   3209 ```typescript
   3210 export interface SetWalletDeviceIdRequest {
   3211   /**
   3212    * New wallet device ID to set.
   3213    */
   3214   walletDeviceId: string;
   3215 }
   3216 
   3217 ```
   3218 
   3219 ### ListStoredBackupsOp
   3220 ```typescript
   3221 export type ListStoredBackupsOp = {
   3222   op: WalletApiOperation.ListStoredBackups;
   3223   request: EmptyObject;
   3224   response: StoredBackupList;
   3225 };
   3226 // ListStoredBackups = "listStoredBackups"
   3227 
   3228 ```
   3229 ```typescript
   3230 export interface StoredBackupList {
   3231   storedBackups: {
   3232     name: string;
   3233   }[];
   3234 }
   3235 
   3236 ```
   3237 
   3238 ### CreateStoredBackupsOp
   3239 ```typescript
   3240 export type CreateStoredBackupsOp = {
   3241   op: WalletApiOperation.CreateStoredBackup;
   3242   request: EmptyObject;
   3243   response: CreateStoredBackupResponse;
   3244 };
   3245 // CreateStoredBackup = "createStoredBackup"
   3246 
   3247 ```
   3248 ```typescript
   3249 export interface CreateStoredBackupResponse {
   3250   name: string;
   3251 }
   3252 
   3253 ```
   3254 
   3255 ### RecoverStoredBackupsOp
   3256 ```typescript
   3257 export type RecoverStoredBackupsOp = {
   3258   op: WalletApiOperation.RecoverStoredBackup;
   3259   request: RecoverStoredBackupRequest;
   3260   response: EmptyObject;
   3261 };
   3262 // RecoverStoredBackup = "recoverStoredBackup"
   3263 
   3264 ```
   3265 ```typescript
   3266 export interface RecoverStoredBackupRequest {
   3267   name: string;
   3268 }
   3269 
   3270 ```
   3271 
   3272 ### DeleteStoredBackupOp
   3273 ```typescript
   3274 export type DeleteStoredBackupOp = {
   3275   op: WalletApiOperation.DeleteStoredBackup;
   3276   request: DeleteStoredBackupRequest;
   3277   response: EmptyObject;
   3278 };
   3279 // DeleteStoredBackup = "deleteStoredBackup"
   3280 
   3281 ```
   3282 ```typescript
   3283 export interface DeleteStoredBackupRequest {
   3284   name: string;
   3285 }
   3286 
   3287 ```
   3288 
   3289 ### CheckPeerPushDebitOp
   3290 ```typescript
   3291 /**
   3292  * Check if initiating a peer push payment is possible
   3293  * based on the funds in the wallet.
   3294  */
   3295 export type CheckPeerPushDebitOp = {
   3296   op: WalletApiOperation.CheckPeerPushDebit;
   3297   request: CheckPeerPushDebitRequest;
   3298   response: CheckPeerPushDebitOkResponse;
   3299 };
   3300 // CheckPeerPushDebit = "checkPeerPushDebit"
   3301 
   3302 ```
   3303 
   3304 ### CheckPeerPushDebitV2Op
   3305 ```typescript
   3306 /**
   3307  * Check if initiating a peer push payment is possible
   3308  * based on the funds in the wallet.
   3309  */
   3310 export type CheckPeerPushDebitV2Op = {
   3311   op: WalletApiOperation.CheckPeerPushDebitV2;
   3312   request: CheckPeerPushDebitRequest;
   3313   response: CheckPeerPushDebitResponse;
   3314 };
   3315 // CheckPeerPushDebitV2 = "checkPeerPushDebitV2"
   3316 
   3317 ```
   3318 ```typescript
   3319 export type CheckPeerPushDebitResponse =
   3320   | CheckPeerPushDebitOkResponse
   3321   | CheckPeerPushDebitInsufficientBalanceResponse;
   3322 
   3323 ```
   3324 ```typescript
   3325 export interface CheckPeerPushDebitInsufficientBalanceResponse {
   3326   type: "insufficient-balance";
   3327   insufficientBalanceDetails: PaymentInsufficientBalanceDetails;
   3328 }
   3329 
   3330 ```
   3331 
   3332 ### InitiatePeerPushDebitOp
   3333 ```typescript
   3334 /**
   3335  * Initiate an outgoing peer push payment.
   3336  */
   3337 export type InitiatePeerPushDebitOp = {
   3338   op: WalletApiOperation.InitiatePeerPushDebit;
   3339   request: InitiatePeerPushDebitRequest;
   3340   response: InitiatePeerPushDebitResponse;
   3341 };
   3342 // InitiatePeerPushDebit = "initiatePeerPushDebit"
   3343 
   3344 ```
   3345 ```typescript
   3346 export interface InitiatePeerPushDebitRequest {
   3347   exchangeBaseUrl?: string;
   3348   /**
   3349    * Restrict the scope of funds that can be spent via the given
   3350    * scope info.
   3351    */
   3352   restrictScope?: ScopeInfo;
   3353   partialContractTerms: PeerContractTerms;
   3354 }
   3355 
   3356 ```
   3357 ```typescript
   3358 export interface InitiatePeerPushDebitResponse {
   3359   exchangeBaseUrl: string;
   3360   pursePub: string;
   3361   mergePriv: string;
   3362   contractPriv: string;
   3363   transactionId: TransactionIdStr;
   3364 }
   3365 
   3366 ```
   3367 
   3368 ### PreparePeerPushCreditOp
   3369 ```typescript
   3370 /**
   3371  * Check an incoming peer push payment.
   3372  */
   3373 export type PreparePeerPushCreditOp = {
   3374   op: WalletApiOperation.PreparePeerPushCredit;
   3375   request: PreparePeerPushCreditRequest;
   3376   response: PreparePeerPushCreditResponse;
   3377 };
   3378 // PreparePeerPushCredit = "preparePeerPushCredit"
   3379 
   3380 ```
   3381 ```typescript
   3382 export interface PreparePeerPushCreditRequest {
   3383   talerUri: string;
   3384 }
   3385 
   3386 ```
   3387 ```typescript
   3388 export interface PreparePeerPushCreditResponse {
   3389   contractTerms: PeerContractTerms;
   3390   amountRaw: AmountString;
   3391   amountEffective: AmountString;
   3392   transactionId: TransactionIdStr;
   3393   /**
   3394    * State of the existing or newly created transaction.
   3395    */
   3396   txState: TransactionState;
   3397   exchangeBaseUrl: string;
   3398   scopeInfo: ScopeInfo;
   3399   /**
   3400    * @deprecated
   3401    */
   3402   amount: AmountString;
   3403 }
   3404 
   3405 ```
   3406 
   3407 ### ConfirmPeerPushCreditOp
   3408 ```typescript
   3409 /**
   3410  * Accept an incoming peer push payment.
   3411  */
   3412 export type ConfirmPeerPushCreditOp = {
   3413   op: WalletApiOperation.ConfirmPeerPushCredit;
   3414   request: ConfirmPeerPushCreditRequest;
   3415   response: AcceptPeerPushPaymentResponse;
   3416 };
   3417 // ConfirmPeerPushCredit = "confirmPeerPushCredit"
   3418 
   3419 ```
   3420 ```typescript
   3421 export interface ConfirmPeerPushCreditRequest {
   3422   transactionId: string;
   3423 }
   3424 
   3425 ```
   3426 ```typescript
   3427 export interface AcceptPeerPushPaymentResponse {
   3428   transactionId: TransactionIdStr;
   3429 }
   3430 
   3431 ```
   3432 
   3433 ### CheckPeerPullCreditOp
   3434 ```typescript
   3435 /**
   3436  * Check fees for an outgoing peer pull payment.
   3437  */
   3438 export type CheckPeerPullCreditOp = {
   3439   op: WalletApiOperation.CheckPeerPullCredit;
   3440   request: CheckPeerPullCreditRequest;
   3441   response: CheckPeerPullCreditResponse;
   3442 };
   3443 // CheckPeerPullCredit = "checkPeerPullCredit"
   3444 
   3445 ```
   3446 ```typescript
   3447 export interface CheckPeerPullCreditRequest {
   3448   /**
   3449    * Require using this particular exchange for this operation.
   3450    */
   3451   exchangeBaseUrl?: string;
   3452   restrictScope?: ScopeInfo;
   3453   amount: AmountString;
   3454   /**
   3455    * ID provided by the client to cancel the request.
   3456    *
   3457    * If the same request is made again with the same clientCancellationId,
   3458    * all previous requests are cancelled.
   3459    *
   3460    * The cancelled request will receive an error response with
   3461    * an error code that indicates the cancellation.
   3462    *
   3463    * The cancellation is best-effort, responses might still arrive.
   3464    */
   3465   clientCancellationId?: string;
   3466 }
   3467 
   3468 ```
   3469 ```typescript
   3470 export interface CheckPeerPullCreditResponse {
   3471   exchangeBaseUrl: string;
   3472   amountRaw: AmountString;
   3473   amountEffective: AmountString;
   3474   /**
   3475    * Number of coins that will be used,
   3476    * can be used by the UI to warn if excessively large.
   3477    */
   3478   numCoins: number;
   3479 }
   3480 
   3481 ```
   3482 
   3483 ### InitiatePeerPullCreditOp
   3484 ```typescript
   3485 /**
   3486  * Initiate an outgoing peer pull payment.
   3487  */
   3488 export type InitiatePeerPullCreditOp = {
   3489   op: WalletApiOperation.InitiatePeerPullCredit;
   3490   request: InitiatePeerPullCreditRequest;
   3491   response: InitiatePeerPullCreditResponse;
   3492 };
   3493 // InitiatePeerPullCredit = "initiatePeerPullCredit"
   3494 
   3495 ```
   3496 ```typescript
   3497 export interface InitiatePeerPullCreditRequest {
   3498   exchangeBaseUrl?: string;
   3499   partialContractTerms: PeerContractTerms;
   3500 }
   3501 
   3502 ```
   3503 ```typescript
   3504 export interface InitiatePeerPullCreditResponse {
   3505   /**
   3506    * Taler URI for the other party to make the payment
   3507    * that was requested.
   3508    *
   3509    * @deprecated since it's not necessarily valid yet until the tx is in the right state
   3510    */
   3511   talerUri: string;
   3512   transactionId: TransactionIdStr;
   3513 }
   3514 
   3515 ```
   3516 
   3517 ### PreparePeerPullDebitOp
   3518 ```typescript
   3519 /**
   3520  * Prepare for an incoming peer pull payment.
   3521  */
   3522 export type PreparePeerPullDebitOp = {
   3523   op: WalletApiOperation.PreparePeerPullDebit;
   3524   request: PreparePeerPullDebitRequest;
   3525   response: PreparePeerPullDebitResponse;
   3526 };
   3527 // PreparePeerPullDebit = "preparePeerPullDebit"
   3528 
   3529 ```
   3530 ```typescript
   3531 export interface PreparePeerPullDebitRequest {
   3532   talerUri: string;
   3533 }
   3534 
   3535 ```
   3536 ```typescript
   3537 export interface PreparePeerPullDebitResponse {
   3538   contractTerms: PeerContractTerms;
   3539   amountRaw: AmountString;
   3540   amountEffective: AmountString;
   3541   transactionId: TransactionIdStr;
   3542   /**
   3543    * State of the existing or newly created transaction.
   3544    */
   3545   txState: TransactionState;
   3546   exchangeBaseUrl: string;
   3547   scopeInfo: ScopeInfo;
   3548   /**
   3549    * @deprecated Redundant field with bad name, will be removed soon.
   3550    */
   3551   amount: AmountString;
   3552 }
   3553 
   3554 ```
   3555 
   3556 ### ConfirmPeerPullDebitOp
   3557 ```typescript
   3558 /**
   3559  * Accept an incoming peer pull payment (i.e. pay the other party).
   3560  */
   3561 export type ConfirmPeerPullDebitOp = {
   3562   op: WalletApiOperation.ConfirmPeerPullDebit;
   3563   request: ConfirmPeerPullDebitRequest;
   3564   response: AcceptPeerPullPaymentResponse;
   3565 };
   3566 // ConfirmPeerPullDebit = "confirmPeerPullDebit"
   3567 
   3568 ```
   3569 ```typescript
   3570 export interface ConfirmPeerPullDebitRequest {
   3571   transactionId: TransactionIdStr;
   3572 }
   3573 
   3574 ```
   3575 ```typescript
   3576 export interface AcceptPeerPullPaymentResponse {
   3577   transactionId: TransactionIdStr;
   3578 }
   3579 
   3580 ```
   3581 
   3582 ### ValidateIbanOp
   3583 ```typescript
   3584 export type ValidateIbanOp = {
   3585   op: WalletApiOperation.ValidateIban;
   3586   request: ValidateIbanRequest;
   3587   response: ValidateIbanResponse;
   3588 };
   3589 // ValidateIban = "validateIban"
   3590 
   3591 ```
   3592 ```typescript
   3593 export interface ValidateIbanRequest {
   3594   iban: string;
   3595 }
   3596 
   3597 ```
   3598 ```typescript
   3599 export interface ValidateIbanResponse {
   3600   valid: boolean;
   3601 }
   3602 
   3603 ```
   3604 
   3605 ### CanonicalizeBaseUrlOp
   3606 ```typescript
   3607 export type CanonicalizeBaseUrlOp = {
   3608   op: WalletApiOperation.CanonicalizeBaseUrl;
   3609   request: CanonicalizeBaseUrlRequest;
   3610   response: CanonicalizeBaseUrlResponse;
   3611 };
   3612 // CanonicalizeBaseUrl = "canonicalizeBaseUrl"
   3613 
   3614 ```
   3615 ```typescript
   3616 export interface CanonicalizeBaseUrlRequest {
   3617   url: string;
   3618 }
   3619 
   3620 ```
   3621 ```typescript
   3622 export interface CanonicalizeBaseUrlResponse {
   3623   url: string;
   3624 }
   3625 
   3626 ```
   3627 
   3628 ### GetQrCodesForPaytoOp
   3629 ```typescript
   3630 export type GetQrCodesForPaytoOp = {
   3631   op: WalletApiOperation.GetQrCodesForPayto;
   3632   request: GetQrCodesForPaytoRequest;
   3633   response: GetQrCodesForPaytoResponse;
   3634 };
   3635 // GetQrCodesForPayto = "getQrCodesForPayto"
   3636 
   3637 ```
   3638 ```typescript
   3639 export interface GetQrCodesForPaytoRequest {
   3640   paytoUri: string;
   3641 }
   3642 
   3643 ```
   3644 ```typescript
   3645 export interface GetQrCodesForPaytoResponse {
   3646   codes: QrCodeSpec[];
   3647 }
   3648 
   3649 ```
   3650 ```typescript
   3651 /**
   3652  * Specification of a QR code that includes payment information.
   3653  */
   3654 export interface QrCodeSpec {
   3655   /**
   3656    * Type of the QR code.
   3657    *
   3658    * Depending on the type, different visual styles
   3659    * might be applied.
   3660    */
   3661   type: string;
   3662   /**
   3663    * Content of the QR code that should be rendered.
   3664    */
   3665   qrContent: string;
   3666 }
   3667 
   3668 ```
   3669 
   3670 ### ConvertIbanAccountFieldToPaytoOp
   3671 ```typescript
   3672 export type ConvertIbanAccountFieldToPaytoOp = {
   3673   op: WalletApiOperation.ConvertIbanAccountFieldToPayto;
   3674   request: ConvertIbanAccountFieldToPaytoRequest;
   3675   response: ConvertIbanAccountFieldToPaytoResponse;
   3676 };
   3677 // ConvertIbanAccountFieldToPayto = "convertIbanAccountFieldToPayto"
   3678 
   3679 ```
   3680 ```typescript
   3681 export interface ConvertIbanAccountFieldToPaytoRequest {
   3682   value: string;
   3683   currency: string;
   3684 }
   3685 
   3686 ```
   3687 ```typescript
   3688 export type ConvertIbanAccountFieldToPaytoResponse =
   3689   | {
   3690       ok: true;
   3691       type: "iban" | "bban";
   3692       paytoUri: string;
   3693     }
   3694   | {
   3695       ok: false;
   3696     };
   3697 
   3698 ```
   3699 
   3700 ### ConvertIbanPaytoToAccountFieldOp
   3701 ```typescript
   3702 export type ConvertIbanPaytoToAccountFieldOp = {
   3703   op: WalletApiOperation.ConvertIbanPaytoToAccountField;
   3704   request: ConvertIbanPaytoToAccountFieldRequest;
   3705   response: ConvertIbanPaytoToAccountFieldResponse;
   3706 };
   3707 // ConvertIbanPaytoToAccountField = "convertIbanPaytoToAccountField"
   3708 
   3709 ```
   3710 ```typescript
   3711 export interface ConvertIbanPaytoToAccountFieldRequest {
   3712   paytoUri: string;
   3713 }
   3714 
   3715 ```
   3716 ```typescript
   3717 export interface ConvertIbanPaytoToAccountFieldResponse {
   3718   type: "iban" | "bban";
   3719   value: string;
   3720 }
   3721 
   3722 ```
   3723 
   3724 ### GetBankingChoicesForPaytoOp
   3725 ```typescript
   3726 export type GetBankingChoicesForPaytoOp = {
   3727   op: WalletApiOperation.GetBankingChoicesForPayto;
   3728   request: GetBankingChoicesForPaytoRequest;
   3729   response: GetBankingChoicesForPaytoResponse;
   3730 };
   3731 // GetBankingChoicesForPayto = "getBankingChoicesForPayto"
   3732 
   3733 ```
   3734 ```typescript
   3735 export interface GetBankingChoicesForPaytoRequest {
   3736   paytoUri: string;
   3737 }
   3738 
   3739 ```
   3740 ```typescript
   3741 export interface GetBankingChoicesForPaytoResponse {
   3742   choices: BankingChoiceSpec[];
   3743 }
   3744 
   3745 ```
   3746 ```typescript
   3747 export interface BankingChoiceSpec {
   3748   label: string;
   3749   type: "link";
   3750   uri: string;
   3751 }
   3752 
   3753 ```
   3754 
   3755 ### ExportDbOp
   3756 ```typescript
   3757 /**
   3758  * Export the wallet database's contents to JSON.
   3759  */
   3760 export type ExportDbOp = {
   3761   op: WalletApiOperation.ExportDb;
   3762   request: EmptyObject;
   3763   response: any;
   3764 };
   3765 // ExportDb = "exportDb"
   3766 
   3767 ```
   3768 
   3769 ### ImportDbOp
   3770 ```typescript
   3771 export type ImportDbOp = {
   3772   op: WalletApiOperation.ImportDb;
   3773   request: ImportDbRequest;
   3774   response: EmptyObject;
   3775 };
   3776 // ImportDb = "importDb"
   3777 
   3778 ```
   3779 ```typescript
   3780 export interface ImportDbRequest {
   3781   dump: any;
   3782 }
   3783 
   3784 ```
   3785 
   3786 ### ClearDbOp
   3787 ```typescript
   3788 /**
   3789  * Dangerously clear the whole wallet database.
   3790  */
   3791 export type ClearDbOp = {
   3792   op: WalletApiOperation.ClearDb;
   3793   request: EmptyObject;
   3794   response: EmptyObject;
   3795 };
   3796 // ClearDb = "clearDb"
   3797 
   3798 ```
   3799 
   3800 ### RecycleOp
   3801 ```typescript
   3802 /**
   3803  * Export a backup, clear the database and re-import it.
   3804  */
   3805 export type RecycleOp = {
   3806   op: WalletApiOperation.Recycle;
   3807   request: EmptyObject;
   3808   response: EmptyObject;
   3809 };
   3810 // Recycle = "recycle"
   3811 
   3812 ```
   3813 
   3814 ### ApplyDevExperimentOp
   3815 ```typescript
   3816 /**
   3817  * Apply a developer experiment to the current wallet state.
   3818  *
   3819  * This allows UI developers / testers to play around without
   3820  * an elaborate test environment.
   3821  */
   3822 export type ApplyDevExperimentOp = {
   3823   op: WalletApiOperation.ApplyDevExperiment;
   3824   request: ApplyDevExperimentRequest;
   3825   response: EmptyObject;
   3826 };
   3827 // ApplyDevExperiment = "applyDevExperiment"
   3828 
   3829 ```
   3830 ```typescript
   3831 export interface ApplyDevExperimentRequest {
   3832   devExperimentUri: string;
   3833 }
   3834 
   3835 ```
   3836 
   3837 ### RunIntegrationTestOp
   3838 ```typescript
   3839 /**
   3840  * Run a simple integration test on a test deployment
   3841  * of the exchange and merchant.
   3842  */
   3843 export type RunIntegrationTestOp = {
   3844   op: WalletApiOperation.RunIntegrationTest;
   3845   request: IntegrationTestArgs;
   3846   response: EmptyObject;
   3847 };
   3848 // RunIntegrationTest = "runIntegrationTest"
   3849 
   3850 ```
   3851 ```typescript
   3852 export interface IntegrationTestArgs {
   3853   exchangeBaseUrl: string;
   3854   corebankApiBaseUrl: string;
   3855   merchantBaseUrl: string;
   3856   merchantAuthToken?: string;
   3857   amountToWithdraw: AmountString;
   3858   amountToSpend: AmountString;
   3859 }
   3860 
   3861 ```
   3862 
   3863 ### RunIntegrationTestV2Op
   3864 ```typescript
   3865 /**
   3866  * Run a simple integration test on a test deployment
   3867  * of the exchange and merchant.
   3868  */
   3869 export type RunIntegrationTestV2Op = {
   3870   op: WalletApiOperation.RunIntegrationTestV2;
   3871   request: IntegrationTestV2Args;
   3872   response: EmptyObject;
   3873 };
   3874 // RunIntegrationTestV2 = "runIntegrationTestV2"
   3875 
   3876 ```
   3877 ```typescript
   3878 export interface IntegrationTestV2Args {
   3879   exchangeBaseUrl: string;
   3880   corebankApiBaseUrl: string;
   3881   merchantBaseUrl: string;
   3882   merchantAuthToken?: string;
   3883 }
   3884 
   3885 ```
   3886 
   3887 ### TestCryptoOp
   3888 ```typescript
   3889 /**
   3890  * Test crypto worker.
   3891  */
   3892 export type TestCryptoOp = {
   3893   op: WalletApiOperation.TestCrypto;
   3894   request: EmptyObject;
   3895   response: any;
   3896 };
   3897 // TestCrypto = "testCrypto"
   3898 
   3899 ```
   3900 
   3901 ### WithdrawTestBalanceOp
   3902 ```typescript
   3903 /**
   3904  * Make withdrawal on a test deployment of the exchange
   3905  * and merchant.
   3906  */
   3907 export type WithdrawTestBalanceOp = {
   3908   op: WalletApiOperation.WithdrawTestBalance;
   3909   request: WithdrawTestBalanceRequest;
   3910   response: WithdrawTestBalanceResult;
   3911 };
   3912 // WithdrawTestBalance = "withdrawTestBalance"
   3913 
   3914 ```
   3915 ```typescript
   3916 export interface WithdrawTestBalanceRequest {
   3917   /**
   3918    * Amount to withdraw.
   3919    */
   3920   amount: AmountString;
   3921   /**
   3922    * Corebank API base URL.
   3923    */
   3924   corebankApiBaseUrl: string;
   3925   /**
   3926    * Exchange to use for withdrawal.
   3927    */
   3928   exchangeBaseUrl: string;
   3929   /**
   3930    * Force the usage of a particular denomination selection.
   3931    *
   3932    * Only useful for testing.
   3933    */
   3934   forcedDenomSel?: ForcedDenomSel;
   3935   /**
   3936    * If set to true, treat the account created during
   3937    * the withdrawal as a foreign withdrawal account.
   3938    */
   3939   useForeignAccount?: boolean;
   3940 }
   3941 
   3942 ```
   3943 
   3944 ### WithdrawTestkudosOp
   3945 ```typescript
   3946 /**
   3947  * Make a withdrawal of testkudos on test.taler.net.
   3948  */
   3949 export type WithdrawTestkudosOp = {
   3950   op: WalletApiOperation.WithdrawTestkudos;
   3951   request: EmptyObject;
   3952   response: WithdrawTestBalanceResult;
   3953 };
   3954 // WithdrawTestkudos = "withdrawTestkudos"
   3955 
   3956 ```
   3957 
   3958 ### TestPayOp
   3959 ```typescript
   3960 /**
   3961  * Make a test payment using a test deployment of
   3962  * the exchange and merchant.
   3963  */
   3964 export type TestPayOp = {
   3965   op: WalletApiOperation.TestPay;
   3966   request: TestPayArgs;
   3967   response: TestPayResult;
   3968 };
   3969 // TestPay = "testPay"
   3970 
   3971 ```
   3972 ```typescript
   3973 export interface TestPayArgs {
   3974   merchantBaseUrl: string;
   3975   merchantAuthToken?: string;
   3976   amount: AmountString;
   3977   summary: string;
   3978   forcedCoinSel?: ForcedCoinSel;
   3979 }
   3980 
   3981 ```
   3982 ```typescript
   3983 export interface TestPayResult {
   3984   /**
   3985    * Number of coins used for the payment.
   3986    */
   3987   numCoins: number;
   3988 }
   3989 
   3990 ```
   3991 
   3992 ### GetActiveTasksOp
   3993 ```typescript
   3994 export type GetActiveTasksOp = {
   3995   op: WalletApiOperation.GetActiveTasks;
   3996   request: EmptyObject;
   3997   response: GetActiveTasksResponse;
   3998 };
   3999 // GetActiveTasks = "getActiveTasks"
   4000 
   4001 ```
   4002 ```typescript
   4003 export interface GetActiveTasksResponse {
   4004   tasks: ActiveTask[];
   4005 }
   4006 
   4007 ```
   4008 ```typescript
   4009 export interface ActiveTask {
   4010   taskId: string;
   4011   transaction: TransactionIdStr | undefined;
   4012   firstTry: AbsoluteTime | undefined;
   4013   nextTry: AbsoluteTime | undefined;
   4014   retryCounter: number | undefined;
   4015   lastError: TalerErrorDetail | undefined;
   4016 }
   4017 
   4018 ```
   4019 
   4020 ### GetPerformanceStatsOp
   4021 ```typescript
   4022 /**
   4023  * Get a list of performance stats for diagnostics.
   4024  *
   4025  * Requires observability events to be enabled. Performance tables for the
   4026  * current running wallet instance are generated from observability events and
   4027  * stored in memory.
   4028  *
   4029  * Under each table, only the highest duration for each operation
   4030  * (e.g. `getBalances` wallet request) is included.
   4031  */
   4032 export type GetPerformanceStatsOp = {
   4033   op: WalletApiOperation.TestingGetPerformanceStats;
   4034   request: GetPerformanceStatsRequest;
   4035   response: GetPerformanceStatsResponse;
   4036 };
   4037 // TestingGetPerformanceStats = "testingGetPerformanceStats"
   4038 
   4039 ```
   4040 ```typescript
   4041 export interface GetPerformanceStatsRequest {
   4042   /**
   4043    * Limit to N largest performance stats of each table.
   4044    *
   4045    * When undefined, all performance stats will be returned.
   4046    */
   4047   limit?: number;
   4048 }
   4049 
   4050 ```
   4051 ```typescript
   4052 export interface GetPerformanceStatsResponse {
   4053   stats: PerformanceTable;
   4054 }
   4055 
   4056 ```
   4057 ```typescript
   4058 export type PerformanceTable = {
   4059   [key in PerformanceStatType]?: PerformanceStat[];
   4060 };
   4061 
   4062 ```
   4063 ```typescript
   4064 export declare enum PerformanceStatType {
   4065   HttpFetch = "http-fetch",
   4066   DbQuery = "db-query",
   4067   Crypto = "crypto",
   4068   WalletRequest = "wallet-request",
   4069   WalletTask = "wallet-task",
   4070 }
   4071 
   4072 ```
   4073 ```typescript
   4074 export type PerformanceStat =
   4075   | {
   4076       type: PerformanceStatType.HttpFetch;
   4077       url: string;
   4078       maxDurationMs: number;
   4079       count: number;
   4080     }
   4081   | {
   4082       type: PerformanceStatType.DbQuery;
   4083       name: string;
   4084       location: string;
   4085       maxDurationMs: number;
   4086       count: number;
   4087     }
   4088   | {
   4089       type: PerformanceStatType.Crypto;
   4090       operation: string;
   4091       maxDurationMs: number;
   4092       count: number;
   4093     }
   4094   | {
   4095       type: PerformanceStatType.WalletRequest;
   4096       operation: string;
   4097       maxDurationMs: number;
   4098       count: number;
   4099     }
   4100   | {
   4101       type: PerformanceStatType.WalletTask;
   4102       taskId: string;
   4103       maxDurationMs: number;
   4104       count: number;
   4105     };
   4106 
   4107 ```
   4108 ```typescript
   4109 export type ObservabilityEvent =
   4110   | {
   4111       id: string;
   4112       when: AbsoluteTime;
   4113       type: ObservabilityEventType.HttpFetchStart;
   4114       url: string;
   4115     }
   4116   | {
   4117       id: string;
   4118       when: AbsoluteTime;
   4119       type: ObservabilityEventType.HttpFetchFinishSuccess;
   4120       url: string;
   4121       status: number;
   4122       durationMs: number;
   4123     }
   4124   | {
   4125       id: string;
   4126       when: AbsoluteTime;
   4127       type: ObservabilityEventType.HttpFetchFinishError;
   4128       url: string;
   4129       error: TalerErrorDetail;
   4130       durationMs: number;
   4131     }
   4132   | {
   4133       type: ObservabilityEventType.DbQueryStart;
   4134       name: string;
   4135       location: string;
   4136     }
   4137   | {
   4138       type: ObservabilityEventType.DbQueryFinishSuccess;
   4139       name: string;
   4140       location: string;
   4141       durationMs: number;
   4142     }
   4143   | {
   4144       type: ObservabilityEventType.DbQueryFinishError;
   4145       name: string;
   4146       location: string;
   4147       error: TalerErrorDetail;
   4148       durationMs: number;
   4149     }
   4150   | {
   4151       type: ObservabilityEventType.RequestStart;
   4152       name: string;
   4153     }
   4154   | {
   4155       type: ObservabilityEventType.RequestFinishSuccess;
   4156       operation: string;
   4157       requestId: string;
   4158       durationMs: number;
   4159     }
   4160   | {
   4161       type: ObservabilityEventType.RequestFinishError;
   4162       operation: string;
   4163       requestId: string;
   4164       durationMs: number;
   4165     }
   4166   | {
   4167       type: ObservabilityEventType.TaskStart;
   4168       taskId: string;
   4169     }
   4170   | {
   4171       type: ObservabilityEventType.TaskStop;
   4172       taskId: string;
   4173     }
   4174   | {
   4175       type: ObservabilityEventType.TaskReset;
   4176       taskId: string;
   4177     }
   4178   | {
   4179       type: ObservabilityEventType.DeclareTaskDependency;
   4180       taskId: string;
   4181     }
   4182   | {
   4183       type: ObservabilityEventType.CryptoStart;
   4184       operation: string;
   4185     }
   4186   | {
   4187       type: ObservabilityEventType.CryptoFinishSuccess;
   4188       operation: string;
   4189       durationMs: number;
   4190     }
   4191   | {
   4192       type: ObservabilityEventType.CryptoFinishError;
   4193       operation: string;
   4194       durationMs: number;
   4195     }
   4196   | {
   4197       type: ObservabilityEventType.ShepherdTaskResult;
   4198       taskId: string;
   4199       resultType: string;
   4200       durationMs: number;
   4201     }
   4202   | {
   4203       type: ObservabilityEventType.Message;
   4204       contents: string;
   4205     }
   4206   | {
   4207       type: ObservabilityEventType.DeclareConcernsTransaction;
   4208       transactionId: TransactionIdStr;
   4209     };
   4210 
   4211 ```
   4212 
   4213 ### DumpCoinsOp
   4214 ```typescript
   4215 /**
   4216  * Dump all coins of the wallet in a simple JSON format.
   4217  */
   4218 export type DumpCoinsOp = {
   4219   op: WalletApiOperation.DumpCoins;
   4220   request: EmptyObject;
   4221   response: CoinDumpJson;
   4222 };
   4223 // DumpCoins = "dumpCoins"
   4224 
   4225 ```
   4226 ```typescript
   4227 /**
   4228  * Easy to process format for the public data of coins
   4229  * managed by the wallet.
   4230  */
   4231 export interface CoinDumpJson {
   4232   coins: Array<{
   4233     /**
   4234      * The coin's denomination's public key.
   4235      */
   4236     denomPub: DenominationPubKey;
   4237     /**
   4238      * Hash of denom_pub.
   4239      */
   4240     denomPubHash: string;
   4241     /**
   4242      * Value of the denomination (without any fees).
   4243      */
   4244     denomValue: string;
   4245     /**
   4246      * Public key of the coin.
   4247      */
   4248     coinPub: string;
   4249     /**
   4250      * Base URL of the exchange for the coin.
   4251      */
   4252     exchangeBaseUrl: string;
   4253     /**
   4254      * Public key of the parent coin.
   4255      * Only present if this coin was obtained via refreshing.
   4256      */
   4257     refreshParentCoinPub: string | undefined;
   4258     /**
   4259      * Public key of the reserve for this coin.
   4260      * Only present if this coin was obtained via refreshing.
   4261      */
   4262     withdrawalReservePub: string | undefined;
   4263     /**
   4264      * Status of the coin.
   4265      */
   4266     coinStatus: CoinStatus;
   4267     /**
   4268      * Information about the age restriction
   4269      */
   4270     ageCommitmentProof: AgeCommitmentProof | undefined;
   4271     history: WalletCoinHistoryItem[];
   4272   }>;
   4273 }
   4274 
   4275 ```
   4276 ```typescript
   4277 export type DenominationPubKey = RsaDenominationPubKey | CsDenominationPubKey;
   4278 
   4279 ```
   4280 ```typescript
   4281 export interface RsaDenominationPubKey {
   4282   readonly cipher: DenomKeyType.Rsa;
   4283   readonly rsa_public_key: string;
   4284   readonly age_mask: number;
   4285 }
   4286 
   4287 ```
   4288 ```typescript
   4289 export interface CsDenominationPubKey {
   4290   readonly cipher: DenomKeyType.ClauseSchnorr;
   4291   readonly age_mask: number;
   4292   readonly cs_public_key: string;
   4293 }
   4294 
   4295 ```
   4296 ```typescript
   4297 /**
   4298  * Status of a coin.
   4299  */
   4300 export declare enum CoinStatus {
   4301   /**
   4302    * Withdrawn and never shown to anybody.
   4303    */
   4304   Fresh = "fresh",
   4305   /**
   4306    * Coin was lost as the denomination is not usable anymore.
   4307    */
   4308   DenomLoss = "denom-loss",
   4309   /**
   4310    * Fresh, but currently marked as "suspended", thus won't be used
   4311    * for spending.  Used for testing.
   4312    */
   4313   FreshSuspended = "fresh-suspended",
   4314   /**
   4315    * A coin that has been spent and refreshed.
   4316    */
   4317   Dormant = "dormant",
   4318 }
   4319 
   4320 ```
   4321 ```typescript
   4322 export interface AgeCommitmentProof {
   4323   commitment: AgeCommitment;
   4324   proof: AgeProof;
   4325 }
   4326 
   4327 ```
   4328 ```typescript
   4329 export interface AgeCommitment {
   4330   mask: number;
   4331   /**
   4332    * Public keys, one for each age group specified in the age mask.
   4333    */
   4334   publicKeys: Edx25519PublicKeyEnc[];
   4335 }
   4336 
   4337 ```
   4338 ```typescript
   4339 export type Edx25519PublicKeyEnc = string & FlavorEdx25519PublicKeyEnc;
   4340 
   4341 ```
   4342 ```typescript
   4343 type FlavorEdx25519PublicKeyEnc = {
   4344   readonly [isEdx25519PublicKeyEnc]?: true;
   4345 };
   4346 
   4347 ```
   4348 ```typescript
   4349 export interface AgeProof {
   4350   /**
   4351    * Private keys.  Typically smaller than the number of public keys,
   4352    * because we drop private keys from age groups that are restricted.
   4353    */
   4354   privateKeys: Edx25519PrivateKeyEnc[];
   4355 }
   4356 
   4357 ```
   4358 ```typescript
   4359 export type Edx25519PrivateKeyEnc = string & FlavorEdx25519PrivateKeyEnc;
   4360 
   4361 ```
   4362 ```typescript
   4363 type FlavorEdx25519PrivateKeyEnc = {
   4364   readonly [isEdx25519PrivateKeyEnc]?: true;
   4365 };
   4366 
   4367 ```
   4368 ```typescript
   4369 export type WalletCoinHistoryItem =
   4370   | {
   4371       type: "withdraw";
   4372       transactionId: TransactionIdStr;
   4373     }
   4374   | {
   4375       type: "spend";
   4376       transactionId: TransactionIdStr;
   4377       amount: AmountString;
   4378     }
   4379   | {
   4380       type: "refresh";
   4381       transactionId: TransactionIdStr;
   4382       amount: AmountString;
   4383     }
   4384   | {
   4385       type: "recoup";
   4386       transactionId: TransactionIdStr;
   4387       amount: AmountString;
   4388     }
   4389   | {
   4390       type: "refund";
   4391       transactionId: TransactionIdStr;
   4392       amount: AmountString;
   4393     };
   4394 
   4395 ```
   4396 
   4397 ### TestingSetTimetravelOp
   4398 ```typescript
   4399 /**
   4400  * Add an offset to the wallet's internal time.
   4401  */
   4402 export type TestingSetTimetravelOp = {
   4403   op: WalletApiOperation.TestingSetTimetravel;
   4404   request: TestingSetTimetravelRequest;
   4405   response: EmptyObject;
   4406 };
   4407 // TestingSetTimetravel = "testingSetTimetravel"
   4408 
   4409 ```
   4410 ```typescript
   4411 export interface TestingSetTimetravelRequest {
   4412   offsetMs: number;
   4413 }
   4414 
   4415 ```
   4416 
   4417 ### TestingWaitTransactionsFinalOp
   4418 ```typescript
   4419 /**
   4420  * Wait until all transactions are in a final state.
   4421  */
   4422 export type TestingWaitTransactionsFinalOp = {
   4423   op: WalletApiOperation.TestingWaitTransactionsFinal;
   4424   request: EmptyObject;
   4425   response: EmptyObject;
   4426 };
   4427 // TestingWaitTransactionsFinal = "testingWaitTransactionsFinal"
   4428 
   4429 ```
   4430 
   4431 ### TestingWaitTasksDoneOp
   4432 ```typescript
   4433 /**
   4434  * Wait until all transactions are in a final state.
   4435  */
   4436 export type TestingWaitTasksDoneOp = {
   4437   op: WalletApiOperation.TestingWaitTasksDone;
   4438   request: EmptyObject;
   4439   response: EmptyObject;
   4440 };
   4441 // TestingWaitTasksDone = "testingWaitTasksDone"
   4442 
   4443 ```
   4444 
   4445 ### TestingWaitRefreshesFinalOp
   4446 ```typescript
   4447 /**
   4448  * Wait until all refresh transactions are in a final state.
   4449  */
   4450 export type TestingWaitRefreshesFinalOp = {
   4451   op: WalletApiOperation.TestingWaitRefreshesFinal;
   4452   request: EmptyObject;
   4453   response: EmptyObject;
   4454 };
   4455 // TestingWaitRefreshesFinal = "testingWaitRefreshesFinal"
   4456 
   4457 ```
   4458 
   4459 ### TestingWaitTransactionStateOp
   4460 ```typescript
   4461 /**
   4462  * Wait until a transaction is in a particular state.
   4463  */
   4464 export type TestingWaitTransactionStateOp = {
   4465   op: WalletApiOperation.TestingWaitTransactionState;
   4466   request: TestingWaitTransactionRequest;
   4467   response: EmptyObject;
   4468 };
   4469 // TestingWaitTransactionState = "testingWaitTransactionState"
   4470 
   4471 ```
   4472 ```typescript
   4473 export interface TestingWaitTransactionRequest {
   4474   transactionId: TransactionIdStr;
   4475   /**
   4476    * Additional identifier that is used in the logs
   4477    * to easily find the status of the particular wait
   4478    * request.
   4479    */
   4480   logId?: string;
   4481   /**
   4482    * After the timeout has passed, give up on
   4483    * waiting for the desired state and raise
   4484    * an error instead.
   4485    */
   4486   timeout?: DurationUnitSpec;
   4487   /**
   4488    * If set to true, wait until the desired state
   4489    * is reached with an error.
   4490    */
   4491   requireError?: boolean;
   4492   txState: TransactionStatePattern | TransactionStatePattern[] | number;
   4493 }
   4494 
   4495 ```
   4496 ```typescript
   4497 export interface TransactionStatePattern {
   4498   major: TransactionMajorState | TransactionStateWildcard;
   4499   minor?: TransactionMinorState | TransactionStateWildcard;
   4500 }
   4501 
   4502 ```
   4503 
   4504 ### TestingWaitExchangeStateOp
   4505 ```typescript
   4506 /**
   4507  * Wait until an exchange entry is in a particular state.
   4508  */
   4509 export type TestingWaitExchangeStateOp = {
   4510   op: WalletApiOperation.TestingWaitTransactionState;
   4511   request: TestingWaitExchangeStateRequest;
   4512   response: EmptyObject;
   4513 };
   4514 // TestingWaitTransactionState = "testingWaitTransactionState"
   4515 
   4516 ```
   4517 ```typescript
   4518 export interface TestingWaitExchangeStateRequest {
   4519   exchangeBaseUrl: string;
   4520   walletKycStatus?: ExchangeWalletKycStatus;
   4521 }
   4522 
   4523 ```
   4524 
   4525 ### TestingPingOp
   4526 ```typescript
   4527 export type TestingPingOp = {
   4528   op: WalletApiOperation.TestingPing;
   4529   request: EmptyObject;
   4530   response: EmptyObject;
   4531 };
   4532 // TestingPing = "testingPing"
   4533 
   4534 ```
   4535 
   4536 ### TestingGetReserveHistoryOp
   4537 ```typescript
   4538 export type TestingGetReserveHistoryOp = {
   4539   op: WalletApiOperation.TestingGetReserveHistory;
   4540   request: TestingGetReserveHistoryRequest;
   4541   response: any;
   4542 };
   4543 // TestingGetReserveHistory = "testingGetReserveHistory"
   4544 
   4545 ```
   4546 ```typescript
   4547 export interface TestingGetReserveHistoryRequest {
   4548   reservePub: string;
   4549   exchangeBaseUrl: string;
   4550 }
   4551 
   4552 ```
   4553 
   4554 ### TestingResetAllRetriesOp
   4555 ```typescript
   4556 /**
   4557  * Reset all task/transaction retries,
   4558  * resulting in immediate re-try of all operations.
   4559  */
   4560 export type TestingResetAllRetriesOp = {
   4561   op: WalletApiOperation.TestingResetAllRetries;
   4562   request: EmptyObject;
   4563   response: EmptyObject;
   4564 };
   4565 // TestingResetAllRetries = "testingResetAllRetries"
   4566 
   4567 ```
   4568 
   4569 ### TestingGetDenomStatsOp
   4570 ```typescript
   4571 /**
   4572  * Get stats about an exchange denomination.
   4573  */
   4574 export type TestingGetDenomStatsOp = {
   4575   op: WalletApiOperation.TestingGetDenomStats;
   4576   request: TestingGetDenomStatsRequest;
   4577   response: TestingGetDenomStatsResponse;
   4578 };
   4579 // TestingGetDenomStats = "testingGetDenomStats"
   4580 
   4581 ```
   4582 ```typescript
   4583 export interface TestingGetDenomStatsRequest {
   4584   exchangeBaseUrl: string;
   4585 }
   4586 
   4587 ```
   4588 ```typescript
   4589 export interface TestingGetDenomStatsResponse {
   4590   numKnown: number;
   4591   numOffered: number;
   4592   numLost: number;
   4593 }
   4594 
   4595 ```
   4596 
   4597 ### TestingRunFixupOp
   4598 ```typescript
   4599 export type TestingRunFixupOp = {
   4600   op: WalletApiOperation.TestingRunFixup;
   4601   request: RunFixupRequest;
   4602   response: EmptyObject;
   4603 };
   4604 // TestingRunFixup = "testingRunFixup"
   4605 
   4606 ```
   4607 ```typescript
   4608 export interface RunFixupRequest {
   4609   id: string;
   4610 }
   4611 
   4612 ```
   4613 
   4614 ### TestingGetDiagnosticsOp
   4615 ```typescript
   4616 export type TestingGetDiagnosticsOp = {
   4617   op: WalletApiOperation.TestingGetDiagnostics;
   4618   request: EmptyObject;
   4619   response: TestingGetDiagnosticsResponse;
   4620 };
   4621 // TestingGetDiagnostics = "testingGetDiagnostics"
   4622 
   4623 ```
   4624 ```typescript
   4625 export interface TestingGetDiagnosticsResponse {
   4626   version: 0;
   4627   exchangeEntries: {
   4628     exchangeBaseUrl: string;
   4629     numDenoms: number;
   4630     numWithdrawableDenoms: number;
   4631     numCandidateWithdrawableDenoms: number;
   4632   }[];
   4633 }
   4634 
   4635 ```
   4636 
   4637 ### SetCoinSuspendedOp
   4638 ```typescript
   4639 /**
   4640  * Set a coin as (un-)suspended.
   4641  * Suspended coins won't be used for payments.
   4642  */
   4643 export type SetCoinSuspendedOp = {
   4644   op: WalletApiOperation.SetCoinSuspended;
   4645   request: SetCoinSuspendedRequest;
   4646   response: EmptyObject;
   4647 };
   4648 // SetCoinSuspended = "setCoinSuspended"
   4649 
   4650 ```
   4651 ```typescript
   4652 export interface SetCoinSuspendedRequest {
   4653   coinPub: string;
   4654   suspended: boolean;
   4655 }
   4656 
   4657 ```
   4658 
   4659 ### ForceRefreshOp
   4660 ```typescript
   4661 /**
   4662  * Force a refresh on coins where it would not
   4663  * be necessary.
   4664  */
   4665 export type ForceRefreshOp = {
   4666   op: WalletApiOperation.ForceRefresh;
   4667   request: ForceRefreshRequest;
   4668   response: EmptyObject;
   4669 };
   4670 // ForceRefresh = "forceRefresh"
   4671 
   4672 ```
   4673 ```typescript
   4674 export interface ForceRefreshRequest {
   4675   refreshCoinSpecs: RefreshCoinSpec[];
   4676 }
   4677 
   4678 ```
   4679 ```typescript
   4680 export interface RefreshCoinSpec {
   4681   coinPub: string;
   4682   amount?: AmountString;
   4683 }
   4684 
   4685 ```
   4686 
   4687 ## Common Declarations
   4688 ```typescript
   4689 export interface InitRequest {
   4690   config?: PartialWalletRunConfig;
   4691 }
   4692 ```
   4693 ```typescript
   4694 export interface PartialWalletRunConfig {
   4695   builtin?: Partial<WalletRunConfig["builtin"]>;
   4696   testing?: Partial<WalletRunConfig["testing"]>;
   4697   features?: Partial<WalletRunConfig["features"]>;
   4698   lazyTaskLoop?: Partial<WalletRunConfig["lazyTaskLoop"]>;
   4699   logLevel?: Partial<WalletRunConfig["logLevel"]>;
   4700 }
   4701 ```
   4702 ```typescript
   4703 export interface WalletRunConfig {
   4704   /**
   4705    * Initialization values useful for a complete startup.
   4706    *
   4707    * These are values may be overridden by different wallets
   4708    */
   4709   builtin: {
   4710     exchanges: BuiltinExchange[];
   4711   };
   4712   /**
   4713    * Unsafe options which it should only be used to create
   4714    * testing environment.
   4715    */
   4716   testing: {
   4717     devModeActive: boolean;
   4718     insecureTrustExchange: boolean;
   4719     preventThrottling: boolean;
   4720     skipDefaults: boolean;
   4721     emitObservabilityEvents?: boolean;
   4722   };
   4723   /**
   4724    * Configurations values that may be safe to show to the user
   4725    */
   4726   features: {
   4727     allowHttp: boolean;
   4728     /**
   4729      * If set to true, enable V1 contracts.  Otherwise, emulate v0 contracts
   4730      * to wallet-core clients.
   4731      *
   4732      * Will become enabled by default in the future.
   4733      *
   4734      * Added 2025-08-19.
   4735      */
   4736     enableV1Contracts: boolean;
   4737   };
   4738   /**
   4739    * Start processing tasks only when explicitly required, even after
   4740    * init has been called.
   4741    *
   4742    * Useful when the wallet is started to make single read-only request,
   4743    * as otherwise wallet-core starts making network request and process
   4744    * unrelated pending tasks.
   4745    */
   4746   lazyTaskLoop: boolean;
   4747   /**
   4748    * Global log level.
   4749    */
   4750   logLevel: string;
   4751 }
   4752 ```
   4753 ```typescript
   4754 export interface BuiltinExchange {
   4755   exchangeBaseUrl: string;
   4756   currencyHint: string;
   4757 }
   4758 ```
   4759 ```typescript
   4760 export interface InitResponse {
   4761   versionInfo: WalletCoreVersion;
   4762 }
   4763 ```
   4764 ```typescript
   4765 export interface WalletCoreVersion {
   4766   implementationSemver: string;
   4767   implementationGitHash: string;
   4768   /**
   4769    * Wallet-core protocol version supported by this implementation
   4770    * of the API ("server" version).
   4771    */
   4772   version: string;
   4773   exchange: string;
   4774   merchant: string;
   4775   bankIntegrationApiRange: string;
   4776   bankConversionApiRange: string;
   4777   corebankApiRange: string;
   4778   /**
   4779    * @deprecated as bank was split into multiple APIs with separate versioning
   4780    */
   4781   bank: string;
   4782   /**
   4783    * @deprecated
   4784    */
   4785   hash: string | undefined;
   4786   /**
   4787    * @deprecated will be removed
   4788    */
   4789   devMode: boolean;
   4790 }
   4791 ```
   4792 ```typescript
   4793 export type EmptyObject = Record<string, never>;
   4794 ```
   4795 ```typescript
   4796 export type AmountString =
   4797   | (string & {
   4798       [__amount_str]: true;
   4799     })
   4800   | LitAmountString;
   4801 ```
   4802 ```typescript
   4803 export interface ContactEntry {
   4804   /**
   4805    * Contact alias
   4806    */
   4807   alias: string;
   4808   /**
   4809    * Alias type
   4810    */
   4811   aliasType: string;
   4812   /**
   4813    * mailbox URI
   4814    */
   4815   mailboxBaseUri: string;
   4816   /**
   4817    * mailbox identity
   4818    */
   4819   mailboxAddress: HashCodeString;
   4820   /**
   4821    * The source of this contact
   4822    * may be a URI
   4823    */
   4824   source: string;
   4825   /**
   4826    * The local petname of the contact
   4827    */
   4828   petname: string;
   4829 }
   4830 ```
   4831 ```typescript
   4832 export interface MailboxConfiguration {
   4833   mailboxBaseUrl: string;
   4834   privateKey: EddsaPrivateKeyString;
   4835   privateEncryptionKey: string;
   4836   expiration: Timestamp;
   4837   payUri?: TalerUri;
   4838 }
   4839 ```
   4840 ```typescript
   4841 export interface TalerProtocolTimestamp {
   4842   /**
   4843    * Seconds (as integer) since epoch.
   4844    */
   4845   readonly t_s: number | "never";
   4846   readonly _flavor?: typeof flavor_TalerProtocolTimestamp;
   4847 }
   4848 ```
   4849 ```typescript
   4850 /**
   4851  * A parsed taler URI.
   4852  */
   4853 export type TalerUri =
   4854   | PayUriResult
   4855   | PayTemplateUriResult
   4856   | DevExperimentUri
   4857   | PayPullUriResult
   4858   | PayPushUriResult
   4859   | BackupRestoreUri
   4860   | RefundUriResult
   4861   | WithdrawUriResult
   4862   | WithdrawExchangeUri
   4863   | AddExchangeUri
   4864   | WithdrawalTransferResultUri
   4865   | AddContactUri;
   4866 ```
   4867 ```typescript
   4868 /**
   4869  *
   4870  */
   4871 export interface PayUriResult {
   4872   type: TalerUriAction.Pay;
   4873   merchantBaseUrl: HostPortPath;
   4874   orderId: string;
   4875   sessionId: string;
   4876   claimToken?: string;
   4877   /**
   4878    * Nonce priv, only present in the
   4879    * "continue on mobile" payment flow.
   4880    */
   4881   noncePriv?: string;
   4882 }
   4883 ```
   4884 ```typescript
   4885 export type HostPortPath = string & {
   4886   [__hostport_str]: true;
   4887 };
   4888 ```
   4889 ```typescript
   4890 export interface PayTemplateUriResult {
   4891   type: TalerUriAction.PayTemplate;
   4892   merchantBaseUrl: HostPortPath;
   4893   templateId: string;
   4894 }
   4895 ```
   4896 ```typescript
   4897 export interface DevExperimentUri {
   4898   type: TalerUriAction.DevExperiment;
   4899   devExperimentId: string;
   4900   query?: URLSearchParams;
   4901 }
   4902 ```
   4903 ```typescript
   4904 interface URLSearchParams extends _URLSearchParams {}
   4905 ```
   4906 ```typescript
   4907 export interface PayPullUriResult {
   4908   type: TalerUriAction.PayPull;
   4909   exchangeBaseUrl: HostPortPath;
   4910   contractPriv: string;
   4911 }
   4912 ```
   4913 ```typescript
   4914 export interface PayPushUriResult {
   4915   type: TalerUriAction.PayPush;
   4916   exchangeBaseUrl: HostPortPath;
   4917   contractPriv: string;
   4918 }
   4919 ```
   4920 ```typescript
   4921 export interface BackupRestoreUri {
   4922   type: TalerUriAction.Restore;
   4923   walletRootPriv: string;
   4924   providers: Array<HostPortPath>;
   4925 }
   4926 ```
   4927 ```typescript
   4928 export interface RefundUriResult {
   4929   type: TalerUriAction.Refund;
   4930   merchantBaseUrl: HostPortPath;
   4931   orderId: string;
   4932 }
   4933 ```
   4934 ```typescript
   4935 export interface WithdrawUriResult {
   4936   type: TalerUriAction.Withdraw;
   4937   bankIntegrationApiBaseUrl: HostPortPath;
   4938   withdrawalOperationId: string;
   4939   externalConfirmation?: boolean;
   4940 }
   4941 ```
   4942 ```typescript
   4943 export interface WithdrawExchangeUri {
   4944   type: TalerUriAction.WithdrawExchange;
   4945   exchangeBaseUrl: HostPortPath;
   4946   amount?: AmountString;
   4947 }
   4948 ```
   4949 ```typescript
   4950 export interface AddExchangeUri {
   4951   type: TalerUriAction.AddExchange;
   4952   exchangeBaseUrl: HostPortPath;
   4953 }
   4954 ```
   4955 ```typescript
   4956 export interface WithdrawalTransferResultUri {
   4957   type: TalerUriAction.WithdrawalTransferResult;
   4958   ref: string;
   4959   status?: "success" | "aborted";
   4960 }
   4961 ```
   4962 ```typescript
   4963 export interface AddContactUri {
   4964   type: TalerUriAction.AddContact;
   4965   alias: string;
   4966   aliasType: string;
   4967   mailboxBaseUri: string;
   4968   mailboxIdentity: HashCodeString;
   4969   sourceBaseUrl: string;
   4970 }
   4971 ```
   4972 ```typescript
   4973 /**
   4974  * Record metadata for mailbox messages
   4975  */
   4976 export interface MailboxMessageRecord {
   4977   originMailboxBaseUrl: string;
   4978   downloadedAt: Timestamp;
   4979   talerUri: string;
   4980 }
   4981 ```
   4982 ```typescript
   4983 export type ScopeInfo = ScopeInfoGlobal | ScopeInfoExchange | ScopeInfoAuditor;
   4984 ```
   4985 ```typescript
   4986 export type ScopeInfoGlobal = {
   4987   type: ScopeType.Global;
   4988   currency: string;
   4989 };
   4990 ```
   4991 ```typescript
   4992 export type ScopeInfoExchange = {
   4993   type: ScopeType.Exchange;
   4994   currency: string;
   4995   url: string;
   4996 };
   4997 ```
   4998 ```typescript
   4999 export interface Exchange {
   5000   url: string;
   5001   priority: Integer;
   5002   master_pub: EddsaPublicKey;
   5003   max_contribution?: AmountString;
   5004 }
   5005 ```
   5006 ```typescript
   5007 export type ScopeInfoAuditor = {
   5008   type: ScopeType.Auditor;
   5009   currency: string;
   5010   url: string;
   5011 };
   5012 ```
   5013 ```typescript
   5014 export type AccountRestriction =
   5015   | RegexAccountRestriction
   5016   | DenyAllAccountRestriction;
   5017 ```
   5018 ```typescript
   5019 export interface RegexAccountRestriction {
   5020   type: "regex";
   5021   payto_regex: string;
   5022   human_hint: string;
   5023   human_hint_i18n?: InternationalizedString;
   5024 }
   5025 ```
   5026 ```typescript
   5027 export interface InternationalizedString {
   5028   [lang_tag: string]: string;
   5029 }
   5030 ```
   5031 ```typescript
   5032 export interface DenyAllAccountRestriction {
   5033   type: "deny";
   5034 }
   5035 ```
   5036 ```typescript
   5037 export interface TransactionsResponse {
   5038   transactions: Transaction[];
   5039 }
   5040 ```
   5041 ```typescript
   5042 export type Transaction =
   5043   | TransactionWithdrawal
   5044   | TransactionPayment
   5045   | TransactionRefund
   5046   | TransactionRefresh
   5047   | TransactionDeposit
   5048   | TransactionPeerPullCredit
   5049   | TransactionPeerPullDebit
   5050   | TransactionPeerPushCredit
   5051   | TransactionPeerPushDebit
   5052   | TransactionInternalWithdrawal
   5053   | TransactionRecoup
   5054   | TransactionDenomLoss;
   5055 ```
   5056 ```typescript
   5057 /**
   5058  * A withdrawal transaction (either bank-integrated or manual).
   5059  */
   5060 export interface TransactionWithdrawal extends TransactionCommon {
   5061   type: TransactionType.Withdrawal;
   5062   /**
   5063    * Exchange of the withdrawal.
   5064    */
   5065   exchangeBaseUrl: string | undefined;
   5066   /**
   5067    * Amount that got subtracted from the reserve balance.
   5068    */
   5069   amountRaw: AmountString;
   5070   /**
   5071    * Amount that actually was (or will be) added to the wallet's balance.
   5072    */
   5073   amountEffective: AmountString;
   5074   withdrawalDetails: WithdrawalDetails;
   5075 }
   5076 ```
   5077 ```typescript
   5078 export interface TransactionCommon {
   5079   transactionId: TransactionIdStr;
   5080   type: TransactionType;
   5081   timestamp: TalerPreciseTimestamp;
   5082   /**
   5083    * Scope of this tx
   5084    */
   5085   scopes: ScopeInfo[];
   5086   /**
   5087    * Transaction state, as per DD37.
   5088    */
   5089   txState: TransactionState;
   5090   /**
   5091    * Wallet-internal state ID, only used for debugging and testing.
   5092    */
   5093   stId: number;
   5094   /**
   5095    * Possible transitions based on the current state.
   5096    */
   5097   txActions: TransactionAction[];
   5098   /**
   5099    * Raw amount of the transaction (exclusive of fees or other extra costs).
   5100    */
   5101   amountRaw: AmountString;
   5102   /**
   5103    * Amount added or removed from the wallet's balance (including all fees and other costs).
   5104    */
   5105   amountEffective: AmountString;
   5106   error?: TalerErrorDetail;
   5107   abortReason?: TalerErrorDetail;
   5108   failReason?: TalerErrorDetail;
   5109   /**
   5110    * If the transaction minor state is in KycRequired this field is going to
   5111    * have the location where the user need to go to complete KYC information.
   5112    */
   5113   kycUrl?: string;
   5114   /**
   5115    * KYC payto hash. Useful for testing, not so useful for UIs.
   5116    */
   5117   kycPaytoHash?: string;
   5118   /**
   5119    * KYC access token. Useful for testing, not so useful for UIs.
   5120    */
   5121   kycAccessToken?: string;
   5122   kycAuthTransferInfo?: KycAuthTransferInfo;
   5123 }
   5124 ```
   5125 ```typescript
   5126 export type TransactionIdStr = `txn:${string}:${string}` & {
   5127   [__txId]: true;
   5128 };
   5129 ```
   5130 ```typescript
   5131 export declare enum TransactionType {
   5132   Withdrawal = "withdrawal",
   5133   InternalWithdrawal = "internal-withdrawal",
   5134   Payment = "payment",
   5135   Refund = "refund",
   5136   Refresh = "refresh",
   5137   Deposit = "deposit",
   5138   PeerPushDebit = "peer-push-debit",
   5139   PeerPushCredit = "peer-push-credit",
   5140   PeerPullDebit = "peer-pull-debit",
   5141   PeerPullCredit = "peer-pull-credit",
   5142   Recoup = "recoup",
   5143   DenomLoss = "denom-loss",
   5144 }
   5145 ```
   5146 ```typescript
   5147 /**
   5148  * Precise timestamp, typically used in the wallet-core
   5149  * API but not in other Taler APIs so far.
   5150  */
   5151 export interface TalerPreciseTimestamp {
   5152   /**
   5153    * Seconds (as integer) since epoch.
   5154    */
   5155   readonly t_s: number | "never";
   5156   /**
   5157    * Optional microsecond offset (non-negative integer).
   5158    */
   5159   readonly off_us?: number;
   5160   readonly _flavor?: typeof flavor_TalerPreciseTimestamp;
   5161 }
   5162 ```
   5163 ```typescript
   5164 export interface TransactionState {
   5165   major: TransactionMajorState;
   5166   minor?: TransactionMinorState;
   5167 }
   5168 ```
   5169 ```typescript
   5170 export declare enum TransactionMajorState {
   5171   None = "none",
   5172   Pending = "pending",
   5173   Done = "done",
   5174   Aborting = "aborting",
   5175   Aborted = "aborted",
   5176   Dialog = "dialog",
   5177   Finalizing = "finalizing",
   5178   Suspended = "suspended",
   5179   SuspendedFinalizing = "suspended-finalizing",
   5180   SuspendedAborting = "suspended-aborting",
   5181   Failed = "failed",
   5182   Expired = "expired",
   5183   Deleted = "deleted",
   5184 }
   5185 ```
   5186 ```typescript
   5187 export declare enum TransactionMinorState {
   5188   Unknown = "unknown",
   5189   Deposit = "deposit",
   5190   KycRequired = "kyc",
   5191   KycInit = "kyc-init",
   5192   MergeKycRequired = "merge-kyc",
   5193   BalanceKycRequired = "balance-kyc",
   5194   BalanceKycInit = "balance-kyc-init",
   5195   KycAuthRequired = "kyc-auth",
   5196   Track = "track",
   5197   SubmitPayment = "submit-payment",
   5198   RebindSession = "rebind-session",
   5199   Refresh = "refresh",
   5200   Pickup = "pickup",
   5201   AutoRefund = "auto-refund",
   5202   User = "user",
   5203   Bank = "bank",
   5204   Exchange = "exchange",
   5205   ClaimProposal = "claim-proposal",
   5206   CheckRefund = "check-refund",
   5207   CreatePurse = "create-purse",
   5208   DeletePurse = "delete-purse",
   5209   RefreshExpired = "refresh-expired",
   5210   Ready = "ready",
   5211   Merge = "merge",
   5212   Repurchase = "repurchase",
   5213   BankRegisterReserve = "bank-register-reserve",
   5214   BankConfirmTransfer = "bank-confirm-transfer",
   5215   WithdrawCoins = "withdraw-coins",
   5216   ExchangeWaitReserve = "exchange-wait-reserve",
   5217   AbortingBank = "aborting-bank",
   5218   Aborting = "aborting",
   5219   Refused = "refused",
   5220   Withdraw = "withdraw",
   5221   MerchantOrderProposed = "merchant-order-proposed",
   5222   Proposed = "proposed",
   5223   RefundAvailable = "refund-available",
   5224   AcceptRefund = "accept-refund",
   5225   PaidByOther = "paid-by-other",
   5226   CompletedByOtherWallet = "completed-by-other-wallet",
   5227 }
   5228 ```
   5229 ```typescript
   5230 export declare enum TransactionAction {
   5231   Delete = "delete",
   5232   Suspend = "suspend",
   5233   Resume = "resume",
   5234   Abort = "abort",
   5235   Fail = "fail",
   5236   Retry = "retry",
   5237 }
   5238 ```
   5239 ```typescript
   5240 export interface TalerErrorDetail {
   5241   code: TalerErrorCode;
   5242   when?: AbsoluteTime;
   5243   hint?: string;
   5244   [x: string]: unknown;
   5245 }
   5246 ```
   5247 ```typescript
   5248 export interface AbsoluteTime {
   5249   /**
   5250    * Timestamp in milliseconds.
   5251    */
   5252   readonly t_ms: number | "never";
   5253   readonly _flavor?: typeof flavor_AbsoluteTime;
   5254   [opaque_AbsoluteTime]: true;
   5255 }
   5256 ```
   5257 ```typescript
   5258 export interface Duration {
   5259   /**
   5260    * Duration in milliseconds.
   5261    */
   5262   readonly d_ms: number | "forever";
   5263 }
   5264 ```
   5265 ```typescript
   5266 export interface DurationUnitSpec {
   5267   seconds?: number;
   5268   minutes?: number;
   5269   hours?: number;
   5270   days?: number;
   5271   months?: number;
   5272   years?: number;
   5273 }
   5274 ```
   5275 ```typescript
   5276 export interface TalerProtocolDuration {
   5277   readonly d_us: number | "forever";
   5278 }
   5279 ```
   5280 ```typescript
   5281 export interface KycAuthTransferInfo {
   5282   /**
   5283    * Payto URI of the account that must make the transfer.
   5284    *
   5285    * The KYC auth transfer will *not* work if it originates
   5286    * from a different account.
   5287    */
   5288   debitPaytoUri: string;
   5289   /**
   5290    * Account public key that must be included in the subject.
   5291    */
   5292   accountPub: string;
   5293   /**
   5294    * Amount that the exchange expects to be deposited.
   5295    *
   5296    * Usually corresponds to the TINY_AMOUNT configuration of the exchange,
   5297    * and thus is the smallest amount that can be transferred
   5298    * via a bank transfer.
   5299    */
   5300   amount: AmountString;
   5301   /**
   5302    * Possible target payto URIs.
   5303    */
   5304   creditPaytoUris: string[];
   5305 }
   5306 ```
   5307 ```typescript
   5308 export type WithdrawalDetails =
   5309   | WithdrawalDetailsForManualTransfer
   5310   | WithdrawalDetailsForTalerBankIntegrationApi;
   5311 ```
   5312 ```typescript
   5313 interface WithdrawalDetailsForManualTransfer {
   5314   type: WithdrawalType.ManualTransfer;
   5315   /**
   5316    * Payto URIs that the exchange supports.
   5317    *
   5318    * Already contains the amount and message.
   5319    *
   5320    * @deprecated in favor of exchangeCreditAccounts
   5321    */
   5322   exchangePaytoUris: string[];
   5323   exchangeCreditAccountDetails?: WithdrawalExchangeAccountDetails[];
   5324   reservePub: string;
   5325   /**
   5326    * Is the reserve ready for withdrawal?
   5327    */
   5328   reserveIsReady: boolean;
   5329   /**
   5330    * How long does the exchange wait to transfer back funds from a
   5331    * reserve?
   5332    */
   5333   reserveClosingDelay: TalerProtocolDuration;
   5334 }
   5335 ```
   5336 ```typescript
   5337 export interface WithdrawalExchangeAccountDetails {
   5338   /**
   5339    * Payto URI to credit the exchange.
   5340    *
   5341    * Depending on whether the (manual!) withdrawal is accepted or just
   5342    * being checked, this already includes the subject with the
   5343    * reserve public key.
   5344    */
   5345   paytoUri: string;
   5346   /**
   5347    * Status that indicates whether the account can be used
   5348    * by the user to send funds for a withdrawal.
   5349    *
   5350    * ok: account should be shown to the user
   5351    * error: account should not be shown to the user, UIs might render the error (in conversionError),
   5352    *   especially in dev mode.
   5353    */
   5354   status: "ok" | "error";
   5355   /**
   5356    * Transfer amount. Might be in a different currency than the requested
   5357    * amount for withdrawal.
   5358    *
   5359    * Absent if this is a conversion account and the conversion failed.
   5360    */
   5361   transferAmount?: AmountString;
   5362   /**
   5363    * Currency specification for the external currency.
   5364    *
   5365    * Only included if this account requires a currency conversion.
   5366    */
   5367   currencySpecification?: CurrencySpecification;
   5368   /**
   5369    * Further restrictions for sending money to the
   5370    * exchange.
   5371    */
   5372   creditRestrictions?: AccountRestriction[];
   5373   /**
   5374    * Label given to the account or the account's bank by the exchange.
   5375    */
   5376   bankLabel?: string;
   5377   priority?: number;
   5378   /**
   5379    * Error that happened when attempting to request the conversion rate.
   5380    */
   5381   conversionError?: TalerErrorDetail;
   5382 }
   5383 ```
   5384 ```typescript
   5385 /**
   5386  * DD51 https://docs.taler.net/design-documents/051-fractional-digits.html
   5387  */
   5388 export interface CurrencySpecification {
   5389   name: string;
   5390   num_fractional_input_digits: Integer;
   5391   num_fractional_normal_digits: Integer;
   5392   num_fractional_trailing_zero_digits: Integer;
   5393   alt_unit_names: {
   5394     [log10: string]: string;
   5395   };
   5396   common_amounts?: AmountString[];
   5397 }
   5398 ```
   5399 ```typescript
   5400 interface WithdrawalDetailsForTalerBankIntegrationApi {
   5401   type: WithdrawalType.TalerBankIntegrationApi;
   5402   /**
   5403    * Set to true if the bank has confirmed the withdrawal, false if not.
   5404    * An unconfirmed withdrawal usually requires user-input and should be highlighted in the UI.
   5405    * See also bankConfirmationUrl below.
   5406    */
   5407   confirmed: boolean;
   5408   /**
   5409    * If the withdrawal is unconfirmed, this can include a URL for user
   5410    * initiated confirmation.
   5411    */
   5412   bankConfirmationUrl?: string;
   5413   reservePub: string;
   5414   /**
   5415    * Is the reserve ready for withdrawal?
   5416    */
   5417   reserveIsReady: boolean;
   5418   /**
   5419    * Is the bank transfer for the withdrawal externally confirmed?
   5420    */
   5421   externalConfirmation?: boolean;
   5422   exchangeCreditAccountDetails?: WithdrawalExchangeAccountDetails[];
   5423 }
   5424 ```
   5425 ```typescript
   5426 export interface TransactionPayment extends TransactionCommon {
   5427   type: TransactionType.Payment;
   5428   /**
   5429    * Additional information about the payment.
   5430    */
   5431   info: OrderShortInfo;
   5432   /**
   5433    * Full contract terms.
   5434    *
   5435    * Only included if explicitly included in the request.
   5436    */
   5437   contractTerms?: MerchantContractTerms;
   5438   /**
   5439    * Amount that must be paid for the contract
   5440    */
   5441   amountRaw: AmountString;
   5442   /**
   5443    * Amount that was paid, including deposit, wire and refresh fees.
   5444    */
   5445   amountEffective: AmountString;
   5446   /**
   5447    * Amount that has been refunded by the merchant
   5448    */
   5449   totalRefundRaw: AmountString;
   5450   /**
   5451    * Amount will be added to the wallet's balance after fees and refreshing
   5452    */
   5453   totalRefundEffective: AmountString;
   5454   /**
   5455    * Amount pending to be picked up
   5456    */
   5457   refundPending: AmountString | undefined;
   5458   /**
   5459    * Reference to applied refunds
   5460    */
   5461   refunds: RefundInfoShort[];
   5462   /**
   5463    * Is the wallet currently checking for a refund?
   5464    */
   5465   refundQueryActive: boolean;
   5466   /**
   5467    * PoS confirmation codes, separated by newlines.
   5468    * Only present for purchases that support PoS confirmation.
   5469    */
   5470   posConfirmation: string | undefined;
   5471   /**
   5472    * Until when will the posConfirmation be valid?
   5473    */
   5474   posConfirmationDeadline?: TalerProtocolTimestamp;
   5475   /**
   5476    * Did we receive the payment via a taler://pay-template/ URI
   5477    * and did the URI contain a nfc=1 flag?
   5478    */
   5479   posConfirmationViaNfc?: boolean;
   5480 }
   5481 ```
   5482 ```typescript
   5483 export interface OrderShortInfo {
   5484   /**
   5485    * Order ID, uniquely identifies the order within a merchant instance
   5486    */
   5487   orderId: string;
   5488   /**
   5489    * Hash of the contract terms.
   5490    */
   5491   contractTermsHash: string;
   5492   /**
   5493    * More information about the merchant
   5494    */
   5495   merchant: MerchantInfo;
   5496   /**
   5497    * Summary of the order, given by the merchant
   5498    */
   5499   summary: string;
   5500   /**
   5501    * Map from IETF BCP 47 language tags to localized summaries
   5502    */
   5503   summary_i18n?: InternationalizedString;
   5504   /**
   5505    * URL of the fulfillment, given by the merchant
   5506    */
   5507   fulfillmentUrl?: string;
   5508   /**
   5509    * Plain text message that should be shown to the user
   5510    * when the payment is complete.
   5511    */
   5512   fulfillmentMessage?: string;
   5513   /**
   5514    * Translations of fulfillmentMessage.
   5515    */
   5516   fulfillmentMessage_i18n?: InternationalizedString;
   5517 }
   5518 ```
   5519 ```typescript
   5520 export interface MerchantInfo {
   5521   name: string;
   5522   email?: string;
   5523   website?: string;
   5524   logo?: ImageDataUrl;
   5525   address?: Location;
   5526   jurisdiction?: Location;
   5527 }
   5528 ```
   5529 ```typescript
   5530 export interface Location {
   5531   country?: string;
   5532   country_subdivision?: string;
   5533   district?: string;
   5534   town?: string;
   5535   town_location?: string;
   5536   post_code?: string;
   5537   street?: string;
   5538   building_name?: string;
   5539   building_number?: string;
   5540   address_lines?: string[];
   5541 }
   5542 ```
   5543 ```typescript
   5544 export type MerchantContractTerms =
   5545   | MerchantContractTermsV0
   5546   | MerchantContractTermsV1;
   5547 ```
   5548 ```typescript
   5549 export interface MerchantContractTermsV0 extends MerchantContractTermsCommon {
   5550   version?: MerchantContractVersion.V0;
   5551   amount: AmountString;
   5552   max_fee: AmountString;
   5553 }
   5554 ```
   5555 ```typescript
   5556 /**
   5557  * Contract terms from a merchant.
   5558  */
   5559 interface MerchantContractTermsCommon {
   5560   h_wire: string;
   5561   auto_refund?: TalerProtocolDuration;
   5562   wire_method: string;
   5563   summary: string;
   5564   summary_i18n?: InternationalizedString;
   5565   order_id: string;
   5566   nonce: string;
   5567   pay_deadline: TalerProtocolTimestamp;
   5568   merchant: MerchantInfo;
   5569   merchant_pub: string;
   5570   delivery_date?: TalerProtocolTimestamp;
   5571   delivery_location?: Location;
   5572   exchanges: Exchange[];
   5573   products?: ProductSold[];
   5574   refund_deadline: TalerProtocolTimestamp;
   5575   wire_transfer_deadline: TalerProtocolTimestamp;
   5576   timestamp: TalerProtocolTimestamp;
   5577   merchant_base_url: string;
   5578   fulfillment_url?: string;
   5579   public_reorder_url?: string;
   5580   fulfillment_message?: string;
   5581   fulfillment_message_i18n?: InternationalizedString;
   5582   extra?: any;
   5583   minimum_age?: Integer;
   5584   default_money_pot?: Integer;
   5585 }
   5586 ```
   5587 ```typescript
   5588 export interface ProductSold {
   5589   product_id?: string;
   5590   product_name?: string;
   5591   description: string;
   5592   description_i18n?: {
   5593     [lang_tag: string]: string;
   5594   };
   5595   quantity?: Integer;
   5596   unit?: string;
   5597   price?: AmountString;
   5598   image?: ImageDataUrl;
   5599   taxes?: Tax[];
   5600   delivery_date?: Timestamp;
   5601   product_money_pot?: Integer;
   5602 }
   5603 ```
   5604 ```typescript
   5605 export interface Tax {
   5606   name: string;
   5607   tax: AmountString;
   5608 }
   5609 ```
   5610 ```typescript
   5611 export interface MerchantContractTermsV1 extends MerchantContractTermsCommon {
   5612   version: MerchantContractVersion.V1;
   5613   choices: MerchantContractChoice[];
   5614   token_families: {
   5615     [token_family_slug: string]: MerchantContractTokenFamily;
   5616   };
   5617 }
   5618 ```
   5619 ```typescript
   5620 export interface MerchantContractChoice {
   5621   amount: AmountString;
   5622   description?: string;
   5623   description_i18n?: InternationalizedString;
   5624   inputs: MerchantContractInput[];
   5625   outputs: MerchantContractOutput[];
   5626   max_fee: AmountString;
   5627 }
   5628 ```
   5629 ```typescript
   5630 export interface MerchantContractInputToken {
   5631   type: MerchantContractInputType.Token;
   5632   token_family_slug: string;
   5633   count?: Integer;
   5634 }
   5635 ```
   5636 ```typescript
   5637 export type MerchantContractOutput =
   5638   | MerchantContractOutputToken
   5639   | MerchantContractOutputTaxReceipt;
   5640 ```
   5641 ```typescript
   5642 export interface MerchantContractOutputToken {
   5643   type: MerchantContractOutputType.Token;
   5644   token_family_slug: string;
   5645   count?: Integer;
   5646   key_index: Integer;
   5647 }
   5648 ```
   5649 ```typescript
   5650 export interface MerchantContractOutputTaxReceipt {
   5651   type: MerchantContractOutputType.TaxReceipt;
   5652   donau_urls: string[];
   5653   amount?: AmountString;
   5654 }
   5655 ```
   5656 ```typescript
   5657 export interface MerchantContractTokenFamily {
   5658   name: string;
   5659   description: string;
   5660   description_i18n?: {
   5661     [lang_tag: string]: string;
   5662   };
   5663   keys: TokenIssuePublicKey[];
   5664   details: MerchantContractTokenDetails;
   5665   critical: boolean;
   5666 }
   5667 ```
   5668 ```typescript
   5669 export type TokenIssuePublicKey =
   5670   | TokenIssueRsaPublicKey
   5671   | TokenIssueCsPublicKey;
   5672 ```
   5673 ```typescript
   5674 export interface TokenIssueRsaPublicKey {
   5675   cipher: "RSA";
   5676   rsa_pub: RsaPublicKey;
   5677   signature_validity_start: Timestamp;
   5678   signature_validity_end: Timestamp;
   5679 }
   5680 ```
   5681 ```typescript
   5682 export interface TokenIssueCsPublicKey {
   5683   cipher: "CS";
   5684   cs_pub: Cs25519Point;
   5685   signature_validity_start: Timestamp;
   5686   signature_validity_end: Timestamp;
   5687 }
   5688 ```
   5689 ```typescript
   5690 export type MerchantContractTokenDetails =
   5691   | MerchantContractSubscriptionTokenDetails
   5692   | MerchantContractDiscountTokenDetails;
   5693 ```
   5694 ```typescript
   5695 export interface MerchantContractSubscriptionTokenDetails {
   5696   class: MerchantContractTokenKind.Subscription;
   5697   trusted_domains: string[];
   5698 }
   5699 ```
   5700 ```typescript
   5701 export interface MerchantContractDiscountTokenDetails {
   5702   class: MerchantContractTokenKind.Discount;
   5703   expected_domains: string[];
   5704 }
   5705 ```
   5706 ```typescript
   5707 export interface RefundInfoShort {
   5708   transactionId: string;
   5709   timestamp: TalerProtocolTimestamp;
   5710   amountEffective: AmountString;
   5711   amountRaw: AmountString;
   5712 }
   5713 ```
   5714 ```typescript
   5715 export interface TransactionRefund extends TransactionCommon {
   5716   type: TransactionType.Refund;
   5717   amountRaw: AmountString;
   5718   amountEffective: AmountString;
   5719   refundedTransactionId: string;
   5720   paymentInfo: RefundPaymentInfo | undefined;
   5721 }
   5722 ```
   5723 ```typescript
   5724 /**
   5725  * Summary information about the payment that we got a refund for.
   5726  */
   5727 export interface RefundPaymentInfo {
   5728   summary: string;
   5729   summary_i18n?: InternationalizedString;
   5730   /**
   5731    * More information about the merchant
   5732    */
   5733   merchant: MerchantInfo;
   5734 }
   5735 ```
   5736 ```typescript
   5737 /**
   5738  * A transaction shown for refreshes.
   5739  * Only shown for (1) refreshes not associated with other transactions
   5740  * and (2) refreshes in an error state.
   5741  */
   5742 export interface TransactionRefresh extends TransactionCommon {
   5743   type: TransactionType.Refresh;
   5744   refreshReason: RefreshReason;
   5745   /**
   5746    * Transaction ID that caused this refresh.
   5747    */
   5748   originatingTransactionId?: string;
   5749   /**
   5750    * Always zero for refreshes
   5751    */
   5752   amountRaw: AmountString;
   5753   /**
   5754    * Fees, i.e. the effective, negative effect of the refresh
   5755    * on the balance.
   5756    *
   5757    * Only applicable for stand-alone refreshes, and zero for
   5758    * other refreshes where the transaction itself accounts for the
   5759    * refresh fee.
   5760    */
   5761   amountEffective: AmountString;
   5762   refreshInputAmount: AmountString;
   5763   refreshOutputAmount: AmountString;
   5764 }
   5765 ```
   5766 ```typescript
   5767 /**
   5768  * Reasons for why a coin is being refreshed.
   5769  */
   5770 export declare enum RefreshReason {
   5771   Manual = "manual",
   5772   PayMerchant = "pay-merchant",
   5773   PayDeposit = "pay-deposit",
   5774   PayPeerPush = "pay-peer-push",
   5775   PayPeerPull = "pay-peer-pull",
   5776   Refund = "refund",
   5777   AbortPay = "abort-pay",
   5778   AbortDeposit = "abort-deposit",
   5779   AbortPeerPushDebit = "abort-peer-push-debit",
   5780   AbortPeerPullDebit = "abort-peer-pull-debit",
   5781   Recoup = "recoup",
   5782   BackupRestored = "backup-restored",
   5783   Scheduled = "scheduled",
   5784 }
   5785 ```
   5786 ```typescript
   5787 /**
   5788  * Deposit transaction, which effectively sends
   5789  * money from this wallet somewhere else.
   5790  */
   5791 export interface TransactionDeposit extends TransactionCommon {
   5792   type: TransactionType.Deposit;
   5793   depositGroupId: string;
   5794   /**
   5795    * Target for the deposit.
   5796    */
   5797   targetPaytoUri: string;
   5798   /**
   5799    * Raw amount that is being deposited
   5800    */
   5801   amountRaw: AmountString;
   5802   /**
   5803    * Deposit account public key.
   5804    */
   5805   accountPub: string;
   5806   /**
   5807    * Effective amount that is being deposited
   5808    */
   5809   amountEffective: AmountString;
   5810   wireTransferDeadline: TalerProtocolTimestamp;
   5811   wireTransferProgress: number;
   5812   /**
   5813    * Did all the deposit requests succeed?
   5814    */
   5815   deposited: boolean;
   5816   trackingState: Array<DepositTransactionTrackingState>;
   5817 }
   5818 ```
   5819 ```typescript
   5820 export interface DepositTransactionTrackingState {
   5821   wireTransferId: string;
   5822   timestampExecuted: TalerProtocolTimestamp;
   5823   amountRaw: AmountString;
   5824   wireFee: AmountString;
   5825 }
   5826 ```
   5827 ```typescript
   5828 /**
   5829  * Credit because we were paid for a P2P invoice we created.
   5830  */
   5831 export interface TransactionPeerPullCredit extends TransactionCommon {
   5832   type: TransactionType.PeerPullCredit;
   5833   info: PeerInfoShort;
   5834   /**
   5835    * Exchange used.
   5836    */
   5837   exchangeBaseUrl: string;
   5838   /**
   5839    * Amount that got subtracted from the reserve balance.
   5840    */
   5841   amountRaw: AmountString;
   5842   /**
   5843    * Amount that actually was (or will be) added to the wallet's balance.
   5844    */
   5845   amountEffective: AmountString;
   5846   /**
   5847    * URI to send to the other party.
   5848    *
   5849    * Only available in the right state.
   5850    */
   5851   talerUri: string | undefined;
   5852 }
   5853 ```
   5854 ```typescript
   5855 export interface PeerInfoShort {
   5856   expiration: TalerProtocolTimestamp | undefined;
   5857   summary: string | undefined;
   5858   iconId: string | undefined;
   5859 }
   5860 ```
   5861 ```typescript
   5862 /**
   5863  * Debit because we paid someone's invoice.
   5864  */
   5865 export interface TransactionPeerPullDebit extends TransactionCommon {
   5866   type: TransactionType.PeerPullDebit;
   5867   info: PeerInfoShort;
   5868   /**
   5869    * Exchange used.
   5870    */
   5871   exchangeBaseUrl: string;
   5872   amountRaw: AmountString;
   5873   amountEffective: AmountString;
   5874 }
   5875 ```
   5876 ```typescript
   5877 /**
   5878  * We received money via a P2P payment.
   5879  */
   5880 export interface TransactionPeerPushCredit extends TransactionCommon {
   5881   type: TransactionType.PeerPushCredit;
   5882   info: PeerInfoShort;
   5883   /**
   5884    * Exchange used.
   5885    */
   5886   exchangeBaseUrl: string;
   5887   /**
   5888    * Amount that got subtracted from the reserve balance.
   5889    */
   5890   amountRaw: AmountString;
   5891   /**
   5892    * Amount that actually was (or will be) added to the wallet's balance.
   5893    */
   5894   amountEffective: AmountString;
   5895 }
   5896 ```
   5897 ```typescript
   5898 /**
   5899  * We sent money via a P2P payment.
   5900  */
   5901 export interface TransactionPeerPushDebit extends TransactionCommon {
   5902   type: TransactionType.PeerPushDebit;
   5903   info: PeerInfoShort;
   5904   /**
   5905    * Exchange used.
   5906    */
   5907   exchangeBaseUrl: string;
   5908   /**
   5909    * Amount that got subtracted from the reserve balance.
   5910    */
   5911   amountRaw: AmountString;
   5912   /**
   5913    * Amount that actually was (or will be) added to the wallet's balance.
   5914    */
   5915   amountEffective: AmountString;
   5916   /**
   5917    * URI to accept the payment.
   5918    *
   5919    * Only present if the transaction is in a state where the other party can
   5920    * accept the payment.
   5921    */
   5922   talerUri?: string;
   5923 }
   5924 ```
   5925 ```typescript
   5926 /**
   5927  * Internal withdrawal operation, only reported on request.
   5928  *
   5929  * Some transactions (peer-*-credit) internally do a withdrawal,
   5930  * but only the peer-*-credit transaction is reported.
   5931  *
   5932  * The internal withdrawal transaction allows to access the details of
   5933  * the underlying withdrawal for testing/debugging.
   5934  *
   5935  * It is usually not reported, so that amounts of transactions properly
   5936  * add up, since the amountEffecive of the withdrawal is already reported
   5937  * in the peer-*-credit transaction.
   5938  */
   5939 export interface TransactionInternalWithdrawal extends TransactionCommon {
   5940   type: TransactionType.InternalWithdrawal;
   5941   /**
   5942    * Exchange of the withdrawal.
   5943    */
   5944   exchangeBaseUrl: string;
   5945   /**
   5946    * Amount that got subtracted from the reserve balance.
   5947    */
   5948   amountRaw: AmountString;
   5949   /**
   5950    * Amount that actually was (or will be) added to the wallet's balance.
   5951    */
   5952   amountEffective: AmountString;
   5953   withdrawalDetails: WithdrawalDetails;
   5954 }
   5955 ```
   5956 ```typescript
   5957 /**
   5958  * The exchange revoked a key and the wallet recoups funds.
   5959  */
   5960 export interface TransactionRecoup extends TransactionCommon {
   5961   type: TransactionType.Recoup;
   5962 }
   5963 ```
   5964 ```typescript
   5965 /**
   5966  * A transaction to indicate financial loss due to denominations
   5967  * that became unusable for deposits.
   5968  */
   5969 export interface TransactionDenomLoss extends TransactionCommon {
   5970   type: TransactionType.DenomLoss;
   5971   lossEventType: DenomLossEventType;
   5972   exchangeBaseUrl: string;
   5973 }
   5974 ```
   5975 ```typescript
   5976 export declare enum DenomLossEventType {
   5977   DenomExpired = "denom-expired",
   5978   DenomVanished = "denom-vanished",
   5979   DenomUnoffered = "denom-unoffered",
   5980 }
   5981 ```
   5982 ```typescript
   5983 export interface AbortTransactionRequest {
   5984   transactionId: TransactionIdStr;
   5985 }
   5986 ```
   5987 ```typescript
   5988 export interface WithdrawUriInfoResponse {
   5989   operationId: string;
   5990   status: WithdrawalOperationStatusFlag;
   5991   confirmTransferUrl?: string;
   5992   currency: string;
   5993   amount: AmountString | undefined;
   5994   /**
   5995    * Set to true if the user is allowed to edit the amount.
   5996    *
   5997    * Note that even with a non-editable amount, the amount
   5998    * might be undefined at the beginning of the withdrawal
   5999    * process.
   6000    */
   6001   editableAmount: boolean;
   6002   maxAmount: AmountString | undefined;
   6003   wireFee: AmountString | undefined;
   6004   defaultExchangeBaseUrl?: string;
   6005   editableExchange: boolean;
   6006   possibleExchanges: ExchangeListItem[];
   6007 }
   6008 ```
   6009 ```typescript
   6010 export type WithdrawalOperationStatusFlag =
   6011   | "pending"
   6012   | "selected"
   6013   | "aborted"
   6014   | "confirmed";
   6015 ```
   6016 ```typescript
   6017 /**
   6018  * Info about an exchange entry in the wallet.
   6019  */
   6020 export interface ExchangeListItem {
   6021   exchangeBaseUrl: string;
   6022   masterPub: string | undefined;
   6023   currency: string;
   6024   paytoUris: string[];
   6025   tosStatus: ExchangeTosStatus;
   6026   exchangeEntryStatus: ExchangeEntryStatus;
   6027   exchangeUpdateStatus: ExchangeUpdateStatus;
   6028   ageRestrictionOptions: number[];
   6029   walletKycStatus?: ExchangeWalletKycStatus;
   6030   walletKycReservePub?: string;
   6031   walletKycAccessToken?: string;
   6032   walletKycUrl?: string;
   6033   /** Threshold that we've requested to satisfy. */
   6034   walletKycRequestedThreshold?: string;
   6035   /**
   6036    * P2P payments are disabled with this exchange
   6037    * (e.g. because no global fees are configured).
   6038    */
   6039   peerPaymentsDisabled: boolean;
   6040   directDepositsDisabled: boolean;
   6041   /** Set to true if this exchange doesn't charge any fees. */
   6042   noFees: boolean;
   6043   /** Most general scope that the exchange is a part of. */
   6044   scopeInfo: ScopeInfo;
   6045   /**
   6046    * Instructs wallets to use certain bank-specific
   6047    * language (for buttons) and/or other UI/UX customization
   6048    * for compliance with the rules of that bank.
   6049    */
   6050   bankComplianceLanguage?: string;
   6051   lastUpdateTimestamp: TalerPreciseTimestamp | undefined;
   6052   /**
   6053    * Information about the last error that occurred when trying
   6054    * to update the exchange info.
   6055    */
   6056   lastUpdateErrorInfo?: OperationErrorInfo;
   6057 }
   6058 ```
   6059 ```typescript
   6060 export declare enum ExchangeTosStatus {
   6061   Pending = "pending",
   6062   Proposed = "proposed",
   6063   Accepted = "accepted",
   6064   MissingTos = "missing-tos",
   6065 }
   6066 ```
   6067 ```typescript
   6068 export declare enum ExchangeEntryStatus {
   6069   Preset = "preset",
   6070   Ephemeral = "ephemeral",
   6071   Used = "used",
   6072 }
   6073 ```
   6074 ```typescript
   6075 export declare enum ExchangeUpdateStatus {
   6076   Initial = "initial",
   6077   InitialUpdate = "initial-update",
   6078   Suspended = "suspended",
   6079   UnavailableUpdate = "unavailable-update",
   6080   Ready = "ready",
   6081   ReadyUpdate = "ready-update",
   6082   OutdatedUpdate = "outdated-update",
   6083 }
   6084 ```
   6085 ```typescript
   6086 export declare enum ExchangeWalletKycStatus {
   6087   Done = "done",
   6088   /**
   6089    * Wallet needs to request KYC status.
   6090    */
   6091   LegiInit = "legi-init",
   6092   /**
   6093    * User requires KYC or AML.
   6094    */
   6095   Legi = "legi",
   6096 }
   6097 ```
   6098 ```typescript
   6099 export interface OperationErrorInfo {
   6100   error: TalerErrorDetail;
   6101 }
   6102 ```
   6103 ```typescript
   6104 export interface ForcedDenomSel {
   6105   denoms: {
   6106     value: AmountString;
   6107     count: number;
   6108   }[];
   6109 }
   6110 ```
   6111 ```typescript
   6112 export interface AcceptWithdrawalResponse {
   6113   confirmTransferUrl?: string;
   6114   transactionId: TransactionIdStr;
   6115 }
   6116 ```
   6117 ```typescript
   6118 /**
   6119  * Result of a prepare pay operation.
   6120  */
   6121 export type PreparePayResult =
   6122   | PreparePayResultInsufficientBalance
   6123   | PreparePayResultAlreadyConfirmed
   6124   | PreparePayResultPaymentPossible
   6125   | PreparePayResultChoiceSelection;
   6126 ```
   6127 ```typescript
   6128 export interface PreparePayResultInsufficientBalance {
   6129   status: PreparePayResultType.InsufficientBalance;
   6130   transactionId: TransactionIdStr;
   6131   /**
   6132    * Scopes involved in this transaction.
   6133    *
   6134    * For the insufficient balance response, contains scopes
   6135    * of *possible* payment providers.
   6136    */
   6137   scopes: ScopeInfo[];
   6138   contractTerms: MerchantContractTermsV0;
   6139   amountRaw: AmountString;
   6140   talerUri: string;
   6141   balanceDetails: PaymentInsufficientBalanceDetails;
   6142 }
   6143 ```
   6144 ```typescript
   6145 /**
   6146  * Detailed reason for why the wallet's balance is insufficient.
   6147  */
   6148 export interface PaymentInsufficientBalanceDetails {
   6149   /**
   6150    * Amount requested by the merchant.
   6151    */
   6152   amountRequested: AmountString;
   6153   /**
   6154    * Wire method for the requested payment, only applicable
   6155    * for merchant payments.
   6156    */
   6157   wireMethod?: string | undefined;
   6158   /**
   6159    * Hint as to why the balance is insufficient.
   6160    *
   6161    * If this hint is not provided, the balance hints of
   6162    * the individual exchanges should be shown, as the overall
   6163    * reason might be a combination of the reasons for different exchanges.
   6164    */
   6165   causeHint?: InsufficientBalanceHint;
   6166   /**
   6167    * Balance of type "available" (see balance.ts for definition).
   6168    */
   6169   balanceAvailable: AmountString;
   6170   /**
   6171    * Balance of type "material" (see balance.ts for definition).
   6172    */
   6173   balanceMaterial: AmountString;
   6174   /**
   6175    * Balance of type "age-acceptable" (see balance.ts for definition).
   6176    */
   6177   balanceAgeAcceptable: AmountString;
   6178   /**
   6179    * Balance of type "receiver-acceptable" (see balance.ts for definition).
   6180    *
   6181    * @deprecated (2025-12-05) use balanceReceiver[...]Acceptable instead.
   6182    */
   6183   balanceReceiverAcceptable: AmountString;
   6184   /**
   6185    * Balance of type "receiver-exchange-url-acceptable" (see balance.ts for definition).
   6186    */
   6187   balanceReceiverExchangeUrlAcceptable: AmountString;
   6188   /**
   6189    * Balance of type "receiver-exchange-pub-acceptable" (see balance.ts for definition).
   6190    */
   6191   balanceReceiverExchangePubAcceptable: AmountString;
   6192   /**
   6193    * Balance of type "receiver-auditor-url-acceptable" (see balance.ts for definition).
   6194    */
   6195   balanceReceiverAuditorUrlAcceptable: AmountString;
   6196   /**
   6197    * Balance of type "merchant-depositable" (see balance.ts for definition).
   6198    */
   6199   balanceReceiverDepositable: AmountString;
   6200   balanceExchangeDepositable: AmountString;
   6201   /**
   6202    * Maximum effective amount that the wallet can spend,
   6203    * when all fees are paid by the wallet.
   6204    */
   6205   maxEffectiveSpendAmount: AmountString;
   6206   perExchange: {
   6207     [url: string]: {
   6208       balanceAvailable: AmountString;
   6209       balanceMaterial: AmountString;
   6210       balanceExchangeDepositable: AmountString;
   6211       balanceAgeAcceptable: AmountString;
   6212       /**
   6213        * @deprecated (2025-12-05) use balanceReceiver[...]Acceptable instead.
   6214        */
   6215       balanceReceiverAcceptable: AmountString;
   6216       balanceReceiverExchangeUrlAcceptable: AmountString;
   6217       balanceReceiverExchangePubAcceptable: AmountString;
   6218       balanceReceiverAuditorUrlAcceptable: AmountString;
   6219       balanceReceiverDepositable: AmountString;
   6220       maxEffectiveSpendAmount: AmountString;
   6221       /**
   6222        * The exchange master public key configured by the merchant
   6223        * backend differs from the one of the coins stored in the wallet.
   6224        */
   6225       exchangeMasterPubMismatch: boolean;
   6226       /**
   6227        * Exchange doesn't have global fees configured for the relevant year,
   6228        * p2p payments aren't possible.
   6229        *
   6230        * @deprecated (2025-02-18) use causeHint instead
   6231        */
   6232       missingGlobalFees: boolean;
   6233       /**
   6234        * Hint that UIs should show to explain the insufficient
   6235        * balance.
   6236        */
   6237       causeHint?: InsufficientBalanceHint | undefined;
   6238     };
   6239   };
   6240 }
   6241 ```
   6242 ```typescript
   6243 export declare enum InsufficientBalanceHint {
   6244   /**
   6245    *  Merchant doesn't accept money from exchange(s) that the wallet supports.
   6246    */
   6247   MerchantAcceptInsufficient = "merchant-accept-insufficient",
   6248   /**
   6249    * Merchant accepts funds from a matching exchange, but the funds can't be
   6250    * deposited with the wire method.
   6251    */
   6252   MerchantDepositInsufficient = "merchant-deposit-insufficient",
   6253   /**
   6254    * While in principle the balance is sufficient,
   6255    * the age restriction on coins causes the spendable
   6256    * balance to be insufficient.
   6257    */
   6258   AgeRestricted = "age-restricted",
   6259   /**
   6260    * Wallet has enough available funds,
   6261    * but the material funds are insufficient. Usually because there is a
   6262    * pending refresh operation.
   6263    */
   6264   WalletBalanceMaterialInsufficient = "wallet-balance-material-insufficient",
   6265   /**
   6266    * The wallet simply doesn't have enough available funds.
   6267    * This is the "obvious" case of insufficient balance.
   6268    */
   6269   WalletBalanceAvailableInsufficient = "wallet-balance-available-insufficient",
   6270   /**
   6271    * Exchange is missing the global fee configuration, thus fees are unknown
   6272    * and funds from this exchange can't be used for p2p payments.
   6273    */
   6274   ExchangeMissingGlobalFees = "exchange-missing-global-fees",
   6275   /**
   6276    * Even though the balance looks sufficient for the instructed amount,
   6277    * the fees can be covered by neither the merchant nor the remaining wallet
   6278    * balance.
   6279    */
   6280   FeesNotCovered = "fees-not-covered",
   6281 }
   6282 ```
   6283 ```typescript
   6284 export interface PreparePayResultAlreadyConfirmed {
   6285   status: PreparePayResultType.AlreadyConfirmed;
   6286   transactionId: TransactionIdStr;
   6287   contractTerms: MerchantContractTerms;
   6288   paid: boolean;
   6289   amountRaw: AmountString;
   6290   amountEffective: AmountString | undefined;
   6291   /**
   6292    * Scopes involved in this transaction.
   6293    */
   6294   scopes: ScopeInfo[];
   6295   contractTermsHash: string;
   6296   talerUri: string;
   6297 }
   6298 ```
   6299 ```typescript
   6300 /**
   6301  * Payment is possible.
   6302  *
   6303  * This response is only returned for v0 contracts
   6304  * or when v1 are not enabled yet.
   6305  */
   6306 export interface PreparePayResultPaymentPossible {
   6307   status: PreparePayResultType.PaymentPossible;
   6308   transactionId: TransactionIdStr;
   6309   contractTerms: MerchantContractTermsV0;
   6310   /**
   6311    * Scopes involved in this transaction.
   6312    */
   6313   scopes: ScopeInfo[];
   6314   amountRaw: AmountString;
   6315   amountEffective: AmountString;
   6316   /**
   6317    * FIXME: Unclear why this is needed.  Remove?
   6318    */
   6319   contractTermsHash: string;
   6320   /**
   6321    * FIXME: Unclear why this is needed!  Remove?
   6322    */
   6323   talerUri: string;
   6324 }
   6325 ```
   6326 ```typescript
   6327 /**
   6328  * Unconfirmed contract v1 payment.
   6329  */
   6330 export interface PreparePayResultChoiceSelection {
   6331   status: PreparePayResultType.ChoiceSelection;
   6332   transactionId: TransactionIdStr;
   6333   contractTerms: MerchantContractTerms;
   6334   contractTermsHash: string;
   6335   talerUri: string;
   6336 }
   6337 ```
   6338 ```typescript
   6339 /**
   6340  * Forced coin selection for deposits/payments.
   6341  */
   6342 export interface ForcedCoinSel {
   6343   coins: {
   6344     value: AmountString;
   6345     contribution: AmountString;
   6346   }[];
   6347 }
   6348 ```
   6349 ```typescript
   6350 export interface ListDiscountsRequest {
   6351   /**
   6352    * Filter by hash of token issue public key.
   6353    */
   6354   tokenIssuePubHash?: string;
   6355   /**
   6356    * Filter by merchant base URL.
   6357    */
   6358   merchantBaseUrl?: string;
   6359 }
   6360 ```
   6361 ```typescript
   6362 export interface DiscountListDetail {
   6363   /**
   6364    * Hash of token family info.
   6365    */
   6366   tokenFamilyHash: string;
   6367   /**
   6368    * Hash of token issue public key.
   6369    */
   6370   tokenIssuePubHash: string;
   6371   /**
   6372    * URL of the merchant issuing the token.
   6373    */
   6374   merchantBaseUrl: string;
   6375   /**
   6376    * Human-readable name for the token family.
   6377    */
   6378   name: string;
   6379   /**
   6380    * Human-readable description for the token family.
   6381    */
   6382   description: string;
   6383   /**
   6384    * Optional map from IETF BCP 47 language tags to localized descriptions.
   6385    */
   6386   descriptionI18n: any | undefined;
   6387   /**
   6388    * Start time of the token's validity period.
   6389    */
   6390   validityStart: Timestamp;
   6391   /**
   6392    * End time of the token's validity period.
   6393    */
   6394   validityEnd: Timestamp;
   6395   /**
   6396    * Number of tokens available to use.
   6397    */
   6398   tokensAvailable: number;
   6399 }
   6400 ```
   6401 ```typescript
   6402 export interface WalletBankAccountInfo {
   6403   bankAccountId: string;
   6404   paytoUri: string;
   6405   /**
   6406    * Did we previously complete a KYC process for this bank account?
   6407    *
   6408    * @deprecated no enough information since the kyc can be completed for one exchange but not for another
   6409    * https://bugs.gnunet.org/view.php?id=9696
   6410    */
   6411   kycCompleted: boolean;
   6412   /**
   6413    * Currencies supported by the bank, if known.
   6414    */
   6415   currencies: string[] | undefined;
   6416   label: string | undefined;
   6417 }
   6418 ```
   6419 ```typescript
   6420 export interface AcceptExchangeTosRequest {
   6421   exchangeBaseUrl: string;
   6422 }
   6423 ```
   6424 ```typescript
   6425 export interface WireTypeDetails {
   6426   paymentTargetType: string;
   6427   /**
   6428    * Only applicable for payment target type IBAN.
   6429    *
   6430    * Specifies whether the user wants to preferably
   6431    * enter their bank account details as an IBAN
   6432    * or as a BBAN.
   6433    *
   6434    * Mandatory for paymentTargetType="iban".
   6435    */
   6436   preferredEntryType?: "iban" | "bban";
   6437   /**
   6438    * Allowed hostnames for the deposit payto URI.
   6439    * Only applicable to x-taler-bank.
   6440    */
   6441   talerBankHostnames?: string[];
   6442 }
   6443 ```
   6444 ```typescript
   6445 export interface BackupRecovery {
   6446   walletRootPriv: string;
   6447   providers: {
   6448     name: string;
   6449     url: string;
   6450   }[];
   6451 }
   6452 ```
   6453 ```typescript
   6454 export interface CheckPeerPushDebitRequest {
   6455   /**
   6456    * Preferred exchange to use for the p2p payment.
   6457    */
   6458   exchangeBaseUrl?: string;
   6459   /**
   6460    * Instructed amount.
   6461    *
   6462    * FIXME: Allow specifying the instructed amount type.
   6463    */
   6464   amount: AmountString;
   6465   /**
   6466    * Restrict the scope of funds that can be spent via the given
   6467    * scope info.
   6468    */
   6469   restrictScope?: ScopeInfo;
   6470   /**
   6471    * ID provided by the client to cancel the request.
   6472    *
   6473    * If the same request is made again with the same clientCancellationId,
   6474    * all previous requests are cancelled.
   6475    *
   6476    * The cancelled request will receive an error response with
   6477    * an error code that indicates the cancellation.
   6478    *
   6479    * The cancellation is best-effort, responses might still arrive.
   6480    */
   6481   clientCancellationId?: string;
   6482 }
   6483 ```
   6484 ```typescript
   6485 export interface CheckPeerPushDebitOkResponse {
   6486   type: "ok";
   6487   amountRaw: AmountString;
   6488   amountEffective: AmountString;
   6489   /**
   6490    * Exchange base URL.
   6491    */
   6492   exchangeBaseUrl: string;
   6493   /**
   6494    * Maximum expiration date, based on how close the coins
   6495    * used for the payment are to expiry.
   6496    *
   6497    * The value is based on when the wallet would typically
   6498    * automatically refresh the coins on its own, leaving enough
   6499    * time to get a refund for the push payment and refresh the
   6500    * coin.
   6501    */
   6502   maxExpirationDate: TalerProtocolTimestamp;
   6503 }
   6504 ```
   6505 ```typescript
   6506 /**
   6507  * Contract terms between two wallets (as opposed to a merchant and wallet).
   6508  */
   6509 export interface PeerContractTerms {
   6510   amount: AmountString;
   6511   summary: string;
   6512   icon_id?: string;
   6513   purse_expiration: TalerProtocolTimestamp;
   6514 }
   6515 ```
   6516 ```typescript
   6517 export interface WithdrawTestBalanceResult {
   6518   /**
   6519    * Transaction ID of the newly created withdrawal transaction.
   6520    */
   6521   transactionId: TransactionIdStr;
   6522   /**
   6523    * Account of the user registered for the withdrawal.
   6524    */
   6525   accountPaytoUri: string;
   6526 }
   6527 ```