taler-docs

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

wallet-core.md (207351B)


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