diff options
author | Florian Dold <florian@dold.me> | 2024-02-29 18:37:13 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-29 23:24:06 +0100 |
commit | 277a5c641df336d8b5b2d9bd6559e45f0b02aa79 (patch) | |
tree | 49cbdadaf04b5630cdae3e2a89e6d3a74d30632b /packages/taler-wallet-core/src/wallet-api-types.ts | |
parent | 206780bb0ee763bcf50a3f4f9f78579a8adcdb3a (diff) | |
download | wallet-core-277a5c641df336d8b5b2d9bd6559e45f0b02aa79.tar.gz wallet-core-277a5c641df336d8b5b2d9bd6559e45f0b02aa79.tar.bz2 wallet-core-277a5c641df336d8b5b2d9bd6559e45f0b02aa79.zip |
wallet-core: improve config handling, test builtin exchange config
Diffstat (limited to 'packages/taler-wallet-core/src/wallet-api-types.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet-api-types.ts | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts index 553155ece..240012bca 100644 --- a/packages/taler-wallet-core/src/wallet-api-types.ts +++ b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -277,53 +277,6 @@ export type GetVersionOp = { response: WalletCoreVersion; }; -/** - * Configurations options for the Wallet - * - * All missing values of the config will be replaced with default values - * Default values are defined by Wallet.getDefaultConfig() - */ -export type WalletConfigParameter = RecursivePartial<WalletConfig>; - -export interface BuiltinExchange { - exchangeBaseUrl: string; - currencyHint?: string; -} - -export interface WalletConfig { - /** - * 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. - */ - testing: { - /** - * Allow withdrawal of denominations even though they are about to expire. - */ - denomselAllowLate: boolean; - devModeActive: boolean; - insecureTrustExchange: boolean; - preventThrottling: boolean; - skipDefaults: boolean; - emitObservabilityEvents: boolean; - }; - - /** - * Configurations values that may be safe to show to the user - */ - features: { - allowHttp: boolean; - }; -} - // group: Basic Wallet Information /** @@ -1100,14 +1053,12 @@ export type GetPendingTasksOp = { response: any; }; - export type GetActiveTasksOp = { op: WalletApiOperation.GetActiveTasks; request: EmptyObject; response: GetActiveTasks; }; - /** * Dump all coins of the wallet in a simple JSON format. */ @@ -1305,15 +1256,3 @@ export interface WalletCoreApiClient { payload: WalletCoreRequestType<Op>, ): Promise<WalletCoreResponseType<Op>>; } - -type Primitives = string | number | boolean; - -type RecursivePartial<T extends object> = { - [P in keyof T]?: T[P] extends Array<infer U extends object> - ? Array<RecursivePartial<U>> - : T[P] extends Array<infer J extends Primitives> - ? Array<J> - : T[P] extends object - ? RecursivePartial<T[P]> - : T[P]; -} & object; |