blob: 68051719241fb65769c66c3b67a80a2b2b0c9015 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/**
* 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;
}
|