summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet-api-types.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-04-03 19:18:56 +0200
committerFlorian Dold <florian@dold.me>2024-04-03 19:18:56 +0200
commitc53c6b8b3c0a66f3862883ec1314c6d4bf68af32 (patch)
treee90d3dd24ffc11385a0740599a960f480a949c54 /packages/taler-wallet-core/src/wallet-api-types.ts
parent65a656163797e9dd298b34ec916b982082db7f52 (diff)
downloadwallet-core-c53c6b8b3c0a66f3862883ec1314c6d4bf68af32.tar.gz
wallet-core-c53c6b8b3c0a66f3862883ec1314c6d4bf68af32.tar.bz2
wallet-core-c53c6b8b3c0a66f3862883ec1314c6d4bf68af32.zip
wallet-core: introduce setConfig request
Currently just an alias for initWallet, behavior might diverge in the future.
Diffstat (limited to 'packages/taler-wallet-core/src/wallet-api-types.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet-api-types.ts16
1 files changed, 15 insertions, 1 deletions
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<string, never>;
+
/**
* 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;