From c53c6b8b3c0a66f3862883ec1314c6d4bf68af32 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 3 Apr 2024 19:18:56 +0200 Subject: wallet-core: introduce setConfig request Currently just an alias for initWallet, behavior might diverge in the future. --- packages/taler-wallet-core/src/wallet-api-types.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-core/src/wallet-api-types.ts') diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts index 4f4b24b62..0fd0ffbd6 100644 --- a/packages/taler-wallet-core/src/wallet-api-types.ts +++ b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -154,6 +154,7 @@ import { PaymentBalanceDetails } from "./balance.js"; export enum WalletApiOperation { InitWallet = "initWallet", + SetConfig = "setConfig", WithdrawTestkudos = "withdrawTestkudos", WithdrawTestBalance = "withdrawTestBalance", PreparePayForUri = "preparePayForUri", @@ -263,10 +264,11 @@ export enum WalletApiOperation { // group: Initialization type EmptyObject = Record; + /** * Initialize wallet-core. * - * Must be the request before any other operations. + * Must be the first request made to wallet-core. */ export type InitWalletOp = { op: WalletApiOperation.InitWallet; @@ -274,6 +276,17 @@ export type InitWalletOp = { response: InitResponse; }; +/** + * Change the configuration of wallet-core. + * + * Currently an alias for the initWallet request. + */ +export type SetConfigOp = { + op: WalletApiOperation.SetConfig; + request: InitRequest; + response: InitResponse; +}; + export type GetVersionOp = { op: WalletApiOperation.GetVersion; request: EmptyObject; @@ -1147,6 +1160,7 @@ export type ForceRefreshOp = { export type WalletOperations = { [WalletApiOperation.InitWallet]: InitWalletOp; + [WalletApiOperation.SetConfig]: SetConfigOp; [WalletApiOperation.GetVersion]: GetVersionOp; [WalletApiOperation.PreparePayForUri]: PreparePayForUriOp; [WalletApiOperation.SharePayment]: SharePaymentOp; -- cgit v1.2.3