/** * Not belonging here: ports to expose when * starting the services and Git tags. */ interface BankAccount { username: string; password: string; } interface NexusAccount { username: string; password: string; } class ApiKey { apikey: string; constructor(apikey: string) { if (!apikey.startsWith("secret-token:")) { throw Error("Given API key lacks leading 'secret-token:' part.") } this.apikey = apikey; } } interface TalerConfigUrls { merchantUrl: URL; landingUrl: URL; blogUrl: URL; donationsUrl: URL; surveyUrl: URL; syncUrl: URL; // was bank-url in INI config: bankWebUiUrl: URL; // Used to point the Web UI. bankSandboxUrl: URL; // was default-exchange in INI config: exchangeUrl: URL; } interface TalerConfigSecrets { merchantApiKey: ApiKey; dbPassword: string; } interface TalerConfigBankAccounts { exchange: BankAccount; blog: BankAccount; pos: BankAccount; gnunet: BankAccount; taler: BankAccount; tor: BankAccount; survey: BankAccount; defaultMerchantInstance: BankAccount; } interface TalerConfig { currency: string; urls: TalerConfigUrls; secrets: TalerConfigSecrets; bankAccounts: TalerConfigBankAccounts; exchangeNexusAccount: NexusAccount; }