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