commit 8f86af36379b3faef92e4afa5d9d11e1ebac4eaf
parent 8e57c050846c34331eb7618794ee5c6802b92023
Author: Florian Dold <florian@dold.me>
Date: Fri, 5 Jun 2026 16:31:53 +0200
update wallet-core docs
Diffstat:
| M | wallet/wallet-core.md | | | 1052 | ++++++++++++++++++++++++++++++++++++++++++------------------------------------- |
1 file changed, 563 insertions(+), 489 deletions(-)
diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md
@@ -52,10 +52,12 @@ This file is auto-generated from the [taler-typescript-core](https://git.taler.n
* [AcceptManualWithdrawalOp](#acceptmanualwithdrawalop)
### Merchant Payments
* [PreparePayForUriOp](#preparepayforuriop)
+* [PreparePayForTemplateOp](#preparepayfortemplateop)
+* [PreparePayForUriV2Op](#preparepayforuriv2op)
+* [PreparePayForTemplateV2Op](#preparepayfortemplatev2op)
* [GetChoicesForPaymentOp](#getchoicesforpaymentop)
* [SharePaymentOp](#sharepaymentop)
* [CheckPayForTemplateOp](#checkpayfortemplateop)
-* [PreparePayForTemplateOp](#preparepayfortemplateop)
* [ConfirmPayOp](#confirmpayop)
* [StartRefundQueryForUriOp](#startrefundqueryforuriop)
* [StartRefundQueryOp](#startrefundqueryop)
@@ -90,25 +92,17 @@ This file is auto-generated from the [taler-typescript-core](https://git.taler.n
* [GetDepositWireTypesOp](#getdepositwiretypesop)
* [GetDepositWireTypesForCurrencyOp](#getdepositwiretypesforcurrencyop)
* [GetExchangeDetailedInfoOp](#getexchangedetailedinfoop)
+* [GetDefaultExchangesOp](#getdefaultexchangesop)
* [GetExchangeEntryByUrlOp](#getexchangeentrybyurlop)
* [GetExchangeResourcesOp](#getexchangeresourcesop)
* [DeleteExchangeOp](#deleteexchangeop)
* [GetCurrencySpecificationOp](#getcurrencyspecificationop)
### Deposits
-* [GenerateDepositGroupTxIdOp](#generatedepositgrouptxidop)
* [CreateDepositGroupOp](#createdepositgroupop)
* [CheckDepositOp](#checkdepositop)
### Backups
-* [ExportBackupRecoveryOp](#exportbackuprecoveryop)
-* [ImportBackupRecoveryOp](#importbackuprecoveryop)
-* [RunBackupCycleOp](#runbackupcycleop)
-* [ExportBackupOp](#exportbackupop)
* [ExportDbToFileOp](#exportdbtofileop)
* [ImportDbFromFileOp](#importdbfromfileop)
-* [AddBackupProviderOp](#addbackupproviderop)
-* [RemoveBackupProviderOp](#removebackupproviderop)
-* [GetBackupInfoOp](#getbackupinfoop)
-* [SetWalletDeviceIdOp](#setwalletdeviceidop)
* [ListStoredBackupsOp](#liststoredbackupsop)
* [CreateStoredBackupsOp](#createstoredbackupsop)
* [RecoverStoredBackupsOp](#recoverstoredbackupsop)
@@ -152,12 +146,15 @@ This file is auto-generated from the [taler-typescript-core](https://git.taler.n
* [TestingWaitRefreshesFinalOp](#testingwaitrefreshesfinalop)
* [TestingWaitTransactionStateOp](#testingwaittransactionstateop)
* [TestingWaitExchangeStateOp](#testingwaitexchangestateop)
+* [TestingWaitExchangeReadyOp](#testingwaitexchangereadyop)
* [TestingPingOp](#testingpingop)
* [TestingGetReserveHistoryOp](#testinggetreservehistoryop)
* [TestingResetAllRetriesOp](#testingresetallretriesop)
* [TestingGetDenomStatsOp](#testinggetdenomstatsop)
* [TestingRunFixupOp](#testingrunfixupop)
* [TestingGetDiagnosticsOp](#testinggetdiagnosticsop)
+* [TestingGetFlightRecordsOp](#testinggetflightrecordsop)
+* [TestingCorruptWithdrawalCoinSelOp](#testingcorruptwithdrawalcoinselop)
* [SetCoinSuspendedOp](#setcoinsuspendedop)
* [ForceRefreshOp](#forcerefreshop)
## Operation Reference
@@ -539,6 +536,8 @@ export type GetBalancesOp = {
export interface BalancesResponse {
/** Electronic cash balances, per currency scope. */
balances: WalletBalance[];
+ /** Does the user have non-demo money? */
+ haveProdBalance: boolean;
donauSummary?: DonauSummaryItem[];
}
@@ -1351,17 +1350,18 @@ export interface AcceptManualWithdrawalRequest {
```typescript
export interface AcceptManualWithdrawalResult {
/**
- * Payto URIs that can be used to fund the withdrawal.
- *
- * @deprecated in favor of withdrawalAccountsList
+ * Transaction ID of the newly created withdrawal transaction.
*/
- exchangePaytoUris: string[];
+ transactionId: TransactionIdStr;
/**
* Public key of the newly created reserve.
*/
reservePub: string;
+ /**
+ * Bank accounts of the exchange that can be used
+ * to fund the withdrawal.
+ */
withdrawalAccountsList: WithdrawalExchangeAccountDetails[];
- transactionId: TransactionIdStr;
}
```
@@ -1379,10 +1379,46 @@ export type PreparePayForUriOp = {
// PreparePayForUri = "preparePayForUri"
```
+
+### PreparePayForTemplateOp
```typescript
-export interface PreparePayRequest {
- talerPayUri: string;
-}
+/**
+ * Prepare to make a payment based on a taler://pay-template/ URI.
+ */
+export type PreparePayForTemplateOp = {
+ op: WalletApiOperation.PreparePayForTemplate;
+ request: PreparePayTemplateRequest;
+ response: PreparePayResult;
+};
+// PreparePayForTemplate = "preparePayForTemplate"
+
+```
+
+### PreparePayForUriV2Op
+```typescript
+/**
+ * Prepare to make a payment based on a taler://pay/ URI.
+ */
+export type PreparePayForUriV2Op = {
+ op: WalletApiOperation.PreparePayForUriV2;
+ request: PreparePayRequest;
+ response: PreparePayV2Result;
+};
+// PreparePayForUriV2 = "preparePayForUriV2"
+
+```
+
+### PreparePayForTemplateV2Op
+```typescript
+/**
+ * Prepare to make a payment based on a taler://pay-template/ URI.
+ */
+export type PreparePayForTemplateV2Op = {
+ op: WalletApiOperation.PreparePayForTemplateV2;
+ request: PreparePayTemplateRequest;
+ response: PreparePayV2Result;
+};
+// PreparePayForTemplateV2 = "preparePayForTemplateV2"
```
@@ -1473,6 +1509,7 @@ export interface ChoiceSelectionDetailPaymentPossible {
status: ChoiceSelectionDetailType.PaymentPossible;
amountRaw: AmountString;
amountEffective: AmountString;
+ scopeInfo: ScopeInfo | undefined;
tokenDetails?: PaymentTokenAvailabilityDetails;
}
@@ -1572,65 +1609,180 @@ export interface CheckPayTemplateRequest {
```
```typescript
export type CheckPayTemplateReponse = {
- templateDetails: WalletTemplateDetails;
+ templateDetails: WalletTemplateDetailsResponse;
supportedCurrencies: string[];
};
```
```typescript
-export interface WalletTemplateDetails {
+export interface WalletTemplateDetailsResponse {
template_contract: TemplateContractDetails;
editable_defaults?: TemplateContractDetailsDefaults;
+ required_currency?: string;
}
```
```typescript
-export interface TemplateContractDetails {
- summary?: string;
- currency?: string;
+export type TemplateContractDetails =
+ | TemplateContractFixedOrder
+ | TemplateContractInventoryCart
+ | TemplateContractPaivana;
+
+```
+```typescript
+export interface TemplateContractFixedOrder extends TemplateContractCommon {
+ template_type: TemplateType.FIXED_ORDER;
amount?: AmountString;
- minimum_age: Integer;
- pay_duration: RelativeTime;
}
```
```typescript
-export interface TemplateContractDetailsDefaults {
+export interface TemplateContractCommon {
+ template_type: TemplateType;
summary?: string;
currency?: string;
- /**
- * Amount *or* a plain currency string.
- */
- amount?: string;
+ pay_duration?: RelativeTime;
+ max_pickup_duration?: RelativeTime;
+ minimum_age?: Integer;
+ request_tip?: boolean;
}
```
+```typescript
+export declare enum TemplateType {
+ FIXED_ORDER = "fixed-order",
+ INVENTORY_CART = "inventory-cart",
+ PAIVANA = "paivana",
+}
-### PreparePayForTemplateOp
+```
```typescript
-/**
- * Prepare to make a payment based on a taler://pay-template/ URI.
- */
-export type PreparePayForTemplateOp = {
- op: WalletApiOperation.PreparePayForTemplate;
- request: PreparePayTemplateRequest;
- response: PreparePayResult;
-};
-// PreparePayForTemplate = "preparePayForTemplate"
+export interface TemplateContractInventoryCart extends TemplateContractCommon {
+ template_type: TemplateType.INVENTORY_CART;
+ selected_all?: boolean;
+ selected_categories?: Integer[];
+ selected_products?: string[];
+ choose_one?: boolean;
+ inventory_payload?: InventoryPayload;
+}
```
```typescript
-export interface PreparePayTemplateRequest {
- talerPayTemplateUri: string;
- templateParams?: TemplateParams;
+export interface InventoryPayload {
+ products: InventoryPayloadProduct[];
+ categories: InventoryPayloadCategory[];
+ units: InventoryPayloadUnit[];
}
```
```typescript
-export type TemplateParams = {
- amount?: string;
+export interface InventoryPayloadProduct {
+ product_id: string;
+ product_name: string;
+ description: string;
+ description_i18n?: {
+ [lang_tag: string]: string;
+ };
+ unit: string;
+ unit_prices: AmountString[];
+ unit_allow_fraction: boolean;
+ unit_precision_level: Integer;
+ remaining_stock: DecimalQuantity;
+ categories: Integer[];
+ taxes?: Tax[];
+ image_hash?: string;
+}
+
+```
+```typescript
+export interface InventoryPayloadCategory {
+ category_id: Integer;
+ category_name: string;
+ category_name_i18n?: {
+ [lang_tag: string]: string;
+ };
+}
+
+```
+```typescript
+export interface InventoryPayloadUnit {
+ unit: string;
+ unit_name_long: string;
+ unit_name_long_i18n?: {
+ [lang_tag: string]: string;
+ };
+ unit_name_short: string;
+ unit_name_short_i18n?: {
+ [lang_tag: string]: string;
+ };
+ unit_allow_fraction: boolean;
+ unit_precision_level: Integer;
+}
+
+```
+```typescript
+export interface TemplateContractPaivana extends TemplateContractCommon {
+ template_type: TemplateType.PAIVANA;
+ website_regex?: string;
+ choices: OrderChoice[];
+}
+
+```
+```typescript
+export interface OrderChoice {
+ amount: AmountString;
+ description?: string;
+ description_i18n?: InternationalizedString;
+ inputs?: OrderInput[];
+ outputs?: OrderOutput[];
+ max_fee?: AmountString;
+}
+
+```
+```typescript
+export interface OrderInputToken {
+ type: OrderInputType.Token;
+ token_family_slug: string;
+ count?: Integer;
+}
+
+```
+```typescript
+export type OrderOutput = OrderOutputToken | OrderOutputTaxReceipt;
+
+```
+```typescript
+export interface OrderOutputToken {
+ type: OrderOutputType.Token;
+ token_family_slug: string;
+ count?: Integer;
+ valid_at?: TalerPreciseTimestamp;
+}
+
+```
+```typescript
+export interface OrderOutputTaxReceipt {
+ type: OrderOutputType.TaxReceipt;
+ amount?: AmountString;
+ donau_urls: string[];
+}
+
+```
+```typescript
+/**
+ * Key-value pairs matching a subset of the
+ * fields from template_contract that are
+ * user-editable defaults for this template.
+ * Since protocol **v13**.
+ */
+export interface TemplateContractDetailsDefaults {
summary?: string;
-};
+ currency?: string;
+ /**
+ * Amount *or* a plain currency string.
+ */
+ amount?: string;
+}
```
@@ -2007,11 +2159,24 @@ export interface ListExchangesRequest {
* Filter results to only include exchanges in the given scope.
*/
filterByScope?: ScopeInfo;
+ /**
+ * Filter results to only include exchanges
+ * with the given status.
+ */
filterByExchangeEntryStatus?: ExchangeEntryStatus;
+ /**
+ * Filter results to only include exchanges with the
+ * given type.
+ */
+ filterByType?: ExchangeType;
}
```
```typescript
+export type ExchangeType = "demo" | "prod";
+
+```
+```typescript
export interface ExchangesListResponse {
exchanges: ExchangeListItem[];
}
@@ -2178,6 +2343,13 @@ export interface AddExchangeResponse {
```typescript
/**
* Update an exchange entry.
+ *
+ * Only starts updating the exchange entry.
+ * After this request finishes, it is not guaranteed that
+ * the exchange entry has been updated.
+ *
+ * Use notifications and the listExchanges request
+ * to check the status.
*/
export type UpdateExchangeEntryOp = {
op: WalletApiOperation.UpdateExchangeEntry;
@@ -2574,6 +2746,8 @@ export interface WireFee {
export interface ExchangeWireAccount {
payto_uri: string;
conversion_url?: string;
+ open_banking_gateway?: string;
+ prepared_transfer_url?: string;
credit_restrictions: AccountRestriction[];
debit_restrictions: AccountRestriction[];
master_sig: EddsaSignatureString;
@@ -2602,6 +2776,41 @@ export interface FeeDescription {
```
+### GetDefaultExchangesOp
+```typescript
+/**
+ * Get the current terms of a service of an exchange.
+ */
+export type GetDefaultExchangesOp = {
+ op: WalletApiOperation.GetDefaultExchanges;
+ request: EmptyObject;
+ response: GetDefaultExchangesResponse;
+};
+// GetDefaultExchanges = "getDefaultExchanges"
+
+```
+```typescript
+export interface GetDefaultExchangesResponse {
+ defaultExchanges: {
+ /**
+ * A taler://withdraw-exchange URI for the
+ * exchange.
+ */
+ talerUri: string;
+ /**
+ * Currency offered by the exchange.
+ */
+ currency: string;
+ /**
+ * Currency spec for the currency offered
+ * by the exchange.
+ */
+ currencySpec: CurrencySpecification;
+ }[];
+}
+
+```
+
### GetExchangeEntryByUrlOp
```typescript
/**
@@ -2695,30 +2904,6 @@ export interface GetCurrencySpecificationResponse {
```
-### GenerateDepositGroupTxIdOp
-```typescript
-/**
- * Generate a fresh transaction ID for a deposit group.
- *
- * The resulting transaction ID can be specified when creating
- * a deposit group, so that the client can already start waiting for notifications
- * on that specific deposit group before the GreateDepositGroup request returns.
- */
-export type GenerateDepositGroupTxIdOp = {
- op: WalletApiOperation.GenerateDepositGroupTxId;
- request: EmptyObject;
- response: TxIdResponse;
-};
-// GenerateDepositGroupTxId = "generateDepositGroupTxId"
-
-```
-```typescript
-export interface TxIdResponse {
- transactionId: TransactionIdStr;
-}
-
-```
-
### CreateDepositGroupOp
```typescript
/**
@@ -2751,6 +2936,10 @@ export interface CreateDepositGroupRequest {
*/
testingFixedPriv?: string;
/**
+ * Optional wire deadline for the deposits.
+ */
+ wireDeadline?: TalerProtocolTimestamp;
+ /**
* Pre-allocated transaction ID.
* Allows clients to easily handle notifications
* that occur while the operation has been created but
@@ -2848,94 +3037,6 @@ export interface DepositGroupFees {
```
-### ExportBackupRecoveryOp
-```typescript
-/**
- * Export the recovery information for the wallet.
- */
-export type ExportBackupRecoveryOp = {
- op: WalletApiOperation.ExportBackupRecovery;
- request: EmptyObject;
- response: BackupRecovery;
-};
-// ExportBackupRecovery = "exportBackupRecovery"
-
-```
-
-### ImportBackupRecoveryOp
-```typescript
-/**
- * Import recovery information into the wallet.
- */
-export type ImportBackupRecoveryOp = {
- op: WalletApiOperation.ImportBackupRecovery;
- request: RecoveryLoadRequest;
- response: EmptyObject;
-};
-// ImportBackupRecovery = "importBackupRecovery"
-
-```
-```typescript
-/**
- * Load recovery information into the wallet.
- */
-export interface RecoveryLoadRequest {
- recovery: BackupRecovery;
- strategy?: RecoveryMergeStrategy;
-}
-
-```
-```typescript
-/**
- * Strategy for loading recovery information.
- */
-export declare enum RecoveryMergeStrategy {
- /**
- * Keep the local wallet root key, import and take over providers.
- */
- Ours = "ours",
- /**
- * Migrate to the wallet root key from the recovery information.
- */
- Theirs = "theirs",
-}
-
-```
-
-### RunBackupCycleOp
-```typescript
-/**
- * Manually make and upload a backup.
- */
-export type RunBackupCycleOp = {
- op: WalletApiOperation.RunBackupCycle;
- request: RunBackupCycleRequest;
- response: EmptyObject;
-};
-// RunBackupCycle = "runBackupCycle"
-
-```
-```typescript
-export interface RunBackupCycleRequest {
- /**
- * List of providers to backup or empty for all known providers.
- */
- providers?: Array<string>;
-}
-
-```
-
-### ExportBackupOp
-```typescript
-export type ExportBackupOp = {
- op: WalletApiOperation.ExportBackup;
- request: EmptyObject;
- response: EmptyObject;
-};
-// ExportBackup = "exportBackup"
-
-```
-
### ExportDbToFileOp
```typescript
/**
@@ -2946,272 +3047,65 @@ export type ExportBackupOp = {
export type ExportDbToFileOp = {
op: WalletApiOperation.ExportDbToFile;
request: ExportDbToFileRequest;
- response: ExportDbToFileResponse;
-};
-// ExportDbToFile = "exportDbToFile"
-
-```
-```typescript
-export interface ExportDbToFileRequest {
- /**
- * Directory that the DB should be exported into.
- */
- directory: string;
- /**
- * Stem of the exported DB filename.
- *
- * The final name will be ${directory}/${stem}.${extension},
- * where the extension depends on the used DB backend.
- */
- stem: string;
- /**
- * Force the format of the export.
- *
- * Currently only "json" is supported as a forced
- * export format.
- */
- forceFormat?: string;
-}
-
-```
-```typescript
-export interface ExportDbToFileResponse {
- /**
- * Full path to the backup.
- */
- path: string;
-}
-
-```
-
-### ImportDbFromFileOp
-```typescript
-/**
- * Export the database from a file.
- *
- * CAUTION: Overrides existing data.
- */
-export type ImportDbFromFileOp = {
- op: WalletApiOperation.ImportDbFromFile;
- request: ImportDbFromFileRequest;
- response: EmptyObject;
-};
-// ImportDbFromFile = "importDbFromFile"
-
-```
-```typescript
-export interface ImportDbFromFileRequest {
- /**
- * Full path to the backup.
- */
- path: string;
-}
-
-```
-
-### AddBackupProviderOp
-```typescript
-/**
- * Add a new backup provider.
- */
-export type AddBackupProviderOp = {
- op: WalletApiOperation.AddBackupProvider;
- request: AddBackupProviderRequest;
- response: AddBackupProviderResponse;
-};
-// AddBackupProvider = "addBackupProvider"
-
-```
-```typescript
-export interface AddBackupProviderRequest {
- backupProviderBaseUrl: string;
- name: string;
- /**
- * Activate the provider. Should only be done after
- * the user has reviewed the provider.
- */
- activate?: boolean;
-}
-
-```
-```typescript
-export type AddBackupProviderResponse =
- | AddBackupProviderOk
- | AddBackupProviderPaymentRequired;
-
-```
-```typescript
-interface AddBackupProviderOk {
- status: "ok";
-}
-
-```
-```typescript
-interface AddBackupProviderPaymentRequired {
- status: "payment-required";
- talerUri?: string;
-}
-
-```
-
-### RemoveBackupProviderOp
-```typescript
-export type RemoveBackupProviderOp = {
- op: WalletApiOperation.RemoveBackupProvider;
- request: RemoveBackupProviderRequest;
- response: EmptyObject;
-};
-// RemoveBackupProvider = "removeBackupProvider"
-
-```
-```typescript
-export interface RemoveBackupProviderRequest {
- provider: string;
-}
-
-```
-
-### GetBackupInfoOp
-```typescript
-/**
- * Get some useful stats about the backup state.
- */
-export type GetBackupInfoOp = {
- op: WalletApiOperation.GetBackupInfo;
- request: EmptyObject;
- response: BackupInfo;
-};
-// GetBackupInfo = "getBackupInfo"
-
-```
-```typescript
-export interface BackupInfo {
- walletRootPub: string;
- deviceId: string;
- providers: ProviderInfo[];
-}
-
-```
-```typescript
-/**
- * Information about one provider.
- *
- * We don't store the account key here,
- * as that's derived from the wallet root key.
- */
-export interface ProviderInfo {
- active: boolean;
- syncProviderBaseUrl: string;
- name: string;
- terms?: BackupProviderTerms;
- /**
- * Last communication issue with the provider.
- */
- lastError?: TalerErrorDetail;
- lastSuccessfulBackupTimestamp?: TalerPreciseTimestamp;
- lastAttemptedBackupTimestamp?: TalerPreciseTimestamp;
- paymentProposalIds: string[];
- backupProblem?: BackupProblem;
- paymentStatus: ProviderPaymentStatus;
-}
-
-```
-```typescript
-export interface BackupProviderTerms {
- supportedProtocolVersion: string;
- annualFee: AmountString;
- storageLimitInMegabytes: number;
-}
-
-```
-```typescript
-export type BackupProblem =
- | BackupUnreadableProblem
- | BackupConflictingDeviceProblem;
-
-```
-```typescript
-export interface BackupUnreadableProblem {
- type: "backup-unreadable";
-}
-
-```
-```typescript
-export interface BackupConflictingDeviceProblem {
- type: "backup-conflicting-device";
- otherDeviceId: string;
- myDeviceId: string;
- backupTimestamp: AbsoluteTime;
-}
-
-```
-```typescript
-export type ProviderPaymentStatus =
- | ProviderPaymentTermsChanged
- | ProviderPaymentPaid
- | ProviderPaymentInsufficientBalance
- | ProviderPaymentUnpaid
- | ProviderPaymentPending;
-
-```
-```typescript
-export interface ProviderPaymentTermsChanged {
- type: ProviderPaymentType.TermsChanged;
- paidUntil: AbsoluteTime;
- oldTerms: BackupProviderTerms;
- newTerms: BackupProviderTerms;
-}
-
-```
-```typescript
-export interface ProviderPaymentPaid {
- type: ProviderPaymentType.Paid;
- paidUntil: AbsoluteTime;
-}
-
-```
-```typescript
-export interface ProviderPaymentInsufficientBalance {
- type: ProviderPaymentType.InsufficientBalance;
- amount: AmountString;
-}
+ response: ExportDbToFileResponse;
+};
+// ExportDbToFile = "exportDbToFile"
```
```typescript
-export interface ProviderPaymentUnpaid {
- type: ProviderPaymentType.Unpaid;
+export interface ExportDbToFileRequest {
+ /**
+ * Directory that the DB should be exported into.
+ */
+ directory: string;
+ /**
+ * Stem of the exported DB filename.
+ *
+ * The final name will be ${directory}/${stem}.${extension},
+ * where the extension depends on the used DB backend.
+ */
+ stem: string;
+ /**
+ * Force the format of the export.
+ *
+ * Currently only "json" is supported as a forced
+ * export format.
+ */
+ forceFormat?: string;
}
```
```typescript
-export interface ProviderPaymentPending {
- type: ProviderPaymentType.Pending;
- talerUri?: string;
+export interface ExportDbToFileResponse {
+ /**
+ * Full path to the backup.
+ */
+ path: string;
}
```
-### SetWalletDeviceIdOp
+### ImportDbFromFileOp
```typescript
/**
- * Set the internal device ID of the wallet, used to
- * identify whether a different/new wallet is accessing
- * the backup of another wallet.
+ * Export the database from a file.
+ *
+ * CAUTION: Overrides existing data.
*/
-export type SetWalletDeviceIdOp = {
- op: WalletApiOperation.SetWalletDeviceId;
- request: SetWalletDeviceIdRequest;
+export type ImportDbFromFileOp = {
+ op: WalletApiOperation.ImportDbFromFile;
+ request: ImportDbFromFileRequest;
response: EmptyObject;
};
-// SetWalletDeviceId = "setWalletDeviceId"
+// ImportDbFromFile = "importDbFromFile"
```
```typescript
-export interface SetWalletDeviceIdRequest {
+export interface ImportDbFromFileRequest {
/**
- * New wallet device ID to set.
+ * Full path to the backup.
*/
- walletDeviceId: string;
+ path: string;
}
```
@@ -3350,7 +3244,16 @@ export interface InitiatePeerPushDebitRequest {
* scope info.
*/
restrictScope?: ScopeInfo;
- partialContractTerms: PeerContractTerms;
+ partialContractTerms: PartialPeerContractTerms;
+}
+
+```
+```typescript
+export interface PartialPeerContractTerms {
+ amount: AmountString;
+ summary: string;
+ icon_id?: string;
+ purse_expiration?: TalerProtocolTimestamp;
}
```
@@ -3379,8 +3282,14 @@ export type PreparePeerPushCreditOp = {
```
```typescript
+/**
+ * Result of initiating a peer-push-credit payment.
+ *
+ * Either {@link talerUri} or {@link transactionId} must be specified.
+ */
export interface PreparePeerPushCreditRequest {
- talerUri: string;
+ talerUri?: string;
+ transactionId?: string;
}
```
@@ -3528,8 +3437,14 @@ export type PreparePeerPullDebitOp = {
```
```typescript
+/**
+ * Result of initiating a peer-pull-debit payment.
+ *
+ * Either {@link talerUri} or {@link transactionId} must be specified.
+ */
export interface PreparePeerPullDebitRequest {
- talerUri: string;
+ talerUri?: string;
+ transactionId?: string;
}
```
@@ -3647,25 +3562,6 @@ export interface GetQrCodesForPaytoResponse {
}
```
-```typescript
-/**
- * Specification of a QR code that includes payment information.
- */
-export interface QrCodeSpec {
- /**
- * Type of the QR code.
- *
- * Depending on the type, different visual styles
- * might be applied.
- */
- type: string;
- /**
- * Content of the QR code that should be rendered.
- */
- qrContent: string;
-}
-
-```
### ConvertIbanAccountFieldToPaytoOp
```typescript
@@ -4026,8 +3922,8 @@ export interface ActiveTask {
* current running wallet instance are generated from observability events and
* stored in memory.
*
- * Under each table, only the highest duration for each operation
- * (e.g. `getBalances` wallet request) is included.
+ * Under each table, different types of duration for each operation
+ * (e.g. `getBalances` wallet request) are included.
*/
export type GetPerformanceStatsOp = {
op: WalletApiOperation.TestingGetPerformanceStats;
@@ -4040,7 +3936,7 @@ export type GetPerformanceStatsOp = {
```typescript
export interface GetPerformanceStatsRequest {
/**
- * Limit to N largest performance stats of each table.
+ * Limit to N largest average performance stats of each table.
*
* When undefined, all performance stats will be returned.
*/
@@ -4075,32 +3971,47 @@ export type PerformanceStat =
| {
type: PerformanceStatType.HttpFetch;
url: string;
+ avgDurationMs: number;
maxDurationMs: number;
+ minDurationMs: number;
+ totalDurationMs: number;
count: number;
}
| {
type: PerformanceStatType.DbQuery;
name: string;
location: string;
+ avgDurationMs: number;
maxDurationMs: number;
+ minDurationMs: number;
+ totalDurationMs: number;
count: number;
}
| {
type: PerformanceStatType.Crypto;
operation: string;
+ avgDurationMs: number;
maxDurationMs: number;
+ minDurationMs: number;
+ totalDurationMs: number;
count: number;
}
| {
type: PerformanceStatType.WalletRequest;
operation: string;
+ avgDurationMs: number;
maxDurationMs: number;
+ minDurationMs: number;
+ totalDurationMs: number;
count: number;
}
| {
type: PerformanceStatType.WalletTask;
taskId: string;
+ avgDurationMs: number;
maxDurationMs: number;
+ minDurationMs: number;
+ totalDurationMs: number;
count: number;
};
@@ -4112,6 +4023,7 @@ export type ObservabilityEvent =
when: AbsoluteTime;
type: ObservabilityEventType.HttpFetchStart;
url: string;
+ longPolling: boolean;
}
| {
id: string;
@@ -4120,6 +4032,7 @@ export type ObservabilityEvent =
url: string;
status: number;
durationMs: number;
+ longPolling: boolean;
}
| {
id: string;
@@ -4128,6 +4041,7 @@ export type ObservabilityEvent =
url: string;
error: TalerErrorDetail;
durationMs: number;
+ longPolling: boolean;
}
| {
type: ObservabilityEventType.DbQueryStart;
@@ -4489,7 +4403,11 @@ export interface TestingWaitTransactionRequest {
* is reached with an error.
*/
requireError?: boolean;
- txState: TransactionStatePattern | TransactionStatePattern[] | number;
+ txState:
+ | TransactionStatePattern
+ | TransactionStatePattern[]
+ | number
+ | "nonpending";
}
```
@@ -4507,11 +4425,11 @@ export interface TransactionStatePattern {
* Wait until an exchange entry is in a particular state.
*/
export type TestingWaitExchangeStateOp = {
- op: WalletApiOperation.TestingWaitTransactionState;
+ op: WalletApiOperation.TestingWaitExchangeState;
request: TestingWaitExchangeStateRequest;
response: EmptyObject;
};
-// TestingWaitTransactionState = "testingWaitTransactionState"
+// TestingWaitExchangeState = "testingWaitExchangeState"
```
```typescript
@@ -4522,6 +4440,37 @@ export interface TestingWaitExchangeStateRequest {
```
+### TestingWaitExchangeReadyOp
+```typescript
+/**
+ * Wait until an exchange entry is ready.
+ * Returns an error if updating the exchange
+ * failed.
+ */
+export type TestingWaitExchangeReadyOp = {
+ op: WalletApiOperation.TestingWaitExchangeReady;
+ request: TestingWaitExchangeReadyRequest;
+ response: EmptyObject;
+};
+// TestingWaitExchangeReady = "testingWaitExchangeReady"
+
+```
+```typescript
+export interface TestingWaitExchangeReadyRequest {
+ exchangeBaseUrl: string;
+ /**
+ * Do not stop waiting even when the exchange is
+ * in an error state.
+ */
+ noBail?: boolean;
+ /**
+ * Force waiting until an update really happened.
+ */
+ forceUpdate?: boolean;
+}
+
+```
+
### TestingPingOp
```typescript
export type TestingPingOp = {
@@ -4614,16 +4563,20 @@ export interface RunFixupRequest {
### TestingGetDiagnosticsOp
```typescript
export type TestingGetDiagnosticsOp = {
- op: WalletApiOperation.TestingGetDiagnostics;
+ op: WalletApiOperation.GetDiagnostics;
request: EmptyObject;
response: TestingGetDiagnosticsResponse;
};
-// TestingGetDiagnostics = "testingGetDiagnostics"
+// GetDiagnostics = "getDiagnostics"
```
```typescript
export interface TestingGetDiagnosticsResponse {
version: 0;
+ /**
+ * Statistics about the size of object stores.
+ */
+ idbObjectStoreCounts?: Record<string, number>;
exchangeEntries: {
exchangeBaseUrl: string;
numDenoms: number;
@@ -4634,6 +4587,55 @@ export interface TestingGetDiagnosticsResponse {
```
+### TestingGetFlightRecordsOp
+```typescript
+export type TestingGetFlightRecordsOp = {
+ op: WalletApiOperation.TestingGetFlightRecords;
+ request: EmptyObject;
+ response: TestingGetFlightRecordsResponse;
+};
+// TestingGetFlightRecords = "testingGetFlightRecords"
+
+```
+```typescript
+export interface TestingGetFlightRecordsResponse {
+ flightRecords: FlightRecordEntry[];
+}
+
+```
+```typescript
+export interface FlightRecordEntry {
+ timestamp: TalerPreciseTimestamp;
+ target: string;
+ event: FlightRecordEvent;
+}
+
+```
+```typescript
+export declare enum FlightRecordEvent {
+ MeltGone = "melt-gone",
+ WithdrawalRedenominate = "withdrawal-redenominate",
+}
+
+```
+
+### TestingCorruptWithdrawalCoinSelOp
+```typescript
+export type TestingCorruptWithdrawalCoinSelOp = {
+ op: WalletApiOperation.TestingCorruptWithdrawalCoinSel;
+ request: TestingCorruptWithdrawalCoinSelRequest;
+ response: EmptyObject;
+};
+// TestingCorruptWithdrawalCoinSel = "testingCorruptWithdrawalCoinSel"
+
+```
+```typescript
+export interface TestingCorruptWithdrawalCoinSelRequest {
+ transactionId: TransactionIdStr;
+}
+
+```
+
### SetCoinSuspendedOp
```typescript
/**
@@ -4692,7 +4694,6 @@ export interface InitRequest {
```
```typescript
export interface PartialWalletRunConfig {
- builtin?: Partial<WalletRunConfig["builtin"]>;
testing?: Partial<WalletRunConfig["testing"]>;
features?: Partial<WalletRunConfig["features"]>;
lazyTaskLoop?: Partial<WalletRunConfig["lazyTaskLoop"]>;
@@ -4702,14 +4703,6 @@ export interface PartialWalletRunConfig {
```typescript
export interface WalletRunConfig {
/**
- * Initialization values useful for a complete startup.
- *
- * These are values may be overridden by different wallets
- */
- builtin: {
- exchanges: BuiltinExchange[];
- };
- /**
* Unsafe options which it should only be used to create
* testing environment.
*/
@@ -4751,12 +4744,6 @@ export interface WalletRunConfig {
}
```
```typescript
-export interface BuiltinExchange {
- exchangeBaseUrl: string;
- currencyHint: string;
-}
-```
-```typescript
export interface InitResponse {
versionInfo: WalletCoreVersion;
}
@@ -4891,6 +4878,8 @@ export interface PayTemplateUriResult {
type: TalerUriAction.PayTemplate;
merchantBaseUrl: HostPortPath;
templateId: string;
+ sessionId?: string;
+ fulfillmentUrl?: string;
}
```
```typescript
@@ -5185,45 +5174,36 @@ export declare enum TransactionMajorState {
```
```typescript
export declare enum TransactionMinorState {
- Unknown = "unknown",
- Deposit = "deposit",
- KycRequired = "kyc",
- KycInit = "kyc-init",
- MergeKycRequired = "merge-kyc",
- BalanceKycRequired = "balance-kyc",
- BalanceKycInit = "balance-kyc-init",
- KycAuthRequired = "kyc-auth",
- Track = "track",
- SubmitPayment = "submit-payment",
- RebindSession = "rebind-session",
- Refresh = "refresh",
- Pickup = "pickup",
+ AbortingBank = "aborting-bank",
+ AcceptRefund = "accept-refund",
AutoRefund = "auto-refund",
- User = "user",
+ BalanceKycRequired = "balance-kyc",
Bank = "bank",
- Exchange = "exchange",
- ClaimProposal = "claim-proposal",
+ BankConfirmTransfer = "bank-confirm-transfer",
+ BankRegisterReserve = "bank-register-reserve",
CheckRefund = "check-refund",
+ ClaimProposal = "claim-proposal",
+ CompletedByOtherWallet = "completed-by-other-wallet",
CreatePurse = "create-purse",
DeletePurse = "delete-purse",
- RefreshExpired = "refresh-expired",
- Ready = "ready",
- Merge = "merge",
- Repurchase = "repurchase",
- BankRegisterReserve = "bank-register-reserve",
- BankConfirmTransfer = "bank-confirm-transfer",
- WithdrawCoins = "withdraw-coins",
+ Deposit = "deposit",
+ Exchange = "exchange",
ExchangeWaitReserve = "exchange-wait-reserve",
- AbortingBank = "aborting-bank",
- Aborting = "aborting",
+ KycAuthRequired = "kyc-auth",
+ KycInit = "kyc-init",
+ KycRequired = "kyc",
+ Merge = "merge",
+ PaidByOther = "paid-by-other",
+ Proposed = "proposed",
+ Ready = "ready",
+ RebindSession = "rebind-session",
+ Refresh = "refresh",
Refused = "refused",
+ Repurchase = "repurchase",
+ SubmitPayment = "submit-payment",
+ Track = "track",
+ Unknown = "unknown",
Withdraw = "withdraw",
- MerchantOrderProposed = "merchant-order-proposed",
- Proposed = "proposed",
- RefundAvailable = "refund-available",
- AcceptRefund = "accept-refund",
- PaidByOther = "paid-by-other",
- CompletedByOtherWallet = "completed-by-other-wallet",
}
```
```typescript
@@ -5379,6 +5359,16 @@ export interface WithdrawalExchangeAccountDetails {
* Error that happened when attempting to request the conversion rate.
*/
conversionError?: TalerErrorDetail;
+ /**
+ * Timestamp that indicates when the transfer options expire.
+ *
+ * If missing, options do not expire.
+ */
+ transferExpiry?: TalerProtocolTimestamp;
+ /**
+ * Options for transfering funds to the exchange for the withdrawal.
+ */
+ transferOptions: TransferOption[];
}
```
```typescript
@@ -5397,6 +5387,54 @@ export interface CurrencySpecification {
}
```
```typescript
+export type TransferOption =
+ | TransferOptionPayto
+ | TransferOptionUri
+ | TransferOptionSwissQrBill;
+```
+```typescript
+export interface TransferOptionPayto {
+ type: "payto";
+ paytoUri: string;
+ qrCodes: QrCodeSpec[];
+}
+```
+```typescript
+/**
+ * Specification of a QR code that includes payment information.
+ */
+export interface QrCodeSpec {
+ /**
+ * Type of the QR code.
+ *
+ * Depending on the type, different visual styles
+ * might be applied.
+ */
+ type: SupportedBankQr;
+ /**
+ * Content of the QR code that should be rendered.
+ */
+ qrContent: string;
+}
+```
+```typescript
+export type SupportedBankQr = "epc-qr" | "spc";
+```
+```typescript
+export interface TransferOptionUri {
+ type: "uri";
+ uri: string;
+}
+```
+```typescript
+export interface TransferOptionSwissQrBill {
+ type: "ch-qr-bill";
+ paytoUri: string;
+ qrReferenceNumber: string;
+ qrCodes: QrCodeSpec[];
+}
+```
+```typescript
interface WithdrawalDetailsForTalerBankIntegrationApi {
type: WithdrawalType.TalerBankIntegrationApi;
/**
@@ -5427,8 +5465,11 @@ export interface TransactionPayment extends TransactionCommon {
type: TransactionType.Payment;
/**
* Additional information about the payment.
+ *
+ * Only present if the information about the
+ * order is already available.
*/
- info: OrderShortInfo;
+ info: OrderShortInfo | undefined;
/**
* Full contract terms.
*
@@ -5477,6 +5518,11 @@ export interface TransactionPayment extends TransactionCommon {
* and did the URI contain a nfc=1 flag?
*/
posConfirmationViaNfc?: boolean;
+ /**
+ * In case this payment transaction was detected as a repurchase,
+ * this is the transaction ID of the original payment.
+ */
+ repurchaseTransactionId?: TransactionIdStr;
}
```
```typescript
@@ -5643,6 +5689,7 @@ export interface MerchantContractOutputToken {
type: MerchantContractOutputType.Token;
token_family_slug: string;
count?: Integer;
+ valid_at?: Timestamp;
key_index: Integer;
}
```
@@ -6054,6 +6101,11 @@ export interface ExchangeListItem {
* to update the exchange info.
*/
lastUpdateErrorInfo?: OperationErrorInfo;
+ /**
+ * Currency spec for the currency offered
+ * by the exchange.
+ */
+ currencySpec: CurrencySpecification;
}
```
```typescript
@@ -6115,6 +6167,11 @@ export interface AcceptWithdrawalResponse {
}
```
```typescript
+export interface PreparePayRequest {
+ talerPayUri: string;
+}
+```
+```typescript
/**
* Result of a prepare pay operation.
*/
@@ -6336,6 +6393,23 @@ export interface PreparePayResultChoiceSelection {
}
```
```typescript
+export interface PreparePayTemplateRequest {
+ talerPayTemplateUri: string;
+ templateParams?: TemplateParams;
+}
+```
+```typescript
+export type TemplateParams = {
+ amount?: string;
+ summary?: string;
+};
+```
+```typescript
+export interface PreparePayV2Result {
+ transactionId: TransactionIdStr;
+}
+```
+```typescript
/**
* Forced coin selection for deposits/payments.
*/
@@ -6373,6 +6447,10 @@ export interface DiscountListDetail {
*/
merchantBaseUrl: string;
/**
+ * Name of the merchant instance issuing the token.
+ */
+ merchantInfo?: MerchantInfo;
+ /**
* Human-readable name for the token family.
*/
name: string;
@@ -6442,15 +6520,6 @@ export interface WireTypeDetails {
}
```
```typescript
-export interface BackupRecovery {
- walletRootPriv: string;
- providers: {
- name: string;
- url: string;
- }[];
-}
-```
-```typescript
export interface CheckPeerPushDebitRequest {
/**
* Preferred exchange to use for the p2p payment.
@@ -6500,6 +6569,11 @@ export interface CheckPeerPushDebitOkResponse {
* coin.
*/
maxExpirationDate: TalerProtocolTimestamp;
+ /**
+ * Default expiration, as given by the exchange
+ * (or 1 week if the exchange does not specify it).
+ */
+ defaultExpiration: TalerProtocolDuration;
}
```
```typescript