This commit is contained in:
swrup 2025-11-20 21:39:12 +01:00
parent 67a2282141
commit d1162c329f
2 changed files with 7 additions and 5 deletions

73
src/assets/default.config Normal file
View file

@ -0,0 +1,73 @@
[currency-EUR]
enabled= YES
code= EUR
name= euro
fractional_input_digits= 2
fractional_normal_digits= 2
fractional_trailing_zero_digits= 2
alt_unit_names= "{"0":"€","3":"k€"}"
[exchange]
currency = EUR
currency_round_unit = EUR:0.01
db = postgres
attribute_encryption_key = "deadbeef"
port = 3434
bind_to = localhost
master_public_key = "8MQF2XPWCKCW4199JFPE08X7Y9XAX21SF2HD8NZKXM3PY3CMCJ90===="
stefan_abs = EUR:0.00
stefan_log = EUR:0.00
stefan_lin = 0.00
aggregator_idle_sleep_interval = "1 hour"
closer_idle_sleep_interval = "1 hour"
transfer_idle_sleep_interval = "1 hour"
wirewatch_idle_sleep_interval = "1 hour"
signkey_legal_duration = "1 year"
max_keys_caching = "4 weeks"
enable_kyc = NO
terms_etag = "0"
privacy_etag = "0"
[exchangedb]
idle_reserve_expiration_time = "1 year 2 weeks 3 hours 4 minutes 5 seconds"
legal_reserve_expiration_time = "1 year"
aggregator_shift = "1 year"
max_aml_program_runtime = "1 year"
default_purse_limit = 9999
[exchangedb-postgres]
config = "pgx://mte:hunter2@localhost:5432/taler-exchange"
[taler-exchange-secmod-rsa]
lookahead_sign = "1 year"
overlap_duration = "1 year"
[taler-exchange-secmod-eddsa]
lookahead_sign = "1 year"
overlap_duration = "1 year"
[coin_kudo_1]
value= EUR:0.01
duration_withdraw= "1 year"
duration_spend= "1 year"
duration_legal= "1 year"
fee_withdraw= EUR:0.00
fee_deposit= EUR:0.00
fee_refresh= EUR:0.00
fee_refund= EUR:0.00
cipher= RSA
rsa_keysize= 2048
age_restricted= NO
[coin_kudo_2]
value= EUR:0.02
duration_withdraw= "1 year"
duration_spend= "1 year"
duration_legal= "1 year"
fee_withdraw= EUR:0.00
fee_deposit= EUR:0.00
fee_refresh= EUR:0.00
fee_refund= EUR:0.00
cipher= RSA
rsa_keysize= 2048
age_restricted= NO

View file

@ -1,11 +1,13 @@
open Parse_config
let config_data =
let read_file file = In_channel.with_open_bin file In_channel.input_all in
let content = read_file "default.config" in
let v = Parse_data.parse content in
(*Fmt.epr "config file:@\n%a@." Pp_debug.pp_config v;*)
v
let path = Fpath.to_string (Fpath.v "default.config") in
match Assets_crunch.read path with
| None -> Fmt.failwith "static file not found: `%s`" path
| Some data ->
let v = Parse_data.parse data in
(*Fmt.epr "config file:@\n%a@." Pp_debug.pp_config v;*)
v
module Exchange = struct
let get_opt field = get_opt config_data ~section:"exchange" ~field