taler-docs

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

wallet-core.md (205209B)


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