taler-docs

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

commit 87039601fc4f7cce5b0ff137ee10e316030cf947
parent c8bfd0757062309790efb488f7daac7be38ff7c1
Author: Iván Ávalos <avalos@disroot.org>
Date:   Wed,  6 Aug 2025 14:53:28 +0200

update wallet API docs

Diffstat:
Mwallet/wallet-core.md | 656+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 510 insertions(+), 146 deletions(-)

diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md @@ -1,5 +1,5 @@ # Wallet-Core API Documentation -This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core.git/tree/packages/taler-wallet-core/src/wallet-api-types.ts). +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. ## Overview ### Initialization * [InitWalletOp](#initwalletop) @@ -36,6 +36,7 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core * [AcceptManualWithdrawalOp](#acceptmanualwithdrawalop) ### Merchant Payments * [PreparePayForUriOp](#preparepayforuriop) +* [GetChoicesForPaymentOp](#getchoicesforpaymentop) * [SharePaymentOp](#sharepaymentop) * [CheckPayForTemplateOp](#checkpayfortemplateop) * [PreparePayForTemplateOp](#preparepayfortemplateop) @@ -54,6 +55,7 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core * [ListExchangesOp](#listexchangesop) * [StartExchangeWalletKycOp](#startexchangewalletkycop) * [TestingWaitExchangeWalletKycOp](#testingwaitexchangewalletkycop) +* [TestingPlanMigrateExchangeBaseUrlOp](#testingplanmigrateexchangebaseurlop) * [PrepareWithdrawExchangeOp](#preparewithdrawexchangeop) * [AddExchangeOp](#addexchangeop) * [UpdateExchangeEntryOp](#updateexchangeentryop) @@ -82,6 +84,7 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core * [RunBackupCycleOp](#runbackupcycleop) * [ExportBackupOp](#exportbackupop) * [ExportDbToFileOp](#exportdbtofileop) +* [ImportDbFromFileOp](#importdbfromfileop) * [AddBackupProviderOp](#addbackupproviderop) * [RemoveBackupProviderOp](#removebackupproviderop) * [GetBackupInfoOp](#getbackupinfoop) @@ -535,6 +538,11 @@ export interface GetTransactionsV2Request { */ includeRefreshes?: boolean; /** + * If true, include transactions that would usually be filtered out. + * Implies includeRefreshes. + */ + includeAll?: boolean; + /** * Only return transactions before/after this offset. */ offsetTransactionId?: TransactionIdStr; @@ -853,6 +861,8 @@ export interface WithdrawalDetailsForAmount { ```typescript /** * Get details for withdrawing via a particular taler:// URI. + * + * @deprecated Use {@link PrepareBankIntegratedWithdrawalOp} instead */ export type GetWithdrawalDetailsForUriOp = { op: WalletApiOperation.GetWithdrawalDetailsForUri; @@ -1023,6 +1033,150 @@ export interface PreparePayRequest { ``` +### GetChoicesForPaymentOp +```typescript +/** + * Get a list of contract v1 choices for a given payment tx + * in dialog(confirm) state, as well as additional information + * on whether they can be used to pay the order or not, depending + * on the funds available on the wallet, or whether a specific + * choice should be paid automatically without user confirmation, + * based on user configuration or the type of payment requested. + * + * This request will fail if contract choices are not yet + * available, in which case the `choicesAvailable' field of the tx + * will be undefined or set to false. + */ +export type GetChoicesForPaymentOp = { + op: WalletApiOperation.GetChoicesForPayment; + request: GetChoicesForPaymentRequest; + response: GetChoicesForPaymentResult; +}; +// GetChoicesForPayment = "getChoicesForPayment" + +``` +```typescript +export interface GetChoicesForPaymentRequest { + transactionId: string; + forcedCoinSel?: ForcedCoinSel; +} + +``` +```typescript +export type GetChoicesForPaymentResult = { + /** + * Details for all choices in the contract. + * + * The index in this array corresponds to the choice + * index in the original contract v1. For contract v0 + * orders, it will only contain a single choice with no + * inputs/outputs. + */ + choices: ChoiceSelectionDetail[]; + /** + * Index of the choice in @e choices array to present + * to the user as default. + * + * Won´t be set if no default selection is configured + * or no choice is payable, otherwise, it will always + * be 0 for v0 orders. + */ + defaultChoiceIndex?: number; + /** + * Whether the choice referenced by @e automaticExecutableIndex + * should be confirmed automatically without + * user interaction. + * + * If true, the wallet should call `confirmPay' + * immediately afterwards, if false, the user + * should be first prompted to select and + * confirm a choice. Undefined when no choices + * are payable. + */ + automaticExecution?: boolean; + /** + * Index of the choice that would be set to automatically + * execute if the choice was payable. When @e automaticExecution + * is set to true, the payment should be confirmed with this + * choice index without user interaction. + */ + automaticExecutableIndex?: number; + /** + * Data extracted from the contract terms that + * is relevant for payment processing in the wallet. + */ + contractData: WalletContractData; +}; + +``` +```typescript +export type ChoiceSelectionDetail = + | ChoiceSelectionDetailPaymentPossible + | ChoiceSelectionDetailInsufficientBalance; + +``` +```typescript +export interface ChoiceSelectionDetailPaymentPossible { + status: ChoiceSelectionDetailType.PaymentPossible; + amountRaw: AmountString; + amountEffective: AmountString; + tokenDetails?: PaymentTokenAvailabilityDetails; +} + +``` +```typescript +export interface PaymentTokenAvailabilityDetails { + /** + * Number of tokens requested by the merchant. + */ + tokensRequested: number; + /** + * Number of tokens available to use. + */ + tokensAvailable: number; + /** + * Number of tokens for which the merchant is unexpected. + * + * Can be used to pay (i.e. with forced selection), + * but a warning should be displayed to the user. + */ + tokensUnexpected: number; + /** + * Number of tokens for which the merchant is untrusted. + * + * Cannot be used to pay, so an error should be displayed. + */ + tokensUntrusted: number; + perTokenFamily: { + [slug: string]: { + causeHint?: TokenAvailabilityHint; + requested: number; + available: number; + unexpected: number; + untrusted: number; + }; + }; +} + +``` +```typescript +export declare enum TokenAvailabilityHint { + WalletTokensAvailableInsufficient = "wallet-tokens-available-insufficient", + MerchantUnexpected = "merchant-unexpected", + MerchantUntrusted = "merchant-untrusted", +} + +``` +```typescript +export interface ChoiceSelectionDetailInsufficientBalance { + status: ChoiceSelectionDetailType.InsufficientBalance; + amountRaw: AmountString; + balanceDetails?: PaymentInsufficientBalanceDetails; + tokenDetails?: PaymentTokenAvailabilityDetails; +} + +``` + ### SharePaymentOp ```typescript export type SharePaymentOp = { @@ -1143,52 +1297,6 @@ export interface GetContractTermsDetailsRequest { } ``` -```typescript -/** - * Data extracted from the contract terms that is relevant for payment - * processing in the wallet. - */ -export interface WalletContractData { - /** - * Fulfillment URL, or the empty string if the order has no fulfillment URL. - * - * Stored as a non-nullable string as we use this field for IndexedDB indexing. - */ - fulfillmentUrl: string; - contractTermsHash: string; - fulfillmentMessage?: string; - fulfillmentMessageI18n?: InternationalizedString; - merchantSig: string; - merchantPub: string; - merchant: MerchantInfo; - amount: AmountString; - orderId: string; - merchantBaseUrl: string; - summary: string; - summaryI18n: - | { - [lang_tag: string]: string; - } - | undefined; - autoRefund: TalerProtocolDuration | undefined; - payDeadline: TalerProtocolTimestamp; - refundDeadline: TalerProtocolTimestamp; - allowedExchanges: AllowedExchangeInfo[]; - timestamp: TalerProtocolTimestamp; - wireMethod: string; - wireInfoHash: string; - maxDepositFee: AmountString; - minimumAge?: number; -} - -``` -```typescript -export interface AllowedExchangeInfo { - exchangeBaseUrl: string; - exchangePub: string; -} - -``` ### ConfirmPayOp ```typescript @@ -1209,6 +1317,17 @@ export interface ConfirmPayRequest { transactionId: TransactionIdStr; sessionId?: string; forcedCoinSel?: ForcedCoinSel; + /** + * Whether token selection should be forced + * e.g. use tokens with non-matching `expected_domains' + * + * Only applies to v1 orders. + */ + forcedTokenSel?: boolean; + /** + * Only applies to v1 orders. + */ + choiceIndex?: number; } ``` @@ -1472,6 +1591,31 @@ export interface TestingWaitWalletKycRequest { ``` +### TestingPlanMigrateExchangeBaseUrlOp +```typescript +/** + * Enable migration from an old exchange base URL to a new + * exchange base URL. + * + * The actual migration is only applied once the exchange + * returns the new base URL. + */ +export type TestingPlanMigrateExchangeBaseUrlOp = { + op: WalletApiOperation.TestingPlanMigrateExchangeBaseUrl; + request: TestingPlanMigrateExchangeBaseUrlRequest; + response: EmptyObject; +}; +// TestingPlanMigrateExchangeBaseUrl = "testingPlanMigrateExchangeBaseUrl" + +``` +```typescript +export interface TestingPlanMigrateExchangeBaseUrlRequest { + oldExchangeBaseUrl: string; + newExchangeBaseUrl: string; +} + +``` + ### PrepareWithdrawExchangeOp ```typescript /** @@ -1519,11 +1663,39 @@ export interface PrepareWithdrawExchangeResponse { export type AddExchangeOp = { op: WalletApiOperation.AddExchange; request: AddExchangeRequest; - response: EmptyObject; + response: AddExchangeResponse; }; // AddExchange = "addExchange" ``` +```typescript +export interface AddExchangeRequest { + /** + * @deprecated Use {@link uri} instead + */ + exchangeBaseUrl?: string; + /** + * Either an http(s) exchange base URL or + * a taler://add-exchange/ URI. + */ + uri?: string; + ephemeral?: boolean; + /** + * @deprecated use a separate API call to start a forced exchange update instead + */ + forceUpdate?: boolean; +} + +``` +```typescript +export interface AddExchangeResponse { + /** + * Base URL of the exchange that was added to the wallet. + */ + exchangeBaseUrl: string; +} + +``` ### UpdateExchangeEntryOp ```typescript @@ -1813,13 +1985,19 @@ export interface GetDepositWireTypesForCurrencyResponse { */ export type GetExchangeDetailedInfoOp = { op: WalletApiOperation.GetExchangeDetailedInfo; - request: AddExchangeRequest; + request: GetExchangeDetailedInfoRequest; response: ExchangeDetailedResponse; }; // GetExchangeDetailedInfo = "getExchangeDetailedInfo" ``` ```typescript +export interface GetExchangeDetailedInfoRequest { + exchangeBaseUrl: string; +} + +``` +```typescript export interface ExchangeDetailedResponse { exchange: ExchangeFullDetails; } @@ -2009,6 +2187,9 @@ export type DeleteExchangeOp = { ```typescript export interface DeleteExchangeRequest { exchangeBaseUrl: string; + /** + * Delete the exchange even if it's in use. + */ purge?: boolean; } @@ -2081,7 +2262,7 @@ export type CreateDepositGroupOp = { export interface CreateDepositGroupRequest { depositPaytoUri: string; /** - * Amount to deposit. + * Amount to deposit (effective amount). */ amount: AmountString; /** @@ -2103,9 +2284,24 @@ export interface CreateDepositGroupRequest { ``` ```typescript +/** + * Response to a createDepositGroup request. + */ export interface CreateDepositGroupResponse { - depositGroupId: string; + /** + * Transaction ID of the newly created deposit transaction. + */ transactionId: TransactionIdStr; + /** + * Current state of the new deposit transaction. + * Returned as a performance optimization, so that the UI + * doesn't have to do a separate getTransactionById. + */ + txState: TransactionState; + /** + * @deprecated 2025-06-03, use transactionId instead. + */ + depositGroupId: string; } ``` @@ -2251,6 +2447,13 @@ export interface ExportDbToFileRequest { * 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; } ``` @@ -2264,6 +2467,31 @@ export interface ExportDbToFileResponse { ``` +### 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 /** @@ -3336,13 +3564,12 @@ export interface AgeCommitment { ``` ```typescript -export type Edx25519PublicKeyEnc = FlavorP<string, "Edx25519PublicKeyEnc", 32>; +export type Edx25519PublicKeyEnc = string & FlavorEdx25519PublicKeyEnc; ``` ```typescript -export type FlavorP<T, FlavorT extends string, S extends number> = T & { - _flavor?: `taler.${FlavorT}`; - _size?: S; +type FlavorEdx25519PublicKeyEnc = { + readonly [isEdx25519PublicKeyEnc]?: true; }; ``` @@ -3357,11 +3584,13 @@ export interface AgeProof { ``` ```typescript -export type Edx25519PrivateKeyEnc = FlavorP< - string, - "Edx25519PrivateKeyEnc", - 64 ->; +export type Edx25519PrivateKeyEnc = string & FlavorEdx25519PrivateKeyEnc; + +``` +```typescript +type FlavorEdx25519PrivateKeyEnc = { + readonly [isEdx25519PrivateKeyEnc]?: true; +}; ``` ```typescript @@ -3471,6 +3700,18 @@ export type TestingWaitTransactionStateOp = { ```typescript export interface TestingWaitTransactionRequest { transactionId: TransactionIdStr; + /** + * Additional identifier that is used in the logs + * to easily find the status of the particular wait + * request. + */ + logId?: string; + /** + * After the timeout has passed, give up on + * waiting for the desired state and raise + * an error instead. + */ + timeout?: DurationUnitSpec; txState: TransactionStatePattern | TransactionStatePattern[]; } @@ -3638,6 +3879,7 @@ export interface PartialWalletRunConfig { testing?: Partial<WalletRunConfig["testing"]>; features?: Partial<WalletRunConfig["features"]>; lazyTaskLoop?: Partial<WalletRunConfig["lazyTaskLoop"]>; + logLevel?: Partial<WalletRunConfig["logLevel"]>; } ``` ```typescript @@ -3655,10 +3897,6 @@ export interface WalletRunConfig { * testing environment. */ testing: { - /** - * Allow withdrawal of denominations even though they are about to expire. - */ - denomselAllowLate: boolean; devModeActive: boolean; insecureTrustExchange: boolean; preventThrottling: boolean; @@ -3680,6 +3918,10 @@ export interface WalletRunConfig { * unrelated pending tasks. */ lazyTaskLoop: boolean; + /** + * Global log level. + */ + logLevel: string; } ``` ```typescript @@ -3745,6 +3987,7 @@ export interface Exchange { url: string; priority: Integer; master_pub: EddsaPublicKey; + max_contribution?: AmountString; } ``` ```typescript @@ -3944,6 +4187,7 @@ export declare enum TransactionMinorState { Unknown = "unknown", Deposit = "deposit", KycRequired = "kyc", + KycInit = "kyc-init", MergeKycRequired = "merge-kyc", BalanceKycRequired = "balance-kyc", BalanceKycInit = "balance-kyc-init", @@ -4018,6 +4262,16 @@ export interface Duration { } ``` ```typescript +export interface DurationUnitSpec { + seconds?: number; + minutes?: number; + hours?: number; + days?: number; + months?: number; + years?: number; +} +``` +```typescript export interface TalerProtocolDuration { readonly d_us: number | "forever"; } @@ -4036,6 +4290,14 @@ export interface KycAuthTransferInfo { */ accountPub: string; /** + * Amount that the exchange expects to be deposited. + * + * Usually corresponds to the TINY_AMOUNT configuration of the exchange, + * and thus is the smallest amount that can be transferred + * via a bank transfer. + */ + amount: AmountString; + /** * Possible target payto URIs. */ creditPaytoUris: string[]; @@ -4170,7 +4432,7 @@ export interface TransactionPayment extends TransactionCommon { * * Only included if explicitly included in the request. */ - contractTerms?: ContractTerms; + contractTerms?: MerchantContractTerms; /** * Amount that must be paid for the contract */ @@ -4200,9 +4462,19 @@ export interface TransactionPayment extends TransactionCommon { */ refundQueryActive: boolean; /** - * Does this purchase has an pos validation + * PoS confirmation codes, separated by newlines. + * Only present for purchases that support PoS confirmation. */ posConfirmation: string | undefined; + /** + * Until when will the posConfirmation be valid? + */ + posConfirmationDeadline?: TalerProtocolTimestamp; + /** + * Did we receive the payment via a taler://pay-template/ URI + * and did the URI contain a nfc=1 flag? + */ + posConfirmationViaNfc?: boolean; } ``` ```typescript @@ -4267,35 +4539,44 @@ export interface Location { } ``` ```typescript -export interface ContractTerms { - summary: string; - summary_i18n?: { - [lang_tag: string]: string; - }; - order_id: string; +export type MerchantContractTerms = + | MerchantContractTermsV0 + | MerchantContractTermsV1; +``` +```typescript +export interface MerchantContractTermsV0 extends MerchantContractTermsCommon { + version?: MerchantContractVersion.V0; amount: AmountString; - public_reorder_url?: string; - fulfillment_url?: string; - fulfillment_message?: string; - fulfillment_message_i18n?: { - [lang_tag: string]: string; - }; max_fee: AmountString; - products: Product[]; - timestamp: Timestamp; - refund_deadline: Timestamp; - pay_deadline: Timestamp; - wire_transfer_deadline: Timestamp; - merchant_pub: EddsaPublicKey; - merchant_base_url: string; - merchant: Merchant; - h_wire: HashCode; +} +``` +```typescript +/** + * Contract terms from a merchant. + */ +interface MerchantContractTermsCommon { + h_wire: string; + auto_refund?: TalerProtocolDuration; wire_method: string; - exchanges: Exchange[]; - delivery_location?: Location; - delivery_date?: Timestamp; + summary: string; + summary_i18n?: InternationalizedString; + order_id: string; nonce: string; - auto_refund?: RelativeTime; + pay_deadline: TalerProtocolTimestamp; + merchant: MerchantInfo; + merchant_pub: string; + delivery_date?: TalerProtocolTimestamp; + delivery_location?: Location; + exchanges: Exchange[]; + products?: Product[]; + refund_deadline: TalerProtocolTimestamp; + wire_transfer_deadline: TalerProtocolTimestamp; + timestamp: TalerProtocolTimestamp; + merchant_base_url: string; + fulfillment_url?: string; + public_reorder_url?: string; + fulfillment_message?: string; + fulfillment_message_i18n?: InternationalizedString; extra?: any; minimum_age?: Integer; } @@ -4303,6 +4584,7 @@ export interface ContractTerms { ```typescript export interface Product { product_id?: string; + product_name?: string; description: string; description_i18n?: { [lang_tag: string]: string; @@ -4322,13 +4604,99 @@ export interface Tax { } ``` ```typescript -export interface Merchant { +export interface MerchantContractTermsV1 extends MerchantContractTermsCommon { + version: MerchantContractVersion.V1; + choices: MerchantContractChoice[]; + token_families: { + [token_family_slug: string]: MerchantContractTokenFamily; + }; +} +``` +```typescript +export interface MerchantContractChoice { + amount: AmountString; + description?: string; + description_i18n?: InternationalizedString; + inputs: MerchantContractInput[]; + outputs: MerchantContractOutput[]; + max_fee: AmountString; +} +``` +```typescript +export interface MerchantContractInputToken { + type: MerchantContractInputType.Token; + token_family_slug: string; + count?: Integer; +} +``` +```typescript +export type MerchantContractOutput = + | MerchantContractOutputToken + | MerchantContractOutputTaxReceipt; +``` +```typescript +export interface MerchantContractOutputToken { + type: MerchantContractOutputType.Token; + token_family_slug: string; + count?: Integer; + key_index: Integer; +} +``` +```typescript +export interface MerchantContractOutputTaxReceipt { + type: MerchantContractOutputType.TaxReceipt; + donau_urls: string[]; + amount?: AmountString; +} +``` +```typescript +export interface MerchantContractTokenFamily { name: string; - email?: string; - website?: string; - logo?: ImageDataUrl; - address?: Location; - jurisdiction?: Location; + description: string; + description_i18n?: { + [lang_tag: string]: string; + }; + keys: TokenIssuePublicKey[]; + details: MerchantContractTokenDetails; + critical: boolean; +} +``` +```typescript +export type TokenIssuePublicKey = + | TokenIssueRsaPublicKey + | TokenIssueCsPublicKey; +``` +```typescript +export interface TokenIssueRsaPublicKey { + cipher: "RSA"; + rsa_pub: RsaPublicKey; + signature_validity_start: Timestamp; + signature_validity_end: Timestamp; +} +``` +```typescript +export interface TokenIssueCsPublicKey { + cipher: "CS"; + cs_pub: Cs25519Point; + signature_validity_start: Timestamp; + signature_validity_end: Timestamp; +} +``` +```typescript +export type MerchantContractTokenDetails = + | MerchantContractSubscriptionTokenDetails + | MerchantContractDiscountTokenDetails; +``` +```typescript +export interface MerchantContractSubscriptionTokenDetails { + class: MerchantContractTokenKind.Subscription; + trusted_domains: string[]; +} +``` +```typescript +export interface MerchantContractDiscountTokenDetails { + class: MerchantContractTokenKind.Discount; + expected_domains: string[]; } ``` ```typescript @@ -4657,16 +5025,23 @@ export interface ExchangeListItem { walletKycReservePub?: string; walletKycAccessToken?: string; walletKycUrl?: string; + /** Threshold that we've requested to satisfy. */ + walletKycRequestedThreshold?: string; /** * P2P payments are disabled with this exchange * (e.g. because no global fees are configured). */ peerPaymentsDisabled: boolean; - /** - * Set to true if this exchange doesn't charge any fees. - */ + /** Set to true if this exchange doesn't charge any fees. */ noFees: boolean; + /** Most general scope that the exchange is a part of. */ scopeInfo: ScopeInfo; + /** + * Instructs wallets to use certain bank-specific + * language (for buttons) and/or other UI/UX customization + * for compliance with the rules of that bank. + */ + bankComplianceLanguage?: string; lastUpdateTimestamp: TalerPreciseTimestamp | undefined; /** * Information about the last error that occurred when trying @@ -4741,7 +5116,8 @@ export interface AcceptWithdrawalResponse { export type PreparePayResult = | PreparePayResultInsufficientBalance | PreparePayResultAlreadyConfirmed - | PreparePayResultPaymentPossible; + | PreparePayResultPaymentPossible + | PreparePayResultChoiceSelection; ``` ```typescript export interface PreparePayResultInsufficientBalance { @@ -4761,45 +5137,6 @@ export interface PreparePayResultInsufficientBalance { } ``` ```typescript -export interface MerchantContractTermsV0 extends MerchantContractTermsCommon { - version?: 0; - amount: AmountString; - max_fee: AmountString; -} -``` -```typescript -/** - * Contract terms from a merchant. - * FIXME: Add type field! - */ -interface MerchantContractTermsCommon { - h_wire: string; - auto_refund?: TalerProtocolDuration; - wire_method: string; - summary: string; - summary_i18n?: InternationalizedString; - order_id: string; - nonce: string; - pay_deadline: TalerProtocolTimestamp; - merchant: MerchantInfo; - merchant_pub: string; - delivery_date?: TalerProtocolTimestamp; - delivery_location?: Location; - exchanges: Exchange[]; - products?: Product[]; - refund_deadline: TalerProtocolTimestamp; - wire_transfer_deadline: TalerProtocolTimestamp; - timestamp: TalerProtocolTimestamp; - merchant_base_url: string; - fulfillment_url?: string; - public_reorder_url?: string; - fulfillment_message?: string; - fulfillment_message_i18n?: InternationalizedString; - extra?: any; - minimum_age?: Integer; -} -``` -```typescript /** * Detailed reason for why the wallet's balance is insufficient. */ @@ -4955,6 +5292,18 @@ export interface PreparePayResultPaymentPossible { ``` ```typescript /** + * Unconfirmed contract v1 payment. + */ +export interface PreparePayResultChoiceSelection { + status: PreparePayResultType.ChoiceSelection; + transactionId: TransactionIdStr; + contractTerms: MerchantContractTerms; + contractTermsHash: string; + talerUri: string; +} +``` +```typescript +/** * Forced coin selection for deposits/payments. */ export interface ForcedCoinSel { @@ -4965,14 +5314,25 @@ export interface ForcedCoinSel { } ``` ```typescript -export interface AddExchangeRequest { - exchangeBaseUrl: string; - ephemeral?: boolean; +/** + * Data extracted from the contract terms that is relevant for payment + * processing in the wallet. + */ +export type WalletContractData = MerchantContractTerms & { /** - * @deprecated use a separate API call to start a forced exchange update instead + * Fulfillment URL, or the empty string if the order has no fulfillment URL. + * + * Stored as a non-nullable string as we use this field for IndexedDB indexing. */ - forceUpdate?: boolean; -} + fulfillmentUrl: string; + contractTermsHash: string; + merchantSig: string; + /** + * Amounts are undefined for unfinished v1 orders. + */ + amountRaw?: AmountString; + amountEffective?: AmountString; +}; ``` ```typescript export interface WalletBankAccountInfo { @@ -4980,6 +5340,9 @@ export interface WalletBankAccountInfo { paytoUri: string; /** * Did we previously complete a KYC process for this bank account? + * + * @deprecated no enough information since the kyc can be completed for one exchange but not for another + * https://bugs.gnunet.org/view.php?id=9696 */ kycCompleted: boolean; /** @@ -5123,6 +5486,7 @@ export interface CheckPeerPushDebitOkResponse { export interface PeerContractTerms { amount: AmountString; summary: string; + icon_id?: string; purse_expiration: TalerProtocolTimestamp; } ```