taler-docs

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

commit e9a3151ddb602c2e0419d494661ec54e7505d9d6
parent e5cda8311e2d9c9000b131ceb80081b39d80239b
Author: Iván Ávalos <avalos@disroot.org>
Date:   Wed, 12 Nov 2025 09:14:45 +0100

wallet: update tsdefs

Diffstat:
Mwallet/wallet-core.md | 452++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 390 insertions(+), 62 deletions(-)

diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md @@ -12,6 +12,18 @@ This file is auto-generated from the [taler-typescript-core](https://git.taler.n * [SetDonauOp](#setdonauop) * [GetDonauOp](#getdonauop) * [GetDonauStatementsOp](#getdonaustatementsop) +### Contacts +* [AddContactOp](#addcontactop) +* [DeleteContactOp](#deletecontactop) +* [GetContactsOp](#getcontactsop) +### Mailbox +* [RefreshMailboxOp](#refreshmailboxop) +* [InitializeMailboxOp](#initializemailboxop) +* [GetMailboxOp](#getmailboxop) +* [GetMailboxMessagesOp](#getmailboxmessagesop) +* [DeleteMailboxMessageOp](#deletemailboxmessageop) +* [AddMailboxMessageOp](#addmailboxmessageop) +* [SendTalerUriMailboxMessageOp](#sendtalerurimailboxmessageop) ### Basic Wallet Information * [GetBalancesOp](#getbalancesop) * [GetBalancesDetailOp](#getbalancesdetailop) @@ -50,6 +62,8 @@ This file is auto-generated from the [taler-typescript-core](https://git.taler.n ### Token family management * [ListDiscountsOp](#listdiscountsop) * [DeleteDiscountOp](#deletediscountop) +* [ListSubscriptionsOp](#listsubscriptionsop) +* [DeleteSubscriptionOp](#deletesubscriptionop) ### Global Currency management * [ListGlobalCurrencyAuditorsOp](#listglobalcurrencyauditorsop) * [ListGlobalCurrencyExchangesOp](#listglobalcurrencyexchangesop) @@ -288,13 +302,19 @@ export interface GetDonauResponse { */ export type GetDonauStatementsOp = { op: WalletApiOperation.GetDonauStatements; - request: EmptyObject; + request: GetDonauStatementsRequest; response: GetDonauStatementsResponse; }; // GetDonauStatements = "getDonauStatements" ``` ```typescript +export interface GetDonauStatementsRequest { + donauBaseUrl?: string; +} + +``` +```typescript export interface GetDonauStatementsResponse { statements: DonauStatementItem[]; } @@ -312,6 +332,189 @@ export interface DonauStatementItem { ``` +### AddContactOp +```typescript +/** + * add contact. + */ +export type AddContactOp = { + op: WalletApiOperation.AddContact; + request: AddContactRequest; + response: EmptyObject; +}; +// AddContact = "addContact" + +``` +```typescript +export interface AddContactRequest { + contact: ContactEntry; +} + +``` + +### DeleteContactOp +```typescript +/** + * delete contact. + */ +export type DeleteContactOp = { + op: WalletApiOperation.DeleteContact; + request: DeleteContactRequest; + response: EmptyObject; +}; +// DeleteContact = "deleteContact" + +``` +```typescript +export interface DeleteContactRequest { + contact: ContactEntry; +} + +``` + +### GetContactsOp +```typescript +/** + * Get contacts. + */ +export type GetContactsOp = { + op: WalletApiOperation.GetContacts; + request: EmptyObject; + response: ContactListResponse; +}; +// GetContacts = "getContacts" + +``` +```typescript +export interface ContactListResponse { + contacts: ContactEntry[]; +} + +``` + +### RefreshMailboxOp +```typescript +/** + * Refresh mailbox Op. + */ +export type RefreshMailboxOp = { + op: WalletApiOperation.RefreshMailbox; + request: MailboxConfiguration; + response: MailboxMessageRecord[]; +}; +// RefreshMailbox = "refreshMailbox" + +``` + +### InitializeMailboxOp +```typescript +/** + * Initialize messages mailbox Op. + */ +export type InitializeMailboxOp = { + op: WalletApiOperation.InitializeMailbox; + request: string; + response: MailboxConfiguration; +}; +// InitializeMailbox = "initializeMailbox" + +``` + +### GetMailboxOp +```typescript +/** + * Get messages mailbox Op. + */ +export type GetMailboxOp = { + op: WalletApiOperation.GetMailbox; + request: string; + response: MailboxConfiguration | undefined; +}; +// GetMailbox = "getMailbox" + +``` + +### GetMailboxMessagesOp +```typescript +/** + * Get Messages Op. + */ +export type GetMailboxMessagesOp = { + op: WalletApiOperation.GetMailboxMessages; + request: EmptyObject; + response: MailboxMessagesResponse; +}; +// GetMailboxMessages = "getMailboxMessage" + +``` +```typescript +export interface MailboxMessagesResponse { + messages: MailboxMessageRecord[]; +} + +``` + +### DeleteMailboxMessageOp +```typescript +/** + * delete message. + */ +export type DeleteMailboxMessageOp = { + op: WalletApiOperation.DeleteMailboxMessage; + request: DeleteMailboxMessageRequest; + response: EmptyObject; +}; +// DeleteMailboxMessage = "deleteMailboxMessage" + +``` +```typescript +export interface DeleteMailboxMessageRequest { + message: MailboxMessageRecord; +} + +``` + +### AddMailboxMessageOp +```typescript +/** + * add message. + */ +export type AddMailboxMessageOp = { + op: WalletApiOperation.AddMailboxMessage; + request: AddMailboxMessageRequest; + response: EmptyObject; +}; +// AddMailboxMessage = "addMailboxMessage" + +``` +```typescript +export interface AddMailboxMessageRequest { + message: MailboxMessageRecord; +} + +``` + +### SendTalerUriMailboxMessageOp +```typescript +/** + * send message. + */ +export type SendTalerUriMailboxMessageOp = { + op: WalletApiOperation.SendTalerUriMailboxMessage; + request: SendTalerUriMailboxMessageRequest; + response: EmptyObject; +}; +// SendTalerUriMailboxMessage = "sendTalerUriMailboxMessage" + +``` +```typescript +export interface SendTalerUriMailboxMessageRequest { + contact: ContactEntry; + talerUri: string; +} + +``` + ### GetBalancesOp ```typescript /** @@ -326,8 +529,13 @@ export type GetBalancesOp = { ``` ```typescript +/** + * Response to a getBalances request. + */ export interface BalancesResponse { + /** Electronic cash balances, per currency scope. */ balances: WalletBalance[]; + donauSummary?: DonauSummaryItem[]; } ``` @@ -363,6 +571,32 @@ export declare enum BalanceFlag { } ``` +```typescript +export interface DonauSummaryItem { + /** Base URL of the donau service. */ + donauBaseUrl: string; + /** Legal domain of the donau service (if available). */ + legalDomain?: string; + /** Year of the donation(s). */ + year: number; + /** + * Sum of donation receipts we received from merchants in the + * applicable year. + */ + amountReceiptsAvailable: AmountString; + /** + * Sum of donation receipts that were already submitted + * to the donau in the applicable year. + */ + amountReceiptsSubmitted: AmountString; + /** + * Amount of the latest available statement. Missing if no statement + * was requested yet. + */ + amountStatement?: AmountString; +} + +``` ### GetBalancesDetailOp ```typescript @@ -1478,7 +1712,7 @@ export interface StartRefundQueryRequest { ```typescript /** * List discount tokens stored in the wallet. Listed tokens - * will be grouped by expiration date (@e validityEnd) + * will be grouped based on token family details. */ export type ListDiscountsOp = { op: WalletApiOperation.ListDiscounts; @@ -1489,78 +1723,72 @@ export type ListDiscountsOp = { ``` ```typescript -export interface ListDiscountsRequest { - /** - * Filter by hash of token issue public key. - */ - tokenIssuePubHash?: string; - /** - * Filter by merchant base URL. - */ - merchantBaseUrl?: string; +export interface ListDiscountsResponse { + discounts: DiscountListDetail[]; } ``` + +### DeleteDiscountOp ```typescript -export interface ListDiscountsResponse { - discounts: DiscountListDetail[]; -} +export type DeleteDiscountOp = { + op: WalletApiOperation.DeleteDiscount; + request: DeleteDiscountRequest; + response: EmptyObject; +}; +// DeleteDiscount = "deleteDiscount" ``` ```typescript -export interface DiscountListDetail { +export interface DeleteDiscountRequest { /** * Hash of token family info. */ tokenFamilyHash: string; - /** - * Hash of token issue public key. - */ - tokenIssuePubHash: string; - /** - * URL of the merchant issuing the token. - */ - merchantBaseUrl: string; - /** - * Human-readable name for the token family. - */ - name: string; - /** - * Human-readable description for the token family. - */ - description: string; - /** - * Optional map from IETF BCP 47 language tags to localized descriptions. - */ - descriptionI18n: any | undefined; - /** - * Start time of the token's validity period. - */ - validityStart: Timestamp; - /** - * End time of the token's validity period. - */ - validityEnd: Timestamp; - /** - * Number of tokens available to use. - */ - tokensAvailable: number; } ``` -### DeleteDiscountOp +### ListSubscriptionsOp ```typescript -export type DeleteDiscountOp = { - op: WalletApiOperation.DeleteDiscount; - request: DeleteDiscountRequest; +/** + * List subscription tokens stored in the wallet. Listed tokens + * will be grouped based on token family details. + */ +export type ListSubscriptionsOp = { + op: WalletApiOperation.ListSubscriptions; + request: ListSubscriptionsRequest; + response: ListSubscriptionsResponse; +}; +// ListSubscriptions = "listSubscriptions" + +``` +```typescript +export interface ListSubscriptionsResponse { + subscriptions: SubscriptionListDetail[]; +} + +``` +```typescript +export type SubscriptionListDetail = Omit< + DiscountListDetail, + "tokensAvailable" +>; + +``` + +### DeleteSubscriptionOp +```typescript +export type DeleteSubscriptionOp = { + op: WalletApiOperation.DeleteSubscription; + request: DeleteSubscriptionRequest; response: EmptyObject; }; -// DeleteDiscount = "deleteDiscount" +// DeleteSubscription = "deleteSubscription" ``` ```typescript -export interface DeleteDiscountRequest { +export interface DeleteSubscriptionRequest { /** * Hash of token family info. */ @@ -3971,6 +4199,11 @@ export interface TestingWaitTransactionRequest { * an error instead. */ timeout?: DurationUnitSpec; + /** + * If set to true, wait until the desired state + * is reached with an error. + */ + requireError?: boolean; txState: TransactionStatePattern | TransactionStatePattern[] | number; } @@ -4259,6 +4492,58 @@ export type AmountString = | LitAmountString; ``` ```typescript +export interface ContactEntry { + /** + * Contact alias + */ + alias: string; + /** + * Alias type + */ + aliasType: string; + /** + * mailbox URI + */ + mailboxBaseUri: string; + /** + * mailbox identity + */ + mailboxAddress: HashCodeString; + /** + * The source of this contact + * may be a URI + */ + source: string; +} +``` +```typescript +export interface MailboxConfiguration { + mailboxBaseUrl: string; + privateKey: EddsaPrivateKeyString; + privateEncryptionKey: string; + expiration: Timestamp; +} +``` +```typescript +export interface TalerProtocolTimestamp { + /** + * Seconds (as integer) since epoch. + */ + readonly t_s: number | "never"; + readonly _flavor?: typeof flavor_TalerProtocolTimestamp; +} +``` +```typescript +/** + * Record metadata for mailbox messages + */ +export interface MailboxMessageRecord { + originMailboxBaseUrl: string; + downloadedAt: Timestamp; + talerUri: string; +} +``` +```typescript export type ScopeInfo = ScopeInfoGlobal | ScopeInfoExchange | ScopeInfoAuditor; ``` ```typescript @@ -4440,15 +4725,6 @@ export interface TalerPreciseTimestamp { } ``` ```typescript -export interface TalerProtocolTimestamp { - /** - * Seconds (as integer) since epoch. - */ - readonly t_s: number | "never"; - readonly _flavor?: typeof flavor_TalerProtocolTimestamp; -} -``` -```typescript export interface TransactionState { major: TransactionMajorState; minor?: TransactionMinorState; @@ -5608,6 +5884,58 @@ export interface ForcedCoinSel { } ``` ```typescript +export interface ListDiscountsRequest { + /** + * Filter by hash of token issue public key. + */ + tokenIssuePubHash?: string; + /** + * Filter by merchant base URL. + */ + merchantBaseUrl?: string; +} +``` +```typescript +export interface DiscountListDetail { + /** + * Hash of token family info. + */ + tokenFamilyHash: string; + /** + * Hash of token issue public key. + */ + tokenIssuePubHash: string; + /** + * URL of the merchant issuing the token. + */ + merchantBaseUrl: string; + /** + * Human-readable name for the token family. + */ + name: string; + /** + * Human-readable description for the token family. + */ + description: string; + /** + * Optional map from IETF BCP 47 language tags to localized descriptions. + */ + descriptionI18n: any | undefined; + /** + * Start time of the token's validity period. + */ + validityStart: Timestamp; + /** + * End time of the token's validity period. + */ + validityEnd: Timestamp; + /** + * Number of tokens available to use. + */ + tokensAvailable: number; +} +``` +```typescript export interface WalletBankAccountInfo { bankAccountId: string; paytoUri: string;